From e578d229cb5a251ce3e709203169ddf8df6fc6a8 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Wed, 14 May 2025 17:20:34 -0500 Subject: [PATCH 01/13] Add endpoint rules engine --- build.gradle.kts | 5 + .../smithy-java.module-conventions.gradle.kts | 1 - .../smithy/java/client/core/CallContext.java | 34 +- .../smithy/java/client/core/Client.java | 29 + .../smithy/java/client/core/ClientCall.java | 2 + .../smithy/java/client/core/ClientConfig.java | 14 +- .../java/client/core/ClientContext.java | 54 ++ .../java/client/core/endpoint/Endpoint.java | 5 +- .../client/core/endpoint/EndpointContext.java | 23 + .../client/core/endpoint/EndpointImpl.java | 22 +- .../core/endpoint/EndpointResolver.java | 8 +- .../core/endpoint/StaticHostResolver.java | 20 + .../smithy/java/client/core/ClientTest.java | 38 +- .../client/http/plugins/UserAgentPlugin.java | 3 +- .../http/plugins/UserAgentPluginTest.java | 3 +- client/client-rulesengine/build.gradle.kts | 24 + .../java/client/rulesengine/VmBench.java | 96 +++ .../client/rulesengine/AttrExpression.java | 136 +++++ .../java/client/rulesengine/CseOptimizer.java | 69 +++ .../rulesengine/EndpointRulesPlugin.java | 90 +++ .../rulesengine/EndpointRulesResolver.java | 74 +++ .../client/rulesengine/EndpointUtils.java | 138 +++++ .../client/rulesengine/ParamDefinition.java | 20 + .../client/rulesengine/RulesCompiler.java | 567 ++++++++++++++++++ .../java/client/rulesengine/RulesEngine.java | 206 +++++++ .../rulesengine/RulesEvaluationError.java | 19 + .../client/rulesengine/RulesExtension.java | 52 ++ .../client/rulesengine/RulesFunction.java | 69 +++ .../java/client/rulesengine/RulesProgram.java | 408 +++++++++++++ .../java/client/rulesengine/RulesVm.java | 318 ++++++++++ .../java/client/rulesengine/Stdlib.java | 116 ++++ .../client/rulesengine/StringTemplate.java | 119 ++++ .../rulesengine/AttrExpressionTest.java | 48 ++ .../rulesengine/EndpointRulesPluginTest.java | 97 +++ .../EndpointRulesResolverTest.java | 184 ++++++ .../client/rulesengine/EndpointUtilsTest.java | 157 +++++ .../client/rulesengine/RulesCompilerTest.java | 87 +++ .../client/rulesengine/RulesEngineTest.java | 149 +++++ .../client/rulesengine/RulesProgramTest.java | 106 ++++ .../java/client/rulesengine/RulesVmTest.java | 457 ++++++++++++++ .../java/client/rulesengine/StdlibTest.java | 102 ++++ .../rulesengine/StringTemplateTest.java | 70 +++ .../rulesengine/example-complex-ruleset.json | 242 ++++++++ .../client/rulesengine/minimal-ruleset.json | 30 + .../client/rulesengine/minimal-ruleset.smithy | 33 + .../rulesengine/runner/default-values.smithy | 153 +++++ .../client/rulesengine/runner/headers.smithy | 80 +++ .../rulesengine/runner/parse-url.smithy | 246 ++++++++ .../rulesengine/runner/substring.smithy | 293 +++++++++ .../rulesengine/runner/uri-encode.smithy | 132 ++++ .../rulesengine/runner/valid-hostlabel.smithy | 149 +++++ .../java/client/rulesengine/substring.json | 95 +++ config/spotbugs/filter.xml | 5 + gradle/libs.versions.toml | 2 + .../smithy/java/io/uri/URLEncoding.java | 2 +- settings.gradle.kts | 1 + 56 files changed, 5655 insertions(+), 47 deletions(-) create mode 100644 client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientContext.java create mode 100644 client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointContext.java create mode 100644 client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/StaticHostResolver.java create mode 100644 client/client-rulesengine/build.gradle.kts create mode 100644 client/client-rulesengine/src/jmh/java/software/amazon/smithy/java/client/rulesengine/VmBench.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/AttrExpression.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/CseOptimizer.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ParamDefinition.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngine.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEvaluationError.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesExtension.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesFunction.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StringTemplate.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/AttrExpressionTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesProgramTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StringTemplateTest.java create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/example-complex-ruleset.json create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.json create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.smithy create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/headers.smithy create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/parse-url.smithy create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/substring.smithy create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/uri-encode.smithy create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/valid-hostlabel.smithy create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/substring.json diff --git a/build.gradle.kts b/build.gradle.kts index 05ea65312..d35c25bf8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,6 +8,11 @@ plugins { idea } +repositories { + mavenLocal() + mavenCentral() +} + task("addGitHooks") { onlyIf("unix") { !Os.isFamily(Os.FAMILY_WINDOWS) diff --git a/buildSrc/src/main/kotlin/smithy-java.module-conventions.gradle.kts b/buildSrc/src/main/kotlin/smithy-java.module-conventions.gradle.kts index e016efe8b..4e859738d 100644 --- a/buildSrc/src/main/kotlin/smithy-java.module-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/smithy-java.module-conventions.gradle.kts @@ -49,7 +49,6 @@ afterEvaluate { manifest { attributes(mapOf("Automatic-Module-Name" to moduleName)) } - duplicatesStrategy = DuplicatesStrategy.FAIL } } diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/CallContext.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/CallContext.java index fa440f368..ca7e12b6f 100644 --- a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/CallContext.java +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/CallContext.java @@ -5,7 +5,6 @@ package software.amazon.smithy.java.client.core; -import java.time.Duration; import java.util.HashSet; import java.util.Set; import software.amazon.smithy.java.auth.api.identity.Identity; @@ -15,30 +14,26 @@ /** * Context parameters made available to underlying transports like HTTP clients. + * + *

Settings that can be applied client-wide can be found in {@link ClientContext}. */ public final class CallContext { /** - * The total amount of time to wait for an API call to complete, including retries, and serialization. + * The read-only endpoint for the request. */ - public static final Context.Key API_CALL_TIMEOUT = Context.key("API call timeout"); - - /** - * The amount of time to wait for a single, underlying network request to complete before giving up and timing out. - */ - public static final Context.Key API_CALL_ATTEMPT_TIMEOUT = Context.key("API call attempt timeout"); + public static final Context.Key ENDPOINT = Context.key("Endpoint of the request"); /** * The endpoint resolver used to resolve the destination endpoint for a request. + * + *

This is a read-only value; modifying this value has no effect on a request. */ public static final Context.Key ENDPOINT_RESOLVER = Context.key("EndpointResolver"); /** - * The read-only resolved endpoint for the request. - */ - public static final Context.Key ENDPOINT = Context.key("Endpoint of the request"); - - /** - * The identity resolved for the request. + * The read-only identity resolved for the request. + * + *

This is a read-only value; modifying this value has no effect on a request. */ public static final Context.Key IDENTITY = Context.key("Identity of the caller"); @@ -74,16 +69,5 @@ public final class CallContext { "Feature IDs used with a request", HashSet::new); - /** - * The name of the application, used in things like user-agent headers. - * - *

This value is used by AWS SDKs, but can be used generically for any client. - * See Application ID for more - * information. - * - *

This value should be less than 50 characters. - */ - public static final Context.Key APPLICATION_ID = Context.key("Application ID"); - private CallContext() {} } diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/Client.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/Client.java index 105cf9ff9..14b069e75 100644 --- a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/Client.java +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/Client.java @@ -13,6 +13,7 @@ import software.amazon.smithy.java.auth.api.identity.IdentityResolvers; import software.amazon.smithy.java.client.core.auth.scheme.AuthScheme; import software.amazon.smithy.java.client.core.auth.scheme.AuthSchemeResolver; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; import software.amazon.smithy.java.client.core.interceptors.CallHook; import software.amazon.smithy.java.client.core.interceptors.ClientInterceptor; @@ -233,6 +234,34 @@ public B endpointResolver(EndpointResolver endpointResolver) { return (B) this; } + /** + * Set a custom endpoint for the client to use. + * + *

Note that things like "hostLabel" traits may still cause the endpoint to change. For a completely + * static endpoint that never changes, use {@link EndpointResolver#staticHost}. + * + * @param customEndpoint Endpoint to use with the client. + * @return the builder. + */ + @SuppressWarnings("unchecked") + public B endpoint(Endpoint customEndpoint) { + putConfig(ClientContext.CUSTOM_ENDPOINT, customEndpoint); + return (B) this; + } + + /** + * Set a custom endpoint for the client to use. + * + * @param customEndpoint Endpoint to use with the client. + * @return the builder. + * @see #endpoint(Endpoint) + */ + @SuppressWarnings("unchecked") + public B endpoint(String customEndpoint) { + putConfig(ClientContext.CUSTOM_ENDPOINT, Endpoint.builder().uri(customEndpoint).build()); + return (B) this; + } + /** * Add an interceptor to the client. * diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientCall.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientCall.java index 1270880e4..c61828960 100644 --- a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientCall.java +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientCall.java @@ -64,6 +64,8 @@ private ClientCall(Builder builder) { supportedAuthSchemes = builder.supportedAuthSchemes.stream() .collect(Collectors.toMap(AuthScheme::schemeId, Function.identity(), (key1, key2) -> key1)); + context.put(CallContext.ENDPOINT_RESOLVER, endpointResolver); + // Retries retryStrategy = Objects.requireNonNull(builder.retryStrategy, "retryStrategy is null"); retryScope = Objects.requireNonNullElse(builder.retryScope, ""); diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientConfig.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientConfig.java index 110ebd0b8..e34cd6b33 100644 --- a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientConfig.java +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientConfig.java @@ -70,7 +70,19 @@ private ClientConfig(Builder builder) { this.transport = builder.transport; ClientPipeline.validateProtocolAndTransport(protocol, transport); - this.endpointResolver = Objects.requireNonNull(builder.endpointResolver, "endpointResolver is null"); + // Use an explicitly given resolver if one was set. + if (builder.endpointResolver != null) { + this.endpointResolver = builder.endpointResolver; + } else { + // Use a custom endpoint and static endpoint resolver if a custom endpoint was given. + // Things like the Smithy rules engine based resolver look for this property to know if a custom endpoint + // was provided in this manner. + var customEndpoint = builder.context.get(ClientContext.CUSTOM_ENDPOINT); + if (customEndpoint == null) { + throw new NullPointerException("Both endpointResolver and ClientContext.CUSTOM_ENDPOINT are not set"); + } + this.endpointResolver = EndpointResolver.staticEndpoint(customEndpoint); + } this.interceptors = List.copyOf(builder.interceptors); diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientContext.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientContext.java new file mode 100644 index 000000000..d1db7c1d2 --- /dev/null +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/ClientContext.java @@ -0,0 +1,54 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.core; + +import java.time.Duration; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; +import software.amazon.smithy.java.context.Context; + +/** + * Context parameters that can be provided on a client config and take effect on each request. + * + *

Other per/call settings can be found in {@link CallContext}. + */ +public final class ClientContext { + /** + * A custom endpoint used in each request. + * + *

This can be used in lieu of setting something like {@link EndpointResolver#staticEndpoint}, allowing + * endpoint resolvers like the Smithy Rules Engine resolver to still process and validate endpoints even when a + * custom endpoint is provided. + */ + public static final Context.Key CUSTOM_ENDPOINT = Context.key("Custom endpoint to use with requests"); + + /** + * The name of the application, used in things like user-agent headers. + * + *

This value is used by AWS SDKs, but can be used generically for any client. + * See Application ID for more + * information. + * + *

This value should be less than 50 characters. + */ + public static final Context.Key APPLICATION_ID = Context.key("Application ID"); + + /** + * The total amount of time to wait for an API call to complete, including retries, and serialization. + * + *

This can be overridden per/call too. + */ + public static final Context.Key API_CALL_TIMEOUT = Context.key("API call timeout"); + + /** + * The amount of time to wait for a single, underlying network request to complete before giving up and timing out. + * + *

This can be overridden per/call too. + */ + public static final Context.Key API_CALL_ATTEMPT_TIMEOUT = Context.key("API call attempt timeout"); + + private ClientContext() {} +} diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/Endpoint.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/Endpoint.java index f5d1c9057..fb11323dd 100644 --- a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/Endpoint.java +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/Endpoint.java @@ -51,10 +51,13 @@ public interface Endpoint { * * @return the builder. */ + @SuppressWarnings("unchecked") default Builder toBuilder() { var builder = new EndpointImpl.Builder(); builder.uri(uri()); - properties().forEach(k -> builder.properties.put(k, property(k))); + for (var e : properties()) { + builder.putProperty((Context.Key) e, property(e)); + } for (EndpointAuthScheme authScheme : authSchemes()) { builder.addAuthScheme(authScheme); } diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointContext.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointContext.java new file mode 100644 index 000000000..ccd6f784b --- /dev/null +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointContext.java @@ -0,0 +1,23 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.core.endpoint; + +import java.util.List; +import java.util.Map; +import software.amazon.smithy.java.context.Context; + +/** + * Context parameters specifically relevant to a resolved {@link Endpoint} property. + */ +public final class EndpointContext { + + private EndpointContext() {} + + /** + * Assigns headers to an endpoint. These are typically HTTP headers. + */ + public static final Context.Key>> HEADERS = Context.key("Endpoint headers"); +} diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointImpl.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointImpl.java index dd09e8ba9..11da6cad2 100644 --- a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointImpl.java +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointImpl.java @@ -23,8 +23,11 @@ final class EndpointImpl implements Endpoint { private EndpointImpl(Builder builder) { this.uri = Objects.requireNonNull(builder.uri); - this.authSchemes = List.copyOf(builder.authSchemes); - this.properties = Map.copyOf(builder.properties); + this.authSchemes = builder.authSchemes == null ? List.of() : builder.authSchemes; + this.properties = builder.properties == null ? Map.of() : builder.properties; + // Clear out the builder, making this class immutable and the builder still reusable. + builder.authSchemes = null; + builder.properties = null; } @Override @@ -66,11 +69,16 @@ public int hashCode() { return Objects.hash(uri, authSchemes, properties); } + @Override + public String toString() { + return "Endpoint{uri=" + uri + ", authSchemes=" + authSchemes + ", properties=" + properties + '}'; + } + static final class Builder implements Endpoint.Builder { private URI uri; - private final List authSchemes = new ArrayList<>(); - final Map, Object> properties = new HashMap<>(); + private List authSchemes; + private Map, Object> properties; @Override public Builder uri(URI uri) { @@ -89,12 +97,18 @@ public Builder uri(String uri) { @Override public Builder addAuthScheme(EndpointAuthScheme authScheme) { + if (this.authSchemes == null) { + this.authSchemes = new ArrayList<>(); + } this.authSchemes.add(authScheme); return this; } @Override public Builder putProperty(Context.Key property, T value) { + if (this.properties == null) { + this.properties = new HashMap<>(); + } properties.put(property, value); return this; } diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointResolver.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointResolver.java index 7d0f8bba5..24842640e 100644 --- a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointResolver.java +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointResolver.java @@ -72,7 +72,7 @@ static EndpointResolver staticEndpoint(URI endpoint) { */ static EndpointResolver staticHost(Endpoint endpoint) { Objects.requireNonNull(endpoint); - return params -> CompletableFuture.completedFuture(endpoint); + return new StaticHostResolver(endpoint); } /** @@ -83,8 +83,7 @@ static EndpointResolver staticHost(Endpoint endpoint) { */ static EndpointResolver staticHost(String endpoint) { Objects.requireNonNull(endpoint); - var ep = Endpoint.builder().uri(endpoint).build(); - return params -> CompletableFuture.completedFuture(ep); + return staticHost(Endpoint.builder().uri(endpoint).build()); } /** @@ -95,7 +94,6 @@ static EndpointResolver staticHost(String endpoint) { */ static EndpointResolver staticHost(URI endpoint) { Objects.requireNonNull(endpoint); - var ep = Endpoint.builder().uri(endpoint).build(); - return params -> CompletableFuture.completedFuture(ep); + return staticHost(Endpoint.builder().uri(endpoint).build()); } } diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/StaticHostResolver.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/StaticHostResolver.java new file mode 100644 index 000000000..04ea56435 --- /dev/null +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/StaticHostResolver.java @@ -0,0 +1,20 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.core.endpoint; + +import java.util.concurrent.CompletableFuture; + +/** + * An endpoint resolver that always returns the same endpoint. + * + * @param endpoint Endpoint to return exactly. + */ +record StaticHostResolver(Endpoint endpoint) implements EndpointResolver { + @Override + public CompletableFuture resolveEndpoint(EndpointResolverParams params) { + return CompletableFuture.completedFuture(endpoint); + } +} diff --git a/client/client-core/src/test/java/software/amazon/smithy/java/client/core/ClientTest.java b/client/client-core/src/test/java/software/amazon/smithy/java/client/core/ClientTest.java index 81f8522f7..d2d4632a0 100644 --- a/client/client-core/src/test/java/software/amazon/smithy/java/client/core/ClientTest.java +++ b/client/client-core/src/test/java/software/amazon/smithy/java/client/core/ClientTest.java @@ -138,14 +138,14 @@ public void allowsInterceptorRequestOverrides() throws URISyntaxException { @Override public ClientConfig modifyBeforeCall(CallHook hook) { var override = RequestOverrideConfig.builder() - .putConfig(CallContext.APPLICATION_ID, id) + .putConfig(ClientContext.APPLICATION_ID, id) .build(); return hook.config().withRequestOverride(override); } @Override public void readBeforeExecution(InputHook hook) { - assertThat(hook.context().get(CallContext.APPLICATION_ID), equalTo(id)); + assertThat(hook.context().get(ClientContext.APPLICATION_ID), equalTo(id)); } })) .endpointResolver(EndpointResolver.staticEndpoint(new URI("http://localhost"))) @@ -173,15 +173,15 @@ public ClientConfig modifyBeforeCall(CallHook hook) { assertThat(hook.config().context().get(CallContext.APPLICATION_ID), equalTo(id)); // Note that the overrides given to the call itself will override interceptors. var override = RequestOverrideConfig.builder() - .putConfig(CallContext.APPLICATION_ID, "foo") + .putConfig(ClientContext.APPLICATION_ID, "foo") .build(); return hook.config().withRequestOverride(override); } @Override public void readBeforeExecution(InputHook hook) { - assertThat(hook.context().get(CallContext.APPLICATION_ID), equalTo(id)); - assertThat(hook.context().get(CallContext.API_CALL_TIMEOUT), equalTo(Duration.ofMinutes(2))); + assertThat(hook.context().get(ClientContext.APPLICATION_ID), equalTo(id)); + assertThat(hook.context().get(ClientContext.API_CALL_TIMEOUT), equalTo(Duration.ofMinutes(2))); } })) .endpointResolver(EndpointResolver.staticEndpoint(new URI("http://localhost"))) @@ -192,8 +192,32 @@ public void readBeforeExecution(InputHook hook) { c.call("GetSprocket", Document.ofObject(new HashMap<>()), RequestOverrideConfig.builder() - .putConfig(CallContext.API_CALL_TIMEOUT, Duration.ofMinutes(2)) - .putConfig(CallContext.APPLICATION_ID, id) // this will be take precedence + .putConfig(ClientContext.API_CALL_TIMEOUT, Duration.ofMinutes(2)) + .putConfig(ClientContext.APPLICATION_ID, id) // this will be take precedence .build()); } + + @Test + public void setsCustomEndpoint() { + var queue = new MockQueue(); + queue.enqueue(HttpResponse.builder().statusCode(200).build()); + + DynamicClient c = DynamicClient.builder() + .model(MODEL) + .service(SERVICE) + .protocol(new RestJsonClientProtocol(SERVICE)) + .addPlugin(MockPlugin.builder().addQueue(queue).build()) + .addPlugin(config -> config.addInterceptor(new ClientInterceptor() { + @Override + public void readBeforeExecution(InputHook hook) { + assertThat(hook.context().get(ClientContext.CUSTOM_ENDPOINT).uri().toString(), + equalTo("https://example.com")); + } + })) + .endpoint("https://example.com") + .authSchemeResolver(AuthSchemeResolver.NO_AUTH) + .build(); + + c.call("GetSprocket"); + } } diff --git a/client/client-http/src/main/java/software/amazon/smithy/java/client/http/plugins/UserAgentPlugin.java b/client/client-http/src/main/java/software/amazon/smithy/java/client/http/plugins/UserAgentPlugin.java index 39c0f13b4..14e53cd2f 100644 --- a/client/client-http/src/main/java/software/amazon/smithy/java/client/http/plugins/UserAgentPlugin.java +++ b/client/client-http/src/main/java/software/amazon/smithy/java/client/http/plugins/UserAgentPlugin.java @@ -9,6 +9,7 @@ import java.util.Locale; import software.amazon.smithy.java.client.core.CallContext; import software.amazon.smithy.java.client.core.ClientConfig; +import software.amazon.smithy.java.client.core.ClientContext; import software.amazon.smithy.java.client.core.ClientPlugin; import software.amazon.smithy.java.client.core.ClientTransport; import software.amazon.smithy.java.client.core.interceptors.ClientInterceptor; @@ -109,7 +110,7 @@ private static String createUa(Context context) { } private static String resolveAppId(Context context) { - var appId = context.get(CallContext.APPLICATION_ID); + var appId = context.get(ClientContext.APPLICATION_ID); if (appId == null) { appId = System.getenv(SYSTEM_APP_ID); } diff --git a/client/client-http/src/test/java/software/amazon/smithy/java/client/http/plugins/UserAgentPluginTest.java b/client/client-http/src/test/java/software/amazon/smithy/java/client/http/plugins/UserAgentPluginTest.java index eb5b6d184..1c3986177 100644 --- a/client/client-http/src/test/java/software/amazon/smithy/java/client/http/plugins/UserAgentPluginTest.java +++ b/client/client-http/src/test/java/software/amazon/smithy/java/client/http/plugins/UserAgentPluginTest.java @@ -16,6 +16,7 @@ import java.util.Set; import org.junit.jupiter.api.Test; import software.amazon.smithy.java.client.core.CallContext; +import software.amazon.smithy.java.client.core.ClientContext; import software.amazon.smithy.java.client.core.FeatureId; import software.amazon.smithy.java.client.core.interceptors.RequestHook; import software.amazon.smithy.java.context.Context; @@ -49,7 +50,7 @@ public void addsDefaultAgent() throws Exception { public void addsApplicationId() throws Exception { UserAgentPlugin.UserAgentInterceptor interceptor = new UserAgentPlugin.UserAgentInterceptor(); var context = Context.create(); - context.put(CallContext.APPLICATION_ID, "hello there"); + context.put(ClientContext.APPLICATION_ID, "hello there"); var req = HttpRequest.builder().uri(new URI("/")).method("GET").build(); var foo = new Foo(); var updated = interceptor.modifyBeforeSigning(new RequestHook<>(createOperation(), context, foo, req)); diff --git a/client/client-rulesengine/build.gradle.kts b/client/client-rulesengine/build.gradle.kts new file mode 100644 index 000000000..1a2bfe665 --- /dev/null +++ b/client/client-rulesengine/build.gradle.kts @@ -0,0 +1,24 @@ +plugins { + id("smithy-java.module-conventions") + id("me.champeau.jmh") version "0.7.3" +} + +description = "Implements the rules engine traits used to resolve endpoints" + +extra["displayName"] = "Smithy :: Java :: Client :: Endpoint Rules" +extra["moduleName"] = "software.amazon.smithy.java.client.endpointrules" + +dependencies { + api(project(":client:client-core")) + implementation(libs.smithy.rules) + implementation(project(":logging")) +} + +jmh { + warmupIterations = 2 + iterations = 5 + fork = 1 + // profilers.add("async:output=flamegraph") + // profilers.add("gc") + duplicateClassesStrategy = DuplicatesStrategy.WARN +} diff --git a/client/client-rulesengine/src/jmh/java/software/amazon/smithy/java/client/rulesengine/VmBench.java b/client/client-rulesengine/src/jmh/java/software/amazon/smithy/java/client/rulesengine/VmBench.java new file mode 100644 index 000000000..f3b7cbbbf --- /dev/null +++ b/client/client-rulesengine/src/jmh/java/software/amazon/smithy/java/client/rulesengine/VmBench.java @@ -0,0 +1,96 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.model.node.Node; +import software.amazon.smithy.rulesengine.language.EndpointRuleSet; +import software.amazon.smithy.utils.IoUtils; + +@State(Scope.Benchmark) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@BenchmarkMode(Mode.AverageTime) +@Warmup( + iterations = 2, + time = 3, + timeUnit = TimeUnit.SECONDS) +@Measurement( + iterations = 3, + time = 3, + timeUnit = TimeUnit.SECONDS) +@Fork(1) +public class VmBench { + + private static final Map> CASES = Map.ofEntries( + Map.entry("example-complex-ruleset.json-1", + Map.of( + "Endpoint", + "https://example.com", + "UseFIPS", + false)), + Map.entry("minimal-ruleset.json-1", Map.of("Region", "us-east-1"))); + + @Param({ + "yes", + "no", + }) + private String optimize; + + @Param({ + "example-complex-ruleset.json-1", + "minimal-ruleset.json-1" + }) + private String testName; + + private EndpointRuleSet ruleSet; + private Map parameters; + private RulesProgram program; + private Context ctx; + + @Setup + public void setup() throws Exception { + parameters = new HashMap<>(CASES.get(testName)); + var actualFile = testName.substring(0, testName.length() - 2); + var url = VmBench.class.getResource(actualFile); + if (url == null) { + throw new RuntimeException("Test case not found: " + actualFile); + } + var data = Node.parse(IoUtils.readUtf8Url(url)); + ruleSet = EndpointRuleSet.fromNode(data); + + var engine = new RulesEngine(); + if (optimize.equals("no")) { + engine.disableOptimizations(); + } + program = engine.compile(ruleSet); + ctx = Context.create(); + } + + // @Benchmark + // public Object compile() { + // // TODO + // return null; + // } + + @Benchmark + public Object evaluate() { + return program.resolveEndpoint(ctx, parameters); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/AttrExpression.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/AttrExpression.java new file mode 100644 index 000000000..b3fe6c9c4 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/AttrExpression.java @@ -0,0 +1,136 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.net.URI; +import java.util.List; +import java.util.Map; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.GetAttr; + +/** + * Implements the getAttr function by extracting paths from objects. + */ +sealed interface AttrExpression { + + Object apply(Object o); + + static AttrExpression from(GetAttr getAttr) { + var path = getAttr.getPath(); + + // Set the toString value on the final result. + String str = getAttr.toString(); // in the form of something#path + int position = str.lastIndexOf('#'); + var tostringValue = str.substring(position + 1); + + if (path.isEmpty()) { + throw new UnsupportedOperationException("Invalid getAttr expression: requires at least one part"); + } else if (path.size() == 1) { + return new ToString(tostringValue, from(getAttr.getPath().get(0))); + } + + // Parse the multi-level expression ("foo.bar.baz[9]"). + var result = new AndThen(from(path.get(0)), from(path.get(1))); + for (var i = 2; i < path.size(); i++) { + result = new AndThen(result, from(path.get(i))); + } + + return new ToString(tostringValue, result); + } + + private static AttrExpression from(GetAttr.Part part) { + if (part instanceof GetAttr.Part.Key k) { + return new GetKey(k.key().toString()); + } else if (part instanceof GetAttr.Part.Index i) { + return new GetIndex(i.index()); + } else { + throw new UnsupportedOperationException("Unexpected GetAttr part: " + part); + } + } + + /** + * Creates an AttrExpression from a string. Generally used when loading from pre-compiled programs. + * + * @param value Value to parse. + * @return the expression. + */ + static AttrExpression parse(String value) { + var values = value.split("\\."); + + // Parse a single-level expression ("foo" or "bar[0]"). + if (values.length == 1) { + return new ToString(value, parsePart(value)); + } + + // Parse the multi-level expression ("foo.bar.baz[9]"). + var result = new AndThen(parsePart(values[0]), parsePart(values[1])); + for (var i = 2; i < values.length; i++) { + result = new AndThen(result, parsePart(values[i])); + } + + // Set the toString value on the final result. + return new ToString(value, result); + } + + private static AttrExpression parsePart(String part) { + int position = part.indexOf('['); + if (position == -1) { + return new GetKey(part); + } else { + String numberString = part.substring(position + 1, part.length() - 1); + int index = Integer.parseInt(numberString); + String key = part.substring(0, position); + return new AndThen(new GetKey(key), new GetIndex(index)); + } + } + + record ToString(String original, AttrExpression delegate) implements AttrExpression { + @Override + public Object apply(Object o) { + return delegate.apply(o); + } + + @Override + public String toString() { + return original; + } + } + + record AndThen(AttrExpression left, AttrExpression right) implements AttrExpression { + @Override + public Object apply(Object o) { + var result = left.apply(o); + if (result != null) { + result = right.apply(result); + } + return result; + } + } + + record GetKey(String key) implements AttrExpression { + @Override + @SuppressWarnings("rawtypes") + public Object apply(Object o) { + if (o instanceof Map m) { + return m.get(key); + } else if (o instanceof URI u) { + return EndpointUtils.getUriProperty(u, key); + } else { + return null; + } + } + } + + record GetIndex(int index) implements AttrExpression { + @Override + @SuppressWarnings("rawtypes") + public Object apply(Object o) { + if (o instanceof List l && l.size() > index) { + return l.get(index); + } + return null; + } + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/CseOptimizer.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/CseOptimizer.java new file mode 100644 index 000000000..ef61ee8aa --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/CseOptimizer.java @@ -0,0 +1,69 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; +import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; +import software.amazon.smithy.rulesengine.language.syntax.rule.TreeRule; + +/** + * Eliminates common subexpressions so they're stored in a single registry. + * + *

This currently only eliminates top-level condition functions that are duplicates across any rule or tree-rule + * and at any depth. It doesn't eliminate nested expressions of functions. + */ +final class CseOptimizer { + + // The score required to make a condition an eliminated CSE. + private static final int MINIMUM_SCORE = 5; + + // Counts how many times an expression is duplicated. + private final Map conditions = new HashMap<>(); + + static Map apply(List rules) { + var cse = new CseOptimizer(); + for (var rule : rules) { + cse.apply(1, rule); + } + return cse.getCse(); + } + + private void apply(int depth, Rule rule) { + if (rule instanceof TreeRule t) { + for (var c : t.getConditions()) { + findCse(depth, c.getFunction()); + } + for (var r : t.getRules()) { + apply(depth + 1, r); + } + } else { + for (var c : rule.getConditions()) { + findCse(depth, c.getFunction()); + } + } + } + + private void findCse(int depth, Expression f) { + // Add to the score for each expression, discounting occurrences the deeper they appear. + conditions.put(f, conditions.getOrDefault(f, 0.0) + (1 / (depth * 0.5))); + } + + private Map getCse() { + // Only keep duplicated expressions that have a pretty high score. + Map result = new LinkedHashMap<>(); + for (var e : conditions.entrySet()) { + if (e.getValue() > MINIMUM_SCORE) { + result.put(e.getKey(), (byte) 0); + } + } + + return result; + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java new file mode 100644 index 000000000..6e2ec19dc --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java @@ -0,0 +1,90 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import software.amazon.smithy.java.client.core.ClientConfig; +import software.amazon.smithy.java.client.core.ClientContext; +import software.amazon.smithy.java.client.core.ClientPlugin; +import software.amazon.smithy.java.core.schema.TraitKey; +import software.amazon.smithy.rulesengine.traits.ContextParamTrait; +import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; +import software.amazon.smithy.rulesengine.traits.OperationContextParamsTrait; +import software.amazon.smithy.rulesengine.traits.StaticContextParamsTrait; + +/** + * Attempts to resolve endpoints using smithy.rules#endpointRuleSet or a {@link RulesProgram} compiled from this trait. + */ +public final class EndpointRulesPlugin implements ClientPlugin { + + public static final TraitKey STATIC_CONTEXT_PARAMS_TRAIT = + TraitKey.get(StaticContextParamsTrait.class); + + public static final TraitKey OPERATION_CONTEXT_PARAMS_TRAIT = + TraitKey.get(OperationContextParamsTrait.class); + + public static final TraitKey CONTEXT_PARAM_TRAIT = TraitKey.get(ContextParamTrait.class); + + public static final TraitKey ENDPOINT_RULESET_TRAIT = + TraitKey.get(EndpointRuleSetTrait.class); + + private final RulesProgram program; + + private EndpointRulesPlugin(RulesProgram program) { + this.program = program; + } + + /** + * Create a RulesEnginePlugin from a precompiled {@link RulesProgram}. + * + *

This is typically used by code-generated clients. + * + * @param program Program used to resolve endpoint. + * @return the rules engine plugin. + */ + public static EndpointRulesPlugin from(RulesProgram program) { + return new EndpointRulesPlugin(program); + } + + /** + * Creates an EndpointRulesPlugin that waits to create a program until configuring the client. It looks for the + * relevant Smithy traits, and if found, compiles them and sets up a resolver. If the traits can't be found, the + * resolver is not updated. If a resolver is already set, it is not changed. + * + * @return the plugin. + */ + public static EndpointRulesPlugin create() { + return new EndpointRulesPlugin(null); + } + + /** + * Gets the endpoint rules program that was compiled, or null if no rules were found on the service. + * + * @return the rules program or null. + */ + public RulesProgram getProgram() { + return program; + } + + @Override + public void configureClient(ClientConfig.Builder config) { + // Only modify the endpoint resolver if it isn't set already or if CUSTOM_ENDPOINT is set, + // and if a program was provided. + if (config.endpointResolver() == null || config.context().get(ClientContext.CUSTOM_ENDPOINT) != null) { + if (program != null) { + applyResolver(program, config); + } else if (config.service() != null) { + var ruleset = config.service().schema().getTrait(ENDPOINT_RULESET_TRAIT); + if (ruleset != null) { + applyResolver(new RulesEngine().compile(ruleset.getEndpointRuleSet()), config); + } + } + } + } + + private void applyResolver(RulesProgram applyProgram, ClientConfig.Builder config) { + config.endpointResolver(new EndpointRulesResolver(applyProgram)); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java new file mode 100644 index 000000000..c65ef0570 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java @@ -0,0 +1,74 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.core.schema.Schema; +import software.amazon.smithy.model.shapes.ShapeId; + +/** + * Endpoint resolver that uses the endpoint rules engine. + */ +final class EndpointRulesResolver implements EndpointResolver { + + private final RulesProgram program; + private final ConcurrentMap> STATIC_PARAMS = new ConcurrentHashMap<>(); + + EndpointRulesResolver(RulesProgram program) { + this.program = program; + } + + @Override + public CompletableFuture resolveEndpoint(EndpointResolverParams params) { + var operation = params.operation().schema(); + var endpointParams = createEndpointParams(operation); + + try { + return CompletableFuture.completedFuture(program.resolveEndpoint(params.context(), endpointParams)); + } catch (RulesEvaluationError e) { + return CompletableFuture.failedFuture(e); + } + } + + private Map createEndpointParams(Schema operation) { + var staticParams = getStaticParams(operation); + // TODO: Grab input from RulesEnginePlugin.OPERATION_CONTEXT_PARAMS_TRAIT + // TODO: Grab input from RulesEnginePlugin.CONTEXT_PARAM_TRAIT + return new HashMap<>(staticParams); + } + + private Map getStaticParams(Schema operation) { + var id = operation.id(); + var staticParams = STATIC_PARAMS.get(id); + if (staticParams != null) { + return staticParams; + } else { + staticParams = computeStaticParams(operation); + var fresh = STATIC_PARAMS.putIfAbsent(id, staticParams); + return fresh == null ? staticParams : fresh; + } + } + + private Map computeStaticParams(Schema operation) { + var staticParamsTrait = operation.getTrait(EndpointRulesPlugin.STATIC_CONTEXT_PARAMS_TRAIT); + if (staticParamsTrait == null) { + return Map.of(); + } + + Map result = new HashMap<>(staticParamsTrait.getParameters().size()); + for (var entry : staticParamsTrait.getParameters().entrySet()) { + result.put(entry.getKey(), EndpointUtils.convertNodeInput(entry.getValue().getValue())); + } + return result; + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java new file mode 100644 index 000000000..8c6dd07d4 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java @@ -0,0 +1,138 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import software.amazon.smithy.model.node.ArrayNode; +import software.amazon.smithy.model.node.BooleanNode; +import software.amazon.smithy.model.node.Node; +import software.amazon.smithy.model.node.StringNode; +import software.amazon.smithy.rulesengine.language.evaluation.value.ArrayValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.BooleanValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.EmptyValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.IntegerValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.RecordValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.StringValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.Value; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.ParseUrl; + +final class EndpointUtils { + + private EndpointUtils() {} + + // "The type of the value MUST be either a string, boolean or an array of string." + static Object convertNodeInput(Node value) { + if (value instanceof StringNode s) { + return s.getValue(); + } else if (value instanceof BooleanNode b) { + return b.getValue(); + } else if (value instanceof ArrayNode a) { + List result = new ArrayList<>(a.size()); + for (var e : a.getElements()) { + result.add(convertNodeInput(e)); + } + return result; + } else { + throw new RulesEvaluationError("Unsupported endpoint ruleset parameter: " + value); + } + } + + static Object convertInputParamValue(Value value) { + if (value instanceof StringValue s) { + return s.getValue(); + } else if (value instanceof IntegerValue i) { + return i.getValue(); + } else if (value instanceof ArrayValue a) { + var result = new ArrayList<>(); + for (var v : a.getValues()) { + result.add(convertInputParamValue(v)); + } + return result; + } else if (value instanceof EmptyValue) { + return null; + } else if (value instanceof BooleanValue b) { + return b.getValue(); + } else if (value instanceof RecordValue r) { + var result = new HashMap<>(); + for (var e : r.getValue().entrySet()) { + result.put(e.getKey().getName().getValue(), convertInputParamValue(e.getValue())); + } + return result; + } else { + throw new RulesEvaluationError("Unsupported value type: " + value); + } + } + + static Object verifyObject(Object value) { + if (value instanceof String + || value instanceof Number + || value instanceof Boolean + || value instanceof StringTemplate + || value instanceof URI) { + return value; + } + + if (value instanceof List l) { + for (var v : l) { + verifyObject(v); + } + return value; + } + + if (value instanceof Map m) { + for (var e : m.entrySet()) { + if (!(e.getKey() instanceof String)) { + throw new UnsupportedOperationException("Endpoint parameter maps must use string keys. Found " + e); + } + verifyObject(e.getKey()); + verifyObject(e.getValue()); + } + return m; + } + + throw new UnsupportedOperationException("Unsupported endpoint rules value given: " + value); + } + + // Read little-endian unsigned short (2 bytes) + static int bytesToShort(byte[] instructions, int offset) { + int low = instructions[offset] & 0xFF; + int high = instructions[offset + 1] & 0xFF; + return (high << 8) | low; + } + + // Write little-endian unsigned short (2 bytes) + static void shortToTwoBytes(int value, byte[] instructions, int offset) { + instructions[offset] = (byte) (value & 0xFF); + instructions[offset + 1] = (byte) ((value >> 8) & 0xFF); + } + + static Object getUriProperty(URI uri, String key) { + return switch (key) { + case "scheme" -> uri.getScheme(); + case "path" -> uri.getRawPath(); + case "normalizedPath" -> ParseUrl.normalizePath(uri.getRawPath()); + case "authority" -> uri.getAuthority(); + case "isIp" -> ParseUrl.isIpAddr(uri.getHost()); + default -> null; + }; + } + + static T castFnArgument(Object value, Class type, String method, int position) { + try { + return type.cast(value); + } catch (ClassCastException e) { + throw new RulesEvaluationError(String.format("Expected %s argument %d to be %s, but given %s", + method, + position, + type.getName(), + value.getClass().getName())); + } + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ParamDefinition.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ParamDefinition.java new file mode 100644 index 000000000..6e66f1a30 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ParamDefinition.java @@ -0,0 +1,20 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +/** + * Defines a parameter used in {@link RulesProgram}. + * + * @param name Name of the parameter. + * @param required True if the parameter is required. + * @param defaultValue An object value that contains a default value for input parameters. + * @param builtin A string that defines the builtin that provides a default value for input parameters. + */ +public record ParamDefinition(String name, boolean required, Object defaultValue, String builtin) { + public ParamDefinition(String name) { + this(name, false, null, null); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java new file mode 100644 index 000000000..27b71c6d6 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java @@ -0,0 +1,567 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Deque; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.rulesengine.language.EndpointRuleSet; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; +import software.amazon.smithy.rulesengine.language.syntax.expressions.ExpressionVisitor; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Reference; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.FunctionDefinition; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.GetAttr; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.BooleanLiteral; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.IntegerLiteral; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.RecordLiteral; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.StringLiteral; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.TupleLiteral; +import software.amazon.smithy.rulesengine.language.syntax.rule.Condition; +import software.amazon.smithy.rulesengine.language.syntax.rule.EndpointRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.ErrorRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; +import software.amazon.smithy.rulesengine.language.syntax.rule.TreeRule; + +final class RulesCompiler { + + private final List extensions; + private final EndpointRuleSet rules; + + private final Map constantPool = new LinkedHashMap<>(); + private final BiFunction builtinProvider; + private final Map cse; + private boolean performOptimizations; + + // The parsed opcodes and operands. + private byte[] instructions = new byte[64]; + private int instructionSize; + + // Parameters and captured variables. + private final List registry = new ArrayList<>(); + + // A map of variable name to stack index. + private final Map> registryIndex = new HashMap<>(); + + // An array of actually used functions. + private final List usedFunctions = new ArrayList<>(); + + // Index of function name to the index in usedFunctions. + private final Map usedFunctionIndex = new HashMap<>(); + + // The resolved VM functions (stdLib + given functions). + private final Map functions; + + // Stack of available and reusable registers. + private final ArrayList> scopedRegisterStack = new ArrayList<>(); + private final Deque availableRegisters = new ArrayDeque<>(); + private int temporaryRegisters = 0; + + RulesCompiler( + List extensions, + EndpointRuleSet rules, + Map functions, + BiFunction builtinProvider, + boolean performOptimizations + ) { + this.extensions = extensions; + this.rules = rules; + this.builtinProvider = builtinProvider; + this.performOptimizations = performOptimizations; + this.functions = functions; + + // Byte 1 is the version byte. + instructions[0] = RulesProgram.VERSION; + // Byte 2 the number of parameters. Byte 3 is the number of temporary registers. Both filled in at the end. + instructionSize = 3; // start from here + + // Add parameters as registry values. + for (var param : rules.getParameters()) { + var defaultValue = param.getDefault().map(EndpointUtils::convertInputParamValue).orElse(null); + var builtinValue = param.getBuiltIn().orElse(null); + addRegister(param.getName().toString(), param.isRequired(), defaultValue, builtinValue); + } + + cse = performOptimizations ? CseOptimizer.apply(rules.getRules()) : Map.of(); + } + + private byte addRegister(String name, boolean required, Object defaultValue, String builtin) { + var register = new ParamDefinition(name, required, defaultValue, builtin); + if (registryIndex.containsKey(name)) { + throw new RulesEvaluationError("Duplicate variable name found in rules: " + name); + } + Deque stack = new ArrayDeque<>(); + stack.push((byte) registry.size()); + registryIndex.put(name, stack); + registry.add(register); + + // Register scopes are tracking by flipping bits of a long. That means a max of 64 registers. + // No real rules definition would have more than 64 registers. + if (registry.size() > 64) { + throw new RulesEvaluationError("Too many registers added to rules engine"); + } + + return (byte) (registry.size() - 1); + } + + private int getConstant(Object value) { + Integer index = constantPool.get(value); + if (index == null) { + index = constantPool.size(); + constantPool.put(value, index); + } + return index; + } + + // Gets a register that _has_ to exist by name. + private byte getRegister(String name) { + return registryIndex.get(name).peek(); + } + + // Used to assign registers in a stack-like manner. Not used to initialize registers. + private byte assignRegister(String name) { + var indices = registryIndex.get(name); + var index = getTempRegister(); + if (indices == null) { + indices = new ArrayDeque<>(); + registryIndex.put(name, indices); + } + indices.add(index); + return index; + } + + // Gets the next available temporary register or creates one. + private byte getTempRegister() { + return !availableRegisters.isEmpty() + ? availableRegisters.pop() + : addRegister("r" + temporaryRegisters++, false, null, null); + } + + private byte getFunctionIndex(String name) { + Byte index = usedFunctionIndex.get(name); + if (index == null) { + var fn = functions.get(name); + if (fn == null) { + throw new RulesEvaluationError("Rules engine referenced unknown function: " + name); + } + index = (byte) usedFunctionIndex.size(); + usedFunctionIndex.put(name, index); + usedFunctions.add(fn); + } + return index; + } + + RulesProgram compile() { + // Compile common subexpression values up front. + if (performOptimizations) { + performOptimizations = false; + for (var e : cse.entrySet()) { + alwaysCompileExpression(e.getKey()); + var register = getTempRegister(); + e.setValue(register); + add_SET_REGISTER(register); + } + performOptimizations = true; + } + + for (var rule : rules.getRules()) { + compileRule(rule); + } + + return buildProgram(); + } + + private void compileRule(Rule rule) { + enterScope(); + if (rule instanceof TreeRule t) { + compileTreeRule(t); + } else if (rule instanceof EndpointRule e) { + compileEndpointRule(e); + } else if (rule instanceof ErrorRule e) { + compileErrorRule(e); + } + exitScope(); + } + + private void enterScope() { + scopedRegisterStack.add(new HashMap<>()); + } + + private void exitScope() { + var value = scopedRegisterStack.remove(scopedRegisterStack.size() - 1); + // Free up assigned temp registers. + for (var entry : value.entrySet()) { + var indices = registryIndex.get(entry.getValue()); + indices.pop(); + availableRegisters.add(entry.getKey()); + } + } + + private void compileTreeRule(TreeRule tree) { + var jump = compileConditions(tree); + // Compile nested rules. + for (var rule : tree.getRules()) { + compileRule(rule); + } + // Patch in the actual jump target for each condition so it skips over the rules. + jump.patchTarget(instructions, instructionSize); + } + + private JumpIfFalsey compileConditions(Rule rule) { + var jump = new JumpIfFalsey(); + for (var condition : rule.getConditions()) { + compileCondition(condition, jump); + } + return jump; + } + + private void compileCondition(Condition condition, JumpIfFalsey jump) { + compileExpression(condition.getFunction()); + // Add an instruction to store the result as a register if the condition requests it. + condition.getResult().ifPresent(result -> { + var varName = result.toString(); + var register = assignRegister(varName); + var position = scopedRegisterStack.size() - 1; + scopedRegisterStack.get(position).put(register, varName); + add_SET_REGISTER(register); + }); + // Add the jump instruction after each condition to skip over more conditions or skip over the rule. + add_JUMP_IF_FALSEY(0); + jump.addPatch(instructionSize - 2); + } + + private void addLiteralOpcodes(Literal literal) { + if (literal instanceof StringLiteral s) { + var st = StringTemplate.from(s.value()); + if (st.expressionCount() == 0) { + add_LOAD_CONST(st.resolve(0, null)); + } else if (st.singularExpression() != null) { + // No need to resolve a template if it's just plucking a single value. + compileExpression(st.singularExpression()); + } else { + // String templates need to push their template placeholders in reverse order. + st.forEachExpression(this::compileExpression); + add_RESOLVE_TEMPLATE(st); + } + } else if (literal instanceof TupleLiteral t) { + for (var e : t.members()) { + addLiteralOpcodes(e); + } + add_CREATE_LIST((short) t.members().size()); + } else if (literal instanceof RecordLiteral r) { + for (var e : r.members().entrySet()) { + addLiteralOpcodes(e.getValue()); // value then key to make popping ordered + add_LOAD_CONST(e.getKey().toString()); + } + add_CREATE_MAP((short) r.members().size()); + } else if (literal instanceof BooleanLiteral b) { + add_LOAD_CONST(b.value().getValue()); + } else if (literal instanceof IntegerLiteral i) { + add_LOAD_CONST(i.toNode().expectNumberNode().getValue()); + } else { + throw new UnsupportedOperationException("Unexpected rules engine Literal type: " + literal); + } + } + + private void compileExpression(Expression expression) { + if (performOptimizations) { + var register = cse.get(expression); + if (register != null) { + add_LOAD_REGISTER(register); + return; + } + } + + alwaysCompileExpression(expression); + } + + private void alwaysCompileExpression(Expression expression) { + expression.accept(new ExpressionVisitor() { + @Override + public Void visitLiteral(Literal literal) { + addLiteralOpcodes(literal); + return null; + } + + @Override + public Void visitRef(Reference reference) { + var index = getRegister(reference.getName().toString()); + add_LOAD_REGISTER(index); + return null; + } + + @Override + public Void visitGetAttr(GetAttr getAttr) { + compileExpression(getAttr.getTarget()); + add_GET_ATTR(AttrExpression.from(getAttr)); + return null; + } + + @Override + public Void visitIsSet(Expression fn) { + if (fn instanceof Reference ref) { + add_TEST_REGISTER_ISSET(ref.getName().toString()); + } else { + compileExpression(fn); + add_ISSET(); + } + return null; + } + + @Override + public Void visitNot(Expression not) { + compileExpression(not); + add_NOT(); + return null; + } + + @Override + public Void visitBoolEquals(Expression left, Expression right) { + if (left instanceof BooleanLiteral b) { + pushBooleanOptimization(b, right); + } else if (right instanceof BooleanLiteral b) { + pushBooleanOptimization(b, left); + } else { + compileExpression(left); + compileExpression(right); + add_FN(getFunctionIndex("booleanEquals")); + } + return null; + } + + private void pushBooleanOptimization(BooleanLiteral b, Expression other) { + if (b.value().getValue() && other instanceof Reference ref) { + add_TEST_REGISTER_IS_TRUE(ref.getName().toString()); + } else { + compileExpression(other); + add_IS_TRUE(); + if (!b.value().getValue()) { + add_NOT(); + } + } + } + + @Override + public Void visitStringEquals(Expression left, Expression right) { + compileExpression(left); + compileExpression(right); + add_FN(getFunctionIndex("stringEquals")); + return null; + } + + @Override + public Void visitLibraryFunction(FunctionDefinition fn, List args) { + var index = getFunctionIndex(fn.getId()); + var f = usedFunctions.get(index); + // Detect if the runtime function differs from the defined trait function. + if (f.getOperandCount() != fn.getArguments().size()) { + throw new RulesEvaluationError("Rules engine function `" + fn.getId() + "` accepts " + + fn.getArguments().size() + " arguments in Smithy traits, but " + + f.getOperandCount() + " in the registered VM function."); + } + // Should never happen, but just in case. + if (fn.getArguments().size() != args.size()) { + throw new RulesEvaluationError("Required arguments not given for " + fn); + } + for (var arg : args) { + compileExpression(arg); + } + add_FN(index); + return null; + } + }); + } + + private void compileEndpointRule(EndpointRule rule) { + // Adds to stack: headers map, auth schemes map, URL. + var jump = compileConditions(rule); + var e = rule.getEndpoint(); + + // Add endpoint header instructions. + if (!e.getHeaders().isEmpty()) { + for (var entry : e.getHeaders().entrySet()) { + // Header values. Then header name. + for (var h : entry.getValue()) { + compileExpression(h); + } + // Process the N header values that are on the stack. + add_CREATE_LIST((short) entry.getValue().size()); + // Now the header name. + add_LOAD_CONST(entry.getKey()); + } + // Combine the N headers that are on the stack in the form of String followed by List. + add_CREATE_MAP((short) e.getHeaders().size()); + } + + // Add property instructions. + if (!e.getProperties().isEmpty()) { + for (var entry : e.getProperties().entrySet()) { + compileExpression(entry.getValue()); + add_LOAD_CONST(entry.getKey().toString()); + } + add_CREATE_MAP((short) e.getProperties().size()); + } + + // Compile the URL expression (could be a reference, template, etc). This must be the closest on the stack. + compileExpression(e.getUrl()); + // Add the set endpoint instruction. + add_RETURN_ENDPOINT(!e.getHeaders().isEmpty(), !e.getProperties().isEmpty()); + // Patch in the actual jump target for each condition so it skips over the endpoint rule. + jump.patchTarget(instructions, instructionSize); + } + + private void compileErrorRule(ErrorRule rule) { + var jump = compileConditions(rule); + compileExpression(rule.getError()); // error message + add_RETURN_ERROR(); + // Patch in the actual jump target for each condition so it skips over the error rule. + jump.patchTarget(instructions, instructionSize); + } + + RulesProgram buildProgram() { + // Fill in the register and temporary register sizes. + instructions[1] = (byte) (this.registry.size() - temporaryRegisters); + instructions[2] = (byte) temporaryRegisters; + var fns = new RulesFunction[usedFunctions.size()]; + usedFunctions.toArray(fns); + var constPool = new Object[this.constantPool.size()]; + constantPool.keySet().toArray(constPool); + return new RulesProgram( + extensions, + this.instructions, + 0, + instructionSize, + registry, + fns, + builtinProvider, + constPool); + } + + private static final class JumpIfFalsey { + final List instructionPointers = new ArrayList<>(); + + void addPatch(int position) { + instructionPointers.add(position); + } + + void patchTarget(byte[] instructions, int instructionSize) { + byte low = (byte) (instructionSize & 0xFF); + byte high = (byte) ((instructionSize >> 8) & 0xFF); + for (var position : instructionPointers) { + instructions[position] = low; + instructions[position + 1] = high; + } + } + } + + private void add_LOAD_CONST(Object value) { + var constant = getConstant(value); + if (constant < 256) { + addInstruction(RulesProgram.LOAD_CONST); + addInstruction((byte) constant); + } else { + addInstruction(RulesProgram.LOAD_CONST, constant); + } + } + + private void add_SET_REGISTER(byte register) { + addInstruction(RulesProgram.SET_REGISTER); + addInstruction(register); + } + + private void add_LOAD_REGISTER(byte register) { + addInstruction(RulesProgram.LOAD_REGISTER); + addInstruction(register); + } + + private void add_JUMP_IF_FALSEY(int target) { + addInstruction(RulesProgram.JUMP_IF_FALSEY, target); + } + + private void add_NOT() { + addInstruction(RulesProgram.NOT); + } + + private void add_ISSET() { + addInstruction(RulesProgram.ISSET); + } + + private void add_TEST_REGISTER_ISSET(String register) { + addInstruction(RulesProgram.TEST_REGISTER_ISSET); + addInstruction(getRegister(register)); + } + + private void add_RETURN_ERROR() { + addInstruction(RulesProgram.RETURN_ERROR); + } + + private void add_RETURN_ENDPOINT(boolean hasHeaders, boolean hasProperties) { + addInstruction(RulesProgram.RETURN_ENDPOINT); + byte packed = 0; + if (hasHeaders) { + packed |= 1; + } + if (hasProperties) { + packed |= 2; + } + addInstruction(packed); + } + + private void add_CREATE_LIST(int length) { + addInstruction(RulesProgram.CREATE_LIST); + addInstruction((byte) length); + } + + private void add_CREATE_MAP(int length) { + addInstruction(RulesProgram.CREATE_MAP); + addInstruction((byte) length); + } + + private void add_RESOLVE_TEMPLATE(StringTemplate template) { + addInstruction(RulesProgram.RESOLVE_TEMPLATE, getConstant(template)); + } + + private void add_FN(byte functionIndex) { + addInstruction(RulesProgram.FN); + addInstruction(functionIndex); + } + + private void add_GET_ATTR(AttrExpression expression) { + addInstruction(RulesProgram.GET_ATTR, getConstant(expression)); + } + + private void add_IS_TRUE() { + addInstruction(RulesProgram.IS_TRUE); + } + + private void add_TEST_REGISTER_IS_TRUE(String register) { + addInstruction(RulesProgram.TEST_REGISTER_IS_TRUE); + addInstruction(getRegister(register)); + } + + private void addInstruction(byte value) { + if (instructionSize >= instructions.length) { + // Double the size when needed. + byte[] newInstructions = new byte[instructions.length * 2]; + System.arraycopy(instructions, 0, newInstructions, 0, instructions.length); + instructions = newInstructions; + } + instructions[instructionSize++] = value; + } + + private void addInstruction(byte opcode, int value) { + addInstruction(opcode); + addInstruction((byte) 0); + addInstruction((byte) 0); + EndpointUtils.shortToTwoBytes(value, instructions, instructionSize - 2); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngine.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngine.java new file mode 100644 index 000000000..6c6d55614 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngine.java @@ -0,0 +1,206 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.ServiceLoader; +import java.util.function.BiFunction; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.rulesengine.language.EndpointRuleSet; +import software.amazon.smithy.utils.SmithyUnstableApi; + +/** + * Compiles and loads a rules engine used to resolve endpoints based on Smithy's rules engine traits. + */ +public final class RulesEngine { + + static final List EXTENSIONS = new ArrayList<>(); + static { + for (var ext : ServiceLoader.load(RulesExtension.class)) { + EXTENSIONS.add(ext); + } + } + + private final List extensions = new ArrayList<>(); + private final Map functions = new LinkedHashMap<>(); + private final List> builtinProviders = new ArrayList<>(); + private boolean performOptimizations = true; + + public RulesEngine() { + // Always include the standard builtins, but after any explicitly given builtins. + builtinProviders.add(Stdlib::standardBuiltins); + + // Always include standard library functions. + for (var fn : Stdlib.values()) { + this.functions.put(fn.getFunctionName(), fn); + } + + for (var ext : EXTENSIONS) { + addExtension(ext); + } + } + + /** + * Register a function with the rules engine. + * + * @param fn Function to register. + * @return the RulesEngine. + */ + public RulesEngine addFunction(RulesFunction fn) { + functions.put(fn.getFunctionName(), fn); + return this; + } + + /** + * Register a builtin provider with the rules engine. + * + *

Providers that do not implement support for a builtin by name must return null, to allow for composing + * multiple providers and calling them one after the other. + * + * @param builtinProvider Provider to register. + * @return the RulesEngine. + */ + public RulesEngine addBuiltinProvider(BiFunction builtinProvider) { + if (builtinProvider != null) { + this.builtinProviders.add(builtinProvider); + } + return this; + } + + /** + * Manually add a RulesEngineExtension to the engine that injects functions and builtins. + * + * @param extension Extension to register. + * @return the RulesEngine. + */ + public RulesEngine addExtension(RulesExtension extension) { + extensions.add(extension); + addBuiltinProvider(extension.getBuiltinProvider()); + for (var f : extension.getFunctions()) { + addFunction(f); + } + return this; + } + + /** + * Call this method to disable optional optimizations, like eliminating common subexpressions. + * + *

This might be useful if the client will only make a single call on a simple ruleset. + * + * @return the RulesEngine. + */ + public RulesEngine disableOptimizations() { + performOptimizations = false; + return this; + } + + private BiFunction createBuiltinProvider() { + return (name, ctx) -> { + for (var provider : builtinProviders) { + var result = provider.apply(name, ctx); + if (result != null) { + return result; + } + } + return null; + }; + } + + /** + * Compile rules into a {@link RulesProgram}. + * + * @param rules Rules to compile. + * @return the compiled program. + */ + public RulesProgram compile(EndpointRuleSet rules) { + return new RulesCompiler(extensions, rules, functions, createBuiltinProvider(), performOptimizations).compile(); + } + + /** + * Creates a builder used to create a pre-compiled {@link RulesProgram}. + * + *

Warning: this method does little to no validation of the given program, the constant pool, or registers. + * It is up to you to ensure that these values are all correctly provided or else the rule evaluator will fail + * during evaluation, or provide unpredictable results. + * + * @return the builder. + */ + @SmithyUnstableApi + public PrecompiledBuilder precompiledBuilder() { + return new PrecompiledBuilder(); + } + + @SmithyUnstableApi + public final class PrecompiledBuilder { + private ByteBuffer bytecode; + private Object[] constantPool; + private List parameters = List.of(); + private String[] functionNames; + + public PrecompiledBuilder bytecode(ByteBuffer bytecode) { + this.bytecode = bytecode; + return this; + } + + public PrecompiledBuilder bytecode(byte... bytes) { + return bytecode(ByteBuffer.wrap(bytes)); + } + + public PrecompiledBuilder constantPool(Object... constantPool) { + this.constantPool = constantPool; + return this; + } + + public PrecompiledBuilder parameters(ParamDefinition... paramDefinitions) { + this.parameters = Arrays.asList(paramDefinitions); + return this; + } + + public PrecompiledBuilder functionNames(String... functionNames) { + this.functionNames = functionNames; + return this; + } + + public RulesProgram build() { + Objects.requireNonNull(bytecode, "Missing bytecode for program"); + if (constantPool == null) { + constantPool = new Object[0]; + } + + RulesFunction[] indexedFunctions; + if (functionNames == null) { + indexedFunctions = new RulesFunction[0]; + } else { + // Load the ordered list of functions and fail if any are missing. + indexedFunctions = new RulesFunction[functionNames.length]; + int i = 0; + for (var f : functionNames) { + var func = functions.get(f); + if (func == null) { + throw new UnsupportedOperationException("Rules engine program requires missing function: " + f); + } + indexedFunctions[i++] = func; + } + } + + return new RulesProgram( + extensions, + bytecode.array(), + bytecode.arrayOffset() + bytecode.position(), + bytecode.remaining(), + parameters, + indexedFunctions, + createBuiltinProvider(), + constantPool); + } + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEvaluationError.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEvaluationError.java new file mode 100644 index 000000000..5e57fd1f9 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEvaluationError.java @@ -0,0 +1,19 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +/** + * An error encountered while running the rules engine. + */ +public class RulesEvaluationError extends RuntimeException { + public RulesEvaluationError(String message) { + super(message); + } + + public RulesEvaluationError(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesExtension.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesExtension.java new file mode 100644 index 000000000..22d35c66d --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesExtension.java @@ -0,0 +1,52 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.context.Context; + +/** + * An SPI used to extend the rules engine with custom builtins and functions. + */ +public interface RulesExtension { + /** + * Provides custom builtin values that are used to initialize parameters. + * + * @return the builtin provider or null if there is no custom provider in this extension. + */ + default BiFunction getBuiltinProvider() { + return null; + } + + /** + * Gets a list of the custom functions to register with the VM. + * + * @return the list of functions to register. + */ + default List getFunctions() { + return List.of(); + } + + /** + * Allows processing a resolved endpoint, extracting properties, and updating the endpoint builder. + * + * @param builder The endpoint being created. Modify this based on properties and headers. + * @param context The context provided when resolving the endpoint. The endpoint has its own context properties. + * @param properties The raw properties returned from the endpoint resolver. Process these to update the builder. + * @param headers The headers returned from the endpoint resolver. Process these if needed. + */ + default void extractEndpointProperties( + Endpoint.Builder builder, + Context context, + Map properties, + Map> headers + ) { + // by default does nothing. + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesFunction.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesFunction.java new file mode 100644 index 000000000..b3bc2b0a0 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesFunction.java @@ -0,0 +1,69 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +/** + * Implements a function that can be used in the rules engine. + */ +public interface RulesFunction { + /** + * Get the number of operands the function requires. + * + *

The function will be called with this many values. + * + * @return the number of operands. + */ + int getOperandCount(); + + /** + * Get the name of the function. + * + * @return the function name. + */ + String getFunctionName(); + + /** + * Apply the function to the given N operands and returns the result or null. + * + *

This is called when an operation has more than two operands. + * + * @param operands Operands to process. + * @return the result of the function or null. + */ + default Object apply(Object... operands) { + throw new IllegalArgumentException("Invalid number of arguments: " + operands.length); + } + + /** + * Calls a function that has zero operands. + * + * @return the result of the function or null. + */ + default Object apply0() { + throw new IllegalArgumentException("Invalid number of arguments: 0"); + } + + /** + * Calls a function that has one operand. + * + * @param arg1 Operand to process. + * @return the result of the function or null. + */ + default Object apply1(Object arg1) { + throw new IllegalArgumentException("Invalid number of arguments: 1"); + } + + /** + * Calls a function that has two operands. + * + * @param arg1 Operand to process. + * @param arg2 Operand to process. + * @return the result of the function or null. + */ + default Object apply2(Object arg1, Object arg2) { + throw new IllegalArgumentException("Invalid number of arguments: 2"); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java new file mode 100644 index 000000000..fc414a848 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java @@ -0,0 +1,408 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.utils.SmithyUnstableApi; + +/** + * A compiled and ready to run rules engine program. + * + *

A RulesProgram can be run any number of times and is thread-safe. A program can be serialized and later restored + * using {@code ToString}. A RulesProgram is created using a {@link RulesEngine}. + */ +public final class RulesProgram { + /** + * The version that a rules engine program was compiled with. The version of a program must be less than or equal + * to this version number. That is, older code can be run, but newer code cannot. The version is only incremented + * when things like new opcodes are added. This is a single byte that appears as the first byte in the rules + * engine bytecode. The version is a negative number to prevent accidentally treating another opcode as the version. + */ + public static final byte VERSION = -1; + + /** + * Push a value onto the stack. Must be followed by one unsigned byte representing the constant pool index. + */ + static final byte LOAD_CONST = 0; + + /** + * Push a value onto the stack. Must be followed by two bytes representing the (short) constant pool index. + */ + static final byte LOAD_CONST_W = 1; + + /** + * Peeks the value at the top of the stack and pushes it onto the register stack of a register. Must be followed + * by the one byte register index. + */ + static final byte SET_REGISTER = 2; + + /** + * Get the value of a register and push it onto the stack. Must be followed by the one byte register index. + */ + static final byte LOAD_REGISTER = 3; + + /** + * Jumps to an opcode index if the top of the stack is null or false. Must be followed by two bytes representing + * a short index position of the bytecode address. + */ + static final byte JUMP_IF_FALSEY = 4; + + /** + * Pops a value off the stack and pushes true if it is falsey (null or false), or false if not. + * + *

This implements the "not" function as an opcode. + */ + static final byte NOT = 5; + + /** + * Pops a value off the stack and pushes true if it is set (that is, not null). + * + *

This implements the "isset" function as an opcode. + */ + static final byte ISSET = 6; + + /** + * Checks if a register is set to something that is boolean true or a non null value. + * + *

Must be followed by an unsigned byte that represents the register to check. + */ + static final byte TEST_REGISTER_ISSET = 7; + + /** + * Sets an error on the VM and exits. + * + *

Pops a single value that provides the error string to set. + */ + static final byte RETURN_ERROR = 8; + + /** + * Sets the endpoint result of the VM and exits. Pops the top of the stack, expecting a string value. The opcode + * must be followed by a byte where the first bit of the byte is on if the endpoint has headers, and the second + * bit is on if the endpoint has properties. + */ + static final byte RETURN_ENDPOINT = 9; + + /** + * Pops N values off the stack and pushes a list of those values onto the stack. Must be followed by an unsigned + * byte that defines the number of elements in the list. + */ + static final byte CREATE_LIST = 10; + + /** + * Pops N*2 values off the stack (key then value), creates a map of those values, and pushes the map onto the + * stack. Each popped key must be a string. Must be followed by an unsigned byte that defines the + * number of entries in the map. + */ + static final byte CREATE_MAP = 11; + + /** + * Resolves a template string. Must be followed by two bytes, a short, that represents the constant pool index + * that stores the StringTemplate. + * + *

The corresponding instruction has a StringTemplate that tells the VM how many values to pop off the stack. + * The popped values fill in values into the template. The resolved template value as a string is then pushed onto + * the stack. + */ + static final byte RESOLVE_TEMPLATE = 12; + + /** + * Calls a function. Must be followed by a byte to provide the function index to call. + * + *

The function pops zero or more values off the stack based on the RulesFunction registered for the index, + * and then pushes the Object result onto the stack. + */ + static final byte FN = 13; + + /** + * Pops the top level value and applies a getAttr expression on it, pushing the result onto the stack. + * + *

Must be followed by two bytes, a short, that represents the constant pool index that stores the + * AttrExpression. + */ + static final byte GET_ATTR = 14; + + /** + * Pops a value and pushes true if the value is boolean true, false if not. + */ + static final byte IS_TRUE = 15; + + /** + * Checks if a register is boolean true and pushes the result onto the stack. + * + *

Must be followed by a byte that represents the register to check. + */ + static final byte TEST_REGISTER_IS_TRUE = 16; + + /** + * Pops the value at the top of the stack and returns it from the VM. This can be used for testing purposes or + * for returning things other than endpoint values. + */ + static final byte RETURN_VALUE = 17; + + final List extensions; + final Object[] constantPool; + final byte[] instructions; + final int instructionOffset; + final int instructionSize; + final ParamDefinition[] registerDefinitions; + final RulesFunction[] functions; + private final BiFunction builtinProvider; + private final int paramCount; // number of provided params. + + RulesProgram( + List extensions, + byte[] instructions, + int instructionOffset, + int instructionSize, + List params, + RulesFunction[] functions, + BiFunction builtinProvider, + Object[] constantPool + ) { + this.extensions = extensions; + this.instructions = instructions; + this.instructionOffset = instructionOffset; + this.instructionSize = instructionSize; + this.functions = functions; + this.builtinProvider = builtinProvider; + this.constantPool = constantPool; + + if (instructionSize < 3) { + throw new IllegalArgumentException("Invalid rules engine bytecode: too short"); + } + + var versionByte = instructions[instructionOffset]; + if (versionByte >= 0) { + throw new IllegalArgumentException("Invalid rules engine bytecode: missing version byte."); + } + + if (versionByte < VERSION) { + throw new IllegalArgumentException(String.format( + "Invalid rules engine bytecode: unsupported bytecode version %d. Up to version %d is supported." + + "Perhaps you need to update the client-rulesengine package.", + -versionByte, + -VERSION)); + } + + paramCount = instructions[instructionOffset + 1] & 0xFF; + var syntheticParamCount = instructions[instructionOffset + 2] & 0xFF; + var totalParams = paramCount + syntheticParamCount; + registerDefinitions = new ParamDefinition[totalParams]; + + if (params.size() == paramCount) { + // Given just params and not registers too. + params.toArray(registerDefinitions); + for (var i = 0; i < syntheticParamCount; i++) { + registerDefinitions[paramCount + i] = new ParamDefinition("r" + i); + } + } else if (params.size() == totalParams) { + // Given exactly the required number of parameters. Assume it was given the params and registers. + params.toArray(registerDefinitions); + } else { + throw new IllegalArgumentException("Invalid rules engine bytecode: bytecode requires " + paramCount + + " parameters, but provided " + params.size()); + } + } + + /** + * Runs the rules engine program and resolves an endpoint. + * + * @param context Context used during evaluation. + * @param parameters Rules engine parameters. + * @return the resolved Endpoint. + * @throws RulesEvaluationError if the program fails during evaluation. + */ + public Endpoint resolveEndpoint(Context context, Map parameters) { + return run(context, parameters); + } + + /** + * Runs the rules engine program. + * + * @param context Context used during evaluation. + * @param parameters Rules engine parameters. + * @return the rules engine result. + * @throws RulesEvaluationError if the program fails during evaluation. + */ + public T run(Context context, Map parameters) { + for (var e : parameters.entrySet()) { + EndpointUtils.verifyObject(e.getValue()); + } + var vm = new RulesVm(context, this, parameters, builtinProvider); + return vm.evaluate(); + } + + /** + * Get the program's content pool. + * + * @return the constant pool. Do not modify. + */ + @SmithyUnstableApi + public Object[] getConstantPool() { + return constantPool; + } + + /** + * Get the program's parameters. + * + * @return the parameters. + */ + @SmithyUnstableApi + public List getParamDefinitions() { + List result = new ArrayList<>(); + for (var i = 0; i < paramCount; i++) { + result.add(registerDefinitions[i]); + } + return result; + } + + @Override + public String toString() { + StringBuilder s = new StringBuilder(); + + // Write the registry values in index order. + if (registerDefinitions.length > 0) { + s.append("Registers:\n"); + int i = 0; + for (var r : registerDefinitions) { + s.append(" ").append(i++).append(": "); + s.append(r); + s.append("\n"); + } + s.append("\n"); + } + + if (constantPool.length > 0) { + s.append("Constants:\n"); + var i = 0; + for (var c : constantPool) { + s.append(" ").append(i++).append(": "); + if (c instanceof StringTemplate) { + s.append("Template"); + } else if (c instanceof AttrExpression) { + s.append("AttrExpression"); + } else { + s.append(c.getClass().getSimpleName()); + } + s.append(": ").append(c).append("\n"); + } + s.append("\n"); + } + + // Write the required function names, in index order. + if (functions.length > 0) { + var i = 0; + s.append("Functions:\n"); + for (var f : functions) { + s.append(" ").append(i++).append(": ").append(f.getFunctionName()).append("\n"); + } + s.append("\n"); + } + + // Write the instructions. + s.append("Instructions: (version=").append(-instructions[instructionOffset]).append(")\n"); + // Skip version, param count, synthetic param count bytes. + for (var i = instructionOffset + 3; i < instructionSize; i++) { + s.append(" "); + s.append(String.format("%03d", i)); + s.append(": "); + + var skip = 0; + var name = switch (instructions[i]) { + case LOAD_CONST -> { + skip = 1; + yield "LOAD_CONST"; + } + case LOAD_CONST_W -> { + skip = 2; + yield "LOAD_CONST_W"; + } + case SET_REGISTER -> { + skip = 1; + yield "SET_REGISTER"; + } + case LOAD_REGISTER -> { + skip = 1; + yield "LOAD_REGISTER"; + } + case JUMP_IF_FALSEY -> { + skip = 2; + yield "JUMP_IF_FALSEY"; + } + case NOT -> "NOT"; + case ISSET -> "ISSET"; + case TEST_REGISTER_ISSET -> { + skip = 1; + yield "TEST_REGISTER_SET"; + } + case RETURN_ERROR -> "RETURN_ERROR"; + case RETURN_ENDPOINT -> { + skip = 1; + yield "RETURN_ENDPOINT"; + } + case CREATE_LIST -> { + skip = 1; + yield "CREATE_LIST"; + } + case CREATE_MAP -> { + skip = 1; + yield "CREATE_MAP"; + } + case RESOLVE_TEMPLATE -> { + skip = 2; + yield "RESOLVE_TEMPLATE"; + } + case FN -> { + skip = 1; + yield "FN"; + } + case GET_ATTR -> { + skip = 2; + yield "GET_ATTR"; + } + case IS_TRUE -> "IS_TRUE"; + case TEST_REGISTER_IS_TRUE -> { + skip = 1; + yield "TEST_REGISTER_IS_TRUE"; + } + case RETURN_VALUE -> "RETURN_VALUE"; + default -> "?" + instructions[i]; + }; + + switch (skip) { + case 0 -> s.append(name); + case 1 -> { + s.append(String.format("%-22s ", name)); + if (instructions.length > i + 1) { + s.append(instructions[i + 1]); + } else { + s.append("?"); + } + i++; + } + default -> { + // it's a two-byte unsigned short. + s.append(String.format("%-22s ", name)); + if (instructions.length > i + 2) { + s.append(EndpointUtils.bytesToShort(instructions, i + 1)); + } else { + s.append("??"); + } + i += 2; + } + } + + s.append("\n"); + } + + return s.toString(); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java new file mode 100644 index 000000000..103f65402 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java @@ -0,0 +1,318 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointContext; +import software.amazon.smithy.java.context.Context; + +final class RulesVm { + + // Make number of URIs to cache in the thread-local cache. + private static final int MAX_CACHE_SIZE = 32; + + // Caches up to 32 previously parsed URIs in a thread-local LRU cache. + private static final ThreadLocal> URI_LRU_CACHE = ThreadLocal.withInitial(() -> { + return new LinkedHashMap<>(16, 0.75f, true) { + @Override + protected boolean removeEldestEntry(Map.Entry eldest) { + return size() > MAX_CACHE_SIZE; + } + }; + }); + + // Minimum size for temp arrays when it's lazily allocated. + private static final int MIN_TEMP_ARRAY_SIZE = 8; + + // Temp array used during evaluation. + private Object[] tempArray = new Object[8]; + private int tempArraySize = 8; + + private final Context context; + private final RulesProgram program; + private final Object[] registers; + private final BiFunction builtinProvider; + private final byte[] instructions; + private Object[] stack = new Object[8]; + private int stackPosition = 0; + private int pc; + + RulesVm( + Context context, + RulesProgram program, + Map parameters, + BiFunction builtinProvider + ) { + this.context = context; + this.program = program; + this.instructions = program.instructions; + this.builtinProvider = builtinProvider; + + // Copy the registers to not continuously push to their stack. + registers = new Object[program.registerDefinitions.length]; + for (var i = 0; i < program.registerDefinitions.length; i++) { + var definition = program.registerDefinitions[i]; + var provided = parameters.get(definition.name()); + if (provided != null) { + registers[i] = provided; + } else { + initializeRegister(context, i, definition); + } + } + } + + @SuppressWarnings("unchecked") + T evaluate() { + try { + return (T) run(); + } catch (ClassCastException e) { + throw createError("Unexpected value type encountered while evaluating rules engine", e); + } catch (ArrayIndexOutOfBoundsException e) { + throw createError("Malformed bytecode encountered while evaluating rules engine", e); + } + } + + private RulesEvaluationError createError(String message, RuntimeException e) { + var report = message + ". Encountered at address " + pc + " of program:\n" + program; + throw new RulesEvaluationError(report, e); + } + + void initializeRegister(Context context, int index, ParamDefinition definition) { + if (definition.defaultValue() != null) { + registers[index] = definition.defaultValue(); + return; + } + + if (definition.builtin() != null) { + var builtinValue = builtinProvider.apply(definition.builtin(), context); + if (builtinValue != null) { + registers[index] = builtinValue; + return; + } + } + + if (definition.required()) { + throw new RulesEvaluationError("Required rules engine parameter missing: " + definition.name()); + } + } + + private void push(Object value) { + if (stackPosition == stack.length) { + resizeStack(); + } + stack[stackPosition++] = value; + } + + private void resizeStack() { + int newCapacity = stack.length + (stack.length >> 1); + Object[] newStack = new Object[newCapacity]; + System.arraycopy(stack, 0, newStack, 0, stack.length); + stack = newStack; + } + + private Object pop() { + return stack[--stackPosition]; // no need to clear out the memory since it's tied to lifetime of the VM. + } + + private Object peek() { + return stack[stackPosition - 1]; + } + + // Reads the next two bytes in little-endian order. + private int readUnsignedShort(int position) { + return EndpointUtils.bytesToShort(instructions, position); + } + + private Object run() { + var instructionSize = program.instructionSize; + var constantPool = program.constantPool; + var instructions = this.instructions; + var registers = this.registers; + + // Skip version, params, and register bytes. + for (pc = program.instructionOffset + 3; pc < instructionSize; pc++) { + switch (instructions[pc]) { + case RulesProgram.LOAD_CONST -> push(constantPool[instructions[++pc] & 0xFF]); // read unsigned byte + case RulesProgram.LOAD_CONST_W -> { + push(constantPool[readUnsignedShort(pc + 1)]); // read unsigned short + pc += 2; + } + case RulesProgram.SET_REGISTER -> registers[instructions[++pc] & 0xFF] = peek(); // read unsigned byte + case RulesProgram.LOAD_REGISTER -> push(registers[instructions[++pc] & 0xFF]); // read unsigned byte + case RulesProgram.JUMP_IF_FALSEY -> { + Object value = pop(); + if (value == null || Boolean.FALSE.equals(value)) { + pc = readUnsignedShort(pc + 1) - 1; // -1 because loop will increment + } else { + pc += 2; + } + } + case RulesProgram.NOT -> push(pop() != Boolean.TRUE); + case RulesProgram.ISSET -> { + Object value = pop(); + // Push true if it's set and not a boolean, or boolean true. + push(value != null && !Boolean.FALSE.equals(value)); + } + case RulesProgram.TEST_REGISTER_ISSET -> { + var value = registers[instructions[++pc] & 0xFF]; // read unsigned byte + push(value != null && !Boolean.FALSE.equals(value)); + } + case RulesProgram.RETURN_ERROR -> { + throw new RulesEvaluationError((String) pop()); + } + case RulesProgram.RETURN_ENDPOINT -> { + return setEndpoint(instructions[++pc]); + } + case RulesProgram.CREATE_LIST -> createList(instructions[++pc] & 0xFF); // read unsigned byte + case RulesProgram.CREATE_MAP -> createMap(instructions[++pc] & 0xFF); // read unsigned byte + case RulesProgram.RESOLVE_TEMPLATE -> { + resolveTemplate((StringTemplate) constantPool[readUnsignedShort(pc + 1)]); + pc += 2; + } + case RulesProgram.FN -> { + var fn = program.functions[instructions[++pc] & 0xFF]; // read unsigned byte + push(switch (fn.getOperandCount()) { + case 0 -> fn.apply0(); + case 1 -> fn.apply1(pop()); + case 2 -> { + Object b = pop(); + Object a = pop(); + yield fn.apply2(a, b); + } + default -> { + // Pop arguments from stack in reverse order. + var temp = getTempArray(fn.getOperandCount()); + for (int i = fn.getOperandCount() - 1; i >= 0; i--) { + temp[i] = pop(); + } + yield fn.apply(temp); + } + }); + } + case RulesProgram.GET_ATTR -> { + var constant = readUnsignedShort(pc + 1); + AttrExpression getAttr = (AttrExpression) constantPool[constant]; + var target = pop(); + push(getAttr.apply(target)); + pc += 2; + } + case RulesProgram.IS_TRUE -> push(pop() == Boolean.TRUE); + case RulesProgram.TEST_REGISTER_IS_TRUE -> { + int register = instructions[++pc] & 0xFF; // read unsigned byte + push(registers[register] == Boolean.TRUE); + } + case RulesProgram.RETURN_VALUE -> { + return pop(); + } + default -> { + throw new RulesEvaluationError("Unknown rules engine instruction: " + instructions[pc]); + } + } + } + + throw new RulesEvaluationError("No value returned from rules engine"); + } + + private void createMap(int size) { + push(switch (size) { + case 0 -> Map.of(); + case 1 -> Map.of((String) pop(), pop()); + case 2 -> Map.of((String) pop(), pop(), (String) pop(), pop()); + case 3 -> Map.of((String) pop(), pop(), (String) pop(), pop(), (String) pop(), pop()); + default -> { + Map map = new HashMap<>((int) (size / 0.75f) + 1); // Avoid rehashing + for (var i = 0; i < size; i++) { + map.put((String) pop(), pop()); + } + yield map; + } + }); + } + + private void createList(int size) { + push(switch (size) { + case 0 -> List.of(); + case 1 -> Collections.singletonList(pop()); + default -> { + var values = new Object[size]; + for (var i = size - 1; i >= 0; i--) { + values[i] = pop(); + } + yield Arrays.asList(values); + } + }); + } + + private void resolveTemplate(StringTemplate template) { + var expressionCount = template.expressionCount(); + var temp = getTempArray(expressionCount); + for (var i = 0; i < expressionCount; i++) { + temp[i] = pop(); + } + push(template.resolve(expressionCount, temp)); + } + + @SuppressWarnings("unchecked") + private Endpoint setEndpoint(byte packed) { + boolean hasHeaders = (packed & 1) != 0; + boolean hasProperties = (packed & 2) != 0; + var urlString = (String) pop(); + var properties = (Map) (hasProperties ? pop() : Map.of()); + var headers = (Map>) (hasHeaders ? pop() : Map.of()); + var builder = Endpoint.builder().uri(createUri(urlString)); + + if (!headers.isEmpty()) { + builder.putProperty(EndpointContext.HEADERS, headers); + } + + for (var extension : program.extensions) { + extension.extractEndpointProperties(builder, context, properties, headers); + } + + return builder.build(); + } + + public static URI createUri(String uriStr) { + var cache = URI_LRU_CACHE.get(); + var uri = cache.get(uriStr); + if (uri == null) { + try { + uri = new URI(uriStr); + } catch (URISyntaxException e) { + throw new RulesEvaluationError("Error creating URI: " + e.getMessage(), e); + } + cache.put(uriStr, uri); + } + return uri; + } + + private Object[] getTempArray(int requiredSize) { + if (tempArraySize < requiredSize) { + resizeTempArray(requiredSize); + } + return tempArray; + } + + private void resizeTempArray(int requiredSize) { + // Resize to a power of two. + int newSize = MIN_TEMP_ARRAY_SIZE; + while (newSize < requiredSize) { + newSize <<= 1; + } + + tempArray = new Object[newSize]; + tempArraySize = newSize; + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java new file mode 100644 index 000000000..83d727cf1 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java @@ -0,0 +1,116 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Objects; +import software.amazon.smithy.java.client.core.ClientContext; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.io.uri.URLEncoding; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsValidHostLabel; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring; + +/** + * Implements stdlib functions of the rules engine that weren't promoted to opcodes (GetAttr, isset, not). + */ +enum Stdlib implements RulesFunction { + // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#stringequals-function + STRING_EQUALS("stringEquals", 2) { + @Override + public Object apply2(Object a, Object b) { + return Objects.equals(EndpointUtils.castFnArgument(a, String.class, "stringEquals", 1), + EndpointUtils.castFnArgument(b, String.class, "stringEquals", 2)); + } + }, + + // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#booleanequals-function + BOOLEAN_EQUALS("booleanEquals", 2) { + @Override + public Object apply2(Object a, Object b) { + return Objects.equals(EndpointUtils.castFnArgument(a, Boolean.class, "booleanEquals", 1), + EndpointUtils.castFnArgument(b, Boolean.class, "booleanEquals", 2)); + } + }, + + // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#substring-function + SUBSTRING("substring", 4) { + @Override + public Object apply(Object... operands) { + // software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring.Definition.evaluate + String str = EndpointUtils.castFnArgument(operands[0], String.class, "substring", 1); + int startIndex = EndpointUtils.castFnArgument(operands[1], Integer.class, "substring", 2); + int stopIndex = EndpointUtils.castFnArgument(operands[2], Integer.class, "substring", 3); + boolean reverse = EndpointUtils.castFnArgument(operands[3], Boolean.class, "substring", 4); + return Substring.getSubstring(str, startIndex, stopIndex, reverse); + } + }, + + // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#isvalidhostlabel-function + IS_VALID_HOST_LABEL("isValidHostLabel", 2) { + @Override + public Object apply2(Object arg1, Object arg2) { + var hostLabel = EndpointUtils.castFnArgument(arg1, String.class, "isValidHostLabel", 1); + var allowDots = EndpointUtils.castFnArgument(arg2, Boolean.class, "isValidHostLabel", 2); + return IsValidHostLabel.isValidHostLabel(hostLabel, Boolean.TRUE.equals(allowDots)); + } + }, + + // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#parseurl-function + PARSE_URL("parseURL", 1) { + @Override + public Object apply1(Object arg) { + try { + var result = new URI(EndpointUtils.castFnArgument(arg, String.class, "parseURL", 1)); + if (null != result.getRawQuery()) { + // "If the URL given contains a query portion, the URL MUST be rejected and the function MUST + // return an empty optional." + return null; + } + return result; + } catch (URISyntaxException e) { + throw new RulesEvaluationError("Error parsing URI in endpoint rule parseURL method", e); + } + } + }, + + // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#uriencode-function + URI_ENCODE("uriEncode", 1) { + @Override + public Object apply1(Object arg) { + var str = EndpointUtils.castFnArgument(arg, String.class, "uriEncode", 1); + return URLEncoding.encodeUnreserved(str, false); + } + }; + + private final String name; + private final int operands; + + Stdlib(String name, int operands) { + this.name = name; + this.operands = operands; + } + + @Override + public int getOperandCount() { + return operands; + } + + @Override + public String getFunctionName() { + return name; + } + + static Object standardBuiltins(String name, Context context) { + if (name.equals("SDK::Endpoint")) { + var result = context.get(ClientContext.CUSTOM_ENDPOINT); + if (result != null) { + return result.uri().toString(); + } + } + return null; + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StringTemplate.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StringTemplate.java new file mode 100644 index 000000000..f5844d314 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StringTemplate.java @@ -0,0 +1,119 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.Arrays; +import java.util.Objects; +import java.util.function.Consumer; +import software.amazon.smithy.rulesengine.language.evaluation.value.Value; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; + +/** + * Similar to {@link Template}, but built around Object instead of {@link Value}. + */ +final class StringTemplate { + + private static final ThreadLocal STRING_BUILDER = ThreadLocal.withInitial( + () -> new StringBuilder(64)); + + private final String template; + private final Object[] parts; + private final int expressionCount; + private final Expression singularExpression; + + StringTemplate(String template, Object[] parts, int expressionCount, Expression singularExpression) { + this.template = template; + this.parts = parts; + this.expressionCount = expressionCount; + this.singularExpression = singularExpression; + } + + int expressionCount() { + return expressionCount; + } + + Expression singularExpression() { + return singularExpression; + } + + /** + * Calls a consumer for every expression in the template. + * + * @param consumer consumer that accepts each expression. + */ + void forEachExpression(Consumer consumer) { + for (int i = parts.length - 1; i >= 0; i--) { + var part = parts[i]; + if (part instanceof Expression e) { + consumer.accept(e); + } + } + } + + String resolve(int arraySize, Object[] strings) { + if (arraySize != expressionCount) { + throw new RulesEvaluationError("Missing template parameters for a string template `" + + template + "`. Given: [" + Arrays.asList(strings) + ']'); + } + + var result = STRING_BUILDER.get(); + result.setLength(0); + int paramIndex = 0; + for (var part : parts) { + if (part == null) { + throw new RulesEvaluationError("Missing part of template " + template + " at part " + paramIndex); + } else if (part.getClass() == String.class) { + result.append((String) part); // we know parts are either strings or Expressions. + } else { + result.append(strings[paramIndex++]); + } + } + + return result.toString(); + } + + static StringTemplate from(Template template) { + var templateParts = template.getParts(); + Object[] parts = new Object[templateParts.size()]; + int expressionCount = 0; + for (var i = 0; i < templateParts.size(); i++) { + var part = templateParts.get(i); + if (part instanceof Template.Dynamic d) { + expressionCount++; + parts[i] = d.toExpression(); + } else { + parts[i] = part.toString(); + } + } + var singularExpression = (expressionCount == 1 && parts.length == 1) ? (Expression) parts[0] : null; + return new StringTemplate(template.toString(), parts, expressionCount, singularExpression); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } else if (o == null || getClass() != o.getClass()) { + return false; + } else { + StringTemplate that = (StringTemplate) o; + return expressionCount == that.expressionCount + && Objects.equals(template, that.template) + && Objects.deepEquals(parts, that.parts); + } + } + + @Override + public int hashCode() { + return Objects.hash(template, Arrays.hashCode(parts)); + } + + @Override + public String toString() { + return "StringTemplate[template=\"" + template + "\"]"; + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/AttrExpressionTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/AttrExpressionTest.java new file mode 100644 index 000000000..52a058578 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/AttrExpressionTest.java @@ -0,0 +1,48 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; + +import java.net.URI; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +public class AttrExpressionTest { + @ParameterizedTest + @MethodSource("getAttrProvider") + public void getsAttr(String template, Object value, Object expected) { + var getAttr = AttrExpression.parse(template); + var result = getAttr.apply(value); + + assertThat(template, result, equalTo(expected)); + assertThat(template, equalTo(getAttr.toString())); + } + + public static List getAttrProvider() throws Exception { + Map mapWithNull = new HashMap<>(); + mapWithNull.put("foo", null); + + return List.of( + Arguments.of("foo", Map.of("foo", "bar"), "bar"), + Arguments.of("foo.bar", Map.of("foo", Map.of("bar", "baz")), "baz"), + Arguments.of("foo.bar.baz", Map.of("foo", Map.of("bar", Map.of("baz", "qux"))), "qux"), + Arguments.of("foo.bar[0]", Map.of("foo", Map.of("bar", List.of("baz"))), "baz"), + Arguments.of("foo[0]", Map.of("foo", List.of("bar")), "bar"), + Arguments.of("foo", Map.of("foo", "bar"), "bar"), + Arguments.of("isIp", new URI("https://localhost:8080"), false), + Arguments.of("scheme", new URI("https://localhost:8080"), "https"), + Arguments.of("foo[2]", Map.of("foo", List.of("bar")), null), + Arguments.of("foo", null, null), + Arguments.of("foo[0]", mapWithNull, null), + Arguments.of("foo[0]", Map.of("foo", Map.of("bar", "baz")), null)); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java new file mode 100644 index 000000000..1b76ae9ff --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java @@ -0,0 +1,97 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.not; + +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.client.core.ClientConfig; +import software.amazon.smithy.java.client.core.ClientContext; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; +import software.amazon.smithy.java.core.schema.ApiService; +import software.amazon.smithy.java.core.schema.Schema; +import software.amazon.smithy.model.Model; +import software.amazon.smithy.model.node.Node; +import software.amazon.smithy.model.shapes.ServiceShape; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.model.traits.Trait; +import software.amazon.smithy.rulesengine.language.EndpointRuleSet; +import software.amazon.smithy.utils.IoUtils; + +public class EndpointRulesPluginTest { + @Test + public void addsEndpointResolver() { + var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); + var program = new RulesEngine().compile(EndpointRuleSet.fromNode(Node.parse(contents))); + var plugin = EndpointRulesPlugin.from(program); + var builder = ClientConfig.builder(); + plugin.configureClient(builder); + + assertThat(builder.endpointResolver(), instanceOf(EndpointRulesResolver.class)); + } + + @Test + public void doesNotModifyExistingResolver() { + var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); + var program = new RulesEngine().compile(EndpointRuleSet.fromNode(Node.parse(contents))); + var plugin = EndpointRulesPlugin.from(program); + var builder = ClientConfig.builder().endpointResolver(EndpointResolver.staticHost("foo.com")); + plugin.configureClient(builder); + + assertThat(builder.endpointResolver(), not(instanceOf(EndpointRulesResolver.class))); + } + + @Test + public void modifiesResolverIfCustomEndpointSet() { + var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); + var program = new RulesEngine().compile(EndpointRuleSet.fromNode(Node.parse(contents))); + var plugin = EndpointRulesPlugin.from(program); + var builder = ClientConfig.builder() + .endpointResolver(EndpointResolver.staticHost("foo.com")) + .putConfig(ClientContext.CUSTOM_ENDPOINT, Endpoint.builder().uri("https://example.com").build()); + plugin.configureClient(builder); + + assertThat(builder.endpointResolver(), instanceOf(EndpointRulesResolver.class)); + } + + @Test + public void onlyModifiesResolverIfProgramFound() { + var plugin = EndpointRulesPlugin.from((RulesProgram) null); + var builder = ClientConfig.builder(); + plugin.configureClient(builder); + + assertThat(builder.endpointResolver(), not(instanceOf(EndpointRulesResolver.class))); + } + + @Test + public void loadsRulesFromServiceSchemaTraits() { + var model = Model.assembler() + .addImport(getClass().getResource("minimal-ruleset.smithy")) + .discoverModels() + .assemble() + .unwrap(); + + // Create a service schema. + var service = model.expectShape(ShapeId.from("example#FizzBuzz"), ServiceShape.class); + var traits = new Trait[service.getAllTraits().size()]; + int i = 0; + for (var t : service.getAllTraits().values()) { + traits[i++] = t; + } + var schema = Schema.createService(service.getId(), traits); + ApiService api = () -> schema; + + // Create the plugin from the service schema. + var plugin = EndpointRulesPlugin.create(); + var builder = ClientConfig.builder().service(api); + builder.applyPlugin(plugin); + + assertThat(builder.endpointResolver(), instanceOf(EndpointRulesResolver.class)); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java new file mode 100644 index 000000000..e496b6250 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java @@ -0,0 +1,184 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.instanceOf; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletionException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.core.schema.ApiOperation; +import software.amazon.smithy.java.core.schema.ApiService; +import software.amazon.smithy.java.core.schema.Schema; +import software.amazon.smithy.java.core.schema.SerializableStruct; +import software.amazon.smithy.java.core.schema.ShapeBuilder; +import software.amazon.smithy.java.core.serde.ShapeSerializer; +import software.amazon.smithy.java.core.serde.TypeRegistry; +import software.amazon.smithy.model.node.Node; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.model.traits.Trait; +import software.amazon.smithy.rulesengine.traits.StaticContextParamDefinition; +import software.amazon.smithy.rulesengine.traits.StaticContextParamsTrait; + +public class EndpointRulesResolverTest { + @Test + public void resolvesEndpointWithoutStaticParams() { + EndpointResolverParams params = EndpointResolverParams.builder() + .inputValue(getInput()) + .operation(getOperation(Map.of())) + .build(); + + var program = new RulesEngine().precompiledBuilder() + .bytecode( + RulesProgram.VERSION, + (byte) 0, + (byte) 0, + RulesProgram.LOAD_CONST, + (byte) 0, + RulesProgram.RETURN_ENDPOINT, + (byte) 0) + .constantPool("https://example.com") + .build(); + var resolver = new EndpointRulesResolver(program); + var result = resolver.resolveEndpoint(params).join(); + + assertThat(result.uri().toString(), equalTo("https://example.com")); + } + + private SerializableStruct getInput() { + return new SerializableStruct() { + @Override + public Schema schema() { + return null; + } + + @Override + public void serializeMembers(ShapeSerializer serializer) {} + + @Override + public T getMemberValue(Schema member) { + return null; + } + }; + } + + private ApiOperation getOperation( + Map staticParams + ) { + return new ApiOperation<>() { + @Override + public ShapeBuilder inputBuilder() { + return null; + } + + @Override + public ShapeBuilder outputBuilder() { + return null; + } + + @Override + public Schema schema() { + Trait[] traits = null; + if (staticParams != null) { + traits = new Trait[] { + StaticContextParamsTrait + .builder() + .parameters(staticParams) + .build() + }; + } else { + traits = new Trait[0]; + } + return Schema.createOperation(ShapeId.from("smithy.example#Foo"), traits); + } + + @Override + public Schema inputSchema() { + return null; + } + + @Override + public Schema outputSchema() { + return null; + } + + @Override + public TypeRegistry errorRegistry() { + return null; + } + + @Override + public List effectiveAuthSchemes() { + return List.of(); + } + + @Override + public ApiService service() { + return null; + } + }; + } + + @Test + public void resolvesEndpointWithStaticParams() { + var op = getOperation(Map.of("foo", + StaticContextParamDefinition.builder() + .value(Node.from("https://foo.com")) + .build())); + EndpointResolverParams params = EndpointResolverParams.builder() + .inputValue(getInput()) + .operation(op) + .build(); + + var program = new RulesEngine().precompiledBuilder() + .bytecode( + RulesProgram.VERSION, + (byte) 1, + (byte) 0, + RulesProgram.LOAD_REGISTER, // load foo + (byte) 0, + RulesProgram.RETURN_ENDPOINT, + (byte) 0) + .constantPool("https://example.com") + .parameters(new ParamDefinition("foo", false, null, null)) + .build(); + var resolver = new EndpointRulesResolver(program); + var result = resolver.resolveEndpoint(params).join(); + + assertThat(result.uri().toString(), equalTo("https://foo.com")); + } + + @Test + public void returnsCfInsteadOfThrowingOnError() { + EndpointResolverParams params = EndpointResolverParams.builder() + .inputValue(getInput()) + .operation(getOperation(Map.of())) + .build(); + + var program = new RulesEngine().precompiledBuilder() + .bytecode( + RulesProgram.VERSION, + (byte) 1, + (byte) 0) + .constantPool("https://example.com") + .parameters(new ParamDefinition("foo", false, null, null)) + .build(); + var resolver = new EndpointRulesResolver(program); + var result = resolver.resolveEndpoint(params); + + try { + result.join(); + Assertions.fail("Expected to throw"); + } catch (CompletionException e) { + assertThat(e.getCause(), instanceOf(RulesEvaluationError.class)); + } + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java new file mode 100644 index 000000000..b0530c6b1 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java @@ -0,0 +1,157 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; + +import java.net.URI; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.MethodSource; +import software.amazon.smithy.model.node.Node; +import software.amazon.smithy.rulesengine.language.evaluation.value.EndpointValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.Value; +import software.amazon.smithy.rulesengine.language.syntax.Identifier; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; +import software.amazon.smithy.utils.Pair; + +public class EndpointUtilsTest { + @ParameterizedTest + @MethodSource("verifyObjectProvider") + public void verifiesObjects(Object value, boolean isValid) { + try { + EndpointUtils.verifyObject(value); + if (!isValid) { + Assertions.fail("Expected " + value + " to fail"); + } + } catch (UnsupportedOperationException e) { + if (isValid) { + throw e; + } + } + } + + public static List verifyObjectProvider() throws Exception { + return List.of( + Arguments.of("hi", true), + Arguments.of(1, true), + Arguments.of(true, true), + Arguments.of(false, true), + Arguments.of(StringTemplate.from(Template.fromString("https://foo.com")), true), + Arguments.of(new URI("/"), true), + Arguments.of(List.of(true, 1), true), + Arguments.of(Map.of("hi", List.of(true, List.of("a"))), true), + // Invalid + Arguments.of(Pair.of("a", "b"), false), + Arguments.of(List.of(Pair.of("a", "b")), false), + Arguments.of(Map.of(1, 1), false), + Arguments.of(Map.of("a", Pair.of("a", "b")), false)); + } + + @ParameterizedTest + @CsvSource({ + // Test cases for valid IP addresses + "'http://192.168.1.1/index.html', true", + "'https://192.168.1.1:8080/path', true", + "'http://127.0.0.1/', true", + "'https://255.255.255.255/', true", + "'http://0.0.0.0/', true", + "'https://1.2.3.4:8443/path?query=value', true", + "'http://10.0.0.1', true", + "'https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/', true", + "'http://[::1]/', true", + "'https://[fe80::1ff:fe23:4567:890a]:8443/', true", + "'https://[2001:db8::1]', true", + // Test cases for non-IP hostnames + "'http://example.com/', false", + "'https://www.google.com/search?q=test', false", + "'http://subdomain.example.org:8080/path', false", + "'https://localhost/test', false", + // Test cases for invalid IP formats + "'http://192.168.1/incomplete', false", + "'https://256.1.1.1/invalid', false", + "'http://1.2.3.4.5/toomanyparts', false", + "'https://192.168.1.a/invalid', false", + "'http://a.b.c.d/notdigits', false", + "'https://192.168.1.256/outofrange', false", + // Additional domain test cases + "'https://domain-with-hyphens.com/', false", + "'http://underscore_domain.org/', false", + "'https://a.very.long.domain.name.example.com/path', false" + }) + void testGetUriIsIp(String uriString, boolean expected) throws Exception { + URI uri = new URI(uriString); + boolean actual = (boolean) EndpointUtils.getUriProperty(uri, "isIp"); + + assertThat(expected, equalTo(actual)); + } + + @ParameterizedTest + @MethodSource("testConvertsValuesToObjectsProvider") + void testConvertsValuesToObjects(Value value, Object object) { + var converted = EndpointUtils.convertInputParamValue(value); + + assertThat(converted, equalTo(object)); + } + + public static List testConvertsValuesToObjectsProvider() { + return List.of( + Arguments.of(Value.emptyValue(), null), + Arguments.of(Value.stringValue("hi"), "hi"), + Arguments.of(Value.booleanValue(true), true), + Arguments.of(Value.booleanValue(false), false), + Arguments.of(Value.integerValue(1), 1), + Arguments.of(Value.arrayValue(List.of(Value.integerValue(1))), List.of(1)), + Arguments.of(Value.recordValue(Map.of(Identifier.of("hi"), Value.integerValue(1))), + Map.of("hi", 1)) + + ); + } + + @Test + public void throwsWhenValueUnsupported() { + Assertions.assertThrows(RulesEvaluationError.class, + () -> EndpointUtils.convertInputParamValue(EndpointValue.builder().url("https://foo").build())); + } + + @Test + public void getsUriParts() throws Exception { + var uri = new URI("http://localhost/foo/bar"); + + assertThat(EndpointUtils.getUriProperty(uri, "authority"), equalTo(uri.getAuthority())); + assertThat(EndpointUtils.getUriProperty(uri, "scheme"), equalTo(uri.getScheme())); + assertThat(EndpointUtils.getUriProperty(uri, "path"), equalTo("/foo/bar")); + assertThat(EndpointUtils.getUriProperty(uri, "normalizedPath"), equalTo("/foo/bar/")); + } + + @ParameterizedTest + @MethodSource("convertsNodeInputsProvider") + void convertsNodeInputs(Node value, Object object) { + var converted = EndpointUtils.convertNodeInput(value); + + assertThat(converted, equalTo(object)); + } + + public static List convertsNodeInputsProvider() { + return List.of( + Arguments.of(Node.from("hi"), "hi"), + Arguments.of(Node.from("hi"), "hi"), + Arguments.of(Node.from(true), true), + Arguments.of(Node.from(false), false), + Arguments.of(Node.fromNodes(Node.from("aa")), List.of("aa"))); + } + + @Test + public void throwsOnUnsupportNodeInput() { + Assertions.assertThrows(RulesEvaluationError.class, () -> EndpointUtils.convertNodeInput(Node.from(1))); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java new file mode 100644 index 000000000..edb0f01f3 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java @@ -0,0 +1,87 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.nullValue; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import software.amazon.smithy.java.client.core.endpoint.EndpointContext; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.model.Model; +import software.amazon.smithy.model.shapes.ServiceShape; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; +import software.amazon.smithy.rulesengine.traits.EndpointTestsTrait; + +public class RulesCompilerTest { + @ParameterizedTest + @MethodSource("testCaseProvider") + public void testRunner(Path modelFile) { + var model = Model.assembler() + .discoverModels() + .addImport(modelFile) + .assemble() + .unwrap(); + var service = model.expectShape(ShapeId.from("example#FizzBuzz"), ServiceShape.class); + var engine = new RulesEngine(); + var program = engine.compile(service.expectTrait(EndpointRuleSetTrait.class).getEndpointRuleSet()); + var plugin = EndpointRulesPlugin.from(program); + var testCases = service.expectTrait(EndpointTestsTrait.class); + + for (var test : testCases.getTestCases()) { + var testParams = test.getParams(); + var ctx = Context.create(); + Map input = new HashMap<>(); + for (var entry : testParams.getStringMap().entrySet()) { + input.put(entry.getKey(), EndpointUtils.convertNodeInput(entry.getValue())); + } + var expected = test.getExpect(); + expected.getEndpoint().ifPresent(expectedEndpoint -> { + var result = plugin.getProgram().resolveEndpoint(ctx, input); + assertThat(result.uri().toString(), equalTo(expectedEndpoint.getUrl())); + var actualHeaders = result.property(EndpointContext.HEADERS); + if (expectedEndpoint.getHeaders().isEmpty()) { + assertThat(actualHeaders, nullValue()); + } else { + assertThat(actualHeaders, equalTo(expectedEndpoint.getHeaders())); + } + // TODO: validate properties too. + }); + expected.getError().ifPresent(expectedError -> { + try { + var result = plugin.getProgram().resolveEndpoint(ctx, input); + Assertions.fail("Expected ruleset to fail: " + modelFile + " : " + test.getDocumentation() + + ", but resolved " + result); + } catch (RulesEvaluationError e) { + // pass + } + }); + } + } + + public static List testCaseProvider() throws Exception { + List result = new ArrayList<>(); + var baseUri = RulesCompilerTest.class.getResource("runner").toURI(); + var basePath = Paths.get(baseUri); + for (var file : Objects.requireNonNull(basePath.toFile().listFiles())) { + if (!file.isDirectory()) { + result.add(file.toPath()); + } + } + return result; + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineTest.java new file mode 100644 index 000000000..035ebf288 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineTest.java @@ -0,0 +1,149 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; + +import java.nio.ByteBuffer; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.context.Context; + +public class RulesEngineTest { + @Test + public void canProvideFunctionsWhenLoadingRules() { + var helloReturnValue = "hi!"; + var engine = new RulesEngine(); + + engine.addExtension(new RulesExtension() { + @Override + public List getFunctions() { + return List.of( + new RulesFunction() { + @Override + public int getOperandCount() { + return 1; + } + + @Override + public String getFunctionName() { + return "hello"; + } + + @Override + public Object apply1(Object value) { + return value; + } + }); + } + }); + + var bytecode = new byte[] { + RulesProgram.VERSION, + 0, // params + 0, // registers + RulesProgram.LOAD_CONST, + 0, + RulesProgram.FN, + 0, + RulesProgram.RETURN_ERROR + }; + + var program = engine.precompiledBuilder() + .bytecode(ByteBuffer.wrap(bytecode)) + .constantPool(helloReturnValue) + .functionNames("hello") + .build(); + + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of())); + + assertThat(e.getMessage(), containsString(helloReturnValue)); + } + + @Test + public void failsEarlyWhenFunctionIsMissing() { + var helloReturnValue = "hi!"; + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + 0, // params + 0, // registers + RulesProgram.LOAD_CONST, + 0, + RulesProgram.FN, + 0, + RulesProgram.RETURN_ERROR + }; + + Assertions.assertThrows(UnsupportedOperationException.class, + () -> engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(helloReturnValue) + .functionNames("hello") + .build()); + } + + @Test + public void failsEarlyWhenTooManyRegisters() { + var engine = new RulesEngine(); + var params = new ParamDefinition[257]; + for (var i = 0; i < 257; i++) { + params[i] = new ParamDefinition("r" + i); + } + + Assertions.assertThrows(IllegalArgumentException.class, + () -> engine.precompiledBuilder() + .bytecode(RulesProgram.VERSION, (byte) 255, (byte) 0) + .parameters(params) + .build()); + } + + @Test + public void callsCustomBuiltins() { + var helloReturnValue = "hi!"; + var engine = new RulesEngine(); + var constantPool = new Object[] {helloReturnValue}; + + // Add a built-in provider that just gets ignored. + engine.addBuiltinProvider((name, ctx) -> null); + + engine.addBuiltinProvider((name, ctx) -> { + if (name.equals("customTest")) { + return helloReturnValue; + } + return null; + }); + + var bytecode = new byte[] { + RulesProgram.VERSION, + 2, // params + 0, // registers + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.RETURN_ERROR + }; + + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(constantPool) + .parameters( + new ParamDefinition("foo", false, null, "customTest"), + // This register will try to fill in a default from a builtin named "unknown", but one doesn't + // exist so it is initialized to null. It's not required, so this is allowed to be null. It's + // like if a built-in is unable to optionally find your AWS::Auth::AccountId ID. + new ParamDefinition("bar", false, null, "unknown")) + .build(); + + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of())); + + assertThat(e.getMessage(), containsString(helloReturnValue)); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesProgramTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesProgramTest.java new file mode 100644 index 000000000..f223423bf --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesProgramTest.java @@ -0,0 +1,106 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.is; + +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.context.Context; + +public class RulesProgramTest { + @Test + public void failsWhenMissingVersion() { + var engine = new RulesEngine(); + Assertions.assertThrows( + IllegalArgumentException.class, + () -> engine.precompiledBuilder() + .bytecode(RulesProgram.RETURN_ERROR, (byte) 0, (byte) 0) + .build()); + } + + @Test + public void failsWhenVersionIsTooBig() { + var engine = new RulesEngine(); + + Assertions.assertThrows( + IllegalArgumentException.class, + () -> engine.precompiledBuilder() + .bytecode((byte) -127, (byte) 0, (byte) 0) + .build()); + } + + @Test + public void failsWhenNotEnoughBytes() { + var engine = new RulesEngine(); + + Assertions.assertThrows( + IllegalArgumentException.class, + () -> engine.precompiledBuilder().bytecode((byte) -1).build()); + } + + @Test + public void failsWhenMissingParams() { + var engine = new RulesEngine(); + + Assertions.assertThrows( + IllegalArgumentException.class, + () -> engine.precompiledBuilder() + .bytecode(RulesProgram.VERSION, (byte) 1, (byte) 0) + .build()); + } + + @Test + public void convertsProgramsToStrings() { + var program = getErrorProgram(); + var str = program.toString(); + + assertThat(str, containsString("Constants:")); + assertThat(str, containsString("Registers:")); + assertThat(str, containsString("Instructions:")); + assertThat(str, containsString("0: String: Error!")); + assertThat(str, containsString("0: ParamDefinition[name=a")); + assertThat(str, containsString("003: LOAD_CONST")); + assertThat(str, containsString("005: RETURN_ERROR")); + } + + private RulesProgram getErrorProgram() { + var engine = new RulesEngine(); + + return engine.precompiledBuilder() + .bytecode( + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.LOAD_CONST, + (byte) 0, + RulesProgram.RETURN_ERROR) + .constantPool("Error!") + .parameters(new ParamDefinition("a")) + .build(); + } + + @Test + public void exposesConstantsAndRegisters() { + var program = getErrorProgram(); + + assertThat(program.getConstantPool().length, is(1)); + assertThat(program.getParamDefinitions().size(), is(1)); + } + + @Test + public void runsPrograms() { + var program = getErrorProgram(); + + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of("a", "foo"))); + + assertThat(e.getMessage(), containsString("Error!")); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java new file mode 100644 index 000000000..e798315aa --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java @@ -0,0 +1,457 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.equalTo; + +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.client.core.endpoint.EndpointContext; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; + +public class RulesVmTest { + @Test + public void throwsWhenUnableToResolveEndpoint() { + var engine = new RulesEngine(); + var program = engine.precompiledBuilder() + .bytecode(RulesProgram.VERSION, (byte) 0, (byte) 0) + .constantPool(1) + .build(); + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of())); + + assertThat(e.getMessage(), containsString("No value returned from rules engine")); + } + + @Test + public void throwsForInvalidOpcode() { + var engine = new RulesEngine(); + var bytecode = new byte[] {RulesProgram.VERSION, (byte) 0, (byte) 0, 120}; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(1) + .build(); + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of())); + + assertThat(e.getMessage(), containsString("Unknown rules engine instruction: 120")); + } + + @Test + public void throwsWithContextWhenTypeIsInvalid() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 0, // params + (byte) 0, // registers + RulesProgram.LOAD_CONST, + 0, + RulesProgram.RESOLVE_TEMPLATE, + 0, // Refers to invalid type. Expects string, given integer. + 0 + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(1) + .build(); + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of())); + + assertThat(e.getMessage(), containsString("Unexpected value type")); + assertThat(e.getMessage(), containsString("at address 5")); + } + + @Test + public void throwsWithContextWhenBytecodeIsMalformed() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 0, // params + (byte) 0, // registers + RulesProgram.LOAD_CONST, + 0, + RulesProgram.RESOLVE_TEMPLATE // missing following byte + }; + + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(1) + .build(); + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of())); + + assertThat(e.getMessage(), containsString("Malformed bytecode encountered while evaluating rules engine")); + } + + @Test + public void failsIfRequiredRegisterMissing() { + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + }; + var program = new RulesEngine().precompiledBuilder() + .bytecode(bytecode) + .constantPool(1) + .parameters(new ParamDefinition("foo", true, null, null)) + .build(); + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of())); + + assertThat(e.getMessage(), containsString("Required rules engine parameter missing: foo")); + } + + @Test + public void setsDefaultRegisterValues() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.RETURN_ENDPOINT, + 0 + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(1) + .parameters(new ParamDefinition("foo", true, "https://foo.com", null)) + .build(); + var endpoint = program.resolveEndpoint(Context.create(), Map.of()); + + assertThat(endpoint.toString(), containsString("https://foo.com")); + } + + @Test + public void resizesTheStackWhenNeeded() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.RETURN_ENDPOINT, + 0 + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(1) + .parameters(new ParamDefinition("foo", false, null, null)) + .build(); + var endpoint = program.resolveEndpoint(Context.create(), Map.of("foo", "https://foo.com")); + + assertThat(endpoint.toString(), containsString("https://foo.com")); + } + + @Test + public void resolvesTemplates() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.LOAD_REGISTER, // 1 byte register + 0, + RulesProgram.RESOLVE_TEMPLATE, // 2 byte constant + 0, + 0, + RulesProgram.RETURN_ENDPOINT, // 1 byte, no headers or properties + 0 + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(StringTemplate.from(Template.fromString("https://{foo}.bar"))) + .parameters(new ParamDefinition("foo", false, "hi", null)) + .build(); + var endpoint = program.resolveEndpoint(Context.create(), Map.of()); + + assertThat(endpoint.toString(), containsString("https://hi.bar")); + } + + @Test + public void resolvesNoExpressionTemplates() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 0, // params + (byte) 0, // registers + RulesProgram.RESOLVE_TEMPLATE, // 2 byte constant + 0, + 0, + RulesProgram.RETURN_ENDPOINT, // 1 byte, no headers or properties + 0 + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(StringTemplate.from(Template.fromString("https://hi.bar"))) + .build(); + var endpoint = program.resolveEndpoint(Context.create(), Map.of()); + + assertThat(endpoint.toString(), containsString("https://hi.bar")); + } + + @Test + public void wrapsInvalidURIs() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 0, // params + (byte) 0, // registers + RulesProgram.RESOLVE_TEMPLATE, // 2 byte constant + 0, + 0, + RulesProgram.RETURN_ENDPOINT, // 1 byte, no headers or properties + 0 + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(StringTemplate.from(Template.fromString("!??!!\\"))) + .build(); + var e = Assertions.assertThrows(RulesEvaluationError.class, + () -> program.resolveEndpoint(Context.create(), Map.of())); + + assertThat(e.getMessage(), containsString("Error creating URI")); + } + + @Test + public void createsMapForEndpointHeaders() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 0, // params + (byte) 0, // registers + RulesProgram.LOAD_CONST, // push list value 0, "def" + 2, + RulesProgram.CREATE_LIST, // push list with one value, ["def"]. + 1, + RulesProgram.LOAD_CONST, // push map key "abc" + 1, + RulesProgram.CREATE_MAP, // push with one KVP: {"abc": ["def"]} (the endpoint headers) + 1, + RulesProgram.RESOLVE_TEMPLATE, // push resolved string template at constant 0 (2 byte constant) + 0, + 0, + RulesProgram.RETURN_ENDPOINT, // Return an endpoint that does have headers. + 1 + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(StringTemplate.from(Template.fromString("https://hi.bar")), "abc", "def") + .build(); + var endpoint = program.resolveEndpoint(Context.create(), Map.of()); + + assertThat(endpoint.toString(), containsString("https://hi.bar")); + assertThat(endpoint.property(EndpointContext.HEADERS), equalTo(Map.of("abc", List.of("def")))); + } + + @Test + public void testsIfRegisterSet() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.TEST_REGISTER_ISSET, + 0, + RulesProgram.RETURN_VALUE + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .parameters(new ParamDefinition("hi", false, "abc", null)) + .build(); + var result = program.run(Context.create(), Map.of()); + + assertThat(result, equalTo(true)); + } + + @Test + public void testsIfValueRegisterSet() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.ISSET, + RulesProgram.RETURN_VALUE + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .parameters(new ParamDefinition("hi", false, "abc", null)) + .build(); + + var result = program.run(Context.create(), Map.of()); + + assertThat(result, equalTo(true)); + } + + @Test + public void testNotOpcode() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.NOT, + RulesProgram.RETURN_VALUE + }; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .parameters(new ParamDefinition("hi", false, false, null)) + .build(); + var result = program.run(Context.create(), Map.of()); + + assertThat(result, equalTo(true)); + } + + @Test + public void testTrueOpcodes() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 3, // params + (byte) 0, // registers + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.IS_TRUE, + RulesProgram.LOAD_REGISTER, + 1, + RulesProgram.IS_TRUE, + RulesProgram.LOAD_REGISTER, + 2, + RulesProgram.IS_TRUE, + RulesProgram.TEST_REGISTER_IS_TRUE, + 0, + RulesProgram.TEST_REGISTER_IS_TRUE, + 1, + RulesProgram.TEST_REGISTER_IS_TRUE, + 2, + RulesProgram.CREATE_LIST, + 6, + RulesProgram.RETURN_VALUE}; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .parameters( + new ParamDefinition("a", false, false, null), + new ParamDefinition("b", false, true, null), + new ParamDefinition("c", false, "foo", null)) + .build(); + var result = program.run(Context.create(), Map.of()); + + assertThat(result, equalTo(List.of(false, true, false, false, true, false))); + } + + @Test + public void callsFunctions() { + var engine = new RulesEngine(); + engine.addFunction(new RulesFunction() { + @Override + public int getOperandCount() { + return 0; + } + + @Override + public String getFunctionName() { + return "gimme"; + } + + @Override + public Object apply0() { + return "gimme"; + } + }); + + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.FN, + 0, // "hi there" == "hi there" : true + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.FN, + 1, // uriEncode "hi there" : "hi%20there" + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.LOAD_CONST, + 0, + RulesProgram.LOAD_CONST, + 1, + RulesProgram.LOAD_CONST, + 2, + RulesProgram.FN, + 2, // "hi_there" -> "there" + RulesProgram.FN, + 3, // call gimme() + RulesProgram.CREATE_LIST, + 4, // ["gimme", "there", "hi%20there", true] + RulesProgram.RETURN_VALUE}; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(3, 8, false) + .parameters(new ParamDefinition("a", false, "hi there", null)) + .functionNames("stringEquals", "uriEncode", "substring", "gimme") + .build(); + var result = program.run(Context.create(), Map.of()); + + assertThat(result, equalTo(List.of(true, "hi%20there", "there", "gimme"))); + } + + @Test + public void appliesGetAttrOpcode() { + var engine = new RulesEngine(); + var bytecode = new byte[] { + RulesProgram.VERSION, + (byte) 1, // params + (byte) 0, // registers + RulesProgram.LOAD_REGISTER, + 0, + RulesProgram.GET_ATTR, + 0, + 0, + RulesProgram.RETURN_VALUE}; + var program = engine.precompiledBuilder() + .bytecode(bytecode) + .constantPool(AttrExpression.parse("foo")) + .parameters(new ParamDefinition("a", false, null, null)) + .build(); + var result = program.run(Context.create(), Map.of("a", Map.of("foo", "hi"))); + + assertThat(result, equalTo("hi")); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java new file mode 100644 index 000000000..c394adf54 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java @@ -0,0 +1,102 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.is; + +import java.net.URI; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import software.amazon.smithy.java.client.core.ClientContext; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.context.Context; + +public class StdlibTest { + @Test + public void comparesStrings() { + assertThat(Stdlib.STRING_EQUALS.apply2("a", "a"), is(true)); + assertThat(Stdlib.STRING_EQUALS.apply2("a", "b"), is(false)); + assertThat(Stdlib.STRING_EQUALS.apply2(null, "b"), is(false)); + + Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.STRING_EQUALS.apply2("a", false)); + } + + @Test + public void comparesBooleans() { + assertThat(Stdlib.BOOLEAN_EQUALS.apply2(true, true), is(true)); + assertThat(Stdlib.BOOLEAN_EQUALS.apply2(true, Boolean.TRUE), is(true)); + assertThat(Stdlib.BOOLEAN_EQUALS.apply2(false, Boolean.FALSE), is(true)); + assertThat(Stdlib.BOOLEAN_EQUALS.apply2(false, false), is(true)); + + Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.BOOLEAN_EQUALS.apply2("a", false)); + } + + @Test + public void parseUrl() throws Exception { + assertThat(Stdlib.PARSE_URL.apply1("http://foo.com"), equalTo(new URI("http://foo.com"))); + Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.PARSE_URL.apply1(false)); + Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.PARSE_URL.apply1("\\")); + } + + @Test + public void handlesSubstrings() { + assertThat(Stdlib.SUBSTRING.apply("abc", 0, 1, false), equalTo("a")); + assertThat(Stdlib.SUBSTRING.apply("abc", 0, 2, false), equalTo("ab")); + assertThat(Stdlib.SUBSTRING.apply("abc", 0, 3, false), equalTo("abc")); + assertThat(Stdlib.SUBSTRING.apply("abc", 1, 2, false), equalTo("b")); + assertThat(Stdlib.SUBSTRING.apply("abc", 1, 3, false), equalTo("bc")); + assertThat(Stdlib.SUBSTRING.apply("abc", 2, 3, false), equalTo("c")); + + assertThat(Stdlib.SUBSTRING.apply("abc", 2, 3, true), equalTo("a")); + assertThat(Stdlib.SUBSTRING.apply("abc", 1, 3, true), equalTo("ab")); + } + + @ParameterizedTest + @CsvSource({ + // Valid simple host labels (no dots) + "'example',false,true", + "'a',false,true", + "'server1',false,true", + "'my-host',false,true", + // Invalid simple host labels (no dots) + "'-example',false,false", + "'host_name',false,false", + "'a-very-long-host-name-that-is-exactly-64-characters-in-length-1234567',false,false", + "'',false,false", + // Valid host labels with dots + "'example.com',true,true", + "'a.b.c',true,true", + "'sub.domain.example.com',true,true", + "'192.168.1.1',true,true", + // Invalid host labels with dots + "'.example.com',true,false", // Starts with dot + "'example.com.',true,false", // Ends with dot + "'example..com',true,false", // Double dots + "'exam@ple.com',true,false", // Invalid character + "'-.example.com',true,false", // Segment starts with hyphen + "'example.c*m',true,false", // Invalid character in segment + "'a-very-long-segment-that-is-exactly-64-characters-in-length-1234567.com',true,false" // Segment too long + }) + public void testsForValidHostLabels(String input, boolean allowDots, boolean isValid) { + assertThat(input, Stdlib.IS_VALID_HOST_LABEL.apply2(input, allowDots), is(isValid)); + } + + @Test + public void resolvesSdkEndpointBuiltins() { + var ctx = Context.create(); + var endpoint = Endpoint.builder().uri("https://foo.com").build(); + ctx.put(ClientContext.CUSTOM_ENDPOINT, endpoint); + var result = Stdlib.standardBuiltins("SDK::Endpoint", ctx); + + assertThat(result, instanceOf(String.class)); + assertThat(result, equalTo(endpoint.uri().toString())); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StringTemplateTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StringTemplateTest.java new file mode 100644 index 000000000..f8abfd436 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StringTemplateTest.java @@ -0,0 +1,70 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; + +import java.util.ArrayList; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; + +public class StringTemplateTest { + @Test + public void createsFromSingularExpression() { + var template = Template.fromString("{Region}"); + var st = StringTemplate.from(template); + List calls = new ArrayList<>(); + + assertThat(st.expressionCount(), is(1)); + assertThat(st.singularExpression(), notNullValue()); + assertThat(st.resolve(1, new Object[] {"test"}), equalTo("test")); + + st.forEachExpression(calls::add); + assertThat(calls, hasSize(1)); + } + + @Test + public void stEquality() { + var template = Template.fromString("foo/{Region}"); + var st1 = StringTemplate.from(template); + var st2 = StringTemplate.from(template); + var st3 = StringTemplate.from(Template.fromString("bar/{Region}")); + + assertThat(st1, equalTo(st1)); + assertThat(st2, equalTo(st1)); + assertThat(st3, not(equalTo(st1))); + } + + @Test + public void loadsTemplatesWithMixedParts() { + var template = Template.fromString("https://foo.{Region}.{Other}.com"); + var st = StringTemplate.from(template); + List calls = new ArrayList<>(); + + assertThat(st.expressionCount(), is(2)); + assertThat(st.singularExpression(), nullValue()); + assertThat(st.resolve(2, new Object[] {"abc", "def"}), equalTo("https://foo.abc.def.com")); + + st.forEachExpression(calls::add); + assertThat(calls, hasSize(2)); + } + + @Test + public void ensuresTemplatesAreNotMissing() { + var template = Template.fromString("https://foo.{Region}.{Other}.com"); + var st = StringTemplate.from(template); + + Assertions.assertThrows(RulesEvaluationError.class, () -> st.resolve(1, new Object[] {"foo"})); + } +} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/example-complex-ruleset.json b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/example-complex-ruleset.json new file mode 100644 index 000000000..aac476a6c --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/example-complex-ruleset.json @@ -0,0 +1,242 @@ +{ + "version": "1.0", + "parameters": { + "Region": { + "required": false, + "type": "String" + }, + "UseFIPS": { + "required": true, + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "parseURL", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "isIp" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "isIp" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://example-fips.{Region}.dual-stack-dns-suffix.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://example.{Region}.dual-stack-dns-suffix.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "isIp" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://example-fips.{Region}.dual-stack-dns-suffix.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://example.{Region}.dual-stack-dns-suffix.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] +} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.json b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.json new file mode 100644 index 000000000..27fa326b5 --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.json @@ -0,0 +1,30 @@ +{ + "version": "1.3", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": true, + "type": "String" + } + }, + "rules": [ + { + "conditions": [], + "documentation": "base rule", + "endpoint": { + "url": "https://{Region}.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ] +} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.smithy new file mode 100644 index 000000000..b56e49a5a --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.smithy @@ -0,0 +1,33 @@ +$version: "2.0" + +namespace example + +use smithy.rules#clientContextParams +use smithy.rules#endpointRuleSet + +@endpointRuleSet({ + "version": "1.3", + "parameters": { + "Region": { + "required": true, + "type": "String", + "documentation": "docs" + } + }, + "rules": [ + { + "conditions": [], + "documentation": "base rule", + "endpoint": { + "url": "https://{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] +}) +@clientContextParams( + Region: {type: "string", documentation: "docs"} +) +service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy new file mode 100644 index 000000000..f137a1872 --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy @@ -0,0 +1,153 @@ +$version: "2.0" + +namespace example + +use smithy.rules#clientContextParams +use smithy.rules#endpointRuleSet +use smithy.rules#endpointTests +use smithy.rules#staticContextParams + +@clientContextParams( + bar: {type: "string", documentation: "a client string parameter"} + baz: {type: "string", documentation: "another client string parameter"} +) +@endpointRuleSet({ + version: "1.0", + parameters: { + bar: { + type: "string", + documentation: "docs" + } + baz: { + type: "string", + documentation: "docs" + required: true + default: "baz" + }, + endpoint: { + type: "string", + builtIn: "SDK::Endpoint", + required: true, + default: "asdf" + documentation: "docs" + }, + stringArrayParam: { + type: "stringArray", + required: true, + default: ["a", "b", "c"], + documentation: "docs" + } + }, + rules: [ + { + "documentation": "Template baz into URI when bar is set", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "bar" + } + ] + } + ], + "endpoint": { + "url": "https://example.com/{baz}" + }, + "type": "endpoint" + }, + { + "documentation": "Template first array value into URI", + "conditions": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "stringArrayParam" + }, + "[0]" + ], + "assign": "arrayValue" + } + ], + "endpoint": { + "url": "https://example.com/{arrayValue}" + }, + "type": "endpoint" + }, + { + "conditions": [], + "documentation": "error fallthrough", + "error": "endpoint error", + "type": "error" + } + ] +}) +@endpointTests({ + "version": "1.0", + "testCases": [ + { + "params": { + "bar": "a b", + } + "operationInputs": [{ + "operationName": "GetThing", + "builtInParams": { + "SDK::Endpoint": "https://custom.example.com" + } + }], + "expect": { + "endpoint": { + "url": "https://example.com/baz" + } + } + }, + { + "params": { + "bar": "a b", + "baz": "BIG" + } + "operationInputs": [{ + "operationName": "GetThing", + "builtInParams": { + "SDK::Endpoint": "https://custom.example.com" + } + }], + "expect": { + "endpoint": { + "url": "https://example.com/BIG" + } + } + }, + { + "documentation": "Default array values used" + "params": { + } + "expect": { + "endpoint": { + "url": "https://example.com/a" + } + } + }, + { + "params": { + "stringArrayParam": [] + } + "documentation": "a documentation string", + "expect": { + "error": "endpoint error" + } + } + ] +}) +service FizzBuzz { + version: "2022-01-01", + operations: [GetThing] +} + +@staticContextParams( + "stringArrayParam": {value: []} +) +operation GetThing { + input := {} +} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/headers.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/headers.smithy new file mode 100644 index 000000000..5587c8be3 --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/headers.smithy @@ -0,0 +1,80 @@ +$version: "2.0" + +namespace example + +use smithy.rules#clientContextParams +use smithy.rules#endpointRuleSet +use smithy.rules#endpointTests + +@endpointRuleSet({ + "parameters": { + "Region": { + "type": "string", + "documentation": "The region to dispatch this request, eg. `us-east-1`." + } + }, + "rules": [ + { + "documentation": "Template the region into the URI when region is set", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "endpoint": { + "url": "https://{Region}.amazonaws.com", + "headers": { + "x-amz-region": [ + "{Region}" + ], + "x-amz-multi": [ + "*", + "{Region}" + ] + } + }, + "type": "endpoint" + }, + { + "documentation": "fallback when region is unset", + "conditions": [], + "error": "Region must be set to resolve a valid endpoint", + "type": "error" + } + ], + "version": "1.3" +}) +@endpointTests( + "version": "1.0", + "testCases": [ + { + "documentation": "header set to region", + "params": { + "Region": "us-east-1" + }, + "expect": { + "endpoint": { + "url": "https://us-east-1.amazonaws.com", + "headers": { + "x-amz-region": [ + "us-east-1" + ], + "x-amz-multi": [ + "*", + "us-east-1" + ] + } + } + } + } + ] +) +@clientContextParams( + Region: {type: "string", documentation: "docs"} +) +service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/parse-url.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/parse-url.smithy new file mode 100644 index 000000000..00e8b371f --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/parse-url.smithy @@ -0,0 +1,246 @@ +$version: "2.0" + +namespace example + +use smithy.rules#clientContextParams +use smithy.rules#endpointRuleSet +use smithy.rules#endpointTests + +@endpointRuleSet({ + "version": "1.3", + "parameters": { + "Endpoint": { + "type": "string", + "documentation": "docs" + } + }, + "rules": [ + { + "documentation": "endpoint is set and is a valid URL", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + "{Endpoint}" + ], + "assign": "url" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}is-ip-addr" + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{url#path}", + "/port" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}/uri-with-port" + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{url#normalizedPath}", + "/" + ] + } + ], + "endpoint": { + "url": "https://{url#scheme}-{url#authority}-nopath.example.com" + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{url#scheme}-{url#authority}.example.com/path-is{url#path}" + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "error": "endpoint was invalid", + "conditions": [], + "type": "error" + } + ] +}) +@endpointTests( + version: "1.0", + testCases: [ + { + "documentation": "simple URL parsing", + "params": { + "Endpoint": "https://authority.com/custom-path" + }, + "expect": { + "endpoint": { + "url": "https://https-authority.com.example.com/path-is/custom-path" + } + } + }, + { + "documentation": "empty path no slash", + "params": { + "Endpoint": "https://authority.com" + }, + "expect": { + "endpoint": { + "url": "https://https-authority.com-nopath.example.com" + } + } + }, + { + "documentation": "empty path with slash", + "params": { + "Endpoint": "https://authority.com/" + }, + "expect": { + "endpoint": { + "url": "https://https-authority.com-nopath.example.com" + } + } + }, + { + "documentation": "authority with port", + "params": { + "Endpoint": "https://authority.com:8000/port" + }, + "expect": { + "endpoint": { + "url": "https://authority.com:8000/uri-with-port" + } + } + }, + { + "documentation": "http schemes", + "params": { + "Endpoint": "http://authority.com:8000/port" + }, + "expect": { + "endpoint": { + "url": "http://authority.com:8000/uri-with-port" + } + } + }, + { + "documentation": "host labels are not validated", + "params": { + "Endpoint": "http://99_ab.com" + }, + "expect": { + "endpoint": { + "url": "https://http-99_ab.com-nopath.example.com" + } + } + }, + { + "documentation": "host labels are not validated", + "params": { + "Endpoint": "http://99_ab-.com" + }, + "expect": { + "endpoint": { + "url": "https://http-99_ab-.com-nopath.example.com" + } + } + }, + { + "documentation": "IP Address", + "params": { + "Endpoint": "http://192.168.1.1/foo/" + }, + "expect": { + "endpoint": { + "url": "http://192.168.1.1/foo/is-ip-addr" + } + } + }, + { + "documentation": "IP Address with port", + "params": { + "Endpoint": "http://192.168.1.1:1234/foo/" + }, + "expect": { + "endpoint": { + "url": "http://192.168.1.1:1234/foo/is-ip-addr" + } + } + }, + { + "documentation": "IPv6 Address", + "params": { + "Endpoint": "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443" + }, + "expect": { + "endpoint": { + "url": "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/is-ip-addr" + } + } + }, + { + "documentation": "weird DNS name", + "params": { + "Endpoint": "https://999.999.abc.blah" + }, + "expect": { + "endpoint": { + "url": "https://https-999.999.abc.blah-nopath.example.com" + } + } + }, + { + "documentation": "query in resolved endpoint is not supported", + "params": { + "Endpoint": "https://example.com/path?query1=foo" + }, + "expect": { + "error": "endpoint was invalid" + } + } + ] +) +@clientContextParams( + Endpoint: {type: "string", documentation: "docs"} +) +service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/substring.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/substring.smithy new file mode 100644 index 000000000..42d93b922 --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/substring.smithy @@ -0,0 +1,293 @@ +$version: "2.0" + +namespace example + +use smithy.rules#clientContextParams +use smithy.rules#endpointRuleSet +use smithy.rules#endpointTests + +@endpointRuleSet({ + "parameters": { + "TestCaseId": { + "type": "string", + "required": true, + "documentation": "Test case id used to select the test case to use" + }, + "Input": { + "type": "string", + "required": true, + "documentation": "the input used to test substring" + } + }, + "rules": [ + { + "documentation": "Substring from beginning of input", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "1" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 0, + 4, + false + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "Substring from end of input", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "2" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 0, + 4, + true + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "Substring the middle of the string", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "3" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 1, + 3, + false + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "fallback when no tests match", + "conditions": [], + "error": "No tests matched", + "type": "error" + } + ], + "version": "1.3" +}) +@endpointTests( + version: "1.0", + testCases: [ + { + "documentation": "substring when string is long enough", + "params": { + "TestCaseId": "1", + "Input": "abcdefg" + }, + "expect": { + "error": "The value is: `abcd`" + } + }, + { + "documentation": "substring when string is exactly the right length", + "params": { + "TestCaseId": "1", + "Input": "abcd" + }, + "expect": { + "error": "The value is: `abcd`" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "1", + "Input": "abc" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "1", + "Input": "" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", + "params": { + "TestCaseId": "1", + "Input": "\ufdfd" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "unicode characters always return `None`", + "params": { + "TestCaseId": "1", + "Input": "abcdef\uD83D\uDC31" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "non-ascii cause substring to always return `None`", + "params": { + "TestCaseId": "1", + "Input": "abcdef\u0080" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "the full set of ascii is supported, including non-printable characters", + "params": { + "TestCaseId": "1", + "Input": "\u007Fabcdef" + }, + "expect": { + "error": "The value is: `\u007Fabc`" + } + }, + { + "documentation": "substring when string is long enough", + "params": { + "TestCaseId": "2", + "Input": "abcdefg" + }, + "expect": { + "error": "The value is: `defg`" + } + }, + { + "documentation": "substring when string is exactly the right length", + "params": { + "TestCaseId": "2", + "Input": "defg" + }, + "expect": { + "error": "The value is: `defg`" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "2", + "Input": "abc" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "2", + "Input": "" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", + "params": { + "TestCaseId": "2", + "Input": "\ufdfd" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring when string is longer", + "params": { + "TestCaseId": "3", + "Input": "defg" + }, + "expect": { + "error": "The value is: `ef`" + } + }, + { + "documentation": "substring when string is exact length", + "params": { + "TestCaseId": "3", + "Input": "def" + }, + "expect": { + "error": "The value is: `ef`" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "3", + "Input": "ab" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "3", + "Input": "" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", + "params": { + "TestCaseId": "3", + "Input": "\ufdfd" + }, + "expect": { + "error": "No tests matched" + } + } + ] +) +@clientContextParams( + TestCaseId: {type: "string", documentation: "docs"} + Input: {type: "string", documentation: "docs"} +) +service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/uri-encode.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/uri-encode.smithy new file mode 100644 index 000000000..6d2ef57f6 --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/uri-encode.smithy @@ -0,0 +1,132 @@ +$version: "2.0" + +namespace example + +use smithy.rules#clientContextParams +use smithy.rules#endpointRuleSet +use smithy.rules#endpointTests + +@endpointRuleSet({ + "version": "1.3", + "parameters": { + "TestCaseId": { + "type": "string", + "required": true, + "documentation": "Test case id used to select the test case to use" + }, + "Input": { + "type": "string", + "required": true, + "documentation": "The input used to test uriEncode" + } + }, + "rules": [ + { + "documentation": "uriEncode on input", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "1" + ] + }, + { + "fn": "uriEncode", + "argv": [ + "{Input}" + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "fallback when no tests match", + "conditions": [], + "error": "No tests matched", + "type": "error" + } + ] +}) +@endpointTests( + version: "1.0", + testCases: [ + { + "documentation": "uriEncode when the string has nothing to encode returns the input", + "params": { + "TestCaseId": "1", + "Input": "abcdefg" + }, + "expect": { + "error": "The value is: `abcdefg`" + } + }, + { + "documentation": "uriEncode with single character to encode encodes only that character", + "params": { + "TestCaseId": "1", + "Input": "abc:defg" + }, + "expect": { + "error": "The value is: `abc%3Adefg`" + } + }, + { + "documentation": "uriEncode with all ASCII characters to encode encodes all characters", + "params": { + "TestCaseId": "1", + "Input": "/:,?#[]{}|@! $&'()*+;=%<>\"^`\\" + }, + "expect": { + "error": "The value is: `%2F%3A%2C%3F%23%5B%5D%7B%7D%7C%40%21%20%24%26%27%28%29%2A%2B%3B%3D%25%3C%3E%22%5E%60%5C`" + } + }, + { + "documentation": "uriEncode with ASCII characters that should not be encoded returns the input", + "params": { + "TestCaseId": "1", + "Input": "0123456789.underscore_dash-Tilda~" + }, + "expect": { + "error": "The value is: `0123456789.underscore_dash-Tilda~`" + } + }, + { + "documentation": "uriEncode encodes unicode characters", + "params": { + "TestCaseId": "1", + "Input": "\ud83d\ude39" + }, + "expect": { + "error": "The value is: `%F0%9F%98%B9`" + } + }, + { + "documentation": "uriEncode on all printable ASCII characters", + "params": { + "TestCaseId": "1", + "Input": " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" + }, + "expect": { + "error": "The value is: `%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~`" + } + }, + { + "documentation": "uriEncode on an empty string", + "params": { + "TestCaseId": "1", + "Input": "" + }, + "expect": { + "error": "The value is: ``" + } + } + ] +) +@clientContextParams( + TestCaseId: {type: "string", documentation: "Test case id used to select the test case to use"}, + Input: {type: "string", documentation: "The input used to test uriEncoder"} +) +service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/valid-hostlabel.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/valid-hostlabel.smithy new file mode 100644 index 000000000..41f17593f --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/valid-hostlabel.smithy @@ -0,0 +1,149 @@ +$version: "2.0" + +namespace example + +use smithy.rules#clientContextParams +use smithy.rules#endpointRuleSet +use smithy.rules#endpointTests + +@endpointRuleSet({ + "parameters": { + "Region": { + "type": "string", + "required": true, + "documentation": "The region to dispatch this request, eg. `us-east-1`." + } + }, + "rules": [ + { + "documentation": "Template the region into the URI when region is set", + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{Region}.amazonaws.com" + }, + "type": "endpoint" + }, + { + "documentation": "Template the region into the URI when region is set", + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Region}-subdomains.amazonaws.com" + }, + "type": "endpoint" + }, + { + "documentation": "Region was not a valid host label", + "conditions": [], + "error": "Invalid hostlabel", + "type": "error" + } + ], + "version": "1.3" +}) +@endpointTests( + version: "1.0", + testCases: [ + { + "documentation": "standard region is a valid hostlabel", + "params": { + "Region": "us-east-1" + }, + "expect": { + "endpoint": { + "url": "https://us-east-1.amazonaws.com" + } + } + }, + { + "documentation": "starting with a number is a valid hostlabel", + "params": { + "Region": "3aws4" + }, + "expect": { + "endpoint": { + "url": "https://3aws4.amazonaws.com" + } + } + }, + { + "documentation": "when there are dots, only match if subdomains are allowed", + "params": { + "Region": "part1.part2" + }, + "expect": { + "endpoint": { + "url": "https://part1.part2-subdomains.amazonaws.com" + } + } + }, + { + "documentation": "a space is never a valid hostlabel", + "params": { + "Region": "part1 part2" + }, + "expect": { + "error": "Invalid hostlabel" + } + }, + { + "documentation": "an empty string is not a valid hostlabel", + "params": { + "Region": "" + }, + "expect": { + "error": "Invalid hostlabel" + } + }, + { + "documentation": "ending with a dot is not a valid hostlabel", + "params": { + "Region": "part1." + }, + "expect": { + "error": "Invalid hostlabel" + } + }, + { + "documentation": "multiple consecutive dots are not allowed", + "params": { + "Region": "part1..part2" + }, + "expect": { + "error": "Invalid hostlabel" + } + }, + { + "documentation": "labels cannot start with a dash", + "params": { + "Region": "part1.-part2" + }, + "expect": { + "error": "Invalid hostlabel" + } + } + ] +) +@clientContextParams( + Region: {type: "string", documentation: "docs"} +) +service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/substring.json b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/substring.json new file mode 100644 index 000000000..b60ca0935 --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/substring.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "TestCaseId": { + "type": "string", + "required": true, + "documentation": "Test case id used to select the test case to use" + }, + "Input": { + "type": "string", + "required": true, + "documentation": "the input used to test substring" + } + }, + "rules": [ + { + "documentation": "Substring from beginning of input", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "1" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 0, + 4, + false + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "Substring from end of input", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "2" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 0, + 4, + true + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "Substring the middle of the string", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "3" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 1, + 3, + false + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "fallback when no tests match", + "conditions": [], + "error": "No tests matched", + "type": "error" + } + ], + "version": "1.3" +} diff --git a/config/spotbugs/filter.xml b/config/spotbugs/filter.xml index e5c522790..2e935a335 100644 --- a/config/spotbugs/filter.xml +++ b/config/spotbugs/filter.xml @@ -76,4 +76,9 @@ + + + + + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b2ed059a9..34a3f9953 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -33,6 +33,8 @@ smithy-jmespath = { module = "software.amazon.smithy:smithy-jmespath", version.r smithy-waiters = { module = "software.amazon.smithy:smithy-waiters", version.ref = "smithy" } smithy-utils = { module = "software.amazon.smithy:smithy-utils", version.ref = "smithy" } smithy-traitcodegen = { module = "software.amazon.smithy:smithy-trait-codegen", version.ref = "smithy" } +smithy-rules = { module = "software.amazon.smithy:smithy-rules-engine", version.ref = "smithy" } +smithy-aws-endpoints = { module = "software.amazon.smithy:smithy-aws-endpoints", version.ref = "smithy" } # AWS SDK for Java V2 adapters. aws-sdk-retries-spi = {module = "software.amazon.awssdk:retries-spi", version.ref = "aws-sdk"} diff --git a/io/src/main/java/software/amazon/smithy/java/io/uri/URLEncoding.java b/io/src/main/java/software/amazon/smithy/java/io/uri/URLEncoding.java index 89aa1056e..540b2f178 100644 --- a/io/src/main/java/software/amazon/smithy/java/io/uri/URLEncoding.java +++ b/io/src/main/java/software/amazon/smithy/java/io/uri/URLEncoding.java @@ -43,7 +43,7 @@ public static void encodeUnreserved(String source, StringBuilder sink, boolean i sink.append(c); } case '2' -> { - if (i < result.length() - 1 && result.charAt(i + 2) == 'F' && ignoreSlashes) { + if (ignoreSlashes && i < result.length() - 1 && result.charAt(i + 2) == 'F') { sink.append('/'); i += 2; break; diff --git a/settings.gradle.kts b/settings.gradle.kts index f631dea78..49234aaa7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -45,6 +45,7 @@ include(":client:client-rpcv2-cbor") include(":client:dynamic-client") include(":client:client-mock-plugin") include(":client:client-waiters") +include(":client:client-rulesengine") // Server include(":server:server-api") From 719d418e0143d5e171fc9db9f3a8f06e83527de6 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Mon, 12 May 2025 12:14:52 -0500 Subject: [PATCH 02/13] Add AWS rules engine extension --- .../core/settings/AccountIdSetting.java | 29 ++++ .../core/settings/EndpointSettings.java | 59 +++++++ .../core/settings/S3EndpointSettings.java | 110 +++++++++++++ .../core/settings/StsEndpointSettings.java | 31 ++++ .../aws-client-rulesengine/build.gradle.kts | 14 ++ .../client/rulesengine/AwsRulesBuiltin.java | 154 ++++++++++++++++++ .../client/rulesengine/AwsRulesExtension.java | 32 ++++ .../client/rulesengine/AwsRulesFunction.java | 139 ++++++++++++++++ ...thy.java.client.rulesengine.RulesExtension | 1 + .../aws/client/rulesengine/RunnerTest.java | 10 ++ client/client-rulesengine/build.gradle.kts | 2 +- settings.gradle.kts | 1 + 12 files changed, 581 insertions(+), 1 deletion(-) create mode 100644 aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/AccountIdSetting.java create mode 100644 aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/EndpointSettings.java create mode 100644 aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/S3EndpointSettings.java create mode 100644 aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/StsEndpointSettings.java create mode 100644 aws/client/aws-client-rulesengine/build.gradle.kts create mode 100644 aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesBuiltin.java create mode 100644 aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesExtension.java create mode 100644 aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java create mode 100644 aws/client/aws-client-rulesengine/src/main/resources/META-INF/resources/software.amazon.smithy.java.client.rulesengine.RulesExtension create mode 100644 aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/RunnerTest.java diff --git a/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/AccountIdSetting.java b/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/AccountIdSetting.java new file mode 100644 index 000000000..7baa30f04 --- /dev/null +++ b/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/AccountIdSetting.java @@ -0,0 +1,29 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.core.settings; + +import software.amazon.smithy.java.client.core.ClientSetting; +import software.amazon.smithy.java.context.Context; + +/** + * Configures an AWS Account ID. + */ +public interface AccountIdSetting> extends RegionSetting { + /** + * AWS Account ID to use. + */ + Context.Key AWS_ACCOUNT_ID = Context.key("AWS Account ID"); + + /** + * Sets the AWS Account ID. + * + * @param awsAccountId AWS account ID to set. + * @return self + */ + default B awsAccountId(String awsAccountId) { + return putConfig(AWS_ACCOUNT_ID, awsAccountId); + } +} diff --git a/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/EndpointSettings.java b/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/EndpointSettings.java new file mode 100644 index 000000000..5f8a00eb6 --- /dev/null +++ b/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/EndpointSettings.java @@ -0,0 +1,59 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.core.settings; + +import software.amazon.smithy.java.client.core.ClientSetting; +import software.amazon.smithy.java.context.Context; + +/** + * Configures AWS specific endpoint settings. + */ +public interface EndpointSettings> extends RegionSetting, AccountIdSetting { + /** + * If the SDK client is configured to use dual stack endpoints, defaults to false. + */ + Context.Key USE_DUAL_STACK = Context.key("Whether to use dual stack endpoint"); + + /** + * If the SDK client is configured to use FIPS-compliant endpoints, defaults to false. + */ + Context.Key USE_FIPS = Context.key("Whether to use FIPS endpoints"); + + /** + * The mode used when resolving Account ID based endpoints. + */ + Context.Key ACCOUNT_ID_ENDPOINT_MODE = Context.key("Account ID endpoint mode"); + + /** + * Configures if the SDK uses dual stack endpoints. Defaults to false. + * + * @param useDualStack True to enable dual stack. + * @return self + */ + default B useDualStackEndpoint(boolean useDualStack) { + return putConfig(USE_DUAL_STACK, useDualStack); + } + + /** + * Configures if the SDK uses FIPS endpoints. Defaults to false. + * + * @param useFips True to enable FIPS endpoints. + * @return self + */ + default B useFipsEndpoint(boolean useFips) { + return putConfig(USE_FIPS, useFips); + } + + /** + * Sets the account ID endpoint mode for endpoint resolution. + * + * @param accountIdEndpointMode Account ID based endpoint resolution mode. + * @return self + */ + default B accountIdEndpointMode(String accountIdEndpointMode) { + return putConfig(ACCOUNT_ID_ENDPOINT_MODE, accountIdEndpointMode); + } +} diff --git a/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/S3EndpointSettings.java b/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/S3EndpointSettings.java new file mode 100644 index 000000000..0746aed53 --- /dev/null +++ b/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/S3EndpointSettings.java @@ -0,0 +1,110 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.core.settings; + +import software.amazon.smithy.java.client.core.ClientSetting; +import software.amazon.smithy.java.context.Context; + +/** + * Configures AWS specific endpoint settings. + */ +public interface S3EndpointSettings> extends EndpointSettings { + /** + * If the SDK client is configured to use S3 transfer acceleration, defaults to false. + */ + Context.Key S3_ACCELERATE = Context.key("AWS::S3::Accelerate"); + + /** + * If the SDK client is configured to not use S3's multi-region access points, defaults to false. + */ + Context.Key S3_DISABLE_MULTI_REGION_ACCESS_POINTS = Context.key("AWS::S3::DisableMultiRegionAccessPoints"); + + /** + * If the SDK client is configured to use solely S3 path style routing, defaults to false. + */ + Context.Key S3_FORCE_PATH_STYLE = Context.key("AWS::S3::ForcePathStyle"); + + /** + * If the SDK client is configured to use S3 bucket ARN regions or raise an error when the bucket ARN and client + * region differ, defaults to true. + */ + Context.Key S3_USE_ARN_REGION = Context.key("AWS::S3::UseArnRegion"); + + /** + * If the SDK client is configured to use S3's global endpoint instead of the regional us-east-1 endpoint, + * defaults to false. + */ + Context.Key S3_USE_GLOBAL_ENDPOINT = Context.key("AWS::S3::UseGlobalEndpoint"); + + /** + * If the SDK client is configured to use S3 Control bucket ARN regions or raise an error when the bucket ARN + * and client region differ, defaults to true. + */ + Context.Key S3_CONTROL_USE_ARN_REGION = Context.key("AWS::S3Control::UseArnRegion"); + + /** + * Configures if the SDK client is configured to use S3 transfer acceleration, defaults to false. + * + * @param useS3Accelerate True to enable. + * @return self + */ + default B s3useAccelerate(boolean useS3Accelerate) { + return putConfig(S3_ACCELERATE, useS3Accelerate); + } + + /** + * If the SDK client is configured to not use S3's multi-region access points, defaults to false. + * + * @param value True to disable MRAP. + * @return self + */ + default B s3disableMultiRegionAccessPoints(boolean value) { + return putConfig(S3_DISABLE_MULTI_REGION_ACCESS_POINTS, value); + } + + /** + * If the SDK client is configured to use solely S3 path style routing, defaults to false. + * + * @param usePathStyle True to force path style. + * @return self + */ + default B s3forcePathStyle(boolean usePathStyle) { + return putConfig(S3_FORCE_PATH_STYLE, usePathStyle); + } + + /** + * If the SDK client is configured to use S3 bucket ARN regions or raise an error when the bucket ARN and client + * region differ, defaults to true. + * + * @param useArnRegion True to use ARN region. + * @return self + */ + default B s3useArnRegion(boolean useArnRegion) { + return putConfig(S3_USE_ARN_REGION, useArnRegion); + } + + /** + * If the SDK client is configured to use S3's global endpoint instead of the regional us-east-1 endpoint, + * defaults to false. + * + * @param useGlobalEndpoint True to enable global endpoint. + * @return self + */ + default B s3useGlobalEndpoint(boolean useGlobalEndpoint) { + return putConfig(S3_USE_GLOBAL_ENDPOINT, useGlobalEndpoint); + } + + /** + * If the SDK client is configured to use S3 Control bucket ARN regions or raise an error when the bucket ARN + * and client region differ, defaults to true. + * + * @param useArnRegion True to enable S3 control ARN region. + * @return self + */ + default B s3controlUseArnRegion(boolean useArnRegion) { + return putConfig(S3_CONTROL_USE_ARN_REGION, useArnRegion); + } +} diff --git a/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/StsEndpointSettings.java b/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/StsEndpointSettings.java new file mode 100644 index 000000000..a0d0ef09e --- /dev/null +++ b/aws/client/aws-client-core/src/main/java/software/amazon/smithy/java/aws/client/core/settings/StsEndpointSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.core.settings; + +import software.amazon.smithy.java.client.core.ClientSetting; +import software.amazon.smithy.java.context.Context; + +/** + * Configures AWS specific endpoint settings. + */ +public interface StsEndpointSettings> extends EndpointSettings { + /** + * If the SDK client is configured to use STS' global endpoint instead of the regional us-east-1 endpoint, + * defaults to false. + */ + Context.Key STS_USE_GLOBAL_ENDPOINT = Context.key("AWS::STS::UseGlobalEndpoint"); + + /** + * Configures if if the SDK client is configured to use STS' global endpoint instead of the regional us-east-1 + * endpoint, defaults to false. + * + * @param useGlobalEndpoint True to enable global endpoints. + * @return self + */ + default B stsUseGlobalEndpoint(boolean useGlobalEndpoint) { + return putConfig(STS_USE_GLOBAL_ENDPOINT, useGlobalEndpoint); + } +} diff --git a/aws/client/aws-client-rulesengine/build.gradle.kts b/aws/client/aws-client-rulesengine/build.gradle.kts new file mode 100644 index 000000000..fc4df8f98 --- /dev/null +++ b/aws/client/aws-client-rulesengine/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + id("smithy-java.module-conventions") +} + +description = "This module provides AWS-Specific client rules engine functionality" + +extra["displayName"] = "Smithy :: Java :: AWS :: Client :: Rules Engine" +extra["moduleName"] = "software.amazon.smithy.java.aws.client.rulesengine" + +dependencies { + api(project(":aws:client:aws-client-core")) + api(project(":client:client-rulesengine")) + api(libs.smithy.aws.endpoints) +} diff --git a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesBuiltin.java b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesBuiltin.java new file mode 100644 index 000000000..e5ecb1f45 --- /dev/null +++ b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesBuiltin.java @@ -0,0 +1,154 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.rulesengine; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.function.Function; +import software.amazon.smithy.java.aws.auth.api.identity.AwsCredentialsIdentity; +import software.amazon.smithy.java.aws.client.core.settings.AccountIdSetting; +import software.amazon.smithy.java.aws.client.core.settings.EndpointSettings; +import software.amazon.smithy.java.aws.client.core.settings.RegionSetting; +import software.amazon.smithy.java.aws.client.core.settings.S3EndpointSettings; +import software.amazon.smithy.java.aws.client.core.settings.StsEndpointSettings; +import software.amazon.smithy.java.client.core.CallContext; +import software.amazon.smithy.java.context.Context; + +/** + * AWS built-ins. + * + * @link AWS built-ins + */ +enum AwsRulesBuiltin implements Function { + REGION("AWS::Region") { + @Override + public Object apply(Context ctx) { + return ctx.get(RegionSetting.REGION); + } + }, + + USE_DUAL_STACK("AWS::UseDualStack") { + @Override + public Object apply(Context ctx) { + return ctx.get(EndpointSettings.USE_DUAL_STACK); + } + }, + + USE_FIPS("AWS::UseFIPS") { + @Override + public Object apply(Context ctx) { + return ctx.get(EndpointSettings.USE_FIPS); + } + }, + + AWS_AUTH_ACCOUNT_ID("AWS::Auth::AccountId") { + @Override + public Object apply(Context ctx) { + var result = ctx.get(AccountIdSetting.AWS_ACCOUNT_ID); + if (result != null) { + return result; + } + if (ctx.get(CallContext.IDENTITY) instanceof AwsCredentialsIdentity awsIdentity) { + return awsIdentity.accountId(); + } + return null; + } + }, + + AWS_AUTH_ACCOUNT_ID_ENDPOINT_MODE("AWS::Auth::AccountIdEndpointMode") { + @Override + public Object apply(Context ctx) { + return ctx.get(EndpointSettings.ACCOUNT_ID_ENDPOINT_MODE); + } + }, + + AWS_AUTH_CREDENTIAL_SCOPE("AWS::Auth::CredentialScope") { + @Override + public Object apply(Context ctx) { + // TODO + throw new UnsupportedOperationException("Not yet implemented: " + this); + } + }, + + AWS_S3_ACCELERATE("AWS::S3::Accelerate") { + @Override + public Object apply(Context context) { + return context.get(S3EndpointSettings.S3_ACCELERATE); + } + }, + + AWS_S3_DISABLE_MULTI_REGION_ACCESS_POINTS("AWS::S3::DisableMultiRegionAccessPoints") { + @Override + public Object apply(Context context) { + return context.get(S3EndpointSettings.S3_DISABLE_MULTI_REGION_ACCESS_POINTS); + } + }, + + AWS_S3_FORCE_PATH_STYLE("AWS::S3::ForcePathStyle") { + @Override + public Object apply(Context context) { + return context.get(S3EndpointSettings.S3_FORCE_PATH_STYLE); + } + }, + + AWS_S3_USE_ARN_REGION("AWS::S3::UseArnRegion") { + @Override + public Object apply(Context context) { + return context.get(S3EndpointSettings.S3_USE_ARN_REGION); + } + }, + + AWS_S3_USE_GLOBAL_ENDPOINT("AWS::S3::UseGlobalEndpoint") { + @Override + public Object apply(Context context) { + return context.get(S3EndpointSettings.S3_USE_GLOBAL_ENDPOINT); + } + }, + + AWS_S3_CONTROL_USE_ARN_REGION("AWS::S3Control::UseArnRegion") { + @Override + public Object apply(Context context) { + return context.get(S3EndpointSettings.S3_CONTROL_USE_ARN_REGION); + } + }, + + AWS_STS_USE_GLOBAL_ENDPOINT("AWS::STS::UseGlobalEndpoint") { + @Override + public Object apply(Context context) { + return context.get(StsEndpointSettings.STS_USE_GLOBAL_ENDPOINT); + } + }; + + static final BiFunction BUILTIN_PROVIDER = new BuiltinProvider(); + + private static final class BuiltinProvider implements BiFunction { + private final Map> providers = new HashMap<>(); + + private BuiltinProvider() { + for (var e : values()) { + providers.put(e.name, e); + } + } + + @Override + public Object apply(String name, Context context) { + var match = providers.get(name); + return match == null ? null : match.apply(context); + } + } + + private final String name; + + AwsRulesBuiltin(String name) { + this.name = name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesExtension.java b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesExtension.java new file mode 100644 index 000000000..92210ebcb --- /dev/null +++ b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesExtension.java @@ -0,0 +1,32 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.rulesengine; + +import java.util.Arrays; +import java.util.List; +import java.util.function.BiFunction; +import software.amazon.smithy.java.client.rulesengine.RulesExtension; +import software.amazon.smithy.java.client.rulesengine.RulesFunction; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.utils.SmithyUnstableApi; + +/** + * Adds AWS-specific functionality to the Smithy Rules engines, used to resolve endpoints. + * + * @link AWS rules engine extensions + */ +@SmithyUnstableApi +public class AwsRulesExtension implements RulesExtension { + @Override + public BiFunction getBuiltinProvider() { + return AwsRulesBuiltin.BUILTIN_PROVIDER; + } + + @Override + public List getFunctions() { + return Arrays.asList(AwsRulesFunction.values()); + } +} diff --git a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java new file mode 100644 index 000000000..b23abf36e --- /dev/null +++ b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java @@ -0,0 +1,139 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.rulesengine; + +import java.util.AbstractMap; +import java.util.Map; +import java.util.Set; +import software.amazon.smithy.java.client.rulesengine.RulesFunction; +import software.amazon.smithy.rulesengine.aws.language.functions.AwsArn; +import software.amazon.smithy.rulesengine.aws.language.functions.AwsPartition; +import software.amazon.smithy.rulesengine.aws.language.functions.IsVirtualHostableS3Bucket; +import software.amazon.smithy.rulesengine.aws.language.functions.ParseArn; +import software.amazon.smithy.rulesengine.aws.language.functions.partition.Partition; + +/** + * Implements AWS rules engine functions. + * + * @link AWS rules engine functions + */ +enum AwsRulesFunction implements RulesFunction { + AWS_PARTITION("aws.partition", 1) { + @Override + public Object apply1(Object arg1) { + String region = (String) arg1; + var partition = AwsPartition.findPartition(region); + if (partition == null) { + return null; + } + return new PartitionMap(partition); + } + + // Convert AwsPartition to the map structure used in the rules engine. + // Most of the entries aren't needed for evaluating rules, so map entries are created lazily (something that + // isn't needed when evaluating rules), and accessing map values is done using a switch (something that is + // essentially compiled into a map lookup via a lookupswitch). + private static final class PartitionMap extends AbstractMap { + private final Partition partition; + private Set> entrySet; + + private PartitionMap(Partition partition) { + this.partition = partition; + } + + @Override + public int size() { + return 6; + } + + @Override + public Set> entrySet() { + var result = entrySet; + if (result == null) { + result = Set.of( + Map.entry("name", partition.getId()), + Map.entry("dnsSuffix", partition.getOutputs().getDnsSuffix()), + Map.entry("dualStackDnsSuffix", partition.getOutputs().getDualStackDnsSuffix()), + Map.entry("supportsFIPS", partition.getOutputs().supportsFips()), + Map.entry("supportsDualStack", partition.getOutputs().supportsDualStack()), + Map.entry("implicitGlobalRegion", partition.getOutputs().getImplicitGlobalRegion())); + entrySet = result; + } + return result; + } + + @Override + public Object get(Object key) { + if (key instanceof String s) { + return switch (s) { + case "name" -> partition.getId(); + case "dnsSuffix" -> partition.getOutputs().getDnsSuffix(); + case "dualStackDnsSuffix" -> partition.getOutputs().getDualStackDnsSuffix(); + case "supportsFIPS" -> partition.getOutputs().supportsFips(); + case "supportsDualStack" -> partition.getOutputs().supportsDualStack(); + case "implicitGlobalRegion" -> partition.getOutputs().getImplicitGlobalRegion(); + default -> null; + }; + } + return null; + } + } + }, + + AWS_PARSE_ARN("aws.parseArn", 1) { + @Override + public Object apply1(Object arg1) { + String value = (String) arg1; + var awsArn = AwsArn.parse(value).orElse(null); + if (awsArn == null) { + return null; + } + return Map.of( + ParseArn.PARTITION, + awsArn.getPartition(), + ParseArn.SERVICE, + awsArn.getService(), + ParseArn.REGION, + awsArn.getRegion(), + ParseArn.ACCOUNT_ID, + awsArn.getAccountId(), + "resourceId", // TODO: make this one public too in Smithy + awsArn.getResource()); + } + }, + + AWS_IS_VIRTUAL_HOSTED_BUCKET("aws.isVirtualHostableS3Bucket", 2) { + @Override + public Object apply2(Object arg1, Object arg2) { + var hostLabel = (String) arg1; + var allowDots = arg2 != null && (boolean) arg2; + return IsVirtualHostableS3Bucket.isVirtualHostableBucket(hostLabel, allowDots); + } + }; + + private final String name; + private final int operands; + + AwsRulesFunction(String name, int operands) { + this.name = name; + this.operands = operands; + } + + @Override + public String toString() { + return name; + } + + @Override + public int getOperandCount() { + return operands; + } + + @Override + public String getFunctionName() { + return name; + } +} diff --git a/aws/client/aws-client-rulesengine/src/main/resources/META-INF/resources/software.amazon.smithy.java.client.rulesengine.RulesExtension b/aws/client/aws-client-rulesengine/src/main/resources/META-INF/resources/software.amazon.smithy.java.client.rulesengine.RulesExtension new file mode 100644 index 000000000..4f2018b5e --- /dev/null +++ b/aws/client/aws-client-rulesengine/src/main/resources/META-INF/resources/software.amazon.smithy.java.client.rulesengine.RulesExtension @@ -0,0 +1 @@ +software.amazon.smithy.java.aws.client.rulesengine.AwsRulesExtension diff --git a/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/RunnerTest.java b/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/RunnerTest.java new file mode 100644 index 000000000..3c8295570 --- /dev/null +++ b/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/RunnerTest.java @@ -0,0 +1,10 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.rulesengine; + +public class RunnerTest { + // TODO +} diff --git a/client/client-rulesengine/build.gradle.kts b/client/client-rulesengine/build.gradle.kts index 1a2bfe665..4f229f8c4 100644 --- a/client/client-rulesengine/build.gradle.kts +++ b/client/client-rulesengine/build.gradle.kts @@ -10,7 +10,7 @@ extra["moduleName"] = "software.amazon.smithy.java.client.endpointrules" dependencies { api(project(":client:client-core")) - implementation(libs.smithy.rules) + api(libs.smithy.rules) implementation(project(":logging")) } diff --git a/settings.gradle.kts b/settings.gradle.kts index 49234aaa7..c59ebac91 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -75,6 +75,7 @@ include(":aws:client:aws-client-core") include(":aws:client:aws-client-http") include(":aws:client:aws-client-restjson") include(":aws:client:aws-client-restxml") +include(":aws:client:aws-client-rulesengine") include(":aws:integrations:aws-lambda-endpoint") include(":aws:server:aws-server-restjson") include(":aws:aws-auth-api") From 8888b9fdb6ccfa61c31644d9f482a46fc7b63124 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Thu, 15 May 2025 10:21:27 -0500 Subject: [PATCH 03/13] Add context param providers --- client/client-rulesengine/build.gradle.kts | 4 + .../client/rulesengine/ContextProvider.java | 172 ++++++++++++++++ .../rulesengine/EndpointRulesResolver.java | 46 +---- .../client/rulesengine/EndpointUtils.java | 28 ++- .../EndpointRulesResolverTest.java | 4 +- .../client/rulesengine/EndpointUtilsTest.java | 4 +- .../client/rulesengine/RulesCompilerTest.java | 90 +++++++- .../rulesengine/runner/default-values.smithy | 21 +- .../runner/ruleset-with-params.smithy | 193 ++++++++++++++++++ 9 files changed, 487 insertions(+), 75 deletions(-) create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java create mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/ruleset-with-params.smithy diff --git a/client/client-rulesengine/build.gradle.kts b/client/client-rulesengine/build.gradle.kts index 4f229f8c4..d27ff49bd 100644 --- a/client/client-rulesengine/build.gradle.kts +++ b/client/client-rulesengine/build.gradle.kts @@ -10,8 +10,12 @@ extra["moduleName"] = "software.amazon.smithy.java.client.endpointrules" dependencies { api(project(":client:client-core")) + api(project(":jmespath")) api(libs.smithy.rules) implementation(project(":logging")) + + testImplementation(project(":aws:client:aws-client-awsjson")) + testImplementation(project(":client:dynamic-client")) } jmh { diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java new file mode 100644 index 000000000..ccd484aae --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java @@ -0,0 +1,172 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import software.amazon.smithy.java.core.schema.ApiOperation; +import software.amazon.smithy.java.core.schema.Schema; +import software.amazon.smithy.java.core.schema.SerializableStruct; +import software.amazon.smithy.java.core.serde.document.Document; +import software.amazon.smithy.java.jmespath.JMESPathDocumentQuery; +import software.amazon.smithy.jmespath.JmespathExpression; +import software.amazon.smithy.model.shapes.ShapeId; + +/** + * Provides context parameters from operations using {@code smithy.rules#contextParam}, + * {@code smithy.rules#operationContextParams}, and {@code smithy.rules#staticContextParams} traits. + * + *

The results of finding operation context parameters from an operation are cached and reused over the life of + * a client per/operation. + */ +sealed interface ContextProvider { + + void addContext(ApiOperation operation, SerializableStruct input, Map params); + + final class OrchestratingProvider implements ContextProvider { + private final ConcurrentMap PROVIDERS = new ConcurrentHashMap<>(); + + @Override + public void addContext(ApiOperation operation, SerializableStruct input, Map params) { + var provider = PROVIDERS.get(operation.schema().id()); + if (provider == null) { + provider = createProvider(operation); + var fresh = PROVIDERS.putIfAbsent(operation.schema().id(), provider); + if (fresh != null) { + provider = fresh; + } + } + provider.addContext(operation, input, params); + } + + private ContextProvider createProvider(ApiOperation operation) { + List providers = new ArrayList<>(); + var operationSchema = operation.schema(); + var inputSchema = operation.inputSchema(); + ContextParamProvider.compute(providers, inputSchema); + ContextPathProvider.compute(providers, operationSchema); + StaticParamsProvider.compute(providers, operationSchema); // overrides everything else + return MultiContextParamProvider.from(providers); + } + } + + // Find the smithy.rules#staticContextParams on the operation. + final class StaticParamsProvider implements ContextProvider { + private final Map params; + + StaticParamsProvider(Map params) { + this.params = params; + } + + @Override + public void addContext(ApiOperation operation, SerializableStruct input, Map params) { + params.putAll(this.params); + } + + static void compute(List providers, Schema operation) { + var staticParamsTrait = operation.getTrait(EndpointRulesPlugin.STATIC_CONTEXT_PARAMS_TRAIT); + if (staticParamsTrait == null) { + return; + } + + Map result = new HashMap<>(staticParamsTrait.getParameters().size()); + for (var entry : staticParamsTrait.getParameters().entrySet()) { + result.put(entry.getKey(), EndpointUtils.convertNode(entry.getValue().getValue())); + } + + providers.add(new StaticParamsProvider(result)); + } + } + + // Find smithy.rules#contextParam trait on operation input members. + final class ContextParamProvider implements ContextProvider { + private final Schema member; + private final String name; + + ContextParamProvider(Schema member, String name) { + this.member = member; + this.name = name; + } + + @Override + public void addContext(ApiOperation operation, SerializableStruct input, Map params) { + var value = input.getMemberValue(member); + if (value != null) { + params.put(name, value); + } + } + + static void compute(List providers, Schema inputSchema) { + for (var member : inputSchema.members()) { + var ctxTrait = member.getTrait(EndpointRulesPlugin.CONTEXT_PARAM_TRAIT); + if (ctxTrait != null) { + providers.add(new ContextParamProvider(member, ctxTrait.getName())); + } + } + } + } + + // Find the smithy.rules#operationContextParams trait on the operation and each JMESPath to extract. + // TODO: I wish we didn't have to convert input to a document and could use the struct directly. + // We'd need to add a new code path to the jmespath module, something like JMESPathStructQuery. + final class ContextPathProvider implements ContextProvider { + + private final String name; + private final JmespathExpression jp; + + ContextPathProvider(String name, JmespathExpression jp) { + this.name = name; + this.jp = jp; + } + + @Override + public void addContext(ApiOperation operation, SerializableStruct input, Map params) { + var doc = Document.of(input); + var result = JMESPathDocumentQuery.query(jp, doc); + if (result != null) { + params.put(name, result.asObject()); + } + } + + static void compute(List providers, Schema operation) { + var params = operation.getTrait(EndpointRulesPlugin.OPERATION_CONTEXT_PARAMS_TRAIT); + if (params == null) { + return; + } + + for (var param : params.getParameters().entrySet()) { + var name = param.getKey(); + var path = param.getValue().getPath(); + var jp = JmespathExpression.parse(path); + providers.add(new ContextPathProvider(name, jp)); + } + } + } + + // Applies multiple context providers. + final class MultiContextParamProvider implements ContextProvider { + private final List providers; + + MultiContextParamProvider(List providers) { + this.providers = providers; + } + + static ContextProvider from(List providers) { + return providers.size() == 1 ? providers.get(0) : new MultiContextParamProvider(providers); + } + + @Override + public void addContext(ApiOperation operation, SerializableStruct input, Map params) { + for (ContextProvider provider : providers) { + provider.addContext(operation, input, params); + } + } + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java index c65ef0570..a66924017 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java @@ -8,13 +8,11 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; import software.amazon.smithy.java.client.core.endpoint.Endpoint; import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; -import software.amazon.smithy.java.core.schema.Schema; -import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.java.core.schema.ApiOperation; +import software.amazon.smithy.java.core.schema.SerializableStruct; /** * Endpoint resolver that uses the endpoint rules engine. @@ -22,7 +20,7 @@ final class EndpointRulesResolver implements EndpointResolver { private final RulesProgram program; - private final ConcurrentMap> STATIC_PARAMS = new ConcurrentHashMap<>(); + private final ContextProvider operationContextParams = new ContextProvider.OrchestratingProvider(); EndpointRulesResolver(RulesProgram program) { this.program = program; @@ -30,45 +28,17 @@ final class EndpointRulesResolver implements EndpointResolver { @Override public CompletableFuture resolveEndpoint(EndpointResolverParams params) { - var operation = params.operation().schema(); - var endpointParams = createEndpointParams(operation); - try { + var endpointParams = createEndpointParams(params.operation(), params.inputValue()); return CompletableFuture.completedFuture(program.resolveEndpoint(params.context(), endpointParams)); } catch (RulesEvaluationError e) { return CompletableFuture.failedFuture(e); } } - private Map createEndpointParams(Schema operation) { - var staticParams = getStaticParams(operation); - // TODO: Grab input from RulesEnginePlugin.OPERATION_CONTEXT_PARAMS_TRAIT - // TODO: Grab input from RulesEnginePlugin.CONTEXT_PARAM_TRAIT - return new HashMap<>(staticParams); - } - - private Map getStaticParams(Schema operation) { - var id = operation.id(); - var staticParams = STATIC_PARAMS.get(id); - if (staticParams != null) { - return staticParams; - } else { - staticParams = computeStaticParams(operation); - var fresh = STATIC_PARAMS.putIfAbsent(id, staticParams); - return fresh == null ? staticParams : fresh; - } - } - - private Map computeStaticParams(Schema operation) { - var staticParamsTrait = operation.getTrait(EndpointRulesPlugin.STATIC_CONTEXT_PARAMS_TRAIT); - if (staticParamsTrait == null) { - return Map.of(); - } - - Map result = new HashMap<>(staticParamsTrait.getParameters().size()); - for (var entry : staticParamsTrait.getParameters().entrySet()) { - result.put(entry.getKey(), EndpointUtils.convertNodeInput(entry.getValue().getValue())); - } - return result; + private Map createEndpointParams(ApiOperation operation, SerializableStruct input) { + Map params = new HashMap<>(); + operationContextParams.addContext(operation, input, params); + return params; } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java index 8c6dd07d4..4e5e35606 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java @@ -13,6 +13,8 @@ import software.amazon.smithy.model.node.ArrayNode; import software.amazon.smithy.model.node.BooleanNode; import software.amazon.smithy.model.node.Node; +import software.amazon.smithy.model.node.NumberNode; +import software.amazon.smithy.model.node.ObjectNode; import software.amazon.smithy.model.node.StringNode; import software.amazon.smithy.rulesengine.language.evaluation.value.ArrayValue; import software.amazon.smithy.rulesengine.language.evaluation.value.BooleanValue; @@ -28,7 +30,7 @@ final class EndpointUtils { private EndpointUtils() {} // "The type of the value MUST be either a string, boolean or an array of string." - static Object convertNodeInput(Node value) { + static Object convertNode(Node value, boolean allowAllTypes) { if (value instanceof StringNode s) { return s.getValue(); } else if (value instanceof BooleanNode b) { @@ -36,12 +38,30 @@ static Object convertNodeInput(Node value) { } else if (value instanceof ArrayNode a) { List result = new ArrayList<>(a.size()); for (var e : a.getElements()) { - result.add(convertNodeInput(e)); + result.add(convertNode(e, allowAllTypes)); } return result; - } else { - throw new RulesEvaluationError("Unsupported endpoint ruleset parameter: " + value); + } else if (allowAllTypes) { + if (value instanceof NumberNode n) { + return n.getValue(); + } else if (value instanceof ObjectNode o) { + var result = new HashMap(o.size()); + for (var e : o.getStringMap().entrySet()) { + result.put(e.getKey(), convertNode(e.getValue(), allowAllTypes)); + } + return result; + } else if (value.isNullNode()) { + return null; + } else { + throw new RulesEvaluationError("Unsupported endpoint ruleset parameter type: " + value); + } } + + throw new RulesEvaluationError("Unsupported endpoint ruleset parameter: " + value); + } + + static Object convertNode(Node value) { + return convertNode(value, false); } static Object convertInputParamValue(Value value) { diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java index e496b6250..42c8277b3 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java @@ -102,12 +102,12 @@ public Schema schema() { @Override public Schema inputSchema() { - return null; + return Schema.structureBuilder(ShapeId.from("smithy.example#FooInput")).build(); } @Override public Schema outputSchema() { - return null; + return Schema.structureBuilder(ShapeId.from("smithy.example#FooOutput")).build(); } @Override diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java index b0530c6b1..e392f61f1 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java @@ -136,7 +136,7 @@ public void getsUriParts() throws Exception { @ParameterizedTest @MethodSource("convertsNodeInputsProvider") void convertsNodeInputs(Node value, Object object) { - var converted = EndpointUtils.convertNodeInput(value); + var converted = EndpointUtils.convertNode(value); assertThat(converted, equalTo(object)); } @@ -152,6 +152,6 @@ public static List convertsNodeInputsProvider() { @Test public void throwsOnUnsupportNodeInput() { - Assertions.assertThrows(RulesEvaluationError.class, () -> EndpointUtils.convertNodeInput(Node.from(1))); + Assertions.assertThrows(RulesEvaluationError.class, () -> EndpointUtils.convertNode(Node.from(1))); } } diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java index edb0f01f3..536000c19 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java @@ -19,12 +19,22 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +import software.amazon.smithy.java.aws.client.awsjson.AwsJson1Protocol; +import software.amazon.smithy.java.client.core.CallContext; +import software.amazon.smithy.java.client.core.RequestOverrideConfig; +import software.amazon.smithy.java.client.core.auth.scheme.AuthSchemeResolver; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; import software.amazon.smithy.java.client.core.endpoint.EndpointContext; +import software.amazon.smithy.java.client.core.interceptors.ClientInterceptor; +import software.amazon.smithy.java.client.core.interceptors.RequestHook; import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.core.serde.document.Document; +import software.amazon.smithy.java.dynamicclient.DynamicClient; import software.amazon.smithy.model.Model; import software.amazon.smithy.model.shapes.ServiceShape; import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; +import software.amazon.smithy.rulesengine.traits.EndpointTestCase; import software.amazon.smithy.rulesengine.traits.EndpointTestsTrait; public class RulesCompilerTest { @@ -42,28 +52,43 @@ public void testRunner(Path modelFile) { var plugin = EndpointRulesPlugin.from(program); var testCases = service.expectTrait(EndpointTestsTrait.class); + var client = DynamicClient.builder() + .model(model) + .service(service.getId()) + .protocol(new AwsJson1Protocol(service.getId())) + .authSchemeResolver(AuthSchemeResolver.NO_AUTH) + .addPlugin(plugin) + .build(); + for (var test : testCases.getTestCases()) { var testParams = test.getParams(); var ctx = Context.create(); Map input = new HashMap<>(); for (var entry : testParams.getStringMap().entrySet()) { - input.put(entry.getKey(), EndpointUtils.convertNodeInput(entry.getValue())); + input.put(entry.getKey(), EndpointUtils.convertNode(entry.getValue())); } var expected = test.getExpect(); expected.getEndpoint().ifPresent(expectedEndpoint -> { - var result = plugin.getProgram().resolveEndpoint(ctx, input); - assertThat(result.uri().toString(), equalTo(expectedEndpoint.getUrl())); - var actualHeaders = result.property(EndpointContext.HEADERS); - if (expectedEndpoint.getHeaders().isEmpty()) { - assertThat(actualHeaders, nullValue()); - } else { - assertThat(actualHeaders, equalTo(expectedEndpoint.getHeaders())); + try { + var result = resolveEndpoint(test, client, plugin, ctx, input); + assertThat(result.uri().toString(), equalTo(expectedEndpoint.getUrl())); + var actualHeaders = result.property(EndpointContext.HEADERS); + if (expectedEndpoint.getHeaders().isEmpty()) { + assertThat(actualHeaders, nullValue()); + } else { + assertThat(actualHeaders, equalTo(expectedEndpoint.getHeaders())); + } + // TODO: validate properties too. + } catch (RulesEvaluationError e) { + Assertions.fail("Expected ruleset to succeed: " + + modelFile + " : " + + test.getDocumentation() + + " : " + e, e); } - // TODO: validate properties too. }); expected.getError().ifPresent(expectedError -> { try { - var result = plugin.getProgram().resolveEndpoint(ctx, input); + var result = resolveEndpoint(test, client, plugin, ctx, input); Assertions.fail("Expected ruleset to fail: " + modelFile + " : " + test.getDocumentation() + ", but resolved " + result); } catch (RulesEvaluationError e) { @@ -73,6 +98,51 @@ public void testRunner(Path modelFile) { } } + private Endpoint resolveEndpoint( + EndpointTestCase test, + DynamicClient client, + EndpointRulesPlugin plugin, + Context ctx, + Map input + ) { + // Supports a single operations inputs + if (test.getOperationInputs().isEmpty()) { + return plugin.getProgram().resolveEndpoint(ctx, input); + } + + // The rules have operation input params, so simulate sending an operation. + var inputs = test.getOperationInputs().get(0); + var name = inputs.getOperationName(); + var inputParams = EndpointUtils.convertNode(inputs.getOperationParams(), true); + var resolvedEndpoint = new Endpoint[1]; + var override = RequestOverrideConfig.builder() + .addInterceptor(new ClientInterceptor() { + @Override + public void readBeforeTransmit(RequestHook hook) { + resolvedEndpoint[0] = hook.context().get(CallContext.ENDPOINT); + throw new RulesEvaluationError("foo"); + } + }); + + if (!inputs.getBuiltInParams().isEmpty()) { + inputs.getBuiltInParams().getStringMember("SDK::Endpoint").ifPresent(value -> { + override.putConfig(CallContext.ENDPOINT, Endpoint.builder().uri(value.getValue()).build()); + }); + } + + try { + var document = Document.ofObject(inputParams); + client.call(name, document, override.build()); + throw new RuntimeException("Expected exception"); + } catch (RulesEvaluationError e) { + if (e.getMessage().equals("foo")) { + return resolvedEndpoint[0]; + } else { + throw e; + } + } + } + public static List testCaseProvider() throws Exception { List result = new ArrayList<>(); var baseUri = RulesCompilerTest.class.getResource("runner").toURI(); diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy index f137a1872..6a30afbd7 100644 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy @@ -24,13 +24,6 @@ use smithy.rules#staticContextParams required: true default: "baz" }, - endpoint: { - type: "string", - builtIn: "SDK::Endpoint", - required: true, - default: "asdf" - documentation: "docs" - }, stringArrayParam: { type: "stringArray", required: true, @@ -87,15 +80,10 @@ use smithy.rules#staticContextParams "version": "1.0", "testCases": [ { + "documentation": "a b" "params": { "bar": "a b", } - "operationInputs": [{ - "operationName": "GetThing", - "builtInParams": { - "SDK::Endpoint": "https://custom.example.com" - } - }], "expect": { "endpoint": { "url": "https://example.com/baz" @@ -103,16 +91,11 @@ use smithy.rules#staticContextParams } }, { + "documentation": "BIG" "params": { "bar": "a b", "baz": "BIG" } - "operationInputs": [{ - "operationName": "GetThing", - "builtInParams": { - "SDK::Endpoint": "https://custom.example.com" - } - }], "expect": { "endpoint": { "url": "https://example.com/BIG" diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/ruleset-with-params.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/ruleset-with-params.smithy new file mode 100644 index 000000000..8fb8a0f26 --- /dev/null +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/ruleset-with-params.smithy @@ -0,0 +1,193 @@ +$version: "1.0" + +namespace example + +use smithy.rules#contextParam +use smithy.rules#endpointRuleSet +use smithy.rules#staticContextParams +use smithy.rules#endpointTests +use smithy.rules#operationContextParams + +@endpointRuleSet({ + "version": "1.3", + "parameters": { + "ParameterFoo": { + "type": "string", + "documentation": "docs" + }, + "ParameterBar": { + "type": "string", + "documentation": "docs" + } + "ParameterBaz": { + "type": "string", + "documentation": "docs" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "ParameterFoo" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "ParameterBaz" // provided via jmespath + } + ] + } + ], + "endpoint": { + "url": "https://{ParameterBaz}.baz.amazonaws.com" + }, + "type": "endpoint" + } + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "ParameterBar" + } + ] + } + ], + "endpoint": { + "url": "https://{ParameterBar}.amazonaws.com" + }, + "type": "endpoint" + }, + { + "conditions": [] + "endpoint": { + "url": "https://{ParameterFoo}.amazonaws.com" + }, + "type": "endpoint" + } + ] + } + { + "type": "error", + "conditions": [], + "error": "No rule matched" + } + ] +}) +@endpointTests( + version: "1.0", + testCases: [ + { + "documentation": "context param" + "params": { + "ParameterFoo": "foo" + }, + "expect": { + "endpoint": { + "url": "https://foo.amazonaws.com" + } + } + "operationInputs": [ + { + "operationName": "GetResource" + "operationParams": {} + } + ] + } + { + "documentation": "grabs operation context param" + "params": { + "ParameterFoo": "foo" + "ParameterBar": "hello" + }, + "expect": { + "endpoint": { + "url": "https://hello.amazonaws.com" + } + } + "operationInputs": [ + { + "operationName": "GetResource" + "operationParams": { + "bar": "hello" + } + } + ] + } + { + "documentation": "falls back to last condition when no params were set" + "params": { + "ParameterFoo": "foo" + }, + "expect": { + "endpoint": { + "url": "https://foo.amazonaws.com" + } + } + "operationInputs": [ + { + "operationName": "GetResource" + "operationParams": {} + } + ] + } + { + "documentation": "uses jmespath context params" + "params": { + "ParameterFoo": "foo" // static context param + "ParameterBaz": "bbaz" // jmespath extraction + }, + "expect": { + "endpoint": { + "url": "https://bbaz.baz.amazonaws.com" + } + } + "operationInputs": [ + { + "operationName": "GetResource" + "operationParams": { + baz: { + bar: "bbaz" + } + } + } + ] + } + ] +) +service FizzBuzz { + operations: [GetResource] +} + +@staticContextParams("ParameterFoo": {value: "foo"}) +@operationContextParams( + ParameterBaz: { + path: "baz.bar" + } +) +operation GetResource { + input: GetResourceInput +} + +structure GetResourceInput { + @contextParam(name: "ParameterBar") + bar: String + + baz: Baz +} + +structure Baz { + bar: String +} From 80df6babeb0bef71ad11eaa5e026acb6232cd132 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Mon, 19 May 2025 11:42:04 -0500 Subject: [PATCH 04/13] Fix various rules engine issues --- .../aws-client-rulesengine/build.gradle.kts | 4 + .../client/rulesengine/AwsRulesFunction.java | 8 +- ...thy.java.client.rulesengine.RulesExtension | 0 .../aws/client/rulesengine/RunnerTest.java | 10 --- .../rulesengine/EndpointRulesPlugin.java | 32 +++++-- .../rulesengine/EndpointRulesResolver.java | 20 ++++- .../client/rulesengine/EndpointUtils.java | 6 +- .../client/rulesengine/RulesCompiler.java | 6 +- .../rulesengine/RulesEvaluationError.java | 25 +++++- .../java/client/rulesengine/RulesProgram.java | 83 +++++++++++++++---- .../java/client/rulesengine/RulesVm.java | 30 ++++--- .../java/client/rulesengine/Stdlib.java | 4 +- 12 files changed, 163 insertions(+), 65 deletions(-) rename aws/client/aws-client-rulesengine/src/main/resources/META-INF/{resources => services}/software.amazon.smithy.java.client.rulesengine.RulesExtension (100%) delete mode 100644 aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/RunnerTest.java diff --git a/aws/client/aws-client-rulesengine/build.gradle.kts b/aws/client/aws-client-rulesengine/build.gradle.kts index fc4df8f98..9047803f8 100644 --- a/aws/client/aws-client-rulesengine/build.gradle.kts +++ b/aws/client/aws-client-rulesengine/build.gradle.kts @@ -11,4 +11,8 @@ dependencies { api(project(":aws:client:aws-client-core")) api(project(":client:client-rulesengine")) api(libs.smithy.aws.endpoints) + + testImplementation(libs.smithy.aws.traits) + testImplementation(project(":aws:client:aws-client-restxml")) + testImplementation(project(":client:dynamic-client")) } diff --git a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java index b23abf36e..4a22acb83 100644 --- a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java +++ b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java @@ -92,13 +92,13 @@ public Object apply1(Object arg1) { return null; } return Map.of( - ParseArn.PARTITION, + ParseArn.PARTITION.toString(), awsArn.getPartition(), - ParseArn.SERVICE, + ParseArn.SERVICE.toString(), awsArn.getService(), - ParseArn.REGION, + ParseArn.REGION.toString(), awsArn.getRegion(), - ParseArn.ACCOUNT_ID, + ParseArn.ACCOUNT_ID.toString(), awsArn.getAccountId(), "resourceId", // TODO: make this one public too in Smithy awsArn.getResource()); diff --git a/aws/client/aws-client-rulesengine/src/main/resources/META-INF/resources/software.amazon.smithy.java.client.rulesengine.RulesExtension b/aws/client/aws-client-rulesengine/src/main/resources/META-INF/services/software.amazon.smithy.java.client.rulesengine.RulesExtension similarity index 100% rename from aws/client/aws-client-rulesengine/src/main/resources/META-INF/resources/software.amazon.smithy.java.client.rulesengine.RulesExtension rename to aws/client/aws-client-rulesengine/src/main/resources/META-INF/services/software.amazon.smithy.java.client.rulesengine.RulesExtension diff --git a/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/RunnerTest.java b/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/RunnerTest.java deleted file mode 100644 index 3c8295570..000000000 --- a/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/RunnerTest.java +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.aws.client.rulesengine; - -public class RunnerTest { - // TODO -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java index 6e2ec19dc..ecb7d24f8 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java @@ -5,10 +5,13 @@ package software.amazon.smithy.java.client.rulesengine; +import java.util.Map; import software.amazon.smithy.java.client.core.ClientConfig; import software.amazon.smithy.java.client.core.ClientContext; import software.amazon.smithy.java.client.core.ClientPlugin; +import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.core.schema.TraitKey; +import software.amazon.smithy.java.logging.InternalLogger; import software.amazon.smithy.rulesengine.traits.ContextParamTrait; import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; import software.amazon.smithy.rulesengine.traits.OperationContextParamsTrait; @@ -19,6 +22,11 @@ */ public final class EndpointRulesPlugin implements ClientPlugin { + private static final InternalLogger LOGGER = InternalLogger.getLogger(EndpointRulesPlugin.class); + + public static final Context.Key> ADDITIONAL_ENDPOINT_PARAMS = Context.key( + "Additional endpoint parameters to pass to the rules engine"); + public static final TraitKey STATIC_CONTEXT_PARAMS_TRAIT = TraitKey.get(StaticContextParamsTrait.class); @@ -30,7 +38,7 @@ public final class EndpointRulesPlugin implements ClientPlugin { public static final TraitKey ENDPOINT_RULESET_TRAIT = TraitKey.get(EndpointRuleSetTrait.class); - private final RulesProgram program; + private RulesProgram program; private EndpointRulesPlugin(RulesProgram program) { this.program = program; @@ -72,19 +80,31 @@ public RulesProgram getProgram() { public void configureClient(ClientConfig.Builder config) { // Only modify the endpoint resolver if it isn't set already or if CUSTOM_ENDPOINT is set, // and if a program was provided. - if (config.endpointResolver() == null || config.context().get(ClientContext.CUSTOM_ENDPOINT) != null) { - if (program != null) { - applyResolver(program, config); - } else if (config.service() != null) { + boolean usePlugin = false; + if (config.endpointResolver() == null) { + usePlugin = true; + LOGGER.debug("Trying to use EndpointRulesPlugin resolver because endpointResolver is null"); + } else if (config.context().get(ClientContext.CUSTOM_ENDPOINT) != null) { + usePlugin = true; + LOGGER.debug("Trying to use EndpointRulesPlugin resolver because CUSTOM_ENDPOINT is set"); + } + + if (usePlugin) { + if (program == null && config.service() != null) { var ruleset = config.service().schema().getTrait(ENDPOINT_RULESET_TRAIT); if (ruleset != null) { - applyResolver(new RulesEngine().compile(ruleset.getEndpointRuleSet()), config); + LOGGER.debug("Found endpoint rules traits on service: {}", config.service()); + program = new RulesEngine().compile(ruleset.getEndpointRuleSet()); } } + if (program != null) { + applyResolver(program, config); + } } } private void applyResolver(RulesProgram applyProgram, ClientConfig.Builder config) { config.endpointResolver(new EndpointRulesResolver(applyProgram)); + LOGGER.debug("Applying EndpointRulesResolver to client: {}", config.service()); } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java index a66924017..eb675eb72 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java @@ -11,14 +11,18 @@ import software.amazon.smithy.java.client.core.endpoint.Endpoint; import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.core.schema.ApiOperation; import software.amazon.smithy.java.core.schema.SerializableStruct; +import software.amazon.smithy.java.logging.InternalLogger; /** * Endpoint resolver that uses the endpoint rules engine. */ final class EndpointRulesResolver implements EndpointResolver { + private static final InternalLogger LOGGER = InternalLogger.getLogger(EndpointRulesResolver.class); + private final RulesProgram program; private final ContextProvider operationContextParams = new ContextProvider.OrchestratingProvider(); @@ -29,16 +33,28 @@ final class EndpointRulesResolver implements EndpointResolver { @Override public CompletableFuture resolveEndpoint(EndpointResolverParams params) { try { - var endpointParams = createEndpointParams(params.operation(), params.inputValue()); + var operation = params.operation(); + var endpointParams = createEndpointParams(params.context(), operation, params.inputValue()); + LOGGER.debug("Resolving endpoint of {} using VM with params: {}", operation, endpointParams); return CompletableFuture.completedFuture(program.resolveEndpoint(params.context(), endpointParams)); } catch (RulesEvaluationError e) { return CompletableFuture.failedFuture(e); } } - private Map createEndpointParams(ApiOperation operation, SerializableStruct input) { + private Map createEndpointParams( + Context context, + ApiOperation operation, + SerializableStruct input + ) { Map params = new HashMap<>(); operationContextParams.addContext(operation, input, params); + + var additionalParams = context.get(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS); + if (additionalParams != null) { + params.putAll(additionalParams); + } + return params; } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java index 4e5e35606..5f3765f12 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java @@ -25,12 +25,12 @@ import software.amazon.smithy.rulesengine.language.evaluation.value.Value; import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.ParseUrl; -final class EndpointUtils { +public final class EndpointUtils { private EndpointUtils() {} // "The type of the value MUST be either a string, boolean or an array of string." - static Object convertNode(Node value, boolean allowAllTypes) { + public static Object convertNode(Node value, boolean allowAllTypes) { if (value instanceof StringNode s) { return s.getValue(); } else if (value instanceof BooleanNode b) { @@ -60,7 +60,7 @@ static Object convertNode(Node value, boolean allowAllTypes) { throw new RulesEvaluationError("Unsupported endpoint ruleset parameter: " + value); } - static Object convertNode(Node value) { + public static Object convertNode(Node value) { return convertNode(value, false); } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java index 27b71c6d6..e4fb1b733 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java @@ -91,7 +91,9 @@ final class RulesCompiler { addRegister(param.getName().toString(), param.isRequired(), defaultValue, builtinValue); } - cse = performOptimizations ? CseOptimizer.apply(rules.getRules()) : Map.of(); + // cse = performOptimizations ? CseOptimizer.apply(rules.getRules()) : Map.of(); + performOptimizations = false; + cse = Map.of(); } private byte addRegister(String name, boolean required, Object defaultValue, String builtin) { @@ -106,7 +108,7 @@ private byte addRegister(String name, boolean required, Object defaultValue, Str // Register scopes are tracking by flipping bits of a long. That means a max of 64 registers. // No real rules definition would have more than 64 registers. - if (registry.size() > 64) { + if (registry.size() > 255) { throw new RulesEvaluationError("Too many registers added to rules engine"); } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEvaluationError.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEvaluationError.java index 5e57fd1f9..1d8b2af5c 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEvaluationError.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEvaluationError.java @@ -9,11 +9,32 @@ * An error encountered while running the rules engine. */ public class RulesEvaluationError extends RuntimeException { + + private final int position; + public RulesEvaluationError(String message) { - super(message); + this(message, -1); } public RulesEvaluationError(String message, Throwable cause) { - super(message, cause); + this(message, -1, cause); + } + + public RulesEvaluationError(String message, int position) { + super(createMessage(message, position)); + this.position = position; + } + + public RulesEvaluationError(String message, int position, Throwable cause) { + super(createMessage(message, position), cause); + this.position = position; + } + + private static String createMessage(String message, int position) { + return message + (position == -1 ? "" : " (position " + position + ')'); + } + + public int getPosition() { + return position; } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java index fc414a848..538f8d1f5 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java @@ -264,6 +264,10 @@ public List getParamDefinitions() { return result; } + private enum Show { + CONST, FN, REGISTER + } + @Override public String toString() { StringBuilder s = new StringBuilder(); @@ -309,6 +313,7 @@ public String toString() { // Write the instructions. s.append("Instructions: (version=").append(-instructions[instructionOffset]).append(")\n"); + // Skip version, param count, synthetic param count bytes. for (var i = instructionOffset + 3; i < instructionSize; i++) { s.append(" "); @@ -316,21 +321,26 @@ public String toString() { s.append(": "); var skip = 0; + Show show = null; var name = switch (instructions[i]) { case LOAD_CONST -> { skip = 1; + show = Show.CONST; yield "LOAD_CONST"; } case LOAD_CONST_W -> { skip = 2; + show = Show.CONST; yield "LOAD_CONST_W"; } case SET_REGISTER -> { skip = 1; + show = Show.REGISTER; yield "SET_REGISTER"; } case LOAD_REGISTER -> { skip = 1; + show = Show.REGISTER; yield "LOAD_REGISTER"; } case JUMP_IF_FALSEY -> { @@ -341,6 +351,7 @@ public String toString() { case ISSET -> "ISSET"; case TEST_REGISTER_ISSET -> { skip = 1; + show = Show.REGISTER; yield "TEST_REGISTER_SET"; } case RETURN_ERROR -> "RETURN_ERROR"; @@ -358,45 +369,54 @@ public String toString() { } case RESOLVE_TEMPLATE -> { skip = 2; + show = Show.CONST; yield "RESOLVE_TEMPLATE"; } case FN -> { skip = 1; + show = Show.FN; yield "FN"; } case GET_ATTR -> { skip = 2; + show = Show.CONST; yield "GET_ATTR"; } case IS_TRUE -> "IS_TRUE"; case TEST_REGISTER_IS_TRUE -> { skip = 1; + show = Show.REGISTER; yield "TEST_REGISTER_IS_TRUE"; } case RETURN_VALUE -> "RETURN_VALUE"; default -> "?" + instructions[i]; }; - switch (skip) { - case 0 -> s.append(name); - case 1 -> { - s.append(String.format("%-22s ", name)); - if (instructions.length > i + 1) { - s.append(instructions[i + 1]); - } else { - s.append("?"); + appendName(s, name); + + int positionToShow = -1; + if (skip == 1) { + positionToShow = appendByte(s, i); + i++; + } else if (skip == 2) { + positionToShow = appendShort(s, i); + i += 2; + } + + if (positionToShow > -1 && show != null) { + switch (show) { + case CONST -> { + s.append(" "); + s.append(constantPool[positionToShow]); } - i++; - } - default -> { - // it's a two-byte unsigned short. - s.append(String.format("%-22s ", name)); - if (instructions.length > i + 2) { - s.append(EndpointUtils.bytesToShort(instructions, i + 1)); - } else { - s.append("??"); + case FN -> { + s.append(" "); + s.append(functions[positionToShow].getFunctionName()); + } + case REGISTER -> { + s.append(" "); + s.append(registerDefinitions[positionToShow].name()); } - i += 2; } } @@ -405,4 +425,31 @@ public String toString() { return s.toString(); } + + private void appendName(StringBuilder s, String name) { + s.append(String.format("%-22s ", name)); + } + + private int appendByte(StringBuilder s, int i) { + int result = -1; + if (instructions.length > i + 1) { + result = instructions[i + 1] & 0xFF; + s.append(String.format("%-8d ", result)); + } else { + s.append(" ??"); + } + return result; + } + + private int appendShort(StringBuilder s, int i) { + var result = -1; + // it's a two-byte unsigned short. + if (instructions.length > i + 2) { + result = EndpointUtils.bytesToShort(instructions, i + 1); + s.append(String.format("%-8d ", result)); + } else { + s.append(" ??"); + } + return result; + } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java index 103f65402..f1dfd6324 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java @@ -17,9 +17,12 @@ import software.amazon.smithy.java.client.core.endpoint.Endpoint; import software.amazon.smithy.java.client.core.endpoint.EndpointContext; import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.logging.InternalLogger; final class RulesVm { + private static final InternalLogger LOGGER = InternalLogger.getLogger(RulesVm.class); + // Make number of URIs to cache in the thread-local cache. private static final int MAX_CACHE_SIZE = 32; @@ -153,24 +156,22 @@ private Object run() { case RulesProgram.LOAD_REGISTER -> push(registers[instructions[++pc] & 0xFF]); // read unsigned byte case RulesProgram.JUMP_IF_FALSEY -> { Object value = pop(); - if (value == null || Boolean.FALSE.equals(value)) { + if (value == null || value == Boolean.FALSE) { + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("VM jumping from {} to {}", pc, readUnsignedShort(pc + 1)); + LOGGER.debug(" - Stack ({}): {}", stackPosition, Arrays.toString(stack)); + LOGGER.debug(" - Registers: {}", Arrays.toString(registers)); + } pc = readUnsignedShort(pc + 1) - 1; // -1 because loop will increment } else { pc += 2; } } - case RulesProgram.NOT -> push(pop() != Boolean.TRUE); - case RulesProgram.ISSET -> { - Object value = pop(); - // Push true if it's set and not a boolean, or boolean true. - push(value != null && !Boolean.FALSE.equals(value)); - } - case RulesProgram.TEST_REGISTER_ISSET -> { - var value = registers[instructions[++pc] & 0xFF]; // read unsigned byte - push(value != null && !Boolean.FALSE.equals(value)); - } + case RulesProgram.NOT -> push(pop() == Boolean.FALSE); + case RulesProgram.ISSET -> push(pop() != null); + case RulesProgram.TEST_REGISTER_ISSET -> push(registers[instructions[++pc] & 0xFF] != null); case RulesProgram.RETURN_ERROR -> { - throw new RulesEvaluationError((String) pop()); + throw new RulesEvaluationError((String) pop(), pc); } case RulesProgram.RETURN_ENDPOINT -> { return setEndpoint(instructions[++pc]); @@ -209,10 +210,7 @@ private Object run() { pc += 2; } case RulesProgram.IS_TRUE -> push(pop() == Boolean.TRUE); - case RulesProgram.TEST_REGISTER_IS_TRUE -> { - int register = instructions[++pc] & 0xFF; // read unsigned byte - push(registers[register] == Boolean.TRUE); - } + case RulesProgram.TEST_REGISTER_IS_TRUE -> push(registers[instructions[++pc] & 0xFF] == Boolean.TRUE); case RulesProgram.RETURN_VALUE -> { return pop(); } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java index 83d727cf1..e9f7749ab 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java @@ -42,8 +42,8 @@ public Object apply2(Object a, Object b) { public Object apply(Object... operands) { // software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring.Definition.evaluate String str = EndpointUtils.castFnArgument(operands[0], String.class, "substring", 1); - int startIndex = EndpointUtils.castFnArgument(operands[1], Integer.class, "substring", 2); - int stopIndex = EndpointUtils.castFnArgument(operands[2], Integer.class, "substring", 3); + int startIndex = EndpointUtils.castFnArgument(operands[1], Number.class, "substring", 2).intValue(); + int stopIndex = EndpointUtils.castFnArgument(operands[2], Number.class, "substring", 3).intValue(); boolean reverse = EndpointUtils.castFnArgument(operands[3], Boolean.class, "substring", 4); return Substring.getSubstring(str, startIndex, stopIndex, reverse); } From 94a6b9e0ca612732668208f6213ae7500f433d44 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Mon, 19 May 2025 11:42:25 -0500 Subject: [PATCH 05/13] Fix URI concat issue with HttpClientProtocol --- .../java/client/http/HttpClientProtocol.java | 2 +- .../client/http/HttpClientProtocolTest.java | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 client/client-http/src/test/java/software/amazon/smithy/java/client/http/HttpClientProtocolTest.java diff --git a/client/client-http/src/main/java/software/amazon/smithy/java/client/http/HttpClientProtocol.java b/client/client-http/src/main/java/software/amazon/smithy/java/client/http/HttpClientProtocol.java index 4c403e374..fd4ef1079 100644 --- a/client/client-http/src/main/java/software/amazon/smithy/java/client/http/HttpClientProtocol.java +++ b/client/client-http/src/main/java/software/amazon/smithy/java/client/http/HttpClientProtocol.java @@ -54,7 +54,7 @@ public HttpRequest setServiceEndpoint(HttpRequest request, Endpoint endpoint) { // If a path is set on the service endpoint, concatenate it with the path of the request. if (uri.getRawPath() != null && !uri.getRawPath().isEmpty()) { builder.path(uri.getRawPath()); - builder.concatPath(request.uri().getPath()); + builder.concatPath(request.uri().getRawPath()); } var requestBuilder = request.toBuilder(); diff --git a/client/client-http/src/test/java/software/amazon/smithy/java/client/http/HttpClientProtocolTest.java b/client/client-http/src/test/java/software/amazon/smithy/java/client/http/HttpClientProtocolTest.java new file mode 100644 index 000000000..fc1107ade --- /dev/null +++ b/client/client-http/src/test/java/software/amazon/smithy/java/client/http/HttpClientProtocolTest.java @@ -0,0 +1,66 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.http; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; + +import java.net.URI; +import java.util.concurrent.CompletableFuture; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.core.schema.ApiOperation; +import software.amazon.smithy.java.core.schema.SerializableStruct; +import software.amazon.smithy.java.core.serde.Codec; +import software.amazon.smithy.java.core.serde.TypeRegistry; +import software.amazon.smithy.java.http.api.HttpRequest; +import software.amazon.smithy.java.http.api.HttpResponse; +import software.amazon.smithy.model.shapes.ShapeId; + +public class HttpClientProtocolTest { + @Test + public void mergesPaths() throws Exception { + var hcp = new HttpClientProtocol(ShapeId.from("foo#Bar")) { + @Override + public Codec payloadCodec() { + return null; + } + + @Override + public HttpRequest createRequest( + ApiOperation operation, + I input, + Context context, + URI endpoint + ) { + return null; + } + + @Override + public CompletableFuture deserializeResponse( + ApiOperation operation, + Context context, + TypeRegistry errorRegistry, + HttpRequest request, + HttpResponse response + ) { + return null; + } + }; + + var endpoint = Endpoint.builder().uri("https://example.com/foo%20/bar").build(); + var request = HttpRequest.builder() + .method("GET") + .uri(new URI("/bam%20")) + .build(); + var merged = hcp.setServiceEndpoint(request, endpoint); + + // It concats the endpoints and maintains percent encoding. + assertThat(merged.uri().toString(), equalTo("https://example.com/foo%20/bar/bam%20")); + } +} From fd0274d589f348ac53094f919954815f43aca027 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Mon, 19 May 2025 21:05:44 -0500 Subject: [PATCH 06/13] Add optimizations and s3 tests --- .../aws-client-rulesengine/build.gradle.kts | 23 + .../java/aws/client/rulesengine/Bench.java | 108 + .../java/aws/client/rulesengine/s3.json | 39275 ++++++++++++++++ .../aws/client/rulesengine/ResolverTest.java | 197 + .../java/client/rulesengine/CseOptimizer.java | 69 - .../rulesengine/EndpointRulesPlugin.java | 24 +- .../client/rulesengine/EndpointUtils.java | 4 +- .../client/rulesengine/RulesCompiler.java | 63 +- .../java/client/rulesengine/RulesProgram.java | 257 +- .../java/client/rulesengine/RulesVm.java | 237 +- .../java/client/rulesengine/Stdlib.java | 20 +- .../rulesengine/EndpointRulesPluginTest.java | 9 - .../java/client/rulesengine/RulesVmTest.java | 18 +- .../java/client/rulesengine/StdlibTest.java | 13 - .../java/dynamicclient/DynamicClient.java | 10 + .../java/dynamicclient/DynamicOperation.java | 4 +- config/spotbugs/filter.xml | 6 + 17 files changed, 39971 insertions(+), 366 deletions(-) create mode 100644 aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java create mode 100644 aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json create mode 100644 aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/ResolverTest.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/CseOptimizer.java diff --git a/aws/client/aws-client-rulesengine/build.gradle.kts b/aws/client/aws-client-rulesengine/build.gradle.kts index 9047803f8..42a93b26c 100644 --- a/aws/client/aws-client-rulesengine/build.gradle.kts +++ b/aws/client/aws-client-rulesengine/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("smithy-java.module-conventions") + id("me.champeau.jmh") version "0.7.3" } description = "This module provides AWS-Specific client rules engine functionality" @@ -16,3 +17,25 @@ dependencies { testImplementation(project(":aws:client:aws-client-restxml")) testImplementation(project(":client:dynamic-client")) } + +// Share the S3 model between JMH and tests. +sourceSets { + val sharedResources = "src/shared-resources" + + named("test") { + resources.srcDir(sharedResources) + } + + named("jmh") { + resources.srcDir(sharedResources) + } +} + +jmh { + warmupIterations = 2 + iterations = 5 + fork = 1 + profilers.add("async:output=flamegraph") + // profilers.add("gc") + duplicateClassesStrategy = DuplicatesStrategy.WARN +} diff --git a/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java b/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java new file mode 100644 index 000000000..c5c7e5ff5 --- /dev/null +++ b/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java @@ -0,0 +1,108 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.rulesengine; + +import java.util.Map; +import java.util.concurrent.TimeUnit; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import software.amazon.smithy.java.aws.client.core.settings.EndpointSettings; +import software.amazon.smithy.java.client.core.auth.scheme.AuthSchemeResolver; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.client.rulesengine.EndpointRulesPlugin; +import software.amazon.smithy.java.client.rulesengine.RulesEngine; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.core.serde.document.Document; +import software.amazon.smithy.java.dynamicclient.DynamicClient; +import software.amazon.smithy.model.Model; +import software.amazon.smithy.model.loader.ModelAssembler; +import software.amazon.smithy.model.pattern.UriPattern; +import software.amazon.smithy.model.shapes.ServiceShape; +import software.amazon.smithy.model.shapes.Shape; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.model.traits.HttpTrait; +import software.amazon.smithy.model.transform.ModelTransformer; + +@State(Scope.Benchmark) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@BenchmarkMode(Mode.AverageTime) +@Warmup(iterations = 2, time = 3) +@Measurement(iterations = 3, time = 3) +@Fork(1) +public class Bench { + private DynamicClient client; + private EndpointResolver endpointResolver; + private EndpointResolverParams endpointParams; + + @Setup + public void setup() { + var model = Model.assembler() + .discoverModels() + .addImport(ResolverTest.class.getResource("s3.json")) + .putProperty(ModelAssembler.ALLOW_UNKNOWN_TRAITS, true) + .assemble() + .unwrap(); + model = customizeS3Model(model); + var service = model.expectShape(ShapeId.from("com.amazonaws.s3#AmazonS3"), ServiceShape.class); + + var engine = new RulesEngine(); + var plugin = EndpointRulesPlugin.create(engine); + + client = DynamicClient.builder() + .model(model) + .service(service.getId()) + .authSchemeResolver(AuthSchemeResolver.NO_AUTH) + .addPlugin(plugin) + .build(); + endpointResolver = client.config().endpointResolver(); + var ctx = Context.create(); + ctx.put(EndpointSettings.REGION, "us-east-1"); + + var inputValue = client.createStruct(ShapeId.from("com.amazonaws.s3#GetObjectRequest"), + Document.of(Map.of( + "Bucket", + Document.of("foo"), + "Key", + Document.of("bar")))); + endpointParams = EndpointResolverParams.builder() + .context(ctx) + .inputValue(inputValue) + .operation(client.getOperation("GetObject")) + .build(); + } + + // S3 requires a customization to remove buckets from the path :( + private static Model customizeS3Model(Model m) { + return ModelTransformer.create().mapShapes(m, s -> { + if (s.isOperationShape()) { + var httpTrait = s.getTrait(HttpTrait.class).orElse(null); + if (httpTrait != null && httpTrait.getUri().getLabel("Bucket").isPresent()) { + // Remove the bucket from the URI pattern. + var uriString = httpTrait.getUri().toString().replace("{Bucket}", ""); + uriString = uriString.replace("//", "/"); + var newUri = UriPattern.parse(uriString); + var newHttpTrait = httpTrait.toBuilder().uri(newUri).build(); + return Shape.shapeToBuilder(s).addTrait(newHttpTrait).build(); + } + } + return s; + }); + } + + @Benchmark + public Object evaluate() throws Exception { + return endpointResolver.resolveEndpoint(endpointParams).get(); + } +} diff --git a/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json b/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json new file mode 100644 index 000000000..e43f78b87 --- /dev/null +++ b/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json @@ -0,0 +1,39275 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.s3#AbortDate": { + "type": "timestamp" + }, + "com.amazonaws.s3#AbortIncompleteMultipartUpload": { + "type": "structure", + "members": { + "DaysAfterInitiation": { + "target": "com.amazonaws.s3#DaysAfterInitiation", + "traits": { + "smithy.api#documentation": "

Specifies the number of days after which Amazon S3 aborts an incomplete multipart\n upload.

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

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will\n wait before permanently removing all parts of the upload. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in\n the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#AbortMultipartUpload": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#AbortMultipartUploadRequest" + }, + "output": { + "target": "com.amazonaws.s3#AbortMultipartUploadOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchUpload" + } + ], + "traits": { + "smithy.api#documentation": "

This operation aborts a multipart upload. After a multipart upload is aborted, no\n additional parts can be uploaded using that upload ID. The storage consumed by any\n previously uploaded parts will be freed. However, if any part uploads are currently in\n progress, those part uploads might or might not succeed. As a result, it might be necessary\n to abort a given multipart upload multiple times in order to completely free all storage\n consumed by all parts.

\n

To verify that all parts have been removed and prevent getting charged for the part\n storage, you should call the ListParts API operation and ensure\n that the parts list is empty.

\n \n
    \n
  • \n

    \n Directory buckets - If multipart\n uploads in a directory bucket are in progress, you can't delete the bucket until\n all the in-progress multipart uploads are aborted or completed. To delete these\n in-progress multipart uploads, use the ListMultipartUploads operation\n to list the in-progress multipart uploads in the bucket and use the\n AbortMultipartUpload operation to abort all the in-progress\n multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to AbortMultipartUpload:

\n ", + "smithy.api#examples": [ + { + "title": "To abort a multipart upload", + "documentation": "The following example aborts a multipart upload.", + "input": { + "Bucket": "examplebucket", + "Key": "bigobject", + "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", + "code": 204 + } + } + }, + "com.amazonaws.s3#AbortMultipartUploadOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#AbortMultipartUploadRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name to which the upload was taking place.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

Key of the object for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID that identifies the multipart upload.

", + "smithy.api#httpQuery": "uploadId", + "smithy.api#required": {} + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp.\n If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. \n If the initiated timestamp matches or if the multipart upload doesn\u2019t exist, the operation returns a 204 Success (No Content) response. \n

\n \n

This functionality is only supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-if-match-initiated-time" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#AbortRuleId": { + "type": "string" + }, + "com.amazonaws.s3#AccelerateConfiguration": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#BucketAccelerateStatus", + "traits": { + "smithy.api#documentation": "

Specifies the transfer acceleration status of the bucket.

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

Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see\n Amazon S3\n Transfer Acceleration in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#AcceptRanges": { + "type": "string" + }, + "com.amazonaws.s3#AccessControlPolicy": { + "type": "structure", + "members": { + "Grants": { + "target": "com.amazonaws.s3#Grants", + "traits": { + "smithy.api#documentation": "

A list of grants.

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

Container for the bucket owner's display name and ID.

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

Contains the elements that set the ACL permissions for an object per grantee.

" + } + }, + "com.amazonaws.s3#AccessControlTranslation": { + "type": "structure", + "members": { + "Owner": { + "target": "com.amazonaws.s3#OwnerOverride", + "traits": { + "smithy.api#documentation": "

Specifies the replica ownership. For default and valid values, see PUT bucket\n replication in the Amazon S3 API Reference.

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

A container for information about access control for replicas.

" + } + }, + "com.amazonaws.s3#AccessKeyIdValue": { + "type": "string" + }, + "com.amazonaws.s3#AccessPointAlias": { + "type": "boolean" + }, + "com.amazonaws.s3#AccessPointArn": { + "type": "string" + }, + "com.amazonaws.s3#AccountId": { + "type": "string" + }, + "com.amazonaws.s3#AllowQuotedRecordDelimiter": { + "type": "boolean" + }, + "com.amazonaws.s3#AllowedHeader": { + "type": "string" + }, + "com.amazonaws.s3#AllowedHeaders": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#AllowedHeader" + } + }, + "com.amazonaws.s3#AllowedMethod": { + "type": "string" + }, + "com.amazonaws.s3#AllowedMethods": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#AllowedMethod" + } + }, + "com.amazonaws.s3#AllowedOrigin": { + "type": "string" + }, + "com.amazonaws.s3#AllowedOrigins": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#AllowedOrigin" + } + }, + "com.amazonaws.s3#AmazonS3": { + "type": "service", + "version": "2006-03-01", + "operations": [ + { + "target": "com.amazonaws.s3#AbortMultipartUpload" + }, + { + "target": "com.amazonaws.s3#CompleteMultipartUpload" + }, + { + "target": "com.amazonaws.s3#CopyObject" + }, + { + "target": "com.amazonaws.s3#CreateBucket" + }, + { + "target": "com.amazonaws.s3#CreateBucketMetadataTableConfiguration" + }, + { + "target": "com.amazonaws.s3#CreateMultipartUpload" + }, + { + "target": "com.amazonaws.s3#CreateSession" + }, + { + "target": "com.amazonaws.s3#DeleteBucket" + }, + { + "target": "com.amazonaws.s3#DeleteBucketAnalyticsConfiguration" + }, + { + "target": "com.amazonaws.s3#DeleteBucketCors" + }, + { + "target": "com.amazonaws.s3#DeleteBucketEncryption" + }, + { + "target": "com.amazonaws.s3#DeleteBucketIntelligentTieringConfiguration" + }, + { + "target": "com.amazonaws.s3#DeleteBucketInventoryConfiguration" + }, + { + "target": "com.amazonaws.s3#DeleteBucketLifecycle" + }, + { + "target": "com.amazonaws.s3#DeleteBucketMetadataTableConfiguration" + }, + { + "target": "com.amazonaws.s3#DeleteBucketMetricsConfiguration" + }, + { + "target": "com.amazonaws.s3#DeleteBucketOwnershipControls" + }, + { + "target": "com.amazonaws.s3#DeleteBucketPolicy" + }, + { + "target": "com.amazonaws.s3#DeleteBucketReplication" + }, + { + "target": "com.amazonaws.s3#DeleteBucketTagging" + }, + { + "target": "com.amazonaws.s3#DeleteBucketWebsite" + }, + { + "target": "com.amazonaws.s3#DeleteObject" + }, + { + "target": "com.amazonaws.s3#DeleteObjects" + }, + { + "target": "com.amazonaws.s3#DeleteObjectTagging" + }, + { + "target": "com.amazonaws.s3#DeletePublicAccessBlock" + }, + { + "target": "com.amazonaws.s3#GetBucketAccelerateConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketAcl" + }, + { + "target": "com.amazonaws.s3#GetBucketAnalyticsConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketCors" + }, + { + "target": "com.amazonaws.s3#GetBucketEncryption" + }, + { + "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketInventoryConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketLifecycleConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketLocation" + }, + { + "target": "com.amazonaws.s3#GetBucketLogging" + }, + { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketMetricsConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketNotificationConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketOwnershipControls" + }, + { + "target": "com.amazonaws.s3#GetBucketPolicy" + }, + { + "target": "com.amazonaws.s3#GetBucketPolicyStatus" + }, + { + "target": "com.amazonaws.s3#GetBucketReplication" + }, + { + "target": "com.amazonaws.s3#GetBucketRequestPayment" + }, + { + "target": "com.amazonaws.s3#GetBucketTagging" + }, + { + "target": "com.amazonaws.s3#GetBucketVersioning" + }, + { + "target": "com.amazonaws.s3#GetBucketWebsite" + }, + { + "target": "com.amazonaws.s3#GetObject" + }, + { + "target": "com.amazonaws.s3#GetObjectAcl" + }, + { + "target": "com.amazonaws.s3#GetObjectAttributes" + }, + { + "target": "com.amazonaws.s3#GetObjectLegalHold" + }, + { + "target": "com.amazonaws.s3#GetObjectLockConfiguration" + }, + { + "target": "com.amazonaws.s3#GetObjectRetention" + }, + { + "target": "com.amazonaws.s3#GetObjectTagging" + }, + { + "target": "com.amazonaws.s3#GetObjectTorrent" + }, + { + "target": "com.amazonaws.s3#GetPublicAccessBlock" + }, + { + "target": "com.amazonaws.s3#HeadBucket" + }, + { + "target": "com.amazonaws.s3#HeadObject" + }, + { + "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurations" + }, + { + "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurations" + }, + { + "target": "com.amazonaws.s3#ListBucketInventoryConfigurations" + }, + { + "target": "com.amazonaws.s3#ListBucketMetricsConfigurations" + }, + { + "target": "com.amazonaws.s3#ListBuckets" + }, + { + "target": "com.amazonaws.s3#ListDirectoryBuckets" + }, + { + "target": "com.amazonaws.s3#ListMultipartUploads" + }, + { + "target": "com.amazonaws.s3#ListObjects" + }, + { + "target": "com.amazonaws.s3#ListObjectsV2" + }, + { + "target": "com.amazonaws.s3#ListObjectVersions" + }, + { + "target": "com.amazonaws.s3#ListParts" + }, + { + "target": "com.amazonaws.s3#PutBucketAccelerateConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketAcl" + }, + { + "target": "com.amazonaws.s3#PutBucketAnalyticsConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketCors" + }, + { + "target": "com.amazonaws.s3#PutBucketEncryption" + }, + { + "target": "com.amazonaws.s3#PutBucketIntelligentTieringConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketInventoryConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketLifecycleConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketLogging" + }, + { + "target": "com.amazonaws.s3#PutBucketMetricsConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketNotificationConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketOwnershipControls" + }, + { + "target": "com.amazonaws.s3#PutBucketPolicy" + }, + { + "target": "com.amazonaws.s3#PutBucketReplication" + }, + { + "target": "com.amazonaws.s3#PutBucketRequestPayment" + }, + { + "target": "com.amazonaws.s3#PutBucketTagging" + }, + { + "target": "com.amazonaws.s3#PutBucketVersioning" + }, + { + "target": "com.amazonaws.s3#PutBucketWebsite" + }, + { + "target": "com.amazonaws.s3#PutObject" + }, + { + "target": "com.amazonaws.s3#PutObjectAcl" + }, + { + "target": "com.amazonaws.s3#PutObjectLegalHold" + }, + { + "target": "com.amazonaws.s3#PutObjectLockConfiguration" + }, + { + "target": "com.amazonaws.s3#PutObjectRetention" + }, + { + "target": "com.amazonaws.s3#PutObjectTagging" + }, + { + "target": "com.amazonaws.s3#PutPublicAccessBlock" + }, + { + "target": "com.amazonaws.s3#RestoreObject" + }, + { + "target": "com.amazonaws.s3#SelectObjectContent" + }, + { + "target": "com.amazonaws.s3#UploadPart" + }, + { + "target": "com.amazonaws.s3#UploadPartCopy" + }, + { + "target": "com.amazonaws.s3#WriteGetObjectResponse" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "S3", + "arnNamespace": "s3", + "cloudFormationName": "S3", + "cloudTrailEventSource": "s3.amazonaws.com", + "endpointPrefix": "s3" + }, + "aws.auth#sigv4": { + "name": "s3" + }, + "aws.protocols#restXml": { + "noErrorWrapping": true + }, + "smithy.api#documentation": "

", + "smithy.api#suppress": [ + "RuleSetAuthSchemes" + ], + "smithy.api#title": "Amazon Simple Storage Service", + "smithy.api#xmlNamespace": { + "uri": "http://s3.amazonaws.com/doc/2006-03-01/" + }, + "smithy.rules#clientContextParams": { + "ForcePathStyle": { + "documentation": "Forces this client to use path-style addressing for buckets.", + "type": "boolean" + }, + "UseArnRegion": { + "documentation": "Enables this client to use an ARN's region when constructing an endpoint instead of the client's configured region.", + "type": "boolean" + }, + "DisableMultiRegionAccessPoints": { + "documentation": "Disables this client's usage of Multi-Region Access Points.", + "type": "boolean" + }, + "Accelerate": { + "documentation": "Enables this client to use S3 Transfer Acceleration endpoints.", + "type": "boolean" + }, + "DisableS3ExpressSessionAuth": { + "documentation": "Disables this client's usage of Session Auth for S3Express buckets and reverts to using conventional SigV4 for those.", + "type": "boolean" + } + }, + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Bucket": { + "required": false, + "documentation": "The S3 bucket used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 bucket.", + "type": "String" + }, + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + }, + "ForcePathStyle": { + "builtIn": "AWS::S3::ForcePathStyle", + "required": true, + "default": false, + "documentation": "When true, force a path-style endpoint to be used where the bucket name is part of the path.", + "type": "Boolean" + }, + "Accelerate": { + "builtIn": "AWS::S3::Accelerate", + "required": true, + "default": false, + "documentation": "When true, use S3 Accelerate. NOTE: Not all regions support S3 accelerate.", + "type": "Boolean" + }, + "UseGlobalEndpoint": { + "builtIn": "AWS::S3::UseGlobalEndpoint", + "required": true, + "default": false, + "documentation": "Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.", + "type": "Boolean" + }, + "UseObjectLambdaEndpoint": { + "required": false, + "documentation": "Internal parameter to use object lambda endpoint for an operation (eg: WriteGetObjectResponse)", + "type": "Boolean" + }, + "Key": { + "required": false, + "documentation": "The S3 Key used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Key.", + "type": "String" + }, + "Prefix": { + "required": false, + "documentation": "The S3 Prefix used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Prefix.", + "type": "String" + }, + "CopySource": { + "required": false, + "documentation": "The Copy Source used for Copy Object request. This is an optional parameter that will be set automatically for operations that are scoped to Copy Source.", + "type": "String" + }, + "DisableAccessPoints": { + "required": false, + "documentation": "Internal parameter to disable Access Point Buckets", + "type": "Boolean" + }, + "DisableMultiRegionAccessPoints": { + "builtIn": "AWS::S3::DisableMultiRegionAccessPoints", + "required": true, + "default": false, + "documentation": "Whether multi-region access points (MRAP) should be disabled.", + "type": "Boolean" + }, + "UseArnRegion": { + "builtIn": "AWS::S3::UseArnRegion", + "required": false, + "documentation": "When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.", + "type": "Boolean" + }, + "UseS3ExpressControlEndpoint": { + "required": false, + "documentation": "Internal parameter to indicate whether S3Express operation should use control plane, (ex. CreateBucket)", + "type": "Boolean" + }, + "DisableS3ExpressSessionAuth": { + "required": false, + "documentation": "Parameter to indicate whether S3Express session auth should be disabled", + "type": "Boolean" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Accelerate cannot be used with FIPS", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "error": "Cannot set dual-stack in combination with a custom endpoint.", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "A custom endpoint cannot be combined with FIPS", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + } + ], + "error": "A custom endpoint cannot be combined with S3 Accelerate", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + }, + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "partitionResult" + }, + "name" + ] + }, + "aws-cn" + ] + } + ], + "error": "Partition does not support FIPS", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 6, + true + ], + "assign": "bucketSuffix" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "bucketSuffix" + }, + "--x-s3" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "S3Express does not support Dual-stack.", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + } + ], + "error": "S3Express does not support S3 Accelerate.", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "uriEncode", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "uriEncode", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "UseS3ExpressControlEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseS3ExpressControlEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "uriEncode", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 14, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 14, + 16, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 15, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 15, + 17, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 19, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 19, + 21, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 20, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 20, + 22, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 26, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 26, + 28, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Unrecognized S3Express bucket name format.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 14, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 14, + 16, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 15, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 15, + 17, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 19, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 19, + 21, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 20, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 20, + 22, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 26, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 26, + 28, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Unrecognized S3Express bucket name format.", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 7, + true + ], + "assign": "accessPointSuffix" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "accessPointSuffix" + }, + "--xa-s3" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "S3Express does not support Dual-stack.", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + } + ], + "error": "S3Express does not support S3 Accelerate.", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "uriEncode", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "uriEncode", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 15, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 15, + 17, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 16, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 16, + 18, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 20, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 20, + 22, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 21, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 21, + 23, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 27, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 27, + 29, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Unrecognized S3Express bucket name format.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 15, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 15, + 17, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 16, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 16, + 18, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 20, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 20, + 22, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 21, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 21, + 23, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 27, + true + ], + "assign": "s3expressAvailabilityZoneId" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 27, + 29, + true + ], + "assign": "s3expressAvailabilityZoneDelim" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Unrecognized S3Express bucket name format.", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "UseS3ExpressControlEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseS3ExpressControlEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 49, + 50, + true + ], + "assign": "hardwareType" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 8, + 12, + true + ], + "assign": "regionPrefix" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 7, + true + ], + "assign": "bucketAliasSuffix" + }, + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 32, + 49, + true + ], + "assign": "outpostId" + }, + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "regionPartition" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "bucketAliasSuffix" + }, + "--op-s3" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "outpostId" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "hardwareType" + }, + "e" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "regionPrefix" + }, + "beta" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + } + ], + "error": "Expected a endpoint to be specified but no endpoint was found", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "https://{Bucket}.ec2.{url#authority}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "hardwareType" + }, + "o" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "regionPrefix" + }, + "beta" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + } + ], + "error": "Expected a endpoint to be specified but no endpoint was found", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "https://{Bucket}.op-{outpostId}.{url#authority}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + } + ] + } + ], + "error": "Custom endpoint `{Endpoint}` was not a valid URI", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "ForcePathStyle" + }, + false + ] + }, + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "partitionResult" + }, + "name" + ] + }, + "aws-cn" + ] + } + ], + "error": "S3 Accelerate cannot be used in this region", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + false + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid region: region was not a valid DNS name.", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "scheme" + ] + }, + "http" + ] + }, + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "ForcePathStyle" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid region: region was not a valid DNS name.", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "ForcePathStyle" + }, + false + ] + }, + { + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "bucketArn" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[0]" + ], + "assign": "arnType" + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "arnType" + }, + "" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "service" + ] + }, + "s3-object-lambda" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "arnType" + }, + "accesspoint" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[1]" + ], + "assign": "accessPointName" + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "accessPointName" + }, + "" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "S3 Object Lambda does not support Dual-stack", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + } + ], + "error": "S3 Object Lambda does not support S3 Accelerate", + "type": "error" + }, + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + "" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "DisableAccessPoints" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableAccessPoints" + }, + true + ] + } + ], + "error": "Access points are not supported for this operation", + "type": "error" + }, + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[2]" + ] + } + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "UseArnRegion" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseArnRegion" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + "{Region}" + ] + } + ] + } + ], + "error": "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", + "type": "error" + }, + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + } + ], + "assign": "bucketPartition" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketPartition" + }, + "name" + ] + }, + { + "fn": "getAttr", + "argv": [ + { + "ref": "partitionResult" + }, + "name" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "accountId" + ] + }, + "" + ] + } + ], + "error": "Invalid ARN: Missing account id", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "accountId" + ] + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "accessPointName" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: bucket ARN is missing a region", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "arnType" + }, + "accesspoint" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[1]" + ], + "assign": "accessPointName" + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "accessPointName" + }, + "" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + "" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "arnType" + }, + "accesspoint" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + "" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "DisableAccessPoints" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableAccessPoints" + }, + true + ] + } + ], + "error": "Access points are not supported for this operation", + "type": "error" + }, + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[2]" + ] + } + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "UseArnRegion" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseArnRegion" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + "{Region}" + ] + } + ] + } + ], + "error": "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", + "type": "error" + }, + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + } + ], + "assign": "bucketPartition" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketPartition" + }, + "name" + ] + }, + "{partitionResult#name}" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "service" + ] + }, + "s3" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "accountId" + ] + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "accessPointName" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + } + ], + "error": "Access Points do not support S3 Accelerate", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "accessPointName" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "S3 MRAP does not support dual-stack", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "S3 MRAP does not support FIPS", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + } + ], + "error": "S3 MRAP does not support S3 Accelerate", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableMultiRegionAccessPoints" + }, + true + ] + } + ], + "error": "Invalid configuration: Multi-Region Access Point ARNs are disabled.", + "type": "error" + }, + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "mrapPartition" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "mrapPartition" + }, + "name" + ] + }, + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "partition" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3", + "signingRegionSet": [ + "*" + ] + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Access Point Name", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "service" + ] + }, + "s3-outposts" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "S3 Outposts does not support Dual-stack", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "S3 Outposts does not support FIPS", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + } + ], + "error": "S3 Outposts does not support S3 Accelerate", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[4]" + ] + } + ] + } + ], + "error": "Invalid Arn: Outpost Access Point ARN contains sub resources", + "type": "error" + }, + { + "conditions": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[1]" + ], + "assign": "outpostId" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "outpostId" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "UseArnRegion" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseArnRegion" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + "{Region}" + ] + } + ] + } + ], + "error": "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", + "type": "error" + }, + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + } + ], + "assign": "bucketPartition" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketPartition" + }, + "name" + ] + }, + { + "fn": "getAttr", + "argv": [ + { + "ref": "partitionResult" + }, + "name" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "accountId" + ] + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[2]" + ], + "assign": "outpostType" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[3]" + ], + "assign": "accessPointName" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "outpostType" + }, + "accesspoint" + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{bucketArn#region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Expected an outpost type `accesspoint`, found {outpostType}", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: expected an access point name", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: Expected a 4-component resource", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: The Outpost Id was not set", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: No ARN type specified", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 4, + false + ], + "assign": "arnPrefix" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "arnPrefix" + }, + "arn:" + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ] + } + ] + } + ], + "error": "Invalid ARN: `{Bucket}` was not a valid ARN", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "ForcePathStyle" + }, + true + ] + }, + { + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ], + "error": "Path-style addressing cannot be used with ARN buckets", + "type": "error" + }, + { + "conditions": [ + { + "fn": "uriEncode", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Path-style addressing cannot be used with S3 Accelerate", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "UseObjectLambdaEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseObjectLambdaEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "S3 Object Lambda does not support Dual-stack", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] + } + ], + "error": "S3 Object Lambda does not support S3 Accelerate", + "type": "error" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid region: region was not a valid DNS name.", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://s3.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "https://s3.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://s3.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseGlobalEndpoint" + }, + false + ] + } + ], + "endpoint": { + "url": "https://s3.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid region: region was not a valid DNS name.", + "type": "error" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "A region must be set when sending requests to S3.", + "type": "error" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "region is not a valid DNS-suffix", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "a b", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "Invalid access point ARN: Not S3", + "expect": { + "error": "Invalid ARN: The ARN was not for the S3 service, found: not-s3" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Invalid access point ARN: invalid resource", + "expect": { + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data" + } + }, + { + "documentation": "Invalid access point ARN: invalid no ap name", + "expect": { + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:" + } + }, + { + "documentation": "Invalid access point ARN: AccountId is invalid", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123456_789012`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456_789012:accesspoint:apname", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456_789012:accesspoint:apname" + } + }, + { + "documentation": "Invalid access point ARN: access point name is invalid", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `ap_name`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name" + } + }, + { + "documentation": "Access points (disable access points explicitly false)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Access points: partition does not support FIPS", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Bucket region is invalid", + "expect": { + "error": "Invalid region in ARN: `us-west -2` (invalid DNS name)" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Access points when Access points explicitly disabled (used for CreateBucket)", + "expect": { + "error": "Access points are not supported for this operation" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "missing arn type", + "expect": { + "error": "Invalid ARN: `arn:aws:s3:us-west-2:123456789012:` was not a valid ARN" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:" + } + }, + { + "documentation": "SDK::Host + access point + Dualstack is an error", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "Access point ARN with FIPS & Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Access point ARN with Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "vanilla MRAP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingRegionSet": [ + "*" + ], + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "MRAP does not support FIPS", + "expect": { + "error": "S3 MRAP does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "MRAP does not support DualStack", + "expect": { + "error": "S3 MRAP does not support dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "MRAP does not support S3 Accelerate", + "expect": { + "error": "S3 MRAP does not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "MRAP explicitly disabled", + "expect": { + "error": "Invalid configuration: Multi-Region Access Point ARNs are disabled." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::DisableMultiRegionAccessPoints": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "Dual-stack endpoint with path-style forced", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/bucketname" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucketname", + "Region": "us-west-2", + "ForcePathStyle": true, + "UseFIPS": false, + "Accelerate": false, + "UseDualStack": true + } + }, + { + "documentation": "Dual-stack endpoint + SDK::Host is error", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://abc.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucketname", + "Region": "us-west-2", + "ForcePathStyle": true, + "UseFIPS": false, + "Accelerate": false, + "UseDualStack": true, + "Endpoint": "https://abc.com" + } + }, + { + "documentation": "path style + ARN bucket", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "implicit path style bucket + dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/99_ab" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "implicit path style bucket + dualstack", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "http://abc.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "http://abc.com" + } + }, + { + "documentation": "don't allow URL injections in the bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/example.com%23" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "example.com#", + "Key": "key" + } + } + ], + "params": { + "Bucket": "example.com#", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false + } + }, + { + "documentation": "URI encode bucket names in the path", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket%20name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket name", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false + } + }, + { + "documentation": "scheme is respected", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab" + } + }, + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "scheme is respected (virtual addressing)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucketname.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo" + } + }, + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + implicit private link", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "invalid Endpoint override", + "expect": { + "error": "Custom endpoint `abcde://nota#url` was not a valid URI" + }, + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "abcde://nota#url", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "using an IPv4 address forces path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123.123.0.1/bucketname" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://123.123.0.1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "https://123.123.0.1", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion unset", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "subdomains are not allowed in virtual buckets", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/bucket.name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket.name", + "Region": "us-east-1" + } + }, + { + "documentation": "bucket names with 3 characters are allowed in virtual buckets", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://aaa.s3.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "aaa", + "Key": "key" + } + } + ], + "params": { + "Bucket": "aaa", + "Region": "us-east-1" + } + }, + { + "documentation": "bucket names with fewer than 3 characters are not allowed in virtual host", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/aa" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "aa", + "Key": "key" + } + } + ], + "params": { + "Bucket": "aa", + "Region": "us-east-1" + } + }, + { + "documentation": "bucket names with uppercase characters are not allowed in virtual host", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/BucketName" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "BucketName", + "Key": "key" + } + } + ], + "params": { + "Bucket": "BucketName", + "Region": "us-east-1" + } + }, + { + "documentation": "subdomains are allowed in virtual buckets on http endpoints", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://bucket.name.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "http://example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket.name", + "Region": "us-east-1", + "Endpoint": "http://example.com" + } + }, + { + "documentation": "no region set", + "expect": { + "error": "A region must be set when sending requests to S3." + }, + "params": { + "Bucket": "bucket-name" + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-west-2 uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-west-2", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=cn-north-1 uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "cn-north-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, fips=true uses the regional endpoint with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, dualstack=true uses the regional endpoint with dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, dualstack and fips uses the regional endpoint with fips/dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-west-2 with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-west-2", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 with accelerate on non bucket case uses the global endpoint and ignores accelerate", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with fips uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with dualstack uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with fips and dualstack uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with accelerate on non-bucket case, uses global endpoint and ignores accelerate", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::Accelerate": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "aws-global region with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com" + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with Prefix, and Key uses the global endpoint. Prefix and Key parameters should not be used in endpoint evaluation.", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "ListObjects", + "operationParams": { + "Bucket": "bucket-name", + "Prefix": "prefix" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Prefix": "prefix", + "Key": "key" + } + }, + { + "documentation": "virtual addressing, aws-global region with Copy Source, and Key uses the global endpoint. Copy Source and Key parameters should not be used in endpoint evaluation.", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "CopySource": "/copy/source", + "Key": "key" + } + }, + { + "documentation": "virtual addressing, aws-global region with fips uses the regional fips endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with fips/dualstack uses the regional fips/dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with accelerate uses the global accelerate endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "virtual addressing, aws-global region with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-west-2 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and fips uses the regional fips endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and accelerate uses the global accelerate endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region with fips is invalid", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket-name" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region with dualstack uses regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region custom endpoint uses the custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-west-2 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region, dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region custom endpoint uses the custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ARN with aws-global region and UseArnRegion uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseArnRegion": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "cross partition MRAP ARN is an error", + "expect": { + "error": "Client was configured for partition `aws` but bucket referred to partition `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-west-1" + } + }, + { + "documentation": "Endpoint override, accesspoint with HTTP, port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://myendpoint-123456789012.beta.example.com:1234" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://beta.example.com:1234" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Endpoint": "http://beta.example.com:1234", + "Region": "us-west-2", + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Endpoint override, accesspoint with http, path, query, and port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://myendpoint-123456789012.beta.example.com:1234/path" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "non-bucket endpoint override with FIPS = error", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "FIPS + dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "custom endpoint without FIPS/dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://beta.example.com:1234/path" + } + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "s3 object lambda with access points disabled", + "expect": { + "error": "Access points are not supported for this operation" + }, + "params": { + "Region": "us-west-2", + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:myendpoint", + "DisableAccessPoints": true + } + }, + { + "documentation": "non bucket + FIPS", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "standard non bucket endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "non bucket endpoint with FIPS + Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "non bucket endpoint with dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "use global endpoint + IP address endpoint override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://127.0.0.1/bucket" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "http://127.0.0.1", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "non-dns endpoint + global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + use global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + dualstack + non-bucket endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "FIPS + dualstack + non-DNS endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "endpoint override + FIPS + dualstack (BUG)", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "endpoint override + non-dns bucket + FIPS (BUG)", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + bucket endpoint + force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "bucket + FIPS + force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + dualstack + use global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bucket.s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": true, + "UseDualStack": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "URI encoded bucket + use global endpoint", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "https://foo.com" + } + }, + { + "documentation": "FIPS + path based endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "accelerate + dualstack + global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bucket.s3-accelerate.dualstack.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "dualstack + global endpoint + non URI safe bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "Accelerate": false, + "UseDualStack": true, + "UseFIPS": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + uri encoded bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "Accelerate": false, + "UseDualStack": false, + "UseFIPS": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + non-uri safe endpoint + force path style", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "Accelerate": false, + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "http://foo.com", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + Dualstack + global endpoint + non-dns bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "Accelerate": false, + "UseDualStack": true, + "UseFIPS": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + FIPS + dualstack", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "non-bucket endpoint override + dualstack + global endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "Endpoint override + UseGlobalEndpoint + us-east-1", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "non-FIPS partition with FIPS set + custom endpoint", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "aws-global signs as us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseFIPS": true, + "Accelerate": false, + "UseDualStack": true + } + }, + { + "documentation": "aws-global signs as us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.foo.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "https://foo.com" + } + }, + { + "documentation": "aws-global + dualstack + path-only bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": false + } + }, + { + "documentation": "aws-global + path-only bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!" + } + }, + { + "documentation": "aws-global + fips + custom endpoint", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": false, + "UseFIPS": true, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "aws-global, endpoint override & path only-bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "aws-global + dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "aws-global", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "accelerate, dualstack + aws-global", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.s3-accelerate.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": true + } + }, + { + "documentation": "FIPS + aws-global + path only bucket. This is not supported by S3 but we allow garbage in garbage out", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseDualStack": true, + "UseFIPS": true, + "Accelerate": false + } + }, + { + "documentation": "aws-global + FIPS + endpoint override.", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "force path style, FIPS, aws-global & endpoint override", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "ip address causes path style to be forced", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://192.168.1.1/bucket" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "Endpoint": "http://192.168.1.1" + } + }, + { + "documentation": "endpoint override with aws-global region", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + path-only (TODO: consider making this an error)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseFIPS": true + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Invalid ARN: No ARN type specified" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:not-s3:us-west-2:123456789012::myendpoint" + } + }, + { + "documentation": "path style can't be used with accelerate", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "Accelerate": true + } + }, + { + "documentation": "invalid region", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "us-east-2!", + "Bucket": "bucket.subdomain", + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "invalid region", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "us-east-2!", + "Bucket": "bucket", + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Invalid Access Point Name" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3::123456789012:accesspoint:my_endpoint" + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint`) has `aws-cn`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint", + "UseArnRegion": true + } + }, + { + "documentation": "invalid arn region", + "expect": { + "error": "Invalid region in ARN: `us-east_2` (invalid DNS name)" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-object-lambda:us-east_2:123456789012:accesspoint:my-endpoint", + "UseArnRegion": true + } + }, + { + "documentation": "invalid ARN outpost", + "expect": { + "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `op_01234567890123456`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op_01234567890123456/accesspoint/reports", + "UseArnRegion": true + } + }, + { + "documentation": "invalid ARN", + "expect": { + "error": "Invalid ARN: expected an access point name" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/reports" + } + }, + { + "documentation": "invalid ARN", + "expect": { + "error": "Invalid ARN: Expected a 4-component resource" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Expected an outpost type `accesspoint`, found not-accesspoint" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid region in ARN: `us-east_1` (invalid DNS name)" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east_1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `12345_789012`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:12345_789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid ARN: The Outpost Id was not set" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:12345789012:outpost" + } + }, + { + "documentation": "use global endpoint virtual addressing", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucket.example.com" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Endpoint": "http://example.com", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "global endpoint + ip address", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://192.168.0.1/bucket" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Endpoint": "http://192.168.0.1", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-east-2.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.s3-accelerate.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Accelerate": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "use global endpoint + custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "use global endpoint, not us-east-1, force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "vanilla virtual addressing@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.dualstack.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate (dualstack=false)@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + fips@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "virtual addressing + dualstack + fips@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "accelerate + fips = error@us-west-2", + "expect": { + "error": "Accelerate cannot be used with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla virtual addressing@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + dualstack@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate (dualstack=false)@cn-north-1", + "expect": { + "error": "S3 Accelerate cannot be used in this region" + }, + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + fips@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla virtual addressing@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.dualstack.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate (dualstack=false)@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "virtual addressing + dualstack + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "accelerate + fips = error@af-south-1", + "expect": { + "error": "Accelerate cannot be used with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla path style@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "fips@us-gov-west-2, bucket is not S3-dns-compatible (subdomains)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "us-gov-west-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.us-gov-west-1.amazonaws.com/bucket.with.dots" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.with.dots", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket.with.dots", + "Region": "us-gov-west-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@us-west-2", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "path style + arn is error@us-west-2", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "no path style + invalid DNS name@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla path style@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + fips@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@cn-north-1", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.cn-north-1.amazonaws.com.cn/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "path style + arn is error@cn-north-1", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "no path style + invalid DNS name@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla path style@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.af-south-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@af-south-1", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.af-south-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "path style + arn is error@af-south-1", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "no path style + invalid DNS name@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + private link@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + FIPS@us-west-2", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "SDK::Host + DualStack@us-west-2", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@us-west-2", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + private link@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "FIPS@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "SDK::Host + DualStack@cn-north-1", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@cn-north-1", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + private link@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + FIPS@af-south-1", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "SDK::Host + DualStack@af-south-1", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@af-south-1", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "access point arn + accelerate = error@us-west-2", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS + DualStack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "vanilla access point arn@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "access point arn + accelerate = error@cn-north-1", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS + DualStack@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "vanilla access point arn@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "access point arn + accelerate = error@af-south-1", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS + DualStack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "S3 outposts vanilla test", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.example.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Endpoint": "https://example.amazonaws.com" + } + }, + { + "documentation": "outposts arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with region mismatch, custom region and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Endpoint": "https://example.com", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with region mismatch and UseArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with region mismatch and UseArnRegion unset", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with partition mismatch and UseArnRegion=true", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "ARN with UseGlobalEndpoint and use-east-1 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts does not support dualstack", + "expect": { + "error": "S3 Outposts does not support Dual-stack" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts does not support fips", + "expect": { + "error": "S3 Outposts does not support FIPS" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts does not support accelerate", + "expect": { + "error": "S3 Outposts does not support S3 Accelerate" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "validates against subresource", + "expect": { + "error": "Invalid Arn: Outpost Access Point ARN contains sub resources" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:mybucket:object:foo" + } + }, + { + "documentation": "object lambda @us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda, colon resource deliminator @us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region us-west-2, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "s3-external-1", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "s3-external-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `s3-external-1` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "s3-external-1", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "s3-external-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `aws-global` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @cn-north-1, client region us-west-2 (cross partition), useArnRegion=true", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner`) has `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with dualstack", + "expect": { + "error": "S3 Object Lambda does not support Dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-gov-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-gov-east-1, with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @cn-north-1, with fips", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with accelerate", + "expect": { + "error": "S3 Object Lambda does not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true, + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - bad service and someresource", + "expect": { + "error": "Invalid ARN: Unrecognized format: arn:aws:sqs:us-west-2:123456789012:someresource (type: someresource)" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource" + } + }, + { + "documentation": "object lambda with invalid arn - invalid resource", + "expect": { + "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `bucket_name`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:bucket_name:mybucket" + } + }, + { + "documentation": "object lambda with invalid arn - missing region", + "expect": { + "error": "Invalid ARN: bucket ARN is missing a region" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda::123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - missing account-id", + "expect": { + "error": "Invalid ARN: Missing account id" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2::accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - account id contains invalid characters", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123.45678.9012`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket" + } + }, + { + "documentation": "object lambda with invalid arn - missing access point name", + "expect": { + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains invalid character: *", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `*`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:*" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains invalid character: .", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `my.bucket`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:my.bucket" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains sub resources", + "expect": { + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`." + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybucket:object:foo" + } + }, + { + "documentation": "object lambda with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.my-endpoint.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://my-endpoint.com", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Endpoint": "https://my-endpoint.com" + } + }, + { + "documentation": "object lambda arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse @ us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://my-endpoint.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://my-endpoint.com" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Endpoint": "https://my-endpoint.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse @ us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "WriteGetObjectResponse with dualstack", + "expect": { + "error": "S3 Object Lambda does not support Dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with accelerate", + "expect": { + "error": "S3 Object Lambda does not support S3 Accelerate" + }, + "params": { + "Accelerate": true, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with fips in CN", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Region": "cn-north-1", + "UseObjectLambdaEndpoint": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "WriteGetObjectResponse with invalid partition", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "not a valid DNS name", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with an unknown partition", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "disableDoubleEncoding": true, + "signingRegion": "us-east.special" + } + ] + }, + "url": "https://s3-object-lambda.us-east.special.amazonaws.com" + } + }, + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east.special", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Prod us-west-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.op-0b1d075431d83bebd.s3-outposts.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Prod ap-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "ap-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.op-0b1d075431d83bebd.s3-outposts.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Prod us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.ec2.s3-outposts.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Prod me-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "me-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.ec2.s3-outposts.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "Bucket": "test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Beta", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3.op-0b1d075431d83bebd.example.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3", + "Endpoint": "https://example.amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Beta", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3.ec2.example.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3", + "Endpoint": "https://example.amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias - No endpoint set for beta", + "expect": { + "error": "Expected a endpoint to be specified but no endpoint was found" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Invalid hardware type", + "expect": { + "error": "Unrecognized hardware type: \"Expected hardware type o or e but got h\"" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-h0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Special character in Outpost Arn", + "expect": { + "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`." + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o00000754%1d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias - No endpoint set for beta", + "expect": { + "error": "Expected a endpoint to be specified but no endpoint was found" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-e0b1d075431d83bebde8xz5w8ijx1qzlbp3i3ebeta0--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow with bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://10.0.1.12:433/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "http://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow without bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://10.0.1.12:433" + } + }, + "params": { + "Region": "snow", + "Endpoint": "https://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow no port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://10.0.1.12/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "http://10.0.1.12", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow dns endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://amazonaws.com/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "https://amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "Data Plane with short zone name", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--abcd-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--abcd-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone name china region", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--abcd-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "mybucket--abcd-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone name with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--abcd-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--abcd-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone name with AP china region", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--abcd-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "myaccesspoint--abcd-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone names (13 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone names (13 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with medium zone names (14 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with medium zone names (14 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long zone names (20 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long zone names (20 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-ab1--x-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone fips china region", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-ab1--xa-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone fips with AP china region", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone (13 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone (13 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with medium zone (14 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with medium zone (14 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long zone (20 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long zone (20 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long AZ with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long AZ fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Control plane with short AZ bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane with short AZ bucket china region", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control.cn-north-1.amazonaws.com.cn/mybucket--test-ab1--x-s3" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane with short AZ bucket and fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control-fips.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane with short AZ bucket and fips china region", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane without bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "ListDirectoryBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane without bucket and fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "ListDirectoryBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short zone (13 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short zone (13 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short zone (13 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short zone (13 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with medium zone(14 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with medium zone(14 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long zone(20 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long zone(20 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with medium zone (14 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with medium zone (14 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long zone (20 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long zone (20 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Control Plane host override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.custom.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "Control Plane host override with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--usw2-az1--xa-s3.custom.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "Control Plane host override no bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://custom.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "Data plane host override non virtual session auth", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/mybucket--usw2-az1--x-s3" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://10.0.0.1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://10.0.0.1" + } + }, + { + "documentation": "Data plane host override non virtual session auth with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://10.0.0.1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://10.0.0.1" + } + }, + { + "documentation": "Control Plane host override ip", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/mybucket--usw2-az1--x-s3" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://10.0.0.1" + } + }, + { + "documentation": "Control Plane host override ip with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://10.0.0.1" + } + }, + { + "documentation": "Data plane host override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.custom.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "Data plane host override with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--usw2-az1--xa-s3.custom.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "bad format error", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usaz1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--usaz1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "bad AP format error", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--usaz1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--usaz1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "bad format error no session auth", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usaz1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--usaz1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "bad AP format error no session auth", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--usaz1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--usaz1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "dual-stack error", + "expect": { + "error": "S3Express does not support Dual-stack." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "dual-stack error with AP", + "expect": { + "error": "S3Express does not support Dual-stack." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "accelerate error", + "expect": { + "error": "S3Express does not support S3 Accelerate." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "accelerate error with AP", + "expect": { + "error": "S3Express does not support S3 Accelerate." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data plane bucket format error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.bucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "my.bucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data plane AP format error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "my.myaccesspoint--test-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "host override data plane bucket error session auth", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.bucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "my.bucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "host override data plane AP error session auth", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "host override data plane bucket error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "params": { + "Region": "us-west-2", + "Bucket": "my.bucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com", + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "host override data plane AP error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "params": { + "Region": "us-west-2", + "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com", + "DisableS3ExpressSessionAuth": true + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.s3#AnalyticsAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix to use when evaluating an AND predicate: The prefix that an object must have\n to be included in the metrics results.

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

The list of tags to use when evaluating an AND predicate.

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

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates in any combination, and an object must match\n all of the predicates for the filter to apply.

" + } + }, + "com.amazonaws.s3#AnalyticsConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#AnalyticsId", + "traits": { + "smithy.api#documentation": "

The ID that identifies the analytics configuration.

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

The filter used to describe a set of objects for analyses. A filter must have exactly\n one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided,\n all objects will be considered in any analysis.

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

Contains data related to access patterns to be collected and made available to analyze\n the tradeoffs between different storage classes.

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

Specifies the configuration and any analyses for the analytics filter of an Amazon S3\n bucket.

" + } + }, + "com.amazonaws.s3#AnalyticsConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#AnalyticsConfiguration" + } + }, + "com.amazonaws.s3#AnalyticsExportDestination": { + "type": "structure", + "members": { + "S3BucketDestination": { + "target": "com.amazonaws.s3#AnalyticsS3BucketDestination", + "traits": { + "smithy.api#documentation": "

A destination signifying output to an S3 bucket.

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

Where to publish the analytics results.

" + } + }, + "com.amazonaws.s3#AnalyticsFilter": { + "type": "union", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix to use when evaluating an analytics filter.

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

The tag to use when evaluating an analytics filter.

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

A conjunction (logical AND) of predicates, which is used in evaluating an analytics\n filter. The operator must have at least two predicates.

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

The filter used to describe a set of objects for analyses. A filter must have exactly\n one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided,\n all objects will be considered in any analysis.

" + } + }, + "com.amazonaws.s3#AnalyticsId": { + "type": "string" + }, + "com.amazonaws.s3#AnalyticsS3BucketDestination": { + "type": "structure", + "members": { + "Format": { + "target": "com.amazonaws.s3#AnalyticsS3ExportFileFormat", + "traits": { + "smithy.api#documentation": "

Specifies the file format used when exporting data to Amazon S3.

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

The account ID that owns the destination S3 bucket. If no account ID is provided, the\n owner is not validated before exporting data.

\n \n

Although this value is optional, we strongly recommend that you set it to help\n prevent problems if the destination bucket ownership changes.

\n
" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket to which data is exported.

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

The prefix to use when exporting data. The prefix is prepended to all results.

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

Contains information about where to publish the analytics results.

" + } + }, + "com.amazonaws.s3#AnalyticsS3ExportFileFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" + } + } + } + }, + "com.amazonaws.s3#ArchiveStatus": { + "type": "enum", + "members": { + "ARCHIVE_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVE_ACCESS" + } + }, + "DEEP_ARCHIVE_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE_ACCESS" + } + } + } + }, + "com.amazonaws.s3#Body": { + "type": "blob" + }, + "com.amazonaws.s3#Bucket": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket.

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

Date the bucket was created. This date can change when making changes to your bucket,\n such as editing its bucket policy.

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

\n BucketRegion indicates the Amazon Web Services region where the bucket is located. If the\n request contains at least one valid parameter, it is included in the response.

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

In terms of implementation, a Bucket is a resource.

" + } + }, + "com.amazonaws.s3#BucketAccelerateStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Suspended": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Suspended" + } + } + } + }, + "com.amazonaws.s3#BucketAlreadyExists": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The requested bucket name is not available. The bucket namespace is shared by all users\n of the system. Select a different name and try again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.s3#BucketAlreadyOwnedByYou": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The bucket you tried to create already exists, and you own it. Amazon S3 returns this error\n in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you\n re-create an existing bucket that you already own in the North Virginia Region, Amazon S3\n returns 200 OK and resets the bucket access control lists (ACLs).

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.s3#BucketCannedACL": { + "type": "enum", + "members": { + "private": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "private" + } + }, + "public_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read" + } + }, + "public_read_write": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read-write" + } + }, + "authenticated_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "authenticated-read" + } + } + } + }, + "com.amazonaws.s3#BucketInfo": { + "type": "structure", + "members": { + "DataRedundancy": { + "target": "com.amazonaws.s3#DataRedundancy", + "traits": { + "smithy.api#documentation": "

The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

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

The type of bucket.

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

Specifies the information about the bucket that will be created. For more information\n about directory buckets, see Directory buckets in the Amazon S3 User Guide.

\n \n

This functionality is only supported by directory buckets.

\n
" + } + }, + "com.amazonaws.s3#BucketKeyEnabled": { + "type": "boolean" + }, + "com.amazonaws.s3#BucketLifecycleConfiguration": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.s3#LifecycleRules", + "traits": { + "smithy.api#documentation": "

A lifecycle rule for individual objects in an Amazon S3 bucket.

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

Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more\n information, see Object Lifecycle Management\n in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#BucketLocationConstraint": { + "type": "enum", + "members": { + "af_south_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "af-south-1" + } + }, + "ap_east_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-east-1" + } + }, + "ap_northeast_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-northeast-1" + } + }, + "ap_northeast_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-northeast-2" + } + }, + "ap_northeast_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-northeast-3" + } + }, + "ap_south_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-south-1" + } + }, + "ap_south_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-south-2" + } + }, + "ap_southeast_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-1" + } + }, + "ap_southeast_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-2" + } + }, + "ap_southeast_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-3" + } + }, + "ap_southeast_4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-4" + } + }, + "ap_southeast_5": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-5" + } + }, + "ca_central_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ca-central-1" + } + }, + "cn_north_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cn-north-1" + } + }, + "cn_northwest_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cn-northwest-1" + } + }, + "EU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EU" + } + }, + "eu_central_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-central-1" + } + }, + "eu_central_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-central-2" + } + }, + "eu_north_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-north-1" + } + }, + "eu_south_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-south-1" + } + }, + "eu_south_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-south-2" + } + }, + "eu_west_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-west-1" + } + }, + "eu_west_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-west-2" + } + }, + "eu_west_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-west-3" + } + }, + "il_central_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "il-central-1" + } + }, + "me_central_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "me-central-1" + } + }, + "me_south_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "me-south-1" + } + }, + "sa_east_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sa-east-1" + } + }, + "us_east_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-east-2" + } + }, + "us_gov_east_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-gov-east-1" + } + }, + "us_gov_west_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-gov-west-1" + } + }, + "us_west_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-west-1" + } + }, + "us_west_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-west-2" + } + } + } + }, + "com.amazonaws.s3#BucketLocationName": { + "type": "string" + }, + "com.amazonaws.s3#BucketLoggingStatus": { + "type": "structure", + "members": { + "LoggingEnabled": { + "target": "com.amazonaws.s3#LoggingEnabled" + } + }, + "traits": { + "smithy.api#documentation": "

Container for logging status information.

" + } + }, + "com.amazonaws.s3#BucketLogsPermission": { + "type": "enum", + "members": { + "FULL_CONTROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL_CONTROL" + } + }, + "READ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READ" + } + }, + "WRITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WRITE" + } + } + } + }, + "com.amazonaws.s3#BucketName": { + "type": "string" + }, + "com.amazonaws.s3#BucketRegion": { + "type": "string" + }, + "com.amazonaws.s3#BucketType": { + "type": "enum", + "members": { + "Directory": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Directory" + } + } + } + }, + "com.amazonaws.s3#BucketVersioningStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Suspended": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Suspended" + } + } + } + }, + "com.amazonaws.s3#Buckets": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Bucket", + "traits": { + "smithy.api#xmlName": "Bucket" + } + } + }, + "com.amazonaws.s3#BypassGovernanceRetention": { + "type": "boolean" + }, + "com.amazonaws.s3#BytesProcessed": { + "type": "long" + }, + "com.amazonaws.s3#BytesReturned": { + "type": "long" + }, + "com.amazonaws.s3#BytesScanned": { + "type": "long" + }, + "com.amazonaws.s3#CORSConfiguration": { + "type": "structure", + "members": { + "CORSRules": { + "target": "com.amazonaws.s3#CORSRules", + "traits": { + "smithy.api#documentation": "

A set of origins and methods (cross-origin access that you want to allow). You can add\n up to 100 rules to the configuration.

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

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more\n information, see Enabling\n Cross-Origin Resource Sharing in the\n Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#CORSRule": { + "type": "structure", + "members": { + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

Unique identifier for the rule. The value cannot be longer than 255 characters.

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

Headers that are specified in the Access-Control-Request-Headers header.\n These headers are allowed in a preflight OPTIONS request. In response to any preflight\n OPTIONS request, Amazon S3 returns any requested headers that are allowed.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AllowedHeader" + } + }, + "AllowedMethods": { + "target": "com.amazonaws.s3#AllowedMethods", + "traits": { + "smithy.api#documentation": "

An HTTP method that you allow the origin to execute. Valid values are GET,\n PUT, HEAD, POST, and DELETE.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AllowedMethod" + } + }, + "AllowedOrigins": { + "target": "com.amazonaws.s3#AllowedOrigins", + "traits": { + "smithy.api#documentation": "

One or more origins you want customers to be able to access the bucket from.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AllowedOrigin" + } + }, + "ExposeHeaders": { + "target": "com.amazonaws.s3#ExposeHeaders", + "traits": { + "smithy.api#documentation": "

One or more headers in the response that you want customers to be able to access from\n their applications (for example, from a JavaScript XMLHttpRequest\n object).

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "ExposeHeader" + } + }, + "MaxAgeSeconds": { + "target": "com.amazonaws.s3#MaxAgeSeconds", + "traits": { + "smithy.api#documentation": "

The time in seconds that your browser is to cache the preflight response for the\n specified resource.

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

Specifies a cross-origin access rule for an Amazon S3 bucket.

" + } + }, + "com.amazonaws.s3#CORSRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#CORSRule" + } + }, + "com.amazonaws.s3#CSVInput": { + "type": "structure", + "members": { + "FileHeaderInfo": { + "target": "com.amazonaws.s3#FileHeaderInfo", + "traits": { + "smithy.api#documentation": "

Describes the first line of input. Valid values are:

\n
    \n
  • \n

    \n NONE: First line is not a header.

    \n
  • \n
  • \n

    \n IGNORE: First line is a header, but you can't use the header values\n to indicate the column in an expression. You can use column position (such as _1, _2,\n \u2026) to indicate the column (SELECT s._1 FROM OBJECT s).

    \n
  • \n
  • \n

    \n Use: First line is a header, and you can use the header value to\n identify a column in an expression (SELECT \"name\" FROM OBJECT).

    \n
  • \n
" + } + }, + "Comments": { + "target": "com.amazonaws.s3#Comments", + "traits": { + "smithy.api#documentation": "

A single character used to indicate that a row should be ignored when the character is\n present at the start of that row. You can specify any character to indicate a comment line.\n The default character is #.

\n

Default: #\n

" + } + }, + "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\n \".

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

A single character used to separate individual records in the input. Instead of the\n default value, you can specify an arbitrary delimiter.

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

A single character used to separate individual fields in a record. You can specify an\n arbitrary delimiter.

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

A single character used for escaping when the field delimiter is part of the value. For\n example, if the value is a, b, Amazon S3 wraps this field value in quotation marks,\n as follows: \" a , b \".

\n

Type: String

\n

Default: \"\n

\n

Ancestors: CSV\n

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

Specifies that CSV field values may contain quoted record delimiters and such records\n should be allowed. Default value is FALSE. Setting this value to TRUE may lower\n performance.

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

Describes how an uncompressed comma-separated values (CSV)-formatted input object is\n formatted.

" + } + }, + "com.amazonaws.s3#CSVOutput": { + "type": "structure", + "members": { + "QuoteFields": { + "target": "com.amazonaws.s3#QuoteFields", + "traits": { + "smithy.api#documentation": "

Indicates whether to use quotation marks around output fields.

\n
    \n
  • \n

    \n ALWAYS: Always use quotation marks for output fields.

    \n
  • \n
  • \n

    \n ASNEEDED: Use quotation marks for output fields when needed.

    \n
  • \n
" + } + }, + "QuoteEscapeCharacter": { + "target": "com.amazonaws.s3#QuoteEscapeCharacter", + "traits": { + "smithy.api#documentation": "

The single character used for escaping the quote character inside an already escaped\n value.

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

A single character used to separate individual records in the output. Instead of the\n default value, you can specify an arbitrary delimiter.

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

The value used to separate individual fields in a record. You can specify an arbitrary\n delimiter.

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

A single character used for escaping when the field delimiter is part of the value. For\n example, if the value is a, b, Amazon S3 wraps this field value in quotation marks,\n as follows: \" a , b \".

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

Describes how uncompressed comma-separated values (CSV)-formatted results are\n formatted.

" + } + }, + "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present\n if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

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

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see 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": "enum", + "members": { + "CRC32": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CRC32" + } + }, + "CRC32C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CRC32C" + } + }, + "SHA1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHA1" + } + }, + "SHA256": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHA256" + } + }, + "CRC64NVME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CRC64NVME" + } + } + } + }, + "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#ChecksumCRC64NVME": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumMode": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + } + } + }, + "com.amazonaws.s3#ChecksumSHA1": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumSHA256": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumType": { + "type": "enum", + "members": { + "COMPOSITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPOSITE" + } + }, + "FULL_OBJECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL_OBJECT" + } + } + } + }, + "com.amazonaws.s3#Code": { + "type": "string" + }, + "com.amazonaws.s3#Comments": { + "type": "string" + }, + "com.amazonaws.s3#CommonPrefix": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Container for the specified common prefix.

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

Container for all (if there are any) keys between Prefix and the next occurrence of the\n string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in\n the directory specified by Prefix. For example, if the prefix is notes/ and the delimiter\n is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

" + } + }, + "com.amazonaws.s3#CommonPrefixList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#CommonPrefix" + } + }, + "com.amazonaws.s3#CompleteMultipartUpload": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CompleteMultipartUploadRequest" + }, + "output": { + "target": "com.amazonaws.s3#CompleteMultipartUploadOutput" + }, + "traits": { + "smithy.api#documentation": "

Completes a multipart upload by assembling previously uploaded parts.

\n

You first initiate the multipart upload and then upload all parts using the UploadPart\n operation or the UploadPartCopy operation.\n After successfully uploading all relevant parts of an upload, you call this\n CompleteMultipartUpload operation to complete the upload. Upon receiving\n this request, Amazon S3 concatenates all the parts in ascending order by part number to create a\n new object. In the CompleteMultipartUpload request, you must provide the parts list and\n ensure that the parts list is complete. The CompleteMultipartUpload API operation\n concatenates the parts that you provide in the list. For each part in the list, you must\n provide the PartNumber value and the ETag value that are returned\n after that part was uploaded.

\n

The processing of a CompleteMultipartUpload request could take several minutes to\n finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that\n specifies a 200 OK response. While processing is in progress, Amazon S3\n periodically sends white space characters to keep the connection from timing out. A request\n could fail after the initial 200 OK response has been sent. This means that a\n 200 OK response can contain either a success or an error. The error\n response might be embedded in the 200 OK response. If you call this API\n operation directly, make sure to design your application to parse the contents of the\n response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition.\n The SDKs detect the embedded error and apply error handling per your configuration settings\n (including automatically retrying the request as appropriate). If the condition persists,\n the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an\n error).

\n

Note that if CompleteMultipartUpload fails, applications should be prepared\n to retry any failed requests (including 500 error responses). For more information, see\n Amazon S3 Error\n Best Practices.

\n \n

You can't use Content-Type: application/x-www-form-urlencoded for the\n CompleteMultipartUpload requests. Also, if you don't provide a Content-Type\n header, CompleteMultipartUpload can still return a 200 OK\n response.

\n
\n

For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n

    If you provide an additional checksum\n value in your MultipartUpload requests and the\n object is encrypted with Key Management Service, you must have permission to use the\n kms:Decrypt action for the\n CompleteMultipartUpload request to succeed.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: EntityTooSmall\n

    \n
      \n
    • \n

      Description: Your proposed upload is smaller than the minimum\n allowed object size. Each part must be at least 5 MB in size, except\n the last part.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

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

    Error Code: InvalidPart\n

    \n
      \n
    • \n

      Description: One or more of the specified parts could not be found.\n The part might not have been uploaded, or the specified ETag might not\n have matched the uploaded part's ETag.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

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

    Error Code: InvalidPartOrder\n

    \n
      \n
    • \n

      Description: The list of parts was not in ascending order. The\n parts list must be specified in order by part number.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

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

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CompleteMultipartUpload:

\n ", + "smithy.api#examples": [ + { + "title": "To complete multipart upload", + "documentation": "The following example completes a multipart upload.", + "input": { + "Bucket": "examplebucket", + "Key": "bigobject", + "MultipartUpload": { + "Parts": [ + { + "PartNumber": 1, + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" + }, + { + "PartNumber": 2, + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" + } + ] + }, + "UploadId": "7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" + }, + "output": { + "ETag": "\"4d9031c7644d8081c2829f4ea23c55f7-2\"", + "Bucket": "acexamplebucket", + "Location": "https://examplebucket.s3..amazonaws.com/bigobject", + "Key": "bigobject" + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}/{Key+}", + "code": 200 + } + } + }, + "com.amazonaws.s3#CompleteMultipartUploadOutput": { + "type": "structure", + "members": { + "Location": { + "target": "com.amazonaws.s3#Location", + "traits": { + "smithy.api#documentation": "

The URI that identifies the newly created object.

" + } + }, + "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\n ARN or access point alias if used.

\n \n

Access points are not supported by directory buckets.

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

The object key of the newly created object.

" + } + }, + "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\n rule-id is URL-encoded.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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. For more information about\n how the entity tag is calculated, see Checking object\n 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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

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

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

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

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

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header as a data integrity\n check to verify that the checksum type that is received is the same checksum type that was\n specified during the CreateMultipartUpload request. For more information, see\n Checking object integrity\n in the Amazon S3 User Guide.

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

The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256, aws:kms).

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

Version ID of the newly created object, in case the bucket has versioning turned\n on.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

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

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "CompleteMultipartUploadResult" + } + }, + "com.amazonaws.s3#CompleteMultipartUploadRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

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

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

Object key for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "MultipartUpload": { + "target": "com.amazonaws.s3#CompletedMultipartUpload", + "traits": { + "smithy.api#documentation": "

The container for the multipart upload request information.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "CompleteMultipartUpload" + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

ID for the initiated multipart upload.

", + "smithy.api#httpQuery": "uploadId", + "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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "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 SHA1 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 SHA256 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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

This header specifies the checksum type of the object, which determines how part-level\n checksums are combined to create an object-level checksum for multipart objects. You can\n use this header as a data integrity check to verify that the checksum type that is received\n is the same checksum that was specified. If the checksum type doesn\u2019t match the checksum\n type that was specified for the object during the CreateMultipartUpload\n request, it\u2019ll result in a BadDigest error. For more information, see Checking\n object integrity in the Amazon S3 User Guide.

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

The expected total object size of the multipart upload request. If there\u2019s a mismatch\n between the specified object size value and the actual object size value, it results in an\n HTTP 400 InvalidRequest error.

", + "smithy.api#httpHeader": "x-amz-mp-object-size" + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

Uploads the object only if the ETag (entity tag) value provided during the WRITE\n operation matches the ETag of the object in S3. If the ETag values do not match, the\n operation returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the\n multipart upload with CreateMultipartUpload, and re-upload each part.

\n

Expects the ETag value as a string.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

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

Uploads the object only if the object key name does not already exist in the bucket\n specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should re-initiate the\n multipart upload with CreateMultipartUpload and re-upload each part.

\n

Expects the '*' (asterisk) character.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

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

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CompletedMultipartUpload": { + "type": "structure", + "members": { + "Parts": { + "target": "com.amazonaws.s3#CompletedPartList", + "traits": { + "smithy.api#documentation": "

Array of CompletedPart data types.

\n

If you do not supply a valid Part with your request, the service sends back\n an HTTP 400 response.

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

The container for the completed multipart upload details.

" + } + }, + "com.amazonaws.s3#CompletedPart": { + "type": "structure", + "members": { + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "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 part. This checksum is present\n if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

Part number that identifies the part. This is a positive integer between 1 and\n 10,000.

\n \n
    \n
  • \n

    \n General purpose buckets - In\n CompleteMultipartUpload, when a additional checksum (including\n x-amz-checksum-crc32, x-amz-checksum-crc32c,\n x-amz-checksum-sha1, or x-amz-checksum-sha256) is\n applied to each part, the PartNumber must start at 1 and the part\n numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad\n Request status code and an InvalidPartOrder error\n code.

    \n
  • \n
  • \n

    \n Directory buckets - In\n CompleteMultipartUpload, the PartNumber must start at\n 1 and the part numbers must be consecutive.

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

Details of the parts that were uploaded.

" + } + }, + "com.amazonaws.s3#CompletedPartList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#CompletedPart" + } + }, + "com.amazonaws.s3#CompressionType": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "GZIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GZIP" + } + }, + "BZIP2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BZIP2" + } + } + } + }, + "com.amazonaws.s3#Condition": { + "type": "structure", + "members": { + "HttpErrorCodeReturnedEquals": { + "target": "com.amazonaws.s3#HttpErrorCodeReturnedEquals", + "traits": { + "smithy.api#documentation": "

The HTTP error code when the redirect is applied. In the event of an error, if the error\n code equals this value, then the specified redirect is applied. Required when parent\n element Condition is specified and sibling KeyPrefixEquals is not\n specified. If both are specified, then both must be true for the redirect to be\n applied.

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

The object key name prefix when the redirect is applied. For example, to redirect\n requests for ExamplePage.html, the key prefix will be\n ExamplePage.html. To redirect request for all pages with the prefix\n docs/, the key prefix will be /docs, which identifies all\n objects in the docs/ folder. Required when the parent element\n Condition is specified and sibling HttpErrorCodeReturnedEquals\n is not specified. If both conditions are specified, both must be true for the redirect to\n be applied.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

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

A container for describing a condition that must be met for the specified redirect to\n apply. For example, 1. If request is for pages in the /docs folder, redirect\n to the /documents folder. 2. If request results in HTTP error 4xx, redirect\n request to another host where you might process the error.

" + } + }, + "com.amazonaws.s3#ConfirmRemoveSelfBucketAccess": { + "type": "boolean" + }, + "com.amazonaws.s3#ContentDisposition": { + "type": "string" + }, + "com.amazonaws.s3#ContentEncoding": { + "type": "string" + }, + "com.amazonaws.s3#ContentLanguage": { + "type": "string" + }, + "com.amazonaws.s3#ContentLength": { + "type": "long" + }, + "com.amazonaws.s3#ContentMD5": { + "type": "string" + }, + "com.amazonaws.s3#ContentRange": { + "type": "string" + }, + "com.amazonaws.s3#ContentType": { + "type": "string" + }, + "com.amazonaws.s3#ContinuationEvent": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

" + } + }, + "com.amazonaws.s3#CopyObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CopyObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#CopyObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#ObjectNotInActiveTierError" + } + ], + "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 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

You can copy individual objects between general purpose buckets, between directory buckets,\n and between general purpose buckets and directory buckets.

\n \n
    \n
  • \n

    Amazon S3 supports copy operations using Multi-Region Access Points only as a\n destination when using the Multi-Region Access Point ARN.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    VPC endpoints don't support cross-Region requests (including copies). If you're\n using VPC endpoints, your source and destination buckets should be in the same\n Amazon Web Services Region as your VPC endpoint.

    \n
  • \n
\n
\n

Both the Region that you want to copy the object from and the Region that you want to\n copy the object to must be enabled for your account. For more information about how to\n enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services\n Account Management Guide.

\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\n Acceleration.

\n
\n
\n
Authentication and authorization
\n
\n

All CopyObject requests must be authenticated and signed by using\n IAM credentials (access key ID and secret access key for the IAM identities).\n All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use the\n IAM credentials to authenticate and authorize your access to the\n CopyObject API operation, instead of using the temporary security\n credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

You must have read access to the source object and\n write access to the destination bucket.

\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have permissions in an IAM policy based on the source and destination\n bucket types in a CopyObject operation.

    \n
      \n
    • \n

      If the source object is in a general purpose bucket, you must have\n \n s3:GetObject\n \n permission to read the source object that is being copied.

      \n
    • \n
    • \n

      If the destination bucket is a general purpose bucket, you must have\n \n s3:PutObject\n \n permission to write the object copy to the destination bucket.

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

    \n Directory bucket permissions -\n You must have permissions in a bucket policy or an IAM identity-based policy based on the\n source and destination bucket types in a CopyObject\n operation.

    \n
      \n
    • \n

      If the source object that you want to copy is in a\n directory bucket, you must have the \n s3express:CreateSession\n permission in\n the Action element of a policy to read the object. By\n default, the session is in the ReadWrite mode. If you\n want to restrict the access, you can explicitly set the\n s3express:SessionMode condition key to\n ReadOnly on the copy source bucket.

      \n
    • \n
    • \n

      If the copy destination is a directory bucket, you must have the\n \n s3express:CreateSession\n permission in the\n Action element of a policy to write the object to the\n destination. The s3express:SessionMode condition key\n can't be set to ReadOnly on the copy destination bucket.\n

      \n
    • \n
    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n

    For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Response and special errors
\n
\n

When the request is an HTTP 1.1 request, the response is chunk encoded. When\n the request is not an HTTP 1.1 request, the response would not contain the\n Content-Length. You always need to read the entire response body\n to check if the copy succeeds.

\n
    \n
  • \n

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

    \n
  • \n
  • \n

    A copy request might return an error when Amazon S3 receives the copy request\n or while Amazon S3 is copying the files. A 200 OK response can\n contain either a success or an error.

    \n
      \n
    • \n

      If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error.

      \n
    • \n
    • \n

      If the error occurs during the copy operation, the error response\n is embedded in the 200 OK response. For example, in a\n cross-region copy, you may encounter throttling and receive a\n 200 OK response. For more information, see Resolve the Error 200 response when copying objects to\n Amazon S3. The 200 OK status code means the copy\n was accepted, but it doesn't mean the copy is complete. Another\n example is when you disconnect from Amazon S3 before the copy is complete,\n Amazon S3 might cancel the copy and you may receive a 200 OK\n response. You must stay connected to Amazon S3 until the entire response is\n successfully received and processed.

      \n

      If you call this API operation directly, make sure to design your\n application to parse the content of the response and handle it\n appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The\n SDKs detect the embedded error and apply error handling per your\n configuration settings (including automatically retrying the request\n as appropriate). If the condition persists, the SDKs throw an\n exception (or, for the SDKs that don't use exceptions, they return an\n error).

      \n
    • \n
    \n
  • \n
\n
\n
Charge
\n
\n

The copy request charge is based on the storage class and Region that you\n specify for the destination object. The request can also result in a data\n retrieval charge for the source if the source storage class bills for data\n retrieval. If the copy source is in a different region, the data transfer is\n billed to the copy source account. For pricing information, see Amazon S3 pricing.

\n
\n
HTTP Host header syntax
\n
\n
    \n
  • \n

    \n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    \n
  • \n
  • \n

    \n Amazon S3 on Outposts - When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.

    \n
  • \n
\n
\n
\n

The following operations are related to CopyObject:

\n ", + "smithy.api#examples": [ + { + "title": "To copy an object", + "documentation": "The following example copies an object from one bucket to another.", + "input": { + "Bucket": "destinationbucket", + "CopySource": "/sourcebucket/HappyFacejpg", + "Key": "HappyFaceCopyjpg" + }, + "output": { + "CopyObjectResult": { + "LastModified": "2016-12-15T17:38:53.000Z", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?x-id=CopyObject", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "DisableS3ExpressSessionAuth": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CopyObjectOutput": { + "type": "structure", + "members": { + "CopyObjectResult": { + "target": "com.amazonaws.s3#CopyObjectResult", + "traits": { + "smithy.api#documentation": "

Container for all response elements.

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

If the object expiration is configured, the response includes this header.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

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

Version ID of the source object that was copied.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-version-id" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the newly created copy.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms, aws:kms:dsse).

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

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

If present, indicates the ID of the KMS key that was used for object encryption.

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

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption\n context key-value pairs.

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

Indicates whether the copied object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#CopyObjectRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned access control list (ACL) to apply to the object.

\n

When you copy an object, the ACL metadata is not preserved and is set to\n private by default. Only the owner has full access control. To override the\n default ACL setting, specify a new ACL when you generate a copy request. For more\n information, see Using ACLs.

\n

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

\n \n
    \n
  • \n

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

    \n
  • \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the destination bucket.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n \n

Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, \n you get an HTTP 400 Bad Request error with the error code InvalidRequest.

\n
\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. \n \n You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. \n For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. \n When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format \n \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies the caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm that 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.

\n

When you copy an object, if the source object has a checksum, that checksum value will\n be copied to the new object by default. If the CopyObject request does not\n include this x-amz-checksum-algorithm header, the checksum algorithm will be\n copied from the source object to the destination object (if it's present on the source\n object). You can optionally specify a different checksum algorithm to use with the\n x-amz-checksum-algorithm header. Unrecognized or unsupported values will\n respond with the HTTP status code 400 Bad Request.

\n \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", + "smithy.api#httpHeader": "x-amz-checksum-algorithm" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object. Indicates whether an object should\n be displayed in a web browser or downloaded as a file. It allows specifying the desired\n filename for the downloaded file.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

\n \n

For directory buckets, only the aws-chunked value is supported in this header field.

\n
", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type that describes the format of the object data.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CopySource": { + "target": "com.amazonaws.s3#CopySource", + "traits": { + "smithy.api#documentation": "

Specifies the source object for the copy operation. The source object can be up to 5 GB.\n If the source object is an object that was uploaded by using a multipart upload, the object\n copy will be a single part object after the source object is copied to the destination\n bucket.

\n

You specify the value of the copy source in one of two formats, depending on whether you\n 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 general purpose bucket\n awsexamplebucket, use\n awsexamplebucket/reports/january.pdf. The value must be URL-encoded.\n To copy the object reports/january.pdf from the directory bucket\n awsexamplebucket--use1-az5--x-s3, use\n awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must\n 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
      \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
    • \n

      Access points are not supported by directory buckets.

      \n
    • \n
    \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

If your source bucket versioning is enabled, the x-amz-copy-source header\n by default identifies the current version of an object to copy. If the current version is a\n delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use\n the versionId query parameter. Specifically, append\n ?versionId= 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.

\n

If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID\n for the copied object. 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 destination bucket, the version ID\n that Amazon S3 generates in the x-amz-version-id response header is always\n null.

\n \n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source", + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "CopySource" + } + } + }, + "CopySourceIfMatch": { + "target": "com.amazonaws.s3#CopySourceIfMatch", + "traits": { + "smithy.api#documentation": "

Copies the object if its entity tag (ETag) matches the specified tag.

\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
", + "smithy.api#httpHeader": "x-amz-copy-source-if-match" + } + }, + "CopySourceIfModifiedSince": { + "target": "com.amazonaws.s3#CopySourceIfModifiedSince", + "traits": { + "smithy.api#documentation": "

Copies the object if it has been modified since the specified time.

\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
", + "smithy.api#httpHeader": "x-amz-copy-source-if-modified-since" + } + }, + "CopySourceIfNoneMatch": { + "target": "com.amazonaws.s3#CopySourceIfNoneMatch", + "traits": { + "smithy.api#documentation": "

Copies the object if its entity tag (ETag) is different than the specified ETag.

\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
", + "smithy.api#httpHeader": "x-amz-copy-source-if-none-match" + } + }, + "CopySourceIfUnmodifiedSince": { + "target": "com.amazonaws.s3#CopySourceIfUnmodifiedSince", + "traits": { + "smithy.api#documentation": "

Copies the object if it hasn't been modified since the specified time.

\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
", + "smithy.api#httpHeader": "x-amz-copy-source-if-unmodified-since" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

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

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the object data and its metadata.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the object ACL.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key of the destination object.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "MetadataDirective": { + "target": "com.amazonaws.s3#MetadataDirective", + "traits": { + "smithy.api#documentation": "

Specifies whether the metadata is copied from the source object or replaced with\n metadata that's provided in the request. When copying an object, you can preserve all\n metadata (the default) or specify new metadata. If this header isn\u2019t specified,\n COPY is the default behavior.

\n

\n General purpose bucket - For general purpose buckets, when you\n grant permissions, you can use the s3:x-amz-metadata-directive condition key\n to enforce certain metadata behavior when objects are uploaded. For more information, see\n Amazon S3\n condition key examples in the Amazon S3 User Guide.

\n \n

\n x-amz-website-redirect-location is unique to each object and is not\n copied when using the x-amz-metadata-directive header. To copy the value,\n you must specify x-amz-website-redirect-location in the request\n header.

\n
", + "smithy.api#httpHeader": "x-amz-metadata-directive" + } + }, + "TaggingDirective": { + "target": "com.amazonaws.s3#TaggingDirective", + "traits": { + "smithy.api#documentation": "

Specifies whether the object tag-set is copied from the source object or replaced with\n the tag-set that's provided in the request.

\n

The default value is COPY.

\n \n

\n Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. \nWhen the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    \n
  • \n
  • \n

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    \n
  • \n
\n

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-tagging-directive" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized\n or unsupported values won\u2019t write a destination object and will receive a 400 Bad\n Request response.

\n

Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When\n copying an object, if you don't specify encryption information in your copy request, the\n encryption setting of the target object is set to the default encryption configuration of\n the destination bucket. By default, all buckets have a base level of encryption\n configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the\n destination bucket has a different default encryption configuration, Amazon S3 uses the\n corresponding encryption key to encrypt the target object copy.

\n

With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in\n its data centers and decrypts the data when you access it. For more information about\n server-side encryption, see Using Server-Side Encryption\n in the Amazon S3 User Guide.

\n

\n General purpose buckets \n

\n
    \n
  • \n

    For general purpose buckets, there are the following supported options for server-side\n encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption\n with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding\n KMS key, or a customer-provided key to encrypt the target object copy.

    \n
  • \n
  • \n

    When you perform a CopyObject operation, if you want to use a\n different type of encryption setting for the target object, you can specify\n appropriate encryption-related headers to encrypt the target object with an Amazon S3\n managed key, a KMS key, or a customer-provided key. If the encryption setting in\n your request is different from the default encryption configuration of the\n destination bucket, the encryption setting in your request takes precedence.

    \n
  • \n
\n

\n Directory buckets \n

\n
    \n
  • \n

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n
  • \n
  • \n

    To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you\n specify SSE-KMS as the directory bucket's default encryption configuration with\n a KMS key (specifically, a customer managed key).\n The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS\n configuration can only support 1 customer managed key per\n directory bucket for the lifetime of the bucket. After you specify a customer managed key for\n SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS\n configuration. Then, when you perform a CopyObject operation and want to\n specify server-side encryption settings for new object copies with SSE-KMS in the\n encryption-related request headers, you must ensure the encryption key is the same\n customer managed key that you specified for the directory bucket's default encryption\n configuration.\n

    \n
  • \n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

If the x-amz-storage-class header is not used, the copied object will be\n stored in the STANDARD Storage Class by default. The STANDARD\n storage class provides high durability and high availability. Depending on performance\n needs, you can specify a different Storage Class.

\n \n
    \n
  • \n

    \n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. \nUnsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    \n
  • \n
  • \n

    \n Amazon S3 on Outposts - S3 on Outposts only\n uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
\n

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

\n

Before using an object as a source object for the copy operation, you must restore a\n copy of it if it meets any of the following conditions:

\n
    \n
  • \n

    The storage class of the source object is GLACIER or\n DEEP_ARCHIVE.

    \n
  • \n
  • \n

    The storage class of the source object is INTELLIGENT_TIERING and\n it's S3 Intelligent-Tiering access tier is Archive Access or\n Deep Archive Access.

    \n
  • \n
\n

For more information, see RestoreObject and Copying\n Objects in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "WebsiteRedirectLocation": { + "target": "com.amazonaws.s3#WebsiteRedirectLocation", + "traits": { + "smithy.api#documentation": "

If the destination bucket is configured as a website, redirects requests for this object\n copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of\n this header in the object metadata. This value is unique to each object and is not copied\n when using the x-amz-metadata-directive header. Instead, you may opt to\n provide this header in combination with the x-amz-metadata-directive\n header.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

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

\n

When you perform a CopyObject operation, if you want to use a different\n type of encryption setting for the target object, you can specify appropriate\n encryption-related headers to encrypt the target object with an Amazon S3 managed key, a\n KMS key, or a customer-provided key. If the encryption setting in your request is\n different from the default encryption configuration of the destination bucket, the\n encryption setting in your request takes precedence.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

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

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption.\n All GET and PUT requests for an object protected by KMS will fail if they're not made via\n SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services\n SDKs and Amazon Web Services CLI, see Specifying the\n Signature Version in Request Authentication in the\n Amazon S3 User Guide.

\n

\n Directory buckets -\n To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

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

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use\n for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

\n

\n General purpose buckets - This value must be explicitly\n added to specify encryption context for CopyObject requests if you want an\n additional encryption context for your destination object. The additional encryption\n context of the source object won't be copied to the destination object. For more\n information, see Encryption\n context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

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

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses\n SSE-KMS, you can enable an S3 Bucket Key for the object.

\n

Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object\n encryption with SSE-KMS. Specifying this header with a COPY action doesn\u2019t affect\n bucket-level settings for S3 Bucket Key.

\n

For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.

\n \n

\n Directory buckets -\n S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "CopySourceSSECustomerAlgorithm": { + "target": "com.amazonaws.s3#CopySourceSSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

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

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

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

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be the same one that was used when\n the source object was created.

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key" + } + }, + "CopySourceSSECustomerKeyMD5": { + "target": "com.amazonaws.s3#CopySourceSSECustomerKeyMD5", + "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.

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key-MD5" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "Tagging": { + "target": "com.amazonaws.s3#TaggingHeader", + "traits": { + "smithy.api#documentation": "

The tag-set for the object copy in the destination bucket. This value must be used in\n conjunction with the x-amz-tagging-directive if you choose\n REPLACE for the x-amz-tagging-directive. If you choose\n COPY for the x-amz-tagging-directive, you don't need to set\n the x-amz-tagging header, because the tag-set will be copied from the source\n object directly. The tag-set must be encoded as URL Query parameters.

\n

The default value is the empty value.

\n \n

\n Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. \nWhen the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    \n
  • \n
  • \n

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    \n
  • \n
\n

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-tagging" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

The Object Lock mode that you want to apply to the object copy.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when you want the Object Lock of the object copy to expire.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the destination bucket, 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 account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-source-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CopyObjectResult": { + "type": "structure", + "members": { + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

Returns the ETag of the new object. The ETag reflects only changes to the contents of an\n object, not its metadata.

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

Creation date of the object.

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

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking 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 checksum is only present if the object was uploaded\n with the object. For more information, 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 the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present\n if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

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

Container for all response elements.

" + } + }, + "com.amazonaws.s3#CopyPartResult": { + "type": "structure", + "members": { + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

Entity tag of the object.

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

Date and time at which the object was uploaded.

" + } + }, + "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 part. 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": "

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 part. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

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

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "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 SHA1 checksum of the part. For more information, see\n Checking object integrity in the\n 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 SHA256 checksum of the part. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

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

Container for all response elements.

" + } + }, + "com.amazonaws.s3#CopySource": { + "type": "string", + "traits": { + "smithy.api#pattern": "^\\/?.+\\/.+$" + } + }, + "com.amazonaws.s3#CopySourceIfMatch": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceIfModifiedSince": { + "type": "timestamp" + }, + "com.amazonaws.s3#CopySourceIfNoneMatch": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceIfUnmodifiedSince": { + "type": "timestamp" + }, + "com.amazonaws.s3#CopySourceRange": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceSSECustomerAlgorithm": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceSSECustomerKey": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#CopySourceSSECustomerKeyMD5": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceVersionId": { + "type": "string" + }, + "com.amazonaws.s3#CreateBucket": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateBucketRequest" + }, + "output": { + "target": "com.amazonaws.s3#CreateBucketOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#BucketAlreadyExists" + }, + { + "target": "com.amazonaws.s3#BucketAlreadyOwnedByYou" + } + ], + "traits": { + "smithy.api#documentation": "\n

This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see \n CreateBucket\n .

\n
\n

Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services\n Access Key ID to authenticate requests. Anonymous requests are never allowed to create\n buckets. By creating the bucket, you become the bucket owner.

\n

There are two types of buckets: general purpose buckets and directory buckets. For more\n information about these bucket types, see Creating, configuring, and\n working with Amazon S3 buckets in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    \n General purpose buckets - If you send your\n CreateBucket request to the s3.amazonaws.com global\n endpoint, the request goes to the us-east-1 Region. So the signature\n calculations in Signature Version 4 must use us-east-1 as the Region,\n even if the location constraint in the request specifies another Region where the\n bucket is to be created. If you create a bucket in a Region other than US East (N.\n Virginia), your application must be able to handle 307 redirect. For more\n information, see Virtual hosting of\n buckets in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - In\n addition to the s3:CreateBucket permission, the following\n permissions are required in a policy when your CreateBucket\n request includes specific headers:

    \n
      \n
    • \n

      \n Access control lists (ACLs)\n - In your CreateBucket request, if you specify an\n access control list (ACL) and set it to public-read,\n public-read-write, authenticated-read, or\n if you explicitly specify any other custom ACLs, both\n s3:CreateBucket and s3:PutBucketAcl\n permissions are required. In your CreateBucket request,\n if you set the ACL to private, or if you don't specify\n any ACLs, only the s3:CreateBucket permission is\n required.

      \n
    • \n
    • \n

      \n Object Lock - In your\n CreateBucket request, if you set\n x-amz-bucket-object-lock-enabled to true, the\n s3:PutBucketObjectLockConfiguration and\n s3:PutBucketVersioning permissions are\n required.

      \n
    • \n
    • \n

      \n S3 Object Ownership - If\n your CreateBucket request includes the\n x-amz-object-ownership header, then the\n s3:PutBucketOwnershipControls permission is\n required.

      \n \n

      To set an ACL on a bucket as part of a\n CreateBucket request, you must explicitly set S3\n Object Ownership for the bucket to a different value than the\n default, BucketOwnerEnforced. Additionally, if your\n desired bucket ACL grants public access, you must first create the\n bucket (without the bucket ACL) and then explicitly disable Block\n Public Access on the bucket before using PutBucketAcl\n to set the ACL. If you try to create a bucket with a public ACL,\n the request will fail.

      \n

      For the majority of modern use cases in S3, we recommend that\n you keep all Block Public Access settings enabled and keep ACLs\n disabled. If you would like to share data with users outside of\n your account, you can use bucket policies as needed. For more\n information, see Controlling ownership of objects and disabling ACLs for your\n bucket and Blocking public access to your Amazon S3 storage in\n the Amazon S3 User Guide.

      \n
      \n
    • \n
    • \n

      \n S3 Block Public Access - If\n your specific use case requires granting public access to your S3\n resources, you can disable Block Public Access. Specifically, you can\n create a new bucket with Block Public Access enabled, then separately\n call the \n DeletePublicAccessBlock\n API. To use this operation, you must have the\n s3:PutBucketPublicAccessBlock permission. For more\n information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage in the\n Amazon S3 User Guide.

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

    \n Directory bucket permissions -\n You must have the s3express:CreateBucket permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n \n

    The permissions for ACLs, Object Lock, S3 Object Ownership, and S3\n Block Public Access are not supported for directory buckets. For\n directory buckets, all Block Public Access settings are enabled at the\n bucket level and S3 Object Ownership is set to Bucket owner enforced\n (ACLs disabled). These settings can't be modified.

    \n

    For more information about permissions for creating and working with\n directory buckets, see Directory buckets in the\n Amazon S3 User Guide. For more information about\n supported S3 features for directory buckets, see Features of S3 Express One Zone in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CreateBucket:

\n ", + "smithy.api#examples": [ + { + "title": "To create a bucket in a specific region", + "documentation": "The following example creates a bucket. The request specifies an AWS region where to create the bucket.", + "input": { + "Bucket": "examplebucket", + "CreateBucketConfiguration": { + "LocationConstraint": "eu-west-1" + } + }, + "output": { + "Location": "http://examplebucket..s3.amazonaws.com/" + } + }, + { + "title": "To create a bucket ", + "documentation": "The following example creates a bucket.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "Location": "/examplebucket" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + }, + "DisableAccessPoints": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CreateBucketConfiguration": { + "type": "structure", + "members": { + "LocationConstraint": { + "target": "com.amazonaws.s3#BucketLocationConstraint", + "traits": { + "smithy.api#documentation": "

Specifies the Region where the bucket will be created. You might choose a Region to\n optimize latency, minimize costs, or address regulatory requirements. For example, if you\n reside in Europe, you will probably find it advantageous to create buckets in the Europe\n (Ireland) Region.

\n

If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region\n (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

\n

For a list of the valid values for all of the Amazon Web Services Regions, see Regions and\n Endpoints.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "Location": { + "target": "com.amazonaws.s3#LocationInfo", + "traits": { + "smithy.api#documentation": "

Specifies the location where the bucket will be created.

\n

\n Directory buckets - The location type is Availability Zone or Local Zone. \n To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the \n error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide.\n

\n \n

This functionality is only supported by directory buckets.

\n
" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketInfo", + "traits": { + "smithy.api#documentation": "

Specifies the information about the bucket that will be created.

\n \n

This functionality is only supported by directory buckets.

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

The configuration information for the bucket.

" + } + }, + "com.amazonaws.s3#CreateBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Creates a metadata table configuration for a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the following permissions. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n

If you also want to integrate your table bucket with Amazon Web Services analytics services so that you \n can query your metadata table, you need additional permissions. For more information, see \n \n Integrating Amazon S3 Tables with Amazon Web Services analytics services in the \n Amazon S3 User Guide.

\n
    \n
  • \n

    \n s3:CreateBucketMetadataTableConfiguration\n

    \n
  • \n
  • \n

    \n s3tables:CreateNamespace\n

    \n
  • \n
  • \n

    \n s3tables:GetTable\n

    \n
  • \n
  • \n

    \n s3tables:CreateTable\n

    \n
  • \n
  • \n

    \n s3tables:PutTablePolicy\n

    \n
  • \n
\n
\n
\n

The following operations are related to CreateBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}?metadataTable", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CreateBucketMetadataTableConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n The general purpose bucket that you want to create the metadata table configuration in.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

\n The Content-MD5 header for the metadata table configuration.\n

", + "smithy.api#httpHeader": "Content-MD5" + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

\n The checksum algorithm to use with your metadata table configuration. \n

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

\n The contents of your metadata table configuration. \n

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "MetadataTableConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected owner of the general purpose bucket that contains your metadata table configuration.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CreateBucketOutput": { + "type": "structure", + "members": { + "Location": { + "target": "com.amazonaws.s3#Location", + "traits": { + "smithy.api#documentation": "

A forward slash followed by the name of the bucket.

", + "smithy.api#httpHeader": "Location" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#CreateBucketRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#BucketCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket to create.

\n

\n General purpose buckets - For information about bucket naming\n restrictions, see Bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CreateBucketConfiguration": { + "target": "com.amazonaws.s3#CreateBucketConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the bucket.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "CreateBucketConfiguration" + } + }, + "GrantFullControl": { + "target": "com.amazonaws.s3#GrantFullControl", + "traits": { + "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWrite": { + "target": "com.amazonaws.s3#GrantWrite", + "traits": { + "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-write" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "ObjectLockEnabledForBucket": { + "target": "com.amazonaws.s3#ObjectLockEnabledForBucket", + "traits": { + "smithy.api#documentation": "

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-bucket-object-lock-enabled" + } + }, + "ObjectOwnership": { + "target": "com.amazonaws.s3#ObjectOwnership", + "traits": { + "smithy.api#httpHeader": "x-amz-object-ownership" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CreateMultipartUpload": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateMultipartUploadRequest" + }, + "output": { + "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 request.\n For more information about multipart uploads, see Multipart Upload Overview in the\n Amazon S3 User Guide.

\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 stops charging you for\n storing them only after you either complete or abort a multipart upload.

\n
\n

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

\n \n
    \n
  • \n

    \n Directory buckets -\n S3 Lifecycle is not supported by directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Request signing
\n
\n

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

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n perform a multipart upload with encryption using an Key Management Service (KMS)\n KMS key, the requester must have permission to the\n kms:Decrypt and kms:GenerateDataKey actions on\n the key. The requester must also have permissions for the\n kms:GenerateDataKey action for the\n CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs. These\n permissions are required because Amazon S3 must decrypt and read data from the\n encrypted file parts before it completes the multipart upload. For more\n information, see Multipart upload API and permissions and Protecting data\n using server-side encryption with Amazon Web Services KMS in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose buckets - Server-side\n encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it.\n Amazon S3 automatically encrypts all new objects that are uploaded to an S3\n bucket. When doing a multipart upload, if you don't specify encryption\n information in your request, the encryption setting of the uploaded parts is\n set to the default encryption configuration of the destination bucket. By\n default, all buckets have a base level of encryption configuration that uses\n server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination\n bucket has a default encryption configuration that uses server-side\n encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided\n encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a\n customer-provided key to encrypt the uploaded parts. When you perform a\n CreateMultipartUpload operation, if you want to use a different type of\n encryption setting for the uploaded parts, you can request that Amazon S3\n encrypts the object with a different encryption key (such as an Amazon S3 managed\n key, a KMS key, or a customer-provided key). When the encryption setting\n in your request is different from the default encryption configuration of\n the destination bucket, the encryption setting in your request takes\n precedence. If you choose to provide your own encryption key, the request\n headers you provide in UploadPart and\n UploadPartCopy\n requests must match the headers you used in the\n CreateMultipartUpload request.

    \n
      \n
    • \n

      Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key\n (aws/s3) and KMS customer managed keys stored in Key Management Service\n (KMS) \u2013 If you want Amazon Web Services to manage the keys used to encrypt data,\n 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
        \n
      • \n

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

        \n
      • \n
      • \n

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

        \n
      • \n
      • \n

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

        \n
      • \n
      • \n

        All GET and PUT requests for an\n object protected by KMS fail if you don't make them by\n using Secure Sockets Layer (SSL), Transport Layer Security\n (TLS), or Signature Version 4. For information about\n configuring any of the officially supported Amazon Web Services SDKs and\n Amazon Web Services CLI, see Specifying the Signature Version in\n Request Authentication in the\n Amazon S3 User Guide.

        \n
      • \n
      \n
      \n

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

      \n
    • \n
    • \n

      Use customer-provided encryption keys (SSE-C) \u2013 If you want to\n manage your own encryption keys, provide all the following headers in\n 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\n customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with\n customer-provided encryption keys (SSE-C) in the\n Amazon S3 User Guide.

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

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n \n

    For directory buckets, when you perform a\n CreateMultipartUpload operation and an\n UploadPartCopy operation, the request headers you provide\n in the CreateMultipartUpload request must match the default\n encryption configuration of the destination bucket.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CreateMultipartUpload:

\n ", + "smithy.api#examples": [ + { + "title": "To initiate a multipart upload", + "documentation": "The following example initiates a multipart upload.", + "input": { + "Bucket": "examplebucket", + "Key": "largeobject" + }, + "output": { + "Bucket": "examplebucket", + "UploadId": "ibZBv_75gd9r8lH_gqXatLdxMVpAlj6ZQjEs.OwyF3953YdwbcQnMA2BLGn8Lx12fQNICtMw5KyteFeHw.Sjng--", + "Key": "largeobject" + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}/{Key+}?uploads", + "code": 200 + } + } + }, + "com.amazonaws.s3#CreateMultipartUploadOutput": { + "type": "structure", + "members": { + "AbortDate": { + "target": "com.amazonaws.s3#AbortDate", + "traits": { + "smithy.api#documentation": "

If the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, the response includes this header. The header indicates when the initiated\n multipart upload becomes eligible for an abort operation. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in\n the Amazon S3 User Guide.

\n

The response also includes the x-amz-abort-rule-id header that provides the\n ID of the lifecycle configuration rule that defines the abort action.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-abort-date" + } + }, + "AbortRuleId": { + "target": "com.amazonaws.s3#AbortRuleId", + "traits": { + "smithy.api#documentation": "

This header is returned along with the x-amz-abort-date header. It\n identifies the applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-abort-rule-id" + } + }, + "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\n access point ARN or access point alias if used.

\n \n

Access points are not supported by directory buckets.

\n
", + "smithy.api#xmlName": "Bucket" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

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

ID for the initiated multipart upload.

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

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

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

If present, indicates the ID of the KMS key that was used for object encryption.

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

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

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

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

Indicates the checksum type that you want Amazon S3 to use to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "InitiateMultipartUploadResult" + } + }, + "com.amazonaws.s3#CreateMultipartUploadRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as\n canned ACLs. Each canned ACL has a predefined set of grantees and\n permissions. For more information, see Canned ACL in the\n Amazon S3 User Guide.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to\n predefined groups defined by Amazon S3. These permissions are then added to the access control\n list (ACL) on the new object. For more information, see Using ACLs. One way to grant\n the permissions using the request headers is to specify a canned ACL with the\n x-amz-acl request header.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket where the multipart upload is initiated and where the object is\n uploaded.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

\n \n

For directory buckets, only the aws-chunked value is supported in this header field.

\n
", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language that the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

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

Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP\n permissions on the object.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

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

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Specify access permissions explicitly to allow grantee to read the object data and its\n metadata.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

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

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Specify access permissions explicitly to allows grantee to read the object ACL.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

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

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Specify access permissions explicitly to allows grantee to allow grantee to write the\n ACL for the applicable object.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

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

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload is to be initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

\n
    \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n
  • \n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

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. For more information, see\n Storage\n Classes in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

    \n
  • \n
  • \n

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "WebsiteRedirectLocation": { + "target": "com.amazonaws.s3#WebsiteRedirectLocation", + "traits": { + "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 customer-provided encryption key according to\n RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption\n key was transmitted without error.

\n \n

This functionality is not supported for directory buckets.

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

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same\n account that's issuing the command, you must use the full Key ARN not the Key ID.

\n

\n General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS \n key to use. If you specify\n x-amz-server-side-encryption:aws:kms or\n x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key\n (aws/s3) to protect the data.

\n

\n Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

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

Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

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

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

\n

\n General purpose buckets - Setting this header to\n true causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3\n Bucket Key.

\n

\n Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "Tagging": { + "target": "com.amazonaws.s3#TaggingHeader", + "traits": { + "smithy.api#documentation": "

The tag-set for the object. The tag-set must be encoded as URL Query parameters.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-tagging" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

Specifies the Object Lock mode that you want to apply to the uploaded object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

Specifies the date and time when you want the Object Lock to expire.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, 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 that 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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

Indicates the checksum type that you want Amazon S3 to use to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CreateSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateSessionRequest" + }, + "output": { + "target": "com.amazonaws.s3#CreateSessionOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchBucket" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a session that establishes temporary security credentials to support fast\n authentication and authorization for the Zonal endpoint API operations on directory buckets. For more\n information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone\n APIs in the Amazon S3 User Guide.

\n

To make Zonal endpoint API requests on a directory bucket, use the CreateSession\n API operation. Specifically, you grant s3express:CreateSession permission to a\n bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the\n CreateSession API request on the bucket, which returns temporary security\n credentials that include the access key ID, secret access key, session token, and\n expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After\n the session is created, you don\u2019t need to use other policies to grant permissions to each\n Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by\n applying the temporary security credentials of the session to the request headers and\n following the SigV4 protocol for authentication. You also apply the session token to the\n x-amz-s3session-token request header for authorization. Temporary security\n credentials are scoped to the bucket and expire after 5 minutes. After the expiration time,\n any calls that you make with those credentials will fail. You must use IAM credentials\n again to make a CreateSession API request that generates a new set of\n temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond\n the original specified interval.

\n

If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid\n service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to\n initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the\n Amazon S3 User Guide.

\n \n
    \n
  • \n

    You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n \n CopyObject API operation -\n Unlike other Zonal endpoint API operations, the CopyObject API operation doesn't use\n the temporary security credentials returned from the CreateSession\n API operation for authentication and authorization. For information about\n authentication and authorization of the CopyObject API operation on\n directory buckets, see CopyObject.

    \n
  • \n
  • \n

    \n \n HeadBucket API operation -\n Unlike other Zonal endpoint API operations, the HeadBucket API operation doesn't use\n the temporary security credentials returned from the CreateSession\n API operation for authentication and authorization. For information about\n authentication and authorization of the HeadBucket API operation on\n directory buckets, see HeadBucket.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n

To obtain temporary security credentials, you must create\n a bucket policy or an IAM identity-based policy that grants s3express:CreateSession\n permission to the bucket. In a policy, you can have the\n s3express:SessionMode condition key to control who can create a\n ReadWrite or ReadOnly session. For more information\n about ReadWrite or ReadOnly sessions, see \n x-amz-create-session-mode\n . For example policies, see\n Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

\n

To grant cross-account access to Zonal endpoint API operations, the bucket policy should also\n grant both accounts the s3express:CreateSession permission.

\n

If you want to encrypt objects with SSE-KMS, you must also have the\n kms:GenerateDataKey and the kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the target KMS\n key.

\n
\n
Encryption
\n
\n

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

\n

For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, \nyou authenticate and authorize requests through CreateSession for low latency. \n To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

\n \n

\n Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. \n After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration.\n

\n
\n

In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, \n you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

\n \n

When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n it's not supported to override the values of the encryption settings from the CreateSession request. \n\n

\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?session", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "DisableS3ExpressSessionAuth": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CreateSessionOutput": { + "type": "structure", + "members": { + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store objects in the directory bucket.

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

If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS \n symmetric encryption customer managed key that was used for object encryption.

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

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets\n passed on to Amazon Web Services KMS for future GetObject \n operations on this object.

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

Indicates whether to use an S3 Bucket Key for server-side encryption\n with KMS keys (SSE-KMS).

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

The established temporary security credentials for the created session.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "Credentials" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "CreateSessionResult" + } + }, + "com.amazonaws.s3#CreateSessionRequest": { + "type": "structure", + "members": { + "SessionMode": { + "target": "com.amazonaws.s3#SessionMode", + "traits": { + "smithy.api#documentation": "

Specifies the mode of the session that will be created, either ReadWrite or\n ReadOnly. By default, a ReadWrite session is created. A\n ReadWrite session is capable of executing all the Zonal endpoint API operations on a\n directory bucket. A ReadOnly session is constrained to execute the following\n Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2,\n GetObjectAttributes, ListParts, and\n ListMultipartUploads.

", + "smithy.api#httpHeader": "x-amz-create-session-mode" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket that you create a session for.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm to use when you store objects in the directory bucket.

\n

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. \n For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

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

If you specify x-amz-server-side-encryption with aws:kms, you must specify the \n x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS \n symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same\n account that't issuing the command, you must use the full Key ARN not the Key ID.

\n

Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

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

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets passed on\n to Amazon Web Services KMS for future GetObject operations on\n this object.

\n

\n General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

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

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using KMS keys (SSE-KMS).

\n

S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CreationDate": { + "type": "timestamp" + }, + "com.amazonaws.s3#DataRedundancy": { + "type": "enum", + "members": { + "SingleAvailabilityZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SingleAvailabilityZone" + } + }, + "SingleLocalZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SingleLocalZone" + } + } + } + }, + "com.amazonaws.s3#Date": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.s3#Days": { + "type": "integer" + }, + "com.amazonaws.s3#DaysAfterInitiation": { + "type": "integer" + }, + "com.amazonaws.s3#DefaultRetention": { + "type": "structure", + "members": { + "Mode": { + "target": "com.amazonaws.s3#ObjectLockRetentionMode", + "traits": { + "smithy.api#documentation": "

The default Object Lock retention mode you want to apply to new objects placed in the\n specified bucket. Must be used with either Days or Years.

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

The number of days that you want to specify for the default retention period. Must be\n used with Mode.

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

The number of years that you want to specify for the default retention period. Must be\n used with Mode.

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

The container element for optionally specifying the default Object Lock retention\n settings for new objects placed in the specified bucket.

\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 or\n Years but you must select one. You cannot specify\n Days and Years at the same time.

    \n
  • \n
\n
" + } + }, + "com.amazonaws.s3#Delete": { + "type": "structure", + "members": { + "Objects": { + "target": "com.amazonaws.s3#ObjectIdentifierList", + "traits": { + "smithy.api#documentation": "

The object to delete.

\n \n

\n Directory buckets - For directory buckets,\n an object that's composed entirely of whitespace characters is not supported by the\n DeleteObjects API operation. The request will receive a 400 Bad\n Request error and none of the objects in the request will be deleted.

\n
", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Object" + } + }, + "Quiet": { + "target": "com.amazonaws.s3#Quiet", + "traits": { + "smithy.api#documentation": "

Element to enable quiet mode for the request. When you add this element, you must set\n its value to true.

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

Container for the objects to delete.

" + } + }, + "com.amazonaws.s3#DeleteBucket": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

Deletes the S3 bucket. All objects (including all object versions and delete markers) in\n the bucket must be deleted before the bucket itself can be deleted.

\n \n
    \n
  • \n

    \n Directory buckets - If multipart\n uploads in a directory bucket are in progress, you can't delete the bucket until\n all the in-progress multipart uploads are aborted or completed.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the s3:DeleteBucket permission on the specified\n bucket in a policy.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:DeleteBucket permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucket:

\n ", + "smithy.api#examples": [ + { + "title": "To delete a bucket", + "documentation": "The following example deletes the specified bucket.", + "input": { + "Bucket": "forrandall2" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketAnalyticsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketAnalyticsConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes an analytics configuration for the bucket (specified by the analytics\n configuration ID).

\n

To use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration 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

For information about the Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis.

\n

The following operations are related to\n DeleteBucketAnalyticsConfiguration:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?analytics", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketAnalyticsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket from which an analytics configuration is deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#AnalyticsId", + "traits": { + "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketCors": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketCorsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the cors configuration information set for the bucket.

\n

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

\n

For information about cors, see Enabling Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.

\n

\n Related Resources\n

\n ", + "smithy.api#examples": [ + { + "title": "To delete cors configuration on a bucket.", + "documentation": "The following example deletes CORS configuration on a bucket.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?cors", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketCorsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies the bucket whose cors configuration is being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketEncryption": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketEncryptionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

This implementation of the DELETE action resets the default encryption for the bucket as\n server-side encryption with Amazon S3 managed keys (SSE-S3).

\n \n \n \n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucketEncryption:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?encryption", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketEncryptionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the server-side encryption configuration to\n delete.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketIntelligentTieringConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketIntelligentTieringConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to DeleteBucketIntelligentTieringConfiguration include:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?intelligent-tiering", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketIntelligentTieringConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#IntelligentTieringId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketInventoryConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketInventoryConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes an inventory configuration (identified by the inventory ID) from the\n bucket.

\n

To use this operation, you must have permissions to perform the\n s3:PutInventoryConfiguration 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

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

\n

Operations related to DeleteBucketInventoryConfiguration include:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?inventory", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketInventoryConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the inventory configuration to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#InventoryId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketLifecycle": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketLifecycleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the\n lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your\n objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of\n rules contained in the deleted lifecycle configuration.

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:PutLifecycleConfiguration\n permission.

    \n

    For more information about permissions, see Managing Access\n Permissions to Your Amazon S3 Resources.

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

    \n Directory bucket permissions -\n You must have the s3express:PutLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n

For more information about the object expiration, see Elements to Describe Lifecycle Actions.

\n

Related actions include:

\n ", + "smithy.api#examples": [ + { + "title": "To delete lifecycle configuration on a bucket.", + "documentation": "The following example deletes lifecycle configuration on a bucket.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?lifecycle", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketLifecycleRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name of the lifecycle to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

\n Deletes a metadata table configuration from a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n
\n
\n

The following operations are related to DeleteBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?metadataTable", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketMetadataTableConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n The general purpose bucket that you want to remove the metadata table configuration from.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected bucket owner of the general purpose bucket that you want to remove the \n metadata table configuration from.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketMetricsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketMetricsConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the\n metrics configuration ID) from the bucket. Note that this doesn't include the daily storage\n metrics.

\n

To use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with\n Amazon CloudWatch.

\n

The following operations are related to\n DeleteBucketMetricsConfiguration:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?metrics", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketMetricsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the metrics configuration to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#MetricsId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketOwnershipControls": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketOwnershipControlsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you\n must have the s3:PutBucketOwnershipControls permission. For more information\n about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\n

For information about Amazon S3 Object Ownership, see Using Object Ownership.

\n

The following operations are related to\n DeleteBucketOwnershipControls:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?ownershipControls", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketOwnershipControlsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon S3 bucket whose OwnershipControls you want to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketPolicyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

Deletes the policy of a specified bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n DeleteBucketPolicy permissions on the specified bucket and belong\n to the bucket owner's account in order to use this operation.

\n

If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:DeleteBucketPolicy permission is required in a policy.\n For more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:DeleteBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucketPolicy\n

\n ", + "smithy.api#examples": [ + { + "title": "To delete bucket policy", + "documentation": "The following example deletes bucket policy on the specified bucket.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?policy", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketPolicyRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketReplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketReplicationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the replication configuration from the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:PutReplicationConfiguration action. The bucket owner has these\n permissions by default and can grant it to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n \n

It can take a while for the deletion of a replication configuration to fully\n propagate.

\n
\n

For information about replication configuration, see Replication in the\n Amazon S3 User Guide.

\n

The following operations are related to DeleteBucketReplication:

\n ", + "smithy.api#examples": [ + { + "title": "To delete bucket replication configuration", + "documentation": "The following example deletes replication configuration set on bucket.", + "input": { + "Bucket": "example" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?replication", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketReplicationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies the bucket being deleted.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketTaggingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the tags from the bucket.

\n

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

\n

The following operations are related to DeleteBucketTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To delete bucket tags", + "documentation": "The following example deletes bucket tags.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?tagging", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket that has the tag set to be removed.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketWebsite": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketWebsiteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This action removes the website configuration for a bucket. Amazon S3 returns a 200\n OK response upon successfully deleting a website configuration on the specified\n bucket. You will get a 200 OK response if the website configuration you are\n trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if\n the bucket specified in the request does not exist.

\n

This DELETE action requires the S3:DeleteBucketWebsite permission. By\n default, only the bucket owner can delete the website configuration attached to a bucket.\n However, bucket owners can grant other users permission to delete the website configuration\n by writing a bucket policy granting them the S3:DeleteBucketWebsite\n permission.

\n

For more information about hosting websites, see Hosting Websites on Amazon S3.

\n

The following operations are related to DeleteBucketWebsite:

\n ", + "smithy.api#examples": [ + { + "title": "To delete bucket website configuration", + "documentation": "The following example deletes bucket website configuration.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?website", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketWebsiteRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which you want to remove the website configuration.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteMarker": { + "type": "boolean" + }, + "com.amazonaws.s3#DeleteMarkerEntry": { + "type": "structure", + "members": { + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

The account that created the delete marker.

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

The object key.

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

Version ID of an object.

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

Specifies whether the object is (true) or is not (false) the latest version of an\n object.

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

Date and time when the object was last modified.

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

Information about the delete marker.

" + } + }, + "com.amazonaws.s3#DeleteMarkerReplication": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#DeleteMarkerReplicationStatus", + "traits": { + "smithy.api#documentation": "

Indicates whether to replicate delete markers.

\n \n

Indicates whether to replicate delete markers.

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

Specifies whether Amazon S3 replicates delete markers. If you specify a Filter\n in your replication configuration, you must also include a\n DeleteMarkerReplication element. If your Filter includes a\n Tag element, the DeleteMarkerReplication\n Status must be set to Disabled, because Amazon S3 does not support replicating\n delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration.

\n

For more information about delete marker replication, see Basic Rule\n Configuration.

\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
" + } + }, + "com.amazonaws.s3#DeleteMarkerReplicationStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#DeleteMarkerVersionId": { + "type": "string" + }, + "com.amazonaws.s3#DeleteMarkers": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#DeleteMarkerEntry" + } + }, + "com.amazonaws.s3#DeleteObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#DeleteObjectOutput" + }, + "traits": { + "smithy.api#documentation": "

Removes an object from a bucket. The behavior depends on the bucket's versioning state:

\n
    \n
  • \n

    If bucket versioning is not enabled, the operation permanently deletes the object.

    \n
  • \n
  • \n

    If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object\u2019s versionId in the request. For more information about versioning-enabled buckets, see Deleting object versions from a versioning-enabled bucket.

    \n
  • \n
  • \n

    If bucket versioning is suspended, the operation removes the object that has a null versionId, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null versionId, and all versions of the object have a versionId, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a versionId, you must include the object\u2019s versionId in the request. For more information about versioning-suspended buckets, see Deleting objects from versioning-suspended buckets.

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

    \n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null \n to the versionId query parameter in the request.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n

To remove a specific version, you must use the versionId query parameter. Using this\n query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3\n sets the response header x-amz-delete-marker to true.

\n

If the object you want to delete is in a bucket where the bucket versioning\n configuration is MFA Delete enabled, you must include the x-amz-mfa request\n header in the DELETE versionId request. Requests that include\n x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3\n User Guide. To see sample\n requests that use versioning, see Sample\n Request.

\n \n

\n Directory buckets - MFA delete is not supported by directory buckets.

\n
\n

You can delete objects by explicitly calling DELETE Object or calling \n (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block\n users or accounts from removing or deleting objects from your bucket, you must deny them\n the s3:DeleteObject, s3:DeleteObjectVersion, and\n s3:PutLifeCycleConfiguration actions.

\n \n

\n Directory buckets - S3 Lifecycle is not supported by directory buckets.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The following permissions are required in your policies when your \n DeleteObjects request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:DeleteObject\n - To delete an object from a bucket, you must always have the s3:DeleteObject permission.

      \n
    • \n
    • \n

      \n \n s3:DeleteObjectVersion\n - To delete a specific version of an object from a versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.

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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following action is related to DeleteObject:

\n ", + "smithy.api#examples": [ + { + "title": "To delete an object (from a non-versioned bucket)", + "documentation": "The following example deletes an object from a non-versioned bucket.", + "input": { + "Bucket": "ExampleBucket", + "Key": "HappyFace.jpg" + } + }, + { + "title": "To delete an object", + "documentation": "The following example deletes an object from an S3 bucket.", + "input": { + "Bucket": "examplebucket", + "Key": "objectkey.jpg" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}/{Key+}?x-id=DeleteObject", + "code": 204 + } + } + }, + "com.amazonaws.s3#DeleteObjectOutput": { + "type": "structure", + "members": { + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

Indicates whether the specified object version that was permanently deleted was (true)\n or was not (false) a delete marker before deletion. In a simple DELETE, this header\n indicates whether (true) or not (false) the current version of the object is a delete\n marker. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

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

Returns the version ID of the delete marker created as a result of the DELETE\n operation.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#DeleteObjectRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name of the bucket containing the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

Key name of the object to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "MFA": { + "target": "com.amazonaws.s3#MFA", + "traits": { + "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-mfa" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

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

\n \n

For directory buckets in this API operation, only the null value of the version ID is supported.

\n
", + "smithy.api#httpQuery": "versionId" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "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\n s3:BypassGovernanceRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns\n a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No \n Content) response.

\n

For more information about conditional requests, see RFC 7232.

\n \n

This functionality is only supported for directory buckets.

\n
", + "smithy.api#httpHeader": "If-Match" + } + }, + "IfMatchLastModifiedTime": { + "target": "com.amazonaws.s3#IfMatchLastModifiedTime", + "traits": { + "smithy.api#documentation": "

If present, the object is deleted only if its modification times matches the provided\n Timestamp. If the Timestamp values do not match, the operation\n returns a 412 Precondition Failed error. If the Timestamp matches\n or if the object doesn\u2019t exist, the operation returns a 204 Success (No\n Content) response.

\n \n

This functionality is only supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-if-match-last-modified-time" + } + }, + "IfMatchSize": { + "target": "com.amazonaws.s3#IfMatchSize", + "traits": { + "smithy.api#documentation": "

If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn\u2019t exist, \n the operation returns a 204 Success (No Content) response.

\n \n

This functionality is only supported for directory buckets.

\n
\n \n

You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size \n conditional headers in conjunction with each-other or individually.

\n
", + "smithy.api#httpHeader": "x-amz-if-match-size" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteObjectTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteObjectTaggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#DeleteObjectTaggingOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes the entire tag set from the specified object. For more information about\n managing object tags, see Object Tagging.

\n

To use this operation, you must have permission to perform the\n s3:DeleteObjectTagging action.

\n

To delete tags of a specific object version, add the versionId query\n parameter in the request. You will need permission for the\n s3:DeleteObjectVersionTagging action.

\n

The following operations are related to DeleteObjectTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To remove tag set from an object", + "documentation": "The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "VersionId": "null" + } + }, + { + "title": "To remove tag set from an object version", + "documentation": "The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + }, + "output": { + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}/{Key+}?tagging", + "code": 204 + } + } + }, + "com.amazonaws.s3#DeleteObjectTaggingOutput": { + "type": "structure", + "members": { + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object the tag-set was removed from.

", + "smithy.api#httpHeader": "x-amz-version-id" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#DeleteObjectTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

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

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

The key that identifies the object in the bucket from which to remove all tags.

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

The versionId of the object that the tag-set will be removed from.

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

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteObjects": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteObjectsRequest" + }, + "output": { + "target": "com.amazonaws.s3#DeleteObjectsOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

This operation 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 operation provides\n a suitable alternative to sending individual delete requests, reducing per-request\n overhead.

\n

The request can contain a list of up to 1,000 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 operation and returns the result of that delete, success or failure, in the response.\n If the object specified in the request isn't found, Amazon S3 confirms the deletion by returning the result as deleted.

\n \n
    \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n

The operation supports two modes for the response: verbose and quiet. By default, the\n operation 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 operation encountered an error. For a successful deletion in a quiet mode, the operation\n does not return any information about the delete in the response body.

\n

When performing this action on an MFA Delete enabled bucket, that attempts to delete any\n 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 in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n MFA delete is not supported by directory buckets.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n following permissions are required in your policies when your\n DeleteObjects request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:DeleteObject\n \n - To delete an object from a bucket, you must always specify\n the s3:DeleteObject permission.

      \n
    • \n
    • \n

      \n \n s3:DeleteObjectVersion\n - To delete a specific version of an object from a\n versioning-enabled bucket, you must specify the\n s3:DeleteObjectVersion permission.

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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Content-MD5 request header
\n
\n
    \n
  • \n

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

    \n
  • \n
  • \n

    \n Directory bucket - The\n Content-MD5 request header or a additional checksum request header\n (including x-amz-checksum-crc32,\n x-amz-checksum-crc32c, x-amz-checksum-sha1, or\n x-amz-checksum-sha256) is required for all Multi-Object\n Delete requests.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteObjects:

\n ", + "smithy.api#examples": [ + { + "title": "To delete multiple object versions from a versioned bucket", + "documentation": "The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.", + "input": { + "Bucket": "examplebucket", + "Delete": { + "Objects": [ + { + "Key": "HappyFace.jpg", + "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + }, + { + "Key": "HappyFace.jpg", + "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + } + ], + "Quiet": false + } + }, + "output": { + "Deleted": [ + { + "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd", + "Key": "HappyFace.jpg" + }, + { + "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b", + "Key": "HappyFace.jpg" + } + ] + } + }, + { + "title": "To delete multiple objects from a versioned bucket", + "documentation": "The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.", + "input": { + "Bucket": "examplebucket", + "Delete": { + "Objects": [ + { + "Key": "objectkey1" + }, + { + "Key": "objectkey2" + } + ], + "Quiet": false + } + }, + "output": { + "Deleted": [ + { + "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", + "Key": "objectkey1", + "DeleteMarker": true + }, + { + "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", + "Key": "objectkey2", + "DeleteMarker": true + } + ] + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}?delete", + "code": 200 + } + } + }, + "com.amazonaws.s3#DeleteObjectsOutput": { + "type": "structure", + "members": { + "Deleted": { + "target": "com.amazonaws.s3#DeletedObjects", + "traits": { + "smithy.api#documentation": "

Container element for a successful delete. It identifies the object that was\n successfully deleted.

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

Container for a failed delete action that describes the object that Amazon S3 attempted to\n delete and the error it encountered.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Error" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "DeleteResult" + } + }, + "com.amazonaws.s3#DeleteObjectsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the objects to delete.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delete": { + "target": "com.amazonaws.s3#Delete", + "traits": { + "smithy.api#documentation": "

Container for the request.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "Delete" + } + }, + "MFA": { + "target": "com.amazonaws.s3#MFA", + "traits": { + "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.

\n

When performing the DeleteObjects operation on an MFA delete enabled\n bucket, which attempts to delete the specified versioned objects, you must include an MFA\n token. If you don't provide an MFA token, the entire request will fail, even if there are\n non-versioned objects that you are trying to delete. If you provide an invalid token,\n whether there are versioned object keys in the request or not, the entire Multi-Object\n Delete request will fail. For information about MFA Delete, see MFA\n Delete in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-mfa" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "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\n s3:BypassGovernanceRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, 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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n

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

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeletePublicAccessBlock": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeletePublicAccessBlockRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this\n operation, you must have the s3:PutBucketPublicAccessBlock permission. For\n more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

The following operations are related to DeletePublicAccessBlock:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?publicAccessBlock", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeletePublicAccessBlockRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeletedObject": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The name of the deleted object.

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

The version ID of the deleted object.

\n \n

This functionality is not supported for directory buckets.

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

Indicates whether the specified object version that was permanently deleted was (true)\n or was not (false) a delete marker before deletion. In a simple DELETE, this header\n indicates whether (true) or not (false) the current version of the object is a delete\n marker. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

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

The version ID of the delete marker created as a result of the DELETE operation. If you\n delete a specific object version, the value returned by this header is the version ID of\n the object version deleted.

\n \n

This functionality is not supported for directory buckets.

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

Information about the deleted object.

" + } + }, + "com.amazonaws.s3#DeletedObjects": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#DeletedObject" + } + }, + "com.amazonaws.s3#Delimiter": { + "type": "string" + }, + "com.amazonaws.s3#Description": { + "type": "string" + }, + "com.amazonaws.s3#Destination": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the\n results.

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

Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to\n change replica ownership to the Amazon Web Services account that owns the destination bucket by\n specifying the AccessControlTranslation property, this is the account ID of\n the destination bucket owner. For more information, see Replication Additional\n Configuration: Changing the Replica Owner in the\n Amazon S3 User Guide.

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

The storage class to use when replicating objects, such as S3 Standard or reduced\n redundancy. By default, Amazon S3 uses the storage class of the source object to create the\n object replica.

\n

For valid values, see the StorageClass element of the PUT Bucket\n replication action in the Amazon S3 API Reference.

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

Specify this only in a cross-account scenario (where source and destination bucket\n owners are not the same), and you want to change replica ownership to the Amazon Web Services account\n that owns the destination bucket. If this is not specified in the replication\n configuration, the replicas are owned by same Amazon Web Services account that owns the source\n object.

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

A container that provides information about encryption. If\n SourceSelectionCriteria is specified, you must specify this element.

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

A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time\n when all objects and operations on objects must be replicated. Must be specified together\n with a Metrics block.

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

A container specifying replication metrics-related settings enabling replication\n metrics and events.

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

Specifies information about where to publish analysis or configuration results for an\n Amazon S3 bucket and S3 Replication Time Control (S3 RTC).

" + } + }, + "com.amazonaws.s3#DirectoryBucketToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, + "com.amazonaws.s3#DisplayName": { + "type": "string" + }, + "com.amazonaws.s3#ETag": { + "type": "string" + }, + "com.amazonaws.s3#EmailAddress": { + "type": "string" + }, + "com.amazonaws.s3#EnableRequestProgress": { + "type": "boolean" + }, + "com.amazonaws.s3#EncodingType": { + "type": "enum", + "members": { + "url": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "url" + } + } + }, + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
" + } + }, + "com.amazonaws.s3#Encryption": { + "type": "structure", + "members": { + "EncryptionType": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when storing job results in Amazon S3 (for example,\n AES256, aws:kms).

", + "smithy.api#required": {} + } + }, + "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 encryption customer managed key to use for encryption of job results. Amazon S3 only\n supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service\n Developer Guide.

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

If the encryption type is aws:kms, this optional value can be used to\n specify the encryption context for the restore results.

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

Contains the type of server-side encryption used.

" + } + }, + "com.amazonaws.s3#EncryptionConfiguration": { + "type": "structure", + "members": { + "ReplicaKmsKeyID": { + "target": "com.amazonaws.s3#ReplicaKmsKeyID", + "traits": { + "smithy.api#documentation": "

Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in\n Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to\n encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more\n information, see Asymmetric keys in Amazon Web Services\n KMS in the Amazon Web Services Key Management Service Developer\n Guide.

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

Specifies encryption-related information for an Amazon S3 bucket that is a destination for\n replicated objects.

\n \n

If you're specifying a customer managed KMS key, we recommend using a fully\n qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the\n key within the requester\u2019s account. This behavior can result in data that's encrypted\n with a KMS key that belongs to the requester, and not the bucket owner.

\n
" + } + }, + "com.amazonaws.s3#EncryptionTypeMismatch": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

\n The existing object was created with a different encryption type. \n Subsequent write requests must include the appropriate encryption \n parameters in the request or while creating the session.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.s3#End": { + "type": "long" + }, + "com.amazonaws.s3#EndEvent": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

A message that indicates the request is complete and no more messages will be sent. You\n should not assume that the request is complete until the client receives an\n EndEvent.

" + } + }, + "com.amazonaws.s3#Error": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The error key.

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

The version ID of the error.

\n \n

This functionality is not supported for directory buckets.

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

The error code is a string that uniquely identifies an error condition. It is meant to\n be read and understood by programs that detect and handle errors by type. The following is\n a list of Amazon S3 error codes. For more information, see Error responses.

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

      \n Code: AccessDenied

      \n
    • \n
    • \n

      \n Description: Access Denied

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: AccountProblem

      \n
    • \n
    • \n

      \n Description: There is a problem with your Amazon Web Services account\n that prevents the action from completing successfully. Contact Amazon Web Services Support\n for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: AllAccessDisabled

      \n
    • \n
    • \n

      \n Description: All access to this Amazon S3 resource has been\n disabled. Contact Amazon Web Services Support for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: AmbiguousGrantByEmailAddress

      \n
    • \n
    • \n

      \n Description: The email address you provided is\n associated with more than one account.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: AuthorizationHeaderMalformed

      \n
    • \n
    • \n

      \n Description: The authorization header you provided is\n invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

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

      \n Code: BadDigest

      \n
    • \n
    • \n

      \n Description: The Content-MD5 you specified did not\n match what we received.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: BucketAlreadyExists

      \n
    • \n
    • \n

      \n Description: The requested bucket name is not\n available. The bucket namespace is shared by all users of the system. Please\n select a different name and try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: BucketAlreadyOwnedByYou

      \n
    • \n
    • \n

      \n Description: The bucket you tried to create already\n exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in\n the North Virginia Region. For legacy compatibility, if you re-create an\n existing bucket that you already own in the North Virginia Region, Amazon S3 returns\n 200 OK and resets the bucket access control lists (ACLs).

      \n
    • \n
    • \n

      \n Code: 409 Conflict (in all Regions except the North\n Virginia Region)

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: BucketNotEmpty

      \n
    • \n
    • \n

      \n Description: The bucket you tried to delete is not\n empty.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: CredentialsNotSupported

      \n
    • \n
    • \n

      \n Description: This request does not support\n credentials.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: CrossLocationLoggingProhibited

      \n
    • \n
    • \n

      \n Description: Cross-location logging not allowed.\n Buckets in one geographic location cannot log information to a bucket in\n another location.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: EntityTooSmall

      \n
    • \n
    • \n

      \n Description: Your proposed upload is smaller than the\n minimum allowed object size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: EntityTooLarge

      \n
    • \n
    • \n

      \n Description: Your proposed upload exceeds the maximum\n allowed object size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: ExpiredToken

      \n
    • \n
    • \n

      \n Description: The provided token has expired.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: IllegalVersioningConfigurationException

      \n
    • \n
    • \n

      \n Description: Indicates that the versioning\n configuration specified in the request is invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: IncompleteBody

      \n
    • \n
    • \n

      \n Description: You did not provide the number of bytes\n specified by the Content-Length HTTP header

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: IncorrectNumberOfFilesInPostRequest

      \n
    • \n
    • \n

      \n Description: POST requires exactly one file upload per\n request.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InlineDataTooLarge

      \n
    • \n
    • \n

      \n Description: Inline data exceeds the maximum allowed\n size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InternalError

      \n
    • \n
    • \n

      \n Description: We encountered an internal error. Please\n try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 500 Internal Server Error

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

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

      \n Code: InvalidAccessKeyId

      \n
    • \n
    • \n

      \n Description: The Amazon Web Services access key ID you provided does\n not exist in our records.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidAddressingHeader

      \n
    • \n
    • \n

      \n Description: You must specify the Anonymous\n role.

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidArgument

      \n
    • \n
    • \n

      \n Description: Invalid Argument

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidBucketName

      \n
    • \n
    • \n

      \n Description: The specified bucket is not valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidBucketState

      \n
    • \n
    • \n

      \n Description: The request is not valid with the current\n state of the bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidDigest

      \n
    • \n
    • \n

      \n Description: The Content-MD5 you specified is not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidEncryptionAlgorithmError

      \n
    • \n
    • \n

      \n Description: The encryption request you specified is\n not valid. The valid value is AES256.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidLocationConstraint

      \n
    • \n
    • \n

      \n Description: The specified location constraint is not\n valid. For more information about Regions, see How to Select\n a Region for Your Buckets.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidObjectState

      \n
    • \n
    • \n

      \n Description: The action is not valid for the current\n state of the object.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidPart

      \n
    • \n
    • \n

      \n Description: One or more of the specified parts could\n not be found. The part might not have been uploaded, or the specified entity\n tag might not have matched the part's entity tag.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidPartOrder

      \n
    • \n
    • \n

      \n Description: The list of parts was not in ascending\n order. Parts list must be specified in order by part number.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidPayer

      \n
    • \n
    • \n

      \n Description: All access to this object has been\n disabled. Please contact Amazon Web Services Support for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidPolicyDocument

      \n
    • \n
    • \n

      \n Description: The content of the form does not meet the\n conditions specified in the policy document.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidRange

      \n
    • \n
    • \n

      \n Description: The requested range cannot be\n satisfied.

      \n
    • \n
    • \n

      \n HTTP Status Code: 416 Requested Range Not\n Satisfiable

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Please use\n AWS4-HMAC-SHA256.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: SOAP requests must be made over an HTTPS\n connection.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported for buckets with non-DNS compliant names.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported for buckets with periods (.) in their names.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate endpoint only\n supports virtual style requests.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate is not configured\n on this bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate is disabled on\n this bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported on this bucket. Contact Amazon Web Services Support for more information.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

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

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration cannot be\n enabled on this bucket. Contact Amazon Web Services Support for more information.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

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

      \n Code: InvalidSecurity

      \n
    • \n
    • \n

      \n Description: The provided security credentials are not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidSOAPRequest

      \n
    • \n
    • \n

      \n Description: The SOAP request body is invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidStorageClass

      \n
    • \n
    • \n

      \n Description: The storage class you specified is not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidTargetBucketForLogging

      \n
    • \n
    • \n

      \n Description: The target bucket for logging does not\n exist, is not owned by you, or does not have the appropriate grants for the\n log-delivery group.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidToken

      \n
    • \n
    • \n

      \n Description: The provided token is malformed or\n otherwise invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: InvalidURI

      \n
    • \n
    • \n

      \n Description: Couldn't parse the specified URI.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: KeyTooLongError

      \n
    • \n
    • \n

      \n Description: Your key is too long.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MalformedACLError

      \n
    • \n
    • \n

      \n Description: The XML you provided was not well-formed\n or did not validate against our published schema.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MalformedPOSTRequest

      \n
    • \n
    • \n

      \n Description: The body of your POST request is not\n well-formed multipart/form-data.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MalformedXML

      \n
    • \n
    • \n

      \n Description: This happens when the user sends malformed\n XML (XML that doesn't conform to the published XSD) for the configuration. The\n error message is, \"The XML you provided was not well-formed or did not validate\n against our published schema.\"

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MaxMessageLengthExceeded

      \n
    • \n
    • \n

      \n Description: Your request was too big.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MaxPostPreDataLengthExceededError

      \n
    • \n
    • \n

      \n Description: Your POST request fields preceding the\n upload file were too large.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MetadataTooLarge

      \n
    • \n
    • \n

      \n Description: Your metadata headers exceed the maximum\n allowed metadata size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MethodNotAllowed

      \n
    • \n
    • \n

      \n Description: The specified method is not allowed\n against this resource.

      \n
    • \n
    • \n

      \n HTTP Status Code: 405 Method Not Allowed

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MissingAttachment

      \n
    • \n
    • \n

      \n Description: A SOAP attachment was expected, but none\n were found.

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MissingContentLength

      \n
    • \n
    • \n

      \n Description: You must provide the Content-Length HTTP\n header.

      \n
    • \n
    • \n

      \n HTTP Status Code: 411 Length Required

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MissingRequestBodyError

      \n
    • \n
    • \n

      \n Description: This happens when the user sends an empty\n XML document as a request. The error message is, \"Request body is empty.\"\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MissingSecurityElement

      \n
    • \n
    • \n

      \n Description: The SOAP 1.1 request is missing a security\n element.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: MissingSecurityHeader

      \n
    • \n
    • \n

      \n Description: Your request is missing a required\n header.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: NoLoggingStatusForKey

      \n
    • \n
    • \n

      \n Description: There is no such thing as a logging status\n subresource for a key.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: NoSuchBucket

      \n
    • \n
    • \n

      \n Description: The specified bucket does not\n exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: NoSuchBucketPolicy

      \n
    • \n
    • \n

      \n Description: The specified bucket does not have a\n bucket policy.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: NoSuchKey

      \n
    • \n
    • \n

      \n Description: The specified key does not exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: NoSuchLifecycleConfiguration

      \n
    • \n
    • \n

      \n Description: The lifecycle configuration does not\n exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: NoSuchUpload

      \n
    • \n
    • \n

      \n Description: The specified multipart upload does not\n exist. The upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: NoSuchVersion

      \n
    • \n
    • \n

      \n Description: Indicates that the version ID specified in\n the request does not match an existing version.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: NotImplemented

      \n
    • \n
    • \n

      \n Description: A header you provided implies\n functionality that is not implemented.

      \n
    • \n
    • \n

      \n HTTP Status Code: 501 Not Implemented

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

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

      \n Code: NotSignedUp

      \n
    • \n
    • \n

      \n Description: Your account is not signed up for the Amazon S3\n service. You must sign up before you can use Amazon S3. You can sign up at the\n following URL: Amazon S3\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: OperationAborted

      \n
    • \n
    • \n

      \n Description: A conflicting conditional action is\n currently in progress against this resource. Try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: PermanentRedirect

      \n
    • \n
    • \n

      \n Description: The bucket you are attempting to access\n must be addressed using the specified endpoint. Send all future requests to\n this endpoint.

      \n
    • \n
    • \n

      \n HTTP Status Code: 301 Moved Permanently

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: PreconditionFailed

      \n
    • \n
    • \n

      \n Description: At least one of the preconditions you\n specified did not hold.

      \n
    • \n
    • \n

      \n HTTP Status Code: 412 Precondition Failed

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: Redirect

      \n
    • \n
    • \n

      \n Description: Temporary redirect.

      \n
    • \n
    • \n

      \n HTTP Status Code: 307 Moved Temporarily

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: RestoreAlreadyInProgress

      \n
    • \n
    • \n

      \n Description: Object restore is already in\n progress.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: RequestIsNotMultiPartContent

      \n
    • \n
    • \n

      \n Description: Bucket POST must be of the enclosure-type\n multipart/form-data.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: RequestTimeout

      \n
    • \n
    • \n

      \n Description: Your socket connection to the server was\n not read from or written to within the timeout period.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: RequestTimeTooSkewed

      \n
    • \n
    • \n

      \n Description: The difference between the request time\n and the server's time is too large.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: RequestTorrentOfBucketError

      \n
    • \n
    • \n

      \n Description: Requesting the torrent file of a bucket is\n not permitted.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: SignatureDoesNotMatch

      \n
    • \n
    • \n

      \n Description: The request signature we calculated does\n not match the signature you provided. Check your Amazon Web Services secret access key and\n signing method. For more information, see REST\n Authentication and SOAP\n Authentication for details.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: ServiceUnavailable

      \n
    • \n
    • \n

      \n Description: Service is unable to handle\n request.

      \n
    • \n
    • \n

      \n HTTP Status Code: 503 Service Unavailable

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

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

      \n Code: SlowDown

      \n
    • \n
    • \n

      \n Description: Reduce your request rate.

      \n
    • \n
    • \n

      \n HTTP Status Code: 503 Slow Down

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

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

      \n Code: TemporaryRedirect

      \n
    • \n
    • \n

      \n Description: You are being redirected to the bucket\n while DNS updates.

      \n
    • \n
    • \n

      \n HTTP Status Code: 307 Moved Temporarily

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: TokenRefreshRequired

      \n
    • \n
    • \n

      \n Description: The provided token must be\n refreshed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: TooManyBuckets

      \n
    • \n
    • \n

      \n Description: You have attempted to create more buckets\n than allowed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: UnexpectedContent

      \n
    • \n
    • \n

      \n Description: This request does not support\n content.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: UnresolvableGrantByEmailAddress

      \n
    • \n
    • \n

      \n Description: The email address you provided does not\n match any account on record.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

      \n Code: UserKeyMustBeSpecified

      \n
    • \n
    • \n

      \n Description: The bucket POST must contain the specified\n field name. If it is specified, check the order of the fields.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

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

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

The error message contains a generic description of the error condition in English. It\n is intended for a human audience. Simple programs display the message directly to the end\n user if they encounter an error condition they don't know how or don't care to handle.\n Sophisticated programs with more exhaustive error handling and proper internationalization\n are more likely to ignore the error message.

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

Container for all error elements.

" + } + }, + "com.amazonaws.s3#ErrorCode": { + "type": "string" + }, + "com.amazonaws.s3#ErrorDetails": { + "type": "structure", + "members": { + "ErrorCode": { + "target": "com.amazonaws.s3#ErrorCode", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code. The possible error codes and \n error messages are as follows:\n

\n
    \n
  • \n

    \n AccessDeniedCreatingResources - You don't have sufficient permissions to \n create the required resources. Make sure that you have s3tables:CreateNamespace, \n s3tables:CreateTable, s3tables:GetTable and \n s3tables:PutTablePolicy permissions, and then try again. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.\n

    \n
  • \n
  • \n

    \n AccessDeniedWritingToTable - Unable to write to the metadata table because of \n missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new \n metadata table. To create a new metadata table, you must delete the metadata configuration for \n this bucket, and then create a new metadata configuration.

    \n
  • \n
  • \n

    \n DestinationTableNotFound - The destination table doesn't exist. To create a \n new metadata table, you must delete the metadata configuration for this bucket, and then \n create a new metadata configuration.

    \n
  • \n
  • \n

    \n ServerInternalError - An internal error has occurred. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.

    \n
  • \n
  • \n

    \n TableAlreadyExists - The table that you specified already exists in the table \n bucket's namespace. Specify a different table name. To create a new metadata table, you must \n delete the metadata configuration for this bucket, and then create a new metadata \n configuration.

    \n
  • \n
  • \n

    \n TableBucketNotFound - The table bucket that you specified doesn't exist in \n this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new \n metadata table, you must delete the metadata configuration for this bucket, and then create \n a new metadata configuration.

    \n
  • \n
" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.s3#ErrorMessage", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error message. The possible error codes and \n error messages are as follows:\n

\n
    \n
  • \n

    \n AccessDeniedCreatingResources - You don't have sufficient permissions to \n create the required resources. Make sure that you have s3tables:CreateNamespace, \n s3tables:CreateTable, s3tables:GetTable and \n s3tables:PutTablePolicy permissions, and then try again. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.\n

    \n
  • \n
  • \n

    \n AccessDeniedWritingToTable - Unable to write to the metadata table because of \n missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new \n metadata table. To create a new metadata table, you must delete the metadata configuration for \n this bucket, and then create a new metadata configuration.

    \n
  • \n
  • \n

    \n DestinationTableNotFound - The destination table doesn't exist. To create a \n new metadata table, you must delete the metadata configuration for this bucket, and then \n create a new metadata configuration.

    \n
  • \n
  • \n

    \n ServerInternalError - An internal error has occurred. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.

    \n
  • \n
  • \n

    \n TableAlreadyExists - The table that you specified already exists in the table \n bucket's namespace. Specify a different table name. To create a new metadata table, you must \n delete the metadata configuration for this bucket, and then create a new metadata \n configuration.

    \n
  • \n
  • \n

    \n TableBucketNotFound - The table bucket that you specified doesn't exist in \n this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new \n metadata table, you must delete the metadata configuration for this bucket, and then create \n a new metadata configuration.

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

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code and error message.\n

" + } + }, + "com.amazonaws.s3#ErrorDocument": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key name to use when a 4XX class error occurs.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

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

The error information.

" + } + }, + "com.amazonaws.s3#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.s3#Errors": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Error" + } + }, + "com.amazonaws.s3#Event": { + "type": "enum", + "members": { + "s3_ReducedRedundancyLostObject": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ReducedRedundancyLostObject" + } + }, + "s3_ObjectCreated_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:*" + } + }, + "s3_ObjectCreated_Put": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:Put" + } + }, + "s3_ObjectCreated_Post": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:Post" + } + }, + "s3_ObjectCreated_Copy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:Copy" + } + }, + "s3_ObjectCreated_CompleteMultipartUpload": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:CompleteMultipartUpload" + } + }, + "s3_ObjectRemoved_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRemoved:*" + } + }, + "s3_ObjectRemoved_Delete": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRemoved:Delete" + } + }, + "s3_ObjectRemoved_DeleteMarkerCreated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRemoved:DeleteMarkerCreated" + } + }, + "s3_ObjectRestore_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRestore:*" + } + }, + "s3_ObjectRestore_Post": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRestore:Post" + } + }, + "s3_ObjectRestore_Completed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRestore:Completed" + } + }, + "s3_Replication_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:*" + } + }, + "s3_Replication_OperationFailedReplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:OperationFailedReplication" + } + }, + "s3_Replication_OperationNotTracked": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:OperationNotTracked" + } + }, + "s3_Replication_OperationMissedThreshold": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:OperationMissedThreshold" + } + }, + "s3_Replication_OperationReplicatedAfterThreshold": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:OperationReplicatedAfterThreshold" + } + }, + "s3_ObjectRestore_Delete": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRestore:Delete" + } + }, + "s3_LifecycleTransition": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:LifecycleTransition" + } + }, + "s3_IntelligentTiering": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:IntelligentTiering" + } + }, + "s3_ObjectAcl_Put": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectAcl:Put" + } + }, + "s3_LifecycleExpiration_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:LifecycleExpiration:*" + } + }, + "s3_LifecycleExpiration_Delete": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:LifecycleExpiration:Delete" + } + }, + "s3_LifecycleExpiration_DeleteMarkerCreated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:LifecycleExpiration:DeleteMarkerCreated" + } + }, + "s3_ObjectTagging_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectTagging:*" + } + }, + "s3_ObjectTagging_Put": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectTagging:Put" + } + }, + "s3_ObjectTagging_Delete": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectTagging:Delete" + } + } + }, + "traits": { + "smithy.api#documentation": "

The bucket event for which to send notifications.

" + } + }, + "com.amazonaws.s3#EventBridgeConfiguration": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

A container for specifying the configuration for Amazon EventBridge.

" + } + }, + "com.amazonaws.s3#EventList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Event" + } + }, + "com.amazonaws.s3#ExistingObjectReplication": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#ExistingObjectReplicationStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 replicates existing source bucket objects.

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

Optional configuration to replicate existing source bucket objects.

\n \n

This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the\n Amazon S3 User Guide.

\n
" + } + }, + "com.amazonaws.s3#ExistingObjectReplicationStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#Expiration": { + "type": "string" + }, + "com.amazonaws.s3#ExpirationStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#ExpiredObjectDeleteMarker": { + "type": "boolean" + }, + "com.amazonaws.s3#Expires": { + "type": "timestamp" + }, + "com.amazonaws.s3#ExposeHeader": { + "type": "string" + }, + "com.amazonaws.s3#ExposeHeaders": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ExposeHeader" + } + }, + "com.amazonaws.s3#Expression": { + "type": "string" + }, + "com.amazonaws.s3#ExpressionType": { + "type": "enum", + "members": { + "SQL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SQL" + } + } + } + }, + "com.amazonaws.s3#FetchOwner": { + "type": "boolean" + }, + "com.amazonaws.s3#FieldDelimiter": { + "type": "string" + }, + "com.amazonaws.s3#FileHeaderInfo": { + "type": "enum", + "members": { + "USE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USE" + } + }, + "IGNORE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IGNORE" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + } + } + }, + "com.amazonaws.s3#FilterRule": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.s3#FilterRuleName", + "traits": { + "smithy.api#documentation": "

The object key name prefix or suffix identifying one or more objects to which the\n filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and\n suffixes are not supported. For more information, see Configuring Event Notifications\n in the Amazon S3 User Guide.

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

The value that the filter searches for in object key names.

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

Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned\n to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of\n the object key name. A prefix is a specific string of characters at the beginning of an\n object key name, which you can use to organize objects. For example, you can start the key\n names of related objects with a prefix, such as 2023- or\n engineering/. Then, you can use FilterRule to find objects in\n a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it\n is at the end of the object key name instead of at the beginning.

" + } + }, + "com.amazonaws.s3#FilterRuleList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#FilterRule" + }, + "traits": { + "smithy.api#documentation": "

A list of containers for the key-value pair that defines the criteria for the filter\n rule.

" + } + }, + "com.amazonaws.s3#FilterRuleName": { + "type": "enum", + "members": { + "prefix": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "prefix" + } + }, + "suffix": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "suffix" + } + } + } + }, + "com.amazonaws.s3#FilterRuleValue": { + "type": "string" + }, + "com.amazonaws.s3#GetBucketAccelerateConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketAccelerateConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketAccelerateConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action uses the accelerate subresource to\n return the Transfer Acceleration state of a bucket, which is either Enabled or\n Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that\n enables you to perform faster data transfers to and from Amazon S3.

\n

To use this operation, you must have permission to perform the\n s3:GetAccelerateConfiguration 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 in the\n Amazon S3 User Guide.

\n

You set the Transfer Acceleration state of an existing bucket to Enabled or\n Suspended by using the PutBucketAccelerateConfiguration operation.

\n

A GET accelerate request does not return a state value for a bucket that\n has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state\n has never been set on the bucket.

\n

For more information about transfer acceleration, see Transfer Acceleration in\n the Amazon S3 User Guide.

\n

The following operations are related to\n GetBucketAccelerateConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?accelerate", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketAccelerateConfigurationOutput": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#BucketAccelerateStatus", + "traits": { + "smithy.api#documentation": "

The accelerate configuration of the bucket.

" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "AccelerateConfiguration" + } + }, + "com.amazonaws.s3#GetBucketAccelerateConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which the accelerate configuration is retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketAcl": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketAclRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketAclOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action uses the acl subresource\n to return the access control list (ACL) of a bucket. To use GET to return the\n ACL of the bucket, you must have the READ_ACP access to the bucket. If\n READ_ACP permission is granted to the anonymous user, you can return the\n ACL of the bucket without using an authorization header.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\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\n bucket-owner-full-control ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.

\n
\n

The following operations are related to GetBucketAcl:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?acl", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketAclOutput": { + "type": "structure", + "members": { + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

Container for the bucket owner's display name and ID.

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

A list of grants.

", + "smithy.api#xmlName": "AccessControlList" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "AccessControlPolicy" + } + }, + "com.amazonaws.s3#GetBucketAclRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies the S3 bucket whose ACL is being requested.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketAnalyticsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketAnalyticsConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketAnalyticsConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action returns an analytics configuration (identified by\n the analytics configuration ID) from the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration 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 in the\n Amazon S3 User Guide.

\n

For information about Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis in the Amazon S3 User Guide.

\n

The following operations are related to\n GetBucketAnalyticsConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketAnalyticsConfigurationOutput": { + "type": "structure", + "members": { + "AnalyticsConfiguration": { + "target": "com.amazonaws.s3#AnalyticsConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration and any analyses for the analytics filter.

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

The name of the bucket from which an analytics configuration is retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#AnalyticsId", + "traits": { + "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketCors": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketCorsRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketCorsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

\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

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n

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

\n

The following operations are related to GetBucketCors:

\n ", + "smithy.api#examples": [ + { + "title": "To get cors configuration set on a bucket", + "documentation": "The following example returns cross-origin resource sharing (CORS) configuration set on a bucket.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "CORSRules": [ + { + "AllowedHeaders": [ + "Authorization" + ], + "MaxAgeSeconds": 3000, + "AllowedMethods": [ + "GET" + ], + "AllowedOrigins": [ + "*" + ] + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?cors", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketCorsOutput": { + "type": "structure", + "members": { + "CORSRules": { + "target": "com.amazonaws.s3#CORSRules", + "traits": { + "smithy.api#documentation": "

A set of origins and methods (cross-origin access that you want to allow). You can add\n up to 100 rules to the configuration.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "CORSRule" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "CORSConfiguration" + } + }, + "com.amazonaws.s3#GetBucketCorsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which to get the cors configuration.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketEncryption": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketEncryptionRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketEncryptionOutput" + }, + "traits": { + "smithy.api#documentation": "

Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets\n have a default encryption configuration that uses server-side encryption with Amazon S3 managed\n keys (SSE-S3).

\n \n \n \n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:GetEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:GetEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to GetBucketEncryption:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?encryption", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketEncryptionOutput": { + "type": "structure", + "members": { + "ServerSideEncryptionConfiguration": { + "target": "com.amazonaws.s3#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketEncryptionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket from which the server-side encryption configuration is\n retrieved.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketIntelligentTieringConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Gets the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to GetBucketIntelligentTieringConfiguration include:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationOutput": { + "type": "structure", + "members": { + "IntelligentTieringConfiguration": { + "target": "com.amazonaws.s3#IntelligentTieringConfiguration", + "traits": { + "smithy.api#documentation": "

Container for S3 Intelligent-Tiering configuration.

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

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#IntelligentTieringId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketInventoryConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketInventoryConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketInventoryConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns an inventory configuration (identified by the inventory configuration ID) from\n the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration action. The bucket owner has this permission\n by default and can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

\n

The following operations are related to\n GetBucketInventoryConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketInventoryConfigurationOutput": { + "type": "structure", + "members": { + "InventoryConfiguration": { + "target": "com.amazonaws.s3#InventoryConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the inventory configuration.

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

The name of the bucket containing the inventory configuration to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#InventoryId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketLifecycleConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketLifecycleConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketLifecycleConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "

Returns the lifecycle configuration information set on the bucket. For information about\n lifecycle configuration, see Object Lifecycle\n Management.

\n

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object\n key name prefix, one or more object tags, object size, or any combination of these.\n Accordingly, this section describes the latest API, which is compatible with the new\n functionality. The previous version of the API supported filtering based only on an object\n key name prefix, which is supported for general purpose buckets for backward compatibility.\n For the related API description, see GetBucketLifecycle.

\n \n

Lifecyle configurations for directory buckets only support expiring objects and\n cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters\n are not supported.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:GetLifecycleConfiguration\n permission.

    \n

    For more information about permissions, see Managing Access\n Permissions to Your Amazon S3 Resources.

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

    \n Directory bucket permissions -\n You must have the s3express:GetLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n

\n GetBucketLifecycleConfiguration has the following special error:

\n
    \n
  • \n

    Error code: NoSuchLifecycleConfiguration\n

    \n
      \n
    • \n

      Description: The lifecycle configuration does not exist.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      SOAP Fault Code Prefix: Client

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

The following operations are related to\n GetBucketLifecycleConfiguration:

\n ", + "smithy.api#examples": [ + { + "title": "To get lifecycle configuration on a bucket", + "documentation": "The following example retrieves lifecycle configuration on set on a bucket. ", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "Rules": [ + { + "Prefix": "TaxDocs", + "Status": "Enabled", + "Transitions": [ + { + "Days": 365, + "StorageClass": "STANDARD_IA" + } + ], + "ID": "Rule for TaxDocs/" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?lifecycle", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketLifecycleConfigurationOutput": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.s3#LifecycleRules", + "traits": { + "smithy.api#documentation": "

Container for a lifecycle rule.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Rule" + } + }, + "TransitionDefaultMinimumObjectSize": { + "target": "com.amazonaws.s3#TransitionDefaultMinimumObjectSize", + "traits": { + "smithy.api#documentation": "

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It isn't supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", + "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "LifecycleConfiguration" + } + }, + "com.amazonaws.s3#GetBucketLifecycleConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the lifecycle information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketLocation": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketLocationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketLocationOutput" + }, + "traits": { + "aws.customizations#s3UnwrappedXmlOutput": {}, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the Region the bucket resides in. You set the bucket's Region using the\n LocationConstraint request parameter in a CreateBucket\n request. For more information, see CreateBucket.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

We recommend that you use HeadBucket to return the Region\n that a bucket resides in. For backward compatibility, Amazon S3 continues to support\n GetBucketLocation.

\n
\n

The following operations are related to GetBucketLocation:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket location", + "documentation": "The following example returns bucket location.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "LocationConstraint": "us-west-2" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?location", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketLocationOutput": { + "type": "structure", + "members": { + "LocationConstraint": { + "target": "com.amazonaws.s3#BucketLocationConstraint", + "traits": { + "smithy.api#documentation": "

Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported\n location constraints by Region, see Regions and Endpoints.

\n

Buckets in Region us-east-1 have a LocationConstraint of\n null. Buckets with a LocationConstraint of EU reside in eu-west-1.

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

The name of the bucket for which to get the location.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketLogging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketLoggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketLoggingOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the logging status of a bucket and the permissions users have to view and modify\n that status.

\n

The following operations are related to GetBucketLogging:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?logging", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketLoggingOutput": { + "type": "structure", + "members": { + "LoggingEnabled": { + "target": "com.amazonaws.s3#LoggingEnabled" + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "BucketLoggingStatus" + } + }, + "com.amazonaws.s3#GetBucketLoggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which to get the logging information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "

\n Retrieves the metadata table configuration for a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n
\n
\n

The following operations are related to GetBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?metadataTable", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfigurationOutput": { + "type": "structure", + "members": { + "GetBucketMetadataTableConfigurationResult": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationResult", + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for the general purpose bucket.\n

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

\n The general purpose bucket that contains the metadata table configuration that you want to retrieve.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfigurationResult": { + "type": "structure", + "members": { + "MetadataTableConfigurationResult": { + "target": "com.amazonaws.s3#MetadataTableConfigurationResult", + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

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

\n The status of the metadata table. The status values are:\n

\n
    \n
  • \n

    \n CREATING - The metadata table is in the process of being created in the \n specified table bucket.

    \n
  • \n
  • \n

    \n ACTIVE - The metadata table has been created successfully and records \n are being delivered to the table.\n

    \n
  • \n
  • \n

    \n FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver \n records. See ErrorDetails for details.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "Error": { + "target": "com.amazonaws.s3#ErrorDetails", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code and error message. \n

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

\n The metadata table configuration for a general purpose bucket.\n

" + } + }, + "com.amazonaws.s3#GetBucketMetricsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketMetricsConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketMetricsConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Gets a metrics configuration (specified by the metrics configuration ID) from the\n bucket. Note that this doesn't include the daily storage metrics.

\n

To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.

\n

The following operations are related to\n GetBucketMetricsConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketMetricsConfigurationOutput": { + "type": "structure", + "members": { + "MetricsConfiguration": { + "target": "com.amazonaws.s3#MetricsConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the metrics configuration.

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

The name of the bucket containing the metrics configuration to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#MetricsId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketNotificationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketNotificationConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#NotificationConfiguration" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the notification configuration of a bucket.

\n

If notifications are not enabled on the bucket, the action returns an empty\n NotificationConfiguration element.

\n

By default, you must be the bucket owner to read the notification configuration of a\n bucket. However, the bucket owner can use a bucket policy to grant permission to other\n users to read this configuration with the s3:GetBucketNotification\n permission.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n

For more information about setting and reading the notification configuration on a\n bucket, see Setting Up Notification of Bucket Events. For more information about bucket\n policies, see Using Bucket Policies.

\n

The following action is related to GetBucketNotification:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?notification", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketNotificationConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the notification configuration.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketOwnershipControls": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketOwnershipControlsRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketOwnershipControlsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you\n must have the s3:GetBucketOwnershipControls permission. For more information\n about Amazon S3 permissions, see Specifying permissions in a\n policy.

\n

For information about Amazon S3 Object Ownership, see Using Object\n Ownership.

\n

The following operations are related to GetBucketOwnershipControls:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?ownershipControls", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketOwnershipControlsOutput": { + "type": "structure", + "members": { + "OwnershipControls": { + "target": "com.amazonaws.s3#OwnershipControls", + "traits": { + "smithy.api#documentation": "

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or\n ObjectWriter) currently in effect for this Amazon S3 bucket.

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

The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketPolicyRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketPolicyOutput" + }, + "traits": { + "smithy.api#documentation": "

Returns the policy of a specified bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n GetBucketPolicy permissions on the specified bucket and belong to\n the bucket owner's account in order to use this operation.

\n

If you don't have GetBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:GetBucketPolicy permission is required in a policy. For\n more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:GetBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Example bucket policies
\n
\n

\n General purpose buckets example bucket policies\n - See Bucket policy\n examples in the Amazon S3 User Guide.

\n

\n Directory bucket example bucket policies\n - See Example bucket policies for S3 Express One Zone in the\n Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following action is related to GetBucketPolicy:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket policy", + "documentation": "The following example returns bucket policy associated with a bucket.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "Policy": "{\"Version\":\"2008-10-17\",\"Id\":\"LogPolicy\",\"Statement\":[{\"Sid\":\"Enables the log delivery group to publish logs to your bucket \",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"111122223333\"},\"Action\":[\"s3:GetBucketAcl\",\"s3:GetObjectAcl\",\"s3:PutObject\"],\"Resource\":[\"arn:aws:s3:::policytest1/*\",\"arn:aws:s3:::policytest1\"]}]}" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?policy", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketPolicyOutput": { + "type": "structure", + "members": { + "Policy": { + "target": "com.amazonaws.s3#Policy", + "traits": { + "smithy.api#documentation": "

The bucket policy as a JSON document.

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

The bucket name to get the bucket policy for.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

\n

\n Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

\n Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketPolicyStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketPolicyStatusRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketPolicyStatusOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public.\n In order to use this operation, you must have the s3:GetBucketPolicyStatus\n permission. For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\n

For more information about when Amazon S3 considers a bucket public, see The Meaning of \"Public\".

\n

The following operations are related to GetBucketPolicyStatus:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?policyStatus", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketPolicyStatusOutput": { + "type": "structure", + "members": { + "PolicyStatus": { + "target": "com.amazonaws.s3#PolicyStatus", + "traits": { + "smithy.api#documentation": "

The policy status for the specified bucket.

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

The name of the Amazon S3 bucket whose policy status you want to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketReplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketReplicationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketReplicationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the replication configuration of a bucket.

\n \n

It can take a while to propagate the put or delete a replication configuration to\n all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong\n result.

\n
\n

For information about replication configuration, see Replication in the\n Amazon S3 User Guide.

\n

This action requires permissions for the s3:GetReplicationConfiguration\n action. For more information about permissions, see Using Bucket Policies and User\n Policies.

\n

If you include the Filter element in a replication configuration, you must\n also include the DeleteMarkerReplication and Priority elements.\n The response also returns those elements.

\n

For information about GetBucketReplication errors, see List of\n replication-related error codes\n

\n

The following operations are related to GetBucketReplication:

\n ", + "smithy.api#examples": [ + { + "title": "To get replication configuration set on a bucket", + "documentation": "The following example returns replication configuration set on a bucket.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "ReplicationConfiguration": { + "Rules": [ + { + "Status": "Enabled", + "Prefix": "Tax", + "Destination": { + "Bucket": "arn:aws:s3:::destination-bucket" + }, + "ID": "MWIwNTkwZmItMTE3MS00ZTc3LWJkZDEtNzRmODQwYzc1OTQy" + } + ], + "Role": "arn:aws:iam::acct-id:role/example-role" + } + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?replication", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketReplicationOutput": { + "type": "structure", + "members": { + "ReplicationConfiguration": { + "target": "com.amazonaws.s3#ReplicationConfiguration", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketReplicationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which to get the replication information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketRequestPayment": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketRequestPaymentRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketRequestPaymentOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the request payment configuration of a bucket. To use this version of the\n operation, you must be the bucket owner. For more information, see Requester Pays\n Buckets.

\n

The following operations are related to GetBucketRequestPayment:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket versioning configuration", + "documentation": "The following example retrieves bucket versioning configuration.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "Payer": "BucketOwner" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?requestPayment", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketRequestPaymentOutput": { + "type": "structure", + "members": { + "Payer": { + "target": "com.amazonaws.s3#Payer", + "traits": { + "smithy.api#documentation": "

Specifies who pays for the download and request fees.

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

The name of the bucket for which to get the payment request configuration

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketTaggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketTaggingOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 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

The following operations are related to GetBucketTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To get tag set associated with a bucket", + "documentation": "The following example returns tag set associated with a bucket", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "TagSet": [ + { + "Value": "value1", + "Key": "key1" + }, + { + "Value": "value2", + "Key": "key2" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?tagging", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketTaggingOutput": { + "type": "structure", + "members": { + "TagSet": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

Contains the tag set.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "Tagging" + } + }, + "com.amazonaws.s3#GetBucketTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the tagging information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketVersioning": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketVersioningRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketVersioningOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the versioning state of a bucket.

\n

To retrieve the versioning state of a bucket, you must be the bucket owner.

\n

This implementation also returns the MFA Delete status of the versioning state. If the\n MFA Delete status is enabled, the bucket owner must use an authentication\n device to change the versioning state of the bucket.

\n

The following operations are related to GetBucketVersioning:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket versioning configuration", + "documentation": "The following example retrieves bucket versioning configuration.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "Status": "Enabled", + "MFADelete": "Disabled" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?versioning", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketVersioningOutput": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#BucketVersioningStatus", + "traits": { + "smithy.api#documentation": "

The versioning state of the bucket.

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

Specifies whether MFA delete is enabled in the bucket versioning configuration. This\n element is only returned if the bucket has been configured with MFA delete. If the bucket\n has never been so configured, this element is not returned.

", + "smithy.api#xmlName": "MfaDelete" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "VersioningConfiguration" + } + }, + "com.amazonaws.s3#GetBucketVersioningRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the versioning information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketWebsite": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketWebsiteRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketWebsiteOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the website configuration for a bucket. To host website on Amazon S3, you can\n configure a bucket as website by adding a website configuration. For more information about\n hosting websites, see Hosting Websites on Amazon S3.

\n

This GET action requires the S3:GetBucketWebsite permission. By default,\n only the bucket owner can read the bucket website configuration. However, bucket owners can\n allow other users to read the website configuration by writing a bucket policy granting\n them the S3:GetBucketWebsite permission.

\n

The following operations are related to GetBucketWebsite:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket website configuration", + "documentation": "The following example retrieves website configuration of a bucket.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "IndexDocument": { + "Suffix": "index.html" + }, + "ErrorDocument": { + "Key": "error.html" + } + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?website", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketWebsiteOutput": { + "type": "structure", + "members": { + "RedirectAllRequestsTo": { + "target": "com.amazonaws.s3#RedirectAllRequestsTo", + "traits": { + "smithy.api#documentation": "

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3\n bucket.

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

The name of the index document for the website (for example\n index.html).

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

The object key name of the website error document to use for 4XX class errors.

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

Rules that define when a redirect is applied and the redirect behavior.

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

The bucket name for which to get the website configuration.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#InvalidObjectState" + }, + { + "target": "com.amazonaws.s3#NoSuchKey" + } + ], + "traits": { + "aws.protocols#httpChecksum": { + "requestValidationModeMember": "ChecksumMode", + "responseAlgorithms": [ + "CRC64NVME", + "CRC32", + "CRC32C", + "SHA256", + "SHA1" + ] + }, + "smithy.api#documentation": "

Retrieves an object from Amazon S3.

\n

In the GetObject request, specify the full key name for the object.

\n

\n General purpose buckets - Both the virtual-hosted-style\n requests and the path-style requests are supported. For a virtual hosted-style request\n example, if you have the object photos/2006/February/sample.jpg, specify the\n object key name as /photos/2006/February/sample.jpg. For a path-style request\n example, if you have the object photos/2006/February/sample.jpg in the bucket\n named examplebucket, specify the object key name as\n /examplebucket/photos/2006/February/sample.jpg. For more information about\n request types, see HTTP Host\n Header Bucket Specification in the Amazon S3 User Guide.

\n

\n Directory buckets -\n Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named amzn-s3-demo-bucket--usw2-az1--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the required permissions in a policy. To use\n GetObject, you must have the READ access to the\n object (or version). If you grant READ access to the anonymous\n user, the GetObject operation returns the object without using\n an authorization header. For more information, see Specifying permissions in a policy in the\n Amazon S3 User Guide.

    \n

    If you include a versionId in your request header, you must\n have the s3:GetObjectVersion permission to access a specific\n version of an object. The s3:GetObject permission is not\n required in this scenario.

    \n

    If you request the current version of an object without a specific\n versionId in the request header, only the\n s3:GetObject permission is required. The\n s3:GetObjectVersion permission is not required in this\n scenario.

    \n

    If the object that you request doesn\u2019t exist, the error that Amazon S3 returns\n depends on whether you also have the s3:ListBucket\n permission.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

      If you don\u2019t have the s3:ListBucket permission, Amazon S3\n returns an HTTP status code 403 Access Denied\n error.

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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If\n the\n object is encrypted using SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Storage classes
\n
\n

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

\n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. \nUnsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

\n
\n
Encryption
\n
\n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for the GetObject requests, if your object uses\n server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side\n encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your\n GetObject requests for the object that uses these types of keys,\n you\u2019ll get an HTTP 400 Bad Request error.

\n

\n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

\n
\n
Overriding response header values through the request
\n
\n

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

\n

You can override values for a set of response headers. These modified response\n header values are included only in a successful response, that is, when the HTTP\n status code 200 OK is returned. The headers you can override using\n the following query parameters in the request are a subset of the headers that\n Amazon S3 accepts when you create an object.

\n

The response headers that you can override for the GetObject\n response are Cache-Control, Content-Disposition,\n Content-Encoding, Content-Language,\n Content-Type, and Expires.

\n

To override values for a set of response headers in the GetObject\n response, you can use the following query parameters in the request.

\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 response-content-language\n

    \n
  • \n
  • \n

    \n response-content-type\n

    \n
  • \n
  • \n

    \n response-expires\n

    \n
  • \n
\n \n

When you use these parameters, you must sign the request by using either an\n Authorization header or a presigned URL. These parameters cannot be used with\n an unsigned (anonymous) request.

\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to GetObject:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve a byte range of an object ", + "documentation": "The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.", + "input": { + "Bucket": "examplebucket", + "Key": "SampleFile.txt", + "Range": "bytes=0-9" + }, + "output": { + "AcceptRanges": "bytes", + "ContentType": "text/plain", + "LastModified": "2014-10-09T22:57:28.000Z", + "ContentLength": 10, + "VersionId": "null", + "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"", + "ContentRange": "bytes 0-9/43", + "Metadata": {} + } + }, + { + "title": "To retrieve an object", + "documentation": "The following example retrieves an object for an S3 bucket.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "AcceptRanges": "bytes", + "ContentType": "image/jpeg", + "LastModified": "2016-12-15T01:19:41.000Z", + "ContentLength": 3191, + "VersionId": "null", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "TagCount": 2, + "Metadata": {} + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?x-id=GetObject", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectAcl": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectAclRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectAclOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchKey" + } + ], + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 functionality is not supported for Amazon S3 on Outposts.

\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\n bucket-owner-full-control ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.

\n
\n

The following operations are related to GetObjectAcl:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve object ACL", + "documentation": "The following example retrieves access control list (ACL) of an object.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Grants": [ + { + "Grantee": { + "Type": "CanonicalUser", + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Permission": "WRITE" + }, + { + "Grantee": { + "Type": "CanonicalUser", + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Permission": "WRITE_ACP" + }, + { + "Grantee": { + "Type": "CanonicalUser", + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Permission": "READ" + }, + { + "Grantee": { + "Type": "CanonicalUser", + "DisplayName": "owner-display-name", + "ID": "852b113eexamplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Permission": "READ_ACP" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?acl", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectAclOutput": { + "type": "structure", + "members": { + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

Container for the bucket owner's display name and ID.

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

A list of grants.

", + "smithy.api#xmlName": "AccessControlList" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "AccessControlPolicy" + } + }, + "com.amazonaws.s3#GetObjectAclRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name that contains the object for which to get the ACL information.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key of the object for which to get the ACL information.

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

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpQuery": "versionId" + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "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 operation is useful if you're interested only in an object's metadata.

\n

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

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

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

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If\n the\n object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Encryption
\n
\n \n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for HEAD requests if your object uses\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side\n encryption with Amazon S3 managed encryption keys (SSE-S3). The\n x-amz-server-side-encryption header is used when you\n PUT an object to S3 and want to specify the encryption method.\n If you include this header in a GET request for an object that\n uses these types of keys, you\u2019ll get an HTTP 400 Bad Request\n error. It's because the encryption method can't be changed when you retrieve\n the object.

\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\n the metadata from the object, you must use the following headers to provide the\n encryption key for the server to be able to retrieve the object's metadata. The\n headers are:

\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\n Encryption (Using Customer-Provided Encryption Keys) in the\n Amazon S3 User Guide.

\n \n

\n Directory bucket permissions -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

\n
\n
\n
Versioning
\n
\n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

\n
\n
Conditional request headers
\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\n true.

      \n
    • \n
    • \n

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

      \n
    • \n
    \n

    For more information about conditional requests, see RFC 7232.

    \n
  • \n
  • \n

    If both of the If-None-Match and\n If-Modified-Since headers are present in the request as\n follows, then Amazon S3 returns the HTTP status code 304 Not\n 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

    For more information about conditional requests, see RFC 7232.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\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. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

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

Date and time when the object was last modified.

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

The version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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

For more information, see Storage Classes.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

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

The size of the object in bytes.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "GetObjectAttributesResponse" + } + }, + "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 true\n indicates that the list was truncated. A list can be truncated if the number of parts\n 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.

\n \n
    \n
  • \n

    \n General purpose buckets - For\n GetObjectAttributes, if a additional checksum (including\n x-amz-checksum-crc32, x-amz-checksum-crc32c,\n x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't\n applied to the object specified in the request, the response doesn't return\n Part.

    \n
  • \n
  • \n

    \n Directory buckets - For\n GetObjectAttributes, no matter whether a additional checksum is\n applied to the object specified in the request, the response returns\n Part.

    \n
  • \n
\n
", + "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

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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.

\n \n

S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

\n
", + "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, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, 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": "

Specifies the fields at the root level that you want returned in the response. Fields\n that you do not specify are not returned.

", + "smithy.api#httpHeader": "x-amz-object-attributes", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectLegalHold": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectLegalHoldRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectLegalHoldOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectLegalHold:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?legal-hold", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectLegalHoldOutput": { + "type": "structure", + "members": { + "LegalHold": { + "target": "com.amazonaws.s3#ObjectLockLegalHold", + "traits": { + "smithy.api#documentation": "

The current legal hold status for the specified object.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "LegalHold" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectLegalHoldRequest": { + "type": "structure", + "members": { + "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

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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#httpLabel": {}, + "smithy.api#required": {} + } + }, + "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#httpQuery": "versionId" + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectLockConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectLockConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectLockConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 Objects.

\n

The following action is related to GetObjectLockConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?object-lock", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectLockConfigurationOutput": { + "type": "structure", + "members": { + "ObjectLockConfiguration": { + "target": "com.amazonaws.s3#ObjectLockConfiguration", + "traits": { + "smithy.api#documentation": "

The specified bucket's Object Lock configuration.

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

The bucket whose Object Lock configuration you want to retrieve.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectOutput": { + "type": "structure", + "members": { + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

Object data.

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

Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.

\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

    If the specified version in the request is a delete marker, the response\n returns a 405 Method Not Allowed error and the Last-Modified:\n timestamp response header.

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

Indicates that a range of bytes was specified in the request.

", + "smithy.api#httpHeader": "accept-ranges" + } + }, + "Expiration": { + "target": "com.amazonaws.s3#Expiration", + "traits": { + "smithy.api#documentation": "

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

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

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

Provides information about object restoration action and expiration time of the restored\n object copy.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

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

Date and time when the object was last modified.

\n

\n General purpose buckets - When you specify a\n versionId of the object in your request, if the specified version in the\n request is a delete marker, the response returns a 405 Method Not Allowed\n error and the Last-Modified: timestamp response header.

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

Size of the body in bytes.

", + "smithy.api#httpHeader": "Content-Length" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "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 checksum is only present if the object was uploaded\n with the object. For more information, 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 the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

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

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in the\n CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

This is set to the number of metadata entries not returned in the headers that are\n prefixed with x-amz-meta-. This can happen if you create metadata using an API\n like SOAP that supports more flexible metadata than the REST API. For example, using SOAP,\n you can create metadata whose values are not legal HTTP headers.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-missing-meta" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Indicates what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentRange": { + "target": "com.amazonaws.s3#ContentRange", + "traits": { + "smithy.api#documentation": "

The portion of the object returned in the response.

", + "smithy.api#httpHeader": "Content-Range" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

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

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3.

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

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

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

If present, indicates the ID of the KMS key that was used for object encryption.

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

Indicates whether the object uses an S3 Bucket Key for server-side encryption with\n Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "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

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + }, + "ReplicationStatus": { + "target": "com.amazonaws.s3#ReplicationStatus", + "traits": { + "smithy.api#documentation": "

Amazon S3 can return this if your request involves a bucket that is either a source or\n destination in a replication rule.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-replication-status" + } + }, + "PartsCount": { + "target": "com.amazonaws.s3#PartsCount", + "traits": { + "smithy.api#documentation": "

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

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

The number of tags, if any, on the object, when you have the relevant permission to read\n object tags.

\n

You can use GetObjectTagging to retrieve\n the tag set associated with an object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-tagging-count" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

The Object Lock mode that's currently in place for this object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when this object's Object Lock will expire.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Indicates whether this object has an active legal hold. This field is only returned if\n you have permission to view an object's legal hold status.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-legal-hold" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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 in this\n header; otherwise, return a 412 Precondition Failed error.

\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

For more information about conditional requests, see RFC 7232.

", + "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 error.

\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 status code.

\n

For more information about conditional requests, see RFC 7232.

", + "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 in\n this header; otherwise, return a 304 Not Modified error.

\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 HTTP status\n code.

\n

For more information about conditional requests, see RFC 7232.

", + "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 error.

\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

For more information about conditional requests, see RFC 7232.

", + "smithy.api#httpHeader": "If-Unmodified-Since" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Key of the object to get.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "Range": { + "target": "com.amazonaws.s3#Range", + "traits": { + "smithy.api#documentation": "

Downloads the specified byte range of an object. For more information about the HTTP\n Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

\n \n

Amazon S3 doesn't support retrieving multiple ranges of data per GET\n request.

\n
", + "smithy.api#httpHeader": "Range" + } + }, + "ResponseCacheControl": { + "target": "com.amazonaws.s3#ResponseCacheControl", + "traits": { + "smithy.api#documentation": "

Sets the Cache-Control header of the response.

", + "smithy.api#httpQuery": "response-cache-control" + } + }, + "ResponseContentDisposition": { + "target": "com.amazonaws.s3#ResponseContentDisposition", + "traits": { + "smithy.api#documentation": "

Sets the Content-Disposition header of the response.

", + "smithy.api#httpQuery": "response-content-disposition" + } + }, + "ResponseContentEncoding": { + "target": "com.amazonaws.s3#ResponseContentEncoding", + "traits": { + "smithy.api#documentation": "

Sets the Content-Encoding header of the response.

", + "smithy.api#httpQuery": "response-content-encoding" + } + }, + "ResponseContentLanguage": { + "target": "com.amazonaws.s3#ResponseContentLanguage", + "traits": { + "smithy.api#documentation": "

Sets the Content-Language header of the response.

", + "smithy.api#httpQuery": "response-content-language" + } + }, + "ResponseContentType": { + "target": "com.amazonaws.s3#ResponseContentType", + "traits": { + "smithy.api#documentation": "

Sets the Content-Type header of the response.

", + "smithy.api#httpQuery": "response-content-type" + } + }, + "ResponseExpires": { + "target": "com.amazonaws.s3#ResponseExpires", + "traits": { + "smithy.api#documentation": "

Sets the Expires header of the response.

", + "smithy.api#httpQuery": "response-expires" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

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

\n

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

\n \n
    \n
  • \n

    If you include a versionId in your request header, you must have\n the s3:GetObjectVersion permission to access a specific version of an\n object. The s3:GetObject permission is not required in this\n scenario.

    \n
  • \n
  • \n

    If you request the current version of an object without a specific\n versionId in the request header, only the\n s3:GetObject permission is required. The\n s3:GetObjectVersion permission is not required in this\n scenario.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

    \n
  • \n
\n
\n

For more information about versioning, see PutBucketVersioning.

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

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

\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

    \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

This functionality is not supported for directory buckets.

\n
", + "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 that you originally provided for Amazon S3 to\n encrypt the data before storing it. This value is used to decrypt the object when\n recovering it and must match the one used when storing the data. The key must be\n appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm header.

\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

    \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

This functionality is not supported for directory buckets.

\n
", + "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 customer-provided encryption key according to\n RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption\n key was transmitted without 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

    \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

This functionality is not supported for directory buckets.

\n
", + "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" + } + }, + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number of the object being read. This is a positive integer between 1 and 10,000.\n Effectively performs a 'ranged' GET request for the part specified. Useful for downloading\n just a part of an object.

", + "smithy.api#httpQuery": "partNumber" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectResponseStatusCode": { + "type": "integer" + }, + "com.amazonaws.s3#GetObjectRetention": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectRetentionRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectRetentionOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectRetention:

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

The container element for an object's retention settings.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "Retention" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectRetentionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object whose retention settings you want to retrieve.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key name for the object whose retention settings you want to retrieve.

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

The version ID for the object whose retention settings you want to retrieve.

", + "smithy.api#httpQuery": "versionId" + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectTaggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectTaggingOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

\n

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

\n

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

\n

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

\n

The following actions are related to GetObjectTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve tag set of a specific object version", + "documentation": "The following example retrieves tag set of an object. The request specifies object version.", + "input": { + "Bucket": "examplebucket", + "Key": "exampleobject", + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + }, + "output": { + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI", + "TagSet": [ + { + "Value": "Value1", + "Key": "Key1" + } + ] + } + }, + { + "title": "To retrieve tag set of an object", + "documentation": "The following example retrieves tag set of an object.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "VersionId": "null", + "TagSet": [ + { + "Value": "Value4", + "Key": "Key4" + }, + { + "Value": "Value3", + "Key": "Key3" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?tagging", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectTaggingOutput": { + "type": "structure", + "members": { + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object for which you got the tagging information.

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

Contains the tag set.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "Tagging" + } + }, + "com.amazonaws.s3#GetObjectTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

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

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

Object key for which to get the tagging information.

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

The versionId of the object for which to get the tagging information.

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

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectTorrent": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectTorrentRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectTorrentOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're\n distributing large files.

\n \n

You can get torrent only for objects that are less than 5 GB in size, and that are\n not encrypted using server-side encryption with a customer-provided encryption\n key.

\n
\n

To use GET, you must have READ access to the object.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectTorrent:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve torrent files for an object", + "documentation": "The following example retrieves torrent files of an object.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?torrent", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectTorrentOutput": { + "type": "structure", + "members": { + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

A Bencoded dictionary as defined by the BitTorrent specification

", + "smithy.api#httpPayload": {} + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectTorrentRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the object for which to get the torrent files.

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

The object key for which to get the information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetPublicAccessBlock": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetPublicAccessBlockRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetPublicAccessBlockOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use\n this operation, you must have the s3:GetBucketPublicAccessBlock permission.\n For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\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 settings are different between the bucket and the\n account, Amazon S3 uses the most restrictive combination of the bucket-level and\n account-level settings.

\n
\n

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".

\n

The following operations are related to GetPublicAccessBlock:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?publicAccessBlock", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetPublicAccessBlockOutput": { + "type": "structure", + "members": { + "PublicAccessBlockConfiguration": { + "target": "com.amazonaws.s3#PublicAccessBlockConfiguration", + "traits": { + "smithy.api#documentation": "

The PublicAccessBlock configuration currently in effect for this Amazon S3\n bucket.

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

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want\n to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GlacierJobParameters": { + "type": "structure", + "members": { + "Tier": { + "target": "com.amazonaws.s3#Tier", + "traits": { + "smithy.api#documentation": "

Retrieval tier at which the restore will be processed.

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

Container for S3 Glacier job parameters.

" + } + }, + "com.amazonaws.s3#Grant": { + "type": "structure", + "members": { + "Grantee": { + "target": "com.amazonaws.s3#Grantee", + "traits": { + "smithy.api#documentation": "

The person being granted permissions.

", + "smithy.api#xmlNamespace": { + "uri": "http://www.w3.org/2001/XMLSchema-instance", + "prefix": "xsi" + } + } + }, + "Permission": { + "target": "com.amazonaws.s3#Permission", + "traits": { + "smithy.api#documentation": "

Specifies the permission given to the grantee.

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

Container for grant information.

" + } + }, + "com.amazonaws.s3#GrantFullControl": { + "type": "string" + }, + "com.amazonaws.s3#GrantRead": { + "type": "string" + }, + "com.amazonaws.s3#GrantReadACP": { + "type": "string" + }, + "com.amazonaws.s3#GrantWrite": { + "type": "string" + }, + "com.amazonaws.s3#GrantWriteACP": { + "type": "string" + }, + "com.amazonaws.s3#Grantee": { + "type": "structure", + "members": { + "DisplayName": { + "target": "com.amazonaws.s3#DisplayName", + "traits": { + "smithy.api#documentation": "

Screen name of the grantee.

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

Email address of the grantee.

\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\u00e3o 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
" + } + }, + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

The canonical user ID of the grantee.

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

URI of the grantee group.

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

Type of grantee

", + "smithy.api#required": {}, + "smithy.api#xmlAttribute": {}, + "smithy.api#xmlName": "xsi:type" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the person being granted permissions.

" + } + }, + "com.amazonaws.s3#Grants": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Grant", + "traits": { + "smithy.api#xmlName": "Grant" + } + } + }, + "com.amazonaws.s3#HeadBucket": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#HeadBucketRequest" + }, + "output": { + "target": "com.amazonaws.s3#HeadBucketOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NotFound" + } + ], + "traits": { + "smithy.api#documentation": "

You can use this operation to determine if a bucket exists and if you have permission to\n access it. The action returns a 200 OK if the bucket exists and you have\n permission to access it.

\n \n

If the bucket does not exist or you do not have permission to access it, the\n HEAD request returns a generic 400 Bad Request, 403\n Forbidden or 404 Not Found code. A message body is not included,\n so you cannot determine the exception beyond these HTTP response codes.

\n
\n
\n
Authentication and authorization
\n
\n

\n General purpose buckets - Request to public\n buckets that grant the s3:ListBucket permission publicly do not need to be signed.\n All other HeadBucket requests must be authenticated and signed by\n using IAM credentials (access key ID and secret access key for the IAM\n identities). All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use IAM\n credentials to authenticate and authorize your access to the\n HeadBucket API operation, instead of using the temporary security\n credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

\n \n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n \n

You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
", + "smithy.api#examples": [ + { + "title": "To determine if bucket exists", + "documentation": "This operation checks to see if a bucket exists.", + "input": { + "Bucket": "acl1" + } + } + ], + "smithy.api#http": { + "method": "HEAD", + "uri": "/{Bucket}", + "code": 200 + }, + "smithy.waiters#waitable": { + "BucketExists": { + "acceptors": [ + { + "state": "success", + "matcher": { + "success": true + } + }, + { + "state": "retry", + "matcher": { + "errorType": "NotFound" + } + } + ], + "minDelay": 5 + }, + "BucketNotExists": { + "acceptors": [ + { + "state": "success", + "matcher": { + "errorType": "NotFound" + } + } + ], + "minDelay": 5 + } + } + } + }, + "com.amazonaws.s3#HeadBucketOutput": { + "type": "structure", + "members": { + "BucketLocationType": { + "target": "com.amazonaws.s3#LocationType", + "traits": { + "smithy.api#documentation": "

The type of location where the bucket is created.

\n \n

This functionality is only supported by directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-bucket-location-type" + } + }, + "BucketLocationName": { + "target": "com.amazonaws.s3#BucketLocationName", + "traits": { + "smithy.api#documentation": "

The name of the location where the bucket will be created.

\n

For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

\n \n

This functionality is only supported by directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-bucket-location-name" + } + }, + "BucketRegion": { + "target": "com.amazonaws.s3#Region", + "traits": { + "smithy.api#documentation": "

The Region that the bucket is located.

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

Indicates whether the bucket name used in the request is an access point alias.

\n \n

For directory buckets, the value of this field is false.

\n
", + "smithy.api#httpHeader": "x-amz-access-point-alias" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#HeadBucketRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#HeadObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#HeadObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#HeadObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NotFound" + } + ], + "traits": { + "smithy.api#documentation": "

The HEAD operation retrieves metadata from an object without returning the\n object itself. This operation is useful if you're interested only in an object's\n metadata.

\n \n

A HEAD request has the same options as a GET operation on\n an object. The response is identical to the GET response except that there\n is no response body. Because of this, if the HEAD request generates an\n error, it returns a generic code, such as 400 Bad Request, 403\n Forbidden, 404 Not Found, 405 Method Not Allowed,\n 412 Precondition Failed, or 304 Not Modified. It's not\n possible to retrieve the exact exception of these error codes.

\n
\n

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

\n
\n
Permissions
\n
\n

\n
    \n
  • \n

    \n General purpose bucket permissions - To\n use HEAD, you must have the s3:GetObject\n permission. You need the relevant read object (or version) permission for\n this operation. For more information, see Actions, resources, and\n condition keys for Amazon S3 in the Amazon S3 User\n Guide. For more information about the permissions to S3 API\n operations by S3 resource types, see Required permissions for Amazon S3 API operations in the\n Amazon S3 User Guide.

    \n

    If the object you request doesn't exist, the error that Amazon S3 returns\n depends on whether you also have the s3:ListBucket\n permission.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

      If you don\u2019t have the s3:ListBucket permission, Amazon S3\n returns an HTTP status code 403 Forbidden error.

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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If you enable x-amz-checksum-mode in the request and the\n object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must\n also have the kms:GenerateDataKey and kms:Decrypt\n permissions in IAM identity-based policies and KMS key policies for the\n KMS key to retrieve the checksum of the object.

    \n
  • \n
\n
\n
Encryption
\n
\n \n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for HEAD requests if your object uses\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side\n encryption with Amazon S3 managed encryption keys (SSE-S3). The\n x-amz-server-side-encryption header is used when you\n PUT an object to S3 and want to specify the encryption method.\n If you include this header in a HEAD request for an object that\n uses these types of keys, you\u2019ll get an HTTP 400 Bad Request\n error. It's because the encryption method can't be changed when you retrieve\n the object.

\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\n the metadata from the object, you must use the following headers to provide the\n encryption key for the server to be able to retrieve the object's metadata. The\n headers are:

\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\n Encryption (Using Customer-Provided Encryption Keys) in the\n Amazon S3 User Guide.

\n \n

\n Directory bucket -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

\n
\n
\n
Versioning
\n
\n
    \n
  • \n

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

    \n
  • \n
  • \n

    If the specified version is a delete marker, the response returns a\n 405 Method Not Allowed error and the Last-Modified:\n timestamp response header.

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

    \n Directory buckets -\n Delete marker is not supported for directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null\n to the versionId query parameter in the request.

    \n
  • \n
\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n \n

For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
\n

The following actions are related to HeadObject:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve metadata of an object without returning the object itself", + "documentation": "The following example retrieves an object metadata.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "AcceptRanges": "bytes", + "ContentType": "image/jpeg", + "LastModified": "2016-12-15T01:19:41.000Z", + "ContentLength": 3191, + "VersionId": "null", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "Metadata": {} + } + } + ], + "smithy.api#http": { + "method": "HEAD", + "uri": "/{Bucket}/{Key+}", + "code": 200 + }, + "smithy.waiters#waitable": { + "ObjectExists": { + "acceptors": [ + { + "state": "success", + "matcher": { + "success": true + } + }, + { + "state": "retry", + "matcher": { + "errorType": "NotFound" + } + } + ], + "minDelay": 5 + }, + "ObjectNotExists": { + "acceptors": [ + { + "state": "success", + "matcher": { + "errorType": "NotFound" + } + } + ], + "minDelay": 5 + } + } + } + }, + "com.amazonaws.s3#HeadObjectOutput": { + "type": "structure", + "members": { + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

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

\n \n

This functionality is not supported for directory buckets.

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

Indicates that a range of bytes was specified.

", + "smithy.api#httpHeader": "accept-ranges" + } + }, + "Expiration": { + "target": "com.amazonaws.s3#Expiration", + "traits": { + "smithy.api#documentation": "

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

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

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

If the object is an archived object (an object whose storage class is GLACIER), the\n response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

\n

If an archive copy is already restored, the header value indicates when Amazon S3 is\n scheduled to delete the object copy. For example:

\n

\n x-amz-restore: ongoing-request=\"false\", expiry-date=\"Fri, 21 Dec 2012 00:00:00\n GMT\"\n

\n

If the object restoration is in progress, the header returns the value\n ongoing-request=\"true\".

\n

For more information about archiving objects, see Transitioning Objects: General Considerations.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", + "smithy.api#httpHeader": "x-amz-restore" + } + }, + "ArchiveStatus": { + "target": "com.amazonaws.s3#ArchiveStatus", + "traits": { + "smithy.api#documentation": "

The archive state of the head object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-archive-status" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Date and time when the object was last modified.

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

Size of the body in bytes.

", + "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in\n CreateMultipartUpload request. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "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" + } + }, + "MissingMeta": { + "target": "com.amazonaws.s3#MissingMeta", + "traits": { + "smithy.api#documentation": "

This is set to the number of metadata entries not returned in x-amz-meta\n headers. This can happen if you create metadata using an API like SOAP that supports more\n flexible metadata than the REST API. For example, using SOAP, you can create metadata whose\n values are not legal HTTP headers.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-missing-meta" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Indicates what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "ContentRange": { + "target": "com.amazonaws.s3#ContentRange", + "traits": { + "smithy.api#documentation": "

The portion of the object returned in the response for a GET request.

", + "smithy.api#httpHeader": "Content-Range" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

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

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms, aws:kms:dsse).

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

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

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

If present, indicates the ID of the KMS key that was used for object encryption.

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

Indicates whether the object uses an S3 Bucket Key for server-side encryption with\n Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "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

For more information, see Storage Classes.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + }, + "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

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,\n Amazon S3 will return the x-amz-replication-status header if the object in\n your request is 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\n bucket, Amazon S3 will return the x-amz-replication-status header\n with value REPLICA if the object in your request is a replica that Amazon S3 created and\n there is no replica modification replication in progress.

    \n
  • \n
  • \n

    \n When replicating objects to multiple destination\n buckets, the x-amz-replication-status header acts\n differently. The header of the source object will only return a value of COMPLETED\n when replication is successful to all destinations. The header will remain at value\n PENDING until replication has completed for all destinations. If one or more\n destinations fails replication the header will return FAILED.

    \n
  • \n
\n

For more information, see Replication.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-replication-status" + } + }, + "PartsCount": { + "target": "com.amazonaws.s3#PartsCount", + "traits": { + "smithy.api#documentation": "

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

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

The Object Lock mode, if any, that's in effect for this object. This header is only\n returned if the requester has the s3:GetObjectRetention permission. For more\n information about S3 Object Lock, see Object Lock.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when the Object Lock retention period expires. This header is only\n returned if the requester has the s3:GetObjectRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether a legal hold is in effect for this object. This header is only\n returned if the requester has the s3:GetObjectLegalHold permission. This\n header is not returned if the specified version of this object has never had a legal hold\n applied. For more information about S3 Object Lock, see Object Lock.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-legal-hold" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#HeadObjectRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket that contains the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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) error.

\n

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

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
\n

Then Amazon S3 returns 200 OK and the data requested.

\n

For more information about conditional requests, see RFC 7232.

", + "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) error.

\n

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

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
\n

Then Amazon S3 returns the 304 Not Modified response code.

\n

For more information about conditional requests, see RFC 7232.

", + "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) error.

\n

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

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
\n

Then Amazon S3 returns the 304 Not Modified response code.

\n

For more information about conditional requests, see RFC 7232.

", + "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) error.

\n

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

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
\n

Then Amazon S3 returns 200 OK and the data requested.

\n

For more information about conditional requests, see RFC 7232.

", + "smithy.api#httpHeader": "If-Unmodified-Since" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "Range": { + "target": "com.amazonaws.s3#Range", + "traits": { + "smithy.api#documentation": "

HeadObject returns only the metadata for an object. If the Range is satisfiable, only\n the ContentLength is affected in the response. If the Range is not\n satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

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

Sets the Cache-Control header of the response.

", + "smithy.api#httpQuery": "response-cache-control" + } + }, + "ResponseContentDisposition": { + "target": "com.amazonaws.s3#ResponseContentDisposition", + "traits": { + "smithy.api#documentation": "

Sets the Content-Disposition header of the response.

", + "smithy.api#httpQuery": "response-content-disposition" + } + }, + "ResponseContentEncoding": { + "target": "com.amazonaws.s3#ResponseContentEncoding", + "traits": { + "smithy.api#documentation": "

Sets the Content-Encoding header of the response.

", + "smithy.api#httpQuery": "response-content-encoding" + } + }, + "ResponseContentLanguage": { + "target": "com.amazonaws.s3#ResponseContentLanguage", + "traits": { + "smithy.api#documentation": "

Sets the Content-Language header of the response.

", + "smithy.api#httpQuery": "response-content-language" + } + }, + "ResponseContentType": { + "target": "com.amazonaws.s3#ResponseContentType", + "traits": { + "smithy.api#documentation": "

Sets the Content-Type header of the response.

", + "smithy.api#httpQuery": "response-content-type" + } + }, + "ResponseExpires": { + "target": "com.amazonaws.s3#ResponseExpires", + "traits": { + "smithy.api#documentation": "

Sets the Expires header of the response.

", + "smithy.api#httpQuery": "response-expires" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

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

\n \n

For directory buckets in this API operation, only the null value of the version ID is supported.

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

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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" + } + }, + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number of the object being read. This is a positive integer between 1 and 10,000.\n Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about\n the size of the part and the number of parts in this object.

", + "smithy.api#httpQuery": "partNumber" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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

\n General purpose buckets -\n If you enable checksum mode and the object is uploaded with a\n checksum\n and encrypted with an Key Management Service (KMS) key, you must have permission to use the\n kms:Decrypt action to retrieve the checksum.

\n

\n Directory buckets - If you enable\n ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service\n (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and\n kms:Decrypt permissions in IAM identity-based policies and KMS key\n policies for the KMS key to retrieve the checksum of the object.

", + "smithy.api#httpHeader": "x-amz-checksum-mode" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#HostName": { + "type": "string" + }, + "com.amazonaws.s3#HttpErrorCodeReturnedEquals": { + "type": "string" + }, + "com.amazonaws.s3#HttpRedirectCode": { + "type": "string" + }, + "com.amazonaws.s3#ID": { + "type": "string" + }, + "com.amazonaws.s3#IfMatch": { + "type": "string" + }, + "com.amazonaws.s3#IfMatchInitiatedTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "com.amazonaws.s3#IfMatchLastModifiedTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "com.amazonaws.s3#IfMatchSize": { + "type": "long" + }, + "com.amazonaws.s3#IfModifiedSince": { + "type": "timestamp" + }, + "com.amazonaws.s3#IfNoneMatch": { + "type": "string" + }, + "com.amazonaws.s3#IfUnmodifiedSince": { + "type": "timestamp" + }, + "com.amazonaws.s3#IndexDocument": { + "type": "structure", + "members": { + "Suffix": { + "target": "com.amazonaws.s3#Suffix", + "traits": { + "smithy.api#documentation": "

A suffix that is appended to a request that is for a directory on the website endpoint.\n (For example, if the suffix is index.html and you make a request to\n samplebucket/images/, the data that is returned will be for the object with\n the key name images/index.html.) The suffix must not be empty and must not\n include a slash character.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

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

Container for the Suffix element.

" + } + }, + "com.amazonaws.s3#Initiated": { + "type": "timestamp" + }, + "com.amazonaws.s3#Initiator": { + "type": "structure", + "members": { + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the\n principal is an IAM User, it provides a user ARN value.

\n \n

\n Directory buckets - If the principal is an\n Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it\n provides a user ARN value.

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

Name of the Principal.

\n \n

This functionality is not supported for directory buckets.

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

Container element that identifies who initiated the multipart upload.

" + } + }, + "com.amazonaws.s3#InputSerialization": { + "type": "structure", + "members": { + "CSV": { + "target": "com.amazonaws.s3#CSVInput", + "traits": { + "smithy.api#documentation": "

Describes the serialization of a CSV-encoded object.

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

Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value:\n NONE.

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

Specifies JSON as object's input serialization format.

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

Specifies Parquet as object's input serialization format.

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

Describes the serialization format of the object.

" + } + }, + "com.amazonaws.s3#IntelligentTieringAccessTier": { + "type": "enum", + "members": { + "ARCHIVE_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVE_ACCESS" + } + }, + "DEEP_ARCHIVE_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE_ACCESS" + } + } + } + }, + "com.amazonaws.s3#IntelligentTieringAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the\n configuration applies.

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

All of these tags must exist in the object's tag set in order for the configuration to\n apply.

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

A container for specifying S3 Intelligent-Tiering filters. The filters determine the\n subset of objects to which the rule applies.

" + } + }, + "com.amazonaws.s3#IntelligentTieringConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#IntelligentTieringId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

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

Specifies a bucket filter. The configuration only includes objects that meet the\n filter's criteria.

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

Specifies the status of the configuration.

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

Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

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

Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

\n

For information about the S3 Intelligent-Tiering storage class, see Storage class\n for automatically optimizing frequently and infrequently accessed\n objects.

" + } + }, + "com.amazonaws.s3#IntelligentTieringConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#IntelligentTieringConfiguration" + } + }, + "com.amazonaws.s3#IntelligentTieringDays": { + "type": "integer" + }, + "com.amazonaws.s3#IntelligentTieringFilter": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "Tag": { + "target": "com.amazonaws.s3#Tag" + }, + "And": { + "target": "com.amazonaws.s3#IntelligentTieringAndOperator", + "traits": { + "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

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

The Filter is used to identify objects that the S3 Intelligent-Tiering\n configuration applies to.

" + } + }, + "com.amazonaws.s3#IntelligentTieringId": { + "type": "string" + }, + "com.amazonaws.s3#IntelligentTieringStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#InvalidObjectState": { + "type": "structure", + "members": { + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass" + }, + "AccessTier": { + "target": "com.amazonaws.s3#IntelligentTieringAccessTier" + } + }, + "traits": { + "smithy.api#documentation": "

Object is archived and inaccessible until restored.

\n

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

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.s3#InvalidRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

\n
    \n
  • \n

    Cannot specify both a write offset value and user-defined object metadata for existing objects.

    \n
  • \n
  • \n

    Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

    \n
  • \n
  • \n

    Request body cannot be empty when 'write offset' is specified.

    \n
  • \n
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.s3#InvalidWriteOffset": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

\n The write offset value that you specified does not match the current object size.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.s3#InventoryConfiguration": { + "type": "structure", + "members": { + "Destination": { + "target": "com.amazonaws.s3#InventoryDestination", + "traits": { + "smithy.api#documentation": "

Contains information about where to publish the inventory results.

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

Specifies whether the inventory is enabled or disabled. If set to True, an\n inventory list is generated. If set to False, no inventory list is\n generated.

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

Specifies an inventory filter. The inventory only includes objects that meet the\n filter's criteria.

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

The ID used to identify the inventory configuration.

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

Object versions to include in the inventory list. If set to All, the list\n includes all the object versions, which adds the version-related fields\n VersionId, IsLatest, and DeleteMarker to the\n list. If set to Current, the list does not contain these version-related\n fields.

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

Contains the optional fields that are included in the inventory results.

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

Specifies the schedule for generating inventory results.

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

Specifies the inventory configuration for an Amazon S3 bucket. For more information, see\n GET Bucket inventory in the Amazon S3 API Reference.

" + } + }, + "com.amazonaws.s3#InventoryConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#InventoryConfiguration" + } + }, + "com.amazonaws.s3#InventoryDestination": { + "type": "structure", + "members": { + "S3BucketDestination": { + "target": "com.amazonaws.s3#InventoryS3BucketDestination", + "traits": { + "smithy.api#documentation": "

Contains the bucket name, file format, bucket owner (optional), and prefix (optional)\n where inventory results are published.

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

Specifies the inventory configuration for an Amazon S3 bucket.

" + } + }, + "com.amazonaws.s3#InventoryEncryption": { + "type": "structure", + "members": { + "SSES3": { + "target": "com.amazonaws.s3#SSES3", + "traits": { + "smithy.api#documentation": "

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

", + "smithy.api#xmlName": "SSE-S3" + } + }, + "SSEKMS": { + "target": "com.amazonaws.s3#SSEKMS", + "traits": { + "smithy.api#documentation": "

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

", + "smithy.api#xmlName": "SSE-KMS" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the type of server-side encryption used to encrypt the inventory\n results.

" + } + }, + "com.amazonaws.s3#InventoryFilter": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix that an object must have to be included in the inventory results.

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

Specifies an inventory filter. The inventory only includes objects that meet the\n filter's criteria.

" + } + }, + "com.amazonaws.s3#InventoryFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" + } + }, + "ORC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ORC" + } + }, + "Parquet": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Parquet" + } + } + } + }, + "com.amazonaws.s3#InventoryFrequency": { + "type": "enum", + "members": { + "Daily": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Daily" + } + }, + "Weekly": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Weekly" + } + } + } + }, + "com.amazonaws.s3#InventoryId": { + "type": "string" + }, + "com.amazonaws.s3#InventoryIncludedObjectVersions": { + "type": "enum", + "members": { + "All": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "All" + } + }, + "Current": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Current" + } + } + } + }, + "com.amazonaws.s3#InventoryOptionalField": { + "type": "enum", + "members": { + "Size": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Size" + } + }, + "LastModifiedDate": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LastModifiedDate" + } + }, + "StorageClass": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "StorageClass" + } + }, + "ETag": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ETag" + } + }, + "IsMultipartUploaded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IsMultipartUploaded" + } + }, + "ReplicationStatus": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReplicationStatus" + } + }, + "EncryptionStatus": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EncryptionStatus" + } + }, + "ObjectLockRetainUntilDate": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectLockRetainUntilDate" + } + }, + "ObjectLockMode": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectLockMode" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectLockLegalHoldStatus" + } + }, + "IntelligentTieringAccessTier": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IntelligentTieringAccessTier" + } + }, + "BucketKeyStatus": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BucketKeyStatus" + } + }, + "ChecksumAlgorithm": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ChecksumAlgorithm" + } + }, + "ObjectAccessControlList": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectAccessControlList" + } + }, + "ObjectOwner": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectOwner" + } + } + } + }, + "com.amazonaws.s3#InventoryOptionalFields": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#InventoryOptionalField", + "traits": { + "smithy.api#xmlName": "Field" + } + } + }, + "com.amazonaws.s3#InventoryS3BucketDestination": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID that owns the destination S3 bucket. If no account ID is provided, the\n owner is not validated before exporting data.

\n \n

Although this value is optional, we strongly recommend that you set it to help\n prevent problems if the destination bucket ownership changes.

\n
" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket where inventory results will be\n published.

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

Specifies the output format of the inventory results.

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

The prefix that is prepended to all inventory results.

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

Contains the type of server-side encryption used to encrypt the inventory\n results.

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

Contains the bucket name, file format, bucket owner (optional), and prefix (optional)\n where inventory results are published.

" + } + }, + "com.amazonaws.s3#InventorySchedule": { + "type": "structure", + "members": { + "Frequency": { + "target": "com.amazonaws.s3#InventoryFrequency", + "traits": { + "smithy.api#documentation": "

Specifies how frequently inventory results are produced.

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

Specifies the schedule for generating inventory results.

" + } + }, + "com.amazonaws.s3#IsEnabled": { + "type": "boolean" + }, + "com.amazonaws.s3#IsLatest": { + "type": "boolean" + }, + "com.amazonaws.s3#IsPublic": { + "type": "boolean" + }, + "com.amazonaws.s3#IsRestoreInProgress": { + "type": "boolean" + }, + "com.amazonaws.s3#IsTruncated": { + "type": "boolean" + }, + "com.amazonaws.s3#JSONInput": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.s3#JSONType", + "traits": { + "smithy.api#documentation": "

The type of JSON. Valid values: Document, Lines.

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

Specifies JSON as object's input serialization format.

" + } + }, + "com.amazonaws.s3#JSONOutput": { + "type": "structure", + "members": { + "RecordDelimiter": { + "target": "com.amazonaws.s3#RecordDelimiter", + "traits": { + "smithy.api#documentation": "

The value used to separate individual records in the output. If no value is specified,\n Amazon S3 uses a newline character ('\\n').

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

Specifies JSON as request's output serialization format.

" + } + }, + "com.amazonaws.s3#JSONType": { + "type": "enum", + "members": { + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOCUMENT" + } + }, + "LINES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINES" + } + } + } + }, + "com.amazonaws.s3#KMSContext": { + "type": "string" + }, + "com.amazonaws.s3#KeyCount": { + "type": "integer" + }, + "com.amazonaws.s3#KeyMarker": { + "type": "string" + }, + "com.amazonaws.s3#KeyPrefixEquals": { + "type": "string" + }, + "com.amazonaws.s3#LambdaFunctionArn": { + "type": "string" + }, + "com.amazonaws.s3#LambdaFunctionConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#NotificationId" + }, + "LambdaFunctionArn": { + "target": "com.amazonaws.s3#LambdaFunctionArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the\n specified event type occurs.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "CloudFunction" + } + }, + "Events": { + "target": "com.amazonaws.s3#EventList", + "traits": { + "smithy.api#documentation": "

The Amazon S3 bucket event for which to invoke the Lambda function. For more information,\n see Supported\n Event Types in the Amazon S3 User Guide.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Event" + } + }, + "Filter": { + "target": "com.amazonaws.s3#NotificationConfigurationFilter" + } + }, + "traits": { + "smithy.api#documentation": "

A container for specifying the configuration for Lambda notifications.

" + } + }, + "com.amazonaws.s3#LambdaFunctionConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#LambdaFunctionConfiguration" + } + }, + "com.amazonaws.s3#LastModified": { + "type": "timestamp" + }, + "com.amazonaws.s3#LastModifiedTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "com.amazonaws.s3#LifecycleExpiration": { + "type": "structure", + "members": { + "Date": { + "target": "com.amazonaws.s3#Date", + "traits": { + "smithy.api#documentation": "

Indicates at what date the object is to be moved or deleted. The date value must conform\n to the ISO 8601 format. The time is always midnight UTC.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

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

Indicates the lifetime, in days, of the objects that are subject to the rule. The value\n must be a non-zero positive integer.

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

Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set\n to true, the delete marker will be expired; if set to false the policy takes no action.\n This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

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

Container for the expiration for the lifecycle of the object.

\n

For more information see, Managing your storage\n lifecycle in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#LifecycleRule": { + "type": "structure", + "members": { + "Expiration": { + "target": "com.amazonaws.s3#LifecycleExpiration", + "traits": { + "smithy.api#documentation": "

Specifies the expiration for the lifecycle of the object in the form of date, days and,\n whether the object has a delete marker.

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

Unique identifier for the rule. The value cannot be longer than 255 characters.

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

Prefix identifying one or more objects to which the rule applies. This is\n no longer used; use Filter instead.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "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\n LifecycleRule does not contain a Prefix element.

\n \n

\n Tag filters are not supported for directory buckets.

\n
" + } + }, + "Status": { + "target": "com.amazonaws.s3#ExpirationStatus", + "traits": { + "smithy.api#documentation": "

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not\n currently being applied.

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

Specifies when an Amazon S3 object transitions to a specified storage class.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Transition" + } + }, + "NoncurrentVersionTransitions": { + "target": "com.amazonaws.s3#NoncurrentVersionTransitionList", + "traits": { + "smithy.api#documentation": "

Specifies the transition rule for the lifecycle rule that describes when noncurrent\n objects transition to a specific storage class. If your bucket is versioning-enabled (or\n versioning is suspended), you can set this action to request that Amazon S3 transition\n noncurrent object versions to a specific storage class at a set period in the object's\n lifetime.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "NoncurrentVersionTransition" + } + }, + "NoncurrentVersionExpiration": { + "target": "com.amazonaws.s3#NoncurrentVersionExpiration" + }, + "AbortIncompleteMultipartUpload": { + "target": "com.amazonaws.s3#AbortIncompleteMultipartUpload" + } + }, + "traits": { + "smithy.api#documentation": "

A lifecycle rule for individual objects in an Amazon S3 bucket.

\n

For more information see, Managing your storage\n lifecycle in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#LifecycleRuleAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Prefix identifying one or more objects to which the rule applies.

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

All of these tags must exist in the object's tag set in order for the rule to\n apply.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + }, + "ObjectSizeGreaterThan": { + "target": "com.amazonaws.s3#ObjectSizeGreaterThanBytes", + "traits": { + "smithy.api#documentation": "

Minimum object size to which the rule applies.

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

Maximum object size to which the rule applies.

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

This is used in a Lifecycle Rule Filter to apply a logical AND to two or more\n predicates. The Lifecycle Rule will apply to any object matching all of the predicates\n configured inside the And operator.

" + } + }, + "com.amazonaws.s3#LifecycleRuleFilter": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Prefix identifying one or more objects to which the rule applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

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

This tag must exist in the object's tag set in order for the rule to apply.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + }, + "ObjectSizeGreaterThan": { + "target": "com.amazonaws.s3#ObjectSizeGreaterThanBytes", + "traits": { + "smithy.api#documentation": "

Minimum object size to which the rule applies.

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

Maximum object size to which the rule applies.

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

The Filter is used to identify objects that a Lifecycle Rule applies to. A\n Filter can have exactly one of Prefix, Tag,\n ObjectSizeGreaterThan, ObjectSizeLessThan, or And\n specified. If the Filter element is left empty, the Lifecycle Rule applies to\n all objects in the bucket.

" + } + }, + "com.amazonaws.s3#LifecycleRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#LifecycleRule" + } + }, + "com.amazonaws.s3#ListBucketAnalyticsConfigurations": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurationsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurationsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the analytics configurations for the bucket. You can have up to 1,000 analytics\n configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. You should always check the IsTruncated element in the response. If\n there are no more configurations to list, IsTruncated is set to false. If\n there are more configurations to list, IsTruncated is set to true, and there\n will be a value in NextContinuationToken. You use the\n NextContinuationToken value to continue the pagination of the list by\n passing the value in continuation-token in the request to GET the next\n page.

\n

To use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration 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

For information about Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis.

\n

The following operations are related to\n ListBucketAnalyticsConfigurations:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#ListBucketAnalyticsConfigurationsOutput": { + "type": "structure", + "members": { + "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.

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

The marker that is used as a starting point for this analytics configuration list\n response. This value is present if it was sent in the request.

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

\n NextContinuationToken is sent when isTruncated is true, which\n indicates that there are more analytics configurations to list. The next request must\n include this NextContinuationToken. The token is obfuscated and is not a\n usable value.

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

The list of analytics configurations for a bucket.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AnalyticsConfiguration" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListBucketAnalyticsConfigurationResult" + } + }, + "com.amazonaws.s3#ListBucketAnalyticsConfigurationsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket from which analytics configurations are retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request\n should begin.

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListBucketIntelligentTieringConfigurations": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to ListBucketIntelligentTieringConfigurations include:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsOutput": { + "type": "structure", + "members": { + "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\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\n should begin.

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

The marker used to continue this inventory configuration listing. Use the\n NextContinuationToken from this response to continue the listing in a\n subsequent request. The continuation token is an opaque value that Amazon S3 understands.

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

The list of S3 Intelligent-Tiering configurations for a bucket.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "IntelligentTieringConfiguration" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request\n should begin.

", + "smithy.api#httpQuery": "continuation-token" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListBucketInventoryConfigurations": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketInventoryConfigurationsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketInventoryConfigurationsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns a list of inventory configurations for the bucket. You can have up to 1,000\n analytics configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated element in the response. If there are no\n more configurations to list, IsTruncated is set to false. If there are more\n configurations to list, IsTruncated is set to true, and there is a value in\n NextContinuationToken. You use the NextContinuationToken value\n to continue the pagination of the list by passing the value in continuation-token in the\n request to GET the next page.

\n

To use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration 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

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory\n

\n

The following operations are related to\n ListBucketInventoryConfigurations:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#ListBucketInventoryConfigurationsOutput": { + "type": "structure", + "members": { + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

If sent in the request, the marker that is used as a starting point for this inventory\n configuration list response.

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

The list of inventory configurations for a bucket.

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

Tells whether the returned list of inventory configurations is complete. A value of true\n indicates that the list is not complete and the NextContinuationToken is provided for a\n subsequent request.

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

The marker used to continue this inventory configuration listing. Use the\n NextContinuationToken from this response to continue the listing in a\n subsequent request. The continuation token is an opaque value that Amazon S3 understands.

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

The name of the bucket containing the inventory configurations to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The marker used to continue an inventory configuration listing that has been truncated.\n Use the NextContinuationToken from a previously truncated list response to\n continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListBucketMetricsConfigurations": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketMetricsConfigurationsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketMetricsConfigurationsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the metrics configurations for the bucket. The metrics configurations are only for\n the request metrics of the bucket and do not provide information on daily storage metrics.\n You can have up to 1,000 configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated element in the response. If there are no\n more configurations to list, IsTruncated is set to false. If there are more\n configurations to list, IsTruncated is set to true, and there is a value in\n NextContinuationToken. You use the NextContinuationToken value\n to continue the pagination of the list by passing the value in\n continuation-token in the request to GET the next page.

\n

To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For more information about metrics configurations and CloudWatch request metrics, see\n Monitoring Metrics with Amazon CloudWatch.

\n

The following operations are related to\n ListBucketMetricsConfigurations:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", + "code": 200 + } + } + }, + "com.amazonaws.s3#ListBucketMetricsConfigurationsOutput": { + "type": "structure", + "members": { + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

Indicates whether the returned list of metrics 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.

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

The marker that is used as a starting point for this metrics configuration list\n response. This value is present if it was sent in the request.

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

The marker used to continue a metrics configuration listing that has been truncated. Use\n the NextContinuationToken from a previously truncated list response to\n continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

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

The list of metrics configurations for a bucket.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MetricsConfiguration" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListMetricsConfigurationsResult" + } + }, + "com.amazonaws.s3#ListBucketMetricsConfigurationsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the metrics configurations to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The marker that is used to continue a metrics configuration listing that has been\n truncated. Use the NextContinuationToken from a previously truncated list\n response to continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListBuckets": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns a list of all buckets owned by the authenticated sender of the request. To grant IAM permission to use\n this operation, you must add the s3:ListAllMyBuckets policy action.

\n

For information about Amazon S3 buckets, see Creating, configuring, and\n working with Amazon S3 buckets.

\n \n

We strongly recommend using only paginated ListBuckets requests. Unpaginated ListBuckets requests are only supported for \n Amazon Web Services accounts set to the default general purpose bucket quota of 10,000. If you have an approved \n general purpose bucket quota above 10,000, you must send paginated ListBuckets requests to list your account\u2019s buckets. \n All unpaginated ListBuckets requests will be rejected for Amazon Web Services accounts with a general purpose bucket quota \n greater than 10,000.

\n
", + "smithy.api#examples": [ + { + "title": "To list all buckets", + "documentation": "The following example returns all the buckets owned by the sender of this request.", + "output": { + "Owner": { + "DisplayName": "own-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31" + }, + "Buckets": [ + { + "CreationDate": "2012-02-15T21:03:02.000Z", + "Name": "examplebucket" + }, + { + "CreationDate": "2011-07-24T19:33:50.000Z", + "Name": "examplebucket2" + }, + { + "CreationDate": "2010-12-17T00:56:49.000Z", + "Name": "examplebucket3" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/?x-id=ListBuckets", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "ContinuationToken", + "outputToken": "ContinuationToken", + "items": "Buckets", + "pageSize": "MaxBuckets" + } + } + }, + "com.amazonaws.s3#ListBucketsOutput": { + "type": "structure", + "members": { + "Buckets": { + "target": "com.amazonaws.s3#Buckets", + "traits": { + "smithy.api#documentation": "

The list of buckets owned by the requester.

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

The owner of the buckets listed.

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

\n ContinuationToken is included in the response when there are more buckets\n that can be listed with pagination. The next ListBuckets request to Amazon S3 can\n be continued with this ContinuationToken. ContinuationToken is\n obfuscated and is not a real bucket.

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

If Prefix was sent with the request, it is included in the response.

\n

All bucket names in the response begin with the specified bucket name prefix.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListAllMyBucketsResult" + } + }, + "com.amazonaws.s3#ListBucketsRequest": { + "type": "structure", + "members": { + "MaxBuckets": { + "target": "com.amazonaws.s3#MaxBuckets", + "traits": { + "smithy.api#documentation": "

Maximum number of buckets to be returned in response. When the number is more than the\n count of buckets that are owned by an Amazon Web Services account, return all the buckets in\n response.

", + "smithy.api#httpQuery": "max-buckets" + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken is obfuscated and is not a real\n key. You can use this ContinuationToken for pagination of the list results.

\n

Length Constraints: Minimum length of 0. Maximum length of 1024.

\n

Required: No.

\n \n

If you specify the bucket-region, prefix, or continuation-token \n query parameters without using max-buckets to set the maximum number of buckets returned in the response, \n Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

\n
", + "smithy.api#httpQuery": "continuation-token" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Limits the response to bucket names that begin with the specified bucket name\n prefix.

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

Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services\n Region must be expressed according to the Amazon Web Services Region code, such as us-west-2\n for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services\n Regions, see Regions and Endpoints.

\n \n

Requests made to a Regional endpoint that is different from the\n bucket-region parameter are not supported. For example, if you want to\n limit the response to your buckets in Region us-west-2, the request must be\n made to an endpoint in Region us-west-2.

\n
", + "smithy.api#httpQuery": "bucket-region" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListDirectoryBuckets": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListDirectoryBucketsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListDirectoryBucketsOutput" + }, + "traits": { + "smithy.api#documentation": "

Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the\n request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

You must have the s3express:ListAllMyDirectoryBuckets permission\n in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n \n

The BucketRegion response element is not part of the\n ListDirectoryBuckets Response Syntax.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/?x-id=ListDirectoryBuckets", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "ContinuationToken", + "outputToken": "ContinuationToken", + "items": "Buckets", + "pageSize": "MaxDirectoryBuckets" + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#ListDirectoryBucketsOutput": { + "type": "structure", + "members": { + "Buckets": { + "target": "com.amazonaws.s3#Buckets", + "traits": { + "smithy.api#documentation": "

The list of buckets owned by the requester.

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

If ContinuationToken was sent with the request, it is included in the\n response. You can use the returned ContinuationToken for pagination of the\n list response.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListAllMyDirectoryBucketsResult" + } + }, + "com.amazonaws.s3#ListDirectoryBucketsRequest": { + "type": "structure", + "members": { + "ContinuationToken": { + "target": "com.amazonaws.s3#DirectoryBucketToken", + "traits": { + "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n buckets in this account with a token. ContinuationToken is obfuscated and is\n not a real bucket name. You can use this ContinuationToken for the pagination\n of the list results.

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "MaxDirectoryBuckets": { + "target": "com.amazonaws.s3#MaxDirectoryBuckets", + "traits": { + "smithy.api#documentation": "

Maximum number of buckets to be returned in response. When the number is more than the\n count of buckets that are owned by an Amazon Web Services account, return all the buckets in\n response.

", + "smithy.api#httpQuery": "max-directory-buckets" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListMultipartUploads": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListMultipartUploadsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListMultipartUploadsOutput" + }, + "traits": { + "smithy.api#documentation": "

This operation lists in-progress multipart uploads in a bucket. An in-progress multipart\n upload is a multipart upload that has been initiated by the\n CreateMultipartUpload request, but has not yet been completed or\n aborted.

\n \n

\n Directory buckets - If multipart uploads in\n a directory bucket are in progress, you can't delete the bucket until all the\n in-progress multipart uploads are aborted or completed. To delete these in-progress\n multipart uploads, use the ListMultipartUploads operation to list the\n in-progress multipart uploads in the bucket and use the\n AbortMultipartUpload operation to abort all the in-progress multipart\n uploads.

\n
\n

The ListMultipartUploads operation returns a maximum of 1,000 multipart\n uploads in the response. The limit of 1,000 multipart uploads is also the default value.\n You can further limit the number of uploads in a response by specifying the\n max-uploads request parameter. If there are more than 1,000 multipart\n uploads that satisfy your ListMultipartUploads request, the response returns\n an IsTruncated element with the value of true, a\n NextKeyMarker element, and a NextUploadIdMarker element. To\n list the remaining multipart uploads, you need to make subsequent\n ListMultipartUploads requests. In these requests, include two query\n parameters: key-marker and upload-id-marker. Set the value of\n key-marker to the NextKeyMarker value from the previous\n response. Similarly, set the value of upload-id-marker to the\n NextUploadIdMarker value from the previous response.

\n \n

\n Directory buckets - The\n upload-id-marker element and the NextUploadIdMarker element\n aren't supported by directory buckets. To list the additional multipart uploads, you\n only need to set the value of key-marker to the NextKeyMarker\n value from the previous response.

\n
\n

For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n 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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Sorting of multipart uploads in response
\n
\n
    \n
  • \n

    \n General purpose bucket - In the\n ListMultipartUploads response, the multipart uploads are\n sorted based on two criteria:

    \n
      \n
    • \n

      Key-based sorting - Multipart uploads are initially sorted\n in ascending order based on their object keys.

      \n
    • \n
    • \n

      Time-based sorting - For uploads that share the same object\n key, they are further sorted in ascending order based on the upload\n initiation time. Among uploads with the same key, the one that was\n initiated first will appear before the ones that were initiated\n later.

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

    \n Directory bucket - In the\n ListMultipartUploads response, the multipart uploads aren't\n sorted lexicographically based on the object keys.\n \n

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to ListMultipartUploads:

\n ", + "smithy.api#examples": [ + { + "title": "List next set of multipart uploads when previous result is truncated", + "documentation": "The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads.", + "input": { + "Bucket": "examplebucket", + "KeyMarker": "nextkeyfrompreviousresponse", + "MaxUploads": 2, + "UploadIdMarker": "valuefrompreviousresponse" + }, + "output": { + "UploadIdMarker": "", + "NextKeyMarker": "someobjectkey", + "Bucket": "acl1", + "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", + "Uploads": [ + { + "Initiator": { + "DisplayName": "ownder-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiated": "2014-05-01T05:40:58.000Z", + "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--", + "StorageClass": "STANDARD", + "Key": "JavaFile", + "Owner": { + "DisplayName": "mohanataws", + "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + } + }, + { + "Initiator": { + "DisplayName": "ownder-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiated": "2014-05-01T05:41:27.000Z", + "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", + "StorageClass": "STANDARD", + "Key": "JavaFile", + "Owner": { + "DisplayName": "ownder-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + } + } + ], + "KeyMarker": "", + "MaxUploads": 2, + "IsTruncated": true + } + }, + { + "title": "To list in-progress multipart uploads on a bucket", + "documentation": "The following example lists in-progress multipart uploads on a specific bucket.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "Uploads": [ + { + "Initiator": { + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiated": "2014-05-01T05:40:58.000Z", + "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--", + "StorageClass": "STANDARD", + "Key": "JavaFile", + "Owner": { + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + } + }, + { + "Initiator": { + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiated": "2014-05-01T05:41:27.000Z", + "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", + "StorageClass": "STANDARD", + "Key": "JavaFile", + "Owner": { + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + } + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?uploads", + "code": 200 + } + } + }, + "com.amazonaws.s3#ListMultipartUploadsOutput": { + "type": "structure", + "members": { + "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\n access point ARN or access point alias if used.

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

The key at or after which the listing began.

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

Together with key-marker, specifies the multipart upload after which listing should\n begin. If key-marker is not specified, the upload-id-marker parameter is ignored.\n Otherwise, any multipart uploads for a key equal to the key-marker might be included in the\n list only if they have an upload ID lexicographically greater than the specified\n upload-id-marker.

\n \n

This functionality is not supported for directory buckets.

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

When a list is truncated, this element specifies the value that should be used for the\n key-marker request parameter in a subsequent request.

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

When a prefix is provided in the request, this field contains the specified prefix. The\n result contains only keys starting with the specified prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

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

Contains the delimiter you specified in the request. If you don't specify a delimiter in\n your request, this element is absent from the response.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

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

When a list is truncated, this element specifies the value that should be used for the\n upload-id-marker request parameter in a subsequent request.

\n \n

This functionality is not supported for directory buckets.

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

Maximum number of multipart uploads that could have been included in the\n response.

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

Indicates whether the returned list of multipart uploads is truncated. A value of true\n indicates that the list was truncated. The list can be truncated if the number of multipart\n uploads exceeds the limit allowed or specified by max uploads.

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

Container for elements related to a particular multipart upload. A response can contain\n zero or more Upload elements.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Upload" + } + }, + "CommonPrefixes": { + "target": "com.amazonaws.s3#CommonPrefixList", + "traits": { + "smithy.api#documentation": "

If you specify a delimiter in the request, then the result returns each distinct key\n prefix containing the delimiter in a CommonPrefixes element. The distinct key\n prefixes are returned in the Prefix child element.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", + "smithy.api#xmlFlattened": {} + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode object keys in the response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n Delimiter, KeyMarker, Prefix,\n NextKeyMarker, Key.

" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListMultipartUploadsResult" + } + }, + "com.amazonaws.s3#ListMultipartUploadsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

Character you use to group keys.

\n

All keys that contain the same string between the prefix, if specified, and the first\n occurrence of the delimiter after the prefix are grouped under a single result element,\n CommonPrefixes. If you don't specify the prefix parameter, then the\n substring starts at the beginning of the key. The keys that are grouped under\n CommonPrefixes result element are not returned elsewhere in the\n response.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

\n
", + "smithy.api#httpQuery": "delimiter" + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#httpQuery": "encoding-type" + } + }, + "KeyMarker": { + "target": "com.amazonaws.s3#KeyMarker", + "traits": { + "smithy.api#documentation": "

Specifies the multipart upload after which listing should begin.

\n \n
    \n
  • \n

    \n General purpose buckets - For\n general purpose buckets, key-marker is an object key. Together with\n upload-id-marker, this parameter specifies the multipart upload\n after which listing should begin.

    \n

    If upload-id-marker is not specified, only the keys\n lexicographically greater than the specified key-marker will be\n included in the list.

    \n

    If upload-id-marker is specified, any multipart uploads for a key\n equal to the key-marker might also be included, provided those\n multipart uploads have upload IDs lexicographically greater than the specified\n upload-id-marker.

    \n
  • \n
  • \n

    \n Directory buckets - For\n directory buckets, key-marker is obfuscated and isn't a real object\n key. The upload-id-marker parameter isn't supported by\n directory buckets. To list the additional multipart uploads, you only need to set\n the value of key-marker to the NextKeyMarker value from\n the previous response.

    \n

    In the ListMultipartUploads response, the multipart uploads aren't\n sorted lexicographically based on the object keys.\n \n

    \n
  • \n
\n
", + "smithy.api#httpQuery": "key-marker" + } + }, + "MaxUploads": { + "target": "com.amazonaws.s3#MaxUploads", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response\n body. 1,000 is the maximum number of uploads that can be returned in a response.

", + "smithy.api#httpQuery": "max-uploads" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Lists in-progress uploads only for those keys that begin with the specified prefix. You\n can use prefixes to separate a bucket into different grouping of keys. (You can think of\n using prefix to make groups in the same way that you'd use a folder in a file\n system.)

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", + "smithy.api#httpQuery": "prefix", + "smithy.rules#contextParam": { + "name": "Prefix" + } + } + }, + "UploadIdMarker": { + "target": "com.amazonaws.s3#UploadIdMarker", + "traits": { + "smithy.api#documentation": "

Together with key-marker, specifies the multipart upload after which listing should\n begin. If key-marker is not specified, the upload-id-marker parameter is ignored.\n Otherwise, any multipart uploads for a key equal to the key-marker might be included in the\n list only if they have an upload ID lexicographically greater than the specified\n upload-id-marker.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpQuery": "upload-id-marker" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListObjectVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListObjectVersionsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListObjectVersionsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns metadata about all versions of the objects in a bucket. You can also use request\n parameters as selection criteria to return metadata about a subset of all the object\n versions.

\n \n

To use this operation, you must have permission to perform the\n s3:ListBucketVersions action. Be aware of the name difference.

\n
\n \n

A 200 OK response can contain valid or invalid XML. Make sure to design\n your application to parse the contents of the response and handle it\n appropriately.

\n
\n

To use this operation, you must have READ access to the bucket.

\n

The following operations are related to ListObjectVersions:

\n ", + "smithy.api#examples": [ + { + "title": "To list object versions", + "documentation": "The following example returns versions of an object with specific key name prefix.", + "input": { + "Bucket": "examplebucket", + "Prefix": "HappyFace.jpg" + }, + "output": { + "Versions": [ + { + "LastModified": "2016-12-15T01:19:41.000Z", + "VersionId": "null", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "StorageClass": "STANDARD", + "Key": "HappyFace.jpg", + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "IsLatest": true, + "Size": 3191 + }, + { + "LastModified": "2016-12-13T00:58:26.000Z", + "VersionId": "PHtexPGjH2y.zBgT8LmB7wwLI2mpbz.k", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "StorageClass": "STANDARD", + "Key": "HappyFace.jpg", + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "IsLatest": false, + "Size": 3191 + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?versions", + "code": 200 + } + } + }, + "com.amazonaws.s3#ListObjectVersionsOutput": { + "type": "structure", + "members": { + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search\n criteria. If your results were truncated, you can make a follow-up paginated request by\n using the NextKeyMarker and NextVersionIdMarker response\n parameters as a starting place in another request to return the rest of the results.

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

Marks the last key returned in a truncated response.

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

Marks the last version of the key returned in a truncated response.

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

When the number of responses exceeds the value of MaxKeys,\n NextKeyMarker specifies the first key not returned that satisfies the\n search criteria. Use this value for the key-marker request parameter in a subsequent\n request.

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

When the number of responses exceeds the value of MaxKeys,\n NextVersionIdMarker specifies the first object version not returned that\n satisfies the search criteria. Use this value for the version-id-marker\n request parameter in a subsequent request.

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

Container for version information.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Version" + } + }, + "DeleteMarkers": { + "target": "com.amazonaws.s3#DeleteMarkers", + "traits": { + "smithy.api#documentation": "

Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "DeleteMarker" + } + }, + "Name": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

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

Selects objects that start with the value supplied by this parameter.

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

The delimiter grouping the included keys. A delimiter is a character that you specify to\n group keys. All keys that contain the same string between the prefix and the first\n occurrence of the delimiter are grouped under a single result element in\n CommonPrefixes. These groups are counted as one result against the\n max-keys limitation. These keys are not returned elsewhere in the\n response.

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

Specifies the maximum number of objects to return.

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

All of the keys rolled up into a common prefix count as a single return when calculating\n the number of returns.

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

Encoding type used by Amazon S3 to encode object key names in the XML response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListVersionsResult" + } + }, + "com.amazonaws.s3#ListObjectVersionsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name that contains the objects.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

A delimiter is a character that you specify to group keys. All keys that contain the\n same string between the prefix and the first occurrence of the delimiter are\n grouped under a single result element in CommonPrefixes. These groups are\n counted as one result against the max-keys limitation. These keys are not\n returned elsewhere in the response.

", + "smithy.api#httpQuery": "delimiter" + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#httpQuery": "encoding-type" + } + }, + "KeyMarker": { + "target": "com.amazonaws.s3#KeyMarker", + "traits": { + "smithy.api#documentation": "

Specifies the key to start with when listing objects in a bucket.

", + "smithy.api#httpQuery": "key-marker" + } + }, + "MaxKeys": { + "target": "com.amazonaws.s3#MaxKeys", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain more.\n If additional keys satisfy the search criteria, but were not returned because\n max-keys was exceeded, the response contains\n true. To return the additional keys,\n see key-marker and version-id-marker.

", + "smithy.api#httpQuery": "max-keys" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Use this parameter to select only those keys that begin with the specified prefix. You\n can use prefixes to separate a bucket into different groupings of keys. (You can think of\n using prefix to make groups in the same way that you'd use a folder in a file\n system.) You can use prefix with delimiter to roll up numerous\n objects into a single result under CommonPrefixes.

", + "smithy.api#httpQuery": "prefix", + "smithy.rules#contextParam": { + "name": "Prefix" + } + } + }, + "VersionIdMarker": { + "target": "com.amazonaws.s3#VersionIdMarker", + "traits": { + "smithy.api#documentation": "

Specifies the object version you want to start listing from.

", + "smithy.api#httpQuery": "version-id-marker" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "OptionalObjectAttributes": { + "target": "com.amazonaws.s3#OptionalObjectAttributesList", + "traits": { + "smithy.api#documentation": "

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

", + "smithy.api#httpHeader": "x-amz-optional-object-attributes" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListObjects": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListObjectsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListObjectsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchBucket" + } + ], + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns some or all (up to 1,000) of the objects in a bucket. You can use the request\n parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK\n response can contain valid or invalid XML. Be sure to design your application to parse the\n contents of the response and handle it appropriately.

\n \n

This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility,\n Amazon S3 continues to support ListObjects.

\n
\n

The following operations are related to ListObjects:

\n ", + "smithy.api#examples": [ + { + "title": "To list objects in a bucket", + "documentation": "The following example list two objects in a bucket.", + "input": { + "Bucket": "examplebucket", + "MaxKeys": 2 + }, + "output": { + "NextMarker": "eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ==", + "Contents": [ + { + "LastModified": "2014-11-21T19:40:05.000Z", + "ETag": "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"", + "StorageClass": "STANDARD", + "Key": "example1.jpg", + "Owner": { + "DisplayName": "myname", + "ID": "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Size": 11 + }, + { + "LastModified": "2013-11-15T01:10:49.000Z", + "ETag": "\"9c8af9a76df052144598c115ef33e511\"", + "StorageClass": "STANDARD", + "Key": "example2.jpg", + "Owner": { + "DisplayName": "myname", + "ID": "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Size": 713193 + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}", + "code": 200 + } + } + }, + "com.amazonaws.s3#ListObjectsOutput": { + "type": "structure", + "members": { + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search\n criteria.

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

Indicates where in the bucket listing begins. Marker is included in the response if it\n was sent with the request.

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

When the response is truncated (the IsTruncated element value in the\n response is true), you can use the key name in this field as the\n marker parameter in the subsequent request to get the next set of objects.\n Amazon S3 lists objects in alphabetical order.

\n \n

This element is returned only if you have the delimiter request\n parameter specified. If the response does not include the NextMarker\n element and it is truncated, you can use the value of the last Key element\n in the response as the marker parameter in the subsequent request to get\n the next set of object keys.

\n
" + } + }, + "Contents": { + "target": "com.amazonaws.s3#ObjectList", + "traits": { + "smithy.api#documentation": "

Metadata about each object returned.

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

The bucket name.

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

Keys that begin with the indicated prefix.

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

Causes keys that contain the same string between the prefix and the first occurrence of\n the delimiter to be rolled up into a single result element in the\n CommonPrefixes collection. These rolled-up keys are not returned elsewhere\n in the response. Each rolled-up result counts as only one return against the\n MaxKeys value.

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

The maximum number of keys returned in the response body.

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

All of the keys (up to 1,000) rolled up in a common prefix count as a single return when\n calculating the number of returns.

\n

A response can contain CommonPrefixes only if you specify a\n delimiter.

\n

\n CommonPrefixes contains all (if there are any) keys between\n Prefix and the next occurrence of the string specified by the\n delimiter.

\n

\n CommonPrefixes lists keys that act like subdirectories in the directory\n specified by Prefix.

\n

For example, if the prefix is notes/ and the delimiter is a slash\n (/), as in notes/summer/july, the common prefix is\n notes/summer/. All of the keys that roll up into a common prefix count as a\n single return when calculating the number of returns.

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

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListBucketResult" + } + }, + "com.amazonaws.s3#ListObjectsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the objects.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

A delimiter is a character that you use to group keys.

", + "smithy.api#httpQuery": "delimiter" + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#httpQuery": "encoding-type" + } + }, + "Marker": { + "target": "com.amazonaws.s3#Marker", + "traits": { + "smithy.api#documentation": "

Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this\n specified key. Marker can be any key in the bucket.

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

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain more.\n

", + "smithy.api#httpQuery": "max-keys" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Limits the response to keys that begin with the specified prefix.

", + "smithy.api#httpQuery": "prefix", + "smithy.rules#contextParam": { + "name": "Prefix" + } + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#documentation": "

Confirms that the requester knows that she or he will be charged for the list objects\n request. Bucket owners need not specify this parameter in their requests.

", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

", + "smithy.api#httpHeader": "x-amz-optional-object-attributes" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListObjectsV2": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListObjectsV2Request" + }, + "output": { + "target": "com.amazonaws.s3#ListObjectsV2Output" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchBucket" + } + ], + "traits": { + "smithy.api#documentation": "

Returns some or all (up to 1,000) of the objects in a bucket with each request. You can\n use the request parameters as selection criteria to return a subset of the objects in a\n bucket. A 200 OK response can contain valid or invalid XML. Make sure to\n design your application to parse the contents of the response and handle it appropriately.\n For more information about listing objects, see Listing object keys\n programmatically in the Amazon S3 User Guide. To get a list of\n your buckets, see ListBuckets.

\n \n
    \n
  • \n

    \n General purpose bucket - For general purpose buckets,\n ListObjectsV2 doesn't return prefixes that are related only to\n in-progress multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets - For\n directory buckets, ListObjectsV2 response includes the prefixes that\n are related only to in-progress multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n use this operation, you must have READ access to the bucket. You must have\n permission to perform the s3:ListBucket action. The bucket\n owner has this permission by default and can grant this permission to\n others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access\n Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Sorting order of returned objects
\n
\n
    \n
  • \n

    \n General purpose bucket - For\n general purpose buckets, ListObjectsV2 returns objects in\n lexicographical order based on their key names.

    \n
  • \n
  • \n

    \n Directory bucket - For\n directory buckets, ListObjectsV2 does not return objects in\n lexicographical order.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n \n

This section describes the latest revision of this action. We recommend that you use\n this revised API operation for application development. For backward compatibility, Amazon S3\n continues to support the prior version of this API operation, ListObjects.

\n
\n

The following operations are related to ListObjectsV2:

\n ", + "smithy.api#examples": [ + { + "title": "To get object list", + "documentation": "The following example retrieves object list. The request specifies max keys to limit response to include only 2 object keys. ", + "input": { + "Bucket": "DOC-EXAMPLE-BUCKET", + "MaxKeys": 2 + }, + "output": { + "Name": "DOC-EXAMPLE-BUCKET", + "MaxKeys": 2, + "Prefix": "", + "KeyCount": 2, + "NextContinuationToken": "1w41l63U0xa8q7smH50vCxyTQqdxo69O3EmK28Bi5PcROI4wI/EyIJg==", + "IsTruncated": true, + "Contents": [ + { + "LastModified": "2014-11-21T19:40:05.000Z", + "ETag": "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"", + "StorageClass": "STANDARD", + "Key": "happyface.jpg", + "Size": 11 + }, + { + "LastModified": "2014-05-02T04:51:50.000Z", + "ETag": "\"becf17f89c30367a9a44495d62ed521a-1\"", + "StorageClass": "STANDARD", + "Key": "test.jpg", + "Size": 4192256 + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?list-type=2", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "ContinuationToken", + "outputToken": "NextContinuationToken", + "pageSize": "MaxKeys" + } + } + }, + "com.amazonaws.s3#ListObjectsV2Output": { + "type": "structure", + "members": { + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

Set to false if all of the results were returned. Set to true\n if more keys are available to return. If the number of results exceeds that specified by\n MaxKeys, all of the results might not be returned.

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

Metadata about each object returned.

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

The bucket name.

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

Keys that begin with the indicated prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

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

Causes keys that contain the same string between the prefix and the first\n occurrence of the delimiter to be rolled up into a single result element in the\n CommonPrefixes collection. These rolled-up keys are not returned elsewhere\n in the response. Each rolled-up result counts as only one return against the\n MaxKeys value.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

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

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain\n more.

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

All of the keys (up to 1,000) that share the same prefix are grouped together. When\n counting the total numbers of returns by this API operation, this group of keys is\n considered as one item.

\n

A response can contain CommonPrefixes only if you specify a\n delimiter.

\n

\n CommonPrefixes contains all (if there are any) keys between\n Prefix and the next occurrence of the string specified by a\n delimiter.

\n

\n CommonPrefixes lists keys that act like subdirectories in the directory\n specified by Prefix.

\n

For example, if the prefix is notes/ and the delimiter is a slash\n (/) as in notes/summer/july, the common prefix is\n notes/summer/. All of the keys that roll up into a common prefix count as a\n single return when calculating the number of returns.

\n \n
    \n
  • \n

    \n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    \n
  • \n
  • \n

    \n Directory buckets - When you query\n ListObjectsV2 with a delimiter during in-progress multipart\n uploads, the CommonPrefixes response parameter contains the prefixes\n that are associated with the in-progress multipart uploads. For more information\n about multipart uploads, see Multipart Upload Overview in\n the Amazon S3 User Guide.

    \n
  • \n
\n
", + "smithy.api#xmlFlattened": {} + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode object key names in the XML response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n Delimiter, Prefix, Key, and StartAfter.

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

\n KeyCount is the number of keys returned with this request.\n KeyCount will always be less than or equal to the MaxKeys\n field. For example, if you ask for 50 keys, your result will include 50 keys or\n fewer.

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

If ContinuationToken was sent with the request, it is included in the\n response. You can use the returned ContinuationToken for pagination of the\n list response. You can use this ContinuationToken for pagination of the list\n results.

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

\n NextContinuationToken is sent when isTruncated is true, which\n means there are more keys in the bucket that can be listed. The next list requests to Amazon S3\n can be continued with this NextContinuationToken.\n NextContinuationToken is obfuscated and is not a real key

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

If StartAfter was sent with the request, it is included in the response.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListBucketResult" + } + }, + "com.amazonaws.s3#ListObjectsV2Request": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

A delimiter is a character that you use to group keys.

\n \n
    \n
  • \n

    \n Directory buckets - For directory buckets, / is the only supported delimiter.

    \n
  • \n
  • \n

    \n Directory buckets - When you query\n ListObjectsV2 with a delimiter during in-progress multipart\n uploads, the CommonPrefixes response parameter contains the prefixes\n that are associated with the in-progress multipart uploads. For more information\n about multipart uploads, see Multipart Upload Overview in\n the Amazon S3 User Guide.

    \n
  • \n
\n
", + "smithy.api#httpQuery": "delimiter" + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
", + "smithy.api#httpQuery": "encoding-type" + } + }, + "MaxKeys": { + "target": "com.amazonaws.s3#MaxKeys", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain\n more.

", + "smithy.api#httpQuery": "max-keys" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Limits the response to keys that begin with the specified prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", + "smithy.api#httpQuery": "prefix", + "smithy.rules#contextParam": { + "name": "Prefix" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken is obfuscated and is not a real\n key. You can use this ContinuationToken for pagination of the list results.\n

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "FetchOwner": { + "target": "com.amazonaws.s3#FetchOwner", + "traits": { + "smithy.api#documentation": "

The owner field is not present in ListObjectsV2 by default. If you want to\n return the owner field with each key in the result, then set the FetchOwner\n field to true.

\n \n

\n Directory buckets - For directory buckets,\n the bucket owner is returned as the object owner for all objects.

\n
", + "smithy.api#httpQuery": "fetch-owner" + } + }, + "StartAfter": { + "target": "com.amazonaws.s3#StartAfter", + "traits": { + "smithy.api#documentation": "

StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this\n specified key. StartAfter can be any key in the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpQuery": "start-after" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#documentation": "

Confirms that the requester knows that she or he will be charged for the list objects\n request in V2 style. Bucket owners need not specify this parameter in their\n requests.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-optional-object-attributes" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListParts": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListPartsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListPartsOutput" + }, + "traits": { + "smithy.api#documentation": "

Lists the parts that have been uploaded for a specific multipart upload.

\n

To use this operation, you must provide the upload ID in the request. You\n obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

\n

The ListParts request returns a maximum of 1,000 uploaded parts. The limit\n of 1,000 parts is also the default value. You can restrict the number of parts in a\n response by specifying the max-parts request parameter. If your multipart\n upload consists of more than 1,000 parts, the response returns an IsTruncated\n field with the value of true, and a NextPartNumberMarker element.\n To list remaining uploaded parts, in subsequent ListParts requests, include\n the part-number-marker query string parameter and set its value to the\n NextPartNumberMarker field value from the previous response.

\n

For more information on multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n

    If the upload was created using server-side encryption with Key Management Service\n (KMS) keys (SSE-KMS) or dual-layer server-side encryption with\n Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the\n kms:Decrypt action for the ListParts request to\n succeed.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to ListParts:

\n ", + "smithy.api#examples": [ + { + "title": "To list parts of a multipart upload.", + "documentation": "The following example lists parts uploaded for a specific multipart upload.", + "input": { + "Bucket": "examplebucket", + "Key": "bigobject", + "UploadId": "example7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" + }, + "output": { + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiator": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Parts": [ + { + "LastModified": "2016-12-16T00:11:42.000Z", + "PartNumber": 1, + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", + "Size": 26246026 + }, + { + "LastModified": "2016-12-16T00:15:01.000Z", + "PartNumber": 2, + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", + "Size": 26246026 + } + ], + "StorageClass": "STANDARD" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?x-id=ListParts", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "PartNumberMarker", + "outputToken": "NextPartNumberMarker", + "items": "Parts", + "pageSize": "MaxParts" + } + } + }, + "com.amazonaws.s3#ListPartsOutput": { + "type": "structure", + "members": { + "AbortDate": { + "target": "com.amazonaws.s3#AbortDate", + "traits": { + "smithy.api#documentation": "

If the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, then the response includes this header indicating when the initiated multipart\n upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.

\n

The response will also include the x-amz-abort-rule-id header that will\n provide the ID of the lifecycle configuration rule that defines this action.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-abort-date" + } + }, + "AbortRuleId": { + "target": "com.amazonaws.s3#AbortRuleId", + "traits": { + "smithy.api#documentation": "

This header is returned along with the x-amz-abort-date header. It\n identifies applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-abort-rule-id" + } + }, + "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\n access point ARN or access point alias if used.

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

Object key for which the multipart upload was initiated.

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

Upload ID identifying the multipart upload whose parts are being listed.

" + } + }, + "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.

" + } + }, + "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 part-number-marker request parameter in a subsequent\n request.

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

Maximum number of parts that were allowed in the response.

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

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

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

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

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Part" + } + }, + "Initiator": { + "target": "com.amazonaws.s3#Initiator", + "traits": { + "smithy.api#documentation": "

Container element that identifies who initiated the multipart upload. If the initiator\n is an Amazon Web Services account, this element provides the same information as the Owner\n element. If the initiator is an IAM User, this element provides the user ARN and display\n name.

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

Container element that identifies the object owner, after the object is created. If\n multipart upload is initiated by an IAM user, this element provides the parent account ID\n and display name.

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner for all the parts.

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

The class of storage used to store the uploaded object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "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.

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

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in\n CreateMultipartUpload request. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

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

The name of the bucket to which the parts are being uploaded.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

Object key for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "MaxParts": { + "target": "com.amazonaws.s3#MaxParts", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of parts to return.

", + "smithy.api#httpQuery": "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#httpQuery": "part-number-marker" + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID identifying the multipart upload whose parts are being listed.

", + "smithy.api#httpQuery": "uploadId", + "smithy.api#required": {} + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, 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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#Location": { + "type": "string" + }, + "com.amazonaws.s3#LocationInfo": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.s3#LocationType", + "traits": { + "smithy.api#documentation": "

The type of location where the bucket will be created.

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

The name of the location where the bucket will be created.

\n

For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

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

Specifies the location where the bucket will be created.

\n

For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see \n Working with directory buckets in the Amazon S3 User Guide.

\n \n

This functionality is only supported by directory buckets.

\n
" + } + }, + "com.amazonaws.s3#LocationNameAsString": { + "type": "string" + }, + "com.amazonaws.s3#LocationPrefix": { + "type": "string" + }, + "com.amazonaws.s3#LocationType": { + "type": "enum", + "members": { + "AvailabilityZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AvailabilityZone" + } + }, + "LocalZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LocalZone" + } + } + } + }, + "com.amazonaws.s3#LoggingEnabled": { + "type": "structure", + "members": { + "TargetBucket": { + "target": "com.amazonaws.s3#TargetBucket", + "traits": { + "smithy.api#documentation": "

Specifies the bucket where you want Amazon S3 to store server access logs. You can have your\n logs delivered to any bucket that you own, including the same bucket that is being logged.\n You can also configure multiple buckets to deliver their logs to the same target bucket. In\n this case, you should choose a different TargetPrefix for each source bucket\n so that the delivered log files can be distinguished by key.

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

Container for granting information.

\n

Buckets that use the bucket owner enforced setting for Object Ownership don't support\n target grants. For more information, see Permissions for server access log delivery in the\n Amazon S3 User Guide.

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

A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a\n single bucket, you can use a prefix to distinguish which log files came from which\n bucket.

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

Amazon S3 key format for log objects.

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

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys\n for a bucket. For more information, see PUT Bucket logging in the\n Amazon S3 API Reference.

" + } + }, + "com.amazonaws.s3#MFA": { + "type": "string" + }, + "com.amazonaws.s3#MFADelete": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#MFADeleteStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#Marker": { + "type": "string" + }, + "com.amazonaws.s3#MaxAgeSeconds": { + "type": "integer" + }, + "com.amazonaws.s3#MaxBuckets": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 10000 + } + } + }, + "com.amazonaws.s3#MaxDirectoryBuckets": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 1000 + } + } + }, + "com.amazonaws.s3#MaxKeys": { + "type": "integer" + }, + "com.amazonaws.s3#MaxParts": { + "type": "integer" + }, + "com.amazonaws.s3#MaxUploads": { + "type": "integer" + }, + "com.amazonaws.s3#Message": { + "type": "string" + }, + "com.amazonaws.s3#Metadata": { + "type": "map", + "key": { + "target": "com.amazonaws.s3#MetadataKey" + }, + "value": { + "target": "com.amazonaws.s3#MetadataValue" + } + }, + "com.amazonaws.s3#MetadataDirective": { + "type": "enum", + "members": { + "COPY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COPY" + } + }, + "REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLACE" + } + } + } + }, + "com.amazonaws.s3#MetadataEntry": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.s3#MetadataKey", + "traits": { + "smithy.api#documentation": "

Name of the object.

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

Value of the object.

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

A metadata key-value pair to store with an object.

" + } + }, + "com.amazonaws.s3#MetadataKey": { + "type": "string" + }, + "com.amazonaws.s3#MetadataTableConfiguration": { + "type": "structure", + "members": { + "S3TablesDestination": { + "target": "com.amazonaws.s3#S3TablesDestination", + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

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

\n The metadata table configuration for a general purpose bucket.\n

" + } + }, + "com.amazonaws.s3#MetadataTableConfigurationResult": { + "type": "structure", + "members": { + "S3TablesDestinationResult": { + "target": "com.amazonaws.s3#S3TablesDestinationResult", + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

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

\n The metadata table configuration for a general purpose bucket. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket. \n

" + } + }, + "com.amazonaws.s3#MetadataTableStatus": { + "type": "string" + }, + "com.amazonaws.s3#MetadataValue": { + "type": "string" + }, + "com.amazonaws.s3#Metrics": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#MetricsStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether the replication metrics are enabled.

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

A container specifying the time threshold for emitting the\n s3:Replication:OperationMissedThreshold event.

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

A container specifying replication metrics-related settings enabling replication\n metrics and events.

" + } + }, + "com.amazonaws.s3#MetricsAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix used when evaluating an AND predicate.

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

The list of tags used when evaluating an AND predicate.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + }, + "AccessPointArn": { + "target": "com.amazonaws.s3#AccessPointArn", + "traits": { + "smithy.api#documentation": "

The access point ARN used when evaluating an AND predicate.

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

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

" + } + }, + "com.amazonaws.s3#MetricsConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#MetricsId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

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

Specifies a metrics configuration filter. The metrics configuration will only include\n objects that meet the filter's criteria. A filter must be a prefix, an object tag, an\n access point ARN, or a conjunction (MetricsAndOperator).

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

Specifies a metrics configuration for the CloudWatch request metrics (specified by the\n metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics\n configuration, note that this is a full replacement of the existing metrics configuration.\n If you don't include the elements you want to keep, they are erased. For more information,\n see PutBucketMetricsConfiguration.

" + } + }, + "com.amazonaws.s3#MetricsConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#MetricsConfiguration" + } + }, + "com.amazonaws.s3#MetricsFilter": { + "type": "union", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix used when evaluating a metrics filter.

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

The tag used when evaluating a metrics filter.

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

The access point ARN used when evaluating a metrics filter.

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

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

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

Specifies a metrics configuration filter. The metrics configuration only includes\n objects that meet the filter's criteria. A filter must be a prefix, an object tag, an\n access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

" + } + }, + "com.amazonaws.s3#MetricsId": { + "type": "string" + }, + "com.amazonaws.s3#MetricsStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#Minutes": { + "type": "integer" + }, + "com.amazonaws.s3#MissingMeta": { + "type": "integer" + }, + "com.amazonaws.s3#MpuObjectSize": { + "type": "long" + }, + "com.amazonaws.s3#MultipartUpload": { + "type": "structure", + "members": { + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID that identifies the multipart upload.

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

Key of the object for which the multipart upload was initiated.

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

Date and time at which the multipart upload was initiated.

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

The class of storage used to store the object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

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

Specifies the owner of the object that is part of the multipart upload.

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner for all the objects.

\n
" + } + }, + "Initiator": { + "target": "com.amazonaws.s3#Initiator", + "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.

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

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

Container for the MultipartUpload for the Amazon S3 object.

" + } + }, + "com.amazonaws.s3#MultipartUploadId": { + "type": "string" + }, + "com.amazonaws.s3#MultipartUploadList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#MultipartUpload" + } + }, + "com.amazonaws.s3#NextKeyMarker": { + "type": "string" + }, + "com.amazonaws.s3#NextMarker": { + "type": "string" + }, + "com.amazonaws.s3#NextPartNumberMarker": { + "type": "string" + }, + "com.amazonaws.s3#NextToken": { + "type": "string" + }, + "com.amazonaws.s3#NextUploadIdMarker": { + "type": "string" + }, + "com.amazonaws.s3#NextVersionIdMarker": { + "type": "string" + }, + "com.amazonaws.s3#NoSuchBucket": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The specified bucket does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.s3#NoSuchKey": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The specified key does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.s3#NoSuchUpload": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The specified multipart upload does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.s3#NoncurrentVersionExpiration": { + "type": "structure", + "members": { + "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. The value must be a non-zero positive integer. For information about the\n noncurrent days calculations, see How\n Amazon S3 Calculates When an Object Became Noncurrent in the\n Amazon S3 User Guide.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + }, + "NewerNoncurrentVersions": { + "target": "com.amazonaws.s3#VersionCount", + "traits": { + "smithy.api#documentation": "

Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100\n noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent\n versions beyond the specified number to retain. For more information about noncurrent\n versions, see Lifecycle configuration\n elements in the Amazon S3 User Guide.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

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

Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently\n deletes the noncurrent object versions. You set this lifecycle configuration action on a\n bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent\n object versions at a specific period in the object's lifetime.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + }, + "com.amazonaws.s3#NoncurrentVersionTransition": { + "type": "structure", + "members": { + "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 How Long an Object Has Been Noncurrent in the\n Amazon S3 User Guide.

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

The class of storage used to store the object.

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

Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before\n transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will\n transition any additional noncurrent versions beyond the specified number to retain. For\n more information about noncurrent versions, see Lifecycle configuration\n elements in the Amazon S3 User Guide.

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

Container for the transition rule that describes when noncurrent objects transition to\n the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,\n GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage\n class. If your bucket is versioning-enabled (or versioning is suspended), you can set this\n action to request that Amazon S3 transition noncurrent object versions to the\n STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,\n GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage\n class at a specific period in the object's lifetime.

" + } + }, + "com.amazonaws.s3#NoncurrentVersionTransitionList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#NoncurrentVersionTransition" + } + }, + "com.amazonaws.s3#NotFound": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The specified content does not exist.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.s3#NotificationConfiguration": { + "type": "structure", + "members": { + "TopicConfigurations": { + "target": "com.amazonaws.s3#TopicConfigurationList", + "traits": { + "smithy.api#documentation": "

The topic to which notifications are sent and the events for which notifications are\n generated.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "TopicConfiguration" + } + }, + "QueueConfigurations": { + "target": "com.amazonaws.s3#QueueConfigurationList", + "traits": { + "smithy.api#documentation": "

The Amazon Simple Queue Service queues to publish messages to and the events for which\n to publish messages.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "QueueConfiguration" + } + }, + "LambdaFunctionConfigurations": { + "target": "com.amazonaws.s3#LambdaFunctionConfigurationList", + "traits": { + "smithy.api#documentation": "

Describes the Lambda functions to invoke and the events for which to invoke\n them.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "CloudFunctionConfiguration" + } + }, + "EventBridgeConfiguration": { + "target": "com.amazonaws.s3#EventBridgeConfiguration", + "traits": { + "smithy.api#documentation": "

Enables delivery of events to Amazon EventBridge.

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

A container for specifying the notification configuration of the bucket. If this element\n is empty, notifications are turned off for the bucket.

" + } + }, + "com.amazonaws.s3#NotificationConfigurationFilter": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#S3KeyFilter", + "traits": { + "smithy.api#xmlName": "S3Key" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies object key name filtering rules. For information about key name filtering, see\n Configuring event\n notifications using object key name filtering in the\n Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#NotificationId": { + "type": "string", + "traits": { + "smithy.api#documentation": "

An optional unique identifier for configurations in a notification configuration. If you\n don't provide one, Amazon S3 will assign an ID.

" + } + }, + "com.amazonaws.s3#Object": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The name that you assign to an object. You use the object key to retrieve the\n object.

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

Creation date of the object.

" + } + }, + "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\n are 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 is\n 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
\n \n

\n Directory buckets - MD5 is not supported by directory buckets.

\n
" + } + }, + "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": {} + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

Size in bytes of the object

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

The class of storage used to store the object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

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

The owner of the object

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner.

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

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

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

An object consists of data and its descriptive metadata.

" + } + }, + "com.amazonaws.s3#ObjectAlreadyInActiveTierError": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

This action is not allowed against this storage tier.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.s3#ObjectAttributes": { + "type": "enum", + "members": { + "ETAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ETag" + } + }, + "CHECKSUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Checksum" + } + }, + "OBJECT_PARTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectParts" + } + }, + "STORAGE_CLASS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "StorageClass" + } + }, + "OBJECT_SIZE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectSize" + } + } + } + }, + "com.amazonaws.s3#ObjectAttributesList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectAttributes" + } + }, + "com.amazonaws.s3#ObjectCannedACL": { + "type": "enum", + "members": { + "private": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "private" + } + }, + "public_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read" + } + }, + "public_read_write": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read-write" + } + }, + "authenticated_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "authenticated-read" + } + }, + "aws_exec_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aws-exec-read" + } + }, + "bucket_owner_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bucket-owner-read" + } + }, + "bucket_owner_full_control": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bucket-owner-full-control" + } + } + } + }, + "com.amazonaws.s3#ObjectIdentifier": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Key name of the object.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

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

Version ID for the specific version of the object to delete.

\n \n

This functionality is not supported for directory buckets.

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

An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL.\n This header field makes the request method conditional on ETags.

\n \n

Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

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

If present, the objects are deleted only if its modification times matches the provided Timestamp. \n

\n \n

This functionality is only supported for directory buckets.

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

If present, the objects are deleted only if its size matches the provided size in bytes.

\n \n

This functionality is only supported for directory buckets.

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

Object Identifier is unique value to identify objects.

" + } + }, + "com.amazonaws.s3#ObjectIdentifierList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectIdentifier" + } + }, + "com.amazonaws.s3#ObjectKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.s3#ObjectList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Object" + } + }, + "com.amazonaws.s3#ObjectLockConfiguration": { + "type": "structure", + "members": { + "ObjectLockEnabled": { + "target": "com.amazonaws.s3#ObjectLockEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether this bucket has an Object Lock configuration enabled. Enable\n ObjectLockEnabled when you apply ObjectLockConfiguration to a\n bucket.

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

Specifies the Object Lock rule for the specified object. Enable the this rule when you\n apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode\n and a period. The period can be either Days or Years but you must\n select one. You cannot specify Days and Years at the same\n time.

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

The container element for Object Lock configuration parameters.

" + } + }, + "com.amazonaws.s3#ObjectLockEnabled": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + } + } + }, + "com.amazonaws.s3#ObjectLockEnabledForBucket": { + "type": "boolean" + }, + "com.amazonaws.s3#ObjectLockLegalHold": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "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.

" + } + }, + "com.amazonaws.s3#ObjectLockLegalHoldStatus": { + "type": "enum", + "members": { + "ON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ON" + } + }, + "OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OFF" + } + } + } + }, + "com.amazonaws.s3#ObjectLockMode": { + "type": "enum", + "members": { + "GOVERNANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GOVERNANCE" + } + }, + "COMPLIANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLIANCE" + } + } + } + }, + "com.amazonaws.s3#ObjectLockRetainUntilDate": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.s3#ObjectLockRetention": { + "type": "structure", + "members": { + "Mode": { + "target": "com.amazonaws.s3#ObjectLockRetentionMode", + "traits": { + "smithy.api#documentation": "

Indicates the Retention mode for the specified object.

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

The date on which this Object Lock Retention will expire.

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

A Retention configuration for an object.

" + } + }, + "com.amazonaws.s3#ObjectLockRetentionMode": { + "type": "enum", + "members": { + "GOVERNANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GOVERNANCE" + } + }, + "COMPLIANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLIANCE" + } + } + } + }, + "com.amazonaws.s3#ObjectLockRule": { + "type": "structure", + "members": { + "DefaultRetention": { + "target": "com.amazonaws.s3#DefaultRetention", + "traits": { + "smithy.api#documentation": "

The default Object Lock retention mode and period that you want to apply to new objects\n placed in the specified bucket. Bucket settings require both a mode and a period. The\n period can be either Days or Years but you must select one. You\n cannot specify Days and Years at the same time.

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

The container element for an Object Lock rule.

" + } + }, + "com.amazonaws.s3#ObjectLockToken": { + "type": "string" + }, + "com.amazonaws.s3#ObjectNotInActiveTierError": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The source object of the COPY action is not in the active tier and is only stored in\n Amazon S3 Glacier.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.s3#ObjectOwnership": { + "type": "enum", + "members": { + "BucketOwnerPreferred": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BucketOwnerPreferred" + } + }, + "ObjectWriter": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectWriter" + } + }, + "BucketOwnerEnforced": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BucketOwnerEnforced" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for object ownership for a bucket's ownership controls.

\n

\n BucketOwnerPreferred - Objects uploaded to the bucket change ownership to\n the bucket owner if the objects are uploaded with the\n bucket-owner-full-control canned ACL.

\n

\n ObjectWriter - The uploading account will own the object if the object is\n uploaded with the bucket-owner-full-control canned ACL.

\n

\n BucketOwnerEnforced - Access control lists (ACLs) are disabled and no\n longer affect permissions. The bucket owner automatically owns and has full control over\n every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL\n or specify bucket owner full control ACLs (such as the predefined\n bucket-owner-full-control canned ACL or a custom ACL in XML format that\n grants the same permissions).

\n

By default, ObjectOwnership is set to BucketOwnerEnforced and\n ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where\n you must control access for each object individually. For more information about S3 Object\n Ownership, see Controlling ownership of\n objects and disabling ACLs for your bucket in the\n Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

\n
" + } + }, + "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": "

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see 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" + }, + "com.amazonaws.s3#ObjectSizeLessThanBytes": { + "type": "long" + }, + "com.amazonaws.s3#ObjectStorageClass": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" + } + }, + "REDUCED_REDUNDANCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REDUCED_REDUNDANCY" + } + }, + "GLACIER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER" + } + }, + "STANDARD_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD_IA" + } + }, + "ONEZONE_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONEZONE_IA" + } + }, + "INTELLIGENT_TIERING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTELLIGENT_TIERING" + } + }, + "DEEP_ARCHIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE" + } + }, + "OUTPOSTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OUTPOSTS" + } + }, + "GLACIER_IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER_IR" + } + }, + "SNOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNOW" + } + }, + "EXPRESS_ONEZONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXPRESS_ONEZONE" + } + } + } + }, + "com.amazonaws.s3#ObjectVersion": { + "type": "structure", + "members": { + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "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": {} + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

Size in bytes of the object.

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

The class of storage used to store the object.

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

The object key.

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

Version ID of an object.

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

Specifies whether the object is (true) or is not (false) the latest version of an\n object.

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

Date and time when the object was last modified.

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

Specifies the owner of the object.

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

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

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

The version of an object.

" + } + }, + "com.amazonaws.s3#ObjectVersionId": { + "type": "string" + }, + "com.amazonaws.s3#ObjectVersionList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectVersion" + } + }, + "com.amazonaws.s3#ObjectVersionStorageClass": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" + } + } + } + }, + "com.amazonaws.s3#OptionalObjectAttributes": { + "type": "enum", + "members": { + "RESTORE_STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RestoreStatus" + } + } + } + }, + "com.amazonaws.s3#OptionalObjectAttributesList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#OptionalObjectAttributes" + } + }, + "com.amazonaws.s3#OutputLocation": { + "type": "structure", + "members": { + "S3": { + "target": "com.amazonaws.s3#S3Location", + "traits": { + "smithy.api#documentation": "

Describes an S3 location that will receive the results of the restore request.

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

Describes the location where the restore job's output is stored.

" + } + }, + "com.amazonaws.s3#OutputSerialization": { + "type": "structure", + "members": { + "CSV": { + "target": "com.amazonaws.s3#CSVOutput", + "traits": { + "smithy.api#documentation": "

Describes the serialization of CSV-encoded Select results.

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

Specifies JSON as request's output serialization format.

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

Describes how results of the Select job are serialized.

" + } + }, + "com.amazonaws.s3#Owner": { + "type": "structure", + "members": { + "DisplayName": { + "target": "com.amazonaws.s3#DisplayName", + "traits": { + "smithy.api#documentation": "

Container for the display name of the owner. This value is only supported in the\n 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\u00e3o Paulo)

    \n
  • \n
\n \n

This functionality is not supported for directory buckets.

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

Container for the ID of the owner.

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

Container for the owner's display name and ID.

" + } + }, + "com.amazonaws.s3#OwnerOverride": { + "type": "enum", + "members": { + "Destination": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Destination" + } + } + } + }, + "com.amazonaws.s3#OwnershipControls": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.s3#OwnershipControlsRules", + "traits": { + "smithy.api#documentation": "

The container element for an ownership control rule.

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

The container element for a bucket's ownership controls.

" + } + }, + "com.amazonaws.s3#OwnershipControlsRule": { + "type": "structure", + "members": { + "ObjectOwnership": { + "target": "com.amazonaws.s3#ObjectOwnership", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for an ownership control rule.

" + } + }, + "com.amazonaws.s3#OwnershipControlsRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#OwnershipControlsRule" + } + }, + "com.amazonaws.s3#ParquetInput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

Container for Parquet.

" + } + }, + "com.amazonaws.s3#Part": { + "type": "structure", + "members": { + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number identifying the part. This is a positive integer between 1 and\n 10,000.

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

Date and time at which the part was uploaded.

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

Entity tag returned when the part was uploaded.

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

Size in bytes of the uploaded part data.

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

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present\n if the object was uploaded with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

Container for elements related to a part.

" + } + }, + "com.amazonaws.s3#PartNumber": { + "type": "integer" + }, + "com.amazonaws.s3#PartNumberMarker": { + "type": "string" + }, + "com.amazonaws.s3#PartitionDateSource": { + "type": "enum", + "members": { + "EventTime": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EventTime" + } + }, + "DeliveryTime": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DeliveryTime" + } + } + } + }, + "com.amazonaws.s3#PartitionedPrefix": { + "type": "structure", + "members": { + "PartitionDateSource": { + "target": "com.amazonaws.s3#PartitionDateSource", + "traits": { + "smithy.api#documentation": "

Specifies the partition date source for the partitioned prefix.\n PartitionDateSource can be EventTime or\n DeliveryTime.

\n

For DeliveryTime, the time in the log file names corresponds to the\n delivery time for the log files.

\n

For EventTime, The logs delivered are for a specific day only. The year,\n month, and day correspond to the day on which the event occurred, and the hour, minutes and\n seconds are set to 00 in the key.

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

Amazon S3 keys for log objects are partitioned in the following format:

\n

\n [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]\n

\n

PartitionedPrefix defaults to EventTime delivery when server access logs are\n delivered.

", + "smithy.api#xmlName": "PartitionedPrefix" + } + }, + "com.amazonaws.s3#Parts": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Part" + } + }, + "com.amazonaws.s3#PartsCount": { + "type": "integer" + }, + "com.amazonaws.s3#PartsList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectPart" + } + }, + "com.amazonaws.s3#Payer": { + "type": "enum", + "members": { + "Requester": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Requester" + } + }, + "BucketOwner": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BucketOwner" + } + } + } + }, + "com.amazonaws.s3#Permission": { + "type": "enum", + "members": { + "FULL_CONTROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL_CONTROL" + } + }, + "WRITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WRITE" + } + }, + "WRITE_ACP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WRITE_ACP" + } + }, + "READ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READ" + } + }, + "READ_ACP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READ_ACP" + } + } + } + }, + "com.amazonaws.s3#Policy": { + "type": "string" + }, + "com.amazonaws.s3#PolicyStatus": { + "type": "structure", + "members": { + "IsPublic": { + "target": "com.amazonaws.s3#IsPublic", + "traits": { + "smithy.api#documentation": "

The policy status for this bucket. TRUE indicates that this bucket is\n public. FALSE indicates that the bucket is not public.

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

The container element for a bucket's policy status.

" + } + }, + "com.amazonaws.s3#Prefix": { + "type": "string" + }, + "com.amazonaws.s3#Priority": { + "type": "integer" + }, + "com.amazonaws.s3#Progress": { + "type": "structure", + "members": { + "BytesScanned": { + "target": "com.amazonaws.s3#BytesScanned", + "traits": { + "smithy.api#documentation": "

The current number of object bytes scanned.

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

The current number of uncompressed object bytes processed.

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

The current number of bytes of records payload data returned.

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

This data type contains information about progress of an operation.

" + } + }, + "com.amazonaws.s3#ProgressEvent": { + "type": "structure", + "members": { + "Details": { + "target": "com.amazonaws.s3#Progress", + "traits": { + "smithy.api#documentation": "

The Progress event details.

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

This data type contains information about the progress event of an operation.

" + } + }, + "com.amazonaws.s3#Protocol": { + "type": "enum", + "members": { + "http": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "http" + } + }, + "https": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "https" + } + } + } + }, + "com.amazonaws.s3#PublicAccessBlockConfiguration": { + "type": "structure", + "members": { + "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#xmlName": "BlockPublicAcls" + } + }, + "IgnorePublicAcls": { + "target": "com.amazonaws.s3#Setting", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this\n bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on\n this bucket and objects in this bucket.

\n

Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't\n prevent new public ACLs from being set.

", + "smithy.api#xmlName": "IgnorePublicAcls" + } + }, + "BlockPublicPolicy": { + "target": "com.amazonaws.s3#Setting", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this\n element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the\n specified bucket policy allows public access.

\n

Enabling this setting doesn't affect existing bucket policies.

", + "smithy.api#xmlName": "BlockPublicPolicy" + } + }, + "RestrictPublicBuckets": { + "target": "com.amazonaws.s3#Setting", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting\n this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has\n a public policy.

\n

Enabling this setting doesn't affect previously stored bucket policies, except that\n public and cross-account access within any public bucket policy, including non-public\n delegation to specific accounts, is blocked.

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

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can\n enable the configuration options in any combination. For more information about when Amazon S3\n considers a bucket or object public, see The Meaning of \"Public\" in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#PutBucketAccelerateConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketAccelerateConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

The Transfer Acceleration state of a bucket can be set to one of the following two\n values:

\n
    \n
  • \n

    Enabled \u2013 Enables accelerated data transfers to the bucket.

    \n
  • \n
  • \n

    Suspended \u2013 Disables accelerated data transfers to the bucket.

    \n
  • \n
\n

The GetBucketAccelerateConfiguration action returns the transfer acceleration state\n of a bucket.

\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

The name of the bucket used for Transfer Acceleration must be DNS-compliant and must\n not contain periods (\".\").

\n

For more information about transfer acceleration, see Transfer\n Acceleration.

\n

The following operations are related to\n PutBucketAccelerateConfiguration:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?accelerate", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketAccelerateConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which the accelerate configuration is set.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "AccelerateConfiguration": { + "target": "com.amazonaws.s3#AccelerateConfiguration", + "traits": { + "smithy.api#documentation": "

Container for setting the transfer acceleration state.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "AccelerateConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketAcl": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketAclRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets the permissions on an existing bucket using access control lists (ACL). For more\n information, see Using ACLs. To set the ACL of a\n bucket, you must have the WRITE_ACP permission.

\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

You cannot specify access permission using both the body and the request\n headers.

\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

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

You can set access permissions by using one of the following methods:

\n
    \n
  • \n

    Specify a canned ACL with the x-amz-acl request header. Amazon S3\n supports a set of predefined ACLs, known as canned\n ACLs. Each canned ACL has a predefined set of grantees and\n permissions. Specify the canned ACL name as the value of\n x-amz-acl. If you use this header, you cannot use other\n access control-specific headers in your request. For more information, see\n Canned\n 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. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use the x-amz-acl header to set a canned\n ACL. These parameters map to the set of permissions that Amazon S3 supports in an\n 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\n the following:

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    • \n

      \n emailAddress \u2013 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\u00e3o 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\n create, overwrite, and delete objects permission to LogDelivery group\n predefined by Amazon S3 and two Amazon Web Services accounts identified by their email\n addresses.

    \n

    \n x-amz-grant-write:\n uri=\"http://acs.amazonaws.com/groups/s3/LogDelivery\", id=\"111122223333\",\n id=\"555566667777\" \n

    \n
  • \n
\n

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

\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights\n (using 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<>&\n

    \n

    The grantee is resolved to the CanonicalUser and, in a response to a GET\n Object 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\u00e3o 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

The following operations are related to PutBucketAcl:

\n ", + "smithy.api#examples": [ + { + "title": "Put bucket acl", + "documentation": "The following example replaces existing ACL on a bucket. The ACL grants the bucket owner (specified using the owner ID) and write permission to the LogDelivery group. Because this is a replace operation, you must specify all the grants in your request. To incrementally add or remove ACL grants, you might use the console.", + "input": { + "Bucket": "examplebucket", + "GrantFullControl": "id=examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484", + "GrantWrite": "uri=http://acs.amazonaws.com/groups/s3/LogDelivery" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?acl", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketAclRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#BucketCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the bucket.

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

Contains the elements that set the ACL permissions for an object per grantee.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "AccessControlPolicy" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket to which to apply the ACL.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWrite": { + "target": "com.amazonaws.s3#GrantWrite", + "traits": { + "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

", + "smithy.api#httpHeader": "x-amz-grant-write" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketAnalyticsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketAnalyticsConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets an analytics configuration for the bucket (specified by the analytics configuration\n ID). You can have up to 1,000 analytics configurations per bucket.

\n

You can choose to have storage class analysis export analysis reports sent to a\n comma-separated values (CSV) flat file. See the DataExport request element.\n Reports are updated daily and are based on the object filters that you configure. When\n selecting data export, you specify a destination bucket and an optional destination prefix\n where the file is written. You can export the data to a destination bucket in a different\n account. However, the destination bucket must be in the same Region as the bucket that you\n are making the PUT analytics configuration to. For more information, see Amazon S3\n Analytics \u2013 Storage Class Analysis.

\n \n

You must create a bucket policy on the destination bucket where the exported file is\n written to grant permissions to Amazon S3 to write objects to the bucket. For an example\n policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

\n
\n

To use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration 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 PutBucketAnalyticsConfiguration has the following special errors:

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

      \n HTTP Error: HTTP 400 Bad Request\n

      \n
    • \n
    • \n

      \n Code: InvalidArgument\n

      \n
    • \n
    • \n

      \n Cause: Invalid argument.\n

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

      \n HTTP Error: HTTP 400 Bad Request\n

      \n
    • \n
    • \n

      \n Code: TooManyConfigurations\n

      \n
    • \n
    • \n

      \n Cause: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.\n

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

      \n HTTP Error: HTTP 403 Forbidden\n

      \n
    • \n
    • \n

      \n Code: AccessDenied\n

      \n
    • \n
    • \n

      \n Cause: You are not the owner of the specified bucket, or you do\n not have the s3:PutAnalyticsConfiguration bucket permission to set the\n configuration on the bucket.\n

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

The following operations are related to\n PutBucketAnalyticsConfiguration:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?analytics", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketAnalyticsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket to which an analytics configuration is stored.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#AnalyticsId", + "traits": { + "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "AnalyticsConfiguration": { + "target": "com.amazonaws.s3#AnalyticsConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration and any analyses for the analytics filter.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "AnalyticsConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketCors": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketCorsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.

\n

The following operations are related to PutBucketCors:

\n ", + "smithy.api#examples": [ + { + "title": "To set cors configuration on a bucket.", + "documentation": "The following example enables PUT, POST, and DELETE requests from www.example.com, and enables GET requests from any domain.", + "input": { + "Bucket": "", + "CORSConfiguration": { + "CORSRules": [ + { + "AllowedOrigins": [ + "http://www.example.com" + ], + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "PUT", + "POST", + "DELETE" + ], + "MaxAgeSeconds": 3000, + "ExposeHeaders": [ + "x-amz-server-side-encryption" + ] + }, + { + "AllowedOrigins": [ + "*" + ], + "AllowedHeaders": [ + "Authorization" + ], + "AllowedMethods": [ + "GET" + ], + "MaxAgeSeconds": 3000 + } + ] + }, + "ContentMD5": "" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?cors", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketCorsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies the bucket impacted by the corsconfiguration.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CORSConfiguration": { + "target": "com.amazonaws.s3#CORSConfiguration", + "traits": { + "smithy.api#documentation": "

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more\n information, see Enabling\n Cross-Origin Resource Sharing in the\n Amazon S3 User Guide.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "CORSConfiguration" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketEncryption": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketEncryptionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

This operation configures default encryption and Amazon S3 Bucket Keys for an existing\n bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n

By default, all buckets have a default encryption configuration that uses server-side\n encryption with Amazon S3 managed keys (SSE-S3).

\n \n
    \n
  • \n

    \n General purpose buckets\n

    \n
      \n
    • \n

      You can optionally configure default encryption for a bucket by using\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify\n default encryption by using SSE-KMS, you can also configure Amazon S3\n Bucket Keys. For information about the bucket default encryption\n feature, see Amazon S3 Bucket Default\n Encryption in the Amazon S3 User Guide.

      \n
    • \n
    • \n

      If you use PutBucketEncryption to set your default bucket\n encryption to SSE-KMS, you should verify that your KMS key ID\n is correct. Amazon S3 doesn't validate the KMS key ID provided in\n PutBucketEncryption requests.

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

    \n Directory buckets - You can\n optionally configure default encryption for a bucket by using server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS).

    \n
      \n
    • \n

      We recommend that the bucket's default encryption uses the desired\n encryption configuration and you don't override the bucket default\n encryption in your CreateSession requests or PUT\n object requests. Then, new objects are automatically encrypted with the\n desired encryption settings.\n For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      \n
    • \n
    • \n

      Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

      \n
    • \n
    • \n

      S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      \n
    • \n
    • \n

      When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      \n
    • \n
    • \n

      For directory buckets, if you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, Amazon S3 validates the\n KMS key ID provided in PutBucketEncryption requests.

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

If you're specifying a customer managed KMS key, we recommend using a fully\n qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the\n key within the requester\u2019s account. This behavior can result in data that's encrypted\n with a KMS key that belongs to the requester, and not the bucket owner.

\n

Also, this action requires Amazon Web Services Signature Version 4. For more information, see\n Authenticating\n Requests (Amazon Web Services Signature Version 4).

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n

    To set a directory bucket default encryption with SSE-KMS, you must also\n have the kms:GenerateDataKey and the kms:Decrypt\n permissions in IAM identity-based policies and KMS key policies for the\n target KMS key.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to PutBucketEncryption:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?encryption", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketEncryptionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies default encryption for a bucket using server-side encryption with different\n key options.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the server-side encryption\n configuration.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, + "ServerSideEncryptionConfiguration": { + "target": "com.amazonaws.s3#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "ServerSideEncryptionConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketIntelligentTieringConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketIntelligentTieringConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to\n 1,000 S3 Intelligent-Tiering configurations per bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to PutBucketIntelligentTieringConfiguration include:

\n \n \n

You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically\n move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access\n or Deep Archive Access tier.

\n
\n

\n PutBucketIntelligentTieringConfiguration has the following special\n errors:

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: InvalidArgument

\n

\n Cause: Invalid Argument

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: TooManyConfigurations

\n

\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.

\n
\n
HTTP 403 Forbidden Error
\n
\n

\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutIntelligentTieringConfiguration bucket\n permission to set the configuration on the bucket.

\n
\n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?intelligent-tiering", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketIntelligentTieringConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#IntelligentTieringId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "IntelligentTieringConfiguration": { + "target": "com.amazonaws.s3#IntelligentTieringConfiguration", + "traits": { + "smithy.api#documentation": "

Container for S3 Intelligent-Tiering configuration.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "IntelligentTieringConfiguration" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketInventoryConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketInventoryConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the PUT action adds an inventory configuration\n (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory\n configurations per bucket.

\n

Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly\n basis, and the results are published to a flat file. The bucket that is inventoried is\n called the source bucket, and the bucket where the inventory flat file\n is stored is called the destination bucket. The\n destination bucket must be in the same Amazon Web Services Region as the\n source bucket.

\n

When you configure an inventory for a source bucket, you specify\n the destination bucket where you want the inventory to be stored, and\n whether to generate the inventory daily or weekly. You can also configure what object\n metadata to include and whether to inventory all object versions or only current versions.\n For more information, see Amazon S3 Inventory in the\n Amazon S3 User Guide.

\n \n

You must create a bucket policy on the destination bucket to\n grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an\n example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

\n
\n
\n
Permissions
\n
\n

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

\n

The s3:PutInventoryConfiguration permission allows a user to\n create an S3 Inventory\n report that includes all object metadata fields available and to specify the\n destination bucket to store the inventory. A user with read access to objects in\n the destination bucket can also access all object metadata fields that are\n available in the inventory report.

\n

To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the\n Amazon S3 User Guide. For more information about the metadata\n fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For\n more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the\n Amazon S3 User Guide.

\n
\n
\n

\n PutBucketInventoryConfiguration has the following special errors:

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: InvalidArgument

\n

\n Cause: Invalid Argument

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: TooManyConfigurations

\n

\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.

\n
\n
HTTP 403 Forbidden Error
\n
\n

\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutInventoryConfiguration bucket permission to\n set the configuration on the bucket.

\n
\n
\n

The following operations are related to\n PutBucketInventoryConfiguration:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?inventory", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketInventoryConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket where the inventory configuration will be stored.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#InventoryId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "InventoryConfiguration": { + "target": "com.amazonaws.s3#InventoryConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the inventory configuration.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "InventoryConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketLifecycleConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketLifecycleConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutBucketLifecycleConfigurationOutput" + }, + "traits": { + "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,\n so if you want to retain any configuration details, they must be included in the new\n lifecycle configuration. For information about lifecycle configuration, see Managing\n your storage lifecycle.

\n \n

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility.\n For the related API description, see PutBucketLifecycle.

\n
\n
\n
Rules
\n
Permissions
\n
HTTP Host header syntax
\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\n Lifecycle configuration can have up to 1,000 rules. This limit is not\n adjustable.

\n

Bucket lifecycle configuration supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, object size, or any combination\n of these. Accordingly, this section describes the latest API. The previous version\n of the API supported filtering based only on an object key name prefix, which is\n supported for backward compatibility for general purpose buckets. For the related\n API description, see PutBucketLifecycle.

\n \n

Lifecyle configurations for directory buckets only support expiring objects and\n cancelling multipart uploads. Expiring of versioned objects,transitions and tag\n filters are not supported.

\n
\n

A lifecycle rule consists of the following:

\n
    \n
  • \n

    A filter identifying a subset of objects to which the rule applies. The\n filter can be based on a key name prefix, object tags, object size, or any\n combination of these.

    \n
  • \n
  • \n

    A status indicating whether the rule is in effect.

    \n
  • \n
  • \n

    One or more lifecycle transition and expiration actions that you want\n Amazon S3 to perform on the objects identified by the filter. If the state of\n your bucket is versioning-enabled or versioning-suspended, you can have many\n versions of the same object (one current version and zero or more noncurrent\n versions). Amazon S3 provides predefined actions that you can specify for current\n and noncurrent object versions.

    \n
  • \n
\n

For more information, see Object Lifecycle\n Management and Lifecycle Configuration\n Elements.

\n
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:PutLifecycleConfiguration\n permission.

    \n

    You can also explicitly deny permissions. An explicit deny also\n supersedes any other permissions. If you want to block users or accounts\n from removing or deleting objects from your bucket, you must deny them\n permissions for the following actions:

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

    \n Directory bucket permissions -\n You must have the s3express:PutLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

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

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n

The following operations are related to\n PutBucketLifecycleConfiguration:

\n \n
\n
", + "smithy.api#examples": [ + { + "title": "Put bucket lifecycle", + "documentation": "The following example replaces existing lifecycle configuration, if any, on the specified bucket. ", + "input": { + "Bucket": "examplebucket", + "LifecycleConfiguration": { + "Rules": [ + { + "Filter": { + "Prefix": "documents/" + }, + "Status": "Enabled", + "Transitions": [ + { + "Days": 365, + "StorageClass": "GLACIER" + } + ], + "Expiration": { + "Days": 3650 + }, + "ID": "TestOnly" + } + ] + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?lifecycle", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketLifecycleConfigurationOutput": { + "type": "structure", + "members": { + "TransitionDefaultMinimumObjectSize": { + "target": "com.amazonaws.s3#TransitionDefaultMinimumObjectSize", + "traits": { + "smithy.api#documentation": "

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not\n transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", + "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutBucketLifecycleConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to set the configuration.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for lifecycle rules. You can add as many as 1,000 rules.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "LifecycleConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

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

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not\n transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", + "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketLogging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketLoggingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n the source bucket. To set the logging status of a bucket, you must be the bucket\n owner.

\n

The bucket owner is automatically granted FULL_CONTROL to all logs. You use the\n 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 setting for S3\n Object Ownership, you can't use the Grantee request element to grant access\n to others. Permissions can only be granted using policies. For more information, see\n Permissions for server access log delivery in the\n Amazon S3 User Guide.

\n
\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights (by\n using request elements) in the following ways:

\n
    \n
  • \n

    By the person's ID:

    \n

    \n <>ID<><>GranteesEmail<>\n \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\n response to a GETObjectAcl request, appears as the\n 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\n elements. To disable logging, you use an empty BucketLoggingStatus request\n element:

\n

\n \n

\n

For more information about server access logging, see Server Access Logging in the\n Amazon S3 User Guide.

\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

The following operations are related to PutBucketLogging:

\n ", + "smithy.api#examples": [ + { + "title": "Set logging configuration for a bucket", + "documentation": "The following example sets logging policy on a bucket. For the Log Delivery group to deliver logs to the destination bucket, it needs permission for the READ_ACP action which the policy grants.", + "input": { + "Bucket": "sourcebucket", + "BucketLoggingStatus": { + "LoggingEnabled": { + "TargetBucket": "targetbucket", + "TargetPrefix": "MyBucketLogs/", + "TargetGrants": [ + { + "Grantee": { + "Type": "Group", + "URI": "http://acs.amazonaws.com/groups/global/AllUsers" + }, + "Permission": "READ" + } + ] + } + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?logging", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketLoggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to set the logging parameters.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "BucketLoggingStatus": { + "target": "com.amazonaws.s3#BucketLoggingStatus", + "traits": { + "smithy.api#documentation": "

Container for logging status information.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "BucketLoggingStatus" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash of the PutBucketLogging request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketMetricsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketMetricsConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets a metrics configuration (specified by the metrics configuration ID) for the bucket.\n You can have up to 1,000 metrics configurations per bucket. If you're updating an existing\n metrics configuration, note that this is a full replacement of the existing metrics\n configuration. If you don't include the elements you want to keep, they are erased.

\n

To use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.

\n

The following operations are related to\n PutBucketMetricsConfiguration:

\n \n

\n PutBucketMetricsConfiguration has the following special error:

\n
    \n
  • \n

    Error code: TooManyConfigurations\n

    \n
      \n
    • \n

      Description: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.

      \n
    • \n
    • \n

      HTTP Status Code: HTTP 400 Bad Request

      \n
    • \n
    \n
  • \n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?metrics", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketMetricsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which the metrics configuration is set.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#MetricsId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "MetricsConfiguration": { + "target": "com.amazonaws.s3#MetricsConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the metrics configuration.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "MetricsConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketNotificationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketNotificationConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Enables notifications of specified events for a bucket. For more information about event\n notifications, see Configuring Event\n Notifications.

\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

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

This action replaces the existing notification configuration with the configuration you\n include in the request body.

\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 Events.

\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\n create per bucket, see Amazon S3 service quotas in Amazon Web Services\n 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 the required s3:PutBucketNotification permission.

\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 the\n configuration to your bucket.

\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

The following action is related to\n PutBucketNotificationConfiguration:

\n ", + "smithy.api#examples": [ + { + "title": "Set notification configuration for a bucket", + "documentation": "The following example sets notification configuration on a bucket to publish the object created events to an SNS topic.", + "input": { + "Bucket": "examplebucket", + "NotificationConfiguration": { + "TopicConfigurations": [ + { + "TopicArn": "arn:aws:sns:us-west-2:123456789012:s3-notification-topic", + "Events": [ + "s3:ObjectCreated:*" + ] + } + ] + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?notification", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketNotificationConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "NotificationConfiguration": { + "target": "com.amazonaws.s3#NotificationConfiguration", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "NotificationConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

Skips validation of Amazon SQS, Amazon SNS, and Lambda\n destinations. True or false value.

", + "smithy.api#httpHeader": "x-amz-skip-destination-validation" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketOwnershipControls": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketOwnershipControlsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n policy.

\n

For information about Amazon S3 Object Ownership, see Using object\n ownership.

\n

The following operations are related to PutBucketOwnershipControls:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?ownershipControls", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketOwnershipControlsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose OwnershipControls you want to set.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash of the OwnershipControls request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "smithy.api#httpHeader": "Content-MD5" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or\n ObjectWriter) that you want to apply to this Amazon S3 bucket.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "OwnershipControls" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketPolicyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n PutBucketPolicy permissions on the specified bucket and belong to\n the bucket owner's account in order to use this operation.

\n

If you don't have PutBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutBucketPolicy permission is required in a policy. For\n more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Example bucket policies
\n
\n

\n General purpose buckets example bucket policies\n - See Bucket policy\n examples in the Amazon S3 User Guide.

\n

\n Directory bucket example bucket policies\n - See Example bucket policies for S3 Express One Zone in the\n Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to PutBucketPolicy:

\n ", + "smithy.api#examples": [ + { + "title": "Set bucket policy", + "documentation": "The following example sets a permission policy on a bucket.", + "input": { + "Bucket": "examplebucket", + "Policy": "{\"Version\": \"2012-10-17\", \"Statement\": [{ \"Sid\": \"id-1\",\"Effect\": \"Allow\",\"Principal\": {\"AWS\": \"arn:aws:iam::123456789012:root\"}, \"Action\": [ \"s3:PutObject\",\"s3:PutObjectAcl\"], \"Resource\": [\"arn:aws:s3:::acl3/*\" ] } ]}" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?policy", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketPolicyRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash of the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, + "ConfirmRemoveSelfBucketAccess": { + "target": "com.amazonaws.s3#ConfirmRemoveSelfBucketAccess", + "traits": { + "smithy.api#documentation": "

Set this parameter to true to confirm that you want to remove your permissions to change\n this bucket policy in the future.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-confirm-remove-self-bucket-access" + } + }, + "Policy": { + "target": "com.amazonaws.s3#Policy", + "traits": { + "smithy.api#documentation": "

The bucket policy as a JSON document.

\n

For directory buckets, the only IAM action supported in the bucket policy is\n s3express:CreateSession.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketReplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketReplicationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Creates a replication configuration or replaces an existing one. For more information,\n see Replication in the Amazon S3 User Guide.

\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. You can invoke this request for a specific Amazon Web Services\n Region by using the \n aws:RequestedRegion\n condition key.

\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

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
Handling Replication of Encrypted Objects
\n
\n

By default, Amazon S3 doesn't replicate objects that are stored at rest using\n server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects,\n add the following: SourceSelectionCriteria,\n SseKmsEncryptedObjects, Status,\n EncryptionConfiguration, and ReplicaKmsKeyID. For\n information about replication configuration, see Replicating\n Objects Created with SSE Using KMS keys.

\n

For information on PutBucketReplication errors, see List of\n replication-related error codes\n

\n
\n
Permissions
\n
\n

To create a PutBucketReplication request, you must have\n s3:PutReplicationConfiguration permissions for the bucket.\n \n

\n

By default, a resource owner, in this case the Amazon Web Services account that created the\n bucket, can perform this operation. The resource owner can also grant others\n permissions to perform the operation. For more information about permissions, see\n Specifying Permissions in\n a Policy and Managing Access\n Permissions to Your Amazon S3 Resources.

\n \n

To perform this operation, the user or role performing the action must have\n the iam:PassRole\n permission.

\n
\n
\n
\n

The following operations are related to PutBucketReplication:

\n ", + "smithy.api#examples": [ + { + "title": "Set replication configuration on a bucket", + "documentation": "The following example sets replication configuration on a bucket.", + "input": { + "Bucket": "examplebucket", + "ReplicationConfiguration": { + "Role": "arn:aws:iam::123456789012:role/examplerole", + "Rules": [ + { + "Prefix": "", + "Status": "Enabled", + "Destination": { + "Bucket": "arn:aws:s3:::destinationbucket", + "StorageClass": "STANDARD" + } + } + ] + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?replication", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketReplicationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "ReplicationConfiguration" + } + }, + "Token": { + "target": "com.amazonaws.s3#ObjectLockToken", + "traits": { + "smithy.api#documentation": "

A token to allow Object Lock to be enabled for an existing bucket.

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

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketRequestPayment": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketRequestPaymentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

The following operations are related to PutBucketRequestPayment:

\n ", + "smithy.api#examples": [ + { + "title": "Set request payment configuration on a bucket.", + "documentation": "The following example sets request payment configuration on a bucket so that person requesting the download is charged.", + "input": { + "Bucket": "examplebucket", + "RequestPaymentConfiguration": { + "Payer": "Requester" + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?requestPayment", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketRequestPaymentRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for Payer.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "RequestPaymentConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketTaggingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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,\n sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost\n of combined resources, organize your billing information according to resources with the\n same 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 and\n Tagging and Using Cost Allocation in Amazon S3\n Bucket Tags.

\n \n

When this operation sets the tags for a bucket, it will overwrite any current tags\n the bucket already has. You cannot use this operation to add tags to an existing list of\n 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\n Access Permissions to Your Amazon S3 Resources.

\n

\n PutBucketTagging has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.

\n
    \n
  • \n

    \n InvalidTag - The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Using\n Cost Allocation in Amazon S3 Bucket Tags.

    \n
  • \n
  • \n

    \n MalformedXML - The XML provided does not match the\n schema.

    \n
  • \n
  • \n

    \n OperationAborted - A conflicting conditional action is\n currently in progress against this resource. Please try again.

    \n
  • \n
  • \n

    \n InternalError - The service was unable to apply the provided\n tag to the bucket.

    \n
  • \n
\n

The following operations are related to PutBucketTagging:

\n ", + "smithy.api#examples": [ + { + "title": "Set tags on a bucket", + "documentation": "The following example sets tags on a bucket. Any existing tags are replaced.", + "input": { + "Bucket": "examplebucket", + "Tagging": { + "TagSet": [ + { + "Key": "Key1", + "Value": "Value1" + }, + { + "Key": "Key2", + "Value": "Value2" + } + ] + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?tagging", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for the TagSet and Tag elements.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "Tagging" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketVersioning": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketVersioningRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n \n

When you enable versioning on a bucket for the first time, it might take a short\n amount of time for the change to be fully propagated. While this change is propagating,\n you might encounter intermittent HTTP 404 NoSuchKey errors for requests to\n objects created or updated after enabling versioning. We recommend that you wait for 15\n minutes after enabling versioning before issuing write operations (PUT or\n DELETE) on objects in the bucket.

\n
\n

Sets the versioning state of an existing bucket.

\n

You can set the versioning state with one of the following values:

\n

\n Enabled\u2014Enables versioning for the objects in the\n bucket. All objects added to the bucket receive a unique version ID.

\n

\n Suspended\u2014Disables versioning for the objects in the\n bucket. All objects added to the bucket receive the version ID null.

\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

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 include the\n x-amz-mfa request header and the Status and the\n MfaDelete request elements in a request to set the versioning state of the\n bucket.

\n \n

If you have an object expiration lifecycle configuration in your non-versioned bucket\n and you want to maintain the same permanent delete behavior when you enable versioning,\n you must add a noncurrent expiration policy. The noncurrent expiration lifecycle\n configuration will manage the deletes of the noncurrent object versions in the\n version-enabled bucket. (A version-enabled bucket maintains one current and zero or more\n noncurrent object versions.) For more information, see Lifecycle and Versioning.

\n
\n

The following operations are related to PutBucketVersioning:

\n ", + "smithy.api#examples": [ + { + "title": "Set versioning configuration on a bucket", + "documentation": "The following example sets versioning configuration on bucket. The configuration enables versioning on the bucket.", + "input": { + "Bucket": "examplebucket", + "VersioningConfiguration": { + "MFADelete": "Disabled", + "Status": "Enabled" + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?versioning", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketVersioningRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

>The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a\n message integrity check to verify that the request body was not corrupted in transit. For\n more information, see RFC\n 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device.

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

Container for setting the versioning state.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "VersioningConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketWebsite": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketWebsiteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

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

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

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.

\n

The maximum request length is limited to 128 KB.

", + "smithy.api#examples": [ + { + "title": "Set website configuration on a bucket", + "documentation": "The following example adds website configuration to a bucket.", + "input": { + "Bucket": "examplebucket", + "ContentMD5": "", + "WebsiteConfiguration": { + "IndexDocument": { + "Suffix": "index.html" + }, + "ErrorDocument": { + "Key": "error.html" + } + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?website", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketWebsiteRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for the request.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "WebsiteConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#EncryptionTypeMismatch" + }, + { + "target": "com.amazonaws.s3#InvalidRequest" + }, + { + "target": "com.amazonaws.s3#InvalidWriteOffset" + }, + { + "target": "com.amazonaws.s3#TooManyParts" + } + ], + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "

Adds an object to a bucket.

\n \n
    \n
  • \n

    Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added\n the entire object to the bucket. You cannot use PutObject to only\n update a single piece of metadata for an existing object. You must put the entire\n object with updated metadata if you want to update some values.

    \n
  • \n
  • \n

    If your bucket uses the bucket owner enforced setting for Object Ownership,\n ACLs are disabled and no longer affect permissions. All objects written to the\n bucket by any account will be owned by the bucket owner.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\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. However, Amazon S3 provides\n features that can modify this behavior:

\n
    \n
  • \n

    \n S3 Object Lock - To prevent objects from\n being deleted or overwritten, you can use Amazon S3 Object\n Lock in the Amazon S3 User Guide.

    \n \n

    This functionality is not supported for directory buckets.

    \n
    \n
  • \n
  • \n

    \n If-None-Match - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a 412 Precondition Failed error. If a conflicting operation occurs during the upload, S3 returns a 409 ConditionalRequestConflict response. On a 409 failure, retry the upload.

    \n

    Expects the * character (asterisk).

    \n

    For more information, see Add preconditions to S3 operations with conditional requests in the Amazon S3 User Guide or RFC 7232.\n

    \n \n

    This functionality is not supported for S3 on Outposts.

    \n
    \n
  • \n
  • \n

    \n S3 Versioning - When you enable versioning\n for a bucket, if Amazon S3 receives multiple write requests for the same object\n simultaneously, it stores all versions of the objects. For each write request that is\n made to the same object, Amazon S3 automatically generates a unique version ID of that\n object being stored in Amazon S3. You can retrieve, replace, or delete any version of the\n object. For more information about versioning, see Adding\n Objects to Versioning-Enabled Buckets in the Amazon S3 User\n Guide. For information about returning the versioning state of a\n bucket, see GetBucketVersioning.

    \n \n

    This functionality is not supported for directory buckets.

    \n
    \n
  • \n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n following permissions are required in your policies when your\n PutObject request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:PutObject\n -\n To successfully complete the PutObject request, you must\n always have the s3:PutObject permission on a bucket to\n add an object to it.

      \n
    • \n
    • \n

      \n \n s3:PutObjectAcl\n - To successfully change the objects ACL of your\n PutObject request, you must have the\n s3:PutObjectAcl.

      \n
    • \n
    • \n

      \n \n s3:PutObjectTagging\n - To successfully set the tag-set with your\n PutObject request, you must have the\n s3:PutObjectTagging.

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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Data integrity with Content-MD5
\n
\n
    \n
  • \n

    \n General purpose bucket - To ensure that\n data is not corrupted traversing the network, use the\n Content-MD5 header. When you use this header, Amazon S3 checks\n the object against the provided MD5 value and, if they do not match, Amazon S3\n returns an error. Alternatively, when the object's ETag is its MD5 digest,\n you can calculate the MD5 while putting the object to Amazon S3 and compare the\n returned ETag to the calculated MD5 value.

    \n
  • \n
  • \n

    \n Directory bucket -\n This functionality is not supported for directory buckets.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

For more information about related Amazon S3 APIs, see the following:

\n ", + "smithy.api#examples": [ + { + "title": "To create an object.", + "documentation": "The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "objectkey" + }, + "output": { + "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + }, + { + "title": "To upload an object (specify optional headers)", + "documentation": "The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.", + "input": { + "Body": "HappyFace.jpg", + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", + "ServerSideEncryption": "AES256", + "StorageClass": "STANDARD_IA" + }, + "output": { + "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "ServerSideEncryption": "AES256" + } + }, + { + "title": "To upload an object", + "documentation": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", + "input": { + "Body": "HappyFace.jpg", + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + }, + { + "title": "To upload an object and specify canned ACL.", + "documentation": "The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "ACL": "authenticated-read", + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "exampleobject" + }, + "output": { + "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + }, + { + "title": "To upload an object and specify optional tags", + "documentation": "The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.", + "input": { + "Body": "c:\\HappyFace.jpg", + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", + "Tagging": "key1=value1&key2=value2" + }, + "output": { + "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + }, + { + "title": "To upload an object and specify server-side encryption and object tags", + "documentation": "The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "exampleobject", + "ServerSideEncryption": "AES256", + "Tagging": "key1=value1&key2=value2" + }, + "output": { + "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "ServerSideEncryption": "AES256" + } + }, + { + "title": "To upload object and specify user-defined metadata", + "documentation": "The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "exampleobject", + "Metadata": { + "metadata1": "value1", + "metadata2": "value2" + } + }, + "output": { + "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?x-id=PutObject", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectAcl": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectAclRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectAclOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchKey" + } + ], + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 the 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 functionality is not supported for Amazon S3 on Outposts.

\n

Depending on your application needs, you can choose to set the ACL on an object 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, you can continue to use that approach.\n For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.

\n
\n
\n
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\n supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has\n a predefined set of grantees and permissions. Specify the canned ACL name as\n the value of x-amz-acl. If you use this header, you cannot use\n other access control-specific headers in your request. For more information,\n see Canned\n 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. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use x-amz-acl header to set a canned ACL.\n These parameters map to the set of permissions that Amazon S3 supports in an ACL.\n 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\n the following:

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    • \n

      \n emailAddress \u2013 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\u00e3o 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\n list 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

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

\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights\n (using 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\n Object 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\u00e3o 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\n the ACL of the current version of an object. To set the ACL of a different\n version, use the versionId subresource.

\n
\n
\n

The following operations are related to PutObjectAcl:

\n ", + "smithy.api#examples": [ + { + "title": "To grant permissions using object ACL", + "documentation": "The following example adds grants to an object ACL. The first permission grants user1 and user2 FULL_CONTROL and the AllUsers group READ permission.", + "input": { + "AccessControlPolicy": {}, + "Bucket": "examplebucket", + "GrantFullControl": "emailaddress=user1@example.com,emailaddress=user2@example.com", + "GrantRead": "uri=http://acs.amazonaws.com/groups/global/AllUsers", + "Key": "HappyFace.jpg" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?acl", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectAclOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectAclRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the object. For more information, see Canned\n ACL.

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

Contains the elements that set the ACL permissions for an object per grantee.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "AccessControlPolicy" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name that contains the object to which you want to attach the ACL.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.>\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWrite": { + "target": "com.amazonaws.s3#GrantWrite", + "traits": { + "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

", + "smithy.api#httpHeader": "x-amz-grant-write" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Key for which the PUT action was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpQuery": "versionId" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectLegalHold": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectLegalHoldRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectLegalHoldOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Applies a legal hold configuration to the specified object. For more information, see\n Locking\n Objects.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?legal-hold", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectLegalHoldOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectLegalHoldRequest": { + "type": "structure", + "members": { + "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

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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#httpLabel": {}, + "smithy.api#required": {} + } + }, + "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#httpPayload": {}, + "smithy.api#xmlName": "LegalHold" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "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#httpQuery": "versionId" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectLockConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectLockConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectLockConfigurationOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

    The DefaultRetention settings require both a mode and a\n period.

    \n
  • \n
  • \n

    The DefaultRetention period can be either Days or\n Years but you must select one. You cannot specify\n Days and Years at the same time.

    \n
  • \n
  • \n

    You can enable Object Lock for new or existing buckets. For more information,\n see Configuring Object\n Lock.

    \n
  • \n
\n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?object-lock", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectLockConfigurationOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectLockConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket whose Object Lock configuration you want to create or replace.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ObjectLockConfiguration": { + "target": "com.amazonaws.s3#ObjectLockConfiguration", + "traits": { + "smithy.api#documentation": "

The Object Lock configuration that you want to apply to the specified bucket.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "ObjectLockConfiguration" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "Token": { + "target": "com.amazonaws.s3#ObjectLockToken", + "traits": { + "smithy.api#documentation": "

A token to allow Object Lock to be enabled for an existing bucket.

", + "smithy.api#httpHeader": "x-amz-bucket-object-lock-token" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectOutput": { + "type": "structure", + "members": { + "Expiration": { + "target": "com.amazonaws.s3#Expiration", + "traits": { + "smithy.api#documentation": "

If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide,\n the response includes this header. It includes the expiry-date and\n rule-id key-value pairs that provide information about object expiration.\n The value of the rule-id is URL-encoded.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

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

Entity tag for the uploaded object.

\n

\n General purpose buckets - To ensure that data is not\n corrupted traversing the network, for objects where the ETag is the MD5 digest of the\n object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned\n ETag to the calculated MD5 value.

\n

\n Directory buckets - The ETag for the object in\n a directory bucket isn't the MD5 digest of the object.

", + "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header\n is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it\n was uploaded without a checksum (and Amazon S3 added the default checksum,\n CRC64NVME, to the uploaded object). For more information about how\n checksums are calculated with multipart uploads, see Checking object integrity\n in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

This header specifies the checksum type of the object, which determines how part-level\n checksums are combined to create an object-level checksum for multipart objects. For\n PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a\n data integrity check to verify that the checksum type that is received is the same checksum\n that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The server-side encryption algorithm used when you store this object in Amazon S3.

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

Version ID of the object.

\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. For more information about versioning, see\n Adding Objects to\n Versioning-Enabled Buckets in the Amazon S3 User Guide. For\n information about returning the versioning state of a bucket, see GetBucketVersioning.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

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

If present, indicates the ID of the KMS key that was used for object encryption.

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

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets\n passed on to Amazon Web Services KMS for future GetObject \n operations on this object.

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

Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

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

\n The size of the object in bytes. This value is only be present if you append to an object.\n

\n \n

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-size" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the object. For more information, see Canned\n ACL in the Amazon S3 User Guide.

\n

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

\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\n canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that\n contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a\n 400 error with the error code AccessControlListNotSupported.\n For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

Object data.

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

The bucket name to which the PUT action was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Can be used to specify caching behavior along the request/reply chain. For more\n information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentLength": { + "target": "com.amazonaws.s3#ContentLength", + "traits": { + "smithy.api#documentation": "

Size of the body in bytes. This parameter is useful when the size of the body cannot be\n determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

", + "smithy.api#httpHeader": "Content-Length" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to\n RFC 1864. This header can be used as a message integrity check to verify that the data is\n the same data that was originally sent. Although it is optional, we recommend using the\n Content-MD5 mechanism as an end-to-end integrity check. For more information about REST\n request authentication, see REST Authentication.

\n \n

The Content-MD5 or x-amz-sdk-checksum-algorithm header is\n required for any request to upload an object with a retention period configured using\n Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the\n Amazon S3 User Guide.

\n
\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "Content-MD5" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the contents. For more information, see\n https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n \n

The Content-MD5 or x-amz-sdk-checksum-algorithm header is\n required for any request to upload an object with a retention period configured using\n Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the\n Amazon S3 User Guide.

\n
\n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

", + "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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "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 SHA1 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 SHA256 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": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable. For more information, see\n https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

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

Uploads the object only if the ETag (entity tag) value provided during the WRITE\n operation matches the ETag of the object in S3. If the ETag values do not match, the\n operation returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

\n

Expects the ETag value as a string.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

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

Uploads the object only if the object key name does not already exist in the bucket\n specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should retry the\n upload.

\n

Expects the '*' (asterisk) character.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

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

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the object data and its metadata.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the object ACL.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the PUT action was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "WriteOffsetBytes": { + "target": "com.amazonaws.s3#WriteOffsetBytes", + "traits": { + "smithy.api#documentation": "

\n Specifies the offset for appending data to existing objects in bytes. \n The offset must be equal to the size of the existing object being appended to. \n If no object exists, setting this header to 0 will create a new object.\n

\n \n

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-write-offset-bytes" + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm that was used when you store this object in Amazon S3\n (for example, AES256, aws:kms, aws:kms:dsse).

\n
    \n
  • \n

    \n General purpose buckets - You have four mutually\n exclusive options to protect data using server-side encryption in Amazon S3, depending on\n how you choose to manage the encryption keys. Specifically, the encryption key\n options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and\n customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by\n using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt\n data at rest by using server-side encryption with other key options. For more\n information, see Using Server-Side\n Encryption in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n
  • \n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

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. For more information, see\n Storage\n Classes in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

    \n
  • \n
  • \n

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "WebsiteRedirectLocation": { + "target": "com.amazonaws.s3#WebsiteRedirectLocation", + "traits": { + "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata. For information about object metadata, see Object Key and Metadata in the\n Amazon S3 User Guide.

\n

In the following example, the request header sets the redirect to an object\n (anotherPage.html) in the same bucket:

\n

\n x-amz-website-redirect-location: /anotherPage.html\n

\n

In the following example, the request header sets the object redirect to another\n website:

\n

\n x-amz-website-redirect-location: http://www.example.com/\n

\n

For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and\n How to\n Configure Website Page Redirects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

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

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same\n account that's issuing the command, you must use the full Key ARN not the Key ID.

\n

\n General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS \n key to use. If you specify\n x-amz-server-side-encryption:aws:kms or\n x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key\n (aws/s3) to protect the data.

\n

\n Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

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

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets passed on\n to Amazon Web Services KMS for future GetObject operations on\n this object.

\n

\n General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

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

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

\n

\n General purpose buckets - Setting this header to\n true causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3\n Bucket Key.

\n

\n Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "Tagging": { + "target": "com.amazonaws.s3#TaggingHeader", + "traits": { + "smithy.api#documentation": "

The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For\n example, \"Key1=Value1\")

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-tagging" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

The Object Lock mode that you want to apply to this object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when you want this object's Object Lock to expire. Must be formatted\n as a timestamp parameter.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether a legal hold will be applied to this object. For more information\n about S3 Object Lock, see Object Lock in the\n Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectRetention": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectRetentionRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectRetentionOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n place an Object Retention configuration on objects. Bypassing a Governance Retention\n configuration requires the s3:BypassGovernanceRetention permission.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?retention", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectRetentionOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectRetentionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name that contains the object you want to apply this Object Retention\n configuration to.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key name for the object that you want to apply this Object Retention configuration\n to.

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

The container element for the Object Retention configuration.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "Retention" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The version ID for the object that you want to apply this Object Retention configuration\n to.

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

Indicates whether this action should bypass Governance-mode restrictions.

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

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectTaggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectTaggingOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets the supplied tag-set to an object that already exists in a bucket. A tag is a\n key-value pair. For more information, see Object Tagging.

\n

You can associate tags with an object by sending a PUT request against the tagging\n subresource that is associated with the object. You can retrieve tags by sending a GET\n request. For more information, see GetObjectTagging.

\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

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

To put tags of any other version, use the versionId query parameter. You\n also need permission for the s3:PutObjectVersionTagging action.

\n

\n PutObjectTagging has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.

\n
    \n
  • \n

    \n InvalidTag - The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Object\n Tagging.

    \n
  • \n
  • \n

    \n MalformedXML - The XML provided does not match the\n schema.

    \n
  • \n
  • \n

    \n OperationAborted - A conflicting conditional action is\n currently in progress against this resource. Please try again.

    \n
  • \n
  • \n

    \n InternalError - The service was unable to apply the provided\n tag to the object.

    \n
  • \n
\n

The following operations are related to PutObjectTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To add tags to an existing object", + "documentation": "The following example adds tags to an existing object.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", + "Tagging": { + "TagSet": [ + { + "Key": "Key3", + "Value": "Value3" + }, + { + "Key": "Key4", + "Value": "Value4" + } + ] + } + }, + "output": { + "VersionId": "null" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?tagging", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectTaggingOutput": { + "type": "structure", + "members": { + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object the tag-set was added to.

", + "smithy.api#httpHeader": "x-amz-version-id" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

Name of the object key.

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

The versionId of the object that the tag-set will be added to.

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

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for the TagSet and Tag elements

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "Tagging" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutPublicAccessBlock": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutPublicAccessBlockRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".

\n

The following operations are related to PutPublicAccessBlock:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?publicAccessBlock", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutPublicAccessBlockRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want\n to set.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash of the PutPublicAccessBlock request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

The PublicAccessBlock configuration that you want to apply to this Amazon S3\n bucket. You can enable the configuration options in any combination. For more information\n about when Amazon S3 considers a bucket or object public, see The Meaning of \"Public\" in the Amazon S3 User Guide.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "PublicAccessBlockConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#QueueArn": { + "type": "string" + }, + "com.amazonaws.s3#QueueConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#NotificationId" + }, + "QueueArn": { + "target": "com.amazonaws.s3#QueueArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message\n when it detects events of the specified type.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "Queue" + } + }, + "Events": { + "target": "com.amazonaws.s3#EventList", + "traits": { + "smithy.api#documentation": "

A collection of bucket events for which to send notifications

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Event" + } + }, + "Filter": { + "target": "com.amazonaws.s3#NotificationConfigurationFilter" + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the configuration for publishing messages to an Amazon Simple Queue Service\n (Amazon SQS) queue when Amazon S3 detects specified events.

" + } + }, + "com.amazonaws.s3#QueueConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#QueueConfiguration" + } + }, + "com.amazonaws.s3#Quiet": { + "type": "boolean" + }, + "com.amazonaws.s3#QuoteCharacter": { + "type": "string" + }, + "com.amazonaws.s3#QuoteEscapeCharacter": { + "type": "string" + }, + "com.amazonaws.s3#QuoteFields": { + "type": "enum", + "members": { + "ALWAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALWAYS" + } + }, + "ASNEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASNEEDED" + } + } + } + }, + "com.amazonaws.s3#Range": { + "type": "string" + }, + "com.amazonaws.s3#RecordDelimiter": { + "type": "string" + }, + "com.amazonaws.s3#RecordsEvent": { + "type": "structure", + "members": { + "Payload": { + "target": "com.amazonaws.s3#Body", + "traits": { + "smithy.api#documentation": "

The byte array of partial, one or more result records. S3 Select doesn't guarantee that\n a record will be self-contained in one record frame. To ensure continuous streaming of\n data, S3 Select might split the same record across multiple record frames instead of\n aggregating the results in memory. Some S3 clients (for example, the SDKforJava) handle this behavior by creating a ByteStream out of the response by\n default. Other clients might not handle this behavior by default. In those cases, you must\n aggregate the results on the client side and parse the response.

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

The container for the records event.

" + } + }, + "com.amazonaws.s3#Redirect": { + "type": "structure", + "members": { + "HostName": { + "target": "com.amazonaws.s3#HostName", + "traits": { + "smithy.api#documentation": "

The host name to use in the redirect request.

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

The HTTP redirect code to use on the response. Not required if one of the siblings is\n present.

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

Protocol to use when redirecting requests. The default is the protocol that is used in\n the original request.

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

The object key prefix to use in the redirect request. For example, to redirect requests\n for all pages with prefix docs/ (objects in the docs/ folder) to\n documents/, you can set a condition block with KeyPrefixEquals\n set to docs/ and in the Redirect set ReplaceKeyPrefixWith to\n /documents. Not required if one of the siblings is present. Can be present\n only if ReplaceKeyWith is not provided.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

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

The specific object key to use in the redirect request. For example, redirect request to\n error.html. Not required if one of the siblings is present. Can be present\n only if ReplaceKeyPrefixWith is not provided.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

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

Specifies how requests are redirected. In the event of an error, you can specify a\n different error code to return.

" + } + }, + "com.amazonaws.s3#RedirectAllRequestsTo": { + "type": "structure", + "members": { + "HostName": { + "target": "com.amazonaws.s3#HostName", + "traits": { + "smithy.api#documentation": "

Name of the host where requests are redirected.

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

Protocol to use when redirecting requests. The default is the protocol that is used in\n the original request.

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

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3\n bucket.

" + } + }, + "com.amazonaws.s3#Region": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 20 + } + } + }, + "com.amazonaws.s3#ReplaceKeyPrefixWith": { + "type": "string" + }, + "com.amazonaws.s3#ReplaceKeyWith": { + "type": "string" + }, + "com.amazonaws.s3#ReplicaKmsKeyID": { + "type": "string" + }, + "com.amazonaws.s3#ReplicaModifications": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#ReplicaModificationsStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 replicates modifications on replicas.

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

A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't\n replicate replica modifications by default. In the latest version of replication\n configuration (when Filter is specified), you can specify this element and set\n the status to Enabled to replicate modifications on replicas.

\n \n

If you don't specify the Filter element, Amazon S3 assumes that the\n replication configuration is the earlier version, V1. In the earlier version, this\n element is not allowed.

\n
" + } + }, + "com.amazonaws.s3#ReplicaModificationsStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#ReplicationConfiguration": { + "type": "structure", + "members": { + "Role": { + "target": "com.amazonaws.s3#Role", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when\n replicating objects. For more information, see How to Set Up Replication\n in the Amazon S3 User Guide.

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

A container for one or more replication rules. A replication configuration must have at\n least one rule and can contain a maximum of 1,000 rules.

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

A container for replication rules. You can add up to 1,000 rules. The maximum size of a\n replication configuration is 2 MB.

" + } + }, + "com.amazonaws.s3#ReplicationRule": { + "type": "structure", + "members": { + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

A unique identifier for the rule. The maximum value is 255 characters.

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

The priority indicates which rule has precedence whenever two or more replication rules\n conflict. Amazon S3 will attempt to replicate objects according to all replication rules.\n However, if there are two or more rules with the same destination bucket, then objects will\n be replicated according to the rule with the highest priority. The higher the number, the\n higher the priority.

\n

For more information, see Replication in the\n Amazon S3 User Guide.

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

An object key name prefix that identifies the object or objects to which the rule\n applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket,\n specify an empty string.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "Filter": { + "target": "com.amazonaws.s3#ReplicationRuleFilter" + }, + "Status": { + "target": "com.amazonaws.s3#ReplicationRuleStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether the rule is enabled.

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

A container that describes additional filters for identifying the source objects that\n you want to replicate. You can choose to enable or disable the replication of these\n objects. Currently, Amazon S3 supports only the filter that you can specify for objects created\n with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service\n (SSE-KMS).

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

Optional configuration to replicate existing source bucket objects.

\n \n

This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the\n Amazon S3 User Guide.

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

A container for information about the replication destination and its configurations\n including enabling the S3 Replication Time Control (S3 RTC).

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

Specifies which Amazon S3 objects to replicate and where to store the replicas.

" + } + }, + "com.amazonaws.s3#ReplicationRuleAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

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

An array of tags containing key and value pairs.

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

A container for specifying rule filters. The filters determine the subset of objects to\n which the rule applies. This element is required only if you specify more than one filter.

\n

For example:

\n
    \n
  • \n

    If you specify both a Prefix and a Tag filter, wrap\n these filters in an And tag.

    \n
  • \n
  • \n

    If you specify a filter based on multiple tags, wrap the Tag elements\n in an And tag.

    \n
  • \n
" + } + }, + "com.amazonaws.s3#ReplicationRuleFilter": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

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

A container for specifying a tag key and value.

\n

The rule applies only to objects that have the tag in their tag set.

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

A container for specifying rule filters. The filters determine the subset of objects to\n which the rule applies. This element is required only if you specify more than one filter.\n For example:

\n
    \n
  • \n

    If you specify both a Prefix and a Tag filter, wrap\n these filters in an And tag.

    \n
  • \n
  • \n

    If you specify a filter based on multiple tags, wrap the Tag elements\n in an And tag.

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

A filter that identifies the subset of objects to which the replication rule applies. A\n Filter must specify exactly one Prefix, Tag, or\n an And child element.

" + } + }, + "com.amazonaws.s3#ReplicationRuleStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#ReplicationRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ReplicationRule" + } + }, + "com.amazonaws.s3#ReplicationStatus": { + "type": "enum", + "members": { + "COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETE" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "REPLICA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLICA" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } + } + }, + "com.amazonaws.s3#ReplicationTime": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#ReplicationTimeStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether the replication time is enabled.

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

A container specifying the time by which replication should be complete for all objects\n and operations on objects.

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

A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is\n enabled and the time when all objects and operations on objects must be replicated. Must be\n specified together with a Metrics block.

" + } + }, + "com.amazonaws.s3#ReplicationTimeStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#ReplicationTimeValue": { + "type": "structure", + "members": { + "Minutes": { + "target": "com.amazonaws.s3#Minutes", + "traits": { + "smithy.api#documentation": "

Contains an integer specifying time in minutes.

\n

Valid value: 15

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

A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics\n EventThreshold.

" + } + }, + "com.amazonaws.s3#RequestCharged": { + "type": "enum", + "members": { + "requester": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requester" + } + } + }, + "traits": { + "smithy.api#documentation": "

If present, indicates that the requester was successfully charged for the\n request.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "com.amazonaws.s3#RequestPayer": { + "type": "enum", + "members": { + "requester": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requester" + } + } + }, + "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. If either the source or\n destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding\n charges to copy the object. For information about downloading objects from Requester Pays\n buckets, see Downloading Objects in\n Requester Pays Buckets in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "com.amazonaws.s3#RequestPaymentConfiguration": { + "type": "structure", + "members": { + "Payer": { + "target": "com.amazonaws.s3#Payer", + "traits": { + "smithy.api#documentation": "

Specifies who pays for the download and request fees.

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

Container for Payer.

" + } + }, + "com.amazonaws.s3#RequestProgress": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.s3#EnableRequestProgress", + "traits": { + "smithy.api#documentation": "

Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE,\n FALSE. Default value: FALSE.

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

Container for specifying if periodic QueryProgress messages should be\n sent.

" + } + }, + "com.amazonaws.s3#RequestRoute": { + "type": "string" + }, + "com.amazonaws.s3#RequestToken": { + "type": "string" + }, + "com.amazonaws.s3#ResponseCacheControl": { + "type": "string" + }, + "com.amazonaws.s3#ResponseContentDisposition": { + "type": "string" + }, + "com.amazonaws.s3#ResponseContentEncoding": { + "type": "string" + }, + "com.amazonaws.s3#ResponseContentLanguage": { + "type": "string" + }, + "com.amazonaws.s3#ResponseContentType": { + "type": "string" + }, + "com.amazonaws.s3#ResponseExpires": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "com.amazonaws.s3#Restore": { + "type": "string" + }, + "com.amazonaws.s3#RestoreExpiryDate": { + "type": "timestamp" + }, + "com.amazonaws.s3#RestoreObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#RestoreObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#RestoreObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#ObjectAlreadyInActiveTierError" + } + ], + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Restores an archived copy of an object back into Amazon S3

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

This action performs the following types of requests:

\n
    \n
  • \n

    \n restore an archive - Restore an archived object

    \n
  • \n
\n

For more information about the S3 structure in the request body, see the\n following:

\n \n
\n
Permissions
\n
\n

To use this operation, you must have permissions to perform the\n s3:RestoreObject action. The bucket owner has this permission by\n default and can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

\n
\n
Restoring objects
\n
\n

Objects that you archive to the S3 Glacier Flexible Retrieval or 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 the\n S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive\n storage classes, you must first initiate a restore request, and then wait until a\n temporary copy of the object is available. If you want a permanent copy of the\n object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket.\n To access an archived object, you must restore the object for the duration (number\n of days) that you specify. For objects in the Archive Access or Deep Archive\n Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request,\n and then wait until the object is moved into the Frequent Access tier.

\n

To restore a specific object version, you can provide a version ID. If you\n don't provide a version ID, Amazon S3 restores the current version.

\n

When restoring an archived object, you can specify one of the following data\n access tier options in the Tier element of the request body:

\n
    \n
  • \n

    \n Expedited - Expedited retrievals allow you to quickly access\n your data stored in the S3 Glacier Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests\n for restoring archives are required. For all but the largest archived\n objects (250 MB+), data accessed using Expedited retrievals is typically\n made available within 1\u20135 minutes. Provisioned capacity ensures that\n retrieval capacity for Expedited retrievals is available when you need it.\n Expedited retrievals and provisioned capacity are not available for objects\n stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.

    \n
  • \n
  • \n

    \n Standard - Standard retrievals allow you to access any of\n your archived objects within several hours. This is the default option for\n retrieval requests that do not specify the retrieval option. Standard\n retrievals typically finish within 3\u20135 hours for objects stored in the\n S3 Glacier Flexible Retrieval storage class or\n 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\n in S3 Intelligent-Tiering.

    \n
  • \n
  • \n

    \n Bulk - Bulk retrievals free for objects stored in the\n S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes,\n enabling you to retrieve large amounts, even petabytes, of data at no cost.\n Bulk retrievals typically finish within 5\u201312 hours for objects stored in the\n S3 Glacier Flexible Retrieval storage class or\n S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost\n retrieval option when restoring objects from\n S3 Glacier Deep Archive. They typically finish within 48 hours for\n objects stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.

    \n
  • \n
\n

For more information about archive retrieval options and provisioned capacity\n for Expedited data access, see Restoring Archived\n Objects in the Amazon S3 User Guide.

\n

You can use Amazon S3 restore speed upgrade to change the restore speed to a faster\n speed while it is in progress. For more information, see 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\n request. Operations return the x-amz-restore header, which provides\n information about the restoration status, in the response. You can use Amazon S3 event\n notifications to notify you when a restore is initiated or completed. For more\n information, see Configuring Amazon S3 Event\n Notifications in the Amazon S3 User Guide.

\n

After restoring an archived object, you can update the restoration period by\n reissuing the request with a new period. Amazon S3 updates the restoration period\n relative to the current time and charges only for the request-there are no\n data transfer charges. You cannot update the restoration period when Amazon S3 is\n actively processing your current restore request for the object.

\n

If your bucket has a lifecycle configuration with a rule that includes an\n expiration action, the object expiration overrides the life span that you specify\n in a restore request. For example, if you restore an object copy for 10 days, but\n the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days.\n For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle\n Management in 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\n the response.

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

    Special errors:

    \n
      \n
    • \n

      \n Code: RestoreAlreadyInProgress\n

      \n
    • \n
    • \n

      \n Cause: Object restore is already in progress.\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.\n Try again later. (Returned if there is insufficient capacity to\n process the Expedited request. This error applies only to Expedited\n retrievals and not to 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

The following operations are related to RestoreObject:

\n ", + "smithy.api#examples": [ + { + "title": "To restore an archived object", + "documentation": "The following example restores for one day an archived copy of an object back into Amazon S3 bucket.", + "input": { + "Bucket": "examplebucket", + "Key": "archivedobjectkey", + "RestoreRequest": { + "Days": 1, + "GlacierJobParameters": { + "Tier": "Expedited" + } + } + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}/{Key+}?restore", + "code": 200 + } + } + }, + "com.amazonaws.s3#RestoreObjectOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + }, + "RestoreOutputPath": { + "target": "com.amazonaws.s3#RestoreOutputPath", + "traits": { + "smithy.api#documentation": "

Indicates the path in the provided S3 output location where Select results will be\n restored to.

", + "smithy.api#httpHeader": "x-amz-restore-output-path" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#RestoreObjectRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object to restore.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

Object key for which the action was initiated.

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

VersionId used to reference a specific version of the object.

", + "smithy.api#httpQuery": "versionId" + } + }, + "RestoreRequest": { + "target": "com.amazonaws.s3#RestoreRequest", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "RestoreRequest" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#RestoreOutputPath": { + "type": "string" + }, + "com.amazonaws.s3#RestoreRequest": { + "type": "structure", + "members": { + "Days": { + "target": "com.amazonaws.s3#Days", + "traits": { + "smithy.api#documentation": "

Lifetime of the active copy in days. Do not use with restores that specify\n OutputLocation.

\n

The Days element is required for regular restores, and must not be provided for select\n requests.

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

S3 Glacier related parameters pertaining to this job. Do not use with restores that\n specify OutputLocation.

" + } + }, + "Type": { + "target": "com.amazonaws.s3#RestoreRequestType", + "traits": { + "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Type of restore request.

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

Retrieval tier at which the restore will be processed.

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

The optional description for the job.

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

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Describes the parameters for Select job types.

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

Describes the location where the restore job's output is stored.

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

Container for restore job parameters.

" + } + }, + "com.amazonaws.s3#RestoreRequestType": { + "type": "enum", + "members": { + "SELECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SELECT" + } + } + } + }, + "com.amazonaws.s3#RestoreStatus": { + "type": "structure", + "members": { + "IsRestoreInProgress": { + "target": "com.amazonaws.s3#IsRestoreInProgress", + "traits": { + "smithy.api#documentation": "

Specifies whether the object is currently being restored. If the object restoration is\n in progress, the header returns the value TRUE. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"true\"\n

\n

If the object restoration has completed, the header returns the value\n FALSE. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"false\",\n RestoreExpiryDate=\"2012-12-21T00:00:00.000Z\"\n

\n

If the object hasn't been restored, there is no header response.

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

Indicates when the restored copy will expire. This value is populated only if the object\n has already been restored. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"false\",\n RestoreExpiryDate=\"2012-12-21T00:00:00.000Z\"\n

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

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" + } + }, + "com.amazonaws.s3#Role": { + "type": "string" + }, + "com.amazonaws.s3#RoutingRule": { + "type": "structure", + "members": { + "Condition": { + "target": "com.amazonaws.s3#Condition", + "traits": { + "smithy.api#documentation": "

A container for describing a condition that must be met for the specified redirect to\n apply. For example, 1. If request is for pages in the /docs folder, redirect\n to the /documents folder. 2. If request results in HTTP error 4xx, redirect\n request to another host where you might process the error.

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

Container for redirect information. You can redirect requests to another host, to\n another page, or with another protocol. In the event of an error, you can specify a\n different error code to return.

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

Specifies the redirect behavior and when a redirect is applied. For more information\n about routing rules, see Configuring advanced conditional redirects in the\n Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#RoutingRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#RoutingRule", + "traits": { + "smithy.api#xmlName": "RoutingRule" + } + } + }, + "com.amazonaws.s3#S3KeyFilter": { + "type": "structure", + "members": { + "FilterRules": { + "target": "com.amazonaws.s3#FilterRuleList", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "FilterRule" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for object key name prefix and suffix filtering rules.

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

The name of the bucket where the restore results will be placed.

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

The prefix that is prepended to the restore results for this request.

", + "smithy.api#required": {} + } + }, + "Encryption": { + "target": "com.amazonaws.s3#Encryption" + }, + "CannedACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the restore results.

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

A list of grants that control access to the staged results.

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

The tag-set that is applied to the restore results.

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

A list of metadata to store with the restore results in S3.

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

The class of storage used to store the restore results.

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

Describes an Amazon S3 location that will receive the results of the restore request.

" + } + }, + "com.amazonaws.s3#S3TablesArn": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesBucketArn": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesDestination": { + "type": "structure", + "members": { + "TableBucketArn": { + "target": "com.amazonaws.s3#S3TablesBucketArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the table bucket that's specified as the \n destination in the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket.\n

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

\n The name for the metadata table in your metadata table configuration. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

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

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket. \n

" + } + }, + "com.amazonaws.s3#S3TablesDestinationResult": { + "type": "structure", + "members": { + "TableBucketArn": { + "target": "com.amazonaws.s3#S3TablesBucketArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the table bucket that's specified as the \n destination in the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket.\n

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

\n The name for the metadata table in your metadata table configuration. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

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

\n The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The \n specified metadata table name must be unique within the aws_s3_metadata namespace \n in the destination table bucket.\n

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

\n The table bucket namespace for the metadata table in your metadata table configuration. This value \n is always aws_s3_metadata.\n

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

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

" + } + }, + "com.amazonaws.s3#S3TablesName": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesNamespace": { + "type": "string" + }, + "com.amazonaws.s3#SSECustomerAlgorithm": { + "type": "string" + }, + "com.amazonaws.s3#SSECustomerKey": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#SSECustomerKeyMD5": { + "type": "string" + }, + "com.amazonaws.s3#SSEKMS": { + "type": "structure", + "members": { + "KeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for\n encrypting inventory reports.

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

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

", + "smithy.api#xmlName": "SSE-KMS" + } + }, + "com.amazonaws.s3#SSEKMSEncryptionContext": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#SSEKMSKeyId": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#SSES3": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

", + "smithy.api#xmlName": "SSE-S3" + } + }, + "com.amazonaws.s3#ScanRange": { + "type": "structure", + "members": { + "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\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": { + "target": "com.amazonaws.s3#End", + "traits": { + "smithy.api#documentation": "

Specifies the end of the byte range. This parameter is optional. Valid values:\n non-negative integers. The default value is one less than the size of the object being\n queried. If only the End parameter is supplied, it is interpreted to mean scan the last N\n bytes of the file. For example,\n 50 means scan the\n last 50 bytes.

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

Specifies the byte range of the object to get the records from. A record is processed\n when its first byte is contained by the range. This parameter is optional, but when\n specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the\n start and end of the range.

" + } + }, + "com.amazonaws.s3#SelectObjectContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#SelectObjectContentRequest" + }, + "output": { + "target": "com.amazonaws.s3#SelectObjectContentOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This action filters the contents of an Amazon S3 object based on a simple structured query\n language (SQL) statement. In the request, along with the SQL expression, you must also\n specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses\n this format to parse object data into records, and returns only records that match the\n specified SQL expression. You must also specify the data serialization format for the\n response.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

For more information about Amazon S3 Select, see Selecting Content from\n Objects and SELECT\n Command in the Amazon S3 User Guide.

\n

\n
\n
Permissions
\n
\n

You must have the s3:GetObject permission for this operation.\u00a0Amazon S3\n Select does not support anonymous access. For more information about permissions,\n see Specifying Permissions in\n a Policy in the Amazon S3 User Guide.

\n
\n
Object Data Formats
\n
\n

You can use Amazon S3 Select to query objects that have the following format\n properties:

\n
    \n
  • \n

    \n CSV, JSON, and Parquet - Objects must be in CSV,\n JSON, or Parquet format.

    \n
  • \n
  • \n

    \n UTF-8 - UTF-8 is the only encoding type Amazon S3 Select\n supports.

    \n
  • \n
  • \n

    \n GZIP or BZIP2 - CSV and JSON files can be compressed\n using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that\n Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar\n compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support\n whole-object compression for Parquet objects.

    \n
  • \n
  • \n

    \n Server-side encryption - Amazon S3 Select supports\n querying objects that are protected with server-side encryption.

    \n

    For objects that are encrypted with customer-provided encryption keys\n (SSE-C), you must use HTTPS, and you must use the headers that are\n documented in the GetObject. For more\n information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys)\n in the Amazon S3 User Guide.

    \n

    For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and\n Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently,\n so you don't need to specify anything. For more information about\n server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
Working with the Response Body
\n
\n

Given the response size is unknown, Amazon S3 Select streams the response as a\n series of messages and includes a Transfer-Encoding header with\n chunked as its value in the response. For more information, see\n Appendix:\n SelectObjectContent\n Response.

\n
\n
GetObject Support
\n
\n

The SelectObjectContent action does not support the following\n GetObject functionality. For more information, see GetObject.

\n
    \n
  • \n

    \n Range: Although you can specify a scan range for an Amazon S3 Select\n request (see SelectObjectContentRequest - ScanRange in the request\n parameters), you cannot specify the range of bytes of an object to return.\n

    \n
  • \n
  • \n

    The GLACIER, DEEP_ARCHIVE, and\n REDUCED_REDUNDANCY storage classes, or the\n ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access\n tiers of the INTELLIGENT_TIERING storage class: You cannot\n query objects in the GLACIER, DEEP_ARCHIVE, or\n REDUCED_REDUNDANCY storage classes, nor objects in the\n ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access\n tiers of the INTELLIGENT_TIERING storage class. For more\n information about storage classes, see Using Amazon S3\n storage classes in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
Special Errors
\n
\n

For a list of special errors for this operation, see List of SELECT Object Content Error Codes\n

\n
\n
\n

The following operations are related to SelectObjectContent:

\n ", + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}/{Key+}?select&select-type=2", + "code": 200 + } + } + }, + "com.amazonaws.s3#SelectObjectContentEventStream": { + "type": "union", + "members": { + "Records": { + "target": "com.amazonaws.s3#RecordsEvent", + "traits": { + "smithy.api#documentation": "

The Records Event.

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

The Stats Event.

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

The Progress Event.

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

The Continuation Event.

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

The End Event.

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

The container for selecting objects from a content event stream.

", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.s3#SelectObjectContentOutput": { + "type": "structure", + "members": { + "Payload": { + "target": "com.amazonaws.s3#SelectObjectContentEventStream", + "traits": { + "smithy.api#documentation": "

The array of results.

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

The S3 bucket.

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

The object key.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "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" + } + }, + "Expression": { + "target": "com.amazonaws.s3#Expression", + "traits": { + "smithy.api#documentation": "

The expression that is used to query the object.

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

The type of the provided expression (for example, SQL).

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

Specifies if periodic request progress information should be enabled.

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

Describes the format of the data in the object that is being queried.

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

Describes the format of the data that you want Amazon S3 to return in response.

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

Specifies the byte range of the object to get the records from. A record is processed\n when its first byte is contained by the range. This parameter is optional, but when\n specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the\n start and end of the range.

\n

\n ScanRangemay be used in the following ways:

\n
    \n
  • \n

    \n 50100\n - process only the records starting between the bytes 50 and 100 (inclusive, counting\n from zero)

    \n
  • \n
  • \n

    \n 50 -\n process only the records starting after the byte 50

    \n
  • \n
  • \n

    \n 50 -\n process only the records within the last 50 bytes of the file.

    \n
  • \n
" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#documentation": "\n

Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Request to filter the contents of an Amazon S3 object based on a simple Structured Query\n Language (SQL) statement. In the request, along with the SQL expression, you must specify a\n data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data\n into records. It returns only records that match the specified SQL expression. You must\n also specify the data serialization format for the response. For more information, see\n S3Select API Documentation.

", + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#SelectParameters": { + "type": "structure", + "members": { + "InputSerialization": { + "target": "com.amazonaws.s3#InputSerialization", + "traits": { + "smithy.api#documentation": "

Describes the serialization format of the object.

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

The type of the provided expression (for example, SQL).

", + "smithy.api#required": {} + } + }, + "Expression": { + "target": "com.amazonaws.s3#Expression", + "traits": { + "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

The expression that is used to query the object.

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

Describes how the results of the Select job are serialized.

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

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Describes the parameters for Select job types.

\n

Learn How to optimize querying your data in Amazon S3 using\n Amazon Athena, S3 Object Lambda, or client-side filtering.

" + } + }, + "com.amazonaws.s3#ServerSideEncryption": { + "type": "enum", + "members": { + "AES256": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AES256" + } + }, + "aws_kms": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aws:kms" + } + }, + "aws_kms_dsse": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aws:kms:dsse" + } + } + } + }, + "com.amazonaws.s3#ServerSideEncryptionByDefault": { + "type": "structure", + "members": { + "SSEAlgorithm": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

Server-side encryption algorithm to use for the default encryption.

\n \n

For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

\n
", + "smithy.api#required": {} + } + }, + "KMSMasterKeyID": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default\n encryption.

\n \n
    \n
  • \n

    \n General purpose buckets - This parameter is\n allowed if and only if SSEAlgorithm is set to aws:kms or\n aws:kms:dsse.

    \n
  • \n
  • \n

    \n Directory buckets - This parameter is\n allowed if and only if SSEAlgorithm is set to\n aws:kms.

    \n
  • \n
\n
\n

You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS\n key.

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN:\n arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key Alias: alias/alias-name\n

    \n
  • \n
\n

If you are using encryption with cross-account or Amazon Web Services service operations, you must use\n a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

\n \n
    \n
  • \n

    \n General purpose buckets - If you're specifying\n a customer managed KMS key, we recommend using a fully qualified KMS key ARN.\n If you use a KMS key alias instead, then KMS resolves the key within the\n requester\u2019s account. This behavior can result in data that's encrypted with a\n KMS key that belongs to the requester, and not the bucket owner. Also, if you\n use a key ID, you can run into a LogDestination undeliverable error when creating\n a VPC flow log.

    \n
  • \n
  • \n

    \n Directory buckets -\n When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

    \n
  • \n
\n
\n \n

Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service\n Developer Guide.

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

Describes the default server-side encryption to apply to new objects in the bucket. If a\n PUT Object request doesn't specify any server-side encryption, this default encryption will\n be applied. For more information, see PutBucketEncryption.

\n \n
    \n
  • \n

    \n General purpose buckets - If you don't specify\n a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key\n (aws/s3) in your Amazon Web Services account the first time that you add an\n object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key\n for SSE-KMS.

    \n
  • \n
  • \n

    \n Directory buckets -\n Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

    \n
  • \n
\n
" + } + }, + "com.amazonaws.s3#ServerSideEncryptionConfiguration": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.s3#ServerSideEncryptionRules", + "traits": { + "smithy.api#documentation": "

Container for information about a particular server-side encryption configuration\n rule.

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

Specifies the default server-side-encryption configuration.

" + } + }, + "com.amazonaws.s3#ServerSideEncryptionRule": { + "type": "structure", + "members": { + "ApplyServerSideEncryptionByDefault": { + "target": "com.amazonaws.s3#ServerSideEncryptionByDefault", + "traits": { + "smithy.api#documentation": "

Specifies the default server-side encryption to apply to new objects in the bucket. If a\n PUT Object request doesn't specify any server-side encryption, this default encryption will\n be applied.

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

Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS\n (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the\n BucketKeyEnabled element to true causes Amazon S3 to use an S3\n Bucket Key.

\n \n
    \n
  • \n

    \n General purpose buckets - By default, S3\n Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

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

Specifies the default server-side encryption configuration.

\n \n
    \n
  • \n

    \n General purpose buckets - If you're specifying\n a customer managed KMS key, we recommend using a fully qualified KMS key ARN.\n If you use a KMS key alias instead, then KMS resolves the key within the\n requester\u2019s account. This behavior can result in data that's encrypted with a\n KMS key that belongs to the requester, and not the bucket owner.

    \n
  • \n
  • \n

    \n Directory buckets -\n When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

    \n
  • \n
\n
" + } + }, + "com.amazonaws.s3#ServerSideEncryptionRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ServerSideEncryptionRule" + } + }, + "com.amazonaws.s3#SessionCredentialValue": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#SessionCredentials": { + "type": "structure", + "members": { + "AccessKeyId": { + "target": "com.amazonaws.s3#AccessKeyIdValue", + "traits": { + "smithy.api#documentation": "

A unique identifier that's associated with a secret access key. The access key ID and\n the secret access key are used together to sign programmatic Amazon Web Services requests\n cryptographically.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "AccessKeyId" + } + }, + "SecretAccessKey": { + "target": "com.amazonaws.s3#SessionCredentialValue", + "traits": { + "smithy.api#documentation": "

A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services\n requests. Signing a request identifies the sender and prevents the request from being\n altered.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "SecretAccessKey" + } + }, + "SessionToken": { + "target": "com.amazonaws.s3#SessionCredentialValue", + "traits": { + "smithy.api#documentation": "

A part of the temporary security credentials. The session token is used to validate the\n temporary security credentials.\n \n

", + "smithy.api#required": {}, + "smithy.api#xmlName": "SessionToken" + } + }, + "Expiration": { + "target": "com.amazonaws.s3#SessionExpiration", + "traits": { + "smithy.api#documentation": "

Temporary security credentials expire after a specified interval. After temporary\n credentials expire, any calls that you make with those credentials will fail. So you must\n generate a new set of temporary credentials. Temporary credentials cannot be extended or\n refreshed beyond the original specified interval.

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

The established temporary security credentials of the session.

\n \n

\n Directory buckets - These session\n credentials are only supported for the authentication and authorization of Zonal endpoint API operations\n on directory buckets.

\n
" + } + }, + "com.amazonaws.s3#SessionExpiration": { + "type": "timestamp" + }, + "com.amazonaws.s3#SessionMode": { + "type": "enum", + "members": { + "ReadOnly": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReadOnly" + } + }, + "ReadWrite": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReadWrite" + } + } + } + }, + "com.amazonaws.s3#Setting": { + "type": "boolean" + }, + "com.amazonaws.s3#SimplePrefix": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

To use simple format for S3 keys for log objects, set SimplePrefix to an empty\n object.

\n

\n [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]\n

", + "smithy.api#xmlName": "SimplePrefix" + } + }, + "com.amazonaws.s3#Size": { + "type": "long" + }, + "com.amazonaws.s3#SkipValidation": { + "type": "boolean" + }, + "com.amazonaws.s3#SourceSelectionCriteria": { + "type": "structure", + "members": { + "SseKmsEncryptedObjects": { + "target": "com.amazonaws.s3#SseKmsEncryptedObjects", + "traits": { + "smithy.api#documentation": "

A container for filter information for the selection of Amazon S3 objects encrypted with\n Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication\n configuration, this element is required.

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

A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't\n replicate replica modifications by default. In the latest version of replication\n configuration (when Filter is specified), you can specify this element and set\n the status to Enabled to replicate modifications on replicas.

\n \n

If you don't specify the Filter element, Amazon S3 assumes that the\n replication configuration is the earlier version, V1. In the earlier version, this\n element is not allowed

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

A container that describes additional filters for identifying the source objects that\n you want to replicate. You can choose to enable or disable the replication of these\n objects. Currently, Amazon S3 supports only the filter that you can specify for objects created\n with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service\n (SSE-KMS).

" + } + }, + "com.amazonaws.s3#SseKmsEncryptedObjects": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#SseKmsEncryptedObjectsStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 replicates objects created with server-side encryption using an\n Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

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

A container for filter information for the selection of S3 objects encrypted with Amazon Web Services\n KMS.

" + } + }, + "com.amazonaws.s3#SseKmsEncryptedObjectsStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#Start": { + "type": "long" + }, + "com.amazonaws.s3#StartAfter": { + "type": "string" + }, + "com.amazonaws.s3#Stats": { + "type": "structure", + "members": { + "BytesScanned": { + "target": "com.amazonaws.s3#BytesScanned", + "traits": { + "smithy.api#documentation": "

The total number of object bytes scanned.

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

The total number of uncompressed object bytes processed.

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

The total number of bytes of records payload data returned.

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

Container for the stats details.

" + } + }, + "com.amazonaws.s3#StatsEvent": { + "type": "structure", + "members": { + "Details": { + "target": "com.amazonaws.s3#Stats", + "traits": { + "smithy.api#documentation": "

The Stats event details.

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

Container for the Stats Event.

" + } + }, + "com.amazonaws.s3#StorageClass": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" + } + }, + "REDUCED_REDUNDANCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REDUCED_REDUNDANCY" + } + }, + "STANDARD_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD_IA" + } + }, + "ONEZONE_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONEZONE_IA" + } + }, + "INTELLIGENT_TIERING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTELLIGENT_TIERING" + } + }, + "GLACIER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER" + } + }, + "DEEP_ARCHIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE" + } + }, + "OUTPOSTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OUTPOSTS" + } + }, + "GLACIER_IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER_IR" + } + }, + "SNOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNOW" + } + }, + "EXPRESS_ONEZONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXPRESS_ONEZONE" + } + } + } + }, + "com.amazonaws.s3#StorageClassAnalysis": { + "type": "structure", + "members": { + "DataExport": { + "target": "com.amazonaws.s3#StorageClassAnalysisDataExport", + "traits": { + "smithy.api#documentation": "

Specifies how data related to the storage class analysis for an Amazon S3 bucket should be\n exported.

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

Specifies data related to access patterns to be collected and made available to analyze\n the tradeoffs between different storage classes for an Amazon S3 bucket.

" + } + }, + "com.amazonaws.s3#StorageClassAnalysisDataExport": { + "type": "structure", + "members": { + "OutputSchemaVersion": { + "target": "com.amazonaws.s3#StorageClassAnalysisSchemaVersion", + "traits": { + "smithy.api#documentation": "

The version of the output schema to use when exporting data. Must be\n V_1.

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

The place to store the data for an analysis.

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

Container for data related to the storage class analysis for an Amazon S3 bucket for\n export.

" + } + }, + "com.amazonaws.s3#StorageClassAnalysisSchemaVersion": { + "type": "enum", + "members": { + "V_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "V_1" + } + } + } + }, + "com.amazonaws.s3#StreamingBlob": { + "type": "blob", + "traits": { + "smithy.api#streaming": {} + } + }, + "com.amazonaws.s3#Suffix": { + "type": "string" + }, + "com.amazonaws.s3#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Name of the object key.

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

Value of the tag.

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

A container of a key value name pair.

" + } + }, + "com.amazonaws.s3#TagCount": { + "type": "integer" + }, + "com.amazonaws.s3#TagSet": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Tag", + "traits": { + "smithy.api#xmlName": "Tag" + } + } + }, + "com.amazonaws.s3#Tagging": { + "type": "structure", + "members": { + "TagSet": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

A collection for a set of tags

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

Container for TagSet elements.

" + } + }, + "com.amazonaws.s3#TaggingDirective": { + "type": "enum", + "members": { + "COPY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COPY" + } + }, + "REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLACE" + } + } + } + }, + "com.amazonaws.s3#TaggingHeader": { + "type": "string" + }, + "com.amazonaws.s3#TargetBucket": { + "type": "string" + }, + "com.amazonaws.s3#TargetGrant": { + "type": "structure", + "members": { + "Grantee": { + "target": "com.amazonaws.s3#Grantee", + "traits": { + "smithy.api#documentation": "

Container for the person being granted permissions.

", + "smithy.api#xmlNamespace": { + "uri": "http://www.w3.org/2001/XMLSchema-instance", + "prefix": "xsi" + } + } + }, + "Permission": { + "target": "com.amazonaws.s3#BucketLogsPermission", + "traits": { + "smithy.api#documentation": "

Logging permissions assigned to the grantee for the bucket.

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

Container for granting information.

\n

Buckets that use the bucket owner enforced setting for Object Ownership don't support\n target grants. For more information, see Permissions server access log delivery in the\n Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#TargetGrants": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#TargetGrant", + "traits": { + "smithy.api#xmlName": "Grant" + } + } + }, + "com.amazonaws.s3#TargetObjectKeyFormat": { + "type": "structure", + "members": { + "SimplePrefix": { + "target": "com.amazonaws.s3#SimplePrefix", + "traits": { + "smithy.api#documentation": "

To use the simple format for S3 keys for log objects. To specify SimplePrefix format,\n set SimplePrefix to {}.

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

Partitioned S3 key for log objects.

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

Amazon S3 key format for log objects. Only one format, PartitionedPrefix or\n SimplePrefix, is allowed.

" + } + }, + "com.amazonaws.s3#TargetPrefix": { + "type": "string" + }, + "com.amazonaws.s3#Tier": { + "type": "enum", + "members": { + "Standard": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Standard" + } + }, + "Bulk": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bulk" + } + }, + "Expedited": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Expedited" + } + } + } + }, + "com.amazonaws.s3#Tiering": { + "type": "structure", + "members": { + "Days": { + "target": "com.amazonaws.s3#IntelligentTieringDays", + "traits": { + "smithy.api#documentation": "

The number of consecutive days of no access after which an object will be eligible to be\n transitioned to the corresponding tier. The minimum number of days specified for\n Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least\n 180 days. The maximum can be up to 2 years (730 days).

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

S3 Intelligent-Tiering access tier. See Storage class\n for automatically optimizing frequently and infrequently accessed objects for a\n list of access tiers in the S3 Intelligent-Tiering storage class.

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

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by\n automatically moving data to the most cost-effective storage access tier, without\n additional operational overhead.

" + } + }, + "com.amazonaws.s3#TieringList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Tiering" + } + }, + "com.amazonaws.s3#Token": { + "type": "string" + }, + "com.amazonaws.s3#TooManyParts": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

\n You have attempted to add more parts than the maximum of 10000 \n that are allowed for this object. You can use the CopyObject operation \n to copy this object to another and then add more data to the newly copied object.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.s3#TopicArn": { + "type": "string" + }, + "com.amazonaws.s3#TopicConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#NotificationId" + }, + "TopicArn": { + "target": "com.amazonaws.s3#TopicArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message\n when it detects events of the specified type.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "Topic" + } + }, + "Events": { + "target": "com.amazonaws.s3#EventList", + "traits": { + "smithy.api#documentation": "

The Amazon S3 bucket event about which to send notifications. For more information, see\n Supported\n Event Types in the Amazon S3 User Guide.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Event" + } + }, + "Filter": { + "target": "com.amazonaws.s3#NotificationConfigurationFilter" + } + }, + "traits": { + "smithy.api#documentation": "

A container for specifying the configuration for publication of messages to an Amazon\n Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

" + } + }, + "com.amazonaws.s3#TopicConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#TopicConfiguration" + } + }, + "com.amazonaws.s3#Transition": { + "type": "structure", + "members": { + "Date": { + "target": "com.amazonaws.s3#Date", + "traits": { + "smithy.api#documentation": "

Indicates when objects are transitioned to the specified storage class. The date value\n must be in ISO 8601 format. The time is always midnight UTC.

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

Indicates the number of days after creation when objects are transitioned to the\n specified storage class. If the specified storage class is INTELLIGENT_TIERING, \n GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are \n 0 or positive integers. If the specified storage class is STANDARD_IA \n or ONEZONE_IA, valid values are positive integers greater than 30. Be \n aware that some storage classes have a minimum storage duration and that you're charged for \n transitioning objects before their minimum storage duration. For more information, see \n \n Constraints and considerations for transitions in the \n Amazon S3 User Guide.

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

The storage class to which you want the object to transition.

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

Specifies when an object transitions to a specified storage class. For more information\n about Amazon S3 lifecycle configuration rules, see Transitioning\n Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#TransitionDefaultMinimumObjectSize": { + "type": "enum", + "members": { + "varies_by_storage_class": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "varies_by_storage_class" + } + }, + "all_storage_classes_128K": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all_storage_classes_128K" + } + } + } + }, + "com.amazonaws.s3#TransitionList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Transition" + } + }, + "com.amazonaws.s3#TransitionStorageClass": { + "type": "enum", + "members": { + "GLACIER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER" + } + }, + "STANDARD_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD_IA" + } + }, + "ONEZONE_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONEZONE_IA" + } + }, + "INTELLIGENT_TIERING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTELLIGENT_TIERING" + } + }, + "DEEP_ARCHIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE" + } + }, + "GLACIER_IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER_IR" + } + } + } + }, + "com.amazonaws.s3#Type": { + "type": "enum", + "members": { + "CanonicalUser": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CanonicalUser" + } + }, + "AmazonCustomerByEmail": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AmazonCustomerByEmail" + } + }, + "Group": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Group" + } + } + } + }, + "com.amazonaws.s3#URI": { + "type": "string" + }, + "com.amazonaws.s3#UploadIdMarker": { + "type": "string" + }, + "com.amazonaws.s3#UploadPart": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#UploadPartRequest" + }, + "output": { + "target": "com.amazonaws.s3#UploadPartOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "

Uploads a part in a multipart upload.

\n \n

In this operation, you provide new data as a part of an object in your request.\n However, you have an option to specify your existing Amazon S3 object as a data source for\n the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

\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\n specifications, see Multipart upload limits in the Amazon S3 User Guide.

\n \n

After you initiate multipart upload and upload one or more parts, you must either\n complete or abort multipart upload in order to stop getting charged for storage of the\n uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up\n the parts storage and stops charging you for the parts storage.

\n
\n

For more information on multipart uploads, go to Multipart Upload Overview in the\n Amazon S3 User Guide .

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n perform a multipart upload with encryption using an Key Management Service key, the\n requester must have permission to the kms:Decrypt and\n kms:GenerateDataKey actions on the key. The requester must\n also have permissions for the kms:GenerateDataKey action for\n the CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs.

    \n

    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\n more information about KMS permissions, see Protecting data\n using server-side encryption with KMS in the\n Amazon S3 User Guide. For information about the\n permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Data integrity
\n
\n

\n General purpose bucket - To ensure that data\n is not corrupted traversing the network, specify the Content-MD5\n header in the upload part request. Amazon S3 checks the part data against the provided\n MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is\n 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\n Version 4).

\n \n

\n Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

\n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose bucket - Server-side\n encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it.\n You have mutually exclusive options to protect data using server-side\n encryption in Amazon S3, depending on how you choose to manage the encryption\n keys. Specifically, the encryption key options are Amazon S3 managed keys\n (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C).\n Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys\n (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest\n using server-side encryption with other key options. The option you use\n depends on whether you want to use KMS keys (SSE-KMS) or provide your own\n encryption key (SSE-C).

    \n

    Server-side encryption is supported by the S3 Multipart Upload\n operations. Unless you are using a customer-provided encryption key (SSE-C),\n you don't need to specify the encryption parameters in each UploadPart\n request. Instead, you only need to specify the server-side encryption\n parameters in the initial Initiate Multipart request. For more information,\n see CreateMultipartUpload.

    \n

    If you request server-side encryption using a customer-provided\n encryption key (SSE-C) in your initiate multipart upload request, you must\n provide identical encryption information in each part upload using the\n following request 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, see Using\n Server-Side Encryption in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms).

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to UploadPart:

\n ", + "smithy.api#examples": [ + { + "title": "To upload a part", + "documentation": "The following example uploads part 1 of a multipart upload. The example specifies a file name for the part data. The Upload ID is same that is returned by the initiate multipart upload.", + "input": { + "Body": "fileToUpload", + "Bucket": "examplebucket", + "Key": "examplelargeobject", + "PartNumber": 1, + "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" + }, + "output": { + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?x-id=UploadPart", + "code": 200 + } + } + }, + "com.amazonaws.s3#UploadPartCopy": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#UploadPartCopyRequest" + }, + "output": { + "target": "com.amazonaws.s3#UploadPartCopyOutput" + }, + "traits": { + "smithy.api#documentation": "

Uploads a part by copying data from an existing object as data source. To specify the\n data source, you add the request header x-amz-copy-source in your request. To\n specify a byte range, you add the request header x-amz-copy-source-range in\n your request.

\n

For information about maximum and minimum part sizes and other multipart upload\n specifications, see Multipart upload limits in the Amazon S3 User Guide.

\n \n

Instead of copying data from an existing object as part data, you might use the\n UploadPart action to upload new data as a part of an object in your\n request.

\n
\n

You must initiate a multipart upload before you can upload any part. In response to your\n initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in\n your upload part request.

\n

For conceptual information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide. For information about\n copying objects using a single atomic action vs. a multipart upload, see Operations on\n Objects in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Authentication and authorization
\n
\n

All UploadPartCopy requests must be authenticated and signed by\n using IAM credentials (access key ID and secret access key for the IAM\n identities). All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use IAM\n credentials to authenticate and authorize your access to the\n UploadPartCopy API operation, instead of using the temporary\n security credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

You must have READ access to the source object and\n WRITE access to the destination bucket.

\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the permissions in a policy based on the bucket types of your\n source bucket and destination bucket in an UploadPartCopy\n operation.

    \n
      \n
    • \n

      If the source object is in a general purpose bucket, you must have the\n \n s3:GetObject\n \n permission to read the source object that is being copied.

      \n
    • \n
    • \n

      If the destination bucket is a general purpose bucket, you must have the\n \n s3:PutObject\n \n permission to write the object copy to the destination bucket.

      \n
    • \n
    • \n

      To perform a multipart upload with encryption using an Key Management Service\n key, the requester must have permission to the\n kms:Decrypt and kms:GenerateDataKey\n actions on the key. The requester must also have permissions for the\n kms:GenerateDataKey action for the\n CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs. These\n permissions are required because Amazon S3 must decrypt and read data from\n the encrypted file parts before it completes the multipart upload. For\n more information about KMS permissions, see Protecting\n data using server-side encryption with KMS in the\n Amazon S3 User Guide. For information about the\n permissions required to use the multipart upload API, see Multipart upload\n and permissions and Multipart upload API and permissions in the\n Amazon S3 User Guide.

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

    \n Directory bucket permissions -\n You must have permissions in a bucket policy or an IAM identity-based policy based on the\n source and destination bucket types in an UploadPartCopy\n operation.

    \n
      \n
    • \n

      If the source object that you want to copy is in a\n directory bucket, you must have the \n s3express:CreateSession\n permission in\n the Action element of a policy to read the object. By\n default, the session is in the ReadWrite mode. If you\n want to restrict the access, you can explicitly set the\n s3express:SessionMode condition key to\n ReadOnly on the copy source bucket.

      \n
    • \n
    • \n

      If the copy destination is a directory bucket, you must have the\n \n s3express:CreateSession\n permission in the\n Action element of a policy to write the object to the\n destination. The s3express:SessionMode condition key\n cannot be set to ReadOnly on the copy destination.\n

      \n
    • \n
    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n

    For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose buckets -\n For information about using\n server-side encryption with customer-provided encryption keys with the\n UploadPartCopy operation, see CopyObject and\n UploadPart.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    \n \n

    For directory buckets, when you perform a\n CreateMultipartUpload operation and an\n UploadPartCopy operation, the request headers you provide\n in the CreateMultipartUpload request must match the default\n encryption configuration of the destination bucket.

    \n
    \n

    S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through UploadPartCopy. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

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

    Error Code: InvalidRequest\n

    \n
      \n
    • \n

      Description: The specified copy source is not supported as a\n byte-range copy source.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to UploadPartCopy:

\n ", + "smithy.api#examples": [ + { + "title": "To upload a part by copying byte range from an existing object as data source", + "documentation": "The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.", + "input": { + "Bucket": "examplebucket", + "CopySource": "/bucketname/sourceobjectkey", + "CopySourceRange": "bytes=1-100000", + "Key": "examplelargeobject", + "PartNumber": 2, + "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" + }, + "output": { + "CopyPartResult": { + "LastModified": "2016-12-29T21:44:28.000Z", + "ETag": "\"65d16d19e65a7508a51f043180edcc36\"" + } + } + }, + { + "title": "To upload a part by copying data from an existing object as data source", + "documentation": "The following example uploads a part of a multipart upload by copying data from an existing object as data source.", + "input": { + "Bucket": "examplebucket", + "CopySource": "/bucketname/sourceobjectkey", + "Key": "examplelargeobject", + "PartNumber": 1, + "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" + }, + "output": { + "CopyPartResult": { + "LastModified": "2016-12-29T21:24:43.000Z", + "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"" + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?x-id=UploadPartCopy", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "DisableS3ExpressSessionAuth": { + "value": true + } + } + } + }, + "com.amazonaws.s3#UploadPartCopyOutput": { + "type": "structure", + "members": { + "CopySourceVersionId": { + "target": "com.amazonaws.s3#CopySourceVersionId", + "traits": { + "smithy.api#documentation": "

The version of the source object that was copied, if you have enabled versioning on the\n source bucket.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-version-id" + } + }, + "CopyPartResult": { + "target": "com.amazonaws.s3#CopyPartResult", + "traits": { + "smithy.api#documentation": "

Container for all response elements.

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

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

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

If present, indicates the ID of the KMS key that was used for object encryption.

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

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#UploadPartCopyRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n \n

Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, \n you get an HTTP 400 Bad Request error with the error code InvalidRequest.

\n
\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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 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
      \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
    • \n

      Access points are not supported by directory buckets.

      \n
    • \n
    \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

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 source object to copy. To copy a specific version of the source object to copy, append\n ?versionId= to the x-amz-copy-source request\n header (for example, x-amz-copy-source:\n /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

\n

If the current version is a delete marker and you don't specify a versionId in the\n x-amz-copy-source request header, Amazon S3 returns a 404 Not Found\n error, because the object does not exist. If you specify versionId in the\n x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an\n HTTP 400 Bad Request error, because you are not allowed to specify a delete\n marker as a version for the x-amz-copy-source.

\n \n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source", + "smithy.api#required": {} + } + }, + "CopySourceIfMatch": { + "target": "com.amazonaws.s3#CopySourceIfMatch", + "traits": { + "smithy.api#documentation": "

Copies the object if its entity tag (ETag) matches the specified tag.

\n

If both of the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request as\n 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

", + "smithy.api#httpHeader": "x-amz-copy-source-if-match" + } + }, + "CopySourceIfModifiedSince": { + "target": "com.amazonaws.s3#CopySourceIfModifiedSince", + "traits": { + "smithy.api#documentation": "

Copies the object if it has been modified since the specified time.

\n

If both of the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request as\n follows:

\n

\n x-amz-copy-source-if-none-match condition evaluates to false,\n 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

", + "smithy.api#httpHeader": "x-amz-copy-source-if-modified-since" + } + }, + "CopySourceIfNoneMatch": { + "target": "com.amazonaws.s3#CopySourceIfNoneMatch", + "traits": { + "smithy.api#documentation": "

Copies the object if its entity tag (ETag) is different than the specified ETag.

\n

If both of the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request as\n follows:

\n

\n x-amz-copy-source-if-none-match condition evaluates to false,\n 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

", + "smithy.api#httpHeader": "x-amz-copy-source-if-none-match" + } + }, + "CopySourceIfUnmodifiedSince": { + "target": "com.amazonaws.s3#CopySourceIfUnmodifiedSince", + "traits": { + "smithy.api#documentation": "

Copies the object if it hasn't been modified since the specified time.

\n

If both of the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request as\n 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

", + "smithy.api#httpHeader": "x-amz-copy-source-if-unmodified-since" + } + }, + "CopySourceRange": { + "target": "com.amazonaws.s3#CopySourceRange", + "traits": { + "smithy.api#documentation": "

The range of bytes to copy from the source object. The range value must use the form\n bytes=first-last, where the first and last are the zero-based byte offsets to copy. For\n example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You\n can copy a range only if the source object is greater than 5 MB.

", + "smithy.api#httpHeader": "x-amz-copy-source-range" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

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

Part number of part being copied. This is a positive integer between 1 and\n 10,000.

", + "smithy.api#httpQuery": "partNumber", + "smithy.api#required": {} + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID identifying the multipart upload whose part is being copied.

", + "smithy.api#httpQuery": "uploadId", + "smithy.api#required": {} + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

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

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "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. This must be the\n same encryption key specified in the initiate multipart upload request.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

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

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

\n \n

This functionality is not supported when the source object is in a directory bucket.

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

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be one that was used when the\n source object was created.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key" + } + }, + "CopySourceSSECustomerKeyMD5": { + "target": "com.amazonaws.s3#CopySourceSSECustomerKeyMD5", + "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.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-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 destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, 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 account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-source-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#UploadPartOutput": { + "type": "structure", + "members": { + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

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

Entity tag for the uploaded object.

", + "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

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

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

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

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

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

If present, indicates the ID of the KMS key that was used for object encryption.

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

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#UploadPartRequest": { + "type": "structure", + "members": { + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

Object data.

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

The name of the bucket to which the multipart upload was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentLength": { + "target": "com.amazonaws.s3#ContentLength", + "traits": { + "smithy.api#documentation": "

Size of the body in bytes. This parameter is useful when the size of the body cannot be\n determined automatically.

", + "smithy.api#httpHeader": "Content-Length" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated\n when using the command from the CLI. This parameter is required if object lock parameters\n are specified.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 value\n 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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "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 SHA1 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 SHA256 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": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number of part being uploaded. This is a positive integer between 1 and\n 10,000.

", + "smithy.api#httpQuery": "partNumber", + "smithy.api#required": {} + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID identifying the multipart upload whose part is being uploaded.

", + "smithy.api#httpQuery": "uploadId", + "smithy.api#required": {} + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

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

\n \n

This functionality is not supported for directory buckets.

\n
", + "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. This must be the\n same encryption key specified in the initiate multipart upload request.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#UserMetadata": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#MetadataEntry", + "traits": { + "smithy.api#xmlName": "MetadataEntry" + } + } + }, + "com.amazonaws.s3#Value": { + "type": "string" + }, + "com.amazonaws.s3#VersionCount": { + "type": "integer" + }, + "com.amazonaws.s3#VersionIdMarker": { + "type": "string" + }, + "com.amazonaws.s3#VersioningConfiguration": { + "type": "structure", + "members": { + "MFADelete": { + "target": "com.amazonaws.s3#MFADelete", + "traits": { + "smithy.api#documentation": "

Specifies whether MFA delete is enabled in the bucket versioning configuration. This\n element is only returned if the bucket has been configured with MFA delete. If the bucket\n has never been so configured, this element is not returned.

", + "smithy.api#xmlName": "MfaDelete" + } + }, + "Status": { + "target": "com.amazonaws.s3#BucketVersioningStatus", + "traits": { + "smithy.api#documentation": "

The versioning state of the bucket.

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

Describes the versioning state of an Amazon S3 bucket. For more information, see PUT\n Bucket versioning in the Amazon S3 API Reference.

" + } + }, + "com.amazonaws.s3#WebsiteConfiguration": { + "type": "structure", + "members": { + "ErrorDocument": { + "target": "com.amazonaws.s3#ErrorDocument", + "traits": { + "smithy.api#documentation": "

The name of the error document for the website.

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

The name of the index document for the website.

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

The redirect behavior for every request to this bucket's website endpoint.

\n \n

If you specify this property, you can't specify any other property.

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

Rules that define when a redirect is applied and the redirect behavior.

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

Specifies website configuration parameters for an Amazon S3 bucket.

" + } + }, + "com.amazonaws.s3#WebsiteRedirectLocation": { + "type": "string" + }, + "com.amazonaws.s3#WriteGetObjectResponse": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#WriteGetObjectResponseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.auth#unsignedPayload": {}, + "smithy.api#auth": [ + "aws.auth#sigv4" + ], + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Passes transformed objects to a GetObject operation when using Object Lambda access points. For\n information about Object Lambda access points, see Transforming objects with\n Object Lambda access points in the Amazon S3 User Guide.

\n

This operation supports metadata that can be returned by GetObject, in addition to\n RequestRoute, RequestToken, StatusCode,\n ErrorCode, and ErrorMessage. The GetObject\n response metadata is supported so that the WriteGetObjectResponse caller,\n typically an Lambda function, can provide the same metadata when it internally invokes\n GetObject. When WriteGetObjectResponse is called by a\n customer-owned Lambda function, the metadata returned to the end user\n GetObject call might differ from what Amazon S3 would normally return.

\n

You can include any number of metadata headers. When including a metadata header, it\n should be prefaced with x-amz-meta. For example,\n x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this\n is to forward GetObject metadata.

\n

Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to\n detect and redact personally identifiable information (PII) and decompress S3 objects.\n These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and\n can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

\n

Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a\n natural language processing (NLP) service using machine learning to find insights and\n relationships in text. It automatically detects personally identifiable information (PII)\n such as names, addresses, dates, credit card numbers, and social security numbers from\n documents in your Amazon S3 bucket.

\n

Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural\n language processing (NLP) service using machine learning to find insights and relationships\n in text. It automatically redacts personally identifiable information (PII) such as names,\n addresses, dates, credit card numbers, and social security numbers from documents in your\n Amazon S3 bucket.

\n

Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is\n equipped to decompress objects stored in S3 in one of six compressed file formats including\n bzip2, gzip, snappy, zlib, zstandard and ZIP.

\n

For information on how to view and use these functions, see Using Amazon Web Services built Lambda\n functions in the Amazon S3 User Guide.

", + "smithy.api#endpoint": { + "hostPrefix": "{RequestRoute}." + }, + "smithy.api#http": { + "method": "POST", + "uri": "/WriteGetObjectResponse", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseObjectLambdaEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#WriteGetObjectResponseRequest": { + "type": "structure", + "members": { + "RequestRoute": { + "target": "com.amazonaws.s3#RequestRoute", + "traits": { + "smithy.api#documentation": "

Route prefix to the HTTP URL generated.

", + "smithy.api#hostLabel": {}, + "smithy.api#httpHeader": "x-amz-request-route", + "smithy.api#required": {} + } + }, + "RequestToken": { + "target": "com.amazonaws.s3#RequestToken", + "traits": { + "smithy.api#documentation": "

A single use encrypted token that maps WriteGetObjectResponse to the end\n user GetObject request.

", + "smithy.api#httpHeader": "x-amz-request-token", + "smithy.api#required": {} + } + }, + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

The object data.

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

The integer status code for an HTTP response of a corresponding GetObject\n request. The following is a list of status codes.

\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. The regular expression (regex)\n value is \"^[A-Z][a-zA-Z]+$\".

", + "smithy.api#httpHeader": "x-amz-fwd-error-code" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.s3#ErrorMessage", + "traits": { + "smithy.api#documentation": "

Contains a generic description of the error condition. Returned in the \n tag of the error XML response for a corresponding GetObject call. Cannot be\n used with a successful StatusCode header or when the transformed object is\n provided in body.

", + "smithy.api#httpHeader": "x-amz-fwd-error-message" + } + }, + "AcceptRanges": { + "target": "com.amazonaws.s3#AcceptRanges", + "traits": { + "smithy.api#documentation": "

Indicates that a range of bytes was specified.

", + "smithy.api#httpHeader": "x-amz-fwd-header-accept-ranges" + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Content-Language" + } + }, + "ContentLength": { + "target": "com.amazonaws.s3#ContentLength", + "traits": { + "smithy.api#documentation": "

The size of the content body in bytes.

", + "smithy.api#httpHeader": "Content-Length" + } + }, + "ContentRange": { + "target": "com.amazonaws.s3#ContentRange", + "traits": { + "smithy.api#documentation": "

The portion of the object returned in the response.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Content-Range" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", + "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\n the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32\n checksum of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n 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\n the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C\n checksum of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n headers, this request will fail.

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

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

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-crc64nvme" + } + }, + "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\n the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1\n digest of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n 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\n the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256\n digest of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n headers, this request will fail.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-sha256" + } + }, + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

Specifies whether an object stored in Amazon S3 is (true) or is not\n (false) a delete marker. To learn more about delete markers, see Working with delete markers.

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

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

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

The date and time at which the object is no longer cacheable.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Expires" + } + }, + "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\n pairs that provide the object expiration information. The value of the rule-id\n is URL-encoded.

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

The date and time that the object was last modified.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Last-Modified" + } + }, + "MissingMeta": { + "target": "com.amazonaws.s3#MissingMeta", + "traits": { + "smithy.api#documentation": "

Set to the number of metadata entries not returned in x-amz-meta headers.\n This can happen if you create metadata using an API like SOAP that supports more flexible\n metadata than the REST API. For example, using SOAP, you can create metadata whose values\n are not legal HTTP headers.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-missing-meta" + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information\n about S3 Object Lock, see Object Lock.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-mode" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Indicates whether an object stored in Amazon S3 has an active legal hold.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-legal-hold" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when Object Lock is configured to expire.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-retain-until-date" + } + }, + "PartsCount": { + "target": "com.amazonaws.s3#PartsCount", + "traits": { + "smithy.api#documentation": "

The count of parts this object has.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-mp-parts-count" + } + }, + "ReplicationStatus": { + "target": "com.amazonaws.s3#ReplicationStatus", + "traits": { + "smithy.api#documentation": "

Indicates if request involves bucket that is either a source or destination in a\n Replication rule. For more information about S3 Replication, see Replication.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-replication-status" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-request-charged" + } + }, + "Restore": { + "target": "com.amazonaws.s3#Restore", + "traits": { + "smithy.api#documentation": "

Provides information about object restoration operation and expiration time of the\n restored object copy.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-restore" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when storing requested object in Amazon S3 (for\n example, AES256, aws:kms).

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Encryption algorithm used if server-side encryption with a customer-provided encryption\n key was specified for object stored in Amazon S3.

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

If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key\n Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in\n Amazon S3 object.

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

128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data\n stored in S3. For more information, see Protecting data\n using server-side encryption with customer-provided encryption keys\n (SSE-C).

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "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

For more information, see Storage Classes.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-storage-class" + } + }, + "TagCount": { + "target": "com.amazonaws.s3#TagCount", + "traits": { + "smithy.api#documentation": "

The number of tags, if any, on the object.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-tagging-count" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

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

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-version-id" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side\n encryption with Amazon Web Services KMS (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#WriteOffsetBytes": { + "type": "long" + }, + "com.amazonaws.s3#Years": { + "type": "integer" + } + } +} diff --git a/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/ResolverTest.java b/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/ResolverTest.java new file mode 100644 index 000000000..0f98e9c21 --- /dev/null +++ b/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/ResolverTest.java @@ -0,0 +1,197 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.aws.client.rulesengine; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.nullValue; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import software.amazon.smithy.java.aws.client.core.settings.RegionSetting; +import software.amazon.smithy.java.aws.client.core.settings.S3EndpointSettings; +import software.amazon.smithy.java.client.core.CallContext; +import software.amazon.smithy.java.client.core.RequestOverrideConfig; +import software.amazon.smithy.java.client.core.auth.scheme.AuthSchemeResolver; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointContext; +import software.amazon.smithy.java.client.core.interceptors.ClientInterceptor; +import software.amazon.smithy.java.client.core.interceptors.RequestHook; +import software.amazon.smithy.java.client.rulesengine.EndpointRulesPlugin; +import software.amazon.smithy.java.client.rulesengine.EndpointUtils; +import software.amazon.smithy.java.client.rulesengine.RulesEvaluationError; +import software.amazon.smithy.java.core.serde.document.Document; +import software.amazon.smithy.java.dynamicclient.DynamicClient; +import software.amazon.smithy.java.http.api.HttpRequest; +import software.amazon.smithy.model.Model; +import software.amazon.smithy.model.loader.ModelAssembler; +import software.amazon.smithy.model.pattern.UriPattern; +import software.amazon.smithy.model.shapes.ServiceShape; +import software.amazon.smithy.model.shapes.Shape; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.model.traits.HttpTrait; +import software.amazon.smithy.model.transform.ModelTransformer; +import software.amazon.smithy.rulesengine.traits.EndpointTestCase; +import software.amazon.smithy.rulesengine.traits.EndpointTestsTrait; + +public class ResolverTest { + + private static Model model; + private static ServiceShape service; + private static EndpointRulesPlugin plugin; + private static DynamicClient client; + + // S3 requires a customization to remove buckets from the path :( + private static Model customizeS3Model(Model m) { + return ModelTransformer.create().mapShapes(m, s -> { + if (s.isOperationShape()) { + var httpTrait = s.getTrait(HttpTrait.class).orElse(null); + if (httpTrait != null && httpTrait.getUri().getLabel("Bucket").isPresent()) { + // Remove the bucket from the URI pattern. + var uriString = httpTrait.getUri().toString().replace("{Bucket}", ""); + uriString = uriString.replace("//", "/"); + var newUri = UriPattern.parse(uriString); + var newHttpTrait = httpTrait.toBuilder().uri(newUri).build(); + return Shape.shapeToBuilder(s).addTrait(newHttpTrait).build(); + } + } + return s; + }); + } + + @BeforeAll + public static void before() throws Exception { + model = Model.assembler() + .discoverModels() + .addImport(ResolverTest.class.getResource("s3.json")) + .putProperty(ModelAssembler.ALLOW_UNKNOWN_TRAITS, true) + .assemble() + .unwrap(); + model = customizeS3Model(model); + service = model.expectShape(ShapeId.from("com.amazonaws.s3#AmazonS3"), ServiceShape.class); + plugin = EndpointRulesPlugin.create(); + client = DynamicClient.builder() + .model(model) + .service(service.getId()) + .authSchemeResolver(AuthSchemeResolver.NO_AUTH) + .addPlugin(plugin) + .build(); + } + + @ParameterizedTest + @MethodSource("s3TestCases") + public void caseRunner(EndpointTestCase test) { + var expected = test.getExpect(); + var expectedError = expected.getError().orElse(null); + var expectedEndpoint = expected.getEndpoint().orElse(null); + try { + var result = resolveEndpoint(test, client); + if (expectedError != null) { + Assertions.fail("Expected ruleset to fail: " + test.getDocumentation() + " : " + expectedError); + } + + Endpoint ep = (Endpoint) result[0]; + assertThat(ep.uri().toString(), equalTo(expectedEndpoint.getUrl())); + var actualHeaders = ep.property(EndpointContext.HEADERS); + if (expectedEndpoint.getHeaders().isEmpty()) { + assertThat(actualHeaders, nullValue()); + } else { + assertThat(actualHeaders, equalTo(expectedEndpoint.getHeaders())); + } + // TODO: validate properties too. + } catch (RulesEvaluationError e) { + if (expectedError == null) { + Assertions.fail("Expected ruleset to succeed: " + test.getDocumentation() + " : " + e, e); + } + } + } + + public static List s3TestCases() { + List tests = new ArrayList<>(); + for (var test : service.expectTrait(EndpointTestsTrait.class).getTestCases()) { + if (test.getOperationInputs() != null && !test.getOperationInputs().isEmpty()) { + // How do we test when there's no operation? + tests.add(test); + } + } + return tests; + } + + private Object[] resolveEndpoint(EndpointTestCase test, DynamicClient client) { + // The rules have operation input params, so simulate sending an operation. + var resolvedEndpoint = new Object[2]; + var override = RequestOverrideConfig.builder() + .addInterceptor(new ClientInterceptor() { + @Override + public void readBeforeTransmit(RequestHook hook) { + resolvedEndpoint[0] = hook.context().get(CallContext.ENDPOINT); + hook.mapRequest(HttpRequest.class, r -> { + resolvedEndpoint[1] = r.request().uri(); + return r.request(); + }); + throw new RulesEvaluationError("foo"); + } + }) + .putConfig(RegionSetting.REGION, "us-east-1"); + + var inputs = test.getOperationInputs().get(0); + var name = inputs.getOperationName(); + var inputParams = EndpointUtils.convertNode(inputs.getOperationParams(), true); + + if (!inputs.getBuiltInParams().isEmpty()) { + inputs.getBuiltInParams().getStringMember("SDK::Endpoint").ifPresent(value -> { + override.putConfig(CallContext.ENDPOINT, Endpoint.builder().uri(value.getValue()).build()); + }); + inputs.getBuiltInParams().getStringMember("AWS::Region").ifPresent(value -> { + override.putConfig(RegionSetting.REGION, value.getValue()); + }); + } + + inputs.getOperationParams().getStringMember("Region").ifPresent(value -> { + override.putConfig(RegionSetting.REGION, value.getValue()); + }); + + inputs.getOperationParams().getBooleanMember("UseFIPS").ifPresent(value -> { + override.putConfig(S3EndpointSettings.USE_FIPS, value.getValue()); + }); + + inputs.getOperationParams().getBooleanMember("UseDualStack").ifPresent(value -> { + override.putConfig(S3EndpointSettings.USE_DUAL_STACK, value.getValue()); + }); + + inputs.getOperationParams().getBooleanMember("Accelerate").ifPresent(value -> { + override.putConfig(S3EndpointSettings.S3_ACCELERATE, value.getValue()); + }); + + inputs.getOperationParams().getBooleanMember("DisableMultiRegionAccessPoints").ifPresent(value -> { + override.putConfig(S3EndpointSettings.S3_DISABLE_MULTI_REGION_ACCESS_POINTS, value.getValue()); + }); + + inputs.getOperationParams().getBooleanMember("ForcePathStyle").ifPresent(value -> { + override.putConfig(S3EndpointSettings.S3_FORCE_PATH_STYLE, value.getValue()); + }); + + override.putConfig(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, + (Map) EndpointUtils.convertNode(test.getParams(), true)); + + try { + var document = Document.ofObject(inputParams); + client.call(name, document, override.build()); + throw new RuntimeException("Expected exception"); + } catch (RulesEvaluationError e) { + if (e.getMessage().equals("foo")) { + return resolvedEndpoint; + } else { + throw e; + } + } + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/CseOptimizer.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/CseOptimizer.java deleted file mode 100644 index ef61ee8aa..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/CseOptimizer.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; -import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; -import software.amazon.smithy.rulesengine.language.syntax.rule.TreeRule; - -/** - * Eliminates common subexpressions so they're stored in a single registry. - * - *

This currently only eliminates top-level condition functions that are duplicates across any rule or tree-rule - * and at any depth. It doesn't eliminate nested expressions of functions. - */ -final class CseOptimizer { - - // The score required to make a condition an eliminated CSE. - private static final int MINIMUM_SCORE = 5; - - // Counts how many times an expression is duplicated. - private final Map conditions = new HashMap<>(); - - static Map apply(List rules) { - var cse = new CseOptimizer(); - for (var rule : rules) { - cse.apply(1, rule); - } - return cse.getCse(); - } - - private void apply(int depth, Rule rule) { - if (rule instanceof TreeRule t) { - for (var c : t.getConditions()) { - findCse(depth, c.getFunction()); - } - for (var r : t.getRules()) { - apply(depth + 1, r); - } - } else { - for (var c : rule.getConditions()) { - findCse(depth, c.getFunction()); - } - } - } - - private void findCse(int depth, Expression f) { - // Add to the score for each expression, discounting occurrences the deeper they appear. - conditions.put(f, conditions.getOrDefault(f, 0.0) + (1 / (depth * 0.5))); - } - - private Map getCse() { - // Only keep duplicated expressions that have a pretty high score. - Map result = new LinkedHashMap<>(); - for (var e : conditions.entrySet()) { - if (e.getValue() > MINIMUM_SCORE) { - result.put(e.getKey(), (byte) 0); - } - } - - return result; - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java index ecb7d24f8..5de87e877 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java @@ -6,6 +6,7 @@ package software.amazon.smithy.java.client.rulesengine; import java.util.Map; +import java.util.Objects; import software.amazon.smithy.java.client.core.ClientConfig; import software.amazon.smithy.java.client.core.ClientContext; import software.amazon.smithy.java.client.core.ClientPlugin; @@ -39,9 +40,11 @@ public final class EndpointRulesPlugin implements ClientPlugin { TraitKey.get(EndpointRuleSetTrait.class); private RulesProgram program; + private final RulesEngine engine; - private EndpointRulesPlugin(RulesProgram program) { + private EndpointRulesPlugin(RulesProgram program, RulesEngine engine) { this.program = program; + this.engine = engine; } /** @@ -53,7 +56,8 @@ private EndpointRulesPlugin(RulesProgram program) { * @return the rules engine plugin. */ public static EndpointRulesPlugin from(RulesProgram program) { - return new EndpointRulesPlugin(program); + Objects.requireNonNull(program, "RulesProgram must not be null"); + return new EndpointRulesPlugin(program, null); } /** @@ -64,7 +68,19 @@ public static EndpointRulesPlugin from(RulesProgram program) { * @return the plugin. */ public static EndpointRulesPlugin create() { - return new EndpointRulesPlugin(null); + return create(new RulesEngine()); + } + + /** + * Creates an EndpointRulesPlugin that waits to create a program until configuring the client. It looks for the + * relevant Smithy traits, and if found, compiles them and sets up a resolver. If the traits can't be found, the + * resolver is not updated. If a resolver is already set, it is not changed. + * + * @param engine RulesEngine to use when creating programs. + * @return the plugin. + */ + public static EndpointRulesPlugin create(RulesEngine engine) { + return new EndpointRulesPlugin(null, engine); } /** @@ -94,7 +110,7 @@ public void configureClient(ClientConfig.Builder config) { var ruleset = config.service().schema().getTrait(ENDPOINT_RULESET_TRAIT); if (ruleset != null) { LOGGER.debug("Found endpoint rules traits on service: {}", config.service()); - program = new RulesEngine().compile(ruleset.getEndpointRuleSet()); + program = engine.compile(ruleset.getEndpointRuleSet()); } } if (program != null) { diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java index 5f3765f12..b16df27ca 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java @@ -122,9 +122,7 @@ static Object verifyObject(Object value) { // Read little-endian unsigned short (2 bytes) static int bytesToShort(byte[] instructions, int offset) { - int low = instructions[offset] & 0xFF; - int high = instructions[offset + 1] & 0xFF; - return (high << 8) | low; + return ((instructions[offset + 1] & 0xFF) << 8) | (instructions[offset] & 0xFF); } // Write little-endian unsigned short (2 bytes) diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java index e4fb1b733..6e3027eac 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java @@ -39,8 +39,6 @@ final class RulesCompiler { private final Map constantPool = new LinkedHashMap<>(); private final BiFunction builtinProvider; - private final Map cse; - private boolean performOptimizations; // The parsed opcodes and operands. private byte[] instructions = new byte[64]; @@ -76,7 +74,6 @@ final class RulesCompiler { this.extensions = extensions; this.rules = rules; this.builtinProvider = builtinProvider; - this.performOptimizations = performOptimizations; this.functions = functions; // Byte 1 is the version byte. @@ -90,10 +87,6 @@ final class RulesCompiler { var builtinValue = param.getBuiltIn().orElse(null); addRegister(param.getName().toString(), param.isRequired(), defaultValue, builtinValue); } - - // cse = performOptimizations ? CseOptimizer.apply(rules.getRules()) : Map.of(); - performOptimizations = false; - cse = Map.of(); } private byte addRegister(String name, boolean required, Object defaultValue, String builtin) { @@ -163,18 +156,6 @@ private byte getFunctionIndex(String name) { } RulesProgram compile() { - // Compile common subexpression values up front. - if (performOptimizations) { - performOptimizations = false; - for (var e : cse.entrySet()) { - alwaysCompileExpression(e.getKey()); - var register = getTempRegister(); - e.setValue(register); - add_SET_REGISTER(register); - } - performOptimizations = true; - } - for (var rule : rules.getRules()) { compileRule(rule); } @@ -275,14 +256,6 @@ private void addLiteralOpcodes(Literal literal) { } private void compileExpression(Expression expression) { - if (performOptimizations) { - var register = cse.get(expression); - if (register != null) { - add_LOAD_REGISTER(register); - return; - } - } - alwaysCompileExpression(expression); } @@ -341,12 +314,17 @@ public Void visitBoolEquals(Expression left, Expression right) { } private void pushBooleanOptimization(BooleanLiteral b, Expression other) { - if (b.value().getValue() && other instanceof Reference ref) { - add_TEST_REGISTER_IS_TRUE(ref.getName().toString()); + var value = b.value().getValue(); + if (other instanceof Reference ref) { + if (value) { + add_TEST_REGISTER_IS_TRUE(ref.getName().toString()); + } else { + add_TEST_REGISTER_IS_FALSE(ref.getName().toString()); + } } else { compileExpression(other); add_IS_TRUE(); - if (!b.value().getValue()) { + if (!value) { add_NOT(); } } @@ -356,14 +334,21 @@ private void pushBooleanOptimization(BooleanLiteral b, Expression other) { public Void visitStringEquals(Expression left, Expression right) { compileExpression(left); compileExpression(right); - add_FN(getFunctionIndex("stringEquals")); + add_EQUALS(); return null; } @Override public Void visitLibraryFunction(FunctionDefinition fn, List args) { + if (fn.getId().equals("substring")) { + compileExpression(args.get(0)); // string + add_SUBSTRING(args); + return null; + } + var index = getFunctionIndex(fn.getId()); var f = usedFunctions.get(index); + // Detect if the runtime function differs from the defined trait function. if (f.getOperandCount() != fn.getArguments().size()) { throw new RulesEvaluationError("Rules engine function `" + fn.getId() + "` accepts " @@ -550,6 +535,22 @@ private void add_TEST_REGISTER_IS_TRUE(String register) { addInstruction(getRegister(register)); } + private void add_TEST_REGISTER_IS_FALSE(String register) { + addInstruction(RulesProgram.TEST_REGISTER_IS_FALSE); + addInstruction(getRegister(register)); + } + + private void add_EQUALS() { + addInstruction(RulesProgram.EQUALS); + } + + private void add_SUBSTRING(List args) { + addInstruction(RulesProgram.SUBSTRING); + addInstruction(args.get(1).toNode().expectNumberNode().getValue().byteValue()); + addInstruction(args.get(2).toNode().expectNumberNode().getValue().byteValue()); + addInstruction(args.get(3).toNode().expectBooleanNode().getValue() ? (byte) 1 : (byte) 0); + } + private void addInstruction(byte value) { if (instructionSize >= instructions.length) { // Double the size when needed. diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java index 538f8d1f5..779d5ee51 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java @@ -141,11 +141,32 @@ public final class RulesProgram { */ static final byte TEST_REGISTER_IS_TRUE = 16; + /** + * Checks if a register is boolean false and pushes the result onto the stack. + * + *

Must be followed by a byte that represents the register to check. + */ + static final byte TEST_REGISTER_IS_FALSE = 17; + /** * Pops the value at the top of the stack and returns it from the VM. This can be used for testing purposes or * for returning things other than endpoint values. */ - static final byte RETURN_VALUE = 17; + static final byte RETURN_VALUE = 18; + + /** + * Pops the top two values off the stack and performs Objects.equals on them, pushing the result onto the stack. + */ + static final byte EQUALS = 19; + + /** + * Pops the top value off the stack, expecting a string, and extracts a substring of it, pushing the result onto + * the stack. + * + *

Must be followed by three bytes: the start position in the string, the end position in the string, and + * a byte set to 1 if the substring is "reversed" (from the end) or not. + */ + static final byte SUBSTRING = 20; final List extensions; final Object[] constantPool; @@ -316,114 +337,146 @@ public String toString() { // Skip version, param count, synthetic param count bytes. for (var i = instructionOffset + 3; i < instructionSize; i++) { - s.append(" "); - s.append(String.format("%03d", i)); - s.append(": "); - - var skip = 0; - Show show = null; - var name = switch (instructions[i]) { - case LOAD_CONST -> { - skip = 1; - show = Show.CONST; - yield "LOAD_CONST"; - } - case LOAD_CONST_W -> { - skip = 2; - show = Show.CONST; - yield "LOAD_CONST_W"; - } - case SET_REGISTER -> { - skip = 1; - show = Show.REGISTER; - yield "SET_REGISTER"; - } - case LOAD_REGISTER -> { - skip = 1; - show = Show.REGISTER; - yield "LOAD_REGISTER"; - } - case JUMP_IF_FALSEY -> { - skip = 2; - yield "JUMP_IF_FALSEY"; - } - case NOT -> "NOT"; - case ISSET -> "ISSET"; - case TEST_REGISTER_ISSET -> { - skip = 1; - show = Show.REGISTER; - yield "TEST_REGISTER_SET"; - } - case RETURN_ERROR -> "RETURN_ERROR"; - case RETURN_ENDPOINT -> { - skip = 1; - yield "RETURN_ENDPOINT"; - } - case CREATE_LIST -> { - skip = 1; - yield "CREATE_LIST"; - } - case CREATE_MAP -> { - skip = 1; - yield "CREATE_MAP"; - } - case RESOLVE_TEMPLATE -> { - skip = 2; - show = Show.CONST; - yield "RESOLVE_TEMPLATE"; + i = writeInstruction(s, i); + } + + return s.toString(); + } + + /** + * Allows dumping out a specific instruction at the given bytecode position. + * + * @param pc Bytecode instruction position. + * @return the instruction as a debug string. + */ + public String writeInstruction(int pc) { + StringBuilder s = new StringBuilder(); + writeInstruction(s, pc); + return s.toString(); + } + + private int writeInstruction(StringBuilder s, int pc) { + s.append(" "); + s.append(String.format("%03d", pc)); + s.append(": "); + + var skip = 0; + Show show = null; + var name = switch (instructions[pc]) { + case LOAD_CONST -> { + skip = 1; + show = Show.CONST; + yield "LOAD_CONST"; + } + case LOAD_CONST_W -> { + skip = 2; + show = Show.CONST; + yield "LOAD_CONST_W"; + } + case SET_REGISTER -> { + skip = 1; + show = Show.REGISTER; + yield "SET_REGISTER"; + } + case LOAD_REGISTER -> { + skip = 1; + show = Show.REGISTER; + yield "LOAD_REGISTER"; + } + case JUMP_IF_FALSEY -> { + skip = 2; + yield "JUMP_IF_FALSEY"; + } + case NOT -> "NOT"; + case ISSET -> "ISSET"; + case TEST_REGISTER_ISSET -> { + skip = 1; + show = Show.REGISTER; + yield "TEST_REGISTER_SET"; + } + case RETURN_ERROR -> "RETURN_ERROR"; + case RETURN_ENDPOINT -> { + skip = 1; + yield "RETURN_ENDPOINT"; + } + case CREATE_LIST -> { + skip = 1; + yield "CREATE_LIST"; + } + case CREATE_MAP -> { + skip = 1; + yield "CREATE_MAP"; + } + case RESOLVE_TEMPLATE -> { + skip = 2; + show = Show.CONST; + yield "RESOLVE_TEMPLATE"; + } + case FN -> { + skip = 1; + show = Show.FN; + yield "FN"; + } + case GET_ATTR -> { + skip = 2; + show = Show.CONST; + yield "GET_ATTR"; + } + case IS_TRUE -> "IS_TRUE"; + case TEST_REGISTER_IS_TRUE -> { + skip = 1; + show = Show.REGISTER; + yield "TEST_REGISTER_IS_TRUE"; + } + case TEST_REGISTER_IS_FALSE -> { + skip = 1; + show = Show.REGISTER; + yield "TEST_REGISTER_IS_FALSE"; + } + case RETURN_VALUE -> "RETURN_VALUE"; + case EQUALS -> "EQUALS"; + case SUBSTRING -> { + skip = 3; + yield "SUBSTRING"; + } + default -> "?" + instructions[pc]; + }; + + appendName(s, name); + + int positionToShow = -1; + if (skip == 1) { + positionToShow = appendByte(s, pc); + pc++; + } else if (skip == 2) { + positionToShow = appendShort(s, pc); + pc += 2; + } else if (skip == 3) { + appendByte(s, pc); + appendByte(s, pc + 1); + appendByte(s, pc + 2); + pc += 3; + } + + if (positionToShow > -1 && show != null) { + switch (show) { + case CONST -> { + s.append(" "); + s.append(constantPool[positionToShow]); } case FN -> { - skip = 1; - show = Show.FN; - yield "FN"; + s.append(" "); + s.append(functions[positionToShow].getFunctionName()); } - case GET_ATTR -> { - skip = 2; - show = Show.CONST; - yield "GET_ATTR"; - } - case IS_TRUE -> "IS_TRUE"; - case TEST_REGISTER_IS_TRUE -> { - skip = 1; - show = Show.REGISTER; - yield "TEST_REGISTER_IS_TRUE"; - } - case RETURN_VALUE -> "RETURN_VALUE"; - default -> "?" + instructions[i]; - }; - - appendName(s, name); - - int positionToShow = -1; - if (skip == 1) { - positionToShow = appendByte(s, i); - i++; - } else if (skip == 2) { - positionToShow = appendShort(s, i); - i += 2; - } - - if (positionToShow > -1 && show != null) { - switch (show) { - case CONST -> { - s.append(" "); - s.append(constantPool[positionToShow]); - } - case FN -> { - s.append(" "); - s.append(functions[positionToShow].getFunctionName()); - } - case REGISTER -> { - s.append(" "); - s.append(registerDefinitions[positionToShow].name()); - } + case REGISTER -> { + s.append(" "); + s.append(registerDefinitions[positionToShow].name()); } } - - s.append("\n"); } - return s.toString(); + s.append("\n"); + return pc; } private void appendName(StringBuilder s, String name) { diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java index f1dfd6324..dc6dc056b 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java @@ -13,11 +13,13 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.function.BiFunction; import software.amazon.smithy.java.client.core.endpoint.Endpoint; import software.amazon.smithy.java.client.core.endpoint.EndpointContext; import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.logging.InternalLogger; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring; final class RulesVm { @@ -51,6 +53,7 @@ protected boolean removeEldestEntry(Map.Entry eldest) { private Object[] stack = new Object[8]; private int stackPosition = 0; private int pc; + private final boolean debugLoggingEnabled = LOGGER.isDebugEnabled(); RulesVm( Context context, @@ -84,11 +87,13 @@ T evaluate() { throw createError("Unexpected value type encountered while evaluating rules engine", e); } catch (ArrayIndexOutOfBoundsException e) { throw createError("Malformed bytecode encountered while evaluating rules engine", e); + } catch (NullPointerException e) { + throw createError("Rules engine encountered an unexpected null value", e); } } private RulesEvaluationError createError(String message, RuntimeException e) { - var report = message + ". Encountered at address " + pc + " of program:\n" + program; + var report = message + ". Encountered at address " + pc + " of program"; throw new RulesEvaluationError(report, e); } @@ -125,94 +130,171 @@ private void resizeStack() { stack = newStack; } - private Object pop() { - return stack[--stackPosition]; // no need to clear out the memory since it's tied to lifetime of the VM. - } - - private Object peek() { - return stack[stackPosition - 1]; - } - - // Reads the next two bytes in little-endian order. - private int readUnsignedShort(int position) { - return EndpointUtils.bytesToShort(instructions, position); - } - + /* + * Implementation notes: + * 1. Read an unsigned short into an int from two bytes: + * ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF) + * 2. Read an unsigned byte into an int from a byte: + * X & 0xFF. For example instructions[++pc] & 0xFF. + * 3. The program counter, pc, is often incremented using "++" while reading it. + * 4. Avoid auto-boxing booleans and instead use `b ? Boolean.TRUE : Boolean.FALSE`. This eliminates the implicit + * call to Boolean.valueOf. + */ + @SuppressWarnings("unchecked") private Object run() { - var instructionSize = program.instructionSize; - var constantPool = program.constantPool; - var instructions = this.instructions; - var registers = this.registers; + final var instructionSize = program.instructionSize; + final var constantPool = program.constantPool; + final var instructions = this.instructions; + final var registers = this.registers; // Skip version, params, and register bytes. for (pc = program.instructionOffset + 3; pc < instructionSize; pc++) { switch (instructions[pc]) { - case RulesProgram.LOAD_CONST -> push(constantPool[instructions[++pc] & 0xFF]); // read unsigned byte + case RulesProgram.LOAD_CONST -> { + push(constantPool[instructions[++pc] & 0xFF]); // read unsigned byte + } case RulesProgram.LOAD_CONST_W -> { - push(constantPool[readUnsignedShort(pc + 1)]); // read unsigned short + // Read a two-byte unsigned short. + final int constIdx = ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); + push(constantPool[constIdx]); pc += 2; } - case RulesProgram.SET_REGISTER -> registers[instructions[++pc] & 0xFF] = peek(); // read unsigned byte - case RulesProgram.LOAD_REGISTER -> push(registers[instructions[++pc] & 0xFF]); // read unsigned byte + case RulesProgram.SET_REGISTER -> { + registers[instructions[++pc] & 0xFF] = stack[stackPosition - 1]; + } + case RulesProgram.LOAD_REGISTER -> { + push(registers[instructions[++pc] & 0xFF]); // read unsigned byte + } case RulesProgram.JUMP_IF_FALSEY -> { - Object value = pop(); + final Object value = stack[--stackPosition]; if (value == null || value == Boolean.FALSE) { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("VM jumping from {} to {}", pc, readUnsignedShort(pc + 1)); - LOGGER.debug(" - Stack ({}): {}", stackPosition, Arrays.toString(stack)); - LOGGER.debug(" - Registers: {}", Arrays.toString(registers)); + // Read a two-byte unsigned short. + final int jumpTarget = ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); + pc = jumpTarget - 1; + if (debugLoggingEnabled) { + logDebugJump(jumpTarget); } - pc = readUnsignedShort(pc + 1) - 1; // -1 because loop will increment } else { pc += 2; } } - case RulesProgram.NOT -> push(pop() == Boolean.FALSE); - case RulesProgram.ISSET -> push(pop() != null); - case RulesProgram.TEST_REGISTER_ISSET -> push(registers[instructions[++pc] & 0xFF] != null); + case RulesProgram.NOT -> { + push(stack[--stackPosition] == Boolean.FALSE ? Boolean.TRUE : Boolean.FALSE); + } + case RulesProgram.ISSET -> { + push(stack[--stackPosition] != null ? Boolean.TRUE : Boolean.FALSE); + } + case RulesProgram.TEST_REGISTER_ISSET -> { + push(registers[instructions[++pc] & 0xFF] != null ? Boolean.TRUE : Boolean.FALSE); + } case RulesProgram.RETURN_ERROR -> { - throw new RulesEvaluationError((String) pop(), pc); + throw new RulesEvaluationError((String) stack[--stackPosition], pc); } case RulesProgram.RETURN_ENDPOINT -> { - return setEndpoint(instructions[++pc]); + final var packed = instructions[++pc]; + final boolean hasHeaders = (packed & 1) != 0; + final boolean hasProperties = (packed & 2) != 0; + final var urlString = (String) stack[--stackPosition]; + final var properties = (Map) (hasProperties ? stack[--stackPosition] : Map.of()); + final var headers = (Map>) (hasHeaders ? stack[--stackPosition] : Map.of()); + final var builder = Endpoint.builder().uri(createUri(urlString)); + if (!headers.isEmpty()) { + builder.putProperty(EndpointContext.HEADERS, headers); + } + for (var extension : program.extensions) { + extension.extractEndpointProperties(builder, context, properties, headers); + } + return builder.build(); + } + case RulesProgram.CREATE_LIST -> { + final var size = instructions[++pc] & 0xFF; + push(switch (size) { + case 0 -> List.of(); + case 1 -> Collections.singletonList(stack[--stackPosition]); + default -> { + var values = new Object[size]; + for (var i = size - 1; i >= 0; i--) { + values[i] = stack[--stackPosition]; + } + yield Arrays.asList(values); + } + }); + } + case RulesProgram.CREATE_MAP -> { + final var size = instructions[++pc] & 0xFF; + push(switch (size) { + case 0 -> Map.of(); + case 1 -> Map.of((String) stack[--stackPosition], stack[--stackPosition]); + default -> { + Map map = new HashMap<>((int) (size / 0.75f) + 1); // Avoid rehashing + for (var i = 0; i < size; i++) { + map.put((String) stack[--stackPosition], stack[--stackPosition]); + } + yield map; + } + }); } - case RulesProgram.CREATE_LIST -> createList(instructions[++pc] & 0xFF); // read unsigned byte - case RulesProgram.CREATE_MAP -> createMap(instructions[++pc] & 0xFF); // read unsigned byte case RulesProgram.RESOLVE_TEMPLATE -> { - resolveTemplate((StringTemplate) constantPool[readUnsignedShort(pc + 1)]); + // Read a two-byte unsigned short. + final int constIdx = ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); + final var template = (StringTemplate) constantPool[constIdx]; + final var expressionCount = template.expressionCount(); + final var temp = getTempArray(expressionCount); + for (var i = 0; i < expressionCount; i++) { + temp[i] = stack[--stackPosition]; + } + push(template.resolve(expressionCount, temp)); pc += 2; } case RulesProgram.FN -> { - var fn = program.functions[instructions[++pc] & 0xFF]; // read unsigned byte + final var fn = program.functions[instructions[++pc] & 0xFF]; // read unsigned byte push(switch (fn.getOperandCount()) { case 0 -> fn.apply0(); - case 1 -> fn.apply1(pop()); + case 1 -> fn.apply1(stack[--stackPosition]); case 2 -> { - Object b = pop(); - Object a = pop(); + Object b = stack[--stackPosition]; + Object a = stack[--stackPosition]; yield fn.apply2(a, b); } default -> { // Pop arguments from stack in reverse order. var temp = getTempArray(fn.getOperandCount()); for (int i = fn.getOperandCount() - 1; i >= 0; i--) { - temp[i] = pop(); + temp[i] = stack[--stackPosition]; } yield fn.apply(temp); } }); } case RulesProgram.GET_ATTR -> { - var constant = readUnsignedShort(pc + 1); - AttrExpression getAttr = (AttrExpression) constantPool[constant]; - var target = pop(); + // Read a two-byte unsigned short. + final int constIdx = ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); + AttrExpression getAttr = (AttrExpression) program.constantPool[constIdx]; + final var target = stack[--stackPosition]; push(getAttr.apply(target)); pc += 2; } - case RulesProgram.IS_TRUE -> push(pop() == Boolean.TRUE); - case RulesProgram.TEST_REGISTER_IS_TRUE -> push(registers[instructions[++pc] & 0xFF] == Boolean.TRUE); + case RulesProgram.IS_TRUE -> { + push(stack[--stackPosition] == Boolean.TRUE ? Boolean.TRUE : Boolean.FALSE); + } + case RulesProgram.TEST_REGISTER_IS_TRUE -> { + push(registers[instructions[++pc] & 0xFF] == Boolean.TRUE ? Boolean.TRUE : Boolean.FALSE); + } + case RulesProgram.TEST_REGISTER_IS_FALSE -> { + push(registers[instructions[++pc] & 0xFF] == Boolean.FALSE ? Boolean.TRUE : Boolean.FALSE); + } case RulesProgram.RETURN_VALUE -> { - return pop(); + return stack[--stackPosition]; + } + case RulesProgram.EQUALS -> { + push(Objects.equals(stack[--stackPosition], stack[--stackPosition])); + } + case RulesProgram.SUBSTRING -> { + final var string = (String) stack[--stackPosition]; + final var start = instructions[++pc] & 0xFF; + final var end = instructions[++pc] & 0xFF; + final var reverse = (instructions[++pc] & 0xFF) != 0 ? Boolean.TRUE : Boolean.FALSE; + push(Substring.getSubstring(string, start, end, reverse)); } default -> { throw new RulesEvaluationError("Unknown rules engine instruction: " + instructions[pc]); @@ -223,63 +305,10 @@ private Object run() { throw new RulesEvaluationError("No value returned from rules engine"); } - private void createMap(int size) { - push(switch (size) { - case 0 -> Map.of(); - case 1 -> Map.of((String) pop(), pop()); - case 2 -> Map.of((String) pop(), pop(), (String) pop(), pop()); - case 3 -> Map.of((String) pop(), pop(), (String) pop(), pop(), (String) pop(), pop()); - default -> { - Map map = new HashMap<>((int) (size / 0.75f) + 1); // Avoid rehashing - for (var i = 0; i < size; i++) { - map.put((String) pop(), pop()); - } - yield map; - } - }); - } - - private void createList(int size) { - push(switch (size) { - case 0 -> List.of(); - case 1 -> Collections.singletonList(pop()); - default -> { - var values = new Object[size]; - for (var i = size - 1; i >= 0; i--) { - values[i] = pop(); - } - yield Arrays.asList(values); - } - }); - } - - private void resolveTemplate(StringTemplate template) { - var expressionCount = template.expressionCount(); - var temp = getTempArray(expressionCount); - for (var i = 0; i < expressionCount; i++) { - temp[i] = pop(); - } - push(template.resolve(expressionCount, temp)); - } - - @SuppressWarnings("unchecked") - private Endpoint setEndpoint(byte packed) { - boolean hasHeaders = (packed & 1) != 0; - boolean hasProperties = (packed & 2) != 0; - var urlString = (String) pop(); - var properties = (Map) (hasProperties ? pop() : Map.of()); - var headers = (Map>) (hasHeaders ? pop() : Map.of()); - var builder = Endpoint.builder().uri(createUri(urlString)); - - if (!headers.isEmpty()) { - builder.putProperty(EndpointContext.HEADERS, headers); - } - - for (var extension : program.extensions) { - extension.extractEndpointProperties(builder, context, properties, headers); - } - - return builder.build(); + private void logDebugJump(int jumpTarget) { + LOGGER.debug("VM jumping from {} to {}", pc, jumpTarget); + LOGGER.debug(" - Stack ({}): {}", stackPosition, Arrays.toString(stack)); + LOGGER.debug(" - Registers: {}", Arrays.toString(registers)); } public static URI createUri(String uriStr) { diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java index e9f7749ab..bcd731355 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java @@ -12,10 +12,9 @@ import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.io.uri.URLEncoding; import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsValidHostLabel; -import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring; /** - * Implements stdlib functions of the rules engine that weren't promoted to opcodes (GetAttr, isset, not). + * Implements stdlib functions of the rules engine that weren't promoted to opcodes (GetAttr, isset, not, substring). */ enum Stdlib implements RulesFunction { // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#stringequals-function @@ -36,19 +35,6 @@ public Object apply2(Object a, Object b) { } }, - // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#substring-function - SUBSTRING("substring", 4) { - @Override - public Object apply(Object... operands) { - // software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring.Definition.evaluate - String str = EndpointUtils.castFnArgument(operands[0], String.class, "substring", 1); - int startIndex = EndpointUtils.castFnArgument(operands[1], Number.class, "substring", 2).intValue(); - int stopIndex = EndpointUtils.castFnArgument(operands[2], Number.class, "substring", 3).intValue(); - boolean reverse = EndpointUtils.castFnArgument(operands[3], Boolean.class, "substring", 4); - return Substring.getSubstring(str, startIndex, stopIndex, reverse); - } - }, - // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#isvalidhostlabel-function IS_VALID_HOST_LABEL("isValidHostLabel", 2) { @Override @@ -63,6 +49,10 @@ public Object apply2(Object arg1, Object arg2) { PARSE_URL("parseURL", 1) { @Override public Object apply1(Object arg) { + if (arg == null) { + return null; + } + try { var result = new URI(EndpointUtils.castFnArgument(arg, String.class, "parseURL", 1)); if (null != result.getRawQuery()) { diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java index 1b76ae9ff..b26f84b1f 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java @@ -60,15 +60,6 @@ public void modifiesResolverIfCustomEndpointSet() { assertThat(builder.endpointResolver(), instanceOf(EndpointRulesResolver.class)); } - @Test - public void onlyModifiesResolverIfProgramFound() { - var plugin = EndpointRulesPlugin.from((RulesProgram) null); - var builder = ClientConfig.builder(); - plugin.configureClient(builder); - - assertThat(builder.endpointResolver(), not(instanceOf(EndpointRulesResolver.class))); - } - @Test public void loadsRulesFromServiceSchemaTraits() { var model = Model.assembler() diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java index e798315aa..c35b7cf9e 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java @@ -406,30 +406,20 @@ public Object apply0() { 0, RulesProgram.FN, 1, // uriEncode "hi there" : "hi%20there" - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_CONST, - 0, - RulesProgram.LOAD_CONST, - 1, - RulesProgram.LOAD_CONST, - 2, - RulesProgram.FN, - 2, // "hi_there" -> "there" RulesProgram.FN, - 3, // call gimme() + 2, // call gimme() RulesProgram.CREATE_LIST, - 4, // ["gimme", "there", "hi%20there", true] + 3, // ["gimme", "hi%20there", true] RulesProgram.RETURN_VALUE}; var program = engine.precompiledBuilder() .bytecode(bytecode) .constantPool(3, 8, false) .parameters(new ParamDefinition("a", false, "hi there", null)) - .functionNames("stringEquals", "uriEncode", "substring", "gimme") + .functionNames("stringEquals", "uriEncode", "gimme") .build(); var result = program.run(Context.create(), Map.of()); - assertThat(result, equalTo(List.of(true, "hi%20there", "there", "gimme"))); + assertThat(result, equalTo(List.of(true, "hi%20there", "gimme"))); } @Test diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java index c394adf54..27390a843 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java @@ -46,19 +46,6 @@ public void parseUrl() throws Exception { Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.PARSE_URL.apply1("\\")); } - @Test - public void handlesSubstrings() { - assertThat(Stdlib.SUBSTRING.apply("abc", 0, 1, false), equalTo("a")); - assertThat(Stdlib.SUBSTRING.apply("abc", 0, 2, false), equalTo("ab")); - assertThat(Stdlib.SUBSTRING.apply("abc", 0, 3, false), equalTo("abc")); - assertThat(Stdlib.SUBSTRING.apply("abc", 1, 2, false), equalTo("b")); - assertThat(Stdlib.SUBSTRING.apply("abc", 1, 3, false), equalTo("bc")); - assertThat(Stdlib.SUBSTRING.apply("abc", 2, 3, false), equalTo("c")); - - assertThat(Stdlib.SUBSTRING.apply("abc", 2, 3, true), equalTo("a")); - assertThat(Stdlib.SUBSTRING.apply("abc", 1, 3, true), equalTo("ab")); - } - @ParameterizedTest @CsvSource({ // Valid simple host labels (no dots) diff --git a/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicClient.java b/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicClient.java index da4c1b3c7..8bce5b41f 100644 --- a/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicClient.java +++ b/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicClient.java @@ -182,6 +182,16 @@ public CompletableFuture callAsync( return call(inputStruct, apiOperation, overrideConfig).thenApply(Function.identity()); } + /** + * Get an ApiOperation by name. + * + * @param name Name of the operation to get. + * @return the operation. + */ + public ApiOperation getOperation(String name) { + return getApiOperation(name); + } + /** * Create a {@link SerializableStruct} from a schema and document. * diff --git a/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicOperation.java b/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicOperation.java index 252fadcf1..f758daf36 100644 --- a/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicOperation.java +++ b/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicOperation.java @@ -51,8 +51,8 @@ public final class DynamicOperation implements ApiOperation + + + + + + From 827eb98e30a09080c08d461d360b3d3cfb06db57 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Tue, 20 May 2025 16:22:15 -0500 Subject: [PATCH 07/13] Add peephole optimization for checking null registers --- .../client/rulesengine/RulesCompiler.java | 15 ++++++- .../java/client/rulesengine/RulesProgram.java | 42 ++++++++++++------- .../java/client/rulesengine/RulesVm.java | 3 ++ 3 files changed, 43 insertions(+), 17 deletions(-) diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java index 6e3027eac..15b7e5875 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java @@ -20,6 +20,7 @@ import software.amazon.smithy.rulesengine.language.syntax.expressions.Reference; import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.FunctionDefinition; import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.GetAttr; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsSet; import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.BooleanLiteral; import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.IntegerLiteral; import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal; @@ -294,8 +295,13 @@ public Void visitIsSet(Expression fn) { @Override public Void visitNot(Expression not) { - compileExpression(not); - add_NOT(); + if (not instanceof IsSet isset && isset.getArguments().get(0) instanceof Reference ref) { + add_TEST_REGISTER_NOT_SET(ref.getName().toString()); + return null; + } else { + compileExpression(not); + add_NOT(); + } return null; } @@ -487,6 +493,11 @@ private void add_TEST_REGISTER_ISSET(String register) { addInstruction(getRegister(register)); } + private void add_TEST_REGISTER_NOT_SET(String register) { + addInstruction(RulesProgram.TEST_REGISTER_NOT_SET); + addInstruction(getRegister(register)); + } + private void add_RETURN_ERROR() { addInstruction(RulesProgram.RETURN_ERROR); } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java index 779d5ee51..3d411f079 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java @@ -70,38 +70,45 @@ public final class RulesProgram { static final byte ISSET = 6; /** - * Checks if a register is set to something that is boolean true or a non null value. + * Checks if a register is set to a non-null value. * *

Must be followed by an unsigned byte that represents the register to check. */ static final byte TEST_REGISTER_ISSET = 7; + /** + * Checks if a register is not set or set to a null value. + * + *

Must be followed by an unsigned byte that represents the register to check. + */ + static final byte TEST_REGISTER_NOT_SET = 8; + /** * Sets an error on the VM and exits. * *

Pops a single value that provides the error string to set. */ - static final byte RETURN_ERROR = 8; + static final byte RETURN_ERROR = 9; /** * Sets the endpoint result of the VM and exits. Pops the top of the stack, expecting a string value. The opcode * must be followed by a byte where the first bit of the byte is on if the endpoint has headers, and the second * bit is on if the endpoint has properties. */ - static final byte RETURN_ENDPOINT = 9; + static final byte RETURN_ENDPOINT = 10; /** * Pops N values off the stack and pushes a list of those values onto the stack. Must be followed by an unsigned * byte that defines the number of elements in the list. */ - static final byte CREATE_LIST = 10; + static final byte CREATE_LIST = 11; /** * Pops N*2 values off the stack (key then value), creates a map of those values, and pushes the map onto the * stack. Each popped key must be a string. Must be followed by an unsigned byte that defines the * number of entries in the map. */ - static final byte CREATE_MAP = 11; + static final byte CREATE_MAP = 12; /** * Resolves a template string. Must be followed by two bytes, a short, that represents the constant pool index @@ -111,7 +118,7 @@ public final class RulesProgram { * The popped values fill in values into the template. The resolved template value as a string is then pushed onto * the stack. */ - static final byte RESOLVE_TEMPLATE = 12; + static final byte RESOLVE_TEMPLATE = 13; /** * Calls a function. Must be followed by a byte to provide the function index to call. @@ -119,7 +126,7 @@ public final class RulesProgram { *

The function pops zero or more values off the stack based on the RulesFunction registered for the index, * and then pushes the Object result onto the stack. */ - static final byte FN = 13; + static final byte FN = 14; /** * Pops the top level value and applies a getAttr expression on it, pushing the result onto the stack. @@ -127,37 +134,37 @@ public final class RulesProgram { *

Must be followed by two bytes, a short, that represents the constant pool index that stores the * AttrExpression. */ - static final byte GET_ATTR = 14; + static final byte GET_ATTR = 15; /** * Pops a value and pushes true if the value is boolean true, false if not. */ - static final byte IS_TRUE = 15; + static final byte IS_TRUE = 16; /** * Checks if a register is boolean true and pushes the result onto the stack. * *

Must be followed by a byte that represents the register to check. */ - static final byte TEST_REGISTER_IS_TRUE = 16; + static final byte TEST_REGISTER_IS_TRUE = 17; /** * Checks if a register is boolean false and pushes the result onto the stack. * *

Must be followed by a byte that represents the register to check. */ - static final byte TEST_REGISTER_IS_FALSE = 17; + static final byte TEST_REGISTER_IS_FALSE = 18; /** * Pops the value at the top of the stack and returns it from the VM. This can be used for testing purposes or * for returning things other than endpoint values. */ - static final byte RETURN_VALUE = 18; + static final byte RETURN_VALUE = 19; /** * Pops the top two values off the stack and performs Objects.equals on them, pushing the result onto the stack. */ - static final byte EQUALS = 19; + static final byte EQUALS = 20; /** * Pops the top value off the stack, expecting a string, and extracts a substring of it, pushing the result onto @@ -166,7 +173,7 @@ public final class RulesProgram { *

Must be followed by three bytes: the start position in the string, the end position in the string, and * a byte set to 1 if the substring is "reversed" (from the end) or not. */ - static final byte SUBSTRING = 20; + static final byte SUBSTRING = 21; final List extensions; final Object[] constantPool; @@ -392,7 +399,12 @@ private int writeInstruction(StringBuilder s, int pc) { case TEST_REGISTER_ISSET -> { skip = 1; show = Show.REGISTER; - yield "TEST_REGISTER_SET"; + yield "TEST_REGISTER_ISSET"; + } + case TEST_REGISTER_NOT_SET -> { + skip = 1; + show = Show.REGISTER; + yield "TEST_REGISTER_NOT_SET"; } case RETURN_ERROR -> "RETURN_ERROR"; case RETURN_ENDPOINT -> { diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java index dc6dc056b..07eb9f6c7 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java @@ -187,6 +187,9 @@ private Object run() { case RulesProgram.TEST_REGISTER_ISSET -> { push(registers[instructions[++pc] & 0xFF] != null ? Boolean.TRUE : Boolean.FALSE); } + case RulesProgram.TEST_REGISTER_NOT_SET -> { + push(registers[instructions[++pc] & 0xFF] == null ? Boolean.TRUE : Boolean.FALSE); + } case RulesProgram.RETURN_ERROR -> { throw new RulesEvaluationError((String) stack[--stackPosition], pc); } From 87e9887fcb57a5d0e76037b0b664d1bf030ac55e Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Fri, 18 Jul 2025 18:47:29 -0500 Subject: [PATCH 08/13] Update VM and rules engine to work with BDD Now the VM supports running the bytecode of a specific condition or resolving a specific result. Control flow is owned by the BddEvaluator, and VM condition handling is done through a ConditionEvaluator. --- .../aws-client-rulesengine/build.gradle.kts | 7 +- .../java/aws/client/rulesengine/Bench.java | 14 +- .../client/rulesengine/AwsRulesBuiltin.java | 22 +- .../client/rulesengine/AwsRulesExtension.java | 10 +- .../client/rulesengine/AwsRulesFunction.java | 2 +- .../java/aws/client/rulesengine/s3.json | 69972 +++++++--------- .../aws/client/rulesengine/ResolverTest.java | 21 +- client/client-rulesengine/build.gradle.kts | 11 +- .../java/client/rulesengine/VmBench.java | 96 - .../client/rulesengine/AttrExpression.java | 136 - .../java/client/rulesengine/Bytecode.java | 427 + .../client/rulesengine/BytecodeCompiler.java | 466 + .../rulesengine/BytecodeDisassembler.java | 427 + .../rulesengine/BytecodeEndpointResolver.java | 77 + .../client/rulesengine/BytecodeEvaluator.java | 424 + .../client/rulesengine/BytecodeReader.java | 103 + .../client/rulesengine/BytecodeWriter.java | 295 + .../client/rulesengine/ContextProvider.java | 15 + .../DecisionTreeEndpointResolver.java | 88 + .../rulesengine/EndpointRulesPlugin.java | 78 +- .../rulesengine/EndpointRulesResolver.java | 60 - .../client/rulesengine/EndpointUtils.java | 112 +- .../java/client/rulesengine/Opcodes.java | 403 + .../client/rulesengine/RegisterAllocator.java | 74 + ...efinition.java => RegisterDefinition.java} | 9 +- .../client/rulesengine/RegisterFiller.java | 216 + .../client/rulesengine/RulesCompiler.java | 581 - .../java/client/rulesengine/RulesEngine.java | 206 - .../rulesengine/RulesEngineBuilder.java | 243 + .../client/rulesengine/RulesExtension.java | 16 +- .../client/rulesengine/RulesFunction.java | 28 +- .../java/client/rulesengine/RulesProgram.java | 520 - .../java/client/rulesengine/RulesVm.java | 348 - .../java/client/rulesengine/StdExtension.java | 21 + .../java/client/rulesengine/Stdlib.java | 106 - .../client/rulesengine/StringTemplate.java | 119 - .../java/client/rulesengine/UriFactory.java | 66 + .../rulesengine/AttrExpressionTest.java | 48 - .../rulesengine/EndpointRulesPluginTest.java | 22 +- .../EndpointRulesResolverTest.java | 184 - .../client/rulesengine/EndpointUtilsTest.java | 157 - .../client/rulesengine/RulesCompilerTest.java | 157 - .../client/rulesengine/RulesEngineTest.java | 149 - .../client/rulesengine/RulesProgramTest.java | 106 - .../java/client/rulesengine/RulesVmTest.java | 447 - .../java/client/rulesengine/StdlibTest.java | 89 - .../rulesengine/StringTemplateTest.java | 70 - .../core/serde/document/DocumentUtils.java | 15 +- 48 files changed, 35102 insertions(+), 42161 deletions(-) delete mode 100644 client/client-rulesengine/src/jmh/java/software/amazon/smithy/java/client/rulesengine/VmBench.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/AttrExpression.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocator.java rename client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/{ParamDefinition.java => RegisterDefinition.java} (65%) create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngine.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StdExtension.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java delete mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StringTemplate.java create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/UriFactory.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/AttrExpressionTest.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineTest.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesProgramTest.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java delete mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StringTemplateTest.java diff --git a/aws/client/aws-client-rulesengine/build.gradle.kts b/aws/client/aws-client-rulesengine/build.gradle.kts index 42a93b26c..213b37b51 100644 --- a/aws/client/aws-client-rulesengine/build.gradle.kts +++ b/aws/client/aws-client-rulesengine/build.gradle.kts @@ -15,6 +15,7 @@ dependencies { testImplementation(libs.smithy.aws.traits) testImplementation(project(":aws:client:aws-client-restxml")) + testImplementation(project(":aws:client:aws-client-restjson")) testImplementation(project(":client:dynamic-client")) } @@ -32,10 +33,10 @@ sourceSets { } jmh { - warmupIterations = 2 + warmupIterations = 3 iterations = 5 fork = 1 - profilers.add("async:output=flamegraph") + profilers.add("async:output=flamegraph") // profilers.add("gc") - duplicateClassesStrategy = DuplicatesStrategy.WARN + duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE // don't dump a bunch of warnings. } diff --git a/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java b/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java index c5c7e5ff5..c1580c480 100644 --- a/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java +++ b/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java @@ -9,20 +9,17 @@ import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; -import org.openjdk.jmh.annotations.Fork; -import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; -import org.openjdk.jmh.annotations.Warmup; import software.amazon.smithy.java.aws.client.core.settings.EndpointSettings; import software.amazon.smithy.java.client.core.auth.scheme.AuthSchemeResolver; import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; import software.amazon.smithy.java.client.rulesengine.EndpointRulesPlugin; -import software.amazon.smithy.java.client.rulesengine.RulesEngine; +import software.amazon.smithy.java.client.rulesengine.RulesEngineBuilder; import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.core.serde.document.Document; import software.amazon.smithy.java.dynamicclient.DynamicClient; @@ -38,9 +35,6 @@ @State(Scope.Benchmark) @OutputTimeUnit(TimeUnit.NANOSECONDS) @BenchmarkMode(Mode.AverageTime) -@Warmup(iterations = 2, time = 3) -@Measurement(iterations = 3, time = 3) -@Fork(1) public class Bench { private DynamicClient client; private EndpointResolver endpointResolver; @@ -57,7 +51,7 @@ public void setup() { model = customizeS3Model(model); var service = model.expectShape(ShapeId.from("com.amazonaws.s3#AmazonS3"), ServiceShape.class); - var engine = new RulesEngine(); + var engine = new RulesEngineBuilder(); var plugin = EndpointRulesPlugin.create(engine); client = DynamicClient.builder() @@ -69,11 +63,13 @@ public void setup() { endpointResolver = client.config().endpointResolver(); var ctx = Context.create(); ctx.put(EndpointSettings.REGION, "us-east-1"); +// ctx.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, Map.of("ForcePathStyle", true)); var inputValue = client.createStruct(ShapeId.from("com.amazonaws.s3#GetObjectRequest"), Document.of(Map.of( "Bucket", - Document.of("foo"), + Document.of("miked"), + //, Document.of("foo"), "Key", Document.of("bar")))); endpointParams = EndpointResolverParams.builder() diff --git a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesBuiltin.java b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesBuiltin.java index e5ecb1f45..93140cf70 100644 --- a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesBuiltin.java +++ b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesBuiltin.java @@ -7,7 +7,6 @@ import java.util.HashMap; import java.util.Map; -import java.util.function.BiFunction; import java.util.function.Function; import software.amazon.smithy.java.aws.auth.api.identity.AwsCredentialsIdentity; import software.amazon.smithy.java.aws.client.core.settings.AccountIdSetting; @@ -123,21 +122,12 @@ public Object apply(Context context) { } }; - static final BiFunction BUILTIN_PROVIDER = new BuiltinProvider(); - - private static final class BuiltinProvider implements BiFunction { - private final Map> providers = new HashMap<>(); - - private BuiltinProvider() { - for (var e : values()) { - providers.put(e.name, e); - } - } - - @Override - public Object apply(String name, Context context) { - var match = providers.get(name); - return match == null ? null : match.apply(context); + static final Map> BUILTINS; + static { + var values = values(); + BUILTINS = new HashMap<>(values.length); + for (var e : values) { + BUILTINS.put(e.name, e); } } diff --git a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesExtension.java b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesExtension.java index 92210ebcb..0f26afe60 100644 --- a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesExtension.java +++ b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesExtension.java @@ -6,8 +6,8 @@ package software.amazon.smithy.java.aws.client.rulesengine; import java.util.Arrays; -import java.util.List; -import java.util.function.BiFunction; +import java.util.Map; +import java.util.function.Function; import software.amazon.smithy.java.client.rulesengine.RulesExtension; import software.amazon.smithy.java.client.rulesengine.RulesFunction; import software.amazon.smithy.java.context.Context; @@ -21,12 +21,12 @@ @SmithyUnstableApi public class AwsRulesExtension implements RulesExtension { @Override - public BiFunction getBuiltinProvider() { - return AwsRulesBuiltin.BUILTIN_PROVIDER; + public void putBuiltinProviders(Map> providers) { + providers.putAll(AwsRulesBuiltin.BUILTINS); } @Override - public List getFunctions() { + public Iterable getFunctions() { return Arrays.asList(AwsRulesFunction.values()); } } diff --git a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java index 4a22acb83..632427479 100644 --- a/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java +++ b/aws/client/aws-client-rulesengine/src/main/java/software/amazon/smithy/java/aws/client/rulesengine/AwsRulesFunction.java @@ -128,7 +128,7 @@ public String toString() { } @Override - public int getOperandCount() { + public int getArgumentCount() { return operands; } diff --git a/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json b/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json index e43f78b87..d9bd3f8f8 100644 --- a/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json +++ b/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json @@ -1,39275 +1,32501 @@ { - "smithy": "2.0", - "metadata": { - "suppressions": [ - { - "id": "HttpMethodSemantics", - "namespace": "*" - }, - { - "id": "HttpResponseCodeSemantics", - "namespace": "*" - }, - { - "id": "PaginatedTrait", - "namespace": "*" - }, - { - "id": "HttpHeaderTrait", - "namespace": "*" - }, - { - "id": "HttpUriConflict", - "namespace": "*" - }, - { - "id": "Service", - "namespace": "*" - } - ] - }, - "shapes": { - "com.amazonaws.s3#AbortDate": { - "type": "timestamp" - }, - "com.amazonaws.s3#AbortIncompleteMultipartUpload": { - "type": "structure", - "members": { - "DaysAfterInitiation": { - "target": "com.amazonaws.s3#DaysAfterInitiation", - "traits": { - "smithy.api#documentation": "

Specifies the number of days after which Amazon S3 aborts an incomplete multipart\n upload.

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

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will\n wait before permanently removing all parts of the upload. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in\n the Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#AbortMultipartUpload": { - "type": "operation", + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.s3#AbortDate": { + "type": "timestamp" + }, + "com.amazonaws.s3#AbortIncompleteMultipartUpload": { + "type": "structure", + "members": { + "DaysAfterInitiation": { + "target": "com.amazonaws.s3#DaysAfterInitiation", + "traits": { + "smithy.api#documentation": "

Specifies the number of days after which Amazon S3 aborts an incomplete multipart\n upload.

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

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will\n wait before permanently removing all parts of the upload. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in\n the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#AbortMultipartUpload": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#AbortMultipartUploadRequest" + }, + "output": { + "target": "com.amazonaws.s3#AbortMultipartUploadOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchUpload" + } + ], + "traits": { + "smithy.api#documentation": "

This operation aborts a multipart upload. After a multipart upload is aborted, no\n additional parts can be uploaded using that upload ID. The storage consumed by any\n previously uploaded parts will be freed. However, if any part uploads are currently in\n progress, those part uploads might or might not succeed. As a result, it might be necessary\n to abort a given multipart upload multiple times in order to completely free all storage\n consumed by all parts.

\n

To verify that all parts have been removed and prevent getting charged for the part\n storage, you should call the ListParts API operation and ensure\n that the parts list is empty.

\n \n
    \n
  • \n

    \n Directory buckets - If multipart\n uploads in a directory bucket are in progress, you can't delete the bucket until\n all the in-progress multipart uploads are aborted or completed. To delete these\n in-progress multipart uploads, use the ListMultipartUploads operation\n to list the in-progress multipart uploads in the bucket and use the\n AbortMultipartUpload operation to abort all the in-progress\n multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to AbortMultipartUpload:

\n ", + "smithy.api#examples": [ + { + "title": "To abort a multipart upload", + "documentation": "The following example aborts a multipart upload.", "input": { - "target": "com.amazonaws.s3#AbortMultipartUploadRequest" - }, - "output": { - "target": "com.amazonaws.s3#AbortMultipartUploadOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#NoSuchUpload" - } - ], - "traits": { - "smithy.api#documentation": "

This operation aborts a multipart upload. After a multipart upload is aborted, no\n additional parts can be uploaded using that upload ID. The storage consumed by any\n previously uploaded parts will be freed. However, if any part uploads are currently in\n progress, those part uploads might or might not succeed. As a result, it might be necessary\n to abort a given multipart upload multiple times in order to completely free all storage\n consumed by all parts.

\n

To verify that all parts have been removed and prevent getting charged for the part\n storage, you should call the ListParts API operation and ensure\n that the parts list is empty.

\n \n
    \n
  • \n

    \n Directory buckets - If multipart\n uploads in a directory bucket are in progress, you can't delete the bucket until\n all the in-progress multipart uploads are aborted or completed. To delete these\n in-progress multipart uploads, use the ListMultipartUploads operation\n to list the in-progress multipart uploads in the bucket and use the\n AbortMultipartUpload operation to abort all the in-progress\n multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to AbortMultipartUpload:

\n ", - "smithy.api#examples": [ - { - "title": "To abort a multipart upload", - "documentation": "The following example aborts a multipart upload.", - "input": { - "Bucket": "examplebucket", - "Key": "bigobject", - "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" - }, - "output": {} - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", - "code": 204 - } - } + "Bucket": "examplebucket", + "Key": "bigobject", + "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", + "code": 204 + } + } + }, + "com.amazonaws.s3#AbortMultipartUploadOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#AbortMultipartUploadRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name to which the upload was taking place.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

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

Key of the object for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID that identifies the multipart upload.

", + "smithy.api#httpQuery": "uploadId", + "smithy.api#required": {} + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp.\n If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. \n If the initiated timestamp matches or if the multipart upload doesn\u2019t exist, the operation returns a 204 Success (No Content) response. \n

\n \n

This functionality is only supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-if-match-initiated-time" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#AbortRuleId": { + "type": "string" + }, + "com.amazonaws.s3#AccelerateConfiguration": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#BucketAccelerateStatus", + "traits": { + "smithy.api#documentation": "

Specifies the transfer acceleration status of the bucket.

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

Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see\n Amazon S3\n Transfer Acceleration in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#AcceptRanges": { + "type": "string" + }, + "com.amazonaws.s3#AccessControlPolicy": { + "type": "structure", + "members": { + "Grants": { + "target": "com.amazonaws.s3#Grants", + "traits": { + "smithy.api#documentation": "

A list of grants.

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

Container for the bucket owner's display name and ID.

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

Contains the elements that set the ACL permissions for an object per grantee.

" + } + }, + "com.amazonaws.s3#AccessControlTranslation": { + "type": "structure", + "members": { + "Owner": { + "target": "com.amazonaws.s3#OwnerOverride", + "traits": { + "smithy.api#documentation": "

Specifies the replica ownership. For default and valid values, see PUT bucket\n replication in the Amazon S3 API Reference.

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

A container for information about access control for replicas.

" + } + }, + "com.amazonaws.s3#AccessKeyIdValue": { + "type": "string" + }, + "com.amazonaws.s3#AccessPointAlias": { + "type": "boolean" + }, + "com.amazonaws.s3#AccessPointArn": { + "type": "string" + }, + "com.amazonaws.s3#AccountId": { + "type": "string" + }, + "com.amazonaws.s3#AllowQuotedRecordDelimiter": { + "type": "boolean" + }, + "com.amazonaws.s3#AllowedHeader": { + "type": "string" + }, + "com.amazonaws.s3#AllowedHeaders": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#AllowedHeader" + } + }, + "com.amazonaws.s3#AllowedMethod": { + "type": "string" + }, + "com.amazonaws.s3#AllowedMethods": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#AllowedMethod" + } + }, + "com.amazonaws.s3#AllowedOrigin": { + "type": "string" + }, + "com.amazonaws.s3#AllowedOrigins": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#AllowedOrigin" + } + }, + "com.amazonaws.s3#AmazonS3": { + "type": "service", + "version": "2006-03-01", + "operations": [ + { + "target": "com.amazonaws.s3#AbortMultipartUpload" }, - "com.amazonaws.s3#AbortMultipartUploadOutput": { - "type": "structure", - "members": { - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } - }, - "traits": { - "smithy.api#output": {} - } + { + "target": "com.amazonaws.s3#CompleteMultipartUpload" }, - "com.amazonaws.s3#AbortMultipartUploadRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name to which the upload was taking place.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Key of the object for which the multipart upload was initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "UploadId": { - "target": "com.amazonaws.s3#MultipartUploadId", - "traits": { - "smithy.api#documentation": "

Upload ID that identifies the multipart upload.

", - "smithy.api#httpQuery": "uploadId", - "smithy.api#required": {} - } - }, - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp.\n If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. \n If the initiated timestamp matches or if the multipart upload doesn\u2019t exist, the operation returns a 204 Success (No Content) response. \n

\n \n

This functionality is only supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-if-match-initiated-time" - } - } - }, - "traits": { - "smithy.api#input": {} - } + { + "target": "com.amazonaws.s3#CopyObject" }, - "com.amazonaws.s3#AbortRuleId": { - "type": "string" + { + "target": "com.amazonaws.s3#CreateBucket" }, - "com.amazonaws.s3#AccelerateConfiguration": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#BucketAccelerateStatus", - "traits": { - "smithy.api#documentation": "

Specifies the transfer acceleration status of the bucket.

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

Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see\n Amazon S3\n Transfer Acceleration in the Amazon S3 User Guide.

" - } + { + "target": "com.amazonaws.s3#CreateBucketMetadataTableConfiguration" }, - "com.amazonaws.s3#AcceptRanges": { - "type": "string" - }, - "com.amazonaws.s3#AccessControlPolicy": { - "type": "structure", - "members": { - "Grants": { - "target": "com.amazonaws.s3#Grants", - "traits": { - "smithy.api#documentation": "

A list of grants.

", - "smithy.api#xmlName": "AccessControlList" - } - }, - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

Container for the bucket owner's display name and ID.

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

Contains the elements that set the ACL permissions for an object per grantee.

" - } + { + "target": "com.amazonaws.s3#CreateMultipartUpload" }, - "com.amazonaws.s3#AccessControlTranslation": { - "type": "structure", - "members": { - "Owner": { - "target": "com.amazonaws.s3#OwnerOverride", - "traits": { - "smithy.api#documentation": "

Specifies the replica ownership. For default and valid values, see PUT bucket\n replication in the Amazon S3 API Reference.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

A container for information about access control for replicas.

" - } + { + "target": "com.amazonaws.s3#CreateSession" }, - "com.amazonaws.s3#AccessKeyIdValue": { - "type": "string" + { + "target": "com.amazonaws.s3#DeleteBucket" }, - "com.amazonaws.s3#AccessPointAlias": { - "type": "boolean" + { + "target": "com.amazonaws.s3#DeleteBucketAnalyticsConfiguration" }, - "com.amazonaws.s3#AccessPointArn": { - "type": "string" + { + "target": "com.amazonaws.s3#DeleteBucketCors" }, - "com.amazonaws.s3#AccountId": { - "type": "string" + { + "target": "com.amazonaws.s3#DeleteBucketEncryption" }, - "com.amazonaws.s3#AllowQuotedRecordDelimiter": { - "type": "boolean" + { + "target": "com.amazonaws.s3#DeleteBucketIntelligentTieringConfiguration" }, - "com.amazonaws.s3#AllowedHeader": { - "type": "string" + { + "target": "com.amazonaws.s3#DeleteBucketInventoryConfiguration" }, - "com.amazonaws.s3#AllowedHeaders": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#AllowedHeader" - } + { + "target": "com.amazonaws.s3#DeleteBucketLifecycle" }, - "com.amazonaws.s3#AllowedMethod": { - "type": "string" + { + "target": "com.amazonaws.s3#DeleteBucketMetadataTableConfiguration" }, - "com.amazonaws.s3#AllowedMethods": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#AllowedMethod" - } + { + "target": "com.amazonaws.s3#DeleteBucketMetricsConfiguration" }, - "com.amazonaws.s3#AllowedOrigin": { - "type": "string" + { + "target": "com.amazonaws.s3#DeleteBucketOwnershipControls" }, - "com.amazonaws.s3#AllowedOrigins": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#AllowedOrigin" - } + { + "target": "com.amazonaws.s3#DeleteBucketPolicy" }, - "com.amazonaws.s3#AmazonS3": { - "type": "service", - "version": "2006-03-01", - "operations": [ - { - "target": "com.amazonaws.s3#AbortMultipartUpload" - }, - { - "target": "com.amazonaws.s3#CompleteMultipartUpload" + { + "target": "com.amazonaws.s3#DeleteBucketReplication" + }, + { + "target": "com.amazonaws.s3#DeleteBucketTagging" + }, + { + "target": "com.amazonaws.s3#DeleteBucketWebsite" + }, + { + "target": "com.amazonaws.s3#DeleteObject" + }, + { + "target": "com.amazonaws.s3#DeleteObjects" + }, + { + "target": "com.amazonaws.s3#DeleteObjectTagging" + }, + { + "target": "com.amazonaws.s3#DeletePublicAccessBlock" + }, + { + "target": "com.amazonaws.s3#GetBucketAccelerateConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketAcl" + }, + { + "target": "com.amazonaws.s3#GetBucketAnalyticsConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketCors" + }, + { + "target": "com.amazonaws.s3#GetBucketEncryption" + }, + { + "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketInventoryConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketLifecycleConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketLocation" + }, + { + "target": "com.amazonaws.s3#GetBucketLogging" + }, + { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketMetricsConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketNotificationConfiguration" + }, + { + "target": "com.amazonaws.s3#GetBucketOwnershipControls" + }, + { + "target": "com.amazonaws.s3#GetBucketPolicy" + }, + { + "target": "com.amazonaws.s3#GetBucketPolicyStatus" + }, + { + "target": "com.amazonaws.s3#GetBucketReplication" + }, + { + "target": "com.amazonaws.s3#GetBucketRequestPayment" + }, + { + "target": "com.amazonaws.s3#GetBucketTagging" + }, + { + "target": "com.amazonaws.s3#GetBucketVersioning" + }, + { + "target": "com.amazonaws.s3#GetBucketWebsite" + }, + { + "target": "com.amazonaws.s3#GetObject" + }, + { + "target": "com.amazonaws.s3#GetObjectAcl" + }, + { + "target": "com.amazonaws.s3#GetObjectAttributes" + }, + { + "target": "com.amazonaws.s3#GetObjectLegalHold" + }, + { + "target": "com.amazonaws.s3#GetObjectLockConfiguration" + }, + { + "target": "com.amazonaws.s3#GetObjectRetention" + }, + { + "target": "com.amazonaws.s3#GetObjectTagging" + }, + { + "target": "com.amazonaws.s3#GetObjectTorrent" + }, + { + "target": "com.amazonaws.s3#GetPublicAccessBlock" + }, + { + "target": "com.amazonaws.s3#HeadBucket" + }, + { + "target": "com.amazonaws.s3#HeadObject" + }, + { + "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurations" + }, + { + "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurations" + }, + { + "target": "com.amazonaws.s3#ListBucketInventoryConfigurations" + }, + { + "target": "com.amazonaws.s3#ListBucketMetricsConfigurations" + }, + { + "target": "com.amazonaws.s3#ListBuckets" + }, + { + "target": "com.amazonaws.s3#ListDirectoryBuckets" + }, + { + "target": "com.amazonaws.s3#ListMultipartUploads" + }, + { + "target": "com.amazonaws.s3#ListObjects" + }, + { + "target": "com.amazonaws.s3#ListObjectsV2" + }, + { + "target": "com.amazonaws.s3#ListObjectVersions" + }, + { + "target": "com.amazonaws.s3#ListParts" + }, + { + "target": "com.amazonaws.s3#PutBucketAccelerateConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketAcl" + }, + { + "target": "com.amazonaws.s3#PutBucketAnalyticsConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketCors" + }, + { + "target": "com.amazonaws.s3#PutBucketEncryption" + }, + { + "target": "com.amazonaws.s3#PutBucketIntelligentTieringConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketInventoryConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketLifecycleConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketLogging" + }, + { + "target": "com.amazonaws.s3#PutBucketMetricsConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketNotificationConfiguration" + }, + { + "target": "com.amazonaws.s3#PutBucketOwnershipControls" + }, + { + "target": "com.amazonaws.s3#PutBucketPolicy" + }, + { + "target": "com.amazonaws.s3#PutBucketReplication" + }, + { + "target": "com.amazonaws.s3#PutBucketRequestPayment" + }, + { + "target": "com.amazonaws.s3#PutBucketTagging" + }, + { + "target": "com.amazonaws.s3#PutBucketVersioning" + }, + { + "target": "com.amazonaws.s3#PutBucketWebsite" + }, + { + "target": "com.amazonaws.s3#PutObject" + }, + { + "target": "com.amazonaws.s3#PutObjectAcl" + }, + { + "target": "com.amazonaws.s3#PutObjectLegalHold" + }, + { + "target": "com.amazonaws.s3#PutObjectLockConfiguration" + }, + { + "target": "com.amazonaws.s3#PutObjectRetention" + }, + { + "target": "com.amazonaws.s3#PutObjectTagging" + }, + { + "target": "com.amazonaws.s3#PutPublicAccessBlock" + }, + { + "target": "com.amazonaws.s3#RestoreObject" + }, + { + "target": "com.amazonaws.s3#SelectObjectContent" + }, + { + "target": "com.amazonaws.s3#UploadPart" + }, + { + "target": "com.amazonaws.s3#UploadPartCopy" + }, + { + "target": "com.amazonaws.s3#WriteGetObjectResponse" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "S3", + "arnNamespace": "s3", + "cloudFormationName": "S3", + "cloudTrailEventSource": "s3.amazonaws.com", + "endpointPrefix": "s3" + }, + "aws.auth#sigv4": { + "name": "s3" + }, + "aws.protocols#restXml": { + "noErrorWrapping": true + }, + "smithy.api#documentation": "

", + "smithy.api#suppress": [ + "RuleSetAuthSchemes" + ], + "smithy.api#title": "Amazon Simple Storage Service", + "smithy.api#xmlNamespace": { + "uri": "http://s3.amazonaws.com/doc/2006-03-01/" + }, + "smithy.rules#clientContextParams": { + "ForcePathStyle": { + "documentation": "Forces this client to use path-style addressing for buckets.", + "type": "boolean" + }, + "UseArnRegion": { + "documentation": "Enables this client to use an ARN's region when constructing an endpoint instead of the client's configured region.", + "type": "boolean" + }, + "DisableMultiRegionAccessPoints": { + "documentation": "Disables this client's usage of Multi-Region Access Points.", + "type": "boolean" + }, + "Accelerate": { + "documentation": "Enables this client to use S3 Transfer Acceleration endpoints.", + "type": "boolean" + }, + "DisableS3ExpressSessionAuth": { + "documentation": "Disables this client's usage of Session Auth for S3Express buckets and reverts to using conventional SigV4 for those.", + "type": "boolean" + } + }, + "smithy.rules#bdd": { + "parameters": { + "Bucket": { + "required": false, + "documentation": "The S3 bucket used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 bucket.", + "type": "string" + }, + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "string" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "boolean" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "string" + }, + "ForcePathStyle": { + "builtIn": "AWS::S3::ForcePathStyle", + "required": true, + "default": false, + "documentation": "When true, force a path-style endpoint to be used where the bucket name is part of the path.", + "type": "boolean" + }, + "Accelerate": { + "builtIn": "AWS::S3::Accelerate", + "required": true, + "default": false, + "documentation": "When true, use S3 Accelerate. NOTE: Not all regions support S3 accelerate.", + "type": "boolean" + }, + "UseGlobalEndpoint": { + "builtIn": "AWS::S3::UseGlobalEndpoint", + "required": true, + "default": false, + "documentation": "Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.", + "type": "boolean" + }, + "UseObjectLambdaEndpoint": { + "required": false, + "documentation": "Internal parameter to use object lambda endpoint for an operation (eg: WriteGetObjectResponse)", + "type": "boolean" }, - { - "target": "com.amazonaws.s3#CopyObject" + "Key": { + "required": false, + "documentation": "The S3 Key used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Key.", + "type": "string" }, - { - "target": "com.amazonaws.s3#CreateBucket" + "Prefix": { + "required": false, + "documentation": "The S3 Prefix used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Prefix.", + "type": "string" }, + "CopySource": { + "required": false, + "documentation": "The Copy Source used for Copy Object request. This is an optional parameter that will be set automatically for operations that are scoped to Copy Source.", + "type": "string" + }, + "DisableAccessPoints": { + "required": false, + "documentation": "Internal parameter to disable Access Point Buckets", + "type": "boolean" + }, + "DisableMultiRegionAccessPoints": { + "builtIn": "AWS::S3::DisableMultiRegionAccessPoints", + "required": true, + "default": false, + "documentation": "Whether multi-region access points (MRAP) should be disabled.", + "type": "boolean" + }, + "UseArnRegion": { + "builtIn": "AWS::S3::UseArnRegion", + "required": false, + "documentation": "When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.", + "type": "boolean" + }, + "UseS3ExpressControlEndpoint": { + "required": false, + "documentation": "Internal parameter to indicate whether S3Express operation should use control plane, (ex. CreateBucket)", + "type": "boolean" + }, + "DisableS3ExpressSessionAuth": { + "required": false, + "documentation": "Parameter to indicate whether S3Express session auth should be disabled", + "type": "boolean" + } + }, + "conditions": [ { - "target": "com.amazonaws.s3#CreateBucketMetadataTableConfiguration" + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] }, { - "target": "com.amazonaws.s3#CreateMultipartUpload" + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] }, { - "target": "com.amazonaws.s3#CreateSession" + "fn": "booleanEquals", + "argv": [ + { + "ref": "ForcePathStyle" + }, + true + ] }, { - "target": "com.amazonaws.s3#DeleteBucket" + "fn": "isSet", + "argv": [ + { + "ref": "DisableAccessPoints" + } + ] }, { - "target": "com.amazonaws.s3#DeleteBucketAnalyticsConfiguration" + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableAccessPoints" + }, + true + ] }, { - "target": "com.amazonaws.s3#DeleteBucketCors" + "fn": "isSet", + "argv": [ + { + "ref": "UseArnRegion" + } + ] }, { - "target": "com.amazonaws.s3#DeleteBucketEncryption" + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseArnRegion" + }, + false + ] }, { - "target": "com.amazonaws.s3#DeleteBucketIntelligentTieringConfiguration" + "fn": "isSet", + "argv": [ + { + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ] }, { - "target": "com.amazonaws.s3#DeleteBucketInventoryConfiguration" + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "bucketArn" }, { - "target": "com.amazonaws.s3#DeleteBucketLifecycle" + "fn": "isSet", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[2]" + ] + } + ] }, { - "target": "com.amazonaws.s3#DeleteBucketMetadataTableConfiguration" + "fn": "isSet", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[4]" + ] + } + ] }, { - "target": "com.amazonaws.s3#DeleteBucketMetricsConfiguration" + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[0]" + ], + "assign": "arnType" }, { - "target": "com.amazonaws.s3#DeleteBucketOwnershipControls" + "fn": "stringEquals", + "argv": [ + { + "ref": "arnType" + }, + "accesspoint" + ] }, { - "target": "com.amazonaws.s3#DeleteBucketPolicy" + "fn": "stringEquals", + "argv": [ + { + "ref": "arnType" + }, + "" + ] }, { - "target": "com.amazonaws.s3#DeleteBucketReplication" + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + } + ] }, { - "target": "com.amazonaws.s3#DeleteBucketTagging" + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[1]" + ], + "assign": "accessPointName" }, { - "target": "com.amazonaws.s3#DeleteBucketWebsite" - }, - { - "target": "com.amazonaws.s3#DeleteObject" - }, - { - "target": "com.amazonaws.s3#DeleteObjects" + "fn": "stringEquals", + "argv": [ + { + "ref": "accessPointName" + }, + "" + ] }, { - "target": "com.amazonaws.s3#DeleteObjectTagging" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 4, + false + ], + "assign": "arnPrefix" }, { - "target": "com.amazonaws.s3#DeletePublicAccessBlock" + "fn": "stringEquals", + "argv": [ + { + "ref": "arnPrefix" + }, + "arn:" + ] }, { - "target": "com.amazonaws.s3#GetBucketAccelerateConfiguration" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 7, + true + ], + "assign": "accessPointSuffix" }, { - "target": "com.amazonaws.s3#GetBucketAcl" + "fn": "stringEquals", + "argv": [ + { + "ref": "accessPointSuffix" + }, + "--xa-s3" + ] }, { - "target": "com.amazonaws.s3#GetBucketAnalyticsConfiguration" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 6, + true + ], + "assign": "bucketSuffix" }, { - "target": "com.amazonaws.s3#GetBucketCors" + "fn": "stringEquals", + "argv": [ + { + "ref": "bucketSuffix" + }, + "--x-s3" + ] }, { - "target": "com.amazonaws.s3#GetBucketEncryption" + "fn": "isSet", + "argv": [ + { + "ref": "UseS3ExpressControlEndpoint" + } + ] }, { - "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfiguration" + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseS3ExpressControlEndpoint" + }, + true + ] }, { - "target": "com.amazonaws.s3#GetBucketInventoryConfiguration" + "fn": "isSet", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + } + ] }, { - "target": "com.amazonaws.s3#GetBucketLifecycleConfiguration" + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableS3ExpressSessionAuth" + }, + true + ] }, { - "target": "com.amazonaws.s3#GetBucketLocation" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 7, + true + ], + "assign": "bucketAliasSuffix" }, { - "target": "com.amazonaws.s3#GetBucketLogging" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 32, + 49, + true + ], + "assign": "outpostId_1" }, { - "target": "com.amazonaws.s3#GetBucketMetadataTableConfiguration" + "fn": "stringEquals", + "argv": [ + { + "ref": "bucketAliasSuffix" + }, + "--op-s3" + ] }, { - "target": "com.amazonaws.s3#GetBucketMetricsConfiguration" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 49, + 50, + true + ], + "assign": "hardwareType" }, { - "target": "com.amazonaws.s3#GetBucketNotificationConfiguration" + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "regionPartition" }, { - "target": "com.amazonaws.s3#GetBucketOwnershipControls" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 8, + 12, + true + ], + "assign": "regionPrefix" }, { - "target": "com.amazonaws.s3#GetBucketPolicy" + "fn": "booleanEquals", + "argv": [ + { + "ref": "Accelerate" + }, + true + ] }, { - "target": "com.amazonaws.s3#GetBucketPolicyStatus" + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] }, { - "target": "com.amazonaws.s3#GetBucketReplication" + "fn": "isSet", + "argv": [ + { + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] }, { - "target": "com.amazonaws.s3#GetBucketRequestPayment" + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Bucket" + } + ] }, { - "target": "com.amazonaws.s3#GetBucketTagging" + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "partitionResult" }, { - "target": "com.amazonaws.s3#GetBucketVersioning" + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + false + ] }, { - "target": "com.amazonaws.s3#GetBucketWebsite" + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ], + "assign": "url" }, { - "target": "com.amazonaws.s3#GetObject" + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + } + ] }, { - "target": "com.amazonaws.s3#GetObjectAcl" + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + { + "ref": "Bucket" + }, + true + ] }, { - "target": "com.amazonaws.s3#GetObjectAttributes" + "fn": "stringEquals", + "argv": [ + "http", + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "scheme" + ] + } + ] }, { - "target": "com.amazonaws.s3#GetObjectLegalHold" + "fn": "uriEncode", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" }, { - "target": "com.amazonaws.s3#GetObjectLockConfiguration" + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] }, { - "target": "com.amazonaws.s3#GetObjectRetention" + "fn": "aws.partition", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + } + ], + "assign": "bucketPartition" }, { - "target": "com.amazonaws.s3#GetObjectTagging" + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + false + ] }, { - "target": "com.amazonaws.s3#GetObjectTorrent" + "fn": "stringEquals", + "argv": [ + "aws-cn", + { + "fn": "getAttr", + "argv": [ + { + "ref": "partitionResult" + }, + "name" + ] + } + ] }, { - "target": "com.amazonaws.s3#GetPublicAccessBlock" + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] }, { - "target": "com.amazonaws.s3#HeadBucket" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 15, + true + ], + "assign": "s3expressAvailabilityZoneId_5" }, { - "target": "com.amazonaws.s3#HeadObject" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 14, + true + ], + "assign": "s3expressAvailabilityZoneId" }, { - "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurations" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 14, + 16, + true + ], + "assign": "s3expressAvailabilityZoneDelim" }, { - "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurations" + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim" + }, + "--" + ] }, { - "target": "com.amazonaws.s3#ListBucketInventoryConfigurations" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 15, + 17, + true + ], + "assign": "s3expressAvailabilityZoneDelim_1" }, { - "target": "com.amazonaws.s3#ListBucketMetricsConfigurations" + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim_1" + }, + "--" + ] }, { - "target": "com.amazonaws.s3#ListBuckets" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 15, + true + ], + "assign": "s3expressAvailabilityZoneId_1" }, { - "target": "com.amazonaws.s3#ListDirectoryBuckets" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 19, + true + ], + "assign": "s3expressAvailabilityZoneId_2" }, { - "target": "com.amazonaws.s3#ListMultipartUploads" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 16, + 18, + true + ], + "assign": "s3expressAvailabilityZoneDelim_2" }, { - "target": "com.amazonaws.s3#ListObjects" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 16, + true + ], + "assign": "s3expressAvailabilityZoneId_6" }, { - "target": "com.amazonaws.s3#ListObjectsV2" + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim_2" + }, + "--" + ] }, { - "target": "com.amazonaws.s3#ListObjectVersions" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 19, + 21, + true + ], + "assign": "s3expressAvailabilityZoneDelim_3" }, { - "target": "com.amazonaws.s3#ListParts" + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim_3" + }, + "--" + ] }, { - "target": "com.amazonaws.s3#PutBucketAccelerateConfiguration" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 20, + true + ], + "assign": "s3expressAvailabilityZoneId_7" }, { - "target": "com.amazonaws.s3#PutBucketAcl" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 20, + 22, + true + ], + "assign": "s3expressAvailabilityZoneDelim_4" }, { - "target": "com.amazonaws.s3#PutBucketAnalyticsConfiguration" + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim_4" + }, + "--" + ] }, { - "target": "com.amazonaws.s3#PutBucketCors" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 21, + 23, + true + ], + "assign": "s3expressAvailabilityZoneDelim_5" }, { - "target": "com.amazonaws.s3#PutBucketEncryption" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 21, + true + ], + "assign": "s3expressAvailabilityZoneId_8" }, { - "target": "com.amazonaws.s3#PutBucketIntelligentTieringConfiguration" + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim_5" + }, + "--" + ] }, { - "target": "com.amazonaws.s3#PutBucketInventoryConfiguration" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 20, + true + ], + "assign": "s3expressAvailabilityZoneId_3" }, { - "target": "com.amazonaws.s3#PutBucketLifecycleConfiguration" + "fn": "booleanEquals", + "argv": [ + false, + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + } + ] }, { - "target": "com.amazonaws.s3#PutBucketLogging" + "fn": "stringEquals", + "argv": [ + "", + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + } + ] }, { - "target": "com.amazonaws.s3#PutBucketMetricsConfiguration" + "fn": "isSet", + "argv": [ + { + "ref": "UseObjectLambdaEndpoint" + } + ] }, { - "target": "com.amazonaws.s3#PutBucketNotificationConfiguration" + "fn": "stringEquals", + "argv": [ + { + "ref": "regionPrefix" + }, + "beta" + ] }, { - "target": "com.amazonaws.s3#PutBucketOwnershipControls" + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseObjectLambdaEndpoint" + }, + true + ] }, { - "target": "com.amazonaws.s3#PutBucketPolicy" + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + true + ] }, { - "target": "com.amazonaws.s3#PutBucketReplication" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 26, + 28, + true + ], + "assign": "s3expressAvailabilityZoneDelim_6" }, { - "target": "com.amazonaws.s3#PutBucketRequestPayment" + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] }, { - "target": "com.amazonaws.s3#PutBucketTagging" + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "outpostId_1" + }, + false + ] }, { - "target": "com.amazonaws.s3#PutBucketVersioning" + "fn": "stringEquals", + "argv": [ + "s3-object-lambda", + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "service" + ] + } + ] }, { - "target": "com.amazonaws.s3#PutBucketWebsite" + "fn": "stringEquals", + "argv": [ + { + "ref": "s3expressAvailabilityZoneDelim_6" + }, + "--" + ] }, { - "target": "com.amazonaws.s3#PutObject" + "fn": "stringEquals", + "argv": [ + { + "ref": "hardwareType" + }, + "e" + ] }, { - "target": "com.amazonaws.s3#PutObjectAcl" + "fn": "stringEquals", + "argv": [ + "s3-outposts", + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "service" + ] + } + ] }, { - "target": "com.amazonaws.s3#PutObjectLegalHold" + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[1]" + ], + "assign": "outpostId" }, { - "target": "com.amazonaws.s3#PutObjectLockConfiguration" + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "accessPointName" + }, + true + ] }, { - "target": "com.amazonaws.s3#PutObjectRetention" + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "outpostId" + }, + false + ] }, { - "target": "com.amazonaws.s3#PutObjectTagging" + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketPartition" + }, + "name" + ] + }, + { + "fn": "getAttr", + "argv": [ + { + "ref": "partitionResult" + }, + "name" + ] + } + ] }, { - "target": "com.amazonaws.s3#PutPublicAccessBlock" + "fn": "stringEquals", + "argv": [ + { + "ref": "hardwareType" + }, + "o" + ] }, { - "target": "com.amazonaws.s3#RestoreObject" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 6, + 26, + true + ], + "assign": "s3expressAvailabilityZoneId_4" }, { - "target": "com.amazonaws.s3#SelectObjectContent" - }, - { - "target": "com.amazonaws.s3#UploadPart" + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + }, + true + ] }, { - "target": "com.amazonaws.s3#UploadPartCopy" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 7, + 27, + true + ], + "assign": "s3expressAvailabilityZoneId_9" }, { - "target": "com.amazonaws.s3#WriteGetObjectResponse" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "S3", - "arnNamespace": "s3", - "cloudFormationName": "S3", - "cloudTrailEventSource": "s3.amazonaws.com", - "endpointPrefix": "s3" - }, - "aws.auth#sigv4": { - "name": "s3" - }, - "aws.protocols#restXml": { - "noErrorWrapping": true - }, - "smithy.api#documentation": "

", - "smithy.api#suppress": [ - "RuleSetAuthSchemes" - ], - "smithy.api#title": "Amazon Simple Storage Service", - "smithy.api#xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - }, - "smithy.rules#clientContextParams": { - "ForcePathStyle": { - "documentation": "Forces this client to use path-style addressing for buckets.", - "type": "boolean" - }, - "UseArnRegion": { - "documentation": "Enables this client to use an ARN's region when constructing an endpoint instead of the client's configured region.", - "type": "boolean" - }, - "DisableMultiRegionAccessPoints": { - "documentation": "Disables this client's usage of Multi-Region Access Points.", - "type": "boolean" - }, - "Accelerate": { - "documentation": "Enables this client to use S3 Transfer Acceleration endpoints.", - "type": "boolean" - }, - "DisableS3ExpressSessionAuth": { - "documentation": "Disables this client's usage of Session Auth for S3Express buckets and reverts to using conventional SigV4 for those.", - "type": "boolean" - } - }, - "smithy.rules#endpointRuleSet": { - "version": "1.0", - "parameters": { - "Bucket": { - "required": false, - "documentation": "The S3 bucket used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 bucket.", - "type": "String" - }, - "Region": { - "builtIn": "AWS::Region", - "required": false, - "documentation": "The AWS region used to dispatch the request.", - "type": "String" - }, - "UseFIPS": { - "builtIn": "AWS::UseFIPS", - "required": true, - "default": false, - "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", - "type": "Boolean" - }, - "UseDualStack": { - "builtIn": "AWS::UseDualStack", - "required": true, - "default": false, - "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", - "type": "Boolean" - }, - "Endpoint": { - "builtIn": "SDK::Endpoint", - "required": false, - "documentation": "Override the endpoint used to send this request", - "type": "String" - }, - "ForcePathStyle": { - "builtIn": "AWS::S3::ForcePathStyle", - "required": true, - "default": false, - "documentation": "When true, force a path-style endpoint to be used where the bucket name is part of the path.", - "type": "Boolean" - }, - "Accelerate": { - "builtIn": "AWS::S3::Accelerate", - "required": true, - "default": false, - "documentation": "When true, use S3 Accelerate. NOTE: Not all regions support S3 accelerate.", - "type": "Boolean" - }, - "UseGlobalEndpoint": { - "builtIn": "AWS::S3::UseGlobalEndpoint", - "required": true, - "default": false, - "documentation": "Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.", - "type": "Boolean" - }, - "UseObjectLambdaEndpoint": { - "required": false, - "documentation": "Internal parameter to use object lambda endpoint for an operation (eg: WriteGetObjectResponse)", - "type": "Boolean" - }, - "Key": { - "required": false, - "documentation": "The S3 Key used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Key.", - "type": "String" - }, - "Prefix": { - "required": false, - "documentation": "The S3 Prefix used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Prefix.", - "type": "String" - }, - "CopySource": { - "required": false, - "documentation": "The Copy Source used for Copy Object request. This is an optional parameter that will be set automatically for operations that are scoped to Copy Source.", - "type": "String" - }, - "DisableAccessPoints": { - "required": false, - "documentation": "Internal parameter to disable Access Point Buckets", - "type": "Boolean" - }, - "DisableMultiRegionAccessPoints": { - "builtIn": "AWS::S3::DisableMultiRegionAccessPoints", - "required": true, - "default": false, - "documentation": "Whether multi-region access points (MRAP) should be disabled.", - "type": "Boolean" - }, - "UseArnRegion": { - "builtIn": "AWS::S3::UseArnRegion", - "required": false, - "documentation": "When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.", - "type": "Boolean" - }, - "UseS3ExpressControlEndpoint": { - "required": false, - "documentation": "Internal parameter to indicate whether S3Express operation should use control plane, (ex. CreateBucket)", - "type": "Boolean" - }, - "DisableS3ExpressSessionAuth": { - "required": false, - "documentation": "Parameter to indicate whether S3Express session auth should be disabled", - "type": "Boolean" - } - }, - "rules": [ + "fn": "stringEquals", + "argv": [ + "s3", { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Accelerate cannot be used with FIPS", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ], - "error": "Cannot set dual-stack in combination with a custom endpoint.", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "A custom endpoint cannot be combined with FIPS", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - } - ], - "error": "A custom endpoint cannot be combined with S3 Accelerate", - "type": "error" - }, + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - }, - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "partitionResult" - }, - "name" - ] - }, - "aws-cn" - ] - } - ], - "error": "Partition does not support FIPS", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Bucket" - } - ] - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 0, - 6, - true - ], - "assign": "bucketSuffix" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "bucketSuffix" - }, - "--x-s3" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "S3Express does not support Dual-stack.", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - } - ], - "error": "S3Express does not support S3 Accelerate.", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "DisableS3ExpressSessionAuth" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "DisableS3ExpressSessionAuth" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "uriEncode", - "argv": [ - { - "ref": "Bucket" - } - ], - "assign": "uri_encoded_bucket" - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "aws.isVirtualHostableS3Bucket", - "argv": [ - { - "ref": "Bucket" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "S3Express bucket name is not a valid virtual hostable name.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "uriEncode", - "argv": [ - { - "ref": "Bucket" - } - ], - "assign": "uri_encoded_bucket" - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "aws.isVirtualHostableS3Bucket", - "argv": [ - { - "ref": "Bucket" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "S3Express bucket name is not a valid virtual hostable name.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "UseS3ExpressControlEndpoint" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseS3ExpressControlEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "uriEncode", - "argv": [ - { - "ref": "Bucket" - } - ], - "assign": "uri_encoded_bucket" - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "aws.isVirtualHostableS3Bucket", - "argv": [ - { - "ref": "Bucket" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "DisableS3ExpressSessionAuth" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "DisableS3ExpressSessionAuth" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 14, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 14, - 16, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 15, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 15, - 17, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 19, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 19, - 21, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 20, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 20, - 22, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 26, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 26, - 28, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Unrecognized S3Express bucket name format.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 14, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 14, - 16, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 15, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 15, - 17, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 19, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 19, - 21, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 20, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 20, - 22, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 26, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 26, - 28, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Unrecognized S3Express bucket name format.", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "S3Express bucket name is not a valid virtual hostable name.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Bucket" - } - ] - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 0, - 7, - true - ], - "assign": "accessPointSuffix" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "accessPointSuffix" - }, - "--xa-s3" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "S3Express does not support Dual-stack.", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - } - ], - "error": "S3Express does not support S3 Accelerate.", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "DisableS3ExpressSessionAuth" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "DisableS3ExpressSessionAuth" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "uriEncode", - "argv": [ - { - "ref": "Bucket" - } - ], - "assign": "uri_encoded_bucket" - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "aws.isVirtualHostableS3Bucket", - "argv": [ - { - "ref": "Bucket" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "S3Express bucket name is not a valid virtual hostable name.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "uriEncode", - "argv": [ - { - "ref": "Bucket" - } - ], - "assign": "uri_encoded_bucket" - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "aws.isVirtualHostableS3Bucket", - "argv": [ - { - "ref": "Bucket" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "S3Express bucket name is not a valid virtual hostable name.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "aws.isVirtualHostableS3Bucket", - "argv": [ - { - "ref": "Bucket" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "DisableS3ExpressSessionAuth" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "DisableS3ExpressSessionAuth" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 15, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 15, - 17, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 16, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 16, - 18, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 20, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 20, - 22, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 21, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 21, - 23, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 27, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 27, - 29, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Unrecognized S3Express bucket name format.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 15, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 15, - 17, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 16, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 16, - 18, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 20, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 20, - 22, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 21, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 21, - 23, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 27, - true - ], - "assign": "s3expressAvailabilityZoneId" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 27, - 29, - true - ], - "assign": "s3expressAvailabilityZoneDelim" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "s3expressAvailabilityZoneDelim" - }, - "--" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Unrecognized S3Express bucket name format.", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "S3Express bucket name is not a valid virtual hostable name.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Bucket" - } - ] - } - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "UseS3ExpressControlEndpoint" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseS3ExpressControlEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#path}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "backend": "S3Express", - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Bucket" - } - ] - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 49, - 50, - true - ], - "assign": "hardwareType" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 8, - 12, - true - ], - "assign": "regionPrefix" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 0, - 7, - true - ], - "assign": "bucketAliasSuffix" - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 32, - 49, - true - ], - "assign": "outpostId" - }, - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "regionPartition" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "bucketAliasSuffix" - }, - "--op-s3" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "outpostId" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "hardwareType" - }, - "e" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "regionPrefix" - }, - "beta" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - } - ], - "error": "Expected a endpoint to be specified but no endpoint was found", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "endpoint": { - "url": "https://{Bucket}.ec2.{url#authority}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ] - }, - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ] - }, - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "hardwareType" - }, - "o" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "regionPrefix" - }, - "beta" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - } - ], - "error": "Expected a endpoint to be specified but no endpoint was found", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "endpoint": { - "url": "https://{Bucket}.op-{outpostId}.{url#authority}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ] - }, - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ] - }, - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", - "type": "error" - } - ], - "type": "tree" + "ref": "bucketArn" }, + "service" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "DisableMultiRegionAccessPoints" + }, + true + ] + }, + { + "fn": "stringEquals", + "argv": [ + "", + { + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Bucket" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - } - ] - } - ], - "error": "Custom endpoint `{Endpoint}` was not a valid URI", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "ForcePathStyle" - }, - false - ] - }, - { - "fn": "aws.isVirtualHostableS3Bucket", - "argv": [ - { - "ref": "Bucket" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "Region" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "partitionResult" - }, - "name" - ] - }, - "aws-cn" - ] - } - ], - "error": "S3 Accelerate cannot be used in this region", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - true - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - false - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid region: region was not a valid DNS name.", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "scheme" - ] - }, - "http" - ] - }, - { - "fn": "aws.isVirtualHostableS3Bucket", - "argv": [ - { - "ref": "Bucket" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "ForcePathStyle" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "Region" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid region: region was not a valid DNS name.", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "ForcePathStyle" - }, - false - ] - }, - { - "fn": "aws.parseArn", - "argv": [ - { - "ref": "Bucket" - } - ], - "assign": "bucketArn" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[0]" - ], - "assign": "arnType" - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "arnType" - }, - "" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "service" - ] - }, - "s3-object-lambda" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "arnType" - }, - "accesspoint" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[1]" - ], - "assign": "accessPointName" - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "accessPointName" - }, - "" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "S3 Object Lambda does not support Dual-stack", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - } - ], - "error": "S3 Object Lambda does not support S3 Accelerate", - "type": "error" - }, - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - "" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "DisableAccessPoints" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "DisableAccessPoints" - }, - true - ] - } - ], - "error": "Access points are not supported for this operation", - "type": "error" - }, - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[2]" - ] - } - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "UseArnRegion" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseArnRegion" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - "{Region}" - ] - } - ] - } - ], - "error": "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", - "type": "error" - }, - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - } - ], - "assign": "bucketPartition" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketPartition" - }, - "name" - ] - }, - { - "fn": "getAttr", - "argv": [ - { - "ref": "partitionResult" - }, - "name" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "accountId" - ] - }, - "" - ] - } - ], - "error": "Invalid ARN: Missing account id", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "accountId" - ] - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "accessPointName" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "endpoint": { - "url": "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: bucket ARN is missing a region", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "arnType" - }, - "accesspoint" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[1]" - ], - "assign": "accessPointName" - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "accessPointName" - }, - "" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - "" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "arnType" - }, - "accesspoint" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - "" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "DisableAccessPoints" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "DisableAccessPoints" - }, - true - ] - } - ], - "error": "Access points are not supported for this operation", - "type": "error" - }, - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[2]" - ] - } - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "UseArnRegion" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseArnRegion" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - "{Region}" - ] - } - ] - } - ], - "error": "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", - "type": "error" - }, - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - } - ], - "assign": "bucketPartition" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketPartition" - }, - "name" - ] - }, - "{partitionResult#name}" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "service" - ] - }, - "s3" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "accountId" - ] - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "accessPointName" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - } - ], - "error": "Access Points do not support S3 Accelerate", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "endpoint": { - "url": "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "accessPointName" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "S3 MRAP does not support dual-stack", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "S3 MRAP does not support FIPS", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - } - ], - "error": "S3 MRAP does not support S3 Accelerate", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "DisableMultiRegionAccessPoints" - }, - true - ] - } - ], - "error": "Invalid configuration: Multi-Region Access Point ARNs are disabled.", - "type": "error" - }, - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "mrapPartition" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "mrapPartition" - }, - "name" - ] - }, - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "partition" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4a", - "signingName": "s3", - "signingRegionSet": [ - "*" - ] - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid Access Point Name", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "service" - ] - }, - "s3-outposts" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "S3 Outposts does not support Dual-stack", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "S3 Outposts does not support FIPS", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - } - ], - "error": "S3 Outposts does not support S3 Accelerate", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[4]" - ] - } - ] - } - ], - "error": "Invalid Arn: Outpost Access Point ARN contains sub resources", - "type": "error" - }, - { - "conditions": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[1]" - ], - "assign": "outpostId" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "outpostId" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "UseArnRegion" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseArnRegion" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - "{Region}" - ] - } - ] - } - ], - "error": "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", - "type": "error" - }, - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - } - ], - "assign": "bucketPartition" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketPartition" - }, - "name" - ] - }, - { - "fn": "getAttr", - "argv": [ - { - "ref": "partitionResult" - }, - "name" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "accountId" - ] - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[2]" - ], - "assign": "outpostType" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[3]" - ], - "assign": "accessPointName" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "outpostType" - }, - "accesspoint" - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ] - }, - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ] - }, - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "{bucketArn#region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Expected an outpost type `accesspoint`, found {outpostType}", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: expected an access point name", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: Expected a 4-component resource", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: The Outpost Id was not set", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid ARN: No ARN type specified", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 0, - 4, - false - ], - "assign": "arnPrefix" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "arnPrefix" - }, - "arn:" - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "fn": "aws.parseArn", - "argv": [ - { - "ref": "Bucket" - } - ] - } - ] - } - ] - } - ], - "error": "Invalid ARN: `{Bucket}` was not a valid ARN", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "ForcePathStyle" - }, - true - ] - }, - { - "fn": "aws.parseArn", - "argv": [ - { - "ref": "Bucket" - } - ] - } - ], - "error": "Path-style addressing cannot be used with ARN buckets", - "type": "error" - }, - { - "conditions": [ - { - "fn": "uriEncode", - "argv": [ - { - "ref": "Bucket" - } - ], - "assign": "uri_encoded_bucket" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - false - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Path-style addressing cannot be used with S3 Accelerate", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - } - ], - "type": "tree" + "ref": "bucketArn" }, + "accountId" + ] + } + ] + }, + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "UseObjectLambdaEndpoint" - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseObjectLambdaEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "Region" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "S3 Object Lambda does not support Dual-stack", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "Accelerate" - }, - true - ] - } - ], - "error": "S3 Object Lambda does not support S3 Accelerate", - "type": "error" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "endpoint": { - "url": "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid region: region was not a valid DNS name.", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" + "ref": "bucketArn" }, - { - "conditions": [ - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Bucket" - } - ] - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "partitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "Region" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#path}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://s3.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "https://s3.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://s3.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ] - }, - { - "fn": "not", - "argv": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseGlobalEndpoint" - }, - false - ] - } - ], - "endpoint": { - "url": "https://s3.{Region}.{partitionResult#dnsSuffix}", - "properties": { - "authSchemes": [ - { - "disableDoubleEncoding": true, - "name": "sigv4", - "signingName": "s3", - "signingRegion": "{Region}" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid region: region was not a valid DNS name.", - "type": "error" - } - ], - "type": "tree" - } - ], - "type": "tree" - } - ], - "type": "tree" + "accountId" + ] }, + false + ] + }, + { + "fn": "stringEquals", + "argv": [ { - "conditions": [], - "error": "A region must be set when sending requests to S3.", - "type": "error" - } + "ref": "Region" + }, + "us-east-1" ] }, - "smithy.rules#endpointTests": { - "testCases": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "mrapPartition" + }, + { + "fn": "getAttr", + "argv": [ { - "documentation": "region is not a valid DNS-suffix", - "expect": { - "error": "Invalid region: region was not a valid DNS name." - }, - "params": { - "Region": "a b", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + "ref": "bucketArn" }, + "resourceId[2]" + ], + "assign": "outpostType" + }, + { + "fn": "getAttr", + "argv": [ { - "documentation": "Invalid access point ARN: Not S3", - "expect": { - "error": "Invalid ARN: The ARN was not for the S3 service, found: not-s3" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint" - } + "ref": "bucketArn" }, + "resourceId[3]" + ], + "assign": "accessPointName_1" + }, + { + "fn": "stringEquals", + "argv": [ { - "documentation": "Invalid access point ARN: invalid resource", - "expect": { - "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data" - } + "ref": "outpostType" }, + "accesspoint" + ] + }, + { + "fn": "substring", + "argv": [ { - "documentation": "Invalid access point ARN: invalid no ap name", - "expect": { - "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:" - } + "ref": "Bucket" }, + 27, + 29, + true + ], + "assign": "s3expressAvailabilityZoneDelim_7" + }, + { + "fn": "booleanEquals", + "argv": [ { - "documentation": "Invalid access point ARN: AccountId is invalid", - "expect": { - "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123456_789012`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456_789012:accesspoint:apname", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456_789012:accesspoint:apname" - } + "ref": "UseGlobalEndpoint" }, + true + ] + }, + { + "fn": "stringEquals", + "argv": [ { - "documentation": "Invalid access point ARN: access point name is invalid", - "expect": { - "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `ap_name`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name" - } + "ref": "s3expressAvailabilityZoneDelim_7" }, + "--" + ] + }, + { + "fn": "isValidHostLabel", + "argv": [ { - "documentation": "Access points (disable access points explicitly false)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "DisableAccessPoints": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" - } + "ref": "accessPointName" }, + false + ] + }, + { + "fn": "stringEquals", + "argv": [ { - "documentation": "Access points: partition does not support FIPS", - "expect": { - "error": "Partition does not support FIPS" - }, - "operationInputs": [ + "fn": "getAttr", + "argv": [ { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint" - } + "ref": "bucketArn" + }, + "partition" + ] }, { - "documentation": "Bucket region is invalid", - "expect": { - "error": "Invalid region in ARN: `us-west -2` (invalid DNS name)" - }, - "operationInputs": [ + "fn": "getAttr", + "argv": [ + { + "ref": "mrapPartition" + }, + "name" + ] + } + ] + } + ], + "results": [ + { + "error": "Accelerate cannot be used with FIPS", + "type": "error" + }, + { + "error": "Cannot set dual-stack in combination with a custom endpoint.", + "type": "error" + }, + { + "error": "A custom endpoint cannot be combined with FIPS", + "type": "error" + }, + { + "error": "A custom endpoint cannot be combined with S3 Accelerate", + "type": "error" + }, + { + "error": "Partition does not support FIPS", + "type": "error" + }, + { + "error": "S3Express does not support Dual-stack.", + "type": "error" + }, + { + "error": "S3Express does not support S3 Accelerate.", + "type": "error" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "DisableAccessPoints": false, - "Bucket": "arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint" - } + ] }, - { - "documentation": "Access points when Access points explicitly disabled (used for CreateBucket)", - "expect": { - "error": "Access points are not supported for this operation" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "CreateBucket", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "DisableAccessPoints": true, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" - } + ] }, - { - "documentation": "missing arn type", - "expect": { - "error": "Invalid ARN: `arn:aws:s3:us-west-2:123456789012:` was not a valid ARN" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "S3Express bucket name is not a valid virtual hostable name.", + "type": "error" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "DisableAccessPoints": true, - "Bucket": "arn:aws:s3:us-west-2:123456789012:" - } + ] }, - { - "documentation": "SDK::Host + access point + Dualstack is an error", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseDualStack": true, - "SDK::Endpoint": "https://beta.example.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Endpoint": "https://beta.example.com", - "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false - } + ] }, - { - "documentation": "Access point ARN with FIPS & Dualstack", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": true, - "Accelerate": false, - "DisableAccessPoints": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" - } + ] }, - { - "documentation": "Access point ARN with Dualstack", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint.dualstack.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false, - "DisableAccessPoints": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" - } + ] }, - { - "documentation": "vanilla MRAP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingRegionSet": [ - "*" - ], - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Region": "us-east-1", - "DisableMultiRegionAccessPoints": false, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "MRAP does not support FIPS", - "expect": { - "error": "S3 MRAP does not support FIPS" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Region": "us-east-1", - "DisableMultiRegionAccessPoints": false, - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "MRAP does not support DualStack", - "expect": { - "error": "S3 MRAP does not support dual-stack" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_1}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Region": "us-east-1", - "DisableMultiRegionAccessPoints": false, - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "MRAP does not support S3 Accelerate", - "expect": { - "error": "S3 MRAP does not support S3 Accelerate" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_1}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Region": "us-east-1", - "DisableMultiRegionAccessPoints": false, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true - } + ] }, - { - "documentation": "MRAP explicitly disabled", - "expect": { - "error": "Invalid configuration: Multi-Region Access Point ARNs are disabled." - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_2}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::DisableMultiRegionAccessPoints": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Region": "us-east-1", - "DisableMultiRegionAccessPoints": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "Dual-stack endpoint with path-style forced", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-west-2.amazonaws.com/bucketname" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_2}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true, - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucketname", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "bucketname", - "Region": "us-west-2", - "ForcePathStyle": true, - "UseFIPS": false, - "Accelerate": false, - "UseDualStack": true - } + ] }, - { - "documentation": "Dual-stack endpoint + SDK::Host is error", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_3}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true, - "SDK::Endpoint": "https://abc.com", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucketname", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "bucketname", - "Region": "us-west-2", - "ForcePathStyle": true, - "UseFIPS": false, - "Accelerate": false, - "UseDualStack": true, - "Endpoint": "https://abc.com" - } + ] }, - { - "documentation": "path style + ARN bucket", - "expect": { - "error": "Path-style addressing cannot be used with ARN buckets" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_3}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "ForcePathStyle": true, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "implicit path style bucket + dualstack", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-west-2.amazonaws.com/99_ab" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_4}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99_ab", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "99_ab", - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false - } + ] }, - { - "documentation": "implicit path style bucket + dualstack", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_4}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true, - "SDK::Endpoint": "http://abc.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99_ab", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "99_ab", - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false, - "Endpoint": "http://abc.com" - } + ] }, - { - "documentation": "don't allow URL injections in the bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-west-2.amazonaws.com/example.com%23" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Unrecognized S3Express bucket name format.", + "type": "error" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "example.com#", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "example.com#", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false, - "Accelerate": false - } + ] }, - { - "documentation": "URI encode bucket names in the path", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-west-2.amazonaws.com/bucket%20name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "bucket name", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false, - "Accelerate": false - } + ] }, - { - "documentation": "scheme is respected", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_1}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - }, - "params": { - "Accelerate": false, - "Bucket": "99_ab", - "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "scheme is respected (virtual addressing)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://bucketname.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_1}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - }, - "params": { - "Accelerate": false, - "Bucket": "bucketname", - "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "path style + implicit private link", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_2}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99_ab", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "99_ab", - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "invalid Endpoint override", - "expect": { - "error": "Custom endpoint `abcde://nota#url` was not a valid URI" - }, - "params": { - "Accelerate": false, - "Bucket": "bucketname", - "Endpoint": "abcde://nota#url", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "using an IPv4 address forces path style", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://123.123.0.1/bucketname" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_2}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://123.123.0.1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucketname", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucketname", - "Endpoint": "https://123.123.0.1", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "vanilla access point arn with region mismatch and UseArnRegion=false", - "expect": { - "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_3}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "UseArnRegion": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "vanilla access point arn with region mismatch and UseArnRegion unset", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_3}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "vanilla access point arn with region mismatch and UseArnRegion=true", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_4}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "UseArnRegion": true, - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "subdomains are not allowed in virtual buckets", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3.us-east-1.amazonaws.com/bucket.name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_4}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket.name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "bucket.name", - "Region": "us-east-1" - } + ] }, - { - "documentation": "bucket names with 3 characters are allowed in virtual buckets", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://aaa.s3.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_5}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "aaa", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "aaa", - "Region": "us-east-1" - } + ] }, - { - "documentation": "bucket names with fewer than 3 characters are not allowed in virtual host", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3.us-east-1.amazonaws.com/aa" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_5}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "aa", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "aa", - "Region": "us-east-1" - } + ] }, - { - "documentation": "bucket names with uppercase characters are not allowed in virtual host", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3.us-east-1.amazonaws.com/BucketName" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_6}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "BucketName", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "BucketName", - "Region": "us-east-1" - } + ] }, - { - "documentation": "subdomains are allowed in virtual buckets on http endpoints", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "http://bucket.name.example.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_6}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "SDK::Endpoint": "http://example.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket.name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "bucket.name", - "Region": "us-east-1", - "Endpoint": "http://example.com" - } - }, - { - "documentation": "no region set", - "expect": { - "error": "A region must be set when sending requests to S3." - }, - "params": { - "Bucket": "bucket-name" - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=us-east-1 uses the global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_7}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=us-west-2 uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_7}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-west-2", - "UseGlobalEndpoint": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=cn-north-1 uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.cn-north-1.amazonaws.com.cn" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_8}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "cn-north-1", - "UseGlobalEndpoint": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=us-east-1, fips=true uses the regional endpoint with fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_8}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=us-east-1, dualstack=true uses the regional endpoint with dualstack", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_9}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseDualStack": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=us-east-1, dualstack and fips uses the regional endpoint with fips/dualstack", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_9}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "UseFIPS": true, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=us-east-1 with custom endpoint, uses custom", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://example.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_5}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "SDK::Endpoint": "https://example.com", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "Endpoint": "https://example.com", - "UseGlobalEndpoint": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=us-west-2 with custom endpoint, uses custom", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://example.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_5}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://example.com", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-west-2", - "Endpoint": "https://example.com", - "UseGlobalEndpoint": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "UseGlobalEndpoints=true, region=us-east-1 with accelerate on non bucket case uses the global endpoint and ignores accelerate", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_6}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::Accelerate": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true - } + ] }, - { - "documentation": "aws-global region uses the global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_6}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global" - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "aws-global region with fips uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_7}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::UseFIPS": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "aws-global region with dualstack uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_7}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::UseDualStack": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "aws-global region with fips and dualstack uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_8}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "UseFIPS": true, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "aws-global region with accelerate on non-bucket case, uses global endpoint and ignores accelerate", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_8}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::S3::Accelerate": true - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true - } + ] }, - { - "documentation": "aws-global region with custom endpoint, uses custom", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://example.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_9}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "SDK::Endpoint": "https://example.com" - }, - "operationName": "ListBuckets" + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "Endpoint": "https://example.com", - "UseGlobalEndpoint": false, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, aws-global region uses the global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_9}.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, aws-global region with Prefix, and Key uses the global endpoint. Prefix and Key parameters should not be used in endpoint evaluation.", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global" - }, - "operationName": "ListObjects", - "operationParams": { - "Bucket": "bucket-name", - "Prefix": "prefix" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Prefix": "prefix", - "Key": "key" - } + ] }, - { - "documentation": "virtual addressing, aws-global region with Copy Source, and Key uses the global endpoint. Copy Source and Key parameters should not be used in endpoint evaluation.", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.amazonaws.com" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "CopySource": "/copy/source", - "Key": "key" - } + ] }, - { - "documentation": "virtual addressing, aws-global region with fips uses the regional fips endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-fips.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "backend": "S3Express", + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, aws-global region with dualstack uses the regional dualstack endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.dualstack.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Expected a endpoint to be specified but no endpoint was found", + "type": "error" + }, + { + "endpoint": { + "url": "https://{Bucket}.ec2.{url#authority}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, aws-global region with fips/dualstack uses the regional fips/dualstack endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-fips.dualstack.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "UseFIPS": true, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, aws-global region with accelerate uses the global accelerate endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-accelerate.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.op-{outpostId_1}.{url#authority}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true - } + ] }, - { - "documentation": "virtual addressing, aws-global region with custom endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.example.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.op-{outpostId_1}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, { - "builtInParams": { - "AWS::Region": "aws-global", - "SDK::Endpoint": "https://example.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "aws-global", - "Endpoint": "https://example.com", - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region uses the global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", + "type": "error" + }, + { + "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", + "type": "error" + }, + { + "error": "Custom endpoint `{Endpoint}` was not a valid URI", + "type": "error" + }, + { + "error": "S3 Accelerate cannot be used in this region", + "type": "error" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, UseGlobalEndpoint and us-west-2 region uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-west-2", - "UseGlobalEndpoint": true, - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and fips uses the regional fips endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-fips.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "Bucket": "bucket-name", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and dualstack uses the regional dualstack endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.dualstack.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseDualStack": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and accelerate uses the global accelerate endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-accelerate.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::Accelerate": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true - } + ] }, - { - "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region with custom endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.example.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "SDK::Endpoint": "https://example.com", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "Endpoint": "https://example.com", - "UseGlobalEndpoint": true, - "Bucket": "bucket-name", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "ForcePathStyle, aws-global region uses the global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "ForcePathStyle": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "ForcePathStyle, aws-global region with fips is invalid", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true, - "name": "sigv4" - } - ] - }, - "url": "https://s3-fips.us-east-1.amazonaws.com/bucket-name" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "ForcePathStyle": true, - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "ForcePathStyle, aws-global region with dualstack uses regional dualstack endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::UseDualStack": true, - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Region": "aws-global", - "Bucket": "bucket-name", - "ForcePathStyle": true, - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "ForcePathStyle, aws-global region custom endpoint uses the custom endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://example.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "SDK::Endpoint": "https://example.com", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Region": "aws-global", - "Endpoint": "https://example.com", - "Bucket": "bucket-name", - "ForcePathStyle": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region uses the global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::ForcePathStyle": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "Bucket": "bucket-name", - "UseGlobalEndpoint": true, - "ForcePathStyle": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "ForcePathStyle, UseGlobalEndpoint us-west-2 region uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-west-2.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::ForcePathStyle": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-west-2", - "Bucket": "bucket-name", - "UseGlobalEndpoint": true, - "ForcePathStyle": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region, dualstack uses the regional dualstack endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseDualStack": true, - "AWS::S3::ForcePathStyle": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Region": "us-east-1", - "Bucket": "bucket-name", - "UseGlobalEndpoint": true, - "ForcePathStyle": true, - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false - } + ] }, - { - "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region custom endpoint uses the custom endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://example.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-east-1", - "SDK::Endpoint": "https://example.com", - "AWS::S3::ForcePathStyle": true, - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Region": "us-east-1", - "Bucket": "bucket-name", - "Endpoint": "https://example.com", - "UseGlobalEndpoint": true, - "ForcePathStyle": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } + ] }, - { - "documentation": "ARN with aws-global region and UseArnRegion uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Region": "aws-global", - "UseArnRegion": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" - } + ] }, - { - "documentation": "cross partition MRAP ARN is an error", - "expect": { - "error": "Client was configured for partition `aws` but bucket referred to partition `aws-cn`" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Bucket": "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", - "Region": "us-west-1" - } + ] }, - { - "documentation": "Endpoint override, accesspoint with HTTP, port", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://myendpoint-123456789012.beta.example.com:1234" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "http://beta.example.com:1234" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Endpoint": "http://beta.example.com:1234", - "Region": "us-west-2", - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" - } + ] }, - { - "documentation": "Endpoint override, accesspoint with http, path, query, and port", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://myendpoint-123456789012.beta.example.com:1234/path" + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Invalid region: region was not a valid DNS name.", + "type": "error" + }, + { + "error": "S3 Object Lambda does not support Dual-stack", + "type": "error" + }, + { + "error": "S3 Object Lambda does not support S3 Accelerate", + "type": "error" + }, + { + "error": "Access points are not supported for this operation", + "type": "error" + }, + { + "error": "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", + "type": "error" + }, + { + "error": "Invalid ARN: Missing account id", + "type": "error" + }, + { + "endpoint": { + "url": "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-west-2", - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Endpoint": "http://beta.example.com:1234/path", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "non-bucket endpoint override with FIPS = error", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "us-west-2", - "Endpoint": "http://beta.example.com:1234/path", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "FIPS + dualstack + custom endpoint", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "params": { - "Region": "us-west-2", - "Endpoint": "http://beta.example.com:1234/path", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "dualstack + custom endpoint", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "params": { - "Region": "us-west-2", - "Endpoint": "http://beta.example.com:1234/path", - "UseFIPS": false, - "UseDualStack": true - } + ] }, - { - "documentation": "custom endpoint without FIPS/dualstack", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://beta.example.com:1234/path" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-west-2", - "Endpoint": "http://beta.example.com:1234/path", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "s3 object lambda with access points disabled", - "expect": { - "error": "Access points are not supported for this operation" - }, - "params": { - "Region": "us-west-2", - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:myendpoint", - "DisableAccessPoints": true - } + ] }, - { - "documentation": "non bucket + FIPS", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.us-west-2.amazonaws.com" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": true, - "UseDualStack": false - } + ] }, - { - "documentation": "standard non bucket endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-west-2.amazonaws.com" + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", + "type": "error" + }, + { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", + "type": "error" + }, + { + "error": "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", + "type": "error" + }, + { + "error": "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", + "type": "error" + }, + { + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", + "type": "error" + }, + { + "error": "Invalid ARN: bucket ARN is missing a region", + "type": "error" + }, + { + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", + "type": "error" + }, + { + "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", + "type": "error" + }, + { + "error": "Access Points do not support S3 Accelerate", + "type": "error" + }, + { + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false - } + ] }, - { - "documentation": "non bucket endpoint with FIPS + Dualstack", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.dualstack.us-west-2.amazonaws.com" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": true, - "UseDualStack": true - } + ] }, - { - "documentation": "non bucket endpoint with dualstack", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-west-2.amazonaws.com" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": true - } + ] }, - { - "documentation": "use global endpoint + IP address endpoint override", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "http://127.0.0.1/bucket" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket", - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "http://127.0.0.1", - "UseGlobalEndpoint": true - } + ] }, - { - "documentation": "non-dns endpoint + global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3.amazonaws.com/bucket%21" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "UseFIPS": false, - "UseDualStack": false, - "UseGlobalEndpoint": true - } + ] }, - { - "documentation": "endpoint override + use global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "http://foo.com/bucket%21" + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", + "type": "error" + }, + { + "error": "S3 MRAP does not support dual-stack", + "type": "error" + }, + { + "error": "S3 MRAP does not support FIPS", + "type": "error" + }, + { + "error": "S3 MRAP does not support S3 Accelerate", + "type": "error" + }, + { + "error": "Invalid configuration: Multi-Region Access Point ARNs are disabled.", + "type": "error" + }, + { + "endpoint": { + "url": "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3", + "signingRegionSet": [ + "*" + ] } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "UseFIPS": false, - "UseDualStack": false, - "UseGlobalEndpoint": true, - "Endpoint": "http://foo.com" - } + ] }, - { - "documentation": "FIPS + dualstack + non-bucket endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", + "type": "error" + }, + { + "error": "Invalid Access Point Name", + "type": "error" + }, + { + "error": "S3 Outposts does not support Dual-stack", + "type": "error" + }, + { + "error": "S3 Outposts does not support FIPS", + "type": "error" + }, + { + "error": "S3 Outposts does not support S3 Accelerate", + "type": "error" + }, + { + "error": "Invalid Arn: Outpost Access Point ARN contains sub resources", + "type": "error" + }, + { + "endpoint": { + "url": "https://{accessPointName_1}-{bucketArn#accountId}.{outpostId}.{url#authority}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "UseFIPS": true, - "UseDualStack": true - } + ] }, - { - "documentation": "FIPS + dualstack + non-DNS endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://{accessPointName_1}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ] + }, + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "{bucketArn#region}" } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "ForcePathStyle": true, - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "endpoint override + FIPS + dualstack (BUG)", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "ForcePathStyle": true, - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "endpoint override + non-dns bucket + FIPS (BUG)", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "http://foo.com" - } + ] }, - { - "documentation": "FIPS + bucket endpoint + force path style", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Expected an outpost type `accesspoint`, found {outpostType}", + "type": "error" + }, + { + "error": "Invalid ARN: expected an access point name", + "type": "error" + }, + { + "error": "Invalid ARN: Expected a 4-component resource", + "type": "error" + }, + { + "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", + "type": "error" + }, + { + "error": "Invalid ARN: The Outpost Id was not set", + "type": "error" + }, + { + "error": "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", + "type": "error" + }, + { + "error": "Invalid ARN: No ARN type specified", + "type": "error" + }, + { + "error": "Invalid ARN: `{Bucket}` was not a valid ARN", + "type": "error" + }, + { + "error": "Path-style addressing cannot be used with ARN buckets", + "type": "error" + }, + { + "endpoint": { + "url": "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "ForcePathStyle": true, - "UseFIPS": true, - "UseDualStack": false, - "UseGlobalEndpoint": true - } + ] }, - { - "documentation": "bucket + FIPS + force path style", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket", - "ForcePathStyle": true, - "UseFIPS": true, - "UseDualStack": true, - "UseGlobalEndpoint": true - } + ] }, - { - "documentation": "FIPS + dualstack + use global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://bucket.s3-fips.dualstack.us-east-1.amazonaws.com" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket", - "UseFIPS": true, - "UseDualStack": true, - "UseGlobalEndpoint": true - } - }, - { - "documentation": "URI encoded bucket + use global endpoint", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "UseFIPS": true, - "UseDualStack": false, - "UseGlobalEndpoint": true, - "Endpoint": "https://foo.com" - } + ] }, - { - "documentation": "FIPS + path based endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ + { + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseGlobalEndpoint": true - } + ] }, - { - "documentation": "accelerate + dualstack + global endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://bucket.s3-accelerate.dualstack.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": true, - "UseGlobalEndpoint": true - } - }, - { - "documentation": "dualstack + global endpoint + non URI safe bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "Accelerate": false, - "UseDualStack": true, - "UseFIPS": false, - "UseGlobalEndpoint": true - } - }, - { - "documentation": "FIPS + uri encoded bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "ForcePathStyle": true, - "Accelerate": false, - "UseDualStack": false, - "UseFIPS": true, - "UseGlobalEndpoint": true - } - }, - { - "documentation": "endpoint override + non-uri safe endpoint + force path style", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "ForcePathStyle": true, - "Accelerate": false, - "UseDualStack": false, - "UseFIPS": true, - "Endpoint": "http://foo.com", - "UseGlobalEndpoint": true - } - }, - { - "documentation": "FIPS + Dualstack + global endpoint + non-dns bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true, - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "us-east-1", - "Bucket": "bucket!", - "Accelerate": false, - "UseDualStack": true, - "UseFIPS": true, - "UseGlobalEndpoint": true - } - }, - { - "documentation": "endpoint override + FIPS + dualstack", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "params": { - "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true, - "UseGlobalEndpoint": true, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "non-bucket endpoint override + dualstack + global endpoint", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "UseGlobalEndpoint": true, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "Endpoint override + UseGlobalEndpoint + us-east-1", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "UseGlobalEndpoint": true, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "non-FIPS partition with FIPS set + custom endpoint", - "expect": { - "error": "Partition does not support FIPS" - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false, - "UseGlobalEndpoint": true - } - }, - { - "documentation": "aws-global signs as us-east-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket!", - "UseFIPS": true, - "Accelerate": false, - "UseDualStack": true - } - }, - { - "documentation": "aws-global signs as us-east-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket.foo.com" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket", - "UseDualStack": false, - "UseFIPS": false, - "Accelerate": false, - "Endpoint": "https://foo.com" - } - }, - { - "documentation": "aws-global + dualstack + path-only bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket!", - "UseDualStack": true, - "UseFIPS": false, - "Accelerate": false - } - }, - { - "documentation": "aws-global + path-only bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket!" - } - }, - { - "documentation": "aws-global + fips + custom endpoint", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket!", - "UseDualStack": false, - "UseFIPS": true, - "Accelerate": false, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "aws-global, endpoint override & path only-bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://foo.com/bucket%21" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket!", - "UseDualStack": false, - "UseFIPS": false, - "Accelerate": false, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "aws-global + dualstack + custom endpoint", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "params": { - "Region": "aws-global", - "UseDualStack": true, - "UseFIPS": false, - "Accelerate": false, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "accelerate, dualstack + aws-global", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket.s3-accelerate.dualstack.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket", - "UseDualStack": true, - "UseFIPS": false, - "Accelerate": true - } - }, - { - "documentation": "FIPS + aws-global + path only bucket. This is not supported by S3 but we allow garbage in garbage out", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket!", - "ForcePathStyle": true, - "UseDualStack": true, - "UseFIPS": true, - "Accelerate": false - } - }, - { - "documentation": "aws-global + FIPS + endpoint override.", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "aws-global", - "UseFIPS": true, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "force path style, FIPS, aws-global & endpoint override", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket!", - "ForcePathStyle": true, - "UseFIPS": true, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "ip address causes path style to be forced", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://192.168.1.1/bucket" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket", - "Endpoint": "http://192.168.1.1" - } - }, - { - "documentation": "endpoint override with aws-global region", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "params": { - "Region": "aws-global", - "UseFIPS": true, - "UseDualStack": true, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "FIPS + path-only (TODO: consider making this an error)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-1", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "aws-global", - "Bucket": "bucket!", - "UseFIPS": true - } - }, - { - "documentation": "empty arn type", - "expect": { - "error": "Invalid ARN: No ARN type specified" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:not-s3:us-west-2:123456789012::myendpoint" - } - }, - { - "documentation": "path style can't be used with accelerate", - "expect": { - "error": "Path-style addressing cannot be used with S3 Accelerate" - }, - "params": { - "Region": "us-east-2", - "Bucket": "bucket!", - "Accelerate": true - } - }, - { - "documentation": "invalid region", - "expect": { - "error": "Invalid region: region was not a valid DNS name." - }, - "params": { - "Region": "us-east-2!", - "Bucket": "bucket.subdomain", - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "invalid region", - "expect": { - "error": "Invalid region: region was not a valid DNS name." - }, - "params": { - "Region": "us-east-2!", - "Bucket": "bucket", - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "empty arn type", - "expect": { - "error": "Invalid Access Point Name" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3::123456789012:accesspoint:my_endpoint" - } - }, - { - "documentation": "empty arn type", - "expect": { - "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint`) has `aws-cn`" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint", - "UseArnRegion": true - } - }, - { - "documentation": "invalid arn region", - "expect": { - "error": "Invalid region in ARN: `us-east_2` (invalid DNS name)" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3-object-lambda:us-east_2:123456789012:accesspoint:my-endpoint", - "UseArnRegion": true - } - }, - { - "documentation": "invalid ARN outpost", - "expect": { - "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `op_01234567890123456`" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op_01234567890123456/accesspoint/reports", - "UseArnRegion": true - } - }, - { - "documentation": "invalid ARN", - "expect": { - "error": "Invalid ARN: expected an access point name" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/reports" - } - }, - { - "documentation": "invalid ARN", - "expect": { - "error": "Invalid ARN: Expected a 4-component resource" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456" - } - }, - { - "documentation": "invalid outpost type", - "expect": { - "error": "Expected an outpost type `accesspoint`, found not-accesspoint" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports" - } - }, - { - "documentation": "invalid outpost type", - "expect": { - "error": "Invalid region in ARN: `us-east_1` (invalid DNS name)" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3-outposts:us-east_1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports" - } - }, - { - "documentation": "invalid outpost type", - "expect": { - "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `12345_789012`" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3-outposts:us-east-1:12345_789012:outpost/op-01234567890123456/not-accesspoint/reports" - } - }, - { - "documentation": "invalid outpost type", - "expect": { - "error": "Invalid ARN: The Outpost Id was not set" - }, - "params": { - "Region": "us-east-2", - "Bucket": "arn:aws:s3-outposts:us-east-1:12345789012:outpost" - } - }, - { - "documentation": "use global endpoint virtual addressing", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-2", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://bucket.example.com" - } - }, - "params": { - "Region": "us-east-2", - "Bucket": "bucket", - "Endpoint": "http://example.com", - "UseGlobalEndpoint": true - } - }, - { - "documentation": "global endpoint + ip address", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-2", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://192.168.0.1/bucket" - } - }, - "params": { - "Region": "us-east-2", - "Bucket": "bucket", - "Endpoint": "http://192.168.0.1", - "UseGlobalEndpoint": true - } - }, - { - "documentation": "invalid outpost type", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-2", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-east-2.amazonaws.com/bucket%21" - } - }, - "params": { - "Region": "us-east-2", - "Bucket": "bucket!", - "UseGlobalEndpoint": true - } - }, - { - "documentation": "invalid outpost type", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-2", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket.s3-accelerate.amazonaws.com" - } - }, - "params": { - "Region": "us-east-2", - "Bucket": "bucket", - "Accelerate": true, - "UseGlobalEndpoint": true - } - }, - { - "documentation": "use global endpoint + custom endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-2", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://foo.com/bucket%21" - } - }, - "params": { - "Region": "us-east-2", - "Bucket": "bucket!", - "UseGlobalEndpoint": true, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "use global endpoint, not us-east-1, force path style", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingRegion": "us-east-2", - "name": "sigv4", - "signingName": "s3", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://foo.com/bucket%21" - } - }, - "params": { - "Region": "us-east-2", - "Bucket": "bucket!", - "UseGlobalEndpoint": true, - "ForcePathStyle": true, - "Endpoint": "http://foo.com" - } - }, - { - "documentation": "vanilla virtual addressing@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "virtual addressing + dualstack@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.dualstack.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "accelerate + dualstack@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-accelerate.dualstack.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true, - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "accelerate (dualstack=false)@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-accelerate.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "virtual addressing + fips@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-fips.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "virtual addressing + dualstack + fips@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-fips.dualstack.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": true - } + ] }, - { - "documentation": "accelerate + fips = error@us-west-2", - "expect": { - "error": "Accelerate cannot be used with FIPS" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true, - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true - } + ] }, - { - "documentation": "vanilla virtual addressing@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.cn-north-1.amazonaws.com.cn" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "cn-north-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "virtual addressing + dualstack@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.dualstack.cn-north-1.amazonaws.com.cn" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "accelerate (dualstack=false)@cn-north-1", - "expect": { - "error": "S3 Accelerate cannot be used in this region" - }, - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "virtual addressing + fips@cn-north-1", - "expect": { - "error": "Partition does not support FIPS" - }, - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true - } + ] }, - { - "documentation": "vanilla virtual addressing@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.af-south-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "virtual addressing + dualstack@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3.dualstack.af-south-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": false - } + ] }, - { - "documentation": "accelerate + dualstack@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-accelerate.dualstack.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseDualStack": true, - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": false - } + ] }, - { - "documentation": "accelerate (dualstack=false)@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-accelerate.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "error": "Path-style addressing cannot be used with S3 Accelerate", + "type": "error" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "virtual addressing + fips@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-fips.af-south-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": true - } + ] }, - { - "documentation": "virtual addressing + dualstack + fips@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.s3-fips.dualstack.af-south-1.amazonaws.com" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": true - } + ] }, - { - "documentation": "accelerate + fips = error@af-south-1", - "expect": { - "error": "Accelerate cannot be used with FIPS" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true, - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": true - } + ] }, - { - "documentation": "vanilla path style@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-west-2.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "fips@us-gov-west-2, bucket is not S3-dns-compatible (subdomains)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingName": "s3", - "signingRegion": "us-gov-west-1", - "disableDoubleEncoding": true, - "name": "sigv4" - } - ] - }, - "url": "https://s3-fips.us-gov-west-1.amazonaws.com/bucket.with.dots" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-gov-west-1", - "AWS::UseFIPS": true, - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket.with.dots", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket.with.dots", - "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true - } + ] }, - { - "documentation": "path style + accelerate = error@us-west-2", - "expect": { - "error": "Path-style addressing cannot be used with S3 Accelerate" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::ForcePathStyle": true, - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "path style + dualstack@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.us-west-2.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true, - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false - } + ] }, - { - "documentation": "path style + arn is error@us-west-2", - "expect": { - "error": "Path-style addressing cannot be used with ARN buckets" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", - "ForcePathStyle": true, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "path style + invalid DNS name@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-west-2.amazonaws.com/99a_b" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99a_b", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Accelerate": false, - "Bucket": "99a_b", - "ForcePathStyle": true, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "no path style + invalid DNS name@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.us-west-2.amazonaws.com/99a_b" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#path}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99a_b", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "99a_b", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "vanilla path style@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.cn-north-1.amazonaws.com.cn/bucket-name" - } - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "path style + fips@cn-north-1", - "expect": { - "error": "Partition does not support FIPS" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseFIPS": true, - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true - } + ] }, - { - "documentation": "path style + accelerate = error@cn-north-1", - "expect": { - "error": "Path-style addressing cannot be used with S3 Accelerate" - }, - "operationInputs": [ + "headers": {} + }, + "type": "endpoint" + }, + { + "endpoint": { + "url": "https://s3.{Region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::S3::ForcePathStyle": true, - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } + "disableDoubleEncoding": true, + "name": "sigv4", + "signingName": "s3", + "signingRegion": "{Region}" } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } + ] }, - { - "documentation": "path style + dualstack@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.cn-north-1.amazonaws.com.cn/bucket-name" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseDualStack": true, - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "path style + arn is error@cn-north-1", - "expect": { - "error": "Path-style addressing cannot be used with ARN buckets" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", - "ForcePathStyle": true, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "path style + invalid DNS name@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99a_b", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "99a_b", - "ForcePathStyle": true, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "no path style + invalid DNS name@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99a_b", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "99a_b", - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "vanilla path style@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.af-south-1.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "path style + fips@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true, - "name": "sigv4" - } - ] - }, - "url": "https://s3-fips.af-south-1.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true, - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "path style + accelerate = error@af-south-1", - "expect": { - "error": "Path-style addressing cannot be used with S3 Accelerate" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::ForcePathStyle": true, - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "path style + dualstack@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.dualstack.af-south-1.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseDualStack": true, - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "path style + arn is error@af-south-1", - "expect": { - "error": "Path-style addressing cannot be used with ARN buckets" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", - "ForcePathStyle": true, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "path style + invalid DNS name@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.af-south-1.amazonaws.com/99a_b" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99a_b", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "99a_b", - "ForcePathStyle": true, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "no path style + invalid DNS name@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3.af-south-1.amazonaws.com/99a_b" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "99a_b", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "99a_b", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "virtual addressing + private link@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "path style + private link@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "SDK::Host + FIPS@us-west-2", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true, - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "SDK::Host + DualStack@us-west-2", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true, - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "SDK::HOST + accelerate@us-west-2", - "expect": { - "error": "A custom endpoint cannot be combined with S3 Accelerate" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "SDK::Host + access point ARN@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.beta.example.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://beta.example.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Endpoint": "https://beta.example.com", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "virtual addressing + private link@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "path style + private link@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "FIPS@cn-north-1", - "expect": { - "error": "Partition does not support FIPS" - }, - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "SDK::Host + DualStack@cn-north-1", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseDualStack": true, - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "SDK::HOST + accelerate@cn-north-1", - "expect": { - "error": "A custom endpoint cannot be combined with S3 Accelerate" - }, - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "SDK::Host + access point ARN@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.beta.example.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "SDK::Endpoint": "https://beta.example.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Endpoint": "https://beta.example.com", - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "virtual addressing + private link@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "path style + private link@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "AWS::S3::ForcePathStyle": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": true, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "SDK::Host + FIPS@af-south-1", - "expect": { - "error": "A custom endpoint cannot be combined with FIPS" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true, - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "SDK::Host + DualStack@af-south-1", - "expect": { - "error": "Cannot set dual-stack in combination with a custom endpoint." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseDualStack": true, - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "SDK::HOST + accelerate@af-south-1", - "expect": { - "error": "A custom endpoint cannot be combined with S3 Accelerate" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "bucket-name", - "Key": "key" - } - } - ], - "params": { - "Accelerate": true, - "Bucket": "bucket-name", - "ForcePathStyle": false, - "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "SDK::Host + access point ARN@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.beta.example.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "SDK::Endpoint": "https://beta.example.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Endpoint": "https://beta.example.com", - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "vanilla access point arn@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "access point arn + FIPS@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "access point arn + accelerate = error@us-west-2", - "expect": { - "error": "Access Points do not support S3 Accelerate" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": true, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "access point arn + FIPS + DualStack@us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": true - } - }, - { - "documentation": "vanilla access point arn@cn-north-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint.cn-north-1.amazonaws.com.cn" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "access point arn + FIPS@cn-north-1", - "expect": { - "error": "Partition does not support FIPS" - }, - "params": { - "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "access point arn + accelerate = error@cn-north-1", - "expect": { - "error": "Access Points do not support S3 Accelerate" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": true, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "access point arn + FIPS + DualStack@cn-north-1", - "expect": { - "error": "Partition does not support FIPS" - }, - "params": { - "Accelerate": false, - "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true - } - }, - { - "documentation": "vanilla access point arn@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint.af-south-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "access point arn + FIPS@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.af-south-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "access point arn + accelerate = error@af-south-1", - "expect": { - "error": "Access Points do not support S3 Accelerate" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": true, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "access point arn + FIPS + DualStack@af-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "af-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.af-south-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "af-south-1", - "AWS::UseFIPS": true, - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", - "ForcePathStyle": false, - "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": true - } - }, - { - "documentation": "S3 outposts vanilla test", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" - } - }, - { - "documentation": "S3 outposts custom endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://reports-123456789012.op-01234567890123456.example.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://example.amazonaws.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", - "Endpoint": "https://example.amazonaws.com" - } - }, - { - "documentation": "outposts arn with region mismatch and UseArnRegion=false", - "expect": { - "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "ForcePathStyle": false, - "UseArnRegion": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "outposts arn with region mismatch, custom region and UseArnRegion=false", - "expect": { - "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://example.com", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Endpoint": "https://example.com", - "ForcePathStyle": false, - "UseArnRegion": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "outposts arn with region mismatch and UseArnRegion=true", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "ForcePathStyle": false, - "UseArnRegion": true, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "outposts arn with region mismatch and UseArnRegion unset", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "ForcePathStyle": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "outposts arn with partition mismatch and UseArnRegion=true", - "expect": { - "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", - "ForcePathStyle": false, - "UseArnRegion": true, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "ARN with UseGlobalEndpoint and use-east-1 region uses the regional endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::UseGlobalEndpoint": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "UseGlobalEndpoint": true, - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" - } - }, - { - "documentation": "S3 outposts does not support dualstack", - "expect": { - "error": "S3 Outposts does not support Dual-stack" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" - } - }, - { - "documentation": "S3 outposts does not support fips", - "expect": { - "error": "S3 Outposts does not support FIPS" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" - } - }, - { - "documentation": "S3 outposts does not support accelerate", - "expect": { - "error": "S3 Outposts does not support S3 Accelerate" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true, - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" - } - }, - { - "documentation": "validates against subresource", - "expect": { - "error": "Invalid Arn: Outpost Access Point ARN contains sub resources" - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:mybucket:object:foo" - } - }, - { - "documentation": "object lambda @us-east-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda, colon resource deliminator @us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner" - } - }, - { - "documentation": "object lambda @us-east-1, client region us-west-2, useArnRegion=true", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=true", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "s3-external-1", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "s3-external-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=false", - "expect": { - "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `s3-external-1` and UseArnRegion is `false`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "s3-external-1", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "s3-external-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=true", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "aws-global", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=false", - "expect": { - "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `aws-global` and UseArnRegion is `false`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "aws-global", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @cn-north-1, client region us-west-2 (cross partition), useArnRegion=true", - "expect": { - "error": "Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner`) has `aws-cn`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "aws-global", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "aws-global", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda with dualstack", - "expect": { - "error": "S3 Object Lambda does not support Dual-stack" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseDualStack": true, - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @us-gov-east-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-gov-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.s3-object-lambda.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @us-gov-east-1, with fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-gov-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.s3-object-lambda-fips.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda @cn-north-1, with fips", - "expect": { - "error": "Partition does not support FIPS" - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda with accelerate", - "expect": { - "error": "S3 Object Lambda does not support S3 Accelerate" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::Accelerate": true, - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda with invalid arn - bad service and someresource", - "expect": { - "error": "Invalid ARN: Unrecognized format: arn:aws:sqs:us-west-2:123456789012:someresource (type: someresource)" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource" - } - }, - { - "documentation": "object lambda with invalid arn - invalid resource", - "expect": { - "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `bucket_name`" - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:bucket_name:mybucket" - } - }, - { - "documentation": "object lambda with invalid arn - missing region", - "expect": { - "error": "Invalid ARN: bucket ARN is missing a region" - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda::123456789012:accesspoint/mybanner" - } - }, - { - "documentation": "object lambda with invalid arn - missing account-id", - "expect": { - "error": "Invalid ARN: Missing account id" - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-west-2::accesspoint/mybanner" - } - }, - { - "documentation": "object lambda with invalid arn - account id contains invalid characters", - "expect": { - "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123.45678.9012`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket" - } - }, - { - "documentation": "object lambda with invalid arn - missing access point name", - "expect": { - "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided" - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint" - } - }, - { - "documentation": "object lambda with invalid arn - access point name contains invalid character: *", - "expect": { - "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `*`" - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:*" - } - }, - { - "documentation": "object lambda with invalid arn - access point name contains invalid character: .", - "expect": { - "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `my.bucket`" - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:my.bucket" - } - }, - { - "documentation": "object lambda with invalid arn - access point name contains sub resources", - "expect": { - "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`." - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": true, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybucket:object:foo" - } - }, - { - "documentation": "object lambda with custom endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://mybanner-123456789012.my-endpoint.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://my-endpoint.com", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseArnRegion": false, - "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", - "Endpoint": "https://my-endpoint.com" - } - }, - { - "documentation": "object lambda arn with region mismatch and UseArnRegion=false", - "expect": { - "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::S3::UseArnRegion": false - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", - "Key": "key" - } - } - ], - "params": { - "Accelerate": false, - "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", - "ForcePathStyle": false, - "UseArnRegion": false, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "WriteGetObjectResponse @ us-west-2", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-object-lambda.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "WriteGetObjectResponse", - "operationParams": { - "RequestRoute": "RequestRoute", - "RequestToken": "RequestToken" - } - } - ], - "params": { - "Accelerate": false, - "UseObjectLambdaEndpoint": true, - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "WriteGetObjectResponse with custom endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://my-endpoint.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://my-endpoint.com" - }, - "operationName": "WriteGetObjectResponse", - "operationParams": { - "RequestRoute": "RequestRoute", - "RequestToken": "RequestToken" - } - } - ], - "params": { - "Accelerate": false, - "UseObjectLambdaEndpoint": true, - "Endpoint": "https://my-endpoint.com", - "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "WriteGetObjectResponse @ us-east-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-object-lambda.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "WriteGetObjectResponse", - "operationParams": { - "RequestRoute": "RequestRoute", - "RequestToken": "RequestToken" - } - } - ], - "params": { - "Accelerate": false, - "UseObjectLambdaEndpoint": true, - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "WriteGetObjectResponse with fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://s3-object-lambda-fips.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true - }, - "operationName": "WriteGetObjectResponse", - "operationParams": { - "RequestRoute": "RequestRoute", - "RequestToken": "RequestToken" - } - } - ], - "params": { - "Accelerate": false, - "UseObjectLambdaEndpoint": true, - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "WriteGetObjectResponse with dualstack", - "expect": { - "error": "S3 Object Lambda does not support Dual-stack" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseDualStack": true - }, - "operationName": "WriteGetObjectResponse", - "operationParams": { - "RequestRoute": "RequestRoute", - "RequestToken": "RequestToken" - } - } - ], - "params": { - "Accelerate": false, - "UseObjectLambdaEndpoint": true, - "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false - } - }, - { - "documentation": "WriteGetObjectResponse with accelerate", - "expect": { - "error": "S3 Object Lambda does not support S3 Accelerate" - }, - "params": { - "Accelerate": true, - "UseObjectLambdaEndpoint": true, - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "WriteGetObjectResponse with fips in CN", - "expect": { - "error": "Partition does not support FIPS" - }, - "params": { - "Accelerate": false, - "Region": "cn-north-1", - "UseObjectLambdaEndpoint": true, - "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "WriteGetObjectResponse with invalid partition", - "expect": { - "error": "Invalid region: region was not a valid DNS name." - }, - "params": { - "Accelerate": false, - "UseObjectLambdaEndpoint": true, - "Region": "not a valid DNS name", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "WriteGetObjectResponse with an unknown partition", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3-object-lambda", - "disableDoubleEncoding": true, - "signingRegion": "us-east.special" - } - ] - }, - "url": "https://s3-object-lambda.us-east.special.amazonaws.com" - } - }, - "params": { - "Accelerate": false, - "UseObjectLambdaEndpoint": true, - "Region": "us-east.special", - "UseDualStack": false, - "UseFIPS": false - } - }, - { - "documentation": "S3 Outposts bucketAlias Real Outpost Prod us-west-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-west-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.op-0b1d075431d83bebd.s3-outposts.us-west-1.amazonaws.com" - } - }, - "params": { - "Region": "us-west-1", - "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias Real Outpost Prod ap-east-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "ap-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.op-0b1d075431d83bebd.s3-outposts.ap-east-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-east-1", - "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias Ec2 Outpost Prod us-east-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.ec2.s3-outposts.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "Bucket": "test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias Ec2 Outpost Prod me-south-1", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "me-south-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.ec2.s3-outposts.me-south-1.amazonaws.com" - } - }, - "params": { - "Region": "me-south-1", - "Bucket": "test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias Real Outpost Beta", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3.op-0b1d075431d83bebd.example.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3", - "Endpoint": "https://example.amazonaws.com", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias Ec2 Outpost Beta", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4a", - "signingName": "s3-outposts", - "signingRegionSet": [ - "*" - ], - "disableDoubleEncoding": true - }, - { - "name": "sigv4", - "signingName": "s3-outposts", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3.ec2.example.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "Bucket": "161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3", - "Endpoint": "https://example.amazonaws.com", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias - No endpoint set for beta", - "expect": { - "error": "Expected a endpoint to be specified but no endpoint was found" - }, - "params": { - "Region": "us-east-1", - "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias Invalid hardware type", - "expect": { - "error": "Unrecognized hardware type: \"Expected hardware type o or e but got h\"" - }, - "params": { - "Region": "us-east-1", - "Bucket": "test-accessp-h0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias Special character in Outpost Arn", - "expect": { - "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`." - }, - "params": { - "Region": "us-east-1", - "Bucket": "test-accessp-o00000754%1d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Outposts bucketAlias - No endpoint set for beta", - "expect": { - "error": "Expected a endpoint to be specified but no endpoint was found" - }, - "params": { - "Region": "us-east-1", - "Bucket": "test-accessp-e0b1d075431d83bebde8xz5w8ijx1qzlbp3i3ebeta0--op-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Snow with bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "snow", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://10.0.1.12:433/bucketName" - } - }, - "params": { - "Region": "snow", - "Bucket": "bucketName", - "Endpoint": "http://10.0.1.12:433", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Snow without bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "snow", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://10.0.1.12:433" - } - }, - "params": { - "Region": "snow", - "Endpoint": "https://10.0.1.12:433", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Snow no port", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "snow", - "disableDoubleEncoding": true - } - ] - }, - "url": "http://10.0.1.12/bucketName" - } - }, - "params": { - "Region": "snow", - "Bucket": "bucketName", - "Endpoint": "http://10.0.1.12", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "S3 Snow dns endpoint", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3", - "signingRegion": "snow", - "disableDoubleEncoding": true - } - ] - }, - "url": "https://amazonaws.com/bucketName" - } - }, - "params": { - "Region": "snow", - "Bucket": "bucketName", - "Endpoint": "https://amazonaws.com", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false - } - }, - { - "documentation": "Data Plane with short zone name", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--abcd-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "mybucket--abcd-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone name china region", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--abcd-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "cn-north-1", - "Bucket": "mybucket--abcd-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone name with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--abcd-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "myaccesspoint--abcd-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone name with AP china region", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--abcd-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "cn-north-1", - "Bucket": "myaccesspoint--abcd-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone names (13 chars)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test-zone-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test-zone-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone names (13 chars) with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with medium zone names (14 chars)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test1-zone-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-zone-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with medium zone names (14 chars) with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with long zone names (20 chars)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with long zone names (20 chars)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test-ab1--x-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "mybucket--test-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone fips china region", - "expect": { - "error": "Partition does not support FIPS" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "cn-north-1", - "Bucket": "mybucket--test-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test-ab1--xa-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "myaccesspoint--test-ab1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone fips with AP china region", - "expect": { - "error": "Partition does not support FIPS" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "cn-north-1", - "Bucket": "myaccesspoint--test-ab1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone (13 chars) fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test-zone-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test-zone-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with short zone (13 chars) fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with medium zone (14 chars) fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test1-zone-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-zone-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with medium zone (14 chars) fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with long zone (20 chars) fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with long zone (20 chars) fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with long AZ", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test1-az1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with long AZ with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test1-az1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with long AZ fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test1-az1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-az1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data Plane with long AZ fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "AWS::UseFIPS": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test1-az1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-az1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Control plane with short AZ bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://s3express-control.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "CreateBucket", - "operationParams": { - "Bucket": "mybucket--test-ab1--x-s3" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "mybucket--test-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": false - } - }, - { - "documentation": "Control plane with short AZ bucket china region", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "cn-north-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://s3express-control.cn-north-1.amazonaws.com.cn/mybucket--test-ab1--x-s3" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1" - }, - "operationName": "CreateBucket", - "operationParams": { - "Bucket": "mybucket--test-ab1--x-s3" - } - } - ], - "params": { - "Region": "cn-north-1", - "Bucket": "mybucket--test-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": false - } - }, - { - "documentation": "Control plane with short AZ bucket and fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://s3express-control-fips.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true - }, - "operationName": "CreateBucket", - "operationParams": { - "Bucket": "mybucket--test-ab1--x-s3" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "mybucket--test-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": false - } - }, - { - "documentation": "Control plane with short AZ bucket and fips china region", - "expect": { - "error": "Partition does not support FIPS" - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "cn-north-1", - "AWS::UseFIPS": true - }, - "operationName": "CreateBucket", - "operationParams": { - "Bucket": "mybucket--test-ab1--x-s3" - } - } - ], - "params": { - "Region": "cn-north-1", - "Bucket": "mybucket--test-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": false - } - }, - { - "documentation": "Control plane without bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://s3express-control.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "ListDirectoryBuckets" - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": false - } - }, - { - "documentation": "Control plane without bucket and fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-east-1", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://s3express-control-fips.us-east-1.amazonaws.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseFIPS": true - }, - "operationName": "ListDirectoryBuckets" - } - ], - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": false - } - }, - { - "documentation": "Data Plane sigv4 auth with short AZ", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--usw2-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with short AZ with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--usw2-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with short zone (13 chars)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test-zone-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with short zone (13 chars) with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with short AZ fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--usw2-az1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with short AZ fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--usw2-az1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with short zone (13 chars) fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test-zone-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with short zone (13 chars) fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with long AZ", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with long AZ with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with medium zone(14 chars)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-zone-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with medium zone(14 chars) with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with long zone(20 chars)", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with long zone(20 chars) with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with long AZ fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-az1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with long AZ fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-az1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with medium zone (14 chars) fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-zone-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with medium zone (14 chars) fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with long zone (20 chars) fips", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Data Plane sigv4 auth with long zone (20 chars) fips with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", - "UseFIPS": true, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "Control Plane host override", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--usw2-az1--x-s3.custom.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--usw2-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": true, - "Endpoint": "https://custom.com" - } - }, - { - "documentation": "Control Plane host override with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--usw2-az1--xa-s3.custom.com" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--usw2-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": true, - "Endpoint": "https://custom.com" - } - }, - { - "documentation": "Control Plane host override no bucket", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://custom.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": true, - "Endpoint": "https://custom.com" - } - }, - { - "documentation": "Data plane host override non virtual session auth", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://10.0.0.1/mybucket--usw2-az1--x-s3" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://10.0.0.1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--usw2-az1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--usw2-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Endpoint": "https://10.0.0.1" - } - }, - { - "documentation": "Data plane host override non virtual session auth with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://10.0.0.1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--usw2-az1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--usw2-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Endpoint": "https://10.0.0.1" - } - }, - { - "documentation": "Control Plane host override ip", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://10.0.0.1/mybucket--usw2-az1--x-s3" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--usw2-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": true, - "Endpoint": "https://10.0.0.1" - } - }, - { - "documentation": "Control Plane host override ip with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3" - } - }, - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--usw2-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": true, - "DisableS3ExpressSessionAuth": true, - "Endpoint": "https://10.0.0.1" - } - }, - { - "documentation": "Data plane host override", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://mybucket--usw2-az1--x-s3.custom.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://custom.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--usw2-az1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "mybucket--usw2-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Endpoint": "https://custom.com" - } - }, - { - "documentation": "Data plane host override with AP", - "expect": { - "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4-s3express", - "signingName": "s3express", - "signingRegion": "us-west-2", - "disableDoubleEncoding": true - } - ], - "backend": "S3Express" - }, - "url": "https://myaccesspoint--usw2-az1--xa-s3.custom.com" - } - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://custom.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--usw2-az1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "myaccesspoint--usw2-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Endpoint": "https://custom.com" - } - }, - { - "documentation": "bad format error", - "expect": { - "error": "Unrecognized S3Express bucket name format." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--usaz1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "mybucket--usaz1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "bad AP format error", - "expect": { - "error": "Unrecognized S3Express bucket name format." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--usaz1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "myaccesspoint--usaz1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "bad format error no session auth", - "expect": { - "error": "Unrecognized S3Express bucket name format." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--usaz1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "mybucket--usaz1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "bad AP format error no session auth", - "expect": { - "error": "Unrecognized S3Express bucket name format." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--usaz1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "myaccesspoint--usaz1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false, - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "dual-stack error", - "expect": { - "error": "S3Express does not support Dual-stack." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "mybucket--test-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "dual-stack error with AP", - "expect": { - "error": "S3Express does not support Dual-stack." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::UseDualStack": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "myaccesspoint--test-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": true, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "accelerate error", - "expect": { - "error": "S3Express does not support S3 Accelerate." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "mybucket--test-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "mybucket--test-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "accelerate error with AP", - "expect": { - "error": "S3Express does not support S3 Accelerate." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1", - "AWS::S3::Accelerate": true - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "myaccesspoint--test-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "myaccesspoint--test-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": true, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data plane bucket format error", - "expect": { - "error": "S3Express bucket name is not a valid virtual hostable name." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "my.bucket--test-ab1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "my.bucket--test-ab1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "Data plane AP format error", - "expect": { - "error": "S3Express bucket name is not a valid virtual hostable name." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-east-1" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "my.myaccesspoint--test-ab1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-east-1", - "Bucket": "my.myaccesspoint--test-ab1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "UseS3ExpressControlEndpoint": false - } - }, - { - "documentation": "host override data plane bucket error session auth", - "expect": { - "error": "S3Express bucket name is not a valid virtual hostable name." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://custom.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "my.bucket--usw2-az1--x-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "my.bucket--usw2-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Endpoint": "https://custom.com" - } - }, - { - "documentation": "host override data plane AP error session auth", - "expect": { - "error": "S3Express bucket name is not a valid virtual hostable name." - }, - "operationInputs": [ - { - "builtInParams": { - "AWS::Region": "us-west-2", - "SDK::Endpoint": "https://custom.com" - }, - "operationName": "GetObject", - "operationParams": { - "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", - "Key": "key" - } - } - ], - "params": { - "Region": "us-west-2", - "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Endpoint": "https://custom.com" - } - }, - { - "documentation": "host override data plane bucket error", - "expect": { - "error": "S3Express bucket name is not a valid virtual hostable name." - }, - "params": { - "Region": "us-west-2", - "Bucket": "my.bucket--usw2-az1--x-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Endpoint": "https://custom.com", - "DisableS3ExpressSessionAuth": true - } - }, - { - "documentation": "host override data plane AP error", - "expect": { - "error": "S3Express bucket name is not a valid virtual hostable name." - }, - "params": { - "Region": "us-west-2", - "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", - "UseFIPS": false, - "UseDualStack": false, - "Accelerate": false, - "Endpoint": "https://custom.com", - "DisableS3ExpressSessionAuth": true - } - } - ], - "version": "1.0" - } - } - }, - "com.amazonaws.s3#AnalyticsAndOperator": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

The prefix to use when evaluating an AND predicate: The prefix that an object must have\n to be included in the metrics results.

" - } - }, - "Tags": { - "target": "com.amazonaws.s3#TagSet", - "traits": { - "smithy.api#documentation": "

The list of tags to use when evaluating an AND predicate.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - } - }, - "traits": { - "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates in any combination, and an object must match\n all of the predicates for the filter to apply.

" - } - }, - "com.amazonaws.s3#AnalyticsConfiguration": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.s3#AnalyticsId", - "traits": { - "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", - "smithy.api#required": {} - } - }, - "Filter": { - "target": "com.amazonaws.s3#AnalyticsFilter", - "traits": { - "smithy.api#documentation": "

The filter used to describe a set of objects for analyses. A filter must have exactly\n one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided,\n all objects will be considered in any analysis.

" - } - }, - "StorageClassAnalysis": { - "target": "com.amazonaws.s3#StorageClassAnalysis", - "traits": { - "smithy.api#documentation": "

Contains data related to access patterns to be collected and made available to analyze\n the tradeoffs between different storage classes.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the configuration and any analyses for the analytics filter of an Amazon S3\n bucket.

" - } - }, - "com.amazonaws.s3#AnalyticsConfigurationList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#AnalyticsConfiguration" - } - }, - "com.amazonaws.s3#AnalyticsExportDestination": { - "type": "structure", - "members": { - "S3BucketDestination": { - "target": "com.amazonaws.s3#AnalyticsS3BucketDestination", - "traits": { - "smithy.api#documentation": "

A destination signifying output to an S3 bucket.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Where to publish the analytics results.

" - } - }, - "com.amazonaws.s3#AnalyticsFilter": { - "type": "union", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

The prefix to use when evaluating an analytics filter.

" - } - }, - "Tag": { - "target": "com.amazonaws.s3#Tag", - "traits": { - "smithy.api#documentation": "

The tag to use when evaluating an analytics filter.

" - } - }, - "And": { - "target": "com.amazonaws.s3#AnalyticsAndOperator", - "traits": { - "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating an analytics\n filter. The operator must have at least two predicates.

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

The filter used to describe a set of objects for analyses. A filter must have exactly\n one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided,\n all objects will be considered in any analysis.

" - } - }, - "com.amazonaws.s3#AnalyticsId": { - "type": "string" - }, - "com.amazonaws.s3#AnalyticsS3BucketDestination": { - "type": "structure", - "members": { - "Format": { - "target": "com.amazonaws.s3#AnalyticsS3ExportFileFormat", - "traits": { - "smithy.api#documentation": "

Specifies the file format used when exporting data to Amazon S3.

", - "smithy.api#required": {} - } - }, - "BucketAccountId": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID that owns the destination S3 bucket. If no account ID is provided, the\n owner is not validated before exporting data.

\n \n

Although this value is optional, we strongly recommend that you set it to help\n prevent problems if the destination bucket ownership changes.

\n
" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket to which data is exported.

", - "smithy.api#required": {} - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

The prefix to use when exporting data. The prefix is prepended to all results.

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

Contains information about where to publish the analytics results.

" - } - }, - "com.amazonaws.s3#AnalyticsS3ExportFileFormat": { - "type": "enum", - "members": { - "CSV": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CSV" - } - } - } - }, - "com.amazonaws.s3#ArchiveStatus": { - "type": "enum", - "members": { - "ARCHIVE_ACCESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ARCHIVE_ACCESS" - } - }, - "DEEP_ARCHIVE_ACCESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DEEP_ARCHIVE_ACCESS" - } - } - } - }, - "com.amazonaws.s3#Body": { - "type": "blob" - }, - "com.amazonaws.s3#Bucket": { - "type": "structure", - "members": { - "Name": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket.

" - } - }, - "CreationDate": { - "target": "com.amazonaws.s3#CreationDate", - "traits": { - "smithy.api#documentation": "

Date the bucket was created. This date can change when making changes to your bucket,\n such as editing its bucket policy.

" - } - }, - "BucketRegion": { - "target": "com.amazonaws.s3#BucketRegion", - "traits": { - "smithy.api#documentation": "

\n BucketRegion indicates the Amazon Web Services region where the bucket is located. If the\n request contains at least one valid parameter, it is included in the response.

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

In terms of implementation, a Bucket is a resource.

" - } - }, - "com.amazonaws.s3#BucketAccelerateStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Suspended": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Suspended" - } - } - } - }, - "com.amazonaws.s3#BucketAlreadyExists": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The requested bucket name is not available. The bucket namespace is shared by all users\n of the system. Select a different name and try again.

", - "smithy.api#error": "client", - "smithy.api#httpError": 409 - } - }, - "com.amazonaws.s3#BucketAlreadyOwnedByYou": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The bucket you tried to create already exists, and you own it. Amazon S3 returns this error\n in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you\n re-create an existing bucket that you already own in the North Virginia Region, Amazon S3\n returns 200 OK and resets the bucket access control lists (ACLs).

", - "smithy.api#error": "client", - "smithy.api#httpError": 409 - } - }, - "com.amazonaws.s3#BucketCannedACL": { - "type": "enum", - "members": { - "private": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "private" - } - }, - "public_read": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "public-read" - } - }, - "public_read_write": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "public-read-write" - } - }, - "authenticated_read": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "authenticated-read" - } - } - } - }, - "com.amazonaws.s3#BucketInfo": { - "type": "structure", - "members": { - "DataRedundancy": { - "target": "com.amazonaws.s3#DataRedundancy", - "traits": { - "smithy.api#documentation": "

The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

" - } - }, - "Type": { - "target": "com.amazonaws.s3#BucketType", - "traits": { - "smithy.api#documentation": "

The type of bucket.

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

Specifies the information about the bucket that will be created. For more information\n about directory buckets, see Directory buckets in the Amazon S3 User Guide.

\n \n

This functionality is only supported by directory buckets.

\n
" - } - }, - "com.amazonaws.s3#BucketKeyEnabled": { - "type": "boolean" - }, - "com.amazonaws.s3#BucketLifecycleConfiguration": { - "type": "structure", - "members": { - "Rules": { - "target": "com.amazonaws.s3#LifecycleRules", - "traits": { - "smithy.api#documentation": "

A lifecycle rule for individual objects in an Amazon S3 bucket.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Rule" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more\n information, see Object Lifecycle Management\n in the Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#BucketLocationConstraint": { - "type": "enum", - "members": { - "af_south_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "af-south-1" - } - }, - "ap_east_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-east-1" - } - }, - "ap_northeast_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-northeast-1" - } - }, - "ap_northeast_2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-northeast-2" - } - }, - "ap_northeast_3": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-northeast-3" - } - }, - "ap_south_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-south-1" - } - }, - "ap_south_2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-south-2" - } - }, - "ap_southeast_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-southeast-1" - } - }, - "ap_southeast_2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-southeast-2" - } - }, - "ap_southeast_3": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-southeast-3" - } - }, - "ap_southeast_4": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-southeast-4" - } - }, - "ap_southeast_5": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ap-southeast-5" - } - }, - "ca_central_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ca-central-1" - } - }, - "cn_north_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "cn-north-1" - } - }, - "cn_northwest_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "cn-northwest-1" - } - }, - "EU": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "EU" - } - }, - "eu_central_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "eu-central-1" - } - }, - "eu_central_2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "eu-central-2" - } - }, - "eu_north_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "eu-north-1" - } - }, - "eu_south_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "eu-south-1" - } - }, - "eu_south_2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "eu-south-2" - } - }, - "eu_west_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "eu-west-1" - } - }, - "eu_west_2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "eu-west-2" - } - }, - "eu_west_3": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "eu-west-3" - } - }, - "il_central_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "il-central-1" - } - }, - "me_central_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "me-central-1" - } - }, - "me_south_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "me-south-1" - } - }, - "sa_east_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "sa-east-1" - } - }, - "us_east_2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "us-east-2" - } - }, - "us_gov_east_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "us-gov-east-1" - } - }, - "us_gov_west_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "us-gov-west-1" - } - }, - "us_west_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "us-west-1" - } - }, - "us_west_2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "us-west-2" - } - } - } - }, - "com.amazonaws.s3#BucketLocationName": { - "type": "string" - }, - "com.amazonaws.s3#BucketLoggingStatus": { - "type": "structure", - "members": { - "LoggingEnabled": { - "target": "com.amazonaws.s3#LoggingEnabled" - } - }, - "traits": { - "smithy.api#documentation": "

Container for logging status information.

" - } - }, - "com.amazonaws.s3#BucketLogsPermission": { - "type": "enum", - "members": { - "FULL_CONTROL": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FULL_CONTROL" - } - }, - "READ": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READ" - } - }, - "WRITE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "WRITE" - } - } - } - }, - "com.amazonaws.s3#BucketName": { - "type": "string" - }, - "com.amazonaws.s3#BucketRegion": { - "type": "string" - }, - "com.amazonaws.s3#BucketType": { - "type": "enum", - "members": { - "Directory": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Directory" - } - } - } - }, - "com.amazonaws.s3#BucketVersioningStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Suspended": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Suspended" - } - } - } - }, - "com.amazonaws.s3#Buckets": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Bucket", - "traits": { - "smithy.api#xmlName": "Bucket" - } - } - }, - "com.amazonaws.s3#BypassGovernanceRetention": { - "type": "boolean" - }, - "com.amazonaws.s3#BytesProcessed": { - "type": "long" - }, - "com.amazonaws.s3#BytesReturned": { - "type": "long" - }, - "com.amazonaws.s3#BytesScanned": { - "type": "long" - }, - "com.amazonaws.s3#CORSConfiguration": { - "type": "structure", - "members": { - "CORSRules": { - "target": "com.amazonaws.s3#CORSRules", - "traits": { - "smithy.api#documentation": "

A set of origins and methods (cross-origin access that you want to allow). You can add\n up to 100 rules to the configuration.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "CORSRule" - } - } - }, - "traits": { - "smithy.api#documentation": "

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more\n information, see Enabling\n Cross-Origin Resource Sharing in the\n Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#CORSRule": { - "type": "structure", - "members": { - "ID": { - "target": "com.amazonaws.s3#ID", - "traits": { - "smithy.api#documentation": "

Unique identifier for the rule. The value cannot be longer than 255 characters.

" - } - }, - "AllowedHeaders": { - "target": "com.amazonaws.s3#AllowedHeaders", - "traits": { - "smithy.api#documentation": "

Headers that are specified in the Access-Control-Request-Headers header.\n These headers are allowed in a preflight OPTIONS request. In response to any preflight\n OPTIONS request, Amazon S3 returns any requested headers that are allowed.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AllowedHeader" - } - }, - "AllowedMethods": { - "target": "com.amazonaws.s3#AllowedMethods", - "traits": { - "smithy.api#documentation": "

An HTTP method that you allow the origin to execute. Valid values are GET,\n PUT, HEAD, POST, and DELETE.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AllowedMethod" - } - }, - "AllowedOrigins": { - "target": "com.amazonaws.s3#AllowedOrigins", - "traits": { - "smithy.api#documentation": "

One or more origins you want customers to be able to access the bucket from.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AllowedOrigin" - } - }, - "ExposeHeaders": { - "target": "com.amazonaws.s3#ExposeHeaders", - "traits": { - "smithy.api#documentation": "

One or more headers in the response that you want customers to be able to access from\n their applications (for example, from a JavaScript XMLHttpRequest\n object).

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "ExposeHeader" - } - }, - "MaxAgeSeconds": { - "target": "com.amazonaws.s3#MaxAgeSeconds", - "traits": { - "smithy.api#documentation": "

The time in seconds that your browser is to cache the preflight response for the\n specified resource.

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

Specifies a cross-origin access rule for an Amazon S3 bucket.

" - } - }, - "com.amazonaws.s3#CORSRules": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#CORSRule" - } - }, - "com.amazonaws.s3#CSVInput": { - "type": "structure", - "members": { - "FileHeaderInfo": { - "target": "com.amazonaws.s3#FileHeaderInfo", - "traits": { - "smithy.api#documentation": "

Describes the first line of input. Valid values are:

\n
    \n
  • \n

    \n NONE: First line is not a header.

    \n
  • \n
  • \n

    \n IGNORE: First line is a header, but you can't use the header values\n to indicate the column in an expression. You can use column position (such as _1, _2,\n \u2026) to indicate the column (SELECT s._1 FROM OBJECT s).

    \n
  • \n
  • \n

    \n Use: First line is a header, and you can use the header value to\n identify a column in an expression (SELECT \"name\" FROM OBJECT).

    \n
  • \n
" - } - }, - "Comments": { - "target": "com.amazonaws.s3#Comments", - "traits": { - "smithy.api#documentation": "

A single character used to indicate that a row should be ignored when the character is\n present at the start of that row. You can specify any character to indicate a comment line.\n The default character is #.

\n

Default: #\n

" - } - }, - "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\n \".

" - } - }, - "RecordDelimiter": { - "target": "com.amazonaws.s3#RecordDelimiter", - "traits": { - "smithy.api#documentation": "

A single character used to separate individual records in the input. Instead of the\n default value, you can specify an arbitrary delimiter.

" - } - }, - "FieldDelimiter": { - "target": "com.amazonaws.s3#FieldDelimiter", - "traits": { - "smithy.api#documentation": "

A single character used to separate individual fields in a record. You can specify an\n arbitrary delimiter.

" - } - }, - "QuoteCharacter": { - "target": "com.amazonaws.s3#QuoteCharacter", - "traits": { - "smithy.api#documentation": "

A single character used for escaping when the field delimiter is part of the value. For\n example, if the value is a, b, Amazon S3 wraps this field value in quotation marks,\n as follows: \" a , b \".

\n

Type: String

\n

Default: \"\n

\n

Ancestors: CSV\n

" - } - }, - "AllowQuotedRecordDelimiter": { - "target": "com.amazonaws.s3#AllowQuotedRecordDelimiter", - "traits": { - "smithy.api#documentation": "

Specifies that CSV field values may contain quoted record delimiters and such records\n should be allowed. Default value is FALSE. Setting this value to TRUE may lower\n performance.

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

Describes how an uncompressed comma-separated values (CSV)-formatted input object is\n formatted.

" - } - }, - "com.amazonaws.s3#CSVOutput": { - "type": "structure", - "members": { - "QuoteFields": { - "target": "com.amazonaws.s3#QuoteFields", - "traits": { - "smithy.api#documentation": "

Indicates whether to use quotation marks around output fields.

\n
    \n
  • \n

    \n ALWAYS: Always use quotation marks for output fields.

    \n
  • \n
  • \n

    \n ASNEEDED: Use quotation marks for output fields when needed.

    \n
  • \n
" - } - }, - "QuoteEscapeCharacter": { - "target": "com.amazonaws.s3#QuoteEscapeCharacter", - "traits": { - "smithy.api#documentation": "

The single character used for escaping the quote character inside an already escaped\n value.

" - } - }, - "RecordDelimiter": { - "target": "com.amazonaws.s3#RecordDelimiter", - "traits": { - "smithy.api#documentation": "

A single character used to separate individual records in the output. Instead of the\n default value, you can specify an arbitrary delimiter.

" - } - }, - "FieldDelimiter": { - "target": "com.amazonaws.s3#FieldDelimiter", - "traits": { - "smithy.api#documentation": "

The value used to separate individual fields in a record. You can specify an arbitrary\n delimiter.

" - } - }, - "QuoteCharacter": { - "target": "com.amazonaws.s3#QuoteCharacter", - "traits": { - "smithy.api#documentation": "

A single character used for escaping when the field delimiter is part of the value. For\n example, if the value is a, b, Amazon S3 wraps this field value in quotation marks,\n as follows: \" a , b \".

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

Describes how uncompressed comma-separated values (CSV)-formatted results are\n formatted.

" - } - }, - "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present\n if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see 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": "enum", - "members": { - "CRC32": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CRC32" - } - }, - "CRC32C": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CRC32C" - } - }, - "SHA1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SHA1" - } - }, - "SHA256": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SHA256" - } - }, - "CRC64NVME": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CRC64NVME" - } - } - } - }, - "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#ChecksumCRC64NVME": { - "type": "string" - }, - "com.amazonaws.s3#ChecksumMode": { - "type": "enum", - "members": { - "ENABLED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ENABLED" - } - } - } - }, - "com.amazonaws.s3#ChecksumSHA1": { - "type": "string" - }, - "com.amazonaws.s3#ChecksumSHA256": { - "type": "string" - }, - "com.amazonaws.s3#ChecksumType": { - "type": "enum", - "members": { - "COMPOSITE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COMPOSITE" - } - }, - "FULL_OBJECT": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FULL_OBJECT" - } - } - } - }, - "com.amazonaws.s3#Code": { - "type": "string" - }, - "com.amazonaws.s3#Comments": { - "type": "string" - }, - "com.amazonaws.s3#CommonPrefix": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Container for the specified common prefix.

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

Container for all (if there are any) keys between Prefix and the next occurrence of the\n string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in\n the directory specified by Prefix. For example, if the prefix is notes/ and the delimiter\n is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

" - } - }, - "com.amazonaws.s3#CommonPrefixList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#CommonPrefix" - } - }, - "com.amazonaws.s3#CompleteMultipartUpload": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#CompleteMultipartUploadRequest" - }, - "output": { - "target": "com.amazonaws.s3#CompleteMultipartUploadOutput" - }, - "traits": { - "smithy.api#documentation": "

Completes a multipart upload by assembling previously uploaded parts.

\n

You first initiate the multipart upload and then upload all parts using the UploadPart\n operation or the UploadPartCopy operation.\n After successfully uploading all relevant parts of an upload, you call this\n CompleteMultipartUpload operation to complete the upload. Upon receiving\n this request, Amazon S3 concatenates all the parts in ascending order by part number to create a\n new object. In the CompleteMultipartUpload request, you must provide the parts list and\n ensure that the parts list is complete. The CompleteMultipartUpload API operation\n concatenates the parts that you provide in the list. For each part in the list, you must\n provide the PartNumber value and the ETag value that are returned\n after that part was uploaded.

\n

The processing of a CompleteMultipartUpload request could take several minutes to\n finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that\n specifies a 200 OK response. While processing is in progress, Amazon S3\n periodically sends white space characters to keep the connection from timing out. A request\n could fail after the initial 200 OK response has been sent. This means that a\n 200 OK response can contain either a success or an error. The error\n response might be embedded in the 200 OK response. If you call this API\n operation directly, make sure to design your application to parse the contents of the\n response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition.\n The SDKs detect the embedded error and apply error handling per your configuration settings\n (including automatically retrying the request as appropriate). If the condition persists,\n the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an\n error).

\n

Note that if CompleteMultipartUpload fails, applications should be prepared\n to retry any failed requests (including 500 error responses). For more information, see\n Amazon S3 Error\n Best Practices.

\n \n

You can't use Content-Type: application/x-www-form-urlencoded for the\n CompleteMultipartUpload requests. Also, if you don't provide a Content-Type\n header, CompleteMultipartUpload can still return a 200 OK\n response.

\n
\n

For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n

    If you provide an additional checksum\n value in your MultipartUpload requests and the\n object is encrypted with Key Management Service, you must have permission to use the\n kms:Decrypt action for the\n CompleteMultipartUpload request to succeed.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: EntityTooSmall\n

    \n
      \n
    • \n

      Description: Your proposed upload is smaller than the minimum\n allowed object size. Each part must be at least 5 MB in size, except\n the last part.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

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

    Error Code: InvalidPart\n

    \n
      \n
    • \n

      Description: One or more of the specified parts could not be found.\n The part might not have been uploaded, or the specified ETag might not\n have matched the uploaded part's ETag.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

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

    Error Code: InvalidPartOrder\n

    \n
      \n
    • \n

      Description: The list of parts was not in ascending order. The\n parts list must be specified in order by part number.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

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

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CompleteMultipartUpload:

\n ", - "smithy.api#examples": [ - { - "title": "To complete multipart upload", - "documentation": "The following example completes a multipart upload.", - "input": { - "Bucket": "examplebucket", - "Key": "bigobject", - "MultipartUpload": { - "Parts": [ - { - "PartNumber": 1, - "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" - }, - { - "PartNumber": 2, - "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" - } - ] - }, - "UploadId": "7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" - }, - "output": { - "ETag": "\"4d9031c7644d8081c2829f4ea23c55f7-2\"", - "Bucket": "acexamplebucket", - "Location": "https://examplebucket.s3..amazonaws.com/bigobject", - "Key": "bigobject" - } - } - ], - "smithy.api#http": { - "method": "POST", - "uri": "/{Bucket}/{Key+}", - "code": 200 - } - } - }, - "com.amazonaws.s3#CompleteMultipartUploadOutput": { - "type": "structure", - "members": { - "Location": { - "target": "com.amazonaws.s3#Location", - "traits": { - "smithy.api#documentation": "

The URI that identifies the newly created object.

" - } - }, - "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\n ARN or access point alias if used.

\n \n

Access points are not supported by directory buckets.

\n
" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The object key of the newly created object.

" - } - }, - "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\n rule-id is URL-encoded.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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. For more information about\n how the entity tag is calculated, see Checking object\n 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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

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

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

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header as a data integrity\n check to verify that the checksum type that is received is the same checksum type that was\n specified during the CreateMultipartUpload request. For more information, see\n Checking object integrity\n in the Amazon S3 User Guide.

" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256, aws:kms).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID of the newly created object, in case the bucket has versioning turned\n on.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-version-id" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "CompleteMultipartUploadResult" - } - }, - "com.amazonaws.s3#CompleteMultipartUploadRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

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

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "MultipartUpload": { - "target": "com.amazonaws.s3#CompletedMultipartUpload", - "traits": { - "smithy.api#documentation": "

The container for the multipart upload request information.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "CompleteMultipartUpload" - } - }, - "UploadId": { - "target": "com.amazonaws.s3#MultipartUploadId", - "traits": { - "smithy.api#documentation": "

ID for the initiated multipart upload.

", - "smithy.api#httpQuery": "uploadId", - "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" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

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

", - "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" - } - }, - "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 SHA1 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 SHA256 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" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

This header specifies the checksum type of the object, which determines how part-level\n checksums are combined to create an object-level checksum for multipart objects. You can\n use this header as a data integrity check to verify that the checksum type that is received\n is the same checksum that was specified. If the checksum type doesn\u2019t match the checksum\n type that was specified for the object during the CreateMultipartUpload\n request, it\u2019ll result in a BadDigest error. For more information, see Checking\n object integrity in the Amazon S3 User Guide.

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

The expected total object size of the multipart upload request. If there\u2019s a mismatch\n between the specified object size value and the actual object size value, it results in an\n HTTP 400 InvalidRequest error.

", - "smithy.api#httpHeader": "x-amz-mp-object-size" - } - }, - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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

Uploads the object only if the ETag (entity tag) value provided during the WRITE\n operation matches the ETag of the object in S3. If the ETag values do not match, the\n operation returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the\n multipart upload with CreateMultipartUpload, and re-upload each part.

\n

Expects the ETag value as a string.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

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

Uploads the object only if the object key name does not already exist in the bucket\n specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should re-initiate the\n multipart upload with CreateMultipartUpload and re-upload each part.

\n

Expects the '*' (asterisk) character.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

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

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

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#CompletedMultipartUpload": { - "type": "structure", - "members": { - "Parts": { - "target": "com.amazonaws.s3#CompletedPartList", - "traits": { - "smithy.api#documentation": "

Array of CompletedPart data types.

\n

If you do not supply a valid Part with your request, the service sends back\n an HTTP 400 response.

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

The container for the completed multipart upload details.

" - } - }, - "com.amazonaws.s3#CompletedPart": { - "type": "structure", - "members": { - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "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 part. This checksum is present\n if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

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

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumSHA256": { - "target": "com.amazonaws.s3#ChecksumSHA256", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "PartNumber": { - "target": "com.amazonaws.s3#PartNumber", - "traits": { - "smithy.api#documentation": "

Part number that identifies the part. This is a positive integer between 1 and\n 10,000.

\n \n
    \n
  • \n

    \n General purpose buckets - In\n CompleteMultipartUpload, when a additional checksum (including\n x-amz-checksum-crc32, x-amz-checksum-crc32c,\n x-amz-checksum-sha1, or x-amz-checksum-sha256) is\n applied to each part, the PartNumber must start at 1 and the part\n numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad\n Request status code and an InvalidPartOrder error\n code.

    \n
  • \n
  • \n

    \n Directory buckets - In\n CompleteMultipartUpload, the PartNumber must start at\n 1 and the part numbers must be consecutive.

    \n
  • \n
\n
" - } - } - }, - "traits": { - "smithy.api#documentation": "

Details of the parts that were uploaded.

" - } - }, - "com.amazonaws.s3#CompletedPartList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#CompletedPart" - } - }, - "com.amazonaws.s3#CompressionType": { - "type": "enum", - "members": { - "NONE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "NONE" - } - }, - "GZIP": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GZIP" - } - }, - "BZIP2": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "BZIP2" - } - } - } - }, - "com.amazonaws.s3#Condition": { - "type": "structure", - "members": { - "HttpErrorCodeReturnedEquals": { - "target": "com.amazonaws.s3#HttpErrorCodeReturnedEquals", - "traits": { - "smithy.api#documentation": "

The HTTP error code when the redirect is applied. In the event of an error, if the error\n code equals this value, then the specified redirect is applied. Required when parent\n element Condition is specified and sibling KeyPrefixEquals is not\n specified. If both are specified, then both must be true for the redirect to be\n applied.

" - } - }, - "KeyPrefixEquals": { - "target": "com.amazonaws.s3#KeyPrefixEquals", - "traits": { - "smithy.api#documentation": "

The object key name prefix when the redirect is applied. For example, to redirect\n requests for ExamplePage.html, the key prefix will be\n ExamplePage.html. To redirect request for all pages with the prefix\n docs/, the key prefix will be /docs, which identifies all\n objects in the docs/ folder. Required when the parent element\n Condition is specified and sibling HttpErrorCodeReturnedEquals\n is not specified. If both conditions are specified, both must be true for the redirect to\n be applied.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" - } - } - }, - "traits": { - "smithy.api#documentation": "

A container for describing a condition that must be met for the specified redirect to\n apply. For example, 1. If request is for pages in the /docs folder, redirect\n to the /documents folder. 2. If request results in HTTP error 4xx, redirect\n request to another host where you might process the error.

" - } - }, - "com.amazonaws.s3#ConfirmRemoveSelfBucketAccess": { - "type": "boolean" - }, - "com.amazonaws.s3#ContentDisposition": { - "type": "string" - }, - "com.amazonaws.s3#ContentEncoding": { - "type": "string" - }, - "com.amazonaws.s3#ContentLanguage": { - "type": "string" - }, - "com.amazonaws.s3#ContentLength": { - "type": "long" - }, - "com.amazonaws.s3#ContentMD5": { - "type": "string" - }, - "com.amazonaws.s3#ContentRange": { - "type": "string" - }, - "com.amazonaws.s3#ContentType": { - "type": "string" - }, - "com.amazonaws.s3#ContinuationEvent": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

" - } - }, - "com.amazonaws.s3#CopyObject": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#CopyObjectRequest" - }, - "output": { - "target": "com.amazonaws.s3#CopyObjectOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#ObjectNotInActiveTierError" - } - ], - "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 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

You can copy individual objects between general purpose buckets, between directory buckets,\n and between general purpose buckets and directory buckets.

\n \n
    \n
  • \n

    Amazon S3 supports copy operations using Multi-Region Access Points only as a\n destination when using the Multi-Region Access Point ARN.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    VPC endpoints don't support cross-Region requests (including copies). If you're\n using VPC endpoints, your source and destination buckets should be in the same\n Amazon Web Services Region as your VPC endpoint.

    \n
  • \n
\n
\n

Both the Region that you want to copy the object from and the Region that you want to\n copy the object to must be enabled for your account. For more information about how to\n enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services\n Account Management Guide.

\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\n Acceleration.

\n
\n
\n
Authentication and authorization
\n
\n

All CopyObject requests must be authenticated and signed by using\n IAM credentials (access key ID and secret access key for the IAM identities).\n All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use the\n IAM credentials to authenticate and authorize your access to the\n CopyObject API operation, instead of using the temporary security\n credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

You must have read access to the source object and\n write access to the destination bucket.

\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have permissions in an IAM policy based on the source and destination\n bucket types in a CopyObject operation.

    \n
      \n
    • \n

      If the source object is in a general purpose bucket, you must have\n \n s3:GetObject\n \n permission to read the source object that is being copied.

      \n
    • \n
    • \n

      If the destination bucket is a general purpose bucket, you must have\n \n s3:PutObject\n \n permission to write the object copy to the destination bucket.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have permissions in a bucket policy or an IAM identity-based policy based on the\n source and destination bucket types in a CopyObject\n operation.

    \n
      \n
    • \n

      If the source object that you want to copy is in a\n directory bucket, you must have the \n s3express:CreateSession\n permission in\n the Action element of a policy to read the object. By\n default, the session is in the ReadWrite mode. If you\n want to restrict the access, you can explicitly set the\n s3express:SessionMode condition key to\n ReadOnly on the copy source bucket.

      \n
    • \n
    • \n

      If the copy destination is a directory bucket, you must have the\n \n s3express:CreateSession\n permission in the\n Action element of a policy to write the object to the\n destination. The s3express:SessionMode condition key\n can't be set to ReadOnly on the copy destination bucket.\n

      \n
    • \n
    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n

    For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Response and special errors
\n
\n

When the request is an HTTP 1.1 request, the response is chunk encoded. When\n the request is not an HTTP 1.1 request, the response would not contain the\n Content-Length. You always need to read the entire response body\n to check if the copy succeeds.

\n
    \n
  • \n

    If the copy is successful, you receive a response with information about\n the copied object.

    \n
  • \n
  • \n

    A copy request might return an error when Amazon S3 receives the copy request\n or while Amazon S3 is copying the files. A 200 OK response can\n contain either a success or an error.

    \n
      \n
    • \n

      If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error.

      \n
    • \n
    • \n

      If the error occurs during the copy operation, the error response\n is embedded in the 200 OK response. For example, in a\n cross-region copy, you may encounter throttling and receive a\n 200 OK response. For more information, see Resolve the Error 200 response when copying objects to\n Amazon S3. The 200 OK status code means the copy\n was accepted, but it doesn't mean the copy is complete. Another\n example is when you disconnect from Amazon S3 before the copy is complete,\n Amazon S3 might cancel the copy and you may receive a 200 OK\n response. You must stay connected to Amazon S3 until the entire response is\n successfully received and processed.

      \n

      If you call this API operation directly, make sure to design your\n application to parse the content of the response and handle it\n appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The\n SDKs detect the embedded error and apply error handling per your\n configuration settings (including automatically retrying the request\n as appropriate). If the condition persists, the SDKs throw an\n exception (or, for the SDKs that don't use exceptions, they return an\n error).

      \n
    • \n
    \n
  • \n
\n
\n
Charge
\n
\n

The copy request charge is based on the storage class and Region that you\n specify for the destination object. The request can also result in a data\n retrieval charge for the source if the source storage class bills for data\n retrieval. If the copy source is in a different region, the data transfer is\n billed to the copy source account. For pricing information, see Amazon S3 pricing.

\n
\n
HTTP Host header syntax
\n
\n
    \n
  • \n

    \n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    \n
  • \n
  • \n

    \n Amazon S3 on Outposts - When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.

    \n
  • \n
\n
\n
\n

The following operations are related to CopyObject:

\n ", - "smithy.api#examples": [ - { - "title": "To copy an object", - "documentation": "The following example copies an object from one bucket to another.", - "input": { - "Bucket": "destinationbucket", - "CopySource": "/sourcebucket/HappyFacejpg", - "Key": "HappyFaceCopyjpg" - }, - "output": { - "CopyObjectResult": { - "LastModified": "2016-12-15T17:38:53.000Z", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}/{Key+}?x-id=CopyObject", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "DisableS3ExpressSessionAuth": { - "value": true - } - } - } - }, - "com.amazonaws.s3#CopyObjectOutput": { - "type": "structure", - "members": { - "CopyObjectResult": { - "target": "com.amazonaws.s3#CopyObjectResult", - "traits": { - "smithy.api#documentation": "

Container for all response elements.

", - "smithy.api#httpPayload": {} - } - }, - "Expiration": { - "target": "com.amazonaws.s3#Expiration", - "traits": { - "smithy.api#documentation": "

If the object expiration is configured, the response includes this header.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-expiration" - } - }, - "CopySourceVersionId": { - "target": "com.amazonaws.s3#CopySourceVersionId", - "traits": { - "smithy.api#documentation": "

Version ID of the source object that was copied.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source-version-id" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID of the newly created copy.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-version-id" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms, aws:kms:dsse).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" - } - }, - "SSECustomerKeyMD5": { - "target": "com.amazonaws.s3#SSECustomerKeyMD5", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSEKMSEncryptionContext": { - "target": "com.amazonaws.s3#SSEKMSEncryptionContext", - "traits": { - "smithy.api#documentation": "

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption\n context key-value pairs.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-context" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the copied object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#CopyObjectRequest": { - "type": "structure", - "members": { - "ACL": { - "target": "com.amazonaws.s3#ObjectCannedACL", - "traits": { - "smithy.api#documentation": "

The canned access control list (ACL) to apply to the object.

\n

When you copy an object, the ACL metadata is not preserved and is set to\n private by default. Only the owner has full access control. To override the\n default ACL setting, specify a new ACL when you generate a copy request. For more\n information, see Using ACLs.

\n

If the destination bucket that you're copying objects to uses the bucket owner enforced\n setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.\n Buckets that use this setting only accept PUT requests that don't specify an\n ACL or PUT requests that specify bucket owner full control ACLs, such as the\n bucket-owner-full-control canned ACL or an equivalent form of this ACL\n expressed in the XML format. For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    If your destination bucket uses the bucket owner enforced setting for Object\n Ownership, all objects written to the bucket by any account will be owned by the\n bucket owner.

    \n
  • \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-acl" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the destination bucket.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n \n

Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, \n you get an HTTP 400 Bad Request error with the error code InvalidRequest.

\n
\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. \n \n You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. \n For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. \n When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format \n \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "CacheControl": { - "target": "com.amazonaws.s3#CacheControl", - "traits": { - "smithy.api#documentation": "

Specifies the caching behavior along the request/reply chain.

", - "smithy.api#httpHeader": "Cache-Control" - } - }, - "ChecksumAlgorithm": { - "target": "com.amazonaws.s3#ChecksumAlgorithm", - "traits": { - "smithy.api#documentation": "

Indicates the algorithm that 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.

\n

When you copy an object, if the source object has a checksum, that checksum value will\n be copied to the new object by default. If the CopyObject request does not\n include this x-amz-checksum-algorithm header, the checksum algorithm will be\n copied from the source object to the destination object (if it's present on the source\n object). You can optionally specify a different checksum algorithm to use with the\n x-amz-checksum-algorithm header. Unrecognized or unsupported values will\n respond with the HTTP status code 400 Bad Request.

\n \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", - "smithy.api#httpHeader": "x-amz-checksum-algorithm" - } - }, - "ContentDisposition": { - "target": "com.amazonaws.s3#ContentDisposition", - "traits": { - "smithy.api#documentation": "

Specifies presentational information for the object. Indicates whether an object should\n be displayed in a web browser or downloaded as a file. It allows specifying the desired\n filename for the downloaded file.

", - "smithy.api#httpHeader": "Content-Disposition" - } - }, - "ContentEncoding": { - "target": "com.amazonaws.s3#ContentEncoding", - "traits": { - "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

\n \n

For directory buckets, only the aws-chunked value is supported in this header field.

\n
", - "smithy.api#httpHeader": "Content-Encoding" - } - }, - "ContentLanguage": { - "target": "com.amazonaws.s3#ContentLanguage", - "traits": { - "smithy.api#documentation": "

The language the content is in.

", - "smithy.api#httpHeader": "Content-Language" - } - }, - "ContentType": { - "target": "com.amazonaws.s3#ContentType", - "traits": { - "smithy.api#documentation": "

A standard MIME type that describes the format of the object data.

", - "smithy.api#httpHeader": "Content-Type" - } - }, - "CopySource": { - "target": "com.amazonaws.s3#CopySource", - "traits": { - "smithy.api#documentation": "

Specifies the source object for the copy operation. The source object can be up to 5 GB.\n If the source object is an object that was uploaded by using a multipart upload, the object\n copy will be a single part object after the source object is copied to the destination\n bucket.

\n

You specify the value of the copy source in one of two formats, depending on whether you\n 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 general purpose bucket\n awsexamplebucket, use\n awsexamplebucket/reports/january.pdf. The value must be URL-encoded.\n To copy the object reports/january.pdf from the directory bucket\n awsexamplebucket--use1-az5--x-s3, use\n awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must\n 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
      \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
    • \n

      Access points are not supported by directory buckets.

      \n
    • \n
    \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

If your source bucket versioning is enabled, the x-amz-copy-source header\n by default identifies the current version of an object to copy. If the current version is a\n delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use\n the versionId query parameter. Specifically, append\n ?versionId= 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.

\n

If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID\n for the copied object. 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 destination bucket, the version ID\n that Amazon S3 generates in the x-amz-version-id response header is always\n null.

\n \n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source", - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "CopySource" - } - } - }, - "CopySourceIfMatch": { - "target": "com.amazonaws.s3#CopySourceIfMatch", - "traits": { - "smithy.api#documentation": "

Copies the object if its entity tag (ETag) matches the specified tag.

\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
", - "smithy.api#httpHeader": "x-amz-copy-source-if-match" - } - }, - "CopySourceIfModifiedSince": { - "target": "com.amazonaws.s3#CopySourceIfModifiedSince", - "traits": { - "smithy.api#documentation": "

Copies the object if it has been modified since the specified time.

\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
", - "smithy.api#httpHeader": "x-amz-copy-source-if-modified-since" - } - }, - "CopySourceIfNoneMatch": { - "target": "com.amazonaws.s3#CopySourceIfNoneMatch", - "traits": { - "smithy.api#documentation": "

Copies the object if its entity tag (ETag) is different than the specified ETag.

\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
", - "smithy.api#httpHeader": "x-amz-copy-source-if-none-match" - } - }, - "CopySourceIfUnmodifiedSince": { - "target": "com.amazonaws.s3#CopySourceIfUnmodifiedSince", - "traits": { - "smithy.api#documentation": "

Copies the object if it hasn't been modified since the specified time.

\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
", - "smithy.api#httpHeader": "x-amz-copy-source-if-unmodified-since" - } - }, - "Expires": { - "target": "com.amazonaws.s3#Expires", - "traits": { - "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", - "smithy.api#httpHeader": "Expires" - } - }, - "GrantFullControl": { - "target": "com.amazonaws.s3#GrantFullControl", - "traits": { - "smithy.api#documentation": "

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-full-control" - } - }, - "GrantRead": { - "target": "com.amazonaws.s3#GrantRead", - "traits": { - "smithy.api#documentation": "

Allows grantee to read the object data and its metadata.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-read" - } - }, - "GrantReadACP": { - "target": "com.amazonaws.s3#GrantReadACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to read the object ACL.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-read-acp" - } - }, - "GrantWriteACP": { - "target": "com.amazonaws.s3#GrantWriteACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-write-acp" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The key of the destination object.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "Metadata": { - "target": "com.amazonaws.s3#Metadata", - "traits": { - "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", - "smithy.api#httpPrefixHeaders": "x-amz-meta-" - } - }, - "MetadataDirective": { - "target": "com.amazonaws.s3#MetadataDirective", - "traits": { - "smithy.api#documentation": "

Specifies whether the metadata is copied from the source object or replaced with\n metadata that's provided in the request. When copying an object, you can preserve all\n metadata (the default) or specify new metadata. If this header isn\u2019t specified,\n COPY is the default behavior.

\n

\n General purpose bucket - For general purpose buckets, when you\n grant permissions, you can use the s3:x-amz-metadata-directive condition key\n to enforce certain metadata behavior when objects are uploaded. For more information, see\n Amazon S3\n condition key examples in the Amazon S3 User Guide.

\n \n

\n x-amz-website-redirect-location is unique to each object and is not\n copied when using the x-amz-metadata-directive header. To copy the value,\n you must specify x-amz-website-redirect-location in the request\n header.

\n
", - "smithy.api#httpHeader": "x-amz-metadata-directive" - } - }, - "TaggingDirective": { - "target": "com.amazonaws.s3#TaggingDirective", - "traits": { - "smithy.api#documentation": "

Specifies whether the object tag-set is copied from the source object or replaced with\n the tag-set that's provided in the request.

\n

The default value is COPY.

\n \n

\n Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. \nWhen the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    \n
  • \n
  • \n

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    \n
  • \n
\n

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-tagging-directive" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized\n or unsupported values won\u2019t write a destination object and will receive a 400 Bad\n Request response.

\n

Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When\n copying an object, if you don't specify encryption information in your copy request, the\n encryption setting of the target object is set to the default encryption configuration of\n the destination bucket. By default, all buckets have a base level of encryption\n configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the\n destination bucket has a different default encryption configuration, Amazon S3 uses the\n corresponding encryption key to encrypt the target object copy.

\n

With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in\n its data centers and decrypts the data when you access it. For more information about\n server-side encryption, see Using Server-Side Encryption\n in the Amazon S3 User Guide.

\n

\n General purpose buckets \n

\n
    \n
  • \n

    For general purpose buckets, there are the following supported options for server-side\n encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption\n with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding\n KMS key, or a customer-provided key to encrypt the target object copy.

    \n
  • \n
  • \n

    When you perform a CopyObject operation, if you want to use a\n different type of encryption setting for the target object, you can specify\n appropriate encryption-related headers to encrypt the target object with an Amazon S3\n managed key, a KMS key, or a customer-provided key. If the encryption setting in\n your request is different from the default encryption configuration of the\n destination bucket, the encryption setting in your request takes precedence.

    \n
  • \n
\n

\n Directory buckets \n

\n
    \n
  • \n

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n
  • \n
  • \n

    To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you\n specify SSE-KMS as the directory bucket's default encryption configuration with\n a KMS key (specifically, a customer managed key).\n The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS\n configuration can only support 1 customer managed key per\n directory bucket for the lifetime of the bucket. After you specify a customer managed key for\n SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS\n configuration. Then, when you perform a CopyObject operation and want to\n specify server-side encryption settings for new object copies with SSE-KMS in the\n encryption-related request headers, you must ensure the encryption key is the same\n customer managed key that you specified for the directory bucket's default encryption\n configuration.\n

    \n
  • \n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "smithy.api#documentation": "

If the x-amz-storage-class header is not used, the copied object will be\n stored in the STANDARD Storage Class by default. The STANDARD\n storage class provides high durability and high availability. Depending on performance\n needs, you can specify a different Storage Class.

\n \n
    \n
  • \n

    \n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. \nUnsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    \n
  • \n
  • \n

    \n Amazon S3 on Outposts - S3 on Outposts only\n uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
\n

You can use the CopyObject action to change the storage class of an object\n that is already stored in Amazon S3 by using the x-amz-storage-class header. For\n more information, see Storage Classes in the\n Amazon S3 User Guide.

\n

Before using an object as a source object for the copy operation, you must restore a\n copy of it if it meets any of the following conditions:

\n
    \n
  • \n

    The storage class of the source object is GLACIER or\n DEEP_ARCHIVE.

    \n
  • \n
  • \n

    The storage class of the source object is INTELLIGENT_TIERING and\n it's S3 Intelligent-Tiering access tier is Archive Access or\n Deep Archive Access.

    \n
  • \n
\n

For more information, see RestoreObject and Copying\n Objects in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-storage-class" - } - }, - "WebsiteRedirectLocation": { - "target": "com.amazonaws.s3#WebsiteRedirectLocation", - "traits": { - "smithy.api#documentation": "

If the destination bucket is configured as a website, redirects requests for this object\n copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of\n this header in the object metadata. This value is unique to each object and is not copied\n when using the x-amz-metadata-directive header. Instead, you may opt to\n provide this header in combination with the x-amz-metadata-directive\n header.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-website-redirect-location" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example,\n AES256).

\n

When you perform a CopyObject operation, if you want to use a different\n type of encryption setting for the target object, you can specify appropriate\n encryption-related headers to encrypt the target object with an Amazon S3 managed key, a\n KMS key, or a customer-provided key. If the encryption setting in your request is\n different from the default encryption configuration of the destination bucket, the\n encryption setting in your request takes precedence.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", - "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", - "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption.\n All GET and PUT requests for an object protected by KMS will fail if they're not made via\n SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services\n SDKs and Amazon Web Services CLI, see Specifying the\n Signature Version in Request Authentication in the\n Amazon S3 User Guide.

\n

\n Directory buckets -\n To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSEKMSEncryptionContext": { - "target": "com.amazonaws.s3#SSEKMSEncryptionContext", - "traits": { - "smithy.api#documentation": "

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use\n for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

\n

\n General purpose buckets - This value must be explicitly\n added to specify encryption context for CopyObject requests if you want an\n additional encryption context for your destination object. The additional encryption\n context of the source object won't be copied to the destination object. For more\n information, see Encryption\n context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-context" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses\n SSE-KMS, you can enable an S3 Bucket Key for the object.

\n

Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object\n encryption with SSE-KMS. Specifying this header with a COPY action doesn\u2019t affect\n bucket-level settings for S3 Bucket Key.

\n

For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.

\n \n

\n Directory buckets -\n S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "CopySourceSSECustomerAlgorithm": { - "target": "com.amazonaws.s3#CopySourceSSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when decrypting the source object (for example,\n AES256).

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-algorithm" - } - }, - "CopySourceSSECustomerKey": { - "target": "com.amazonaws.s3#CopySourceSSECustomerKey", - "traits": { - "smithy.api#documentation": "

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be the same one that was used when\n the source object was created.

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key" - } - }, - "CopySourceSSECustomerKeyMD5": { - "target": "com.amazonaws.s3#CopySourceSSECustomerKeyMD5", - "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.

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key-MD5" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "Tagging": { - "target": "com.amazonaws.s3#TaggingHeader", - "traits": { - "smithy.api#documentation": "

The tag-set for the object copy in the destination bucket. This value must be used in\n conjunction with the x-amz-tagging-directive if you choose\n REPLACE for the x-amz-tagging-directive. If you choose\n COPY for the x-amz-tagging-directive, you don't need to set\n the x-amz-tagging header, because the tag-set will be copied from the source\n object directly. The tag-set must be encoded as URL Query parameters.

\n

The default value is the empty value.

\n \n

\n Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. \nWhen the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    \n
  • \n
  • \n

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    \n
  • \n
\n

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-tagging" - } - }, - "ObjectLockMode": { - "target": "com.amazonaws.s3#ObjectLockMode", - "traits": { - "smithy.api#documentation": "

The Object Lock mode that you want to apply to the object copy.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-mode" - } - }, - "ObjectLockRetainUntilDate": { - "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", - "traits": { - "smithy.api#documentation": "

The date and time when you want the Object Lock of the object copy to expire.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" - } - }, - "ObjectLockLegalHoldStatus": { - "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether you want to apply a legal hold to the object copy.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 account ID that you provide does not match the actual owner of the destination bucket, 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 account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-source-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#CopyObjectResult": { - "type": "structure", - "members": { - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "smithy.api#documentation": "

Returns the ETag of the new object. The ETag reflects only changes to the contents of an\n object, not its metadata.

" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Creation date of the object.

" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking 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 checksum is only present if the object was uploaded\n with the object. For more information, 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 the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present\n if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumSHA1": { - "target": "com.amazonaws.s3#ChecksumSHA1", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for all response elements.

" - } - }, - "com.amazonaws.s3#CopyPartResult": { - "type": "structure", - "members": { - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "smithy.api#documentation": "

Entity tag of the object.

" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Date and time at which the object was uploaded.

" - } - }, - "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 part. 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": "

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 part. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "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 SHA1 checksum of the part. For more information, see\n Checking object integrity in the\n 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 SHA256 checksum of the part. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for all response elements.

" - } - }, - "com.amazonaws.s3#CopySource": { - "type": "string", - "traits": { - "smithy.api#pattern": "^\\/?.+\\/.+$" - } - }, - "com.amazonaws.s3#CopySourceIfMatch": { - "type": "string" - }, - "com.amazonaws.s3#CopySourceIfModifiedSince": { - "type": "timestamp" - }, - "com.amazonaws.s3#CopySourceIfNoneMatch": { - "type": "string" - }, - "com.amazonaws.s3#CopySourceIfUnmodifiedSince": { - "type": "timestamp" - }, - "com.amazonaws.s3#CopySourceRange": { - "type": "string" - }, - "com.amazonaws.s3#CopySourceSSECustomerAlgorithm": { - "type": "string" - }, - "com.amazonaws.s3#CopySourceSSECustomerKey": { - "type": "string", - "traits": { - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.s3#CopySourceSSECustomerKeyMD5": { - "type": "string" - }, - "com.amazonaws.s3#CopySourceVersionId": { - "type": "string" - }, - "com.amazonaws.s3#CreateBucket": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#CreateBucketRequest" - }, - "output": { - "target": "com.amazonaws.s3#CreateBucketOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#BucketAlreadyExists" - }, - { - "target": "com.amazonaws.s3#BucketAlreadyOwnedByYou" - } - ], - "traits": { - "smithy.api#documentation": "\n

This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see \n CreateBucket\n .

\n
\n

Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services\n Access Key ID to authenticate requests. Anonymous requests are never allowed to create\n buckets. By creating the bucket, you become the bucket owner.

\n

There are two types of buckets: general purpose buckets and directory buckets. For more\n information about these bucket types, see Creating, configuring, and\n working with Amazon S3 buckets in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    \n General purpose buckets - If you send your\n CreateBucket request to the s3.amazonaws.com global\n endpoint, the request goes to the us-east-1 Region. So the signature\n calculations in Signature Version 4 must use us-east-1 as the Region,\n even if the location constraint in the request specifies another Region where the\n bucket is to be created. If you create a bucket in a Region other than US East (N.\n Virginia), your application must be able to handle 307 redirect. For more\n information, see Virtual hosting of\n buckets in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - In\n addition to the s3:CreateBucket permission, the following\n permissions are required in a policy when your CreateBucket\n request includes specific headers:

    \n
      \n
    • \n

      \n Access control lists (ACLs)\n - In your CreateBucket request, if you specify an\n access control list (ACL) and set it to public-read,\n public-read-write, authenticated-read, or\n if you explicitly specify any other custom ACLs, both\n s3:CreateBucket and s3:PutBucketAcl\n permissions are required. In your CreateBucket request,\n if you set the ACL to private, or if you don't specify\n any ACLs, only the s3:CreateBucket permission is\n required.

      \n
    • \n
    • \n

      \n Object Lock - In your\n CreateBucket request, if you set\n x-amz-bucket-object-lock-enabled to true, the\n s3:PutBucketObjectLockConfiguration and\n s3:PutBucketVersioning permissions are\n required.

      \n
    • \n
    • \n

      \n S3 Object Ownership - If\n your CreateBucket request includes the\n x-amz-object-ownership header, then the\n s3:PutBucketOwnershipControls permission is\n required.

      \n \n

      To set an ACL on a bucket as part of a\n CreateBucket request, you must explicitly set S3\n Object Ownership for the bucket to a different value than the\n default, BucketOwnerEnforced. Additionally, if your\n desired bucket ACL grants public access, you must first create the\n bucket (without the bucket ACL) and then explicitly disable Block\n Public Access on the bucket before using PutBucketAcl\n to set the ACL. If you try to create a bucket with a public ACL,\n the request will fail.

      \n

      For the majority of modern use cases in S3, we recommend that\n you keep all Block Public Access settings enabled and keep ACLs\n disabled. If you would like to share data with users outside of\n your account, you can use bucket policies as needed. For more\n information, see Controlling ownership of objects and disabling ACLs for your\n bucket and Blocking public access to your Amazon S3 storage in\n the Amazon S3 User Guide.

      \n
      \n
    • \n
    • \n

      \n S3 Block Public Access - If\n your specific use case requires granting public access to your S3\n resources, you can disable Block Public Access. Specifically, you can\n create a new bucket with Block Public Access enabled, then separately\n call the \n DeletePublicAccessBlock\n API. To use this operation, you must have the\n s3:PutBucketPublicAccessBlock permission. For more\n information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:CreateBucket permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n \n

    The permissions for ACLs, Object Lock, S3 Object Ownership, and S3\n Block Public Access are not supported for directory buckets. For\n directory buckets, all Block Public Access settings are enabled at the\n bucket level and S3 Object Ownership is set to Bucket owner enforced\n (ACLs disabled). These settings can't be modified.

    \n

    For more information about permissions for creating and working with\n directory buckets, see Directory buckets in the\n Amazon S3 User Guide. For more information about\n supported S3 features for directory buckets, see Features of S3 Express One Zone in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CreateBucket:

\n ", - "smithy.api#examples": [ - { - "title": "To create a bucket in a specific region", - "documentation": "The following example creates a bucket. The request specifies an AWS region where to create the bucket.", - "input": { - "Bucket": "examplebucket", - "CreateBucketConfiguration": { - "LocationConstraint": "eu-west-1" - } - }, - "output": { - "Location": "http://examplebucket..s3.amazonaws.com/" - } - }, - { - "title": "To create a bucket ", - "documentation": "The following example creates a bucket.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "Location": "/examplebucket" - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - }, - "DisableAccessPoints": { - "value": true - } - } - } - }, - "com.amazonaws.s3#CreateBucketConfiguration": { - "type": "structure", - "members": { - "LocationConstraint": { - "target": "com.amazonaws.s3#BucketLocationConstraint", - "traits": { - "smithy.api#documentation": "

Specifies the Region where the bucket will be created. You might choose a Region to\n optimize latency, minimize costs, or address regulatory requirements. For example, if you\n reside in Europe, you will probably find it advantageous to create buckets in the Europe\n (Ireland) Region.

\n

If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region\n (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

\n

For a list of the valid values for all of the Amazon Web Services Regions, see Regions and\n Endpoints.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "Location": { - "target": "com.amazonaws.s3#LocationInfo", - "traits": { - "smithy.api#documentation": "

Specifies the location where the bucket will be created.

\n

\n Directory buckets - The location type is Availability Zone or Local Zone. \n To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the \n error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide.\n

\n \n

This functionality is only supported by directory buckets.

\n
" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketInfo", - "traits": { - "smithy.api#documentation": "

Specifies the information about the bucket that will be created.

\n \n

This functionality is only supported by directory buckets.

\n
" - } - } - }, - "traits": { - "smithy.api#documentation": "

The configuration information for the bucket.

" - } - }, - "com.amazonaws.s3#CreateBucketMetadataTableConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#CreateBucketMetadataTableConfigurationRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "

Creates a metadata table configuration for a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the following permissions. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n

If you also want to integrate your table bucket with Amazon Web Services analytics services so that you \n can query your metadata table, you need additional permissions. For more information, see \n \n Integrating Amazon S3 Tables with Amazon Web Services analytics services in the \n Amazon S3 User Guide.

\n
    \n
  • \n

    \n s3:CreateBucketMetadataTableConfiguration\n

    \n
  • \n
  • \n

    \n s3tables:CreateNamespace\n

    \n
  • \n
  • \n

    \n s3tables:GetTable\n

    \n
  • \n
  • \n

    \n s3tables:CreateTable\n

    \n
  • \n
  • \n

    \n s3tables:PutTablePolicy\n

    \n
  • \n
\n
\n
\n

The following operations are related to CreateBucketMetadataTableConfiguration:

\n ", - "smithy.api#http": { - "method": "POST", - "uri": "/{Bucket}?metadataTable", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#CreateBucketMetadataTableConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

\n The general purpose bucket that you want to create the metadata table configuration in.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

\n The Content-MD5 header for the metadata table configuration.\n

", - "smithy.api#httpHeader": "Content-MD5" - } - }, - "ChecksumAlgorithm": { - "target": "com.amazonaws.s3#ChecksumAlgorithm", - "traits": { - "smithy.api#documentation": "

\n The checksum algorithm to use with your metadata table configuration. \n

", - "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" - } - }, - "MetadataTableConfiguration": { - "target": "com.amazonaws.s3#MetadataTableConfiguration", - "traits": { - "smithy.api#documentation": "

\n The contents of your metadata table configuration. \n

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "MetadataTableConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

\n The expected owner of the general purpose bucket that contains your metadata table configuration.\n

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#CreateBucketOutput": { - "type": "structure", - "members": { - "Location": { - "target": "com.amazonaws.s3#Location", - "traits": { - "smithy.api#documentation": "

A forward slash followed by the name of the bucket.

", - "smithy.api#httpHeader": "Location" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#CreateBucketRequest": { - "type": "structure", - "members": { - "ACL": { - "target": "com.amazonaws.s3#BucketCannedACL", - "traits": { - "smithy.api#documentation": "

The canned ACL to apply to the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-acl" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket to create.

\n

\n General purpose buckets - For information about bucket naming\n restrictions, see Bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "CreateBucketConfiguration": { - "target": "com.amazonaws.s3#CreateBucketConfiguration", - "traits": { - "smithy.api#documentation": "

The configuration information for the bucket.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "CreateBucketConfiguration" - } - }, - "GrantFullControl": { - "target": "com.amazonaws.s3#GrantFullControl", - "traits": { - "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-grant-full-control" - } - }, - "GrantRead": { - "target": "com.amazonaws.s3#GrantRead", - "traits": { - "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-grant-read" - } - }, - "GrantReadACP": { - "target": "com.amazonaws.s3#GrantReadACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-grant-read-acp" - } - }, - "GrantWrite": { - "target": "com.amazonaws.s3#GrantWrite", - "traits": { - "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-grant-write" - } - }, - "GrantWriteACP": { - "target": "com.amazonaws.s3#GrantWriteACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-grant-write-acp" - } - }, - "ObjectLockEnabledForBucket": { - "target": "com.amazonaws.s3#ObjectLockEnabledForBucket", - "traits": { - "smithy.api#documentation": "

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-bucket-object-lock-enabled" - } - }, - "ObjectOwnership": { - "target": "com.amazonaws.s3#ObjectOwnership", - "traits": { - "smithy.api#httpHeader": "x-amz-object-ownership" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#CreateMultipartUpload": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#CreateMultipartUploadRequest" - }, - "output": { - "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 request.\n For more information about multipart uploads, see Multipart Upload Overview in the\n Amazon S3 User Guide.

\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 stops charging you for\n storing them only after you either complete or abort a multipart upload.

\n
\n

If you have configured a lifecycle rule to abort incomplete multipart uploads, the\n created multipart upload must be completed within the number of days specified in the\n bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible\n for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.

\n \n
    \n
  • \n

    \n Directory buckets -\n S3 Lifecycle is not supported by directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Request signing
\n
\n

For request signing, multipart upload is just a series of regular requests. You\n initiate a multipart upload, send one or more requests to upload parts, and then\n complete the multipart upload process. You sign each request individually. There\n is nothing special about signing multipart upload requests. For more information\n about signing, see Authenticating\n Requests (Amazon Web Services Signature Version 4) in the\n Amazon S3 User Guide.

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n perform a multipart upload with encryption using an Key Management Service (KMS)\n KMS key, the requester must have permission to the\n kms:Decrypt and kms:GenerateDataKey actions on\n the key. The requester must also have permissions for the\n kms:GenerateDataKey action for the\n CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs. These\n permissions are required because Amazon S3 must decrypt and read data from the\n encrypted file parts before it completes the multipart upload. For more\n information, see Multipart upload API and permissions and Protecting data\n using server-side encryption with Amazon Web Services KMS in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose buckets - Server-side\n encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it.\n Amazon S3 automatically encrypts all new objects that are uploaded to an S3\n bucket. When doing a multipart upload, if you don't specify encryption\n information in your request, the encryption setting of the uploaded parts is\n set to the default encryption configuration of the destination bucket. By\n default, all buckets have a base level of encryption configuration that uses\n server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination\n bucket has a default encryption configuration that uses server-side\n encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided\n encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a\n customer-provided key to encrypt the uploaded parts. When you perform a\n CreateMultipartUpload operation, if you want to use a different type of\n encryption setting for the uploaded parts, you can request that Amazon S3\n encrypts the object with a different encryption key (such as an Amazon S3 managed\n key, a KMS key, or a customer-provided key). When the encryption setting\n in your request is different from the default encryption configuration of\n the destination bucket, the encryption setting in your request takes\n precedence. If you choose to provide your own encryption key, the request\n headers you provide in UploadPart and\n UploadPartCopy\n requests must match the headers you used in the\n CreateMultipartUpload request.

    \n
      \n
    • \n

      Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key\n (aws/s3) and KMS customer managed keys stored in Key Management Service\n (KMS) \u2013 If you want Amazon Web Services to manage the keys used to encrypt data,\n 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
        \n
      • \n

        If you specify\n x-amz-server-side-encryption:aws:kms, but\n don't provide\n x-amz-server-side-encryption-aws-kms-key-id,\n Amazon S3 uses the Amazon Web Services managed key (aws/s3 key) in\n KMS to protect the data.

        \n
      • \n
      • \n

        To perform a multipart upload with encryption by using an\n Amazon Web Services KMS key, the requester must have permission to the\n kms:Decrypt and\n kms:GenerateDataKey* actions on the key.\n These permissions are required because Amazon S3 must decrypt and\n read data from the encrypted file parts before it completes\n the multipart upload. For more information, see Multipart upload API and permissions and Protecting data using server-side encryption with Amazon Web Services\n KMS in the\n Amazon S3 User Guide.

        \n
      • \n
      • \n

        If your Identity and Access Management (IAM) user or role is in the same\n Amazon Web Services account as the KMS key, then you must have these\n permissions on the key policy. If your IAM user or role is\n in a different account from the key, then you must have the\n permissions on both the key policy and your IAM user or\n role.

        \n
      • \n
      • \n

        All GET and PUT requests for an\n object protected by KMS fail if you don't make them by\n using Secure Sockets Layer (SSL), Transport Layer Security\n (TLS), or Signature Version 4. For information about\n configuring any of the officially supported Amazon Web Services SDKs and\n Amazon Web Services CLI, see Specifying the Signature Version in\n Request Authentication in the\n Amazon S3 User Guide.

        \n
      • \n
      \n
      \n

      For more information about server-side encryption with KMS keys\n (SSE-KMS), see Protecting\n Data Using Server-Side Encryption with KMS keys in the\n Amazon S3 User Guide.

      \n
    • \n
    • \n

      Use customer-provided encryption keys (SSE-C) \u2013 If you want to\n manage your own encryption keys, provide all the following headers in\n 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\n customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with\n customer-provided encryption keys (SSE-C) in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n \n

    For directory buckets, when you perform a\n CreateMultipartUpload operation and an\n UploadPartCopy operation, the request headers you provide\n in the CreateMultipartUpload request must match the default\n encryption configuration of the destination bucket.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CreateMultipartUpload:

\n ", - "smithy.api#examples": [ - { - "title": "To initiate a multipart upload", - "documentation": "The following example initiates a multipart upload.", - "input": { - "Bucket": "examplebucket", - "Key": "largeobject" - }, - "output": { - "Bucket": "examplebucket", - "UploadId": "ibZBv_75gd9r8lH_gqXatLdxMVpAlj6ZQjEs.OwyF3953YdwbcQnMA2BLGn8Lx12fQNICtMw5KyteFeHw.Sjng--", - "Key": "largeobject" - } - } - ], - "smithy.api#http": { - "method": "POST", - "uri": "/{Bucket}/{Key+}?uploads", - "code": 200 - } - } - }, - "com.amazonaws.s3#CreateMultipartUploadOutput": { - "type": "structure", - "members": { - "AbortDate": { - "target": "com.amazonaws.s3#AbortDate", - "traits": { - "smithy.api#documentation": "

If the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, the response includes this header. The header indicates when the initiated\n multipart upload becomes eligible for an abort operation. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in\n the Amazon S3 User Guide.

\n

The response also includes the x-amz-abort-rule-id header that provides the\n ID of the lifecycle configuration rule that defines the abort action.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-abort-date" - } - }, - "AbortRuleId": { - "target": "com.amazonaws.s3#AbortRuleId", - "traits": { - "smithy.api#documentation": "

This header is returned along with the x-amz-abort-date header. It\n identifies the applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-abort-rule-id" - } - }, - "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\n access point ARN or access point alias if used.

\n \n

Access points are not supported by directory buckets.

\n
", - "smithy.api#xmlName": "Bucket" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

" - } - }, - "UploadId": { - "target": "com.amazonaws.s3#MultipartUploadId", - "traits": { - "smithy.api#documentation": "

ID for the initiated multipart upload.

" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" - } - }, - "SSECustomerKeyMD5": { - "target": "com.amazonaws.s3#SSECustomerKeyMD5", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSEKMSEncryptionContext": { - "target": "com.amazonaws.s3#SSEKMSEncryptionContext", - "traits": { - "smithy.api#documentation": "

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-context" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "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" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

Indicates the checksum type that you want Amazon S3 to use to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-type" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "InitiateMultipartUploadResult" - } - }, - "com.amazonaws.s3#CreateMultipartUploadRequest": { - "type": "structure", - "members": { - "ACL": { - "target": "com.amazonaws.s3#ObjectCannedACL", - "traits": { - "smithy.api#documentation": "

The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as\n canned ACLs. Each canned ACL has a predefined set of grantees and\n permissions. For more information, see Canned ACL in the\n Amazon S3 User Guide.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to\n predefined groups defined by Amazon S3. These permissions are then added to the access control\n list (ACL) on the new object. For more information, see Using ACLs. One way to grant\n the permissions using the request headers is to specify a canned ACL with the\n x-amz-acl request header.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-acl" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket where the multipart upload is initiated and where the object is\n uploaded.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "CacheControl": { - "target": "com.amazonaws.s3#CacheControl", - "traits": { - "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", - "smithy.api#httpHeader": "Cache-Control" - } - }, - "ContentDisposition": { - "target": "com.amazonaws.s3#ContentDisposition", - "traits": { - "smithy.api#documentation": "

Specifies presentational information for the object.

", - "smithy.api#httpHeader": "Content-Disposition" - } - }, - "ContentEncoding": { - "target": "com.amazonaws.s3#ContentEncoding", - "traits": { - "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

\n \n

For directory buckets, only the aws-chunked value is supported in this header field.

\n
", - "smithy.api#httpHeader": "Content-Encoding" - } - }, - "ContentLanguage": { - "target": "com.amazonaws.s3#ContentLanguage", - "traits": { - "smithy.api#documentation": "

The language that the content is in.

", - "smithy.api#httpHeader": "Content-Language" - } - }, - "ContentType": { - "target": "com.amazonaws.s3#ContentType", - "traits": { - "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", - "smithy.api#httpHeader": "Content-Type" - } - }, - "Expires": { - "target": "com.amazonaws.s3#Expires", - "traits": { - "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", - "smithy.api#httpHeader": "Expires" - } - }, - "GrantFullControl": { - "target": "com.amazonaws.s3#GrantFullControl", - "traits": { - "smithy.api#documentation": "

Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP\n permissions on the object.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

You specify each grantee as a type=value pair, where the type is one of the\n following:

\n
    \n
  • \n

    \n id \u2013 if the value specified is the canonical user ID of an\n Amazon Web Services account

    \n
  • \n
  • \n

    \n uri \u2013 if you are granting permissions to a predefined group

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-full-control" - } - }, - "GrantRead": { - "target": "com.amazonaws.s3#GrantRead", - "traits": { - "smithy.api#documentation": "

Specify access permissions explicitly to allow grantee to read the object data and its\n metadata.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

You specify each grantee as a type=value pair, where the type is one of the\n following:

\n
    \n
  • \n

    \n id \u2013 if the value specified is the canonical user ID of an\n Amazon Web Services account

    \n
  • \n
  • \n

    \n uri \u2013 if you are granting permissions to a predefined group

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-read" - } - }, - "GrantReadACP": { - "target": "com.amazonaws.s3#GrantReadACP", - "traits": { - "smithy.api#documentation": "

Specify access permissions explicitly to allows grantee to read the object ACL.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

You specify each grantee as a type=value pair, where the type is one of the\n following:

\n
    \n
  • \n

    \n id \u2013 if the value specified is the canonical user ID of an\n Amazon Web Services account

    \n
  • \n
  • \n

    \n uri \u2013 if you are granting permissions to a predefined group

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-read-acp" - } - }, - "GrantWriteACP": { - "target": "com.amazonaws.s3#GrantWriteACP", - "traits": { - "smithy.api#documentation": "

Specify access permissions explicitly to allows grantee to allow grantee to write the\n ACL for the applicable object.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

You specify each grantee as a type=value pair, where the type is one of the\n following:

\n
    \n
  • \n

    \n id \u2013 if the value specified is the canonical user ID of an\n Amazon Web Services account

    \n
  • \n
  • \n

    \n uri \u2013 if you are granting permissions to a predefined group

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-write-acp" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which the multipart upload is to be initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "Metadata": { - "target": "com.amazonaws.s3#Metadata", - "traits": { - "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", - "smithy.api#httpPrefixHeaders": "x-amz-meta-" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

\n
    \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n
  • \n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "smithy.api#documentation": "

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. For more information, see\n Storage\n Classes in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

    \n
  • \n
  • \n

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-storage-class" - } - }, - "WebsiteRedirectLocation": { - "target": "com.amazonaws.s3#WebsiteRedirectLocation", - "traits": { - "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-website-redirect-location" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 customer-provided encryption key according to\n RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption\n key was transmitted without error.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same\n account that's issuing the command, you must use the full Key ARN not the Key ID.

\n

\n General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS \n key to use. If you specify\n x-amz-server-side-encryption:aws:kms or\n x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key\n (aws/s3) to protect the data.

\n

\n Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSEKMSEncryptionContext": { - "target": "com.amazonaws.s3#SSEKMSEncryptionContext", - "traits": { - "smithy.api#documentation": "

Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-context" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

\n

\n General purpose buckets - Setting this header to\n true causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3\n Bucket Key.

\n

\n Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "Tagging": { - "target": "com.amazonaws.s3#TaggingHeader", - "traits": { - "smithy.api#documentation": "

The tag-set for the object. The tag-set must be encoded as URL Query parameters.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-tagging" - } - }, - "ObjectLockMode": { - "target": "com.amazonaws.s3#ObjectLockMode", - "traits": { - "smithy.api#documentation": "

Specifies the Object Lock mode that you want to apply to the uploaded object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-mode" - } - }, - "ObjectLockRetainUntilDate": { - "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", - "traits": { - "smithy.api#documentation": "

Specifies the date and time when you want the Object Lock to expire.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" - } - }, - "ObjectLockLegalHoldStatus": { - "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether you want to apply a legal hold to the uploaded object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 account ID that you provide does not match the actual owner of the bucket, 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 that 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" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

Indicates the checksum type that you want Amazon S3 to use to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-type" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#CreateSession": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#CreateSessionRequest" - }, - "output": { - "target": "com.amazonaws.s3#CreateSessionOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#NoSuchBucket" - } - ], - "traits": { - "smithy.api#documentation": "

Creates a session that establishes temporary security credentials to support fast\n authentication and authorization for the Zonal endpoint API operations on directory buckets. For more\n information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone\n APIs in the Amazon S3 User Guide.

\n

To make Zonal endpoint API requests on a directory bucket, use the CreateSession\n API operation. Specifically, you grant s3express:CreateSession permission to a\n bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the\n CreateSession API request on the bucket, which returns temporary security\n credentials that include the access key ID, secret access key, session token, and\n expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After\n the session is created, you don\u2019t need to use other policies to grant permissions to each\n Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by\n applying the temporary security credentials of the session to the request headers and\n following the SigV4 protocol for authentication. You also apply the session token to the\n x-amz-s3session-token request header for authorization. Temporary security\n credentials are scoped to the bucket and expire after 5 minutes. After the expiration time,\n any calls that you make with those credentials will fail. You must use IAM credentials\n again to make a CreateSession API request that generates a new set of\n temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond\n the original specified interval.

\n

If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid\n service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to\n initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the\n Amazon S3 User Guide.

\n \n
    \n
  • \n

    You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n \n CopyObject API operation -\n Unlike other Zonal endpoint API operations, the CopyObject API operation doesn't use\n the temporary security credentials returned from the CreateSession\n API operation for authentication and authorization. For information about\n authentication and authorization of the CopyObject API operation on\n directory buckets, see CopyObject.

    \n
  • \n
  • \n

    \n \n HeadBucket API operation -\n Unlike other Zonal endpoint API operations, the HeadBucket API operation doesn't use\n the temporary security credentials returned from the CreateSession\n API operation for authentication and authorization. For information about\n authentication and authorization of the HeadBucket API operation on\n directory buckets, see HeadBucket.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n

To obtain temporary security credentials, you must create\n a bucket policy or an IAM identity-based policy that grants s3express:CreateSession\n permission to the bucket. In a policy, you can have the\n s3express:SessionMode condition key to control who can create a\n ReadWrite or ReadOnly session. For more information\n about ReadWrite or ReadOnly sessions, see \n x-amz-create-session-mode\n . For example policies, see\n Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

\n

To grant cross-account access to Zonal endpoint API operations, the bucket policy should also\n grant both accounts the s3express:CreateSession permission.

\n

If you want to encrypt objects with SSE-KMS, you must also have the\n kms:GenerateDataKey and the kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the target KMS\n key.

\n
\n
Encryption
\n
\n

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

\n

For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, \nyou authenticate and authorize requests through CreateSession for low latency. \n To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

\n \n

\n Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. \n After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration.\n

\n
\n

In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, \n you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

\n \n

When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n it's not supported to override the values of the encryption settings from the CreateSession request. \n\n

\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?session", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "DisableS3ExpressSessionAuth": { - "value": true - } - } - } - }, - "com.amazonaws.s3#CreateSessionOutput": { - "type": "structure", - "members": { - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store objects in the directory bucket.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS \n symmetric encryption customer managed key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSEKMSEncryptionContext": { - "target": "com.amazonaws.s3#SSEKMSEncryptionContext", - "traits": { - "smithy.api#documentation": "

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets\n passed on to Amazon Web Services KMS for future GetObject \n operations on this object.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-context" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether to use an S3 Bucket Key for server-side encryption\n with KMS keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "Credentials": { - "target": "com.amazonaws.s3#SessionCredentials", - "traits": { - "smithy.api#documentation": "

The established temporary security credentials for the created session.

", - "smithy.api#required": {}, - "smithy.api#xmlName": "Credentials" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "CreateSessionResult" - } - }, - "com.amazonaws.s3#CreateSessionRequest": { - "type": "structure", - "members": { - "SessionMode": { - "target": "com.amazonaws.s3#SessionMode", - "traits": { - "smithy.api#documentation": "

Specifies the mode of the session that will be created, either ReadWrite or\n ReadOnly. By default, a ReadWrite session is created. A\n ReadWrite session is capable of executing all the Zonal endpoint API operations on a\n directory bucket. A ReadOnly session is constrained to execute the following\n Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2,\n GetObjectAttributes, ListParts, and\n ListMultipartUploads.

", - "smithy.api#httpHeader": "x-amz-create-session-mode" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket that you create a session for.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm to use when you store objects in the directory bucket.

\n

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. \n For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If you specify x-amz-server-side-encryption with aws:kms, you must specify the \n x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS \n symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same\n account that't issuing the command, you must use the full Key ARN not the Key ID.

\n

Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSEKMSEncryptionContext": { - "target": "com.amazonaws.s3#SSEKMSEncryptionContext", - "traits": { - "smithy.api#documentation": "

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets passed on\n to Amazon Web Services KMS for future GetObject operations on\n this object.

\n

\n General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-context" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using KMS keys (SSE-KMS).

\n

S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#CreationDate": { - "type": "timestamp" - }, - "com.amazonaws.s3#DataRedundancy": { - "type": "enum", - "members": { - "SingleAvailabilityZone": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SingleAvailabilityZone" - } - }, - "SingleLocalZone": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SingleLocalZone" - } - } - } - }, - "com.amazonaws.s3#Date": { - "type": "timestamp", - "traits": { - "smithy.api#timestampFormat": "date-time" - } - }, - "com.amazonaws.s3#Days": { - "type": "integer" - }, - "com.amazonaws.s3#DaysAfterInitiation": { - "type": "integer" - }, - "com.amazonaws.s3#DefaultRetention": { - "type": "structure", - "members": { - "Mode": { - "target": "com.amazonaws.s3#ObjectLockRetentionMode", - "traits": { - "smithy.api#documentation": "

The default Object Lock retention mode you want to apply to new objects placed in the\n specified bucket. Must be used with either Days or Years.

" - } - }, - "Days": { - "target": "com.amazonaws.s3#Days", - "traits": { - "smithy.api#documentation": "

The number of days that you want to specify for the default retention period. Must be\n used with Mode.

" - } - }, - "Years": { - "target": "com.amazonaws.s3#Years", - "traits": { - "smithy.api#documentation": "

The number of years that you want to specify for the default retention period. Must be\n used with Mode.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

The container element for optionally specifying the default Object Lock retention\n settings for new objects placed in the specified bucket.

\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 or\n Years but you must select one. You cannot specify\n Days and Years at the same time.

    \n
  • \n
\n
" - } - }, - "com.amazonaws.s3#Delete": { - "type": "structure", - "members": { - "Objects": { - "target": "com.amazonaws.s3#ObjectIdentifierList", - "traits": { - "smithy.api#documentation": "

The object to delete.

\n \n

\n Directory buckets - For directory buckets,\n an object that's composed entirely of whitespace characters is not supported by the\n DeleteObjects API operation. The request will receive a 400 Bad\n Request error and none of the objects in the request will be deleted.

\n
", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Object" - } - }, - "Quiet": { - "target": "com.amazonaws.s3#Quiet", - "traits": { - "smithy.api#documentation": "

Element to enable quiet mode for the request. When you add this element, you must set\n its value to true.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for the objects to delete.

" - } - }, - "com.amazonaws.s3#DeleteBucket": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "

Deletes the S3 bucket. All objects (including all object versions and delete markers) in\n the bucket must be deleted before the bucket itself can be deleted.

\n \n
    \n
  • \n

    \n Directory buckets - If multipart\n uploads in a directory bucket are in progress, you can't delete the bucket until\n all the in-progress multipart uploads are aborted or completed.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the s3:DeleteBucket permission on the specified\n bucket in a policy.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:DeleteBucket permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucket:

\n ", - "smithy.api#examples": [ - { - "title": "To delete a bucket", - "documentation": "The following example deletes the specified bucket.", - "input": { - "Bucket": "forrandall2" - } - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketAnalyticsConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketAnalyticsConfigurationRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes an analytics configuration for the bucket (specified by the analytics\n configuration ID).

\n

To use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration 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

For information about the Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis.

\n

The following operations are related to\n DeleteBucketAnalyticsConfiguration:

\n ", - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?analytics", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketAnalyticsConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket from which an analytics configuration is deleted.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#AnalyticsId", - "traits": { - "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketCors": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketCorsRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the cors configuration information set for the bucket.

\n

To use this operation, you must have permission to perform the\n s3:PutBucketCORS action. The bucket owner has this permission by default\n and can grant this permission to others.

\n

For information about cors, see Enabling Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.

\n

\n Related Resources\n

\n ", - "smithy.api#examples": [ - { - "title": "To delete cors configuration on a bucket.", - "documentation": "The following example deletes CORS configuration on a bucket.", - "input": { - "Bucket": "examplebucket" - } - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?cors", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketCorsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

Specifies the bucket whose cors configuration is being deleted.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketEncryption": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketEncryptionRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "

This implementation of the DELETE action resets the default encryption for the bucket as\n server-side encryption with Amazon S3 managed keys (SSE-S3).

\n \n \n \n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucketEncryption:

\n ", - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?encryption", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketEncryptionRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the server-side encryption configuration to\n delete.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketIntelligentTieringConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketIntelligentTieringConfigurationRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to DeleteBucketIntelligentTieringConfiguration include:

\n ", - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?intelligent-tiering", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketIntelligentTieringConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#IntelligentTieringId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketInventoryConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketInventoryConfigurationRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes an inventory configuration (identified by the inventory ID) from the\n bucket.

\n

To use this operation, you must have permissions to perform the\n s3:PutInventoryConfiguration 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

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

\n

Operations related to DeleteBucketInventoryConfiguration include:

\n ", - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?inventory", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketInventoryConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the inventory configuration to delete.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#InventoryId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketLifecycle": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketLifecycleRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "

Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the\n lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your\n objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of\n rules contained in the deleted lifecycle configuration.

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:PutLifecycleConfiguration\n permission.

    \n

    For more information about permissions, see Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
\n
    \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:PutLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n

For more information about the object expiration, see Elements to Describe Lifecycle Actions.

\n

Related actions include:

\n ", - "smithy.api#examples": [ - { - "title": "To delete lifecycle configuration on a bucket.", - "documentation": "The following example deletes lifecycle configuration on a bucket.", - "input": { - "Bucket": "examplebucket" - } - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?lifecycle", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketLifecycleRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name of the lifecycle to delete.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketMetadataTableConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketMetadataTableConfigurationRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "

\n Deletes a metadata table configuration from a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n
\n
\n

The following operations are related to DeleteBucketMetadataTableConfiguration:

\n ", - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?metadataTable", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketMetadataTableConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

\n The general purpose bucket that you want to remove the metadata table configuration from.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

\n The expected bucket owner of the general purpose bucket that you want to remove the \n metadata table configuration from.\n

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketMetricsConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketMetricsConfigurationRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the\n metrics configuration ID) from the bucket. Note that this doesn't include the daily storage\n metrics.

\n

To use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with\n Amazon CloudWatch.

\n

The following operations are related to\n DeleteBucketMetricsConfiguration:

\n ", - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?metrics", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketMetricsConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the metrics configuration to delete.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#MetricsId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketOwnershipControls": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketOwnershipControlsRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you\n must have the s3:PutBucketOwnershipControls permission. For more information\n about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\n

For information about Amazon S3 Object Ownership, see Using Object Ownership.

\n

The following operations are related to\n DeleteBucketOwnershipControls:

\n ", - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?ownershipControls", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketOwnershipControlsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The Amazon S3 bucket whose OwnershipControls you want to delete.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketPolicy": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketPolicyRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "

Deletes the policy of a specified bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n DeleteBucketPolicy permissions on the specified bucket and belong\n to the bucket owner's account in order to use this operation.

\n

If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:DeleteBucketPolicy permission is required in a policy.\n For more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:DeleteBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucketPolicy\n

\n ", - "smithy.api#examples": [ - { - "title": "To delete bucket policy", - "documentation": "The following example deletes bucket policy on the specified bucket.", - "input": { - "Bucket": "examplebucket" - } - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?policy", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketPolicyRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketReplication": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketReplicationRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the replication configuration from the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:PutReplicationConfiguration action. The bucket owner has these\n permissions by default and can grant it to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n \n

It can take a while for the deletion of a replication configuration to fully\n propagate.

\n
\n

For information about replication configuration, see Replication in the\n Amazon S3 User Guide.

\n

The following operations are related to DeleteBucketReplication:

\n ", - "smithy.api#examples": [ - { - "title": "To delete bucket replication configuration", - "documentation": "The following example deletes replication configuration set on bucket.", - "input": { - "Bucket": "example" - } - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?replication", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketReplicationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

Specifies the bucket being deleted.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketTagging": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketTaggingRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the tags from the bucket.

\n

To use this operation, you must have permission to perform the\n s3:PutBucketTagging action. By default, the bucket owner has this\n permission and can grant this permission to others.

\n

The following operations are related to DeleteBucketTagging:

\n ", - "smithy.api#examples": [ - { - "title": "To delete bucket tags", - "documentation": "The following example deletes bucket tags.", - "input": { - "Bucket": "examplebucket" - } - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?tagging", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketTaggingRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket that has the tag set to be removed.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteBucketWebsite": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteBucketWebsiteRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This action removes the website configuration for a bucket. Amazon S3 returns a 200\n OK response upon successfully deleting a website configuration on the specified\n bucket. You will get a 200 OK response if the website configuration you are\n trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if\n the bucket specified in the request does not exist.

\n

This DELETE action requires the S3:DeleteBucketWebsite permission. By\n default, only the bucket owner can delete the website configuration attached to a bucket.\n However, bucket owners can grant other users permission to delete the website configuration\n by writing a bucket policy granting them the S3:DeleteBucketWebsite\n permission.

\n

For more information about hosting websites, see Hosting Websites on Amazon S3.

\n

The following operations are related to DeleteBucketWebsite:

\n ", - "smithy.api#examples": [ - { - "title": "To delete bucket website configuration", - "documentation": "The following example deletes bucket website configuration.", - "input": { - "Bucket": "examplebucket" - } - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?website", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeleteBucketWebsiteRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name for which you want to remove the website configuration.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteMarker": { - "type": "boolean" - }, - "com.amazonaws.s3#DeleteMarkerEntry": { - "type": "structure", - "members": { - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

The account that created the delete marker.

" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The object key.

" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID of an object.

" - } - }, - "IsLatest": { - "target": "com.amazonaws.s3#IsLatest", - "traits": { - "smithy.api#documentation": "

Specifies whether the object is (true) or is not (false) the latest version of an\n object.

" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Date and time when the object was last modified.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Information about the delete marker.

" - } - }, - "com.amazonaws.s3#DeleteMarkerReplication": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#DeleteMarkerReplicationStatus", - "traits": { - "smithy.api#documentation": "

Indicates whether to replicate delete markers.

\n \n

Indicates whether to replicate delete markers.

\n
" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 replicates delete markers. If you specify a Filter\n in your replication configuration, you must also include a\n DeleteMarkerReplication element. If your Filter includes a\n Tag element, the DeleteMarkerReplication\n Status must be set to Disabled, because Amazon S3 does not support replicating\n delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration.

\n

For more information about delete marker replication, see Basic Rule\n Configuration.

\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
" - } - }, - "com.amazonaws.s3#DeleteMarkerReplicationStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } - } - } - }, - "com.amazonaws.s3#DeleteMarkerVersionId": { - "type": "string" - }, - "com.amazonaws.s3#DeleteMarkers": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#DeleteMarkerEntry" - } - }, - "com.amazonaws.s3#DeleteObject": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteObjectRequest" - }, - "output": { - "target": "com.amazonaws.s3#DeleteObjectOutput" - }, - "traits": { - "smithy.api#documentation": "

Removes an object from a bucket. The behavior depends on the bucket's versioning state:

\n
    \n
  • \n

    If bucket versioning is not enabled, the operation permanently deletes the object.

    \n
  • \n
  • \n

    If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object\u2019s versionId in the request. For more information about versioning-enabled buckets, see Deleting object versions from a versioning-enabled bucket.

    \n
  • \n
  • \n

    If bucket versioning is suspended, the operation removes the object that has a null versionId, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null versionId, and all versions of the object have a versionId, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a versionId, you must include the object\u2019s versionId in the request. For more information about versioning-suspended buckets, see Deleting objects from versioning-suspended buckets.

    \n
  • \n
\n \n
    \n
  • \n

    \n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null \n to the versionId query parameter in the request.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n

To remove a specific version, you must use the versionId query parameter. Using this\n query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3\n sets the response header x-amz-delete-marker to true.

\n

If the object you want to delete is in a bucket where the bucket versioning\n configuration is MFA Delete enabled, you must include the x-amz-mfa request\n header in the DELETE versionId request. Requests that include\n x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3\n User Guide. To see sample\n requests that use versioning, see Sample\n Request.

\n \n

\n Directory buckets - MFA delete is not supported by directory buckets.

\n
\n

You can delete objects by explicitly calling DELETE Object or calling \n (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block\n users or accounts from removing or deleting objects from your bucket, you must deny them\n the s3:DeleteObject, s3:DeleteObjectVersion, and\n s3:PutLifeCycleConfiguration actions.

\n \n

\n Directory buckets - S3 Lifecycle is not supported by directory buckets.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The following permissions are required in your policies when your \n DeleteObjects request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:DeleteObject\n - To delete an object from a bucket, you must always have the s3:DeleteObject permission.

      \n
    • \n
    • \n

      \n \n s3:DeleteObjectVersion\n - To delete a specific version of an object from a versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following action is related to DeleteObject:

\n ", - "smithy.api#examples": [ - { - "title": "To delete an object (from a non-versioned bucket)", - "documentation": "The following example deletes an object from a non-versioned bucket.", - "input": { - "Bucket": "ExampleBucket", - "Key": "HappyFace.jpg" - } - }, - { - "title": "To delete an object", - "documentation": "The following example deletes an object from an S3 bucket.", - "input": { - "Bucket": "examplebucket", - "Key": "objectkey.jpg" - }, - "output": {} - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}/{Key+}?x-id=DeleteObject", - "code": 204 - } - } - }, - "com.amazonaws.s3#DeleteObjectOutput": { - "type": "structure", - "members": { - "DeleteMarker": { - "target": "com.amazonaws.s3#DeleteMarker", - "traits": { - "smithy.api#documentation": "

Indicates whether the specified object version that was permanently deleted was (true)\n or was not (false) a delete marker before deletion. In a simple DELETE, this header\n indicates whether (true) or not (false) the current version of the object is a delete\n marker. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-delete-marker" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Returns the version ID of the delete marker created as a result of the DELETE\n operation.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-version-id" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#DeleteObjectRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name of the bucket containing the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Key name of the object to delete.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "MFA": { - "target": "com.amazonaws.s3#MFA", - "traits": { - "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-mfa" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n \n

For directory buckets in this API operation, only the null value of the version ID is supported.

\n
", - "smithy.api#httpQuery": "versionId" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "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\n s3:BypassGovernanceRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "IfMatch": { - "target": "com.amazonaws.s3#IfMatch", - "traits": { - "smithy.api#documentation": "

The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns\n a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No \n Content) response.

\n

For more information about conditional requests, see RFC 7232.

\n \n

This functionality is only supported for directory buckets.

\n
", - "smithy.api#httpHeader": "If-Match" - } - }, - "IfMatchLastModifiedTime": { - "target": "com.amazonaws.s3#IfMatchLastModifiedTime", - "traits": { - "smithy.api#documentation": "

If present, the object is deleted only if its modification times matches the provided\n Timestamp. If the Timestamp values do not match, the operation\n returns a 412 Precondition Failed error. If the Timestamp matches\n or if the object doesn\u2019t exist, the operation returns a 204 Success (No\n Content) response.

\n \n

This functionality is only supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-if-match-last-modified-time" - } - }, - "IfMatchSize": { - "target": "com.amazonaws.s3#IfMatchSize", - "traits": { - "smithy.api#documentation": "

If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn\u2019t exist, \n the operation returns a 204 Success (No Content) response.

\n \n

This functionality is only supported for directory buckets.

\n
\n \n

You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size \n conditional headers in conjunction with each-other or individually.

\n
", - "smithy.api#httpHeader": "x-amz-if-match-size" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteObjectTagging": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteObjectTaggingRequest" - }, - "output": { - "target": "com.amazonaws.s3#DeleteObjectTaggingOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes the entire tag set from the specified object. For more information about\n managing object tags, see Object Tagging.

\n

To use this operation, you must have permission to perform the\n s3:DeleteObjectTagging action.

\n

To delete tags of a specific object version, add the versionId query\n parameter in the request. You will need permission for the\n s3:DeleteObjectVersionTagging action.

\n

The following operations are related to DeleteObjectTagging:

\n ", - "smithy.api#examples": [ - { - "title": "To remove tag set from an object", - "documentation": "The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version.", - "input": { - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" - }, - "output": { - "VersionId": "null" - } - }, - { - "title": "To remove tag set from an object version", - "documentation": "The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.", - "input": { - "Bucket": "examplebucket", - "Key": "HappyFace.jpg", - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" - }, - "output": { - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" - } - } - ], - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}/{Key+}?tagging", - "code": 204 - } - } - }, - "com.amazonaws.s3#DeleteObjectTaggingOutput": { - "type": "structure", - "members": { - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The versionId of the object the tag-set was removed from.

", - "smithy.api#httpHeader": "x-amz-version-id" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#DeleteObjectTaggingRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name containing the objects from which to remove the tags.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The key that identifies the object in the bucket from which to remove all tags.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The versionId of the object that the tag-set will be removed from.

", - "smithy.api#httpQuery": "versionId" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeleteObjects": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeleteObjectsRequest" - }, - "output": { - "target": "com.amazonaws.s3#DeleteObjectsOutput" - }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "

This operation 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 operation provides\n a suitable alternative to sending individual delete requests, reducing per-request\n overhead.

\n

The request can contain a list of up to 1,000 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 operation and returns the result of that delete, success or failure, in the response.\n If the object specified in the request isn't found, Amazon S3 confirms the deletion by returning the result as deleted.

\n \n
    \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n

The operation supports two modes for the response: verbose and quiet. By default, the\n operation 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 operation encountered an error. For a successful deletion in a quiet mode, the operation\n does not return any information about the delete in the response body.

\n

When performing this action on an MFA Delete enabled bucket, that attempts to delete any\n 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 in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n MFA delete is not supported by directory buckets.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n following permissions are required in your policies when your\n DeleteObjects request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:DeleteObject\n \n - To delete an object from a bucket, you must always specify\n the s3:DeleteObject permission.

      \n
    • \n
    • \n

      \n \n s3:DeleteObjectVersion\n - To delete a specific version of an object from a\n versioning-enabled bucket, you must specify the\n s3:DeleteObjectVersion permission.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Content-MD5 request header
\n
\n
    \n
  • \n

    \n General purpose bucket - The Content-MD5\n request header is required for all Multi-Object Delete requests. Amazon S3 uses\n the header value to ensure that your request body has not been altered in\n transit.

    \n
  • \n
  • \n

    \n Directory bucket - The\n Content-MD5 request header or a additional checksum request header\n (including x-amz-checksum-crc32,\n x-amz-checksum-crc32c, x-amz-checksum-sha1, or\n x-amz-checksum-sha256) is required for all Multi-Object\n Delete requests.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteObjects:

\n ", - "smithy.api#examples": [ - { - "title": "To delete multiple object versions from a versioned bucket", - "documentation": "The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.", - "input": { - "Bucket": "examplebucket", - "Delete": { - "Objects": [ - { - "Key": "HappyFace.jpg", - "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" - }, - { - "Key": "HappyFace.jpg", - "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" - } - ], - "Quiet": false - } - }, - "output": { - "Deleted": [ - { - "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd", - "Key": "HappyFace.jpg" - }, - { - "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b", - "Key": "HappyFace.jpg" - } - ] - } - }, - { - "title": "To delete multiple objects from a versioned bucket", - "documentation": "The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.", - "input": { - "Bucket": "examplebucket", - "Delete": { - "Objects": [ - { - "Key": "objectkey1" - }, - { - "Key": "objectkey2" - } - ], - "Quiet": false - } - }, - "output": { - "Deleted": [ - { - "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", - "Key": "objectkey1", - "DeleteMarker": true - }, - { - "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", - "Key": "objectkey2", - "DeleteMarker": true - } - ] - } - } - ], - "smithy.api#http": { - "method": "POST", - "uri": "/{Bucket}?delete", - "code": 200 - } - } - }, - "com.amazonaws.s3#DeleteObjectsOutput": { - "type": "structure", - "members": { - "Deleted": { - "target": "com.amazonaws.s3#DeletedObjects", - "traits": { - "smithy.api#documentation": "

Container element for a successful delete. It identifies the object that was\n successfully deleted.

", - "smithy.api#xmlFlattened": {} - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - }, - "Errors": { - "target": "com.amazonaws.s3#Errors", - "traits": { - "smithy.api#documentation": "

Container for a failed delete action that describes the object that Amazon S3 attempted to\n delete and the error it encountered.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Error" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "DeleteResult" - } - }, - "com.amazonaws.s3#DeleteObjectsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name containing the objects to delete.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Delete": { - "target": "com.amazonaws.s3#Delete", - "traits": { - "smithy.api#documentation": "

Container for the request.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "Delete" - } - }, - "MFA": { - "target": "com.amazonaws.s3#MFA", - "traits": { - "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.

\n

When performing the DeleteObjects operation on an MFA delete enabled\n bucket, which attempts to delete the specified versioned objects, you must include an MFA\n token. If you don't provide an MFA token, the entire request will fail, even if there are\n non-versioned objects that you are trying to delete. If you provide an invalid token,\n whether there are versioned object keys in the request or not, the entire Multi-Object\n Delete request will fail. For information about MFA Delete, see MFA\n Delete in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-mfa" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "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\n s3:BypassGovernanceRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 account ID that you provide does not match the actual owner of the bucket, 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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", - "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeletePublicAccessBlock": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#DeletePublicAccessBlockRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this\n operation, you must have the s3:PutBucketPublicAccessBlock permission. For\n more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

The following operations are related to DeletePublicAccessBlock:

\n ", - "smithy.api#http": { - "method": "DELETE", - "uri": "/{Bucket}?publicAccessBlock", - "code": 204 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#DeletePublicAccessBlockRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#DeletedObject": { - "type": "structure", - "members": { - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The name of the deleted object.

" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The version ID of the deleted object.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "DeleteMarker": { - "target": "com.amazonaws.s3#DeleteMarker", - "traits": { - "smithy.api#documentation": "

Indicates whether the specified object version that was permanently deleted was (true)\n or was not (false) a delete marker before deletion. In a simple DELETE, this header\n indicates whether (true) or not (false) the current version of the object is a delete\n marker. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "DeleteMarkerVersionId": { - "target": "com.amazonaws.s3#DeleteMarkerVersionId", - "traits": { - "smithy.api#documentation": "

The version ID of the delete marker created as a result of the DELETE operation. If you\n delete a specific object version, the value returned by this header is the version ID of\n the object version deleted.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - } - }, - "traits": { - "smithy.api#documentation": "

Information about the deleted object.

" - } - }, - "com.amazonaws.s3#DeletedObjects": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#DeletedObject" - } - }, - "com.amazonaws.s3#Delimiter": { - "type": "string" - }, - "com.amazonaws.s3#Description": { - "type": "string" - }, - "com.amazonaws.s3#Destination": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the\n results.

", - "smithy.api#required": {} - } - }, - "Account": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to\n change replica ownership to the Amazon Web Services account that owns the destination bucket by\n specifying the AccessControlTranslation property, this is the account ID of\n the destination bucket owner. For more information, see Replication Additional\n Configuration: Changing the Replica Owner in the\n Amazon S3 User Guide.

" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "smithy.api#documentation": "

The storage class to use when replicating objects, such as S3 Standard or reduced\n redundancy. By default, Amazon S3 uses the storage class of the source object to create the\n object replica.

\n

For valid values, see the StorageClass element of the PUT Bucket\n replication action in the Amazon S3 API Reference.

" - } - }, - "AccessControlTranslation": { - "target": "com.amazonaws.s3#AccessControlTranslation", - "traits": { - "smithy.api#documentation": "

Specify this only in a cross-account scenario (where source and destination bucket\n owners are not the same), and you want to change replica ownership to the Amazon Web Services account\n that owns the destination bucket. If this is not specified in the replication\n configuration, the replicas are owned by same Amazon Web Services account that owns the source\n object.

" - } - }, - "EncryptionConfiguration": { - "target": "com.amazonaws.s3#EncryptionConfiguration", - "traits": { - "smithy.api#documentation": "

A container that provides information about encryption. If\n SourceSelectionCriteria is specified, you must specify this element.

" - } - }, - "ReplicationTime": { - "target": "com.amazonaws.s3#ReplicationTime", - "traits": { - "smithy.api#documentation": "

A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time\n when all objects and operations on objects must be replicated. Must be specified together\n with a Metrics block.

" - } - }, - "Metrics": { - "target": "com.amazonaws.s3#Metrics", - "traits": { - "smithy.api#documentation": "

A container specifying replication metrics-related settings enabling replication\n metrics and events.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies information about where to publish analysis or configuration results for an\n Amazon S3 bucket and S3 Replication Time Control (S3 RTC).

" - } - }, - "com.amazonaws.s3#DirectoryBucketToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 1024 - } - } - }, - "com.amazonaws.s3#DisplayName": { - "type": "string" - }, - "com.amazonaws.s3#ETag": { - "type": "string" - }, - "com.amazonaws.s3#EmailAddress": { - "type": "string" - }, - "com.amazonaws.s3#EnableRequestProgress": { - "type": "boolean" - }, - "com.amazonaws.s3#EncodingType": { - "type": "enum", - "members": { - "url": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "url" - } - } - }, - "traits": { - "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
" - } - }, - "com.amazonaws.s3#Encryption": { - "type": "structure", - "members": { - "EncryptionType": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when storing job results in Amazon S3 (for example,\n AES256, aws:kms).

", - "smithy.api#required": {} - } - }, - "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 encryption customer managed key to use for encryption of job results. Amazon S3 only\n supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service\n Developer Guide.

" - } - }, - "KMSContext": { - "target": "com.amazonaws.s3#KMSContext", - "traits": { - "smithy.api#documentation": "

If the encryption type is aws:kms, this optional value can be used to\n specify the encryption context for the restore results.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Contains the type of server-side encryption used.

" - } - }, - "com.amazonaws.s3#EncryptionConfiguration": { - "type": "structure", - "members": { - "ReplicaKmsKeyID": { - "target": "com.amazonaws.s3#ReplicaKmsKeyID", - "traits": { - "smithy.api#documentation": "

Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in\n Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to\n encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more\n information, see Asymmetric keys in Amazon Web Services\n KMS in the Amazon Web Services Key Management Service Developer\n Guide.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies encryption-related information for an Amazon S3 bucket that is a destination for\n replicated objects.

\n \n

If you're specifying a customer managed KMS key, we recommend using a fully\n qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the\n key within the requester\u2019s account. This behavior can result in data that's encrypted\n with a KMS key that belongs to the requester, and not the bucket owner.

\n
" - } - }, - "com.amazonaws.s3#EncryptionTypeMismatch": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

\n The existing object was created with a different encryption type. \n Subsequent write requests must include the appropriate encryption \n parameters in the request or while creating the session.\n

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.s3#End": { - "type": "long" - }, - "com.amazonaws.s3#EndEvent": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

A message that indicates the request is complete and no more messages will be sent. You\n should not assume that the request is complete until the client receives an\n EndEvent.

" - } - }, - "com.amazonaws.s3#Error": { - "type": "structure", - "members": { - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The error key.

" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The version ID of the error.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "Code": { - "target": "com.amazonaws.s3#Code", - "traits": { - "smithy.api#documentation": "

The error code is a string that uniquely identifies an error condition. It is meant to\n be read and understood by programs that detect and handle errors by type. The following is\n a list of Amazon S3 error codes. For more information, see Error responses.

\n
    \n
  • \n
      \n
    • \n

      \n Code: AccessDenied

      \n
    • \n
    • \n

      \n Description: Access Denied

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: AccountProblem

      \n
    • \n
    • \n

      \n Description: There is a problem with your Amazon Web Services account\n that prevents the action from completing successfully. Contact Amazon Web Services Support\n for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: AllAccessDisabled

      \n
    • \n
    • \n

      \n Description: All access to this Amazon S3 resource has been\n disabled. Contact Amazon Web Services Support for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: AmbiguousGrantByEmailAddress

      \n
    • \n
    • \n

      \n Description: The email address you provided is\n associated with more than one account.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: AuthorizationHeaderMalformed

      \n
    • \n
    • \n

      \n Description: The authorization header you provided is\n invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: BadDigest

      \n
    • \n
    • \n

      \n Description: The Content-MD5 you specified did not\n match what we received.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: BucketAlreadyExists

      \n
    • \n
    • \n

      \n Description: The requested bucket name is not\n available. The bucket namespace is shared by all users of the system. Please\n select a different name and try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: BucketAlreadyOwnedByYou

      \n
    • \n
    • \n

      \n Description: The bucket you tried to create already\n exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in\n the North Virginia Region. For legacy compatibility, if you re-create an\n existing bucket that you already own in the North Virginia Region, Amazon S3 returns\n 200 OK and resets the bucket access control lists (ACLs).

      \n
    • \n
    • \n

      \n Code: 409 Conflict (in all Regions except the North\n Virginia Region)

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: BucketNotEmpty

      \n
    • \n
    • \n

      \n Description: The bucket you tried to delete is not\n empty.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: CredentialsNotSupported

      \n
    • \n
    • \n

      \n Description: This request does not support\n credentials.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: CrossLocationLoggingProhibited

      \n
    • \n
    • \n

      \n Description: Cross-location logging not allowed.\n Buckets in one geographic location cannot log information to a bucket in\n another location.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: EntityTooSmall

      \n
    • \n
    • \n

      \n Description: Your proposed upload is smaller than the\n minimum allowed object size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: EntityTooLarge

      \n
    • \n
    • \n

      \n Description: Your proposed upload exceeds the maximum\n allowed object size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: ExpiredToken

      \n
    • \n
    • \n

      \n Description: The provided token has expired.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: IllegalVersioningConfigurationException

      \n
    • \n
    • \n

      \n Description: Indicates that the versioning\n configuration specified in the request is invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: IncompleteBody

      \n
    • \n
    • \n

      \n Description: You did not provide the number of bytes\n specified by the Content-Length HTTP header

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: IncorrectNumberOfFilesInPostRequest

      \n
    • \n
    • \n

      \n Description: POST requires exactly one file upload per\n request.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InlineDataTooLarge

      \n
    • \n
    • \n

      \n Description: Inline data exceeds the maximum allowed\n size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InternalError

      \n
    • \n
    • \n

      \n Description: We encountered an internal error. Please\n try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 500 Internal Server Error

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidAccessKeyId

      \n
    • \n
    • \n

      \n Description: The Amazon Web Services access key ID you provided does\n not exist in our records.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidAddressingHeader

      \n
    • \n
    • \n

      \n Description: You must specify the Anonymous\n role.

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidArgument

      \n
    • \n
    • \n

      \n Description: Invalid Argument

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidBucketName

      \n
    • \n
    • \n

      \n Description: The specified bucket is not valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidBucketState

      \n
    • \n
    • \n

      \n Description: The request is not valid with the current\n state of the bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidDigest

      \n
    • \n
    • \n

      \n Description: The Content-MD5 you specified is not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidEncryptionAlgorithmError

      \n
    • \n
    • \n

      \n Description: The encryption request you specified is\n not valid. The valid value is AES256.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidLocationConstraint

      \n
    • \n
    • \n

      \n Description: The specified location constraint is not\n valid. For more information about Regions, see How to Select\n a Region for Your Buckets.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidObjectState

      \n
    • \n
    • \n

      \n Description: The action is not valid for the current\n state of the object.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidPart

      \n
    • \n
    • \n

      \n Description: One or more of the specified parts could\n not be found. The part might not have been uploaded, or the specified entity\n tag might not have matched the part's entity tag.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidPartOrder

      \n
    • \n
    • \n

      \n Description: The list of parts was not in ascending\n order. Parts list must be specified in order by part number.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidPayer

      \n
    • \n
    • \n

      \n Description: All access to this object has been\n disabled. Please contact Amazon Web Services Support for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidPolicyDocument

      \n
    • \n
    • \n

      \n Description: The content of the form does not meet the\n conditions specified in the policy document.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRange

      \n
    • \n
    • \n

      \n Description: The requested range cannot be\n satisfied.

      \n
    • \n
    • \n

      \n HTTP Status Code: 416 Requested Range Not\n Satisfiable

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Please use\n AWS4-HMAC-SHA256.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: SOAP requests must be made over an HTTPS\n connection.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported for buckets with non-DNS compliant names.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported for buckets with periods (.) in their names.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate endpoint only\n supports virtual style requests.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate is not configured\n on this bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate is disabled on\n this bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported on this bucket. Contact Amazon Web Services Support for more information.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration cannot be\n enabled on this bucket. Contact Amazon Web Services Support for more information.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidSecurity

      \n
    • \n
    • \n

      \n Description: The provided security credentials are not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidSOAPRequest

      \n
    • \n
    • \n

      \n Description: The SOAP request body is invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidStorageClass

      \n
    • \n
    • \n

      \n Description: The storage class you specified is not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidTargetBucketForLogging

      \n
    • \n
    • \n

      \n Description: The target bucket for logging does not\n exist, is not owned by you, or does not have the appropriate grants for the\n log-delivery group.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidToken

      \n
    • \n
    • \n

      \n Description: The provided token is malformed or\n otherwise invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidURI

      \n
    • \n
    • \n

      \n Description: Couldn't parse the specified URI.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: KeyTooLongError

      \n
    • \n
    • \n

      \n Description: Your key is too long.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MalformedACLError

      \n
    • \n
    • \n

      \n Description: The XML you provided was not well-formed\n or did not validate against our published schema.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MalformedPOSTRequest

      \n
    • \n
    • \n

      \n Description: The body of your POST request is not\n well-formed multipart/form-data.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MalformedXML

      \n
    • \n
    • \n

      \n Description: This happens when the user sends malformed\n XML (XML that doesn't conform to the published XSD) for the configuration. The\n error message is, \"The XML you provided was not well-formed or did not validate\n against our published schema.\"

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MaxMessageLengthExceeded

      \n
    • \n
    • \n

      \n Description: Your request was too big.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MaxPostPreDataLengthExceededError

      \n
    • \n
    • \n

      \n Description: Your POST request fields preceding the\n upload file were too large.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MetadataTooLarge

      \n
    • \n
    • \n

      \n Description: Your metadata headers exceed the maximum\n allowed metadata size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MethodNotAllowed

      \n
    • \n
    • \n

      \n Description: The specified method is not allowed\n against this resource.

      \n
    • \n
    • \n

      \n HTTP Status Code: 405 Method Not Allowed

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingAttachment

      \n
    • \n
    • \n

      \n Description: A SOAP attachment was expected, but none\n were found.

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingContentLength

      \n
    • \n
    • \n

      \n Description: You must provide the Content-Length HTTP\n header.

      \n
    • \n
    • \n

      \n HTTP Status Code: 411 Length Required

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingRequestBodyError

      \n
    • \n
    • \n

      \n Description: This happens when the user sends an empty\n XML document as a request. The error message is, \"Request body is empty.\"\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingSecurityElement

      \n
    • \n
    • \n

      \n Description: The SOAP 1.1 request is missing a security\n element.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingSecurityHeader

      \n
    • \n
    • \n

      \n Description: Your request is missing a required\n header.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoLoggingStatusForKey

      \n
    • \n
    • \n

      \n Description: There is no such thing as a logging status\n subresource for a key.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchBucket

      \n
    • \n
    • \n

      \n Description: The specified bucket does not\n exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchBucketPolicy

      \n
    • \n
    • \n

      \n Description: The specified bucket does not have a\n bucket policy.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchKey

      \n
    • \n
    • \n

      \n Description: The specified key does not exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchLifecycleConfiguration

      \n
    • \n
    • \n

      \n Description: The lifecycle configuration does not\n exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchUpload

      \n
    • \n
    • \n

      \n Description: The specified multipart upload does not\n exist. The upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchVersion

      \n
    • \n
    • \n

      \n Description: Indicates that the version ID specified in\n the request does not match an existing version.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NotImplemented

      \n
    • \n
    • \n

      \n Description: A header you provided implies\n functionality that is not implemented.

      \n
    • \n
    • \n

      \n HTTP Status Code: 501 Not Implemented

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NotSignedUp

      \n
    • \n
    • \n

      \n Description: Your account is not signed up for the Amazon S3\n service. You must sign up before you can use Amazon S3. You can sign up at the\n following URL: Amazon S3\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: OperationAborted

      \n
    • \n
    • \n

      \n Description: A conflicting conditional action is\n currently in progress against this resource. Try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: PermanentRedirect

      \n
    • \n
    • \n

      \n Description: The bucket you are attempting to access\n must be addressed using the specified endpoint. Send all future requests to\n this endpoint.

      \n
    • \n
    • \n

      \n HTTP Status Code: 301 Moved Permanently

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: PreconditionFailed

      \n
    • \n
    • \n

      \n Description: At least one of the preconditions you\n specified did not hold.

      \n
    • \n
    • \n

      \n HTTP Status Code: 412 Precondition Failed

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: Redirect

      \n
    • \n
    • \n

      \n Description: Temporary redirect.

      \n
    • \n
    • \n

      \n HTTP Status Code: 307 Moved Temporarily

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RestoreAlreadyInProgress

      \n
    • \n
    • \n

      \n Description: Object restore is already in\n progress.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RequestIsNotMultiPartContent

      \n
    • \n
    • \n

      \n Description: Bucket POST must be of the enclosure-type\n multipart/form-data.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RequestTimeout

      \n
    • \n
    • \n

      \n Description: Your socket connection to the server was\n not read from or written to within the timeout period.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RequestTimeTooSkewed

      \n
    • \n
    • \n

      \n Description: The difference between the request time\n and the server's time is too large.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RequestTorrentOfBucketError

      \n
    • \n
    • \n

      \n Description: Requesting the torrent file of a bucket is\n not permitted.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: SignatureDoesNotMatch

      \n
    • \n
    • \n

      \n Description: The request signature we calculated does\n not match the signature you provided. Check your Amazon Web Services secret access key and\n signing method. For more information, see REST\n Authentication and SOAP\n Authentication for details.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: ServiceUnavailable

      \n
    • \n
    • \n

      \n Description: Service is unable to handle\n request.

      \n
    • \n
    • \n

      \n HTTP Status Code: 503 Service Unavailable

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: SlowDown

      \n
    • \n
    • \n

      \n Description: Reduce your request rate.

      \n
    • \n
    • \n

      \n HTTP Status Code: 503 Slow Down

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: TemporaryRedirect

      \n
    • \n
    • \n

      \n Description: You are being redirected to the bucket\n while DNS updates.

      \n
    • \n
    • \n

      \n HTTP Status Code: 307 Moved Temporarily

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: TokenRefreshRequired

      \n
    • \n
    • \n

      \n Description: The provided token must be\n refreshed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: TooManyBuckets

      \n
    • \n
    • \n

      \n Description: You have attempted to create more buckets\n than allowed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: UnexpectedContent

      \n
    • \n
    • \n

      \n Description: This request does not support\n content.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: UnresolvableGrantByEmailAddress

      \n
    • \n
    • \n

      \n Description: The email address you provided does not\n match any account on record.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: UserKeyMustBeSpecified

      \n
    • \n
    • \n

      \n Description: The bucket POST must contain the specified\n field name. If it is specified, check the order of the fields.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
\n

" - } - }, - "Message": { - "target": "com.amazonaws.s3#Message", - "traits": { - "smithy.api#documentation": "

The error message contains a generic description of the error condition in English. It\n is intended for a human audience. Simple programs display the message directly to the end\n user if they encounter an error condition they don't know how or don't care to handle.\n Sophisticated programs with more exhaustive error handling and proper internationalization\n are more likely to ignore the error message.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for all error elements.

" - } - }, - "com.amazonaws.s3#ErrorCode": { - "type": "string" - }, - "com.amazonaws.s3#ErrorDetails": { - "type": "structure", - "members": { - "ErrorCode": { - "target": "com.amazonaws.s3#ErrorCode", - "traits": { - "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code. The possible error codes and \n error messages are as follows:\n

\n
    \n
  • \n

    \n AccessDeniedCreatingResources - You don't have sufficient permissions to \n create the required resources. Make sure that you have s3tables:CreateNamespace, \n s3tables:CreateTable, s3tables:GetTable and \n s3tables:PutTablePolicy permissions, and then try again. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.\n

    \n
  • \n
  • \n

    \n AccessDeniedWritingToTable - Unable to write to the metadata table because of \n missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new \n metadata table. To create a new metadata table, you must delete the metadata configuration for \n this bucket, and then create a new metadata configuration.

    \n
  • \n
  • \n

    \n DestinationTableNotFound - The destination table doesn't exist. To create a \n new metadata table, you must delete the metadata configuration for this bucket, and then \n create a new metadata configuration.

    \n
  • \n
  • \n

    \n ServerInternalError - An internal error has occurred. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.

    \n
  • \n
  • \n

    \n TableAlreadyExists - The table that you specified already exists in the table \n bucket's namespace. Specify a different table name. To create a new metadata table, you must \n delete the metadata configuration for this bucket, and then create a new metadata \n configuration.

    \n
  • \n
  • \n

    \n TableBucketNotFound - The table bucket that you specified doesn't exist in \n this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new \n metadata table, you must delete the metadata configuration for this bucket, and then create \n a new metadata configuration.

    \n
  • \n
" - } - }, - "ErrorMessage": { - "target": "com.amazonaws.s3#ErrorMessage", - "traits": { - "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error message. The possible error codes and \n error messages are as follows:\n

\n
    \n
  • \n

    \n AccessDeniedCreatingResources - You don't have sufficient permissions to \n create the required resources. Make sure that you have s3tables:CreateNamespace, \n s3tables:CreateTable, s3tables:GetTable and \n s3tables:PutTablePolicy permissions, and then try again. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.\n

    \n
  • \n
  • \n

    \n AccessDeniedWritingToTable - Unable to write to the metadata table because of \n missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new \n metadata table. To create a new metadata table, you must delete the metadata configuration for \n this bucket, and then create a new metadata configuration.

    \n
  • \n
  • \n

    \n DestinationTableNotFound - The destination table doesn't exist. To create a \n new metadata table, you must delete the metadata configuration for this bucket, and then \n create a new metadata configuration.

    \n
  • \n
  • \n

    \n ServerInternalError - An internal error has occurred. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.

    \n
  • \n
  • \n

    \n TableAlreadyExists - The table that you specified already exists in the table \n bucket's namespace. Specify a different table name. To create a new metadata table, you must \n delete the metadata configuration for this bucket, and then create a new metadata \n configuration.

    \n
  • \n
  • \n

    \n TableBucketNotFound - The table bucket that you specified doesn't exist in \n this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new \n metadata table, you must delete the metadata configuration for this bucket, and then create \n a new metadata configuration.

    \n
  • \n
" - } - } - }, - "traits": { - "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code and error message.\n

" - } - }, - "com.amazonaws.s3#ErrorDocument": { - "type": "structure", - "members": { - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The object key name to use when a 4XX class error occurs.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

The error information.

" - } - }, - "com.amazonaws.s3#ErrorMessage": { - "type": "string" - }, - "com.amazonaws.s3#Errors": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Error" - } - }, - "com.amazonaws.s3#Event": { - "type": "enum", - "members": { - "s3_ReducedRedundancyLostObject": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ReducedRedundancyLostObject" - } - }, - "s3_ObjectCreated_": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectCreated:*" - } - }, - "s3_ObjectCreated_Put": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectCreated:Put" - } - }, - "s3_ObjectCreated_Post": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectCreated:Post" - } - }, - "s3_ObjectCreated_Copy": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectCreated:Copy" - } - }, - "s3_ObjectCreated_CompleteMultipartUpload": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectCreated:CompleteMultipartUpload" - } - }, - "s3_ObjectRemoved_": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectRemoved:*" - } - }, - "s3_ObjectRemoved_Delete": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectRemoved:Delete" - } - }, - "s3_ObjectRemoved_DeleteMarkerCreated": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectRemoved:DeleteMarkerCreated" - } - }, - "s3_ObjectRestore_": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectRestore:*" - } - }, - "s3_ObjectRestore_Post": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectRestore:Post" - } - }, - "s3_ObjectRestore_Completed": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectRestore:Completed" - } - }, - "s3_Replication_": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:Replication:*" - } - }, - "s3_Replication_OperationFailedReplication": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:Replication:OperationFailedReplication" - } - }, - "s3_Replication_OperationNotTracked": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:Replication:OperationNotTracked" - } - }, - "s3_Replication_OperationMissedThreshold": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:Replication:OperationMissedThreshold" - } - }, - "s3_Replication_OperationReplicatedAfterThreshold": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:Replication:OperationReplicatedAfterThreshold" - } - }, - "s3_ObjectRestore_Delete": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectRestore:Delete" - } - }, - "s3_LifecycleTransition": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:LifecycleTransition" - } - }, - "s3_IntelligentTiering": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:IntelligentTiering" - } - }, - "s3_ObjectAcl_Put": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectAcl:Put" - } - }, - "s3_LifecycleExpiration_": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:LifecycleExpiration:*" - } - }, - "s3_LifecycleExpiration_Delete": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:LifecycleExpiration:Delete" - } - }, - "s3_LifecycleExpiration_DeleteMarkerCreated": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:LifecycleExpiration:DeleteMarkerCreated" - } - }, - "s3_ObjectTagging_": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectTagging:*" - } - }, - "s3_ObjectTagging_Put": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectTagging:Put" - } - }, - "s3_ObjectTagging_Delete": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "s3:ObjectTagging:Delete" - } - } - }, - "traits": { - "smithy.api#documentation": "

The bucket event for which to send notifications.

" - } - }, - "com.amazonaws.s3#EventBridgeConfiguration": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

A container for specifying the configuration for Amazon EventBridge.

" - } - }, - "com.amazonaws.s3#EventList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Event" - } - }, - "com.amazonaws.s3#ExistingObjectReplication": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#ExistingObjectReplicationStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 replicates existing source bucket objects.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Optional configuration to replicate existing source bucket objects.

\n \n

This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the\n Amazon S3 User Guide.

\n
" - } - }, - "com.amazonaws.s3#ExistingObjectReplicationStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } - } - } - }, - "com.amazonaws.s3#Expiration": { - "type": "string" - }, - "com.amazonaws.s3#ExpirationStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } - } - } - }, - "com.amazonaws.s3#ExpiredObjectDeleteMarker": { - "type": "boolean" - }, - "com.amazonaws.s3#Expires": { - "type": "timestamp" - }, - "com.amazonaws.s3#ExposeHeader": { - "type": "string" - }, - "com.amazonaws.s3#ExposeHeaders": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#ExposeHeader" - } - }, - "com.amazonaws.s3#Expression": { - "type": "string" - }, - "com.amazonaws.s3#ExpressionType": { - "type": "enum", - "members": { - "SQL": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SQL" - } - } - } - }, - "com.amazonaws.s3#FetchOwner": { - "type": "boolean" - }, - "com.amazonaws.s3#FieldDelimiter": { - "type": "string" - }, - "com.amazonaws.s3#FileHeaderInfo": { - "type": "enum", - "members": { - "USE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "USE" - } - }, - "IGNORE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "IGNORE" - } - }, - "NONE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "NONE" - } - } - } - }, - "com.amazonaws.s3#FilterRule": { - "type": "structure", - "members": { - "Name": { - "target": "com.amazonaws.s3#FilterRuleName", - "traits": { - "smithy.api#documentation": "

The object key name prefix or suffix identifying one or more objects to which the\n filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and\n suffixes are not supported. For more information, see Configuring Event Notifications\n in the Amazon S3 User Guide.

" - } - }, - "Value": { - "target": "com.amazonaws.s3#FilterRuleValue", - "traits": { - "smithy.api#documentation": "

The value that the filter searches for in object key names.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned\n to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of\n the object key name. A prefix is a specific string of characters at the beginning of an\n object key name, which you can use to organize objects. For example, you can start the key\n names of related objects with a prefix, such as 2023- or\n engineering/. Then, you can use FilterRule to find objects in\n a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it\n is at the end of the object key name instead of at the beginning.

" - } - }, - "com.amazonaws.s3#FilterRuleList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#FilterRule" - }, - "traits": { - "smithy.api#documentation": "

A list of containers for the key-value pair that defines the criteria for the filter\n rule.

" - } - }, - "com.amazonaws.s3#FilterRuleName": { - "type": "enum", - "members": { - "prefix": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "prefix" - } - }, - "suffix": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "suffix" - } - } - } - }, - "com.amazonaws.s3#FilterRuleValue": { - "type": "string" - }, - "com.amazonaws.s3#GetBucketAccelerateConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketAccelerateConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketAccelerateConfigurationOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action uses the accelerate subresource to\n return the Transfer Acceleration state of a bucket, which is either Enabled or\n Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that\n enables you to perform faster data transfers to and from Amazon S3.

\n

To use this operation, you must have permission to perform the\n s3:GetAccelerateConfiguration 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 in the\n Amazon S3 User Guide.

\n

You set the Transfer Acceleration state of an existing bucket to Enabled or\n Suspended by using the PutBucketAccelerateConfiguration operation.

\n

A GET accelerate request does not return a state value for a bucket that\n has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state\n has never been set on the bucket.

\n

For more information about transfer acceleration, see Transfer Acceleration in\n the Amazon S3 User Guide.

\n

The following operations are related to\n GetBucketAccelerateConfiguration:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?accelerate", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketAccelerateConfigurationOutput": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#BucketAccelerateStatus", - "traits": { - "smithy.api#documentation": "

The accelerate configuration of the bucket.

" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "AccelerateConfiguration" - } - }, - "com.amazonaws.s3#GetBucketAccelerateConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which the accelerate configuration is retrieved.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketAcl": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketAclRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketAclOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action uses the acl subresource\n to return the access control list (ACL) of a bucket. To use GET to return the\n ACL of the bucket, you must have the READ_ACP access to the bucket. If\n READ_ACP permission is granted to the anonymous user, you can return the\n ACL of the bucket without using an authorization header.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\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\n bucket-owner-full-control ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.

\n
\n

The following operations are related to GetBucketAcl:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?acl", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketAclOutput": { - "type": "structure", - "members": { - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

Container for the bucket owner's display name and ID.

" - } - }, - "Grants": { - "target": "com.amazonaws.s3#Grants", - "traits": { - "smithy.api#documentation": "

A list of grants.

", - "smithy.api#xmlName": "AccessControlList" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "AccessControlPolicy" - } - }, - "com.amazonaws.s3#GetBucketAclRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

Specifies the S3 bucket whose ACL is being requested.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketAnalyticsConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketAnalyticsConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketAnalyticsConfigurationOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action returns an analytics configuration (identified by\n the analytics configuration ID) from the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration 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 in the\n Amazon S3 User Guide.

\n

For information about Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis in the Amazon S3 User Guide.

\n

The following operations are related to\n GetBucketAnalyticsConfiguration:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketAnalyticsConfigurationOutput": { - "type": "structure", - "members": { - "AnalyticsConfiguration": { - "target": "com.amazonaws.s3#AnalyticsConfiguration", - "traits": { - "smithy.api#documentation": "

The configuration and any analyses for the analytics filter.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketAnalyticsConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket from which an analytics configuration is retrieved.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#AnalyticsId", - "traits": { - "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketCors": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketCorsRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketCorsOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the\n bucket.

\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

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n

For more information about CORS, see Enabling Cross-Origin Resource\n Sharing.

\n

The following operations are related to GetBucketCors:

\n ", - "smithy.api#examples": [ - { - "title": "To get cors configuration set on a bucket", - "documentation": "The following example returns cross-origin resource sharing (CORS) configuration set on a bucket.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "CORSRules": [ - { - "AllowedHeaders": [ - "Authorization" - ], - "MaxAgeSeconds": 3000, - "AllowedMethods": [ - "GET" - ], - "AllowedOrigins": [ - "*" - ] - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?cors", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketCorsOutput": { - "type": "structure", - "members": { - "CORSRules": { - "target": "com.amazonaws.s3#CORSRules", - "traits": { - "smithy.api#documentation": "

A set of origins and methods (cross-origin access that you want to allow). You can add\n up to 100 rules to the configuration.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "CORSRule" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "CORSConfiguration" - } - }, - "com.amazonaws.s3#GetBucketCorsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name for which to get the cors configuration.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketEncryption": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketEncryptionRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketEncryptionOutput" - }, - "traits": { - "smithy.api#documentation": "

Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets\n have a default encryption configuration that uses server-side encryption with Amazon S3 managed\n keys (SSE-S3).

\n \n \n \n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:GetEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:GetEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to GetBucketEncryption:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?encryption", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketEncryptionOutput": { - "type": "structure", - "members": { - "ServerSideEncryptionConfiguration": { - "target": "com.amazonaws.s3#ServerSideEncryptionConfiguration", - "traits": { - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketEncryptionRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket from which the server-side encryption configuration is\n retrieved.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketIntelligentTieringConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Gets the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to GetBucketIntelligentTieringConfiguration include:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationOutput": { - "type": "structure", - "members": { - "IntelligentTieringConfiguration": { - "target": "com.amazonaws.s3#IntelligentTieringConfiguration", - "traits": { - "smithy.api#documentation": "

Container for S3 Intelligent-Tiering configuration.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#IntelligentTieringId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketInventoryConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketInventoryConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketInventoryConfigurationOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns an inventory configuration (identified by the inventory configuration ID) from\n the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration action. The bucket owner has this permission\n by default and can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

\n

The following operations are related to\n GetBucketInventoryConfiguration:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketInventoryConfigurationOutput": { - "type": "structure", - "members": { - "InventoryConfiguration": { - "target": "com.amazonaws.s3#InventoryConfiguration", - "traits": { - "smithy.api#documentation": "

Specifies the inventory configuration.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketInventoryConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the inventory configuration to retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#InventoryId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketLifecycleConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketLifecycleConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketLifecycleConfigurationOutput" - }, - "traits": { - "smithy.api#documentation": "

Returns the lifecycle configuration information set on the bucket. For information about\n lifecycle configuration, see Object Lifecycle\n Management.

\n

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object\n key name prefix, one or more object tags, object size, or any combination of these.\n Accordingly, this section describes the latest API, which is compatible with the new\n functionality. The previous version of the API supported filtering based only on an object\n key name prefix, which is supported for general purpose buckets for backward compatibility.\n For the related API description, see GetBucketLifecycle.

\n \n

Lifecyle configurations for directory buckets only support expiring objects and\n cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters\n are not supported.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:GetLifecycleConfiguration\n permission.

    \n

    For more information about permissions, see Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
\n
    \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:GetLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n

\n GetBucketLifecycleConfiguration has the following special error:

\n
    \n
  • \n

    Error code: NoSuchLifecycleConfiguration\n

    \n
      \n
    • \n

      Description: The lifecycle configuration does not exist.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
\n

The following operations are related to\n GetBucketLifecycleConfiguration:

\n ", - "smithy.api#examples": [ - { - "title": "To get lifecycle configuration on a bucket", - "documentation": "The following example retrieves lifecycle configuration on set on a bucket. ", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "Rules": [ - { - "Prefix": "TaxDocs", - "Status": "Enabled", - "Transitions": [ - { - "Days": 365, - "StorageClass": "STANDARD_IA" - } - ], - "ID": "Rule for TaxDocs/" - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?lifecycle", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketLifecycleConfigurationOutput": { - "type": "structure", - "members": { - "Rules": { - "target": "com.amazonaws.s3#LifecycleRules", - "traits": { - "smithy.api#documentation": "

Container for a lifecycle rule.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Rule" - } - }, - "TransitionDefaultMinimumObjectSize": { - "target": "com.amazonaws.s3#TransitionDefaultMinimumObjectSize", - "traits": { - "smithy.api#documentation": "

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It isn't supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", - "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "LifecycleConfiguration" - } - }, - "com.amazonaws.s3#GetBucketLifecycleConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which to get the lifecycle information.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketLocation": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketLocationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketLocationOutput" - }, - "traits": { - "aws.customizations#s3UnwrappedXmlOutput": {}, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the Region the bucket resides in. You set the bucket's Region using the\n LocationConstraint request parameter in a CreateBucket\n request. For more information, see CreateBucket.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

We recommend that you use HeadBucket to return the Region\n that a bucket resides in. For backward compatibility, Amazon S3 continues to support\n GetBucketLocation.

\n
\n

The following operations are related to GetBucketLocation:

\n ", - "smithy.api#examples": [ - { - "title": "To get bucket location", - "documentation": "The following example returns bucket location.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "LocationConstraint": "us-west-2" - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?location", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketLocationOutput": { - "type": "structure", - "members": { - "LocationConstraint": { - "target": "com.amazonaws.s3#BucketLocationConstraint", - "traits": { - "smithy.api#documentation": "

Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported\n location constraints by Region, see Regions and Endpoints.

\n

Buckets in Region us-east-1 have a LocationConstraint of\n null. Buckets with a LocationConstraint of EU reside in eu-west-1.

" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "LocationConstraint" - } - }, - "com.amazonaws.s3#GetBucketLocationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which to get the location.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketLogging": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketLoggingRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketLoggingOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the logging status of a bucket and the permissions users have to view and modify\n that status.

\n

The following operations are related to GetBucketLogging:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?logging", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketLoggingOutput": { - "type": "structure", - "members": { - "LoggingEnabled": { - "target": "com.amazonaws.s3#LoggingEnabled" - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "BucketLoggingStatus" - } - }, - "com.amazonaws.s3#GetBucketLoggingRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name for which to get the logging information.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketMetadataTableConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationOutput" - }, - "traits": { - "smithy.api#documentation": "

\n Retrieves the metadata table configuration for a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n
\n
\n

The following operations are related to GetBucketMetadataTableConfiguration:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?metadataTable", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketMetadataTableConfigurationOutput": { - "type": "structure", - "members": { - "GetBucketMetadataTableConfigurationResult": { - "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationResult", - "traits": { - "smithy.api#documentation": "

\n The metadata table configuration for the general purpose bucket.\n

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketMetadataTableConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

\n The general purpose bucket that contains the metadata table configuration that you want to retrieve.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

\n The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.\n

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketMetadataTableConfigurationResult": { - "type": "structure", - "members": { - "MetadataTableConfigurationResult": { - "target": "com.amazonaws.s3#MetadataTableConfigurationResult", - "traits": { - "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

", - "smithy.api#required": {} - } - }, - "Status": { - "target": "com.amazonaws.s3#MetadataTableStatus", - "traits": { - "smithy.api#documentation": "

\n The status of the metadata table. The status values are:\n

\n
    \n
  • \n

    \n CREATING - The metadata table is in the process of being created in the \n specified table bucket.

    \n
  • \n
  • \n

    \n ACTIVE - The metadata table has been created successfully and records \n are being delivered to the table.\n

    \n
  • \n
  • \n

    \n FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver \n records. See ErrorDetails for details.

    \n
  • \n
", - "smithy.api#required": {} - } - }, - "Error": { - "target": "com.amazonaws.s3#ErrorDetails", - "traits": { - "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code and error message. \n

" - } - } - }, - "traits": { - "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

" - } - }, - "com.amazonaws.s3#GetBucketMetricsConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketMetricsConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketMetricsConfigurationOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Gets a metrics configuration (specified by the metrics configuration ID) from the\n bucket. Note that this doesn't include the daily storage metrics.

\n

To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.

\n

The following operations are related to\n GetBucketMetricsConfiguration:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketMetricsConfigurationOutput": { - "type": "structure", - "members": { - "MetricsConfiguration": { - "target": "com.amazonaws.s3#MetricsConfiguration", - "traits": { - "smithy.api#documentation": "

Specifies the metrics configuration.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketMetricsConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the metrics configuration to retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#MetricsId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketNotificationConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketNotificationConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#NotificationConfiguration" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the notification configuration of a bucket.

\n

If notifications are not enabled on the bucket, the action returns an empty\n NotificationConfiguration element.

\n

By default, you must be the bucket owner to read the notification configuration of a\n bucket. However, the bucket owner can use a bucket policy to grant permission to other\n users to read this configuration with the s3:GetBucketNotification\n permission.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n

For more information about setting and reading the notification configuration on a\n bucket, see Setting Up Notification of Bucket Events. For more information about bucket\n policies, see Using Bucket Policies.

\n

The following action is related to GetBucketNotification:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?notification", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketNotificationConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which to get the notification configuration.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketOwnershipControls": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketOwnershipControlsRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketOwnershipControlsOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you\n must have the s3:GetBucketOwnershipControls permission. For more information\n about Amazon S3 permissions, see Specifying permissions in a\n policy.

\n

For information about Amazon S3 Object Ownership, see Using Object\n Ownership.

\n

The following operations are related to GetBucketOwnershipControls:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?ownershipControls", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketOwnershipControlsOutput": { - "type": "structure", - "members": { - "OwnershipControls": { - "target": "com.amazonaws.s3#OwnershipControls", - "traits": { - "smithy.api#documentation": "

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or\n ObjectWriter) currently in effect for this Amazon S3 bucket.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketOwnershipControlsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketPolicy": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketPolicyRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketPolicyOutput" - }, - "traits": { - "smithy.api#documentation": "

Returns the policy of a specified bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n GetBucketPolicy permissions on the specified bucket and belong to\n the bucket owner's account in order to use this operation.

\n

If you don't have GetBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:GetBucketPolicy permission is required in a policy. For\n more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:GetBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Example bucket policies
\n
\n

\n General purpose buckets example bucket policies\n - See Bucket policy\n examples in the Amazon S3 User Guide.

\n

\n Directory bucket example bucket policies\n - See Example bucket policies for S3 Express One Zone in the\n Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following action is related to GetBucketPolicy:

\n ", - "smithy.api#examples": [ - { - "title": "To get bucket policy", - "documentation": "The following example returns bucket policy associated with a bucket.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "Policy": "{\"Version\":\"2008-10-17\",\"Id\":\"LogPolicy\",\"Statement\":[{\"Sid\":\"Enables the log delivery group to publish logs to your bucket \",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"111122223333\"},\"Action\":[\"s3:GetBucketAcl\",\"s3:GetObjectAcl\",\"s3:PutObject\"],\"Resource\":[\"arn:aws:s3:::policytest1/*\",\"arn:aws:s3:::policytest1\"]}]}" - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?policy", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketPolicyOutput": { - "type": "structure", - "members": { - "Policy": { - "target": "com.amazonaws.s3#Policy", - "traits": { - "smithy.api#documentation": "

The bucket policy as a JSON document.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketPolicyRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name to get the bucket policy for.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

\n

\n Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

\n Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketPolicyStatus": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketPolicyStatusRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketPolicyStatusOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public.\n In order to use this operation, you must have the s3:GetBucketPolicyStatus\n permission. For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\n

For more information about when Amazon S3 considers a bucket public, see The Meaning of \"Public\".

\n

The following operations are related to GetBucketPolicyStatus:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?policyStatus", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketPolicyStatusOutput": { - "type": "structure", - "members": { - "PolicyStatus": { - "target": "com.amazonaws.s3#PolicyStatus", - "traits": { - "smithy.api#documentation": "

The policy status for the specified bucket.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketPolicyStatusRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose policy status you want to retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketReplication": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketReplicationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketReplicationOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the replication configuration of a bucket.

\n \n

It can take a while to propagate the put or delete a replication configuration to\n all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong\n result.

\n
\n

For information about replication configuration, see Replication in the\n Amazon S3 User Guide.

\n

This action requires permissions for the s3:GetReplicationConfiguration\n action. For more information about permissions, see Using Bucket Policies and User\n Policies.

\n

If you include the Filter element in a replication configuration, you must\n also include the DeleteMarkerReplication and Priority elements.\n The response also returns those elements.

\n

For information about GetBucketReplication errors, see List of\n replication-related error codes\n

\n

The following operations are related to GetBucketReplication:

\n ", - "smithy.api#examples": [ - { - "title": "To get replication configuration set on a bucket", - "documentation": "The following example returns replication configuration set on a bucket.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "ReplicationConfiguration": { - "Rules": [ - { - "Status": "Enabled", - "Prefix": "Tax", - "Destination": { - "Bucket": "arn:aws:s3:::destination-bucket" - }, - "ID": "MWIwNTkwZmItMTE3MS00ZTc3LWJkZDEtNzRmODQwYzc1OTQy" - } - ], - "Role": "arn:aws:iam::acct-id:role/example-role" - } - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?replication", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketReplicationOutput": { - "type": "structure", - "members": { - "ReplicationConfiguration": { - "target": "com.amazonaws.s3#ReplicationConfiguration", - "traits": { - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetBucketReplicationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name for which to get the replication information.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketRequestPayment": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketRequestPaymentRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketRequestPaymentOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the request payment configuration of a bucket. To use this version of the\n operation, you must be the bucket owner. For more information, see Requester Pays\n Buckets.

\n

The following operations are related to GetBucketRequestPayment:

\n ", - "smithy.api#examples": [ - { - "title": "To get bucket versioning configuration", - "documentation": "The following example retrieves bucket versioning configuration.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "Payer": "BucketOwner" - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?requestPayment", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketRequestPaymentOutput": { - "type": "structure", - "members": { - "Payer": { - "target": "com.amazonaws.s3#Payer", - "traits": { - "smithy.api#documentation": "

Specifies who pays for the download and request fees.

" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "RequestPaymentConfiguration" - } - }, - "com.amazonaws.s3#GetBucketRequestPaymentRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which to get the payment request configuration

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketTagging": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketTaggingRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketTaggingOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 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

The following operations are related to GetBucketTagging:

\n ", - "smithy.api#examples": [ - { - "title": "To get tag set associated with a bucket", - "documentation": "The following example returns tag set associated with a bucket", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "TagSet": [ - { - "Value": "value1", - "Key": "key1" - }, - { - "Value": "value2", - "Key": "key2" - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?tagging", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketTaggingOutput": { - "type": "structure", - "members": { - "TagSet": { - "target": "com.amazonaws.s3#TagSet", - "traits": { - "smithy.api#documentation": "

Contains the tag set.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "Tagging" - } - }, - "com.amazonaws.s3#GetBucketTaggingRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which to get the tagging information.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketVersioning": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketVersioningRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketVersioningOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the versioning state of a bucket.

\n

To retrieve the versioning state of a bucket, you must be the bucket owner.

\n

This implementation also returns the MFA Delete status of the versioning state. If the\n MFA Delete status is enabled, the bucket owner must use an authentication\n device to change the versioning state of the bucket.

\n

The following operations are related to GetBucketVersioning:

\n ", - "smithy.api#examples": [ - { - "title": "To get bucket versioning configuration", - "documentation": "The following example retrieves bucket versioning configuration.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "Status": "Enabled", - "MFADelete": "Disabled" - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?versioning", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketVersioningOutput": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#BucketVersioningStatus", - "traits": { - "smithy.api#documentation": "

The versioning state of the bucket.

" - } - }, - "MFADelete": { - "target": "com.amazonaws.s3#MFADeleteStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether MFA delete is enabled in the bucket versioning configuration. This\n element is only returned if the bucket has been configured with MFA delete. If the bucket\n has never been so configured, this element is not returned.

", - "smithy.api#xmlName": "MfaDelete" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "VersioningConfiguration" - } - }, - "com.amazonaws.s3#GetBucketVersioningRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which to get the versioning information.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetBucketWebsite": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetBucketWebsiteRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetBucketWebsiteOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the website configuration for a bucket. To host website on Amazon S3, you can\n configure a bucket as website by adding a website configuration. For more information about\n hosting websites, see Hosting Websites on Amazon S3.

\n

This GET action requires the S3:GetBucketWebsite permission. By default,\n only the bucket owner can read the bucket website configuration. However, bucket owners can\n allow other users to read the website configuration by writing a bucket policy granting\n them the S3:GetBucketWebsite permission.

\n

The following operations are related to GetBucketWebsite:

\n ", - "smithy.api#examples": [ - { - "title": "To get bucket website configuration", - "documentation": "The following example retrieves website configuration of a bucket.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "IndexDocument": { - "Suffix": "index.html" - }, - "ErrorDocument": { - "Key": "error.html" - } - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?website", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetBucketWebsiteOutput": { - "type": "structure", - "members": { - "RedirectAllRequestsTo": { - "target": "com.amazonaws.s3#RedirectAllRequestsTo", - "traits": { - "smithy.api#documentation": "

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3\n bucket.

" - } - }, - "IndexDocument": { - "target": "com.amazonaws.s3#IndexDocument", - "traits": { - "smithy.api#documentation": "

The name of the index document for the website (for example\n index.html).

" - } - }, - "ErrorDocument": { - "target": "com.amazonaws.s3#ErrorDocument", - "traits": { - "smithy.api#documentation": "

The object key name of the website error document to use for 4XX class errors.

" - } - }, - "RoutingRules": { - "target": "com.amazonaws.s3#RoutingRules", - "traits": { - "smithy.api#documentation": "

Rules that define when a redirect is applied and the redirect behavior.

" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "WebsiteConfiguration" - } - }, - "com.amazonaws.s3#GetBucketWebsiteRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name for which to get the website configuration.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetObject": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetObjectRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetObjectOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#InvalidObjectState" - }, - { - "target": "com.amazonaws.s3#NoSuchKey" - } - ], - "traits": { - "aws.protocols#httpChecksum": { - "requestValidationModeMember": "ChecksumMode", - "responseAlgorithms": [ - "CRC64NVME", - "CRC32", - "CRC32C", - "SHA256", - "SHA1" - ] - }, - "smithy.api#documentation": "

Retrieves an object from Amazon S3.

\n

In the GetObject request, specify the full key name for the object.

\n

\n General purpose buckets - Both the virtual-hosted-style\n requests and the path-style requests are supported. For a virtual hosted-style request\n example, if you have the object photos/2006/February/sample.jpg, specify the\n object key name as /photos/2006/February/sample.jpg. For a path-style request\n example, if you have the object photos/2006/February/sample.jpg in the bucket\n named examplebucket, specify the object key name as\n /examplebucket/photos/2006/February/sample.jpg. For more information about\n request types, see HTTP Host\n Header Bucket Specification in the Amazon S3 User Guide.

\n

\n Directory buckets -\n Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named amzn-s3-demo-bucket--usw2-az1--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the required permissions in a policy. To use\n GetObject, you must have the READ access to the\n object (or version). If you grant READ access to the anonymous\n user, the GetObject operation returns the object without using\n an authorization header. For more information, see Specifying permissions in a policy in the\n Amazon S3 User Guide.

    \n

    If you include a versionId in your request header, you must\n have the s3:GetObjectVersion permission to access a specific\n version of an object. The s3:GetObject permission is not\n required in this scenario.

    \n

    If you request the current version of an object without a specific\n versionId in the request header, only the\n s3:GetObject permission is required. The\n s3:GetObjectVersion permission is not required in this\n scenario.

    \n

    If the object that you request doesn\u2019t exist, the error that Amazon S3 returns\n depends on whether you also have the s3:ListBucket\n permission.

    \n
      \n
    • \n

      If you have the s3:ListBucket permission on the\n bucket, Amazon S3 returns an HTTP status code 404 Not Found\n error.

      \n
    • \n
    • \n

      If you don\u2019t have the s3:ListBucket permission, Amazon S3\n returns an HTTP status code 403 Access Denied\n error.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If\n the\n object is encrypted using SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Storage classes
\n
\n

If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval\n storage class, the S3 Glacier Deep Archive storage class, the\n S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier,\n before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an\n InvalidObjectState error. For information about restoring archived\n objects, see Restoring Archived\n Objects in the Amazon S3 User Guide.

\n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. \nUnsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

\n
\n
Encryption
\n
\n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for the GetObject requests, if your object uses\n server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side\n encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your\n GetObject requests for the object that uses these types of keys,\n you\u2019ll get an HTTP 400 Bad Request error.

\n

\n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

\n
\n
Overriding response header values through the request
\n
\n

There are times when you want to override certain response header values of a\n GetObject response. For example, you might override the\n Content-Disposition response header value through your\n GetObject request.

\n

You can override values for a set of response headers. These modified response\n header values are included only in a successful response, that is, when the HTTP\n status code 200 OK is returned. The headers you can override using\n the following query parameters in the request are a subset of the headers that\n Amazon S3 accepts when you create an object.

\n

The response headers that you can override for the GetObject\n response are Cache-Control, Content-Disposition,\n Content-Encoding, Content-Language,\n Content-Type, and Expires.

\n

To override values for a set of response headers in the GetObject\n response, you can use the following query parameters in the request.

\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 response-content-language\n

    \n
  • \n
  • \n

    \n response-content-type\n

    \n
  • \n
  • \n

    \n response-expires\n

    \n
  • \n
\n \n

When you use these parameters, you must sign the request by using either an\n Authorization header or a presigned URL. These parameters cannot be used with\n an unsigned (anonymous) request.

\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to GetObject:

\n ", - "smithy.api#examples": [ - { - "title": "To retrieve a byte range of an object ", - "documentation": "The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.", - "input": { - "Bucket": "examplebucket", - "Key": "SampleFile.txt", - "Range": "bytes=0-9" - }, - "output": { - "AcceptRanges": "bytes", - "ContentType": "text/plain", - "LastModified": "2014-10-09T22:57:28.000Z", - "ContentLength": 10, - "VersionId": "null", - "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"", - "ContentRange": "bytes 0-9/43", - "Metadata": {} - } - }, - { - "title": "To retrieve an object", - "documentation": "The following example retrieves an object for an S3 bucket.", - "input": { - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" - }, - "output": { - "AcceptRanges": "bytes", - "ContentType": "image/jpeg", - "LastModified": "2016-12-15T01:19:41.000Z", - "ContentLength": 3191, - "VersionId": "null", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "TagCount": 2, - "Metadata": {} - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}/{Key+}?x-id=GetObject", - "code": 200 - } - } - }, - "com.amazonaws.s3#GetObjectAcl": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetObjectAclRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetObjectAclOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#NoSuchKey" - } - ], - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 functionality is not supported for Amazon S3 on Outposts.

\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\n bucket-owner-full-control ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.

\n
\n

The following operations are related to GetObjectAcl:

\n ", - "smithy.api#examples": [ - { - "title": "To retrieve object ACL", - "documentation": "The following example retrieves access control list (ACL) of an object.", - "input": { - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" - }, - "output": { - "Owner": { - "DisplayName": "owner-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Grants": [ - { - "Grantee": { - "Type": "CanonicalUser", - "DisplayName": "owner-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Permission": "WRITE" - }, - { - "Grantee": { - "Type": "CanonicalUser", - "DisplayName": "owner-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Permission": "WRITE_ACP" - }, - { - "Grantee": { - "Type": "CanonicalUser", - "DisplayName": "owner-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Permission": "READ" - }, - { - "Grantee": { - "Type": "CanonicalUser", - "DisplayName": "owner-display-name", - "ID": "852b113eexamplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Permission": "READ_ACP" - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}/{Key+}?acl", - "code": 200 - } - } - }, - "com.amazonaws.s3#GetObjectAclOutput": { - "type": "structure", - "members": { - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

Container for the bucket owner's display name and ID.

" - } - }, - "Grants": { - "target": "com.amazonaws.s3#Grants", - "traits": { - "smithy.api#documentation": "

A list of grants.

", - "smithy.api#xmlName": "AccessControlList" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "AccessControlPolicy" - } - }, - "com.amazonaws.s3#GetObjectAclRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name that contains the object for which to get the ACL information.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The key of the object for which to get the ACL information.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpQuery": "versionId" - } - }, - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "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 operation is useful if you're interested only in an object's metadata.

\n

\n GetObjectAttributes combines the functionality of HeadObject\n and ListParts. All of the data returned with each of those individual calls\n can be returned with a single call to GetObjectAttributes.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n use GetObjectAttributes, you must have READ access to the\n object. The permissions that you need to use this operation depend on\n whether the bucket is versioned. If the bucket is versioned, you need both\n the s3:GetObjectVersion and\n s3:GetObjectVersionAttributes permissions for this\n operation. If the bucket is not versioned, you need the\n s3:GetObject and s3:GetObjectAttributes\n permissions. For more information, see Specifying\n Permissions in a Policy in the\n Amazon S3 User Guide. If the object that you request does\n not exist, the error Amazon S3 returns depends on whether you also have the\n s3:ListBucket permission.

    \n
      \n
    • \n

      If you have the s3:ListBucket permission on the\n bucket, Amazon S3 returns an HTTP status code 404 Not Found\n (\"no such key\") error.

      \n
    • \n
    • \n

      If you don't have the s3:ListBucket permission, Amazon S3\n returns an HTTP status code 403 Forbidden (\"access\n denied\") error.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If\n the\n object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Encryption
\n
\n \n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for HEAD requests if your object uses\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side\n encryption with Amazon S3 managed encryption keys (SSE-S3). The\n x-amz-server-side-encryption header is used when you\n PUT an object to S3 and want to specify the encryption method.\n If you include this header in a GET request for an object that\n uses these types of keys, you\u2019ll get an HTTP 400 Bad Request\n error. It's because the encryption method can't be changed when you retrieve\n the object.

\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\n the metadata from the object, you must use the following headers to provide the\n encryption key for the server to be able to retrieve the object's metadata. The\n headers are:

\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\n Encryption (Using Customer-Provided Encryption Keys) in the\n Amazon S3 User Guide.

\n \n

\n Directory bucket permissions -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

\n
\n
\n
Versioning
\n
\n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

\n
\n
Conditional request headers
\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\n true.

      \n
    • \n
    • \n

      \n If-Unmodified-Since condition evaluates to\n false.

      \n
    • \n
    \n

    For more information about conditional requests, see RFC 7232.

    \n
  • \n
  • \n

    If both of the If-None-Match and\n If-Modified-Since headers are present in the request as\n follows, then Amazon S3 returns the HTTP status code 304 Not\n 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

    For more information about conditional requests, see RFC 7232.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\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. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-delete-marker" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Date and time when the object was last modified.

", - "smithy.api#httpHeader": "Last-Modified" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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

For more information, see Storage Classes.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" - } - }, - "ObjectSize": { - "target": "com.amazonaws.s3#ObjectSize", - "traits": { - "smithy.api#documentation": "

The size of the object in bytes.

" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "GetObjectAttributesResponse" - } - }, - "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 true\n indicates that the list was truncated. A list can be truncated if the number of parts\n 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.

\n \n
    \n
  • \n

    \n General purpose buckets - For\n GetObjectAttributes, if a additional checksum (including\n x-amz-checksum-crc32, x-amz-checksum-crc32c,\n x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't\n applied to the object specified in the request, the response doesn't return\n Part.

    \n
  • \n
  • \n

    \n Directory buckets - For\n GetObjectAttributes, no matter whether a additional checksum is\n applied to the object specified in the request, the response returns\n Part.

    \n
  • \n
\n
", - "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

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "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.

\n \n

S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

\n
", - "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, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 account ID that you provide does not match the actual owner of the bucket, 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": "

Specifies the fields at the root level that you want returned in the response. Fields\n that you do not specify are not returned.

", - "smithy.api#httpHeader": "x-amz-object-attributes", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetObjectLegalHold": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetObjectLegalHoldRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetObjectLegalHoldOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Gets an object's current legal hold status. For more information, see Locking\n Objects.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectLegalHold:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}/{Key+}?legal-hold", - "code": 200 - } - } - }, - "com.amazonaws.s3#GetObjectLegalHoldOutput": { - "type": "structure", - "members": { - "LegalHold": { - "target": "com.amazonaws.s3#ObjectLockLegalHold", - "traits": { - "smithy.api#documentation": "

The current legal hold status for the specified object.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "LegalHold" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetObjectLegalHoldRequest": { - "type": "structure", - "members": { - "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

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "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#httpLabel": {}, - "smithy.api#required": {} - } - }, - "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#httpQuery": "versionId" - } - }, - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetObjectLockConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetObjectLockConfigurationRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetObjectLockConfigurationOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 Objects.

\n

The following action is related to GetObjectLockConfiguration:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?object-lock", - "code": 200 - } - } - }, - "com.amazonaws.s3#GetObjectLockConfigurationOutput": { - "type": "structure", - "members": { - "ObjectLockConfiguration": { - "target": "com.amazonaws.s3#ObjectLockConfiguration", - "traits": { - "smithy.api#documentation": "

The specified bucket's Object Lock configuration.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetObjectLockConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket whose Object Lock configuration you want to retrieve.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetObjectOutput": { - "type": "structure", - "members": { - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

Object data.

", - "smithy.api#httpPayload": {} - } - }, - "DeleteMarker": { - "target": "com.amazonaws.s3#DeleteMarker", - "traits": { - "smithy.api#documentation": "

Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.

\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

    If the specified version in the request is a delete marker, the response\n returns a 405 Method Not Allowed error and the Last-Modified:\n timestamp response header.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-delete-marker" - } - }, - "AcceptRanges": { - "target": "com.amazonaws.s3#AcceptRanges", - "traits": { - "smithy.api#documentation": "

Indicates that a range of bytes was specified in the request.

", - "smithy.api#httpHeader": "accept-ranges" - } - }, - "Expiration": { - "target": "com.amazonaws.s3#Expiration", - "traits": { - "smithy.api#documentation": "

If the object expiration is configured (see \n PutBucketLifecycleConfiguration\n ), the response includes this\n header. It includes the expiry-date and rule-id key-value pairs\n providing object expiration information. The value of the rule-id is\n URL-encoded.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-expiration" - } - }, - "Restore": { - "target": "com.amazonaws.s3#Restore", - "traits": { - "smithy.api#documentation": "

Provides information about object restoration action and expiration time of the restored\n object copy.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", - "smithy.api#httpHeader": "x-amz-restore" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Date and time when the object was last modified.

\n

\n General purpose buckets - When you specify a\n versionId of the object in your request, if the specified version in the\n request is a delete marker, the response returns a 405 Method Not Allowed\n error and the Last-Modified: timestamp response header.

", - "smithy.api#httpHeader": "Last-Modified" - } - }, - "ContentLength": { - "target": "com.amazonaws.s3#ContentLength", - "traits": { - "smithy.api#documentation": "

Size of the body in bytes.

", - "smithy.api#httpHeader": "Content-Length" - } - }, - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "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 checksum is only present if the object was uploaded\n with the object. For more information, 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 the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-crc32c" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" - } - }, - "ChecksumSHA1": { - "target": "com.amazonaws.s3#ChecksumSHA1", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-sha256" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in the\n CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-type" - } - }, - "MissingMeta": { - "target": "com.amazonaws.s3#MissingMeta", - "traits": { - "smithy.api#documentation": "

This is set to the number of metadata entries not returned in the headers that are\n prefixed with x-amz-meta-. This can happen if you create metadata using an API\n like SOAP that supports more flexible metadata than the REST API. For example, using SOAP,\n you can create metadata whose values are not legal HTTP headers.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-missing-meta" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-version-id" - } - }, - "CacheControl": { - "target": "com.amazonaws.s3#CacheControl", - "traits": { - "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", - "smithy.api#httpHeader": "Cache-Control" - } - }, - "ContentDisposition": { - "target": "com.amazonaws.s3#ContentDisposition", - "traits": { - "smithy.api#documentation": "

Specifies presentational information for the object.

", - "smithy.api#httpHeader": "Content-Disposition" - } - }, - "ContentEncoding": { - "target": "com.amazonaws.s3#ContentEncoding", - "traits": { - "smithy.api#documentation": "

Indicates what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", - "smithy.api#httpHeader": "Content-Encoding" - } - }, - "ContentLanguage": { - "target": "com.amazonaws.s3#ContentLanguage", - "traits": { - "smithy.api#documentation": "

The language the content is in.

", - "smithy.api#httpHeader": "Content-Language" - } - }, - "ContentRange": { - "target": "com.amazonaws.s3#ContentRange", - "traits": { - "smithy.api#documentation": "

The portion of the object returned in the response.

", - "smithy.api#httpHeader": "Content-Range" - } - }, - "ContentType": { - "target": "com.amazonaws.s3#ContentType", - "traits": { - "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", - "smithy.api#httpHeader": "Content-Type" - } - }, - "Expires": { - "target": "com.amazonaws.s3#Expires", - "traits": { - "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", - "smithy.api#httpHeader": "Expires" - } - }, - "WebsiteRedirectLocation": { - "target": "com.amazonaws.s3#WebsiteRedirectLocation", - "traits": { - "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-website-redirect-location" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "Metadata": { - "target": "com.amazonaws.s3#Metadata", - "traits": { - "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", - "smithy.api#httpPrefixHeaders": "x-amz-meta-" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" - } - }, - "SSECustomerKeyMD5": { - "target": "com.amazonaws.s3#SSECustomerKeyMD5", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the object uses an S3 Bucket Key for server-side encryption with\n Key Management Service (KMS) keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "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

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", - "smithy.api#httpHeader": "x-amz-storage-class" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - }, - "ReplicationStatus": { - "target": "com.amazonaws.s3#ReplicationStatus", - "traits": { - "smithy.api#documentation": "

Amazon S3 can return this if your request involves a bucket that is either a source or\n destination in a replication rule.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-replication-status" - } - }, - "PartsCount": { - "target": "com.amazonaws.s3#PartsCount", - "traits": { - "smithy.api#documentation": "

The count of parts this object has. This value is only returned if you specify\n partNumber in your request and the object was uploaded as a multipart\n upload.

", - "smithy.api#httpHeader": "x-amz-mp-parts-count" - } - }, - "TagCount": { - "target": "com.amazonaws.s3#TagCount", - "traits": { - "smithy.api#documentation": "

The number of tags, if any, on the object, when you have the relevant permission to read\n object tags.

\n

You can use GetObjectTagging to retrieve\n the tag set associated with an object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-tagging-count" - } - }, - "ObjectLockMode": { - "target": "com.amazonaws.s3#ObjectLockMode", - "traits": { - "smithy.api#documentation": "

The Object Lock mode that's currently in place for this object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-mode" - } - }, - "ObjectLockRetainUntilDate": { - "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", - "traits": { - "smithy.api#documentation": "

The date and time when this object's Object Lock will expire.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" - } - }, - "ObjectLockLegalHoldStatus": { - "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", - "traits": { - "smithy.api#documentation": "

Indicates whether this object has an active legal hold. This field is only returned if\n you have permission to view an object's legal hold status.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-legal-hold" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetObjectRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name containing the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "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 in this\n header; otherwise, return a 412 Precondition Failed error.

\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

For more information about conditional requests, see RFC 7232.

", - "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 error.

\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 status code.

\n

For more information about conditional requests, see RFC 7232.

", - "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 in\n this header; otherwise, return a 304 Not Modified error.

\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 HTTP status\n code.

\n

For more information about conditional requests, see RFC 7232.

", - "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 error.

\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

For more information about conditional requests, see RFC 7232.

", - "smithy.api#httpHeader": "If-Unmodified-Since" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Key of the object to get.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "Range": { - "target": "com.amazonaws.s3#Range", - "traits": { - "smithy.api#documentation": "

Downloads the specified byte range of an object. For more information about the HTTP\n Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

\n \n

Amazon S3 doesn't support retrieving multiple ranges of data per GET\n request.

\n
", - "smithy.api#httpHeader": "Range" - } - }, - "ResponseCacheControl": { - "target": "com.amazonaws.s3#ResponseCacheControl", - "traits": { - "smithy.api#documentation": "

Sets the Cache-Control header of the response.

", - "smithy.api#httpQuery": "response-cache-control" - } - }, - "ResponseContentDisposition": { - "target": "com.amazonaws.s3#ResponseContentDisposition", - "traits": { - "smithy.api#documentation": "

Sets the Content-Disposition header of the response.

", - "smithy.api#httpQuery": "response-content-disposition" - } - }, - "ResponseContentEncoding": { - "target": "com.amazonaws.s3#ResponseContentEncoding", - "traits": { - "smithy.api#documentation": "

Sets the Content-Encoding header of the response.

", - "smithy.api#httpQuery": "response-content-encoding" - } - }, - "ResponseContentLanguage": { - "target": "com.amazonaws.s3#ResponseContentLanguage", - "traits": { - "smithy.api#documentation": "

Sets the Content-Language header of the response.

", - "smithy.api#httpQuery": "response-content-language" - } - }, - "ResponseContentType": { - "target": "com.amazonaws.s3#ResponseContentType", - "traits": { - "smithy.api#documentation": "

Sets the Content-Type header of the response.

", - "smithy.api#httpQuery": "response-content-type" - } - }, - "ResponseExpires": { - "target": "com.amazonaws.s3#ResponseExpires", - "traits": { - "smithy.api#documentation": "

Sets the Expires header of the response.

", - "smithy.api#httpQuery": "response-expires" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n

By default, the GetObject operation returns the current version of an\n object. To return a different version, use the versionId subresource.

\n \n
    \n
  • \n

    If you include a versionId in your request header, you must have\n the s3:GetObjectVersion permission to access a specific version of an\n object. The s3:GetObject permission is not required in this\n scenario.

    \n
  • \n
  • \n

    If you request the current version of an object without a specific\n versionId in the request header, only the\n s3:GetObject permission is required. The\n s3:GetObjectVersion permission is not required in this\n scenario.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

    \n
  • \n
\n
\n

For more information about versioning, see PutBucketVersioning.

", - "smithy.api#httpQuery": "versionId" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when decrypting the object (for example,\n AES256).

\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

    \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

This functionality is not supported for directory buckets.

\n
", - "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 that you originally provided for Amazon S3 to\n encrypt the data before storing it. This value is used to decrypt the object when\n recovering it and must match the one used when storing the data. The key must be\n appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm header.

\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

    \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

This functionality is not supported for directory buckets.

\n
", - "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 customer-provided encryption key according to\n RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption\n key was transmitted without 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

    \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

This functionality is not supported for directory buckets.

\n
", - "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" - } - }, - "PartNumber": { - "target": "com.amazonaws.s3#PartNumber", - "traits": { - "smithy.api#documentation": "

Part number of the object being read. This is a positive integer between 1 and 10,000.\n Effectively performs a 'ranged' GET request for the part specified. Useful for downloading\n just a part of an object.

", - "smithy.api#httpQuery": "partNumber" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetObjectResponseStatusCode": { - "type": "integer" - }, - "com.amazonaws.s3#GetObjectRetention": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetObjectRetentionRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetObjectRetentionOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves an object's retention settings. For more information, see Locking\n Objects.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectRetention:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}/{Key+}?retention", - "code": 200 - } - } - }, - "com.amazonaws.s3#GetObjectRetentionOutput": { - "type": "structure", - "members": { - "Retention": { - "target": "com.amazonaws.s3#ObjectLockRetention", - "traits": { - "smithy.api#documentation": "

The container element for an object's retention settings.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "Retention" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetObjectRetentionRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name containing the object whose retention settings you want to retrieve.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The key name for the object whose retention settings you want to retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The version ID for the object whose retention settings you want to retrieve.

", - "smithy.api#httpQuery": "versionId" - } - }, - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetObjectTagging": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetObjectTaggingRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetObjectTaggingOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the tag-set of an object. You send the GET request against the tagging\n subresource associated with the object.

\n

To use this operation, you must have permission to perform the\n s3:GetObjectTagging action. By default, the GET action returns information\n about current version of an object. For a versioned bucket, you can have multiple versions\n of an object in your bucket. To retrieve tags of any other version, use the versionId query\n parameter. You also need permission for the s3:GetObjectVersionTagging\n action.

\n

By default, the bucket owner has this permission and can grant this permission to\n others.

\n

For information about the Amazon S3 object tagging feature, see Object Tagging.

\n

The following actions are related to GetObjectTagging:

\n ", - "smithy.api#examples": [ - { - "title": "To retrieve tag set of a specific object version", - "documentation": "The following example retrieves tag set of an object. The request specifies object version.", - "input": { - "Bucket": "examplebucket", - "Key": "exampleobject", - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" - }, - "output": { - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI", - "TagSet": [ - { - "Value": "Value1", - "Key": "Key1" - } - ] - } - }, - { - "title": "To retrieve tag set of an object", - "documentation": "The following example retrieves tag set of an object.", - "input": { - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" - }, - "output": { - "VersionId": "null", - "TagSet": [ - { - "Value": "Value4", - "Key": "Key4" - }, - { - "Value": "Value3", - "Key": "Key3" - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}/{Key+}?tagging", - "code": 200 - } - } - }, - "com.amazonaws.s3#GetObjectTaggingOutput": { - "type": "structure", - "members": { - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The versionId of the object for which you got the tagging information.

", - "smithy.api#httpHeader": "x-amz-version-id" - } - }, - "TagSet": { - "target": "com.amazonaws.s3#TagSet", - "traits": { - "smithy.api#documentation": "

Contains the tag set.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "Tagging" - } - }, - "com.amazonaws.s3#GetObjectTaggingRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name containing the object for which to get the tagging information.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which to get the tagging information.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The versionId of the object for which to get the tagging information.

", - "smithy.api#httpQuery": "versionId" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetObjectTorrent": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetObjectTorrentRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetObjectTorrentOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're\n distributing large files.

\n \n

You can get torrent only for objects that are less than 5 GB in size, and that are\n not encrypted using server-side encryption with a customer-provided encryption\n key.

\n
\n

To use GET, you must have READ access to the object.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectTorrent:

\n ", - "smithy.api#examples": [ - { - "title": "To retrieve torrent files for an object", - "documentation": "The following example retrieves torrent files of an object.", - "input": { - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" - }, - "output": {} - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}/{Key+}?torrent", - "code": 200 - } - } - }, - "com.amazonaws.s3#GetObjectTorrentOutput": { - "type": "structure", - "members": { - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

A Bencoded dictionary as defined by the BitTorrent specification

", - "smithy.api#httpPayload": {} - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetObjectTorrentRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the object for which to get the torrent files.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The object key for which to get the information.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GetPublicAccessBlock": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#GetPublicAccessBlockRequest" - }, - "output": { - "target": "com.amazonaws.s3#GetPublicAccessBlockOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use\n this operation, you must have the s3:GetBucketPublicAccessBlock permission.\n For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\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 settings are different between the bucket and the\n account, Amazon S3 uses the most restrictive combination of the bucket-level and\n account-level settings.

\n
\n

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".

\n

The following operations are related to GetPublicAccessBlock:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?publicAccessBlock", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#GetPublicAccessBlockOutput": { - "type": "structure", - "members": { - "PublicAccessBlockConfiguration": { - "target": "com.amazonaws.s3#PublicAccessBlockConfiguration", - "traits": { - "smithy.api#documentation": "

The PublicAccessBlock configuration currently in effect for this Amazon S3\n bucket.

", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#GetPublicAccessBlockRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want\n to retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#GlacierJobParameters": { - "type": "structure", - "members": { - "Tier": { - "target": "com.amazonaws.s3#Tier", - "traits": { - "smithy.api#documentation": "

Retrieval tier at which the restore will be processed.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for S3 Glacier job parameters.

" - } - }, - "com.amazonaws.s3#Grant": { - "type": "structure", - "members": { - "Grantee": { - "target": "com.amazonaws.s3#Grantee", - "traits": { - "smithy.api#documentation": "

The person being granted permissions.

", - "smithy.api#xmlNamespace": { - "uri": "http://www.w3.org/2001/XMLSchema-instance", - "prefix": "xsi" - } - } - }, - "Permission": { - "target": "com.amazonaws.s3#Permission", - "traits": { - "smithy.api#documentation": "

Specifies the permission given to the grantee.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for grant information.

" - } - }, - "com.amazonaws.s3#GrantFullControl": { - "type": "string" - }, - "com.amazonaws.s3#GrantRead": { - "type": "string" - }, - "com.amazonaws.s3#GrantReadACP": { - "type": "string" - }, - "com.amazonaws.s3#GrantWrite": { - "type": "string" - }, - "com.amazonaws.s3#GrantWriteACP": { - "type": "string" - }, - "com.amazonaws.s3#Grantee": { - "type": "structure", - "members": { - "DisplayName": { - "target": "com.amazonaws.s3#DisplayName", - "traits": { - "smithy.api#documentation": "

Screen name of the grantee.

" - } - }, - "EmailAddress": { - "target": "com.amazonaws.s3#EmailAddress", - "traits": { - "smithy.api#documentation": "

Email address of the grantee.

\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\u00e3o 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
" - } - }, - "ID": { - "target": "com.amazonaws.s3#ID", - "traits": { - "smithy.api#documentation": "

The canonical user ID of the grantee.

" - } - }, - "URI": { - "target": "com.amazonaws.s3#URI", - "traits": { - "smithy.api#documentation": "

URI of the grantee group.

" - } - }, - "Type": { - "target": "com.amazonaws.s3#Type", - "traits": { - "smithy.api#documentation": "

Type of grantee

", - "smithy.api#required": {}, - "smithy.api#xmlAttribute": {}, - "smithy.api#xmlName": "xsi:type" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for the person being granted permissions.

" - } - }, - "com.amazonaws.s3#Grants": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Grant", - "traits": { - "smithy.api#xmlName": "Grant" - } - } - }, - "com.amazonaws.s3#HeadBucket": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#HeadBucketRequest" - }, - "output": { - "target": "com.amazonaws.s3#HeadBucketOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#NotFound" - } - ], - "traits": { - "smithy.api#documentation": "

You can use this operation to determine if a bucket exists and if you have permission to\n access it. The action returns a 200 OK if the bucket exists and you have\n permission to access it.

\n \n

If the bucket does not exist or you do not have permission to access it, the\n HEAD request returns a generic 400 Bad Request, 403\n Forbidden or 404 Not Found code. A message body is not included,\n so you cannot determine the exception beyond these HTTP response codes.

\n
\n
\n
Authentication and authorization
\n
\n

\n General purpose buckets - Request to public\n buckets that grant the s3:ListBucket permission publicly do not need to be signed.\n All other HeadBucket requests must be authenticated and signed by\n using IAM credentials (access key ID and secret access key for the IAM\n identities). All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use IAM\n credentials to authenticate and authorize your access to the\n HeadBucket API operation, instead of using the temporary security\n credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

\n \n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n \n

You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
", - "smithy.api#examples": [ - { - "title": "To determine if bucket exists", - "documentation": "This operation checks to see if a bucket exists.", - "input": { - "Bucket": "acl1" - } - } - ], - "smithy.api#http": { - "method": "HEAD", - "uri": "/{Bucket}", - "code": 200 - }, - "smithy.waiters#waitable": { - "BucketExists": { - "acceptors": [ - { - "state": "success", - "matcher": { - "success": true - } - }, - { - "state": "retry", - "matcher": { - "errorType": "NotFound" - } - } - ], - "minDelay": 5 - }, - "BucketNotExists": { - "acceptors": [ - { - "state": "success", - "matcher": { - "errorType": "NotFound" - } - } - ], - "minDelay": 5 - } - } - } - }, - "com.amazonaws.s3#HeadBucketOutput": { - "type": "structure", - "members": { - "BucketLocationType": { - "target": "com.amazonaws.s3#LocationType", - "traits": { - "smithy.api#documentation": "

The type of location where the bucket is created.

\n \n

This functionality is only supported by directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-bucket-location-type" - } - }, - "BucketLocationName": { - "target": "com.amazonaws.s3#BucketLocationName", - "traits": { - "smithy.api#documentation": "

The name of the location where the bucket will be created.

\n

For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

\n \n

This functionality is only supported by directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-bucket-location-name" - } - }, - "BucketRegion": { - "target": "com.amazonaws.s3#Region", - "traits": { - "smithy.api#documentation": "

The Region that the bucket is located.

", - "smithy.api#httpHeader": "x-amz-bucket-region" - } - }, - "AccessPointAlias": { - "target": "com.amazonaws.s3#AccessPointAlias", - "traits": { - "smithy.api#documentation": "

Indicates whether the bucket name used in the request is an access point alias.

\n \n

For directory buckets, the value of this field is false.

\n
", - "smithy.api#httpHeader": "x-amz-access-point-alias" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#HeadBucketRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#HeadObject": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#HeadObjectRequest" - }, - "output": { - "target": "com.amazonaws.s3#HeadObjectOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#NotFound" - } - ], - "traits": { - "smithy.api#documentation": "

The HEAD operation retrieves metadata from an object without returning the\n object itself. This operation is useful if you're interested only in an object's\n metadata.

\n \n

A HEAD request has the same options as a GET operation on\n an object. The response is identical to the GET response except that there\n is no response body. Because of this, if the HEAD request generates an\n error, it returns a generic code, such as 400 Bad Request, 403\n Forbidden, 404 Not Found, 405 Method Not Allowed,\n 412 Precondition Failed, or 304 Not Modified. It's not\n possible to retrieve the exact exception of these error codes.

\n
\n

Request headers are limited to 8 KB in size. For more information, see Common\n Request Headers.

\n
\n
Permissions
\n
\n

\n
    \n
  • \n

    \n General purpose bucket permissions - To\n use HEAD, you must have the s3:GetObject\n permission. You need the relevant read object (or version) permission for\n this operation. For more information, see Actions, resources, and\n condition keys for Amazon S3 in the Amazon S3 User\n Guide. For more information about the permissions to S3 API\n operations by S3 resource types, see Required permissions for Amazon S3 API operations in the\n Amazon S3 User Guide.

    \n

    If the object you request doesn't exist, the error that Amazon S3 returns\n depends on whether you also have the s3:ListBucket\n permission.

    \n
      \n
    • \n

      If you have the s3:ListBucket permission on the\n bucket, Amazon S3 returns an HTTP status code 404 Not Found\n error.

      \n
    • \n
    • \n

      If you don\u2019t have the s3:ListBucket permission, Amazon S3\n returns an HTTP status code 403 Forbidden error.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If you enable x-amz-checksum-mode in the request and the\n object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must\n also have the kms:GenerateDataKey and kms:Decrypt\n permissions in IAM identity-based policies and KMS key policies for the\n KMS key to retrieve the checksum of the object.

    \n
  • \n
\n
\n
Encryption
\n
\n \n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for HEAD requests if your object uses\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side\n encryption with Amazon S3 managed encryption keys (SSE-S3). The\n x-amz-server-side-encryption header is used when you\n PUT an object to S3 and want to specify the encryption method.\n If you include this header in a HEAD request for an object that\n uses these types of keys, you\u2019ll get an HTTP 400 Bad Request\n error. It's because the encryption method can't be changed when you retrieve\n the object.

\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\n the metadata from the object, you must use the following headers to provide the\n encryption key for the server to be able to retrieve the object's metadata. The\n headers are:

\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\n Encryption (Using Customer-Provided Encryption Keys) in the\n Amazon S3 User Guide.

\n \n

\n Directory bucket -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

\n
\n
\n
Versioning
\n
\n
    \n
  • \n

    If the current version of the object is a delete marker, Amazon S3 behaves as\n if the object was deleted and includes x-amz-delete-marker:\n true in the response.

    \n
  • \n
  • \n

    If the specified version is a delete marker, the response returns a\n 405 Method Not Allowed error and the Last-Modified:\n timestamp response header.

    \n
  • \n
\n \n
    \n
  • \n

    \n Directory buckets -\n Delete marker is not supported for directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null\n to the versionId query parameter in the request.

    \n
  • \n
\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n \n

For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
\n

The following actions are related to HeadObject:

\n ", - "smithy.api#examples": [ - { - "title": "To retrieve metadata of an object without returning the object itself", - "documentation": "The following example retrieves an object metadata.", - "input": { - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" - }, - "output": { - "AcceptRanges": "bytes", - "ContentType": "image/jpeg", - "LastModified": "2016-12-15T01:19:41.000Z", - "ContentLength": 3191, - "VersionId": "null", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "Metadata": {} - } - } - ], - "smithy.api#http": { - "method": "HEAD", - "uri": "/{Bucket}/{Key+}", - "code": 200 - }, - "smithy.waiters#waitable": { - "ObjectExists": { - "acceptors": [ - { - "state": "success", - "matcher": { - "success": true - } - }, - { - "state": "retry", - "matcher": { - "errorType": "NotFound" - } - } - ], - "minDelay": 5 - }, - "ObjectNotExists": { - "acceptors": [ - { - "state": "success", - "matcher": { - "errorType": "NotFound" - } - } - ], - "minDelay": 5 - } - } - } - }, - "com.amazonaws.s3#HeadObjectOutput": { - "type": "structure", - "members": { - "DeleteMarker": { - "target": "com.amazonaws.s3#DeleteMarker", - "traits": { - "smithy.api#documentation": "

Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-delete-marker" - } - }, - "AcceptRanges": { - "target": "com.amazonaws.s3#AcceptRanges", - "traits": { - "smithy.api#documentation": "

Indicates that a range of bytes was specified.

", - "smithy.api#httpHeader": "accept-ranges" - } - }, - "Expiration": { - "target": "com.amazonaws.s3#Expiration", - "traits": { - "smithy.api#documentation": "

If the object expiration is configured (see \n PutBucketLifecycleConfiguration\n ), the response includes this\n header. It includes the expiry-date and rule-id key-value pairs\n providing object expiration information. The value of the rule-id is\n URL-encoded.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-expiration" - } - }, - "Restore": { - "target": "com.amazonaws.s3#Restore", - "traits": { - "smithy.api#documentation": "

If the object is an archived object (an object whose storage class is GLACIER), the\n response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

\n

If an archive copy is already restored, the header value indicates when Amazon S3 is\n scheduled to delete the object copy. For example:

\n

\n x-amz-restore: ongoing-request=\"false\", expiry-date=\"Fri, 21 Dec 2012 00:00:00\n GMT\"\n

\n

If the object restoration is in progress, the header returns the value\n ongoing-request=\"true\".

\n

For more information about archiving objects, see Transitioning Objects: General Considerations.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", - "smithy.api#httpHeader": "x-amz-restore" - } - }, - "ArchiveStatus": { - "target": "com.amazonaws.s3#ArchiveStatus", - "traits": { - "smithy.api#documentation": "

The archive state of the head object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-archive-status" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Date and time when the object was last modified.

", - "smithy.api#httpHeader": "Last-Modified" - } - }, - "ContentLength": { - "target": "com.amazonaws.s3#ContentLength", - "traits": { - "smithy.api#documentation": "

Size of the body in bytes.

", - "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" - } - }, - "ChecksumSHA1": { - "target": "com.amazonaws.s3#ChecksumSHA1", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in\n CreateMultipartUpload request. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-type" - } - }, - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "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" - } - }, - "MissingMeta": { - "target": "com.amazonaws.s3#MissingMeta", - "traits": { - "smithy.api#documentation": "

This is set to the number of metadata entries not returned in x-amz-meta\n headers. This can happen if you create metadata using an API like SOAP that supports more\n flexible metadata than the REST API. For example, using SOAP, you can create metadata whose\n values are not legal HTTP headers.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-missing-meta" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-version-id" - } - }, - "CacheControl": { - "target": "com.amazonaws.s3#CacheControl", - "traits": { - "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", - "smithy.api#httpHeader": "Cache-Control" - } - }, - "ContentDisposition": { - "target": "com.amazonaws.s3#ContentDisposition", - "traits": { - "smithy.api#documentation": "

Specifies presentational information for the object.

", - "smithy.api#httpHeader": "Content-Disposition" - } - }, - "ContentEncoding": { - "target": "com.amazonaws.s3#ContentEncoding", - "traits": { - "smithy.api#documentation": "

Indicates what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", - "smithy.api#httpHeader": "Content-Encoding" - } - }, - "ContentLanguage": { - "target": "com.amazonaws.s3#ContentLanguage", - "traits": { - "smithy.api#documentation": "

The language the content is in.

", - "smithy.api#httpHeader": "Content-Language" - } - }, - "ContentType": { - "target": "com.amazonaws.s3#ContentType", - "traits": { - "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", - "smithy.api#httpHeader": "Content-Type" - } - }, - "ContentRange": { - "target": "com.amazonaws.s3#ContentRange", - "traits": { - "smithy.api#documentation": "

The portion of the object returned in the response for a GET request.

", - "smithy.api#httpHeader": "Content-Range" - } - }, - "Expires": { - "target": "com.amazonaws.s3#Expires", - "traits": { - "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", - "smithy.api#httpHeader": "Expires" - } - }, - "WebsiteRedirectLocation": { - "target": "com.amazonaws.s3#WebsiteRedirectLocation", - "traits": { - "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-website-redirect-location" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms, aws:kms:dsse).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "Metadata": { - "target": "com.amazonaws.s3#Metadata", - "traits": { - "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", - "smithy.api#httpPrefixHeaders": "x-amz-meta-" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" - } - }, - "SSECustomerKeyMD5": { - "target": "com.amazonaws.s3#SSECustomerKeyMD5", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the object uses an S3 Bucket Key for server-side encryption with\n Key Management Service (KMS) keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "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

For more information, see Storage Classes.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", - "smithy.api#httpHeader": "x-amz-storage-class" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - }, - "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

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,\n Amazon S3 will return the x-amz-replication-status header if the object in\n your request is 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\n bucket, Amazon S3 will return the x-amz-replication-status header\n with value REPLICA if the object in your request is a replica that Amazon S3 created and\n there is no replica modification replication in progress.

    \n
  • \n
  • \n

    \n When replicating objects to multiple destination\n buckets, the x-amz-replication-status header acts\n differently. The header of the source object will only return a value of COMPLETED\n when replication is successful to all destinations. The header will remain at value\n PENDING until replication has completed for all destinations. If one or more\n destinations fails replication the header will return FAILED.

    \n
  • \n
\n

For more information, see Replication.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-replication-status" - } - }, - "PartsCount": { - "target": "com.amazonaws.s3#PartsCount", - "traits": { - "smithy.api#documentation": "

The count of parts this object has. This value is only returned if you specify\n partNumber in your request and the object was uploaded as a multipart\n upload.

", - "smithy.api#httpHeader": "x-amz-mp-parts-count" - } - }, - "ObjectLockMode": { - "target": "com.amazonaws.s3#ObjectLockMode", - "traits": { - "smithy.api#documentation": "

The Object Lock mode, if any, that's in effect for this object. This header is only\n returned if the requester has the s3:GetObjectRetention permission. For more\n information about S3 Object Lock, see Object Lock.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-mode" - } - }, - "ObjectLockRetainUntilDate": { - "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", - "traits": { - "smithy.api#documentation": "

The date and time when the Object Lock retention period expires. This header is only\n returned if the requester has the s3:GetObjectRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" - } - }, - "ObjectLockLegalHoldStatus": { - "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether a legal hold is in effect for this object. This header is only\n returned if the requester has the s3:GetObjectLegalHold permission. This\n header is not returned if the specified version of this object has never had a legal hold\n applied. For more information about S3 Object Lock, see Object Lock.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-legal-hold" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#HeadObjectRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket that contains the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "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) error.

\n

If both of the If-Match and If-Unmodified-Since headers are\n present in the request as follows:

\n
    \n
  • \n

    \n If-Match condition evaluates to true, and;

    \n
  • \n
  • \n

    \n If-Unmodified-Since condition evaluates to false;

    \n
  • \n
\n

Then Amazon S3 returns 200 OK and the data requested.

\n

For more information about conditional requests, see RFC 7232.

", - "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) error.

\n

If both of the If-None-Match and If-Modified-Since headers are\n present in the request as follows:

\n
    \n
  • \n

    \n If-None-Match condition evaluates to false, and;

    \n
  • \n
  • \n

    \n If-Modified-Since condition evaluates to true;

    \n
  • \n
\n

Then Amazon S3 returns the 304 Not Modified response code.

\n

For more information about conditional requests, see RFC 7232.

", - "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) error.

\n

If both of the If-None-Match and If-Modified-Since headers are\n present in the request as follows:

\n
    \n
  • \n

    \n If-None-Match condition evaluates to false, and;

    \n
  • \n
  • \n

    \n If-Modified-Since condition evaluates to true;

    \n
  • \n
\n

Then Amazon S3 returns the 304 Not Modified response code.

\n

For more information about conditional requests, see RFC 7232.

", - "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) error.

\n

If both of the If-Match and If-Unmodified-Since headers are\n present in the request as follows:

\n
    \n
  • \n

    \n If-Match condition evaluates to true, and;

    \n
  • \n
  • \n

    \n If-Unmodified-Since condition evaluates to false;

    \n
  • \n
\n

Then Amazon S3 returns 200 OK and the data requested.

\n

For more information about conditional requests, see RFC 7232.

", - "smithy.api#httpHeader": "If-Unmodified-Since" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The object key.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "Range": { - "target": "com.amazonaws.s3#Range", - "traits": { - "smithy.api#documentation": "

HeadObject returns only the metadata for an object. If the Range is satisfiable, only\n the ContentLength is affected in the response. If the Range is not\n satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

", - "smithy.api#httpHeader": "Range" - } - }, - "ResponseCacheControl": { - "target": "com.amazonaws.s3#ResponseCacheControl", - "traits": { - "smithy.api#documentation": "

Sets the Cache-Control header of the response.

", - "smithy.api#httpQuery": "response-cache-control" - } - }, - "ResponseContentDisposition": { - "target": "com.amazonaws.s3#ResponseContentDisposition", - "traits": { - "smithy.api#documentation": "

Sets the Content-Disposition header of the response.

", - "smithy.api#httpQuery": "response-content-disposition" - } - }, - "ResponseContentEncoding": { - "target": "com.amazonaws.s3#ResponseContentEncoding", - "traits": { - "smithy.api#documentation": "

Sets the Content-Encoding header of the response.

", - "smithy.api#httpQuery": "response-content-encoding" - } - }, - "ResponseContentLanguage": { - "target": "com.amazonaws.s3#ResponseContentLanguage", - "traits": { - "smithy.api#documentation": "

Sets the Content-Language header of the response.

", - "smithy.api#httpQuery": "response-content-language" - } - }, - "ResponseContentType": { - "target": "com.amazonaws.s3#ResponseContentType", - "traits": { - "smithy.api#documentation": "

Sets the Content-Type header of the response.

", - "smithy.api#httpQuery": "response-content-type" - } - }, - "ResponseExpires": { - "target": "com.amazonaws.s3#ResponseExpires", - "traits": { - "smithy.api#documentation": "

Sets the Expires header of the response.

", - "smithy.api#httpQuery": "response-expires" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n \n

For directory buckets in this API operation, only the null value of the version ID is supported.

\n
", - "smithy.api#httpQuery": "versionId" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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" - } - }, - "PartNumber": { - "target": "com.amazonaws.s3#PartNumber", - "traits": { - "smithy.api#documentation": "

Part number of the object being read. This is a positive integer between 1 and 10,000.\n Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about\n the size of the part and the number of parts in this object.

", - "smithy.api#httpQuery": "partNumber" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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

\n General purpose buckets -\n If you enable checksum mode and the object is uploaded with a\n checksum\n and encrypted with an Key Management Service (KMS) key, you must have permission to use the\n kms:Decrypt action to retrieve the checksum.

\n

\n Directory buckets - If you enable\n ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service\n (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and\n kms:Decrypt permissions in IAM identity-based policies and KMS key\n policies for the KMS key to retrieve the checksum of the object.

", - "smithy.api#httpHeader": "x-amz-checksum-mode" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#HostName": { - "type": "string" - }, - "com.amazonaws.s3#HttpErrorCodeReturnedEquals": { - "type": "string" - }, - "com.amazonaws.s3#HttpRedirectCode": { - "type": "string" - }, - "com.amazonaws.s3#ID": { - "type": "string" - }, - "com.amazonaws.s3#IfMatch": { - "type": "string" - }, - "com.amazonaws.s3#IfMatchInitiatedTime": { - "type": "timestamp", - "traits": { - "smithy.api#timestampFormat": "http-date" - } - }, - "com.amazonaws.s3#IfMatchLastModifiedTime": { - "type": "timestamp", - "traits": { - "smithy.api#timestampFormat": "http-date" - } - }, - "com.amazonaws.s3#IfMatchSize": { - "type": "long" - }, - "com.amazonaws.s3#IfModifiedSince": { - "type": "timestamp" - }, - "com.amazonaws.s3#IfNoneMatch": { - "type": "string" - }, - "com.amazonaws.s3#IfUnmodifiedSince": { - "type": "timestamp" - }, - "com.amazonaws.s3#IndexDocument": { - "type": "structure", - "members": { - "Suffix": { - "target": "com.amazonaws.s3#Suffix", - "traits": { - "smithy.api#documentation": "

A suffix that is appended to a request that is for a directory on the website endpoint.\n (For example, if the suffix is index.html and you make a request to\n samplebucket/images/, the data that is returned will be for the object with\n the key name images/index.html.) The suffix must not be empty and must not\n include a slash character.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for the Suffix element.

" - } - }, - "com.amazonaws.s3#Initiated": { - "type": "timestamp" - }, - "com.amazonaws.s3#Initiator": { - "type": "structure", - "members": { - "ID": { - "target": "com.amazonaws.s3#ID", - "traits": { - "smithy.api#documentation": "

If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the\n principal is an IAM User, it provides a user ARN value.

\n \n

\n Directory buckets - If the principal is an\n Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it\n provides a user ARN value.

\n
" - } - }, - "DisplayName": { - "target": "com.amazonaws.s3#DisplayName", - "traits": { - "smithy.api#documentation": "

Name of the Principal.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container element that identifies who initiated the multipart upload.

" - } - }, - "com.amazonaws.s3#InputSerialization": { - "type": "structure", - "members": { - "CSV": { - "target": "com.amazonaws.s3#CSVInput", - "traits": { - "smithy.api#documentation": "

Describes the serialization of a CSV-encoded object.

" - } - }, - "CompressionType": { - "target": "com.amazonaws.s3#CompressionType", - "traits": { - "smithy.api#documentation": "

Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value:\n NONE.

" - } - }, - "JSON": { - "target": "com.amazonaws.s3#JSONInput", - "traits": { - "smithy.api#documentation": "

Specifies JSON as object's input serialization format.

" - } - }, - "Parquet": { - "target": "com.amazonaws.s3#ParquetInput", - "traits": { - "smithy.api#documentation": "

Specifies Parquet as object's input serialization format.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Describes the serialization format of the object.

" - } - }, - "com.amazonaws.s3#IntelligentTieringAccessTier": { - "type": "enum", - "members": { - "ARCHIVE_ACCESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ARCHIVE_ACCESS" - } - }, - "DEEP_ARCHIVE_ACCESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DEEP_ARCHIVE_ACCESS" - } - } - } - }, - "com.amazonaws.s3#IntelligentTieringAndOperator": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the\n configuration applies.

" - } - }, - "Tags": { - "target": "com.amazonaws.s3#TagSet", - "traits": { - "smithy.api#documentation": "

All of these tags must exist in the object's tag set in order for the configuration to\n apply.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - } - }, - "traits": { - "smithy.api#documentation": "

A container for specifying S3 Intelligent-Tiering filters. The filters determine the\n subset of objects to which the rule applies.

" - } - }, - "com.amazonaws.s3#IntelligentTieringConfiguration": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.s3#IntelligentTieringId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", - "smithy.api#required": {} - } - }, - "Filter": { - "target": "com.amazonaws.s3#IntelligentTieringFilter", - "traits": { - "smithy.api#documentation": "

Specifies a bucket filter. The configuration only includes objects that meet the\n filter's criteria.

" - } - }, - "Status": { - "target": "com.amazonaws.s3#IntelligentTieringStatus", - "traits": { - "smithy.api#documentation": "

Specifies the status of the configuration.

", - "smithy.api#required": {} - } - }, - "Tierings": { - "target": "com.amazonaws.s3#TieringList", - "traits": { - "smithy.api#documentation": "

Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tiering" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

\n

For information about the S3 Intelligent-Tiering storage class, see Storage class\n for automatically optimizing frequently and infrequently accessed\n objects.

" - } - }, - "com.amazonaws.s3#IntelligentTieringConfigurationList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#IntelligentTieringConfiguration" - } - }, - "com.amazonaws.s3#IntelligentTieringDays": { - "type": "integer" - }, - "com.amazonaws.s3#IntelligentTieringFilter": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" - } - }, - "Tag": { - "target": "com.amazonaws.s3#Tag" - }, - "And": { - "target": "com.amazonaws.s3#IntelligentTieringAndOperator", - "traits": { - "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

The Filter is used to identify objects that the S3 Intelligent-Tiering\n configuration applies to.

" - } - }, - "com.amazonaws.s3#IntelligentTieringId": { - "type": "string" - }, - "com.amazonaws.s3#IntelligentTieringStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } - } - } - }, - "com.amazonaws.s3#InvalidObjectState": { - "type": "structure", - "members": { - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass" - }, - "AccessTier": { - "target": "com.amazonaws.s3#IntelligentTieringAccessTier" - } - }, - "traits": { - "smithy.api#documentation": "

Object is archived and inaccessible until restored.

\n

If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage\n class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access\n tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you\n must first restore a copy using RestoreObject. Otherwise, this\n operation returns an InvalidObjectState error. For information about restoring\n archived objects, see Restoring Archived Objects in\n the Amazon S3 User Guide.

", - "smithy.api#error": "client", - "smithy.api#httpError": 403 - } - }, - "com.amazonaws.s3#InvalidRequest": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

\n
    \n
  • \n

    Cannot specify both a write offset value and user-defined object metadata for existing objects.

    \n
  • \n
  • \n

    Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

    \n
  • \n
  • \n

    Request body cannot be empty when 'write offset' is specified.

    \n
  • \n
", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.s3#InvalidWriteOffset": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

\n The write offset value that you specified does not match the current object size.\n

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.s3#InventoryConfiguration": { - "type": "structure", - "members": { - "Destination": { - "target": "com.amazonaws.s3#InventoryDestination", - "traits": { - "smithy.api#documentation": "

Contains information about where to publish the inventory results.

", - "smithy.api#required": {} - } - }, - "IsEnabled": { - "target": "com.amazonaws.s3#IsEnabled", - "traits": { - "smithy.api#documentation": "

Specifies whether the inventory is enabled or disabled. If set to True, an\n inventory list is generated. If set to False, no inventory list is\n generated.

", - "smithy.api#required": {} - } - }, - "Filter": { - "target": "com.amazonaws.s3#InventoryFilter", - "traits": { - "smithy.api#documentation": "

Specifies an inventory filter. The inventory only includes objects that meet the\n filter's criteria.

" - } - }, - "Id": { - "target": "com.amazonaws.s3#InventoryId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", - "smithy.api#required": {} - } - }, - "IncludedObjectVersions": { - "target": "com.amazonaws.s3#InventoryIncludedObjectVersions", - "traits": { - "smithy.api#documentation": "

Object versions to include in the inventory list. If set to All, the list\n includes all the object versions, which adds the version-related fields\n VersionId, IsLatest, and DeleteMarker to the\n list. If set to Current, the list does not contain these version-related\n fields.

", - "smithy.api#required": {} - } - }, - "OptionalFields": { - "target": "com.amazonaws.s3#InventoryOptionalFields", - "traits": { - "smithy.api#documentation": "

Contains the optional fields that are included in the inventory results.

" - } - }, - "Schedule": { - "target": "com.amazonaws.s3#InventorySchedule", - "traits": { - "smithy.api#documentation": "

Specifies the schedule for generating inventory results.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the inventory configuration for an Amazon S3 bucket. For more information, see\n GET Bucket inventory in the Amazon S3 API Reference.

" - } - }, - "com.amazonaws.s3#InventoryConfigurationList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#InventoryConfiguration" - } - }, - "com.amazonaws.s3#InventoryDestination": { - "type": "structure", - "members": { - "S3BucketDestination": { - "target": "com.amazonaws.s3#InventoryS3BucketDestination", - "traits": { - "smithy.api#documentation": "

Contains the bucket name, file format, bucket owner (optional), and prefix (optional)\n where inventory results are published.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the inventory configuration for an Amazon S3 bucket.

" - } - }, - "com.amazonaws.s3#InventoryEncryption": { - "type": "structure", - "members": { - "SSES3": { - "target": "com.amazonaws.s3#SSES3", - "traits": { - "smithy.api#documentation": "

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

", - "smithy.api#xmlName": "SSE-S3" - } - }, - "SSEKMS": { - "target": "com.amazonaws.s3#SSEKMS", - "traits": { - "smithy.api#documentation": "

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

", - "smithy.api#xmlName": "SSE-KMS" - } - } - }, - "traits": { - "smithy.api#documentation": "

Contains the type of server-side encryption used to encrypt the inventory\n results.

" - } - }, - "com.amazonaws.s3#InventoryFilter": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

The prefix that an object must have to be included in the inventory results.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies an inventory filter. The inventory only includes objects that meet the\n filter's criteria.

" - } - }, - "com.amazonaws.s3#InventoryFormat": { - "type": "enum", - "members": { - "CSV": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CSV" - } - }, - "ORC": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ORC" - } - }, - "Parquet": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Parquet" - } - } - } - }, - "com.amazonaws.s3#InventoryFrequency": { - "type": "enum", - "members": { - "Daily": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Daily" - } - }, - "Weekly": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Weekly" - } - } - } - }, - "com.amazonaws.s3#InventoryId": { - "type": "string" - }, - "com.amazonaws.s3#InventoryIncludedObjectVersions": { - "type": "enum", - "members": { - "All": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "All" - } - }, - "Current": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Current" - } - } - } - }, - "com.amazonaws.s3#InventoryOptionalField": { - "type": "enum", - "members": { - "Size": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Size" - } - }, - "LastModifiedDate": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LastModifiedDate" - } - }, - "StorageClass": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "StorageClass" - } - }, - "ETag": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ETag" - } - }, - "IsMultipartUploaded": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "IsMultipartUploaded" - } - }, - "ReplicationStatus": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ReplicationStatus" - } - }, - "EncryptionStatus": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "EncryptionStatus" - } - }, - "ObjectLockRetainUntilDate": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ObjectLockRetainUntilDate" - } - }, - "ObjectLockMode": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ObjectLockMode" - } - }, - "ObjectLockLegalHoldStatus": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ObjectLockLegalHoldStatus" - } - }, - "IntelligentTieringAccessTier": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "IntelligentTieringAccessTier" - } - }, - "BucketKeyStatus": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "BucketKeyStatus" - } - }, - "ChecksumAlgorithm": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ChecksumAlgorithm" - } - }, - "ObjectAccessControlList": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ObjectAccessControlList" - } - }, - "ObjectOwner": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ObjectOwner" - } - } - } - }, - "com.amazonaws.s3#InventoryOptionalFields": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#InventoryOptionalField", - "traits": { - "smithy.api#xmlName": "Field" - } - } - }, - "com.amazonaws.s3#InventoryS3BucketDestination": { - "type": "structure", - "members": { - "AccountId": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID that owns the destination S3 bucket. If no account ID is provided, the\n owner is not validated before exporting data.

\n \n

Although this value is optional, we strongly recommend that you set it to help\n prevent problems if the destination bucket ownership changes.

\n
" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket where inventory results will be\n published.

", - "smithy.api#required": {} - } - }, - "Format": { - "target": "com.amazonaws.s3#InventoryFormat", - "traits": { - "smithy.api#documentation": "

Specifies the output format of the inventory results.

", - "smithy.api#required": {} - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

The prefix that is prepended to all inventory results.

" - } - }, - "Encryption": { - "target": "com.amazonaws.s3#InventoryEncryption", - "traits": { - "smithy.api#documentation": "

Contains the type of server-side encryption used to encrypt the inventory\n results.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Contains the bucket name, file format, bucket owner (optional), and prefix (optional)\n where inventory results are published.

" - } - }, - "com.amazonaws.s3#InventorySchedule": { - "type": "structure", - "members": { - "Frequency": { - "target": "com.amazonaws.s3#InventoryFrequency", - "traits": { - "smithy.api#documentation": "

Specifies how frequently inventory results are produced.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the schedule for generating inventory results.

" - } - }, - "com.amazonaws.s3#IsEnabled": { - "type": "boolean" - }, - "com.amazonaws.s3#IsLatest": { - "type": "boolean" - }, - "com.amazonaws.s3#IsPublic": { - "type": "boolean" - }, - "com.amazonaws.s3#IsRestoreInProgress": { - "type": "boolean" - }, - "com.amazonaws.s3#IsTruncated": { - "type": "boolean" - }, - "com.amazonaws.s3#JSONInput": { - "type": "structure", - "members": { - "Type": { - "target": "com.amazonaws.s3#JSONType", - "traits": { - "smithy.api#documentation": "

The type of JSON. Valid values: Document, Lines.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies JSON as object's input serialization format.

" - } - }, - "com.amazonaws.s3#JSONOutput": { - "type": "structure", - "members": { - "RecordDelimiter": { - "target": "com.amazonaws.s3#RecordDelimiter", - "traits": { - "smithy.api#documentation": "

The value used to separate individual records in the output. If no value is specified,\n Amazon S3 uses a newline character ('\\n').

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies JSON as request's output serialization format.

" - } - }, - "com.amazonaws.s3#JSONType": { - "type": "enum", - "members": { - "DOCUMENT": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DOCUMENT" - } - }, - "LINES": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LINES" - } - } - } - }, - "com.amazonaws.s3#KMSContext": { - "type": "string" - }, - "com.amazonaws.s3#KeyCount": { - "type": "integer" - }, - "com.amazonaws.s3#KeyMarker": { - "type": "string" - }, - "com.amazonaws.s3#KeyPrefixEquals": { - "type": "string" - }, - "com.amazonaws.s3#LambdaFunctionArn": { - "type": "string" - }, - "com.amazonaws.s3#LambdaFunctionConfiguration": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.s3#NotificationId" - }, - "LambdaFunctionArn": { - "target": "com.amazonaws.s3#LambdaFunctionArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the\n specified event type occurs.

", - "smithy.api#required": {}, - "smithy.api#xmlName": "CloudFunction" - } - }, - "Events": { - "target": "com.amazonaws.s3#EventList", - "traits": { - "smithy.api#documentation": "

The Amazon S3 bucket event for which to invoke the Lambda function. For more information,\n see Supported\n Event Types in the Amazon S3 User Guide.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Event" - } - }, - "Filter": { - "target": "com.amazonaws.s3#NotificationConfigurationFilter" - } - }, - "traits": { - "smithy.api#documentation": "

A container for specifying the configuration for Lambda notifications.

" - } - }, - "com.amazonaws.s3#LambdaFunctionConfigurationList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#LambdaFunctionConfiguration" - } - }, - "com.amazonaws.s3#LastModified": { - "type": "timestamp" - }, - "com.amazonaws.s3#LastModifiedTime": { - "type": "timestamp", - "traits": { - "smithy.api#timestampFormat": "http-date" - } - }, - "com.amazonaws.s3#LifecycleExpiration": { - "type": "structure", - "members": { - "Date": { - "target": "com.amazonaws.s3#Date", - "traits": { - "smithy.api#documentation": "

Indicates at what date the object is to be moved or deleted. The date value must conform\n to the ISO 8601 format. The time is always midnight UTC.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" - } - }, - "Days": { - "target": "com.amazonaws.s3#Days", - "traits": { - "smithy.api#documentation": "

Indicates the lifetime, in days, of the objects that are subject to the rule. The value\n must be a non-zero positive integer.

" - } - }, - "ExpiredObjectDeleteMarker": { - "target": "com.amazonaws.s3#ExpiredObjectDeleteMarker", - "traits": { - "smithy.api#documentation": "

Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set\n to true, the delete marker will be expired; if set to false the policy takes no action.\n This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for the expiration for the lifecycle of the object.

\n

For more information see, Managing your storage\n lifecycle in the Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#LifecycleRule": { - "type": "structure", - "members": { - "Expiration": { - "target": "com.amazonaws.s3#LifecycleExpiration", - "traits": { - "smithy.api#documentation": "

Specifies the expiration for the lifecycle of the object in the form of date, days and,\n whether the object has a delete marker.

" - } - }, - "ID": { - "target": "com.amazonaws.s3#ID", - "traits": { - "smithy.api#documentation": "

Unique identifier for the rule. The value cannot be longer than 255 characters.

" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#deprecated": {}, - "smithy.api#documentation": "

Prefix identifying one or more objects to which the rule applies. This is\n no longer used; use Filter instead.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" - } - }, - "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\n LifecycleRule does not contain a Prefix element.

\n \n

\n Tag filters are not supported for directory buckets.

\n
" - } - }, - "Status": { - "target": "com.amazonaws.s3#ExpirationStatus", - "traits": { - "smithy.api#documentation": "

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not\n currently being applied.

", - "smithy.api#required": {} - } - }, - "Transitions": { - "target": "com.amazonaws.s3#TransitionList", - "traits": { - "smithy.api#documentation": "

Specifies when an Amazon S3 object transitions to a specified storage class.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Transition" - } - }, - "NoncurrentVersionTransitions": { - "target": "com.amazonaws.s3#NoncurrentVersionTransitionList", - "traits": { - "smithy.api#documentation": "

Specifies the transition rule for the lifecycle rule that describes when noncurrent\n objects transition to a specific storage class. If your bucket is versioning-enabled (or\n versioning is suspended), you can set this action to request that Amazon S3 transition\n noncurrent object versions to a specific storage class at a set period in the object's\n lifetime.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "NoncurrentVersionTransition" - } - }, - "NoncurrentVersionExpiration": { - "target": "com.amazonaws.s3#NoncurrentVersionExpiration" - }, - "AbortIncompleteMultipartUpload": { - "target": "com.amazonaws.s3#AbortIncompleteMultipartUpload" - } - }, - "traits": { - "smithy.api#documentation": "

A lifecycle rule for individual objects in an Amazon S3 bucket.

\n

For more information see, Managing your storage\n lifecycle in the Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#LifecycleRuleAndOperator": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Prefix identifying one or more objects to which the rule applies.

" - } - }, - "Tags": { - "target": "com.amazonaws.s3#TagSet", - "traits": { - "smithy.api#documentation": "

All of these tags must exist in the object's tag set in order for the rule to\n apply.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - }, - "ObjectSizeGreaterThan": { - "target": "com.amazonaws.s3#ObjectSizeGreaterThanBytes", - "traits": { - "smithy.api#documentation": "

Minimum object size to which the rule applies.

" - } - }, - "ObjectSizeLessThan": { - "target": "com.amazonaws.s3#ObjectSizeLessThanBytes", - "traits": { - "smithy.api#documentation": "

Maximum object size to which the rule applies.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

This is used in a Lifecycle Rule Filter to apply a logical AND to two or more\n predicates. The Lifecycle Rule will apply to any object matching all of the predicates\n configured inside the And operator.

" - } - }, - "com.amazonaws.s3#LifecycleRuleFilter": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Prefix identifying one or more objects to which the rule applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" - } - }, - "Tag": { - "target": "com.amazonaws.s3#Tag", - "traits": { - "smithy.api#documentation": "

This tag must exist in the object's tag set in order for the rule to apply.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" - } - }, - "ObjectSizeGreaterThan": { - "target": "com.amazonaws.s3#ObjectSizeGreaterThanBytes", - "traits": { - "smithy.api#documentation": "

Minimum object size to which the rule applies.

" - } - }, - "ObjectSizeLessThan": { - "target": "com.amazonaws.s3#ObjectSizeLessThanBytes", - "traits": { - "smithy.api#documentation": "

Maximum object size to which the rule applies.

" - } - }, - "And": { - "target": "com.amazonaws.s3#LifecycleRuleAndOperator" - } - }, - "traits": { - "smithy.api#documentation": "

The Filter is used to identify objects that a Lifecycle Rule applies to. A\n Filter can have exactly one of Prefix, Tag,\n ObjectSizeGreaterThan, ObjectSizeLessThan, or And\n specified. If the Filter element is left empty, the Lifecycle Rule applies to\n all objects in the bucket.

" - } - }, - "com.amazonaws.s3#LifecycleRules": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#LifecycleRule" - } - }, - "com.amazonaws.s3#ListBucketAnalyticsConfigurations": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurationsRequest" - }, - "output": { - "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurationsOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the analytics configurations for the bucket. You can have up to 1,000 analytics\n configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. You should always check the IsTruncated element in the response. If\n there are no more configurations to list, IsTruncated is set to false. If\n there are more configurations to list, IsTruncated is set to true, and there\n will be a value in NextContinuationToken. You use the\n NextContinuationToken value to continue the pagination of the list by\n passing the value in continuation-token in the request to GET the next\n page.

\n

To use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration 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

For information about Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis.

\n

The following operations are related to\n ListBucketAnalyticsConfigurations:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#ListBucketAnalyticsConfigurationsOutput": { - "type": "structure", - "members": { - "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.

" - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

The marker that is used as a starting point for this analytics configuration list\n response. This value is present if it was sent in the request.

" - } - }, - "NextContinuationToken": { - "target": "com.amazonaws.s3#NextToken", - "traits": { - "smithy.api#documentation": "

\n NextContinuationToken is sent when isTruncated is true, which\n indicates that there are more analytics configurations to list. The next request must\n include this NextContinuationToken. The token is obfuscated and is not a\n usable value.

" - } - }, - "AnalyticsConfigurationList": { - "target": "com.amazonaws.s3#AnalyticsConfigurationList", - "traits": { - "smithy.api#documentation": "

The list of analytics configurations for a bucket.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AnalyticsConfiguration" - } - } - }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListBucketAnalyticsConfigurationResult" - } - }, - "com.amazonaws.s3#ListBucketAnalyticsConfigurationsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket from which analytics configurations are retrieved.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request\n should begin.

", - "smithy.api#httpQuery": "continuation-token" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListBucketIntelligentTieringConfigurations": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsRequest" - }, - "output": { - "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to ListBucketIntelligentTieringConfigurations include:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsOutput": { - "type": "structure", - "members": { - "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\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\n should begin.

" - } - }, - "NextContinuationToken": { - "target": "com.amazonaws.s3#NextToken", - "traits": { - "smithy.api#documentation": "

The marker used to continue this inventory configuration listing. Use the\n NextContinuationToken from this response to continue the listing in a\n subsequent request. The continuation token is an opaque value that Amazon S3 understands.

" - } - }, - "IntelligentTieringConfigurationList": { - "target": "com.amazonaws.s3#IntelligentTieringConfigurationList", - "traits": { - "smithy.api#documentation": "

The list of S3 Intelligent-Tiering configurations for a bucket.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "IntelligentTieringConfiguration" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } + "headers": {} + }, + "type": "endpoint" }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request\n should begin.

", - "smithy.api#httpQuery": "continuation-token" - } + { + "error": "A region must be set when sending requests to S3.", + "type": "error" } - }, - "traits": { - "smithy.api#input": {} - } + ], + "root": 2, + "nodes": "AQIBAAa6hq9fAn4ILgoMMGIMQkYORC4QShK6hq9fWBoUYFoWjgEYUpIB2ApSXoqEr18cYCYejgEgIpIBogoilAEkqoWvX5gBqIavX6qGr1+OASgqkgGMCyqUASyqha9fmAGkhq9fpoavX0owyApOOjJYgA80YISEr182jgE4qoWvX5IB2Aqqha9fWIAPPGCEhK9fPo4BQEKSAegKQpQBRKqFr1+YAbCGr1+yhq9fRIgPSEpK+gpYgoSvX0xgWk6OAVBSkgGGC1KUAVSqha9fmAG0hq9fVrwBWLiGr1/IAbaGr1+4hq9fjgFcXpIBjAtelAFgqoWvX5gBrIavX66Gr19CeGREbGZKaLqGr19YavSEr19eioSvX/KEr19KbsgKTnRwWIAPcmCEhK9f9ISvX1iAD3ZghISvX/CEr19EiA96Snz6CliChK9f9ISvXwTKCYABBoIBhAEIqgSEAQqGAYgBDKIBiAEOjAGKARCOAcAEEI4B9AQSnAGQARSWAZIBFpQBzAgYmgG6BBaYAcwIGJoB2gYazAiIAhTUA54BFqABzAgY2AO6BA6mAaQBEKgBwAQQqAH0BBLOA6oBFLABrAEWrgHMCBi0AagFFrIBzAgYtAHaBhrMCLYBHIgCuAEeugGUCCCUCLwBJr4BwAEowAvAASrCAcQBLPQMxAE2xgHQATjIAdABOsoB0AE8zAHQAT7OAdABQJIL0AFC9gHSAUTkAdQBStgB1gFY4AHcAUzsCNoBWN4B3AFghAL0AV6KhK9f4AFghALiAYwB2geyha9fRuYBwApK6AHwAUycCeoBTuwB8AFS7gHwAVSWCfABWIAP8gFghISvX/QBjAHwB7KFr19EiA/4AUr6AfwBTL4J/AFYgoSvX/4BYIQCgAKMAYgIggKcAa6Fr1+yha9fjAGQCIYCnAGsha9fsoWvXx6KApQIIJQIjAImjgKQAijAC5ACKpIClAIs9AyUAjaWAqACOJgCoAI6mgKgAjycAqACPp4CoAJAkgugAkKwA6ICROgCpAJKpgL4A0zsCKgCWLwCqgJarAL+A2CuAvYCjAGQCLACnAGsha9fsgKqAbQCwoWvX7ABtgLAha9ftAG4AtiFr1+6AboCvoWvX8wB0oWvX7yFr19avgKABF6KhK9fwAJg2gLCAowB2gfEApwB0ALGAqoByALCha9fsAHKAsCFr1+0AcwC2IWvX7oBzgK+ha9fzAHQha9fvIWvX6oB0gLCha9fsAHUAsCFr1+4AbSFr1/WAroB2AK+ha9fzAG4ha9fvIWvX4wBkAjcApwBrIWvX94CqgHgAsKFr1+wAeICwIWvX7QB5ALYha9fugHmAr6Fr1/MAc6Fr1+8ha9fRuoCwApK7AKSBEycCe4CTo4D8AJYgA/yAlr0ApQEYISEr1/2AowB8Af4ApwBhAP6AqoB/ALCha9fsAH+AsCFr1+0AYAD2IWvX7oBggO+ha9fzAHWha9fvIWvX6oBhgPCha9fsAGIA8CFr1+4AbSFr1+KA7oBjAO+ha9fzAG6ha9fvIWvX1KQA5IDVJYJkgNYgA+UA1qWA5QEYISEr1+YA4wB8AeaA5wBpgOcA6oBngPCha9fsAGgA8CFr1+0AaID2IWvX7oBpAO+ha9fzAHUha9fvIWvX6oBqAPCha9fsAGqA8CFr1+4AbSFr1+sA7oBrgO+ha9fzAG2ha9fvIWvX0SID7IDSrQDngRMvgm2A1iChK9fuANaugOgBGDAA7wDjAGICL4DnAGuha9fxAOMAZAIwgOcAayFr1/EA6oBxgPCha9fsAHIA8CFr1+0AcoD2IWvX7oBzAO+ha9fzAHMha9fvIWvXxTUA9ADFtIDzAgY2AOoBRbWA8wIGNgD2gYazAjaAx7cA5QIIJQI3gMm4APiAyjAC+IDKuQD5gMs9AzmAzboA/IDOOoD8gM67APyAzzuA/IDPvAD8gNAkgvyA0KYBPQDRIYE9gNK+gP4A1iCBP4DTOwI/ANYgAT+A2CmBJYEXoqEr1+CBGCmBIQEjAHaB8SFr19GiATACkqKBJIETJwJjAROjgSSBFKQBJIEVJYJkgRYgA+UBGCEhK9flgSMAfAHxIWvX0SID5oESpwEngRMvgmeBFiChK9foARgpgSiBIwBiAikBJwBroWvX8SFr1+MAZAIqAScAayFr1/Eha9fCqwErgQMvASuBA6yBLAEELQEwAQQtAT0BBTWBrYEFrgEzAgYrAe6BBrMCOYFDvIEvgQQogXABCLCBPQEJMQE9AQmxgTIBCjAC8gEKsoEzAQs9AzMBDbOBNgEONAE2AQ60gTYBDzUBNgEPtYE2ARAkgvYBELsBNoEROAE3ARK3gSChq9fTOwI6glG4gTACkrkBPAJTJwJ5gRO6ATwCVLqBPAJVJYJ8AlEiA/uBErwBPYJTL4J9gkQogX0BCb2BPgEKMAL+AQq+gT8BCz0DPwENv4EiAU4gAWIBTqCBYgFPIQFiAU+hgWIBUCSC4gFQpwFigVEkAWMBUqOBbqGr19M7AiUCkaSBcAKSpQFyApMnAmWBU6YBc4KUpoF3gpUlgneCkSID54FSqAF+gpMvgn8ChTWBqQFFqYFzAgYrAeoBRrMCKoFHOYFrAUmrgWwBSjAC7AFKrIFtAUs9Ay0BTa2BcAFOLgFwAU6ugXABTy8BcAFPr4FwAVAkgvABUKaB8IFRM4FxAVKyAXGBViAB8wFTOwIygVY/gbMBWCoB94FRtAFwApK0gXaBUycCdQFTtYF2gVS2AXaBVSWCdoFWIAP3AVghISvX94FnAHKha9f4AWiAeIF/oWvX6QB5AX8ha9fqAGyha9f+oWvXyboBeoFKMAL6gUq7AXuBSz0DO4FNvAF+gU48gX6BTr0BfoFPPYF+gU++AX6BUCSC/oFQpoH/AVEjAb+BUqCBoAGWIAHiAZM7AiEBlj+BoYGWooGiAZgqAe6BmCoB5wGRo4GwApKkgaQBliAD7gGTJwJlAZOsAaWBliAD5gGWpoGuAZghISvX5wGnAHKha9fngaiAaAG/oWvX6QBogb8ha9fqAGkBvqFr1+qAaYGwoWvX7ABqAbAha9fugGqBr6Fr1/AAawG+IWvX8IBrgb2ha9fxAHyha9f9IWvX1KyBrQGVJYJtAZYgA+2BlrABrgGYISEr1+6BpwByoWvX7wGogG+Bv6Fr1+kAfqFr1/8ha9fYISEr1/CBpwByoWvX8QGogHGBv6Fr1+kAcgG/IWvX6gBygb6ha9fqgHMBsKFr1+wAc4GwIWvX7oB0Aa+ha9fwAHSBviFr1/CAdQG9oWvX8QB8IWvX/SFr18W2AbMCBisB9oGGswI3AYm3gbgBijAC+AGKuIG5AYs9AzkBjbmBvAGOOgG8AY66gbwBjzsBvAGPu4G8AZAkgvwBkKaB/IGRIYH9AZK+Ab2BliAB/wGTOwI+gZY/gb8BmCoB5YHXoqEr1+AB2CoB4IHnAHKha9fhAeiAeqFr1/+ha9fRogHwApKigeSB0ycCYwHTo4HkgdSkAeSB1SWCZIHWIAPlAdghISvX5YHnAHKha9fmAeiAe6Fr1/+ha9fRIgPnAdKngegB0y+CaAHWIKEr1+iB2CoB6QHnAHKha9fpgeiAeyFr1/+ha9fnAHKha9fqgeiAeiFr1/+ha9fGswIrgcesAeUCCCUCLIHJrQHtgcowAu2Byq4B7oHLPQMugc2vAfGBzi+B8YHOsAHxgc8wgfGBz7EB8YHQJILxgdC+gfIB0TeB8oHSs4HzAdY1gfSB0zsCNAHWNQH0gdgjAjuB16KhK9f1gdgjAjYB4wB2gewha9fnAHGha9f3AemAdyFr1/mha9fRuAHwApK4gfqB0ycCeQHTuYH6gdS6AfqB1SWCeoHWIAP7AdghISvX+4HjAHwB7CFr1+cAcaFr1/yB6YB9Afmha9ftgHgha9f9ge+AfgH5oWvX84B4oWvX+SFr19EiA/8B0r+B4AITL4JgAhYgoSvX4IIYIwIhAiMAYgIhgicAa6Fr1+wha9fnAGuha9figimAd6Fr1/mha9fjAGQCI4InAGsha9fsIWvX5wBrIWvX5IIpgHaha9f5oWvXyaWCJgIKMALmAgqmgicCCz0DJwINp4IqAg4oAioCDqiCKgIPKQIqAg+pgioCECSC6gIQsQIqghEtAisCEquCMiFr19M7AiwCFiyCMiFr19eioSvX8iFr19GtgjACkq4CMAITJwJughOvAjACFK+CMAIVJYJwAhYgA/CCGCEhK9fyIWvX0SID8YISsgIyghMvgnKCFiChK9fyIWvXybOCNAIKMAL0Agq0gjUCCz0DNQINtYI4Ag42AjgCDraCOAIPNwI4Ag+3gjgCECSC+AIQrYJ4ghEhgnkCErmCICGr19M7AjoCFjqCICGr19eioSvX4CGr19Y+gjuCFzwCKqFr19g+AjyCJgBpIWvX/QIvAH2CKiFr1/IAaaFr1+oha9fmAGUha9floWvX1z+CPwIXoqEr1+qha9fXoqEr1+ACWCECYIJmAGMha9fjoWvX5gBiIWvX4qFr19GiAnACkqKCZIJTJwJjAlOjgmSCVKQCZIJVJYJkglYgA+UCWCEhK9fgIavX1iAD5gJXJoJsAlghISvX56Fr19OoAmeCViAD7AJUKwJoglYgA+kCVymCbAJYISEr1+oCYoBqgmqha9fmAGaha9fnoWvX1iAD64JXLIJsAlghISvX6qFr19ghISvX7QJmAGYha9fnIWvX0SID7gJSroJvAlMvgm8CViChK9fgIavX1iChK9fwAlcwgmqha9fXoaFr1/ECWDICcYJmAGgha9fooWvX5gBkIWvX5KFr18O+AnMCSLOCfgJJNAJ+Akm0gnUCSjAC9QJKtYJ2Aks9AzYCTbaCeQJONwJ5Ak63gnkCTzgCeQJPuIJ5AlAkgvkCUL0CeYJRO4J6AlK6gmChq9fWOwJgoavX16KhK9fgoavX0bwCcAKWIAP8glghISvX4KGr19EiA/2CViChK9fgoavXyb6CfwJKMAL/Akq/gmACiz0DIAKNoIKjAo4hAqMCjqGCowKPIgKjAo+igqMCkCSC4wKQvQKjgpEvgqQCki4CpIKSpQKuoavX1akCpYKWJoKmApgiAvUCl6KhK9fnApgiAueCo4BoAq6hq9fkgGiCrqGr1+UAaCGr1+qha9fWLAKpgpgrgqoCpgBloavX6oKvAGsCpqGr1/IAZiGr1+ahq9fmAGOhq9fkIavX16KhK9fsgpgtgq0CpgBioavX4yGr1+YAYaGr1+Ihq9fSroKhIavX1i8CoSGr19eioSvX4SGr19GxArACliAD8IKYISEr1+Eha9fSPAKxgpKzArICliAD8oKYISEr1+6hq9fTt4KzgpW2grQCliAD9IKYISEr1/UCo4B1gq6hq9fkgHYCrqGr1+UAaKGr1+qha9fWIAP3ApghISvX5yGr19W6grgCliAD+IKYISEr1/kCo4B5gq6hq9fkgHoCrqGr1+UAZ6Gr1+qha9fWIAP7ApghISvX+4KmAGShq9flIavX1iAD/IKYISEr1+Ehq9fRIgP9gpIkAv4Ckr8CvoKWIKEr1+6hq9fVo4L/gpYgoSvX4ALYIgLgguOAYQLuoavX5IBhgu6hq9flAGuha9fqoWvX44Bigu6hq9fkgGMC7qGr1+UAayFr1+qha9fWIKEr1+chq9fWIKEr1+Ehq9fQq4LlAtEnAuWC0qYC7ILWJoLsgteioSvX7ILTqILngtYgA+gC2CEhK9ftAtYgA+kC2CEhK9fpguQAagLtAuaAaoLgoWvX6AB+ISvX6wLrAH8hK9fgIWvX0SID7ALWIKEr1+yC5ABugu0C5oBtguCha9foAH6hK9fuAusAf6Er1+Aha9fmgG8C4KFr1+gAfaEr1++C6wB9oSvX4CFr18qwgvECyz0DMQLMsYLyAs0ngzIC0KCD8oLRPYLzAtKzguMDkzQC4gOWNQL0gtgjISvX4AMXoqEr1/WC2CMhK9f2Ati2gveC2rcC94LbNyEr1/eC3LgC+QLdOIL5At24ISvX+QLfOYL6gt+6AvqC4AB5ISvX+oLggHsC/ALhAHuC/ALhgHohK9f8AuyAfILsoSvX8YB9AuyhK9fygHshK9fsoSvX0r4C8INTPoLyA1O8g38C1iAD/4LYISEr1+ADGKCDIYMaoQMhgxs3oSvX4YMcogMjAx0igyMDHbihK9fjAx8jgySDH6QDJIMgAHmhK9fkgyCAZQMmAyEAZYMmAyGAeqEr1+YDLIBmgyyhK9fxgGcDLKEr1/KAe6Er1+yhK9fQoIPoAxEzAyiDEqkDIwOTKYMiA5YqgyoDGCMhK9f1gxeioSvX6wMYIyEr1+uDGKwDLQMarIMtAxsyISvX7QMcrYMugx0uAy6DHbMhK9fugx8vAzADH6+DMAMgAHQhK9fwAyCAcIMxgyEAcQMxgyGAdSEr1/GDLIByAyyhK9fxgHKDLKEr1/KAdiEr1+yhK9fSs4MwA5M0AzGDk70DtIMWIAP1AxghISvX9YMYtgM3Axq2gzcDGzKhK9f3Axy3gziDHTgDOIMds6Er1/iDHzkDOgMfuYM6AyAAdKEr1/oDIIB6gzuDIQB7AzuDIYB1oSvX+4MsgHwDLKEr1/GAfIMsoSvX8oB2oSvX7KEr18u9gz4DDCMDfgMMvoM/Aw0hA38DEKCD/4MRMANgA1Kgg2MDkyaDYgOQoIPhg1Evg6IDUqKDYwOTJAOiA4yjg2QDTT+DZANQoIPkg1EwA2UDUqWDYwOTJgNhg5Wtg6aDVieDZwNYIyEr1/UDV6KhK9foA1gjISvX6INZKQNqA1mpg2oDWi0hK9fqA1qqg2uDWysDa4NbriEr1+uDXCwDbQNeLINtA16vISvX7QNfrYNug2AAbgNug2IAcCEr1+6DZYBvA2yhK9fngG+DbKEr1+uAcSEr1+yhK9fSsYNwg1MxA3IDU7yDcwOTM4NyA1Oyg3MDlDMDcwOVvoNzA5O8g3QDViAD9INYISEr1/UDWTWDdoNZtgN2g1otoSvX9oNatwN4A1s3g3gDW66hK9f4A1w4g3mDXjkDeYNer6Er1/mDX7oDewNgAHqDewNiAHChK9f7A2WAe4NsoSvX54B8A2yhK9frgHGhK9fsoSvX1D0DfYNVvoN9g1YgA/4DWCEhK9fmISvX1iAD/wNYISEr1+WhK9fQoIPgA5Evg6CDkqEDowOTI4Ohg5Wtg6IDliKDowOXoqEr1+MDmCMhK9flISvX1a2DpAOWJQOkg5gjISvX9YOXoqEr1+WDmCMhK9fmA5kmg6eDmacDp4OaJ6Er1+eDmqgDqQObKIOpA5uooSvX6QOcKYOqg54qA6qDnqmhK9fqg5+rA6wDoABrg6wDogBqoSvX7AOlgGyDrKEr1+eAbQOsoSvX64BroSvX7KEr19Yug64DmCMhK9fnISvX16KhK9fvA5gjISvX5qEr19KxA7ADkzCDsYOTvQOzA5M0A7GDk7IDswOUMoOzA5W/A7MDliAD84OYISEr1+UhK9fTvQO0g5YgA/UDmCEhK9f1g5k2A7cDmbaDtwOaKCEr1/cDmreDuIObOAO4g5upISvX+IOcOQO6A545g7oDnqohK9f6A5+6g7uDoAB7A7uDogBrISvX+4OlgHwDrKEr1+eAfIOsoSvX64BsISvX7KEr19Q9g74Dlb8DvgOWIAP+g5ghISvX5KEr19YgA/+DmCEhK9fkISvX2CEhK9fhoSvX0SID4QPWIKEr1+GD2CMhK9fjoSvX1iChK9fig9ghISvX4iEr18=", + "nodeCount": 965 }, - "com.amazonaws.s3#ListBucketInventoryConfigurations": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListBucketInventoryConfigurationsRequest" + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "region is not a valid DNS-suffix", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "a b", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "output": { - "target": "com.amazonaws.s3#ListBucketInventoryConfigurationsOutput" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns a list of inventory configurations for the bucket. You can have up to 1,000\n analytics configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated element in the response. If there are no\n more configurations to list, IsTruncated is set to false. If there are more\n configurations to list, IsTruncated is set to true, and there is a value in\n NextContinuationToken. You use the NextContinuationToken value\n to continue the pagination of the list by passing the value in continuation-token in the\n request to GET the next page.

\n

To use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration 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

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory\n

\n

The following operations are related to\n ListBucketInventoryConfigurations:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#ListBucketInventoryConfigurationsOutput": { - "type": "structure", - "members": { - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

If sent in the request, the marker that is used as a starting point for this inventory\n configuration list response.

" - } - }, - "InventoryConfigurationList": { - "target": "com.amazonaws.s3#InventoryConfigurationList", - "traits": { - "smithy.api#documentation": "

The list of inventory configurations for a bucket.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "InventoryConfiguration" - } - }, - "IsTruncated": { - "target": "com.amazonaws.s3#IsTruncated", - "traits": { - "smithy.api#documentation": "

Tells whether the returned list of inventory configurations is complete. A value of true\n indicates that the list is not complete and the NextContinuationToken is provided for a\n subsequent request.

" - } - }, - "NextContinuationToken": { - "target": "com.amazonaws.s3#NextToken", - "traits": { - "smithy.api#documentation": "

The marker used to continue this inventory configuration listing. Use the\n NextContinuationToken from this response to continue the listing in a\n subsequent request. The continuation token is an opaque value that Amazon S3 understands.

" - } - } + { + "documentation": "Invalid access point ARN: Not S3", + "expect": { + "error": "Invalid ARN: The ARN was not for the S3 service, found: not-s3" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint" + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListInventoryConfigurationsResult" - } - }, - "com.amazonaws.s3#ListBucketInventoryConfigurationsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the inventory configurations to retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

The marker used to continue an inventory configuration listing that has been truncated.\n Use the NextContinuationToken from a previously truncated list response to\n continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

", - "smithy.api#httpQuery": "continuation-token" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + { + "documentation": "Invalid access point ARN: invalid resource", + "expect": { + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListBucketMetricsConfigurations": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListBucketMetricsConfigurationsRequest" + { + "documentation": "Invalid access point ARN: invalid no ap name", + "expect": { + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:" + } }, - "output": { - "target": "com.amazonaws.s3#ListBucketMetricsConfigurationsOutput" + { + "documentation": "Invalid access point ARN: AccountId is invalid", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123456_789012`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456_789012:accesspoint:apname", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456_789012:accesspoint:apname" + } }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the metrics configurations for the bucket. The metrics configurations are only for\n the request metrics of the bucket and do not provide information on daily storage metrics.\n You can have up to 1,000 configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated element in the response. If there are no\n more configurations to list, IsTruncated is set to false. If there are more\n configurations to list, IsTruncated is set to true, and there is a value in\n NextContinuationToken. You use the NextContinuationToken value\n to continue the pagination of the list by passing the value in\n continuation-token in the request to GET the next page.

\n

To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For more information about metrics configurations and CloudWatch request metrics, see\n Monitoring Metrics with Amazon CloudWatch.

\n

The following operations are related to\n ListBucketMetricsConfigurations:

\n ", - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", - "code": 200 - } - } - }, - "com.amazonaws.s3#ListBucketMetricsConfigurationsOutput": { - "type": "structure", - "members": { - "IsTruncated": { - "target": "com.amazonaws.s3#IsTruncated", - "traits": { - "smithy.api#documentation": "

Indicates whether the returned list of metrics 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.

" - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

The marker that is used as a starting point for this metrics configuration list\n response. This value is present if it was sent in the request.

" - } - }, - "NextContinuationToken": { - "target": "com.amazonaws.s3#NextToken", - "traits": { - "smithy.api#documentation": "

The marker used to continue a metrics configuration listing that has been truncated. Use\n the NextContinuationToken from a previously truncated list response to\n continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

" - } - }, - "MetricsConfigurationList": { - "target": "com.amazonaws.s3#MetricsConfigurationList", - "traits": { - "smithy.api#documentation": "

The list of metrics configurations for a bucket.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MetricsConfiguration" - } - } + { + "documentation": "Invalid access point ARN: access point name is invalid", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `ap_name`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name" + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListMetricsConfigurationsResult" - } - }, - "com.amazonaws.s3#ListBucketMetricsConfigurationsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the metrics configurations to retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

The marker that is used to continue a metrics configuration listing that has been\n truncated. Use the NextContinuationToken from a previously truncated list\n response to continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

", - "smithy.api#httpQuery": "continuation-token" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "Access points (disable access points explicitly false)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListBuckets": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListBucketsRequest" + { + "documentation": "Access points: partition does not support FIPS", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint" + } }, - "output": { - "target": "com.amazonaws.s3#ListBucketsOutput" + { + "documentation": "Bucket region is invalid", + "expect": { + "error": "Invalid region in ARN: `us-west -2` (invalid DNS name)" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint" + } }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns a list of all buckets owned by the authenticated sender of the request. To grant IAM permission to use\n this operation, you must add the s3:ListAllMyBuckets policy action.

\n

For information about Amazon S3 buckets, see Creating, configuring, and\n working with Amazon S3 buckets.

\n \n

We strongly recommend using only paginated ListBuckets requests. Unpaginated ListBuckets requests are only supported for \n Amazon Web Services accounts set to the default general purpose bucket quota of 10,000. If you have an approved \n general purpose bucket quota above 10,000, you must send paginated ListBuckets requests to list your account\u2019s buckets. \n All unpaginated ListBuckets requests will be rejected for Amazon Web Services accounts with a general purpose bucket quota \n greater than 10,000.

\n
", - "smithy.api#examples": [ - { - "title": "To list all buckets", - "documentation": "The following example returns all the buckets owned by the sender of this request.", - "output": { - "Owner": { - "DisplayName": "own-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31" - }, - "Buckets": [ - { - "CreationDate": "2012-02-15T21:03:02.000Z", - "Name": "examplebucket" - }, - { - "CreationDate": "2011-07-24T19:33:50.000Z", - "Name": "examplebucket2" - }, - { - "CreationDate": "2010-12-17T00:56:49.000Z", - "Name": "examplebucket3" - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/?x-id=ListBuckets", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "ContinuationToken", - "outputToken": "ContinuationToken", - "items": "Buckets", - "pageSize": "MaxBuckets" + { + "documentation": "Access points when Access points explicitly disabled (used for CreateBucket)", + "expect": { + "error": "Access points are not supported for this operation" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "missing arn type", + "expect": { + "error": "Invalid ARN: `arn:aws:s3:us-west-2:123456789012:` was not a valid ARN" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:" + } + }, + { + "documentation": "SDK::Host + access point + Dualstack is an error", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "Access point ARN with FIPS & Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#ListBucketsOutput": { - "type": "structure", - "members": { - "Buckets": { - "target": "com.amazonaws.s3#Buckets", - "traits": { - "smithy.api#documentation": "

The list of buckets owned by the requester.

" - } - }, - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

The owner of the buckets listed.

" - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#NextToken", - "traits": { - "smithy.api#documentation": "

\n ContinuationToken is included in the response when there are more buckets\n that can be listed with pagination. The next ListBuckets request to Amazon S3 can\n be continued with this ContinuationToken. ContinuationToken is\n obfuscated and is not a real bucket.

" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

If Prefix was sent with the request, it is included in the response.

\n

All bucket names in the response begin with the specified bucket name prefix.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Access point ARN with Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.dualstack.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListAllMyBucketsResult" - } - }, - "com.amazonaws.s3#ListBucketsRequest": { - "type": "structure", - "members": { - "MaxBuckets": { - "target": "com.amazonaws.s3#MaxBuckets", - "traits": { - "smithy.api#documentation": "

Maximum number of buckets to be returned in response. When the number is more than the\n count of buckets that are owned by an Amazon Web Services account, return all the buckets in\n response.

", - "smithy.api#httpQuery": "max-buckets" - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken is obfuscated and is not a real\n key. You can use this ContinuationToken for pagination of the list results.

\n

Length Constraints: Minimum length of 0. Maximum length of 1024.

\n

Required: No.

\n \n

If you specify the bucket-region, prefix, or continuation-token \n query parameters without using max-buckets to set the maximum number of buckets returned in the response, \n Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

\n
", - "smithy.api#httpQuery": "continuation-token" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Limits the response to bucket names that begin with the specified bucket name\n prefix.

", - "smithy.api#httpQuery": "prefix" - } - }, - "BucketRegion": { - "target": "com.amazonaws.s3#BucketRegion", - "traits": { - "smithy.api#documentation": "

Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services\n Region must be expressed according to the Amazon Web Services Region code, such as us-west-2\n for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services\n Regions, see Regions and Endpoints.

\n \n

Requests made to a Regional endpoint that is different from the\n bucket-region parameter are not supported. For example, if you want to\n limit the response to your buckets in Region us-west-2, the request must be\n made to an endpoint in Region us-west-2.

\n
", - "smithy.api#httpQuery": "bucket-region" - } + { + "documentation": "vanilla MRAP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingRegionSet": [ + "*" + ], + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListDirectoryBuckets": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListDirectoryBucketsRequest" + { + "documentation": "MRAP does not support FIPS", + "expect": { + "error": "S3 MRAP does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } }, - "output": { - "target": "com.amazonaws.s3#ListDirectoryBucketsOutput" - }, - "traits": { - "smithy.api#documentation": "

Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the\n request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

You must have the s3express:ListAllMyDirectoryBuckets permission\n in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n \n

The BucketRegion response element is not part of the\n ListDirectoryBuckets Response Syntax.

\n
", - "smithy.api#http": { - "method": "GET", - "uri": "/?x-id=ListDirectoryBuckets", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "ContinuationToken", - "outputToken": "ContinuationToken", - "items": "Buckets", - "pageSize": "MaxDirectoryBuckets" - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#ListDirectoryBucketsOutput": { - "type": "structure", - "members": { - "Buckets": { - "target": "com.amazonaws.s3#Buckets", - "traits": { - "smithy.api#documentation": "

The list of buckets owned by the requester.

" - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#DirectoryBucketToken", - "traits": { - "smithy.api#documentation": "

If ContinuationToken was sent with the request, it is included in the\n response. You can use the returned ContinuationToken for pagination of the\n list response.

" - } - } + { + "documentation": "MRAP does not support DualStack", + "expect": { + "error": "S3 MRAP does not support dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListAllMyDirectoryBucketsResult" - } - }, - "com.amazonaws.s3#ListDirectoryBucketsRequest": { - "type": "structure", - "members": { - "ContinuationToken": { - "target": "com.amazonaws.s3#DirectoryBucketToken", - "traits": { - "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n buckets in this account with a token. ContinuationToken is obfuscated and is\n not a real bucket name. You can use this ContinuationToken for the pagination\n of the list results.

", - "smithy.api#httpQuery": "continuation-token" - } - }, - "MaxDirectoryBuckets": { - "target": "com.amazonaws.s3#MaxDirectoryBuckets", - "traits": { - "smithy.api#documentation": "

Maximum number of buckets to be returned in response. When the number is more than the\n count of buckets that are owned by an Amazon Web Services account, return all the buckets in\n response.

", - "smithy.api#httpQuery": "max-directory-buckets" - } + { + "documentation": "MRAP does not support S3 Accelerate", + "expect": { + "error": "S3 MRAP does not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "MRAP explicitly disabled", + "expect": { + "error": "Invalid configuration: Multi-Region Access Point ARNs are disabled." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::DisableMultiRegionAccessPoints": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "Dual-stack endpoint with path-style forced", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/bucketname" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucketname", + "Region": "us-west-2", + "ForcePathStyle": true, + "UseFIPS": false, + "Accelerate": false, + "UseDualStack": true + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListMultipartUploads": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListMultipartUploadsRequest" + { + "documentation": "Dual-stack endpoint + SDK::Host is error", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://abc.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucketname", + "Region": "us-west-2", + "ForcePathStyle": true, + "UseFIPS": false, + "Accelerate": false, + "UseDualStack": true, + "Endpoint": "https://abc.com" + } }, - "output": { - "target": "com.amazonaws.s3#ListMultipartUploadsOutput" + { + "documentation": "path style + ARN bucket", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

This operation lists in-progress multipart uploads in a bucket. An in-progress multipart\n upload is a multipart upload that has been initiated by the\n CreateMultipartUpload request, but has not yet been completed or\n aborted.

\n \n

\n Directory buckets - If multipart uploads in\n a directory bucket are in progress, you can't delete the bucket until all the\n in-progress multipart uploads are aborted or completed. To delete these in-progress\n multipart uploads, use the ListMultipartUploads operation to list the\n in-progress multipart uploads in the bucket and use the\n AbortMultipartUpload operation to abort all the in-progress multipart\n uploads.

\n
\n

The ListMultipartUploads operation returns a maximum of 1,000 multipart\n uploads in the response. The limit of 1,000 multipart uploads is also the default value.\n You can further limit the number of uploads in a response by specifying the\n max-uploads request parameter. If there are more than 1,000 multipart\n uploads that satisfy your ListMultipartUploads request, the response returns\n an IsTruncated element with the value of true, a\n NextKeyMarker element, and a NextUploadIdMarker element. To\n list the remaining multipart uploads, you need to make subsequent\n ListMultipartUploads requests. In these requests, include two query\n parameters: key-marker and upload-id-marker. Set the value of\n key-marker to the NextKeyMarker value from the previous\n response. Similarly, set the value of upload-id-marker to the\n NextUploadIdMarker value from the previous response.

\n \n

\n Directory buckets - The\n upload-id-marker element and the NextUploadIdMarker element\n aren't supported by directory buckets. To list the additional multipart uploads, you\n only need to set the value of key-marker to the NextKeyMarker\n value from the previous response.

\n
\n

For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n 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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Sorting of multipart uploads in response
\n
\n
    \n
  • \n

    \n General purpose bucket - In the\n ListMultipartUploads response, the multipart uploads are\n sorted based on two criteria:

    \n
      \n
    • \n

      Key-based sorting - Multipart uploads are initially sorted\n in ascending order based on their object keys.

      \n
    • \n
    • \n

      Time-based sorting - For uploads that share the same object\n key, they are further sorted in ascending order based on the upload\n initiation time. Among uploads with the same key, the one that was\n initiated first will appear before the ones that were initiated\n later.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket - In the\n ListMultipartUploads response, the multipart uploads aren't\n sorted lexicographically based on the object keys.\n \n

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to ListMultipartUploads:

\n ", - "smithy.api#examples": [ - { - "title": "List next set of multipart uploads when previous result is truncated", - "documentation": "The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads.", - "input": { - "Bucket": "examplebucket", - "KeyMarker": "nextkeyfrompreviousresponse", - "MaxUploads": 2, - "UploadIdMarker": "valuefrompreviousresponse" - }, - "output": { - "UploadIdMarker": "", - "NextKeyMarker": "someobjectkey", - "Bucket": "acl1", - "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", - "Uploads": [ - { - "Initiator": { - "DisplayName": "ownder-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Initiated": "2014-05-01T05:40:58.000Z", - "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--", - "StorageClass": "STANDARD", - "Key": "JavaFile", - "Owner": { - "DisplayName": "mohanataws", - "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - } - }, - { - "Initiator": { - "DisplayName": "ownder-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Initiated": "2014-05-01T05:41:27.000Z", - "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", - "StorageClass": "STANDARD", - "Key": "JavaFile", - "Owner": { - "DisplayName": "ownder-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - } - } - ], - "KeyMarker": "", - "MaxUploads": 2, - "IsTruncated": true - } - }, - { - "title": "To list in-progress multipart uploads on a bucket", - "documentation": "The following example lists in-progress multipart uploads on a specific bucket.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "Uploads": [ - { - "Initiator": { - "DisplayName": "display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Initiated": "2014-05-01T05:40:58.000Z", - "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--", - "StorageClass": "STANDARD", - "Key": "JavaFile", - "Owner": { - "DisplayName": "display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - } - }, - { - "Initiator": { - "DisplayName": "display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Initiated": "2014-05-01T05:41:27.000Z", - "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", - "StorageClass": "STANDARD", - "Key": "JavaFile", - "Owner": { - "DisplayName": "display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - } - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?uploads", - "code": 200 + { + "documentation": "implicit path style bucket + dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/99_ab" } - } - }, - "com.amazonaws.s3#ListMultipartUploadsOutput": { - "type": "structure", - "members": { - "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\n access point ARN or access point alias if used.

" - } - }, - "KeyMarker": { - "target": "com.amazonaws.s3#KeyMarker", - "traits": { - "smithy.api#documentation": "

The key at or after which the listing began.

" - } - }, - "UploadIdMarker": { - "target": "com.amazonaws.s3#UploadIdMarker", - "traits": { - "smithy.api#documentation": "

Together with key-marker, specifies the multipart upload after which listing should\n begin. If key-marker is not specified, the upload-id-marker parameter is ignored.\n Otherwise, any multipart uploads for a key equal to the key-marker might be included in the\n list only if they have an upload ID lexicographically greater than the specified\n upload-id-marker.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "NextKeyMarker": { - "target": "com.amazonaws.s3#NextKeyMarker", - "traits": { - "smithy.api#documentation": "

When a list is truncated, this element specifies the value that should be used for the\n key-marker request parameter in a subsequent request.

" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

When a prefix is provided in the request, this field contains the specified prefix. The\n result contains only keys starting with the specified prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
" - } - }, - "Delimiter": { - "target": "com.amazonaws.s3#Delimiter", - "traits": { - "smithy.api#documentation": "

Contains the delimiter you specified in the request. If you don't specify a delimiter in\n your request, this element is absent from the response.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

\n
" - } - }, - "NextUploadIdMarker": { - "target": "com.amazonaws.s3#NextUploadIdMarker", - "traits": { - "smithy.api#documentation": "

When a list is truncated, this element specifies the value that should be used for the\n upload-id-marker request parameter in a subsequent request.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "MaxUploads": { - "target": "com.amazonaws.s3#MaxUploads", - "traits": { - "smithy.api#documentation": "

Maximum number of multipart uploads that could have been included in the\n response.

" - } - }, - "IsTruncated": { - "target": "com.amazonaws.s3#IsTruncated", - "traits": { - "smithy.api#documentation": "

Indicates whether the returned list of multipart uploads is truncated. A value of true\n indicates that the list was truncated. The list can be truncated if the number of multipart\n uploads exceeds the limit allowed or specified by max uploads.

" - } - }, - "Uploads": { - "target": "com.amazonaws.s3#MultipartUploadList", - "traits": { - "smithy.api#documentation": "

Container for elements related to a particular multipart upload. A response can contain\n zero or more Upload elements.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Upload" - } - }, - "CommonPrefixes": { - "target": "com.amazonaws.s3#CommonPrefixList", - "traits": { - "smithy.api#documentation": "

If you specify a delimiter in the request, then the result returns each distinct key\n prefix containing the delimiter in a CommonPrefixes element. The distinct key\n prefixes are returned in the Prefix child element.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", - "smithy.api#xmlFlattened": {} - } - }, - "EncodingType": { - "target": "com.amazonaws.s3#EncodingType", - "traits": { - "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode object keys in the response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n Delimiter, KeyMarker, Prefix,\n NextKeyMarker, Key.

" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "implicit path style bucket + dualstack", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "http://abc.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "http://abc.com" + } + }, + { + "documentation": "don't allow URL injections in the bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/example.com%23" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "example.com#", + "Key": "key" + } + } + ], + "params": { + "Bucket": "example.com#", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListMultipartUploadsResult" - } - }, - "com.amazonaws.s3#ListMultipartUploadsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Delimiter": { - "target": "com.amazonaws.s3#Delimiter", - "traits": { - "smithy.api#documentation": "

Character you use to group keys.

\n

All keys that contain the same string between the prefix, if specified, and the first\n occurrence of the delimiter after the prefix are grouped under a single result element,\n CommonPrefixes. If you don't specify the prefix parameter, then the\n substring starts at the beginning of the key. The keys that are grouped under\n CommonPrefixes result element are not returned elsewhere in the\n response.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

\n
", - "smithy.api#httpQuery": "delimiter" - } - }, - "EncodingType": { - "target": "com.amazonaws.s3#EncodingType", - "traits": { - "smithy.api#httpQuery": "encoding-type" - } - }, - "KeyMarker": { - "target": "com.amazonaws.s3#KeyMarker", - "traits": { - "smithy.api#documentation": "

Specifies the multipart upload after which listing should begin.

\n \n
    \n
  • \n

    \n General purpose buckets - For\n general purpose buckets, key-marker is an object key. Together with\n upload-id-marker, this parameter specifies the multipart upload\n after which listing should begin.

    \n

    If upload-id-marker is not specified, only the keys\n lexicographically greater than the specified key-marker will be\n included in the list.

    \n

    If upload-id-marker is specified, any multipart uploads for a key\n equal to the key-marker might also be included, provided those\n multipart uploads have upload IDs lexicographically greater than the specified\n upload-id-marker.

    \n
  • \n
  • \n

    \n Directory buckets - For\n directory buckets, key-marker is obfuscated and isn't a real object\n key. The upload-id-marker parameter isn't supported by\n directory buckets. To list the additional multipart uploads, you only need to set\n the value of key-marker to the NextKeyMarker value from\n the previous response.

    \n

    In the ListMultipartUploads response, the multipart uploads aren't\n sorted lexicographically based on the object keys.\n \n

    \n
  • \n
\n
", - "smithy.api#httpQuery": "key-marker" - } - }, - "MaxUploads": { - "target": "com.amazonaws.s3#MaxUploads", - "traits": { - "smithy.api#documentation": "

Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response\n body. 1,000 is the maximum number of uploads that can be returned in a response.

", - "smithy.api#httpQuery": "max-uploads" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Lists in-progress uploads only for those keys that begin with the specified prefix. You\n can use prefixes to separate a bucket into different grouping of keys. (You can think of\n using prefix to make groups in the same way that you'd use a folder in a file\n system.)

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", - "smithy.api#httpQuery": "prefix", - "smithy.rules#contextParam": { - "name": "Prefix" - } - } - }, - "UploadIdMarker": { - "target": "com.amazonaws.s3#UploadIdMarker", - "traits": { - "smithy.api#documentation": "

Together with key-marker, specifies the multipart upload after which listing should\n begin. If key-marker is not specified, the upload-id-marker parameter is ignored.\n Otherwise, any multipart uploads for a key equal to the key-marker might be included in the\n list only if they have an upload ID lexicographically greater than the specified\n upload-id-marker.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpQuery": "upload-id-marker" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } + { + "documentation": "URI encode bucket names in the path", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket%20name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket name", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false + } + }, + { + "documentation": "scheme is respected", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab" + } + }, + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "scheme is respected (virtual addressing)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucketname.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo" + } + }, + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + implicit private link", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListObjectVersions": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListObjectVersionsRequest" + { + "documentation": "invalid Endpoint override", + "expect": { + "error": "Custom endpoint `abcde://nota#url` was not a valid URI" + }, + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "abcde://nota#url", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "output": { - "target": "com.amazonaws.s3#ListObjectVersionsOutput" + { + "documentation": "using an IPv4 address forces path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123.123.0.1/bucketname" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://123.123.0.1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "https://123.123.0.1", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns metadata about all versions of the objects in a bucket. You can also use request\n parameters as selection criteria to return metadata about a subset of all the object\n versions.

\n \n

To use this operation, you must have permission to perform the\n s3:ListBucketVersions action. Be aware of the name difference.

\n
\n \n

A 200 OK response can contain valid or invalid XML. Make sure to design\n your application to parse the contents of the response and handle it\n appropriately.

\n
\n

To use this operation, you must have READ access to the bucket.

\n

The following operations are related to ListObjectVersions:

\n ", - "smithy.api#examples": [ - { - "title": "To list object versions", - "documentation": "The following example returns versions of an object with specific key name prefix.", - "input": { - "Bucket": "examplebucket", - "Prefix": "HappyFace.jpg" - }, - "output": { - "Versions": [ - { - "LastModified": "2016-12-15T01:19:41.000Z", - "VersionId": "null", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "StorageClass": "STANDARD", - "Key": "HappyFace.jpg", - "Owner": { - "DisplayName": "owner-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "IsLatest": true, - "Size": 3191 - }, - { - "LastModified": "2016-12-13T00:58:26.000Z", - "VersionId": "PHtexPGjH2y.zBgT8LmB7wwLI2mpbz.k", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "StorageClass": "STANDARD", - "Key": "HappyFace.jpg", - "Owner": { - "DisplayName": "owner-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "IsLatest": false, - "Size": 3191 - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?versions", - "code": 200 + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion unset", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#ListObjectVersionsOutput": { - "type": "structure", - "members": { - "IsTruncated": { - "target": "com.amazonaws.s3#IsTruncated", - "traits": { - "smithy.api#documentation": "

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search\n criteria. If your results were truncated, you can make a follow-up paginated request by\n using the NextKeyMarker and NextVersionIdMarker response\n parameters as a starting place in another request to return the rest of the results.

" - } - }, - "KeyMarker": { - "target": "com.amazonaws.s3#KeyMarker", - "traits": { - "smithy.api#documentation": "

Marks the last key returned in a truncated response.

" - } - }, - "VersionIdMarker": { - "target": "com.amazonaws.s3#VersionIdMarker", - "traits": { - "smithy.api#documentation": "

Marks the last version of the key returned in a truncated response.

" - } - }, - "NextKeyMarker": { - "target": "com.amazonaws.s3#NextKeyMarker", - "traits": { - "smithy.api#documentation": "

When the number of responses exceeds the value of MaxKeys,\n NextKeyMarker specifies the first key not returned that satisfies the\n search criteria. Use this value for the key-marker request parameter in a subsequent\n request.

" - } - }, - "NextVersionIdMarker": { - "target": "com.amazonaws.s3#NextVersionIdMarker", - "traits": { - "smithy.api#documentation": "

When the number of responses exceeds the value of MaxKeys,\n NextVersionIdMarker specifies the first object version not returned that\n satisfies the search criteria. Use this value for the version-id-marker\n request parameter in a subsequent request.

" - } - }, - "Versions": { - "target": "com.amazonaws.s3#ObjectVersionList", - "traits": { - "smithy.api#documentation": "

Container for version information.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Version" - } - }, - "DeleteMarkers": { - "target": "com.amazonaws.s3#DeleteMarkers", - "traits": { - "smithy.api#documentation": "

Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "DeleteMarker" - } - }, - "Name": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Selects objects that start with the value supplied by this parameter.

" - } - }, - "Delimiter": { - "target": "com.amazonaws.s3#Delimiter", - "traits": { - "smithy.api#documentation": "

The delimiter grouping the included keys. A delimiter is a character that you specify to\n group keys. All keys that contain the same string between the prefix and the first\n occurrence of the delimiter are grouped under a single result element in\n CommonPrefixes. These groups are counted as one result against the\n max-keys limitation. These keys are not returned elsewhere in the\n response.

" - } - }, - "MaxKeys": { - "target": "com.amazonaws.s3#MaxKeys", - "traits": { - "smithy.api#documentation": "

Specifies the maximum number of objects to return.

" - } - }, - "CommonPrefixes": { - "target": "com.amazonaws.s3#CommonPrefixList", - "traits": { - "smithy.api#documentation": "

All of the keys rolled up into a common prefix count as a single return when calculating\n the number of returns.

", - "smithy.api#xmlFlattened": {} - } - }, - "EncodingType": { - "target": "com.amazonaws.s3#EncodingType", - "traits": { - "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode object key names in the XML response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListVersionsResult" - } - }, - "com.amazonaws.s3#ListObjectVersionsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name that contains the objects.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Delimiter": { - "target": "com.amazonaws.s3#Delimiter", - "traits": { - "smithy.api#documentation": "

A delimiter is a character that you specify to group keys. All keys that contain the\n same string between the prefix and the first occurrence of the delimiter are\n grouped under a single result element in CommonPrefixes. These groups are\n counted as one result against the max-keys limitation. These keys are not\n returned elsewhere in the response.

", - "smithy.api#httpQuery": "delimiter" - } - }, - "EncodingType": { - "target": "com.amazonaws.s3#EncodingType", - "traits": { - "smithy.api#httpQuery": "encoding-type" - } - }, - "KeyMarker": { - "target": "com.amazonaws.s3#KeyMarker", - "traits": { - "smithy.api#documentation": "

Specifies the key to start with when listing objects in a bucket.

", - "smithy.api#httpQuery": "key-marker" - } - }, - "MaxKeys": { - "target": "com.amazonaws.s3#MaxKeys", - "traits": { - "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain more.\n If additional keys satisfy the search criteria, but were not returned because\n max-keys was exceeded, the response contains\n true. To return the additional keys,\n see key-marker and version-id-marker.

", - "smithy.api#httpQuery": "max-keys" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Use this parameter to select only those keys that begin with the specified prefix. You\n can use prefixes to separate a bucket into different groupings of keys. (You can think of\n using prefix to make groups in the same way that you'd use a folder in a file\n system.) You can use prefix with delimiter to roll up numerous\n objects into a single result under CommonPrefixes.

", - "smithy.api#httpQuery": "prefix", - "smithy.rules#contextParam": { - "name": "Prefix" - } - } - }, - "VersionIdMarker": { - "target": "com.amazonaws.s3#VersionIdMarker", - "traits": { - "smithy.api#documentation": "

Specifies the object version you want to start listing from.

", - "smithy.api#httpQuery": "version-id-marker" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "OptionalObjectAttributes": { - "target": "com.amazonaws.s3#OptionalObjectAttributesList", - "traits": { - "smithy.api#documentation": "

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

", - "smithy.api#httpHeader": "x-amz-optional-object-attributes" - } + { + "documentation": "subdomains are not allowed in virtual buckets", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/bucket.name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket.name", + "Region": "us-east-1" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListObjects": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListObjectsRequest" + { + "documentation": "bucket names with 3 characters are allowed in virtual buckets", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://aaa.s3.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "aaa", + "Key": "key" + } + } + ], + "params": { + "Bucket": "aaa", + "Region": "us-east-1" + } }, - "output": { - "target": "com.amazonaws.s3#ListObjectsOutput" + { + "documentation": "bucket names with fewer than 3 characters are not allowed in virtual host", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/aa" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "aa", + "Key": "key" + } + } + ], + "params": { + "Bucket": "aa", + "Region": "us-east-1" + } }, - "errors": [ + { + "documentation": "bucket names with uppercase characters are not allowed in virtual host", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/BucketName" + } + }, + "operationInputs": [ { - "target": "com.amazonaws.s3#NoSuchBucket" + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "BucketName", + "Key": "key" + } + } + ], + "params": { + "Bucket": "BucketName", + "Region": "us-east-1" + } + }, + { + "documentation": "subdomains are allowed in virtual buckets on http endpoints", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://bucket.name.example.com" } - ], - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns some or all (up to 1,000) of the objects in a bucket. You can use the request\n parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK\n response can contain valid or invalid XML. Be sure to design your application to parse the\n contents of the response and handle it appropriately.

\n \n

This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility,\n Amazon S3 continues to support ListObjects.

\n
\n

The following operations are related to ListObjects:

\n ", - "smithy.api#examples": [ - { - "title": "To list objects in a bucket", - "documentation": "The following example list two objects in a bucket.", - "input": { - "Bucket": "examplebucket", - "MaxKeys": 2 - }, - "output": { - "NextMarker": "eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ==", - "Contents": [ - { - "LastModified": "2014-11-21T19:40:05.000Z", - "ETag": "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"", - "StorageClass": "STANDARD", - "Key": "example1.jpg", - "Owner": { - "DisplayName": "myname", - "ID": "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Size": 11 - }, - { - "LastModified": "2013-11-15T01:10:49.000Z", - "ETag": "\"9c8af9a76df052144598c115ef33e511\"", - "StorageClass": "STANDARD", - "Key": "example2.jpg", - "Owner": { - "DisplayName": "myname", - "ID": "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Size": 713193 - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}", - "code": 200 + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "http://example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket.name", + "Region": "us-east-1", + "Endpoint": "http://example.com" + } + }, + { + "documentation": "no region set", + "expect": { + "error": "A region must be set when sending requests to S3." + }, + "params": { + "Bucket": "bucket-name" + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" } - } - }, - "com.amazonaws.s3#ListObjectsOutput": { - "type": "structure", - "members": { - "IsTruncated": { - "target": "com.amazonaws.s3#IsTruncated", - "traits": { - "smithy.api#documentation": "

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search\n criteria.

" - } - }, - "Marker": { - "target": "com.amazonaws.s3#Marker", - "traits": { - "smithy.api#documentation": "

Indicates where in the bucket listing begins. Marker is included in the response if it\n was sent with the request.

" - } - }, - "NextMarker": { - "target": "com.amazonaws.s3#NextMarker", - "traits": { - "smithy.api#documentation": "

When the response is truncated (the IsTruncated element value in the\n response is true), you can use the key name in this field as the\n marker parameter in the subsequent request to get the next set of objects.\n Amazon S3 lists objects in alphabetical order.

\n \n

This element is returned only if you have the delimiter request\n parameter specified. If the response does not include the NextMarker\n element and it is truncated, you can use the value of the last Key element\n in the response as the marker parameter in the subsequent request to get\n the next set of object keys.

\n
" - } - }, - "Contents": { - "target": "com.amazonaws.s3#ObjectList", - "traits": { - "smithy.api#documentation": "

Metadata about each object returned.

", - "smithy.api#xmlFlattened": {} - } - }, - "Name": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Keys that begin with the indicated prefix.

" - } - }, - "Delimiter": { - "target": "com.amazonaws.s3#Delimiter", - "traits": { - "smithy.api#documentation": "

Causes keys that contain the same string between the prefix and the first occurrence of\n the delimiter to be rolled up into a single result element in the\n CommonPrefixes collection. These rolled-up keys are not returned elsewhere\n in the response. Each rolled-up result counts as only one return against the\n MaxKeys value.

" - } - }, - "MaxKeys": { - "target": "com.amazonaws.s3#MaxKeys", - "traits": { - "smithy.api#documentation": "

The maximum number of keys returned in the response body.

" - } - }, - "CommonPrefixes": { - "target": "com.amazonaws.s3#CommonPrefixList", - "traits": { - "smithy.api#documentation": "

All of the keys (up to 1,000) rolled up in a common prefix count as a single return when\n calculating the number of returns.

\n

A response can contain CommonPrefixes only if you specify a\n delimiter.

\n

\n CommonPrefixes contains all (if there are any) keys between\n Prefix and the next occurrence of the string specified by the\n delimiter.

\n

\n CommonPrefixes lists keys that act like subdirectories in the directory\n specified by Prefix.

\n

For example, if the prefix is notes/ and the delimiter is a slash\n (/), as in notes/summer/july, the common prefix is\n notes/summer/. All of the keys that roll up into a common prefix count as a\n single return when calculating the number of returns.

", - "smithy.api#xmlFlattened": {} - } - }, - "EncodingType": { - "target": "com.amazonaws.s3#EncodingType", - "traits": { - "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-west-2 uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-west-2", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListBucketResult" - } - }, - "com.amazonaws.s3#ListObjectsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket containing the objects.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Delimiter": { - "target": "com.amazonaws.s3#Delimiter", - "traits": { - "smithy.api#documentation": "

A delimiter is a character that you use to group keys.

", - "smithy.api#httpQuery": "delimiter" - } - }, - "EncodingType": { - "target": "com.amazonaws.s3#EncodingType", - "traits": { - "smithy.api#httpQuery": "encoding-type" - } - }, - "Marker": { - "target": "com.amazonaws.s3#Marker", - "traits": { - "smithy.api#documentation": "

Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this\n specified key. Marker can be any key in the bucket.

", - "smithy.api#httpQuery": "marker" - } - }, - "MaxKeys": { - "target": "com.amazonaws.s3#MaxKeys", - "traits": { - "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain more.\n

", - "smithy.api#httpQuery": "max-keys" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Limits the response to keys that begin with the specified prefix.

", - "smithy.api#httpQuery": "prefix", - "smithy.rules#contextParam": { - "name": "Prefix" - } - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#documentation": "

Confirms that the requester knows that she or he will be charged for the list objects\n request. Bucket owners need not specify this parameter in their requests.

", - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "OptionalObjectAttributes": { - "target": "com.amazonaws.s3#OptionalObjectAttributesList", - "traits": { - "smithy.api#documentation": "

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

", - "smithy.api#httpHeader": "x-amz-optional-object-attributes" - } + { + "documentation": "UseGlobalEndpoints=true, region=cn-north-1 uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "cn-north-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListObjectsV2": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListObjectsV2Request" + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, fips=true uses the regional endpoint with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } }, - "output": { - "target": "com.amazonaws.s3#ListObjectsV2Output" + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, dualstack=true uses the regional endpoint with dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } }, - "errors": [ + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, dualstack and fips uses the regional endpoint with fips/dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ { - "target": "com.amazonaws.s3#NoSuchBucket" + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" } - ], - "traits": { - "smithy.api#documentation": "

Returns some or all (up to 1,000) of the objects in a bucket with each request. You can\n use the request parameters as selection criteria to return a subset of the objects in a\n bucket. A 200 OK response can contain valid or invalid XML. Make sure to\n design your application to parse the contents of the response and handle it appropriately.\n For more information about listing objects, see Listing object keys\n programmatically in the Amazon S3 User Guide. To get a list of\n your buckets, see ListBuckets.

\n \n
    \n
  • \n

    \n General purpose bucket - For general purpose buckets,\n ListObjectsV2 doesn't return prefixes that are related only to\n in-progress multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets - For\n directory buckets, ListObjectsV2 response includes the prefixes that\n are related only to in-progress multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n use this operation, you must have READ access to the bucket. You must have\n permission to perform the s3:ListBucket action. The bucket\n owner has this permission by default and can grant this permission to\n others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access\n Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Sorting order of returned objects
\n
\n
    \n
  • \n

    \n General purpose bucket - For\n general purpose buckets, ListObjectsV2 returns objects in\n lexicographical order based on their key names.

    \n
  • \n
  • \n

    \n Directory bucket - For\n directory buckets, ListObjectsV2 does not return objects in\n lexicographical order.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n \n

This section describes the latest revision of this action. We recommend that you use\n this revised API operation for application development. For backward compatibility, Amazon S3\n continues to support the prior version of this API operation, ListObjects.

\n
\n

The following operations are related to ListObjectsV2:

\n ", - "smithy.api#examples": [ - { - "title": "To get object list", - "documentation": "The following example retrieves object list. The request specifies max keys to limit response to include only 2 object keys. ", - "input": { - "Bucket": "DOC-EXAMPLE-BUCKET", - "MaxKeys": 2 - }, - "output": { - "Name": "DOC-EXAMPLE-BUCKET", - "MaxKeys": 2, - "Prefix": "", - "KeyCount": 2, - "NextContinuationToken": "1w41l63U0xa8q7smH50vCxyTQqdxo69O3EmK28Bi5PcROI4wI/EyIJg==", - "IsTruncated": true, - "Contents": [ - { - "LastModified": "2014-11-21T19:40:05.000Z", - "ETag": "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"", - "StorageClass": "STANDARD", - "Key": "happyface.jpg", - "Size": 11 - }, - { - "LastModified": "2014-05-02T04:51:50.000Z", - "ETag": "\"becf17f89c30367a9a44495d62ed521a-1\"", - "StorageClass": "STANDARD", - "Key": "test.jpg", - "Size": 4192256 - } - ] - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}?list-type=2", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "ContinuationToken", - "outputToken": "NextContinuationToken", - "pageSize": "MaxKeys" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-west-2 with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" } - } - }, - "com.amazonaws.s3#ListObjectsV2Output": { - "type": "structure", - "members": { - "IsTruncated": { - "target": "com.amazonaws.s3#IsTruncated", - "traits": { - "smithy.api#documentation": "

Set to false if all of the results were returned. Set to true\n if more keys are available to return. If the number of results exceeds that specified by\n MaxKeys, all of the results might not be returned.

" - } - }, - "Contents": { - "target": "com.amazonaws.s3#ObjectList", - "traits": { - "smithy.api#documentation": "

Metadata about each object returned.

", - "smithy.api#xmlFlattened": {} - } - }, - "Name": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Keys that begin with the indicated prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
" - } - }, - "Delimiter": { - "target": "com.amazonaws.s3#Delimiter", - "traits": { - "smithy.api#documentation": "

Causes keys that contain the same string between the prefix and the first\n occurrence of the delimiter to be rolled up into a single result element in the\n CommonPrefixes collection. These rolled-up keys are not returned elsewhere\n in the response. Each rolled-up result counts as only one return against the\n MaxKeys value.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

\n
" - } - }, - "MaxKeys": { - "target": "com.amazonaws.s3#MaxKeys", - "traits": { - "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain\n more.

" - } - }, - "CommonPrefixes": { - "target": "com.amazonaws.s3#CommonPrefixList", - "traits": { - "smithy.api#documentation": "

All of the keys (up to 1,000) that share the same prefix are grouped together. When\n counting the total numbers of returns by this API operation, this group of keys is\n considered as one item.

\n

A response can contain CommonPrefixes only if you specify a\n delimiter.

\n

\n CommonPrefixes contains all (if there are any) keys between\n Prefix and the next occurrence of the string specified by a\n delimiter.

\n

\n CommonPrefixes lists keys that act like subdirectories in the directory\n specified by Prefix.

\n

For example, if the prefix is notes/ and the delimiter is a slash\n (/) as in notes/summer/july, the common prefix is\n notes/summer/. All of the keys that roll up into a common prefix count as a\n single return when calculating the number of returns.

\n \n
    \n
  • \n

    \n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    \n
  • \n
  • \n

    \n Directory buckets - When you query\n ListObjectsV2 with a delimiter during in-progress multipart\n uploads, the CommonPrefixes response parameter contains the prefixes\n that are associated with the in-progress multipart uploads. For more information\n about multipart uploads, see Multipart Upload Overview in\n the Amazon S3 User Guide.

    \n
  • \n
\n
", - "smithy.api#xmlFlattened": {} - } - }, - "EncodingType": { - "target": "com.amazonaws.s3#EncodingType", - "traits": { - "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode object key names in the XML response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n Delimiter, Prefix, Key, and StartAfter.

" - } - }, - "KeyCount": { - "target": "com.amazonaws.s3#KeyCount", - "traits": { - "smithy.api#documentation": "

\n KeyCount is the number of keys returned with this request.\n KeyCount will always be less than or equal to the MaxKeys\n field. For example, if you ask for 50 keys, your result will include 50 keys or\n fewer.

" - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

If ContinuationToken was sent with the request, it is included in the\n response. You can use the returned ContinuationToken for pagination of the\n list response. You can use this ContinuationToken for pagination of the list\n results.

" - } - }, - "NextContinuationToken": { - "target": "com.amazonaws.s3#NextToken", - "traits": { - "smithy.api#documentation": "

\n NextContinuationToken is sent when isTruncated is true, which\n means there are more keys in the bucket that can be listed. The next list requests to Amazon S3\n can be continued with this NextContinuationToken.\n NextContinuationToken is obfuscated and is not a real key

" - } - }, - "StartAfter": { - "target": "com.amazonaws.s3#StartAfter", - "traits": { - "smithy.api#documentation": "

If StartAfter was sent with the request, it is included in the response.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-west-2", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 with accelerate on non bucket case uses the global endpoint and ignores accelerate", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with fips uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListBucketResult" - } - }, - "com.amazonaws.s3#ListObjectsV2Request": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Delimiter": { - "target": "com.amazonaws.s3#Delimiter", - "traits": { - "smithy.api#documentation": "

A delimiter is a character that you use to group keys.

\n \n
    \n
  • \n

    \n Directory buckets - For directory buckets, / is the only supported delimiter.

    \n
  • \n
  • \n

    \n Directory buckets - When you query\n ListObjectsV2 with a delimiter during in-progress multipart\n uploads, the CommonPrefixes response parameter contains the prefixes\n that are associated with the in-progress multipart uploads. For more information\n about multipart uploads, see Multipart Upload Overview in\n the Amazon S3 User Guide.

    \n
  • \n
\n
", - "smithy.api#httpQuery": "delimiter" - } - }, - "EncodingType": { - "target": "com.amazonaws.s3#EncodingType", - "traits": { - "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
", - "smithy.api#httpQuery": "encoding-type" - } - }, - "MaxKeys": { - "target": "com.amazonaws.s3#MaxKeys", - "traits": { - "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain\n more.

", - "smithy.api#httpQuery": "max-keys" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

Limits the response to keys that begin with the specified prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", - "smithy.api#httpQuery": "prefix", - "smithy.rules#contextParam": { - "name": "Prefix" - } - } - }, - "ContinuationToken": { - "target": "com.amazonaws.s3#Token", - "traits": { - "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken is obfuscated and is not a real\n key. You can use this ContinuationToken for pagination of the list results.\n

", - "smithy.api#httpQuery": "continuation-token" - } - }, - "FetchOwner": { - "target": "com.amazonaws.s3#FetchOwner", - "traits": { - "smithy.api#documentation": "

The owner field is not present in ListObjectsV2 by default. If you want to\n return the owner field with each key in the result, then set the FetchOwner\n field to true.

\n \n

\n Directory buckets - For directory buckets,\n the bucket owner is returned as the object owner for all objects.

\n
", - "smithy.api#httpQuery": "fetch-owner" - } - }, - "StartAfter": { - "target": "com.amazonaws.s3#StartAfter", - "traits": { - "smithy.api#documentation": "

StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this\n specified key. StartAfter can be any key in the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpQuery": "start-after" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#documentation": "

Confirms that the requester knows that she or he will be charged for the list objects\n request in V2 style. Bucket owners need not specify this parameter in their\n requests.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "OptionalObjectAttributes": { - "target": "com.amazonaws.s3#OptionalObjectAttributesList", - "traits": { - "smithy.api#documentation": "

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-optional-object-attributes" - } + { + "documentation": "aws-global region with dualstack uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#ListParts": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#ListPartsRequest" + { + "documentation": "aws-global region with fips and dualstack uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } }, - "output": { - "target": "com.amazonaws.s3#ListPartsOutput" + { + "documentation": "aws-global region with accelerate on non-bucket case, uses global endpoint and ignores accelerate", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::Accelerate": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } }, - "traits": { - "smithy.api#documentation": "

Lists the parts that have been uploaded for a specific multipart upload.

\n

To use this operation, you must provide the upload ID in the request. You\n obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

\n

The ListParts request returns a maximum of 1,000 uploaded parts. The limit\n of 1,000 parts is also the default value. You can restrict the number of parts in a\n response by specifying the max-parts request parameter. If your multipart\n upload consists of more than 1,000 parts, the response returns an IsTruncated\n field with the value of true, and a NextPartNumberMarker element.\n To list remaining uploaded parts, in subsequent ListParts requests, include\n the part-number-marker query string parameter and set its value to the\n NextPartNumberMarker field value from the previous response.

\n

For more information on multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n

    If the upload was created using server-side encryption with Key Management Service\n (KMS) keys (SSE-KMS) or dual-layer server-side encryption with\n Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the\n kms:Decrypt action for the ListParts request to\n succeed.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to ListParts:

\n ", - "smithy.api#examples": [ - { - "title": "To list parts of a multipart upload.", - "documentation": "The following example lists parts uploaded for a specific multipart upload.", - "input": { - "Bucket": "examplebucket", - "Key": "bigobject", - "UploadId": "example7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" - }, - "output": { - "Owner": { - "DisplayName": "owner-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Initiator": { - "DisplayName": "owner-display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - }, - "Parts": [ - { - "LastModified": "2016-12-16T00:11:42.000Z", - "PartNumber": 1, - "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", - "Size": 26246026 - }, - { - "LastModified": "2016-12-16T00:15:01.000Z", - "PartNumber": 2, - "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", - "Size": 26246026 - } - ], - "StorageClass": "STANDARD" - } - } - ], - "smithy.api#http": { - "method": "GET", - "uri": "/{Bucket}/{Key+}?x-id=ListParts", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "PartNumberMarker", - "outputToken": "NextPartNumberMarker", - "items": "Parts", - "pageSize": "MaxParts" + { + "documentation": "aws-global region with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" } - } - }, - "com.amazonaws.s3#ListPartsOutput": { - "type": "structure", - "members": { - "AbortDate": { - "target": "com.amazonaws.s3#AbortDate", - "traits": { - "smithy.api#documentation": "

If the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, then the response includes this header indicating when the initiated multipart\n upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.

\n

The response will also include the x-amz-abort-rule-id header that will\n provide the ID of the lifecycle configuration rule that defines this action.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-abort-date" - } - }, - "AbortRuleId": { - "target": "com.amazonaws.s3#AbortRuleId", - "traits": { - "smithy.api#documentation": "

This header is returned along with the x-amz-abort-date header. It\n identifies applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-abort-rule-id" - } - }, - "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\n access point ARN or access point alias if used.

" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

" - } - }, - "UploadId": { - "target": "com.amazonaws.s3#MultipartUploadId", - "traits": { - "smithy.api#documentation": "

Upload ID identifying the multipart upload whose parts are being listed.

" - } - }, - "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.

" - } - }, - "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 part-number-marker request parameter in a subsequent\n request.

" - } - }, - "MaxParts": { - "target": "com.amazonaws.s3#MaxParts", - "traits": { - "smithy.api#documentation": "

Maximum number of parts that were allowed in the response.

" - } - }, - "IsTruncated": { - "target": "com.amazonaws.s3#IsTruncated", - "traits": { - "smithy.api#documentation": "

Indicates whether the returned list of parts is truncated. A true value indicates that\n the list was truncated. A list can be truncated if the number of parts exceeds the limit\n returned in the MaxParts element.

" - } - }, - "Parts": { - "target": "com.amazonaws.s3#Parts", - "traits": { - "smithy.api#documentation": "

Container for elements related to a particular part. A response can contain zero or more\n Part elements.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Part" - } - }, - "Initiator": { - "target": "com.amazonaws.s3#Initiator", - "traits": { - "smithy.api#documentation": "

Container element that identifies who initiated the multipart upload. If the initiator\n is an Amazon Web Services account, this element provides the same information as the Owner\n element. If the initiator is an IAM User, this element provides the user ARN and display\n name.

" - } - }, - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

Container element that identifies the object owner, after the object is created. If\n multipart upload is initiated by an IAM user, this element provides the parent account ID\n and display name.

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner for all the parts.

\n
" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "smithy.api#documentation": "

The class of storage used to store the uploaded object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "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.

" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in\n CreateMultipartUpload request. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com" + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListPartsResult" - } - }, - "com.amazonaws.s3#ListPartsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket to which the parts are being uploaded.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "MaxParts": { - "target": "com.amazonaws.s3#MaxParts", - "traits": { - "smithy.api#documentation": "

Sets the maximum number of parts to return.

", - "smithy.api#httpQuery": "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#httpQuery": "part-number-marker" - } - }, - "UploadId": { - "target": "com.amazonaws.s3#MultipartUploadId", - "traits": { - "smithy.api#documentation": "

Upload ID identifying the multipart upload whose parts are being listed.

", - "smithy.api#httpQuery": "uploadId", - "smithy.api#required": {} - } - }, - "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 account ID that you provide does not match the actual owner of the bucket, 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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } + { + "documentation": "virtual addressing, aws-global region with Prefix, and Key uses the global endpoint. Prefix and Key parameters should not be used in endpoint evaluation.", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "ListObjects", + "operationParams": { + "Bucket": "bucket-name", + "Prefix": "prefix" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Prefix": "prefix", + "Key": "key" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#Location": { - "type": "string" - }, - "com.amazonaws.s3#LocationInfo": { - "type": "structure", - "members": { - "Type": { - "target": "com.amazonaws.s3#LocationType", - "traits": { - "smithy.api#documentation": "

The type of location where the bucket will be created.

" - } - }, - "Name": { - "target": "com.amazonaws.s3#LocationNameAsString", - "traits": { - "smithy.api#documentation": "

The name of the location where the bucket will be created.

\n

For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

" - } + { + "documentation": "virtual addressing, aws-global region with Copy Source, and Key uses the global endpoint. Copy Source and Key parameters should not be used in endpoint evaluation.", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "CopySource": "/copy/source", + "Key": "key" + } + }, + { + "documentation": "virtual addressing, aws-global region with fips uses the regional fips endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#documentation": "

Specifies the location where the bucket will be created.

\n

For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see \n Working with directory buckets in the Amazon S3 User Guide.

\n \n

This functionality is only supported by directory buckets.

\n
" - } - }, - "com.amazonaws.s3#LocationNameAsString": { - "type": "string" - }, - "com.amazonaws.s3#LocationPrefix": { - "type": "string" - }, - "com.amazonaws.s3#LocationType": { - "type": "enum", - "members": { - "AvailabilityZone": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AvailabilityZone" - } - }, - "LocalZone": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LocalZone" - } + { + "documentation": "virtual addressing, aws-global region with dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-east-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#LoggingEnabled": { - "type": "structure", - "members": { - "TargetBucket": { - "target": "com.amazonaws.s3#TargetBucket", - "traits": { - "smithy.api#documentation": "

Specifies the bucket where you want Amazon S3 to store server access logs. You can have your\n logs delivered to any bucket that you own, including the same bucket that is being logged.\n You can also configure multiple buckets to deliver their logs to the same target bucket. In\n this case, you should choose a different TargetPrefix for each source bucket\n so that the delivered log files can be distinguished by key.

", - "smithy.api#required": {} - } - }, - "TargetGrants": { - "target": "com.amazonaws.s3#TargetGrants", - "traits": { - "smithy.api#documentation": "

Container for granting information.

\n

Buckets that use the bucket owner enforced setting for Object Ownership don't support\n target grants. For more information, see Permissions for server access log delivery in the\n Amazon S3 User Guide.

" - } - }, - "TargetPrefix": { - "target": "com.amazonaws.s3#TargetPrefix", - "traits": { - "smithy.api#documentation": "

A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a\n single bucket, you can use a prefix to distinguish which log files came from which\n bucket.

", - "smithy.api#required": {} - } - }, - "TargetObjectKeyFormat": { - "target": "com.amazonaws.s3#TargetObjectKeyFormat", - "traits": { - "smithy.api#documentation": "

Amazon S3 key format for log objects.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with fips/dualstack uses the regional fips/dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } }, - "traits": { - "smithy.api#documentation": "

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys\n for a bucket. For more information, see PUT Bucket logging in the\n Amazon S3 API Reference.

" - } - }, - "com.amazonaws.s3#MFA": { - "type": "string" - }, - "com.amazonaws.s3#MFADelete": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } + { + "documentation": "virtual addressing, aws-global region with accelerate uses the global accelerate endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" } - } - }, - "com.amazonaws.s3#MFADeleteStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "virtual addressing, aws-global region with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.example.com" } - } - }, - "com.amazonaws.s3#Marker": { - "type": "string" - }, - "com.amazonaws.s3#MaxAgeSeconds": { - "type": "integer" - }, - "com.amazonaws.s3#MaxBuckets": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 1, - "max": 10000 + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" } - } - }, - "com.amazonaws.s3#MaxDirectoryBuckets": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 0, - "max": 1000 + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-west-2 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#MaxKeys": { - "type": "integer" - }, - "com.amazonaws.s3#MaxParts": { - "type": "integer" - }, - "com.amazonaws.s3#MaxUploads": { - "type": "integer" - }, - "com.amazonaws.s3#Message": { - "type": "string" - }, - "com.amazonaws.s3#Metadata": { - "type": "map", - "key": { - "target": "com.amazonaws.s3#MetadataKey" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "value": { - "target": "com.amazonaws.s3#MetadataValue" - } - }, - "com.amazonaws.s3#MetadataDirective": { - "type": "enum", - "members": { - "COPY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COPY" - } - }, - "REPLACE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "REPLACE" - } + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and fips uses the regional fips endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-east-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#MetadataEntry": { - "type": "structure", - "members": { - "Name": { - "target": "com.amazonaws.s3#MetadataKey", - "traits": { - "smithy.api#documentation": "

Name of the object.

" - } - }, - "Value": { - "target": "com.amazonaws.s3#MetadataValue", - "traits": { - "smithy.api#documentation": "

Value of the object.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } }, - "traits": { - "smithy.api#documentation": "

A metadata key-value pair to store with an object.

" - } - }, - "com.amazonaws.s3#MetadataKey": { - "type": "string" - }, - "com.amazonaws.s3#MetadataTableConfiguration": { - "type": "structure", - "members": { - "S3TablesDestination": { - "target": "com.amazonaws.s3#S3TablesDestination", - "traits": { - "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", - "smithy.api#required": {} - } + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and accelerate uses the global accelerate endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } }, - "traits": { - "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

" - } - }, - "com.amazonaws.s3#MetadataTableConfigurationResult": { - "type": "structure", - "members": { - "S3TablesDestinationResult": { - "target": "com.amazonaws.s3#S3TablesDestinationResult", - "traits": { - "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", - "smithy.api#required": {} - } + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.example.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket. \n

" - } - }, - "com.amazonaws.s3#MetadataTableStatus": { - "type": "string" - }, - "com.amazonaws.s3#MetadataValue": { - "type": "string" - }, - "com.amazonaws.s3#Metrics": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#MetricsStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether the replication metrics are enabled.

", - "smithy.api#required": {} - } - }, - "EventThreshold": { - "target": "com.amazonaws.s3#ReplicationTimeValue", - "traits": { - "smithy.api#documentation": "

A container specifying the time threshold for emitting the\n s3:Replication:OperationMissedThreshold event.

" - } + { + "documentation": "ForcePathStyle, aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region with fips is invalid", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket-name" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region with dualstack uses regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region custom endpoint uses the custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#documentation": "

A container specifying replication metrics-related settings enabling replication\n metrics and events.

" - } - }, - "com.amazonaws.s3#MetricsAndOperator": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

The prefix used when evaluating an AND predicate.

" - } - }, - "Tags": { - "target": "com.amazonaws.s3#TagSet", - "traits": { - "smithy.api#documentation": "

The list of tags used when evaluating an AND predicate.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - }, - "AccessPointArn": { - "target": "com.amazonaws.s3#AccessPointArn", - "traits": { - "smithy.api#documentation": "

The access point ARN used when evaluating an AND predicate.

" - } + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-west-2 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

" - } - }, - "com.amazonaws.s3#MetricsConfiguration": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.s3#MetricsId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", - "smithy.api#required": {} - } - }, - "Filter": { - "target": "com.amazonaws.s3#MetricsFilter", - "traits": { - "smithy.api#documentation": "

Specifies a metrics configuration filter. The metrics configuration will only include\n objects that meet the filter's criteria. A filter must be a prefix, an object tag, an\n access point ARN, or a conjunction (MetricsAndOperator).

" - } + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region, dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } }, - "traits": { - "smithy.api#documentation": "

Specifies a metrics configuration for the CloudWatch request metrics (specified by the\n metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics\n configuration, note that this is a full replacement of the existing metrics configuration.\n If you don't include the elements you want to keep, they are erased. For more information,\n see PutBucketMetricsConfiguration.

" - } - }, - "com.amazonaws.s3#MetricsConfigurationList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#MetricsConfiguration" - } - }, - "com.amazonaws.s3#MetricsFilter": { - "type": "union", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

The prefix used when evaluating a metrics filter.

" - } - }, - "Tag": { - "target": "com.amazonaws.s3#Tag", - "traits": { - "smithy.api#documentation": "

The tag used when evaluating a metrics filter.

" - } - }, - "AccessPointArn": { - "target": "com.amazonaws.s3#AccessPointArn", - "traits": { - "smithy.api#documentation": "

The access point ARN used when evaluating a metrics filter.

" - } - }, - "And": { - "target": "com.amazonaws.s3#MetricsAndOperator", - "traits": { - "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

" - } + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region custom endpoint uses the custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#documentation": "

Specifies a metrics configuration filter. The metrics configuration only includes\n objects that meet the filter's criteria. A filter must be a prefix, an object tag, an\n access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

" - } - }, - "com.amazonaws.s3#MetricsId": { - "type": "string" - }, - "com.amazonaws.s3#MetricsStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } + { + "documentation": "ARN with aws-global region and UseArnRegion uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#Minutes": { - "type": "integer" - }, - "com.amazonaws.s3#MissingMeta": { - "type": "integer" - }, - "com.amazonaws.s3#MpuObjectSize": { - "type": "long" - }, - "com.amazonaws.s3#MultipartUpload": { - "type": "structure", - "members": { - "UploadId": { - "target": "com.amazonaws.s3#MultipartUploadId", - "traits": { - "smithy.api#documentation": "

Upload ID that identifies the multipart upload.

" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Key of the object for which the multipart upload was initiated.

" - } - }, - "Initiated": { - "target": "com.amazonaws.s3#Initiated", - "traits": { - "smithy.api#documentation": "

Date and time at which the multipart upload was initiated.

" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "smithy.api#documentation": "

The class of storage used to store the object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" - } - }, - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

Specifies the owner of the object that is part of the multipart upload.

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner for all the objects.

\n
" - } - }, - "Initiator": { - "target": "com.amazonaws.s3#Initiator", - "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.

" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseArnRegion": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "cross partition MRAP ARN is an error", + "expect": { + "error": "Client was configured for partition `aws` but bucket referred to partition `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-west-1" + } + }, + { + "documentation": "Endpoint override, accesspoint with HTTP, port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://myendpoint-123456789012.beta.example.com:1234" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://beta.example.com:1234" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Endpoint": "http://beta.example.com:1234", + "Region": "us-west-2", + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } }, - "traits": { - "smithy.api#documentation": "

Container for the MultipartUpload for the Amazon S3 object.

" - } - }, - "com.amazonaws.s3#MultipartUploadId": { - "type": "string" - }, - "com.amazonaws.s3#MultipartUploadList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#MultipartUpload" - } - }, - "com.amazonaws.s3#NextKeyMarker": { - "type": "string" - }, - "com.amazonaws.s3#NextMarker": { - "type": "string" - }, - "com.amazonaws.s3#NextPartNumberMarker": { - "type": "string" - }, - "com.amazonaws.s3#NextToken": { - "type": "string" - }, - "com.amazonaws.s3#NextUploadIdMarker": { - "type": "string" - }, - "com.amazonaws.s3#NextVersionIdMarker": { - "type": "string" - }, - "com.amazonaws.s3#NoSuchBucket": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The specified bucket does not exist.

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.s3#NoSuchKey": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The specified key does not exist.

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.s3#NoSuchUpload": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The specified multipart upload does not exist.

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.s3#NoncurrentVersionExpiration": { - "type": "structure", - "members": { - "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. The value must be a non-zero positive integer. For information about the\n noncurrent days calculations, see How\n Amazon S3 Calculates When an Object Became Noncurrent in the\n Amazon S3 User Guide.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" - } - }, - "NewerNoncurrentVersions": { - "target": "com.amazonaws.s3#VersionCount", - "traits": { - "smithy.api#documentation": "

Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100\n noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent\n versions beyond the specified number to retain. For more information about noncurrent\n versions, see Lifecycle configuration\n elements in the Amazon S3 User Guide.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" - } + { + "documentation": "Endpoint override, accesspoint with http, path, query, and port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://myendpoint-123456789012.beta.example.com:1234/path" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "non-bucket endpoint override with FIPS = error", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "FIPS + dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "custom endpoint without FIPS/dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://beta.example.com:1234/path" } + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": false + } }, - "traits": { - "smithy.api#documentation": "

Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently\n deletes the noncurrent object versions. You set this lifecycle configuration action on a\n bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent\n object versions at a specific period in the object's lifetime.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" - } - }, - "com.amazonaws.s3#NoncurrentVersionTransition": { - "type": "structure", - "members": { - "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 How Long an Object Has Been Noncurrent in the\n Amazon S3 User Guide.

" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#TransitionStorageClass", - "traits": { - "smithy.api#documentation": "

The class of storage used to store the object.

" - } - }, - "NewerNoncurrentVersions": { - "target": "com.amazonaws.s3#VersionCount", - "traits": { - "smithy.api#documentation": "

Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before\n transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will\n transition any additional noncurrent versions beyond the specified number to retain. For\n more information about noncurrent versions, see Lifecycle configuration\n elements in the Amazon S3 User Guide.

" - } + { + "documentation": "s3 object lambda with access points disabled", + "expect": { + "error": "Access points are not supported for this operation" + }, + "params": { + "Region": "us-west-2", + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:myendpoint", + "DisableAccessPoints": true + } + }, + { + "documentation": "non bucket + FIPS", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-west-2.amazonaws.com" } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } }, - "traits": { - "smithy.api#documentation": "

Container for the transition rule that describes when noncurrent objects transition to\n the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,\n GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage\n class. If your bucket is versioning-enabled (or versioning is suspended), you can set this\n action to request that Amazon S3 transition noncurrent object versions to the\n STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,\n GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage\n class at a specific period in the object's lifetime.

" - } - }, - "com.amazonaws.s3#NoncurrentVersionTransitionList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#NoncurrentVersionTransition" - } - }, - "com.amazonaws.s3#NotFound": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The specified content does not exist.

", - "smithy.api#error": "client" - } - }, - "com.amazonaws.s3#NotificationConfiguration": { - "type": "structure", - "members": { - "TopicConfigurations": { - "target": "com.amazonaws.s3#TopicConfigurationList", - "traits": { - "smithy.api#documentation": "

The topic to which notifications are sent and the events for which notifications are\n generated.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "TopicConfiguration" - } - }, - "QueueConfigurations": { - "target": "com.amazonaws.s3#QueueConfigurationList", - "traits": { - "smithy.api#documentation": "

The Amazon Simple Queue Service queues to publish messages to and the events for which\n to publish messages.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "QueueConfiguration" - } - }, - "LambdaFunctionConfigurations": { - "target": "com.amazonaws.s3#LambdaFunctionConfigurationList", - "traits": { - "smithy.api#documentation": "

Describes the Lambda functions to invoke and the events for which to invoke\n them.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "CloudFunctionConfiguration" - } - }, - "EventBridgeConfiguration": { - "target": "com.amazonaws.s3#EventBridgeConfiguration", - "traits": { - "smithy.api#documentation": "

Enables delivery of events to Amazon EventBridge.

" - } + { + "documentation": "standard non bucket endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com" } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } }, - "traits": { - "smithy.api#documentation": "

A container for specifying the notification configuration of the bucket. If this element\n is empty, notifications are turned off for the bucket.

" - } - }, - "com.amazonaws.s3#NotificationConfigurationFilter": { - "type": "structure", - "members": { - "Key": { - "target": "com.amazonaws.s3#S3KeyFilter", - "traits": { - "smithy.api#xmlName": "S3Key" - } + { + "documentation": "non bucket endpoint with FIPS + Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-west-2.amazonaws.com" } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": true + } }, - "traits": { - "smithy.api#documentation": "

Specifies object key name filtering rules. For information about key name filtering, see\n Configuring event\n notifications using object key name filtering in the\n Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#NotificationId": { - "type": "string", - "traits": { - "smithy.api#documentation": "

An optional unique identifier for configurations in a notification configuration. If you\n don't provide one, Amazon S3 will assign an ID.

" - } - }, - "com.amazonaws.s3#Object": { - "type": "structure", - "members": { - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The name that you assign to an object. You use the object key to retrieve the\n object.

" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Creation date of the object.

" - } - }, - "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\n are 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 is\n 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
\n \n

\n Directory buckets - MD5 is not supported by directory buckets.

\n
" - } - }, - "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": {} - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "Size": { - "target": "com.amazonaws.s3#Size", - "traits": { - "smithy.api#documentation": "

Size in bytes of the object

" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#ObjectStorageClass", - "traits": { - "smithy.api#documentation": "

The class of storage used to store the object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" - } - }, - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

The owner of the object

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner.

\n
" - } - }, - "RestoreStatus": { - "target": "com.amazonaws.s3#RestoreStatus", - "traits": { - "smithy.api#documentation": "

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" - } + { + "documentation": "non bucket endpoint with dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com" } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true + } }, - "traits": { - "smithy.api#documentation": "

An object consists of data and its descriptive metadata.

" - } - }, - "com.amazonaws.s3#ObjectAlreadyInActiveTierError": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

This action is not allowed against this storage tier.

", - "smithy.api#error": "client", - "smithy.api#httpError": 403 - } - }, - "com.amazonaws.s3#ObjectAttributes": { - "type": "enum", - "members": { - "ETAG": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ETag" - } - }, - "CHECKSUM": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Checksum" - } - }, - "OBJECT_PARTS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ObjectParts" - } - }, - "STORAGE_CLASS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "StorageClass" - } - }, - "OBJECT_SIZE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ObjectSize" - } + { + "documentation": "use global endpoint + IP address endpoint override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://127.0.0.1/bucket" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "http://127.0.0.1", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "non-dns endpoint + global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + use global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + dualstack + non-bucket endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" } - } - }, - "com.amazonaws.s3#ObjectAttributesList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#ObjectAttributes" - } - }, - "com.amazonaws.s3#ObjectCannedACL": { - "type": "enum", - "members": { - "private": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "private" - } - }, - "public_read": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "public-read" - } - }, - "public_read_write": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "public-read-write" - } - }, - "authenticated_read": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "authenticated-read" - } - }, - "aws_exec_read": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "aws-exec-read" - } - }, - "bucket_owner_read": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "bucket-owner-read" - } - }, - "bucket_owner_full_control": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "bucket-owner-full-control" - } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "FIPS + dualstack + non-DNS endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "endpoint override + FIPS + dualstack (BUG)", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "endpoint override + non-dns bucket + FIPS (BUG)", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + bucket endpoint + force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "bucket + FIPS + force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + dualstack + use global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bucket.s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": true, + "UseDualStack": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "URI encoded bucket + use global endpoint", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "https://foo.com" + } + }, + { + "documentation": "FIPS + path based endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "accelerate + dualstack + global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bucket.s3-accelerate.dualstack.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "dualstack + global endpoint + non URI safe bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "Accelerate": false, + "UseDualStack": true, + "UseFIPS": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + uri encoded bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "Accelerate": false, + "UseDualStack": false, + "UseFIPS": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + non-uri safe endpoint + force path style", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "Accelerate": false, + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "http://foo.com", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + Dualstack + global endpoint + non-dns bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "Accelerate": false, + "UseDualStack": true, + "UseFIPS": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + FIPS + dualstack", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "non-bucket endpoint override + dualstack + global endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "Endpoint override + UseGlobalEndpoint + us-east-1", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "non-FIPS partition with FIPS set + custom endpoint", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "aws-global signs as us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseFIPS": true, + "Accelerate": false, + "UseDualStack": true + } + }, + { + "documentation": "aws-global signs as us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.foo.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "https://foo.com" + } + }, + { + "documentation": "aws-global + dualstack + path-only bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": false + } + }, + { + "documentation": "aws-global + path-only bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket%21" } - } - }, - "com.amazonaws.s3#ObjectIdentifier": { - "type": "structure", - "members": { - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Key name of the object.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
", - "smithy.api#required": {} - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID for the specific version of the object to delete.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "smithy.api#documentation": "

An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL.\n This header field makes the request method conditional on ETags.

\n \n

Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

\n
" - } - }, - "LastModifiedTime": { - "target": "com.amazonaws.s3#LastModifiedTime", - "traits": { - "smithy.api#documentation": "

If present, the objects are deleted only if its modification times matches the provided Timestamp. \n

\n \n

This functionality is only supported for directory buckets.

\n
" - } - }, - "Size": { - "target": "com.amazonaws.s3#Size", - "traits": { - "smithy.api#documentation": "

If present, the objects are deleted only if its size matches the provided size in bytes.

\n \n

This functionality is only supported for directory buckets.

\n
" - } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!" + } + }, + { + "documentation": "aws-global + fips + custom endpoint", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": false, + "UseFIPS": true, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "aws-global, endpoint override & path only-bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "aws-global + dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "aws-global", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "accelerate, dualstack + aws-global", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.s3-accelerate.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": true + } + }, + { + "documentation": "FIPS + aws-global + path only bucket. This is not supported by S3 but we allow garbage in garbage out", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseDualStack": true, + "UseFIPS": true, + "Accelerate": false + } + }, + { + "documentation": "aws-global + FIPS + endpoint override.", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "force path style, FIPS, aws-global & endpoint override", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "ip address causes path style to be forced", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://192.168.1.1/bucket" } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "Endpoint": "http://192.168.1.1" + } }, - "traits": { - "smithy.api#documentation": "

Object Identifier is unique value to identify objects.

" - } - }, - "com.amazonaws.s3#ObjectIdentifierList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#ObjectIdentifier" - } - }, - "com.amazonaws.s3#ObjectKey": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1 + { + "documentation": "endpoint override with aws-global region", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + path-only (TODO: consider making this an error)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" } - } - }, - "com.amazonaws.s3#ObjectList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Object" - } - }, - "com.amazonaws.s3#ObjectLockConfiguration": { - "type": "structure", - "members": { - "ObjectLockEnabled": { - "target": "com.amazonaws.s3#ObjectLockEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether this bucket has an Object Lock configuration enabled. Enable\n ObjectLockEnabled when you apply ObjectLockConfiguration to a\n bucket.

" - } - }, - "Rule": { - "target": "com.amazonaws.s3#ObjectLockRule", - "traits": { - "smithy.api#documentation": "

Specifies the Object Lock rule for the specified object. Enable the this rule when you\n apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode\n and a period. The period can be either Days or Years but you must\n select one. You cannot specify Days and Years at the same\n time.

" - } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseFIPS": true + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Invalid ARN: No ARN type specified" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:not-s3:us-west-2:123456789012::myendpoint" + } + }, + { + "documentation": "path style can't be used with accelerate", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "Accelerate": true + } + }, + { + "documentation": "invalid region", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "us-east-2!", + "Bucket": "bucket.subdomain", + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "invalid region", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "us-east-2!", + "Bucket": "bucket", + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Invalid Access Point Name" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3::123456789012:accesspoint:my_endpoint" + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint`) has `aws-cn`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint", + "UseArnRegion": true + } + }, + { + "documentation": "invalid arn region", + "expect": { + "error": "Invalid region in ARN: `us-east_2` (invalid DNS name)" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-object-lambda:us-east_2:123456789012:accesspoint:my-endpoint", + "UseArnRegion": true + } + }, + { + "documentation": "invalid ARN outpost", + "expect": { + "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `op_01234567890123456`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op_01234567890123456/accesspoint/reports", + "UseArnRegion": true + } + }, + { + "documentation": "invalid ARN", + "expect": { + "error": "Invalid ARN: expected an access point name" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/reports" + } + }, + { + "documentation": "invalid ARN", + "expect": { + "error": "Invalid ARN: Expected a 4-component resource" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Expected an outpost type `accesspoint`, found not-accesspoint" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid region in ARN: `us-east_1` (invalid DNS name)" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east_1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `12345_789012`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:12345_789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid ARN: The Outpost Id was not set" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:12345789012:outpost" + } + }, + { + "documentation": "use global endpoint virtual addressing", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucket.example.com" } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Endpoint": "http://example.com", + "UseGlobalEndpoint": true + } }, - "traits": { - "smithy.api#documentation": "

The container element for Object Lock configuration parameters.

" - } - }, - "com.amazonaws.s3#ObjectLockEnabled": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } + { + "documentation": "global endpoint + ip address", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://192.168.0.1/bucket" } - } - }, - "com.amazonaws.s3#ObjectLockEnabledForBucket": { - "type": "boolean" - }, - "com.amazonaws.s3#ObjectLockLegalHold": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", - "traits": { - "smithy.api#documentation": "

Indicates whether the specified object has a legal hold in place.

" - } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Endpoint": "http://192.168.0.1", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-east-2.amazonaws.com/bucket%21" } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true + } }, - "traits": { - "smithy.api#documentation": "

A legal hold configuration for an object.

" - } - }, - "com.amazonaws.s3#ObjectLockLegalHoldStatus": { - "type": "enum", - "members": { - "ON": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ON" - } - }, - "OFF": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "OFF" - } + { + "documentation": "invalid outpost type", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.s3-accelerate.amazonaws.com" } - } - }, - "com.amazonaws.s3#ObjectLockMode": { - "type": "enum", - "members": { - "GOVERNANCE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GOVERNANCE" - } - }, - "COMPLIANCE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COMPLIANCE" - } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Accelerate": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "use global endpoint + custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" } - } - }, - "com.amazonaws.s3#ObjectLockRetainUntilDate": { - "type": "timestamp", - "traits": { - "smithy.api#timestampFormat": "date-time" - } - }, - "com.amazonaws.s3#ObjectLockRetention": { - "type": "structure", - "members": { - "Mode": { - "target": "com.amazonaws.s3#ObjectLockRetentionMode", - "traits": { - "smithy.api#documentation": "

Indicates the Retention mode for the specified object.

" - } - }, - "RetainUntilDate": { - "target": "com.amazonaws.s3#Date", - "traits": { - "smithy.api#documentation": "

The date on which this Object Lock Retention will expire.

" - } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "use global endpoint, not us-east-1, force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "vanilla virtual addressing@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

A Retention configuration for an object.

" - } - }, - "com.amazonaws.s3#ObjectLockRetentionMode": { - "type": "enum", - "members": { - "GOVERNANCE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GOVERNANCE" - } - }, - "COMPLIANCE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COMPLIANCE" - } + { + "documentation": "virtual addressing + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#ObjectLockRule": { - "type": "structure", - "members": { - "DefaultRetention": { - "target": "com.amazonaws.s3#DefaultRetention", - "traits": { - "smithy.api#documentation": "

The default Object Lock retention mode and period that you want to apply to new objects\n placed in the specified bucket. Bucket settings require both a mode and a period. The\n period can be either Days or Years but you must select one. You\n cannot specify Days and Years at the same time.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.dualstack.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

The container element for an Object Lock rule.

" - } - }, - "com.amazonaws.s3#ObjectLockToken": { - "type": "string" - }, - "com.amazonaws.s3#ObjectNotInActiveTierError": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The source object of the COPY action is not in the active tier and is only stored in\n Amazon S3 Glacier.

", - "smithy.api#error": "client", - "smithy.api#httpError": 403 - } - }, - "com.amazonaws.s3#ObjectOwnership": { - "type": "enum", - "members": { - "BucketOwnerPreferred": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "BucketOwnerPreferred" - } - }, - "ObjectWriter": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ObjectWriter" - } - }, - "BucketOwnerEnforced": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "BucketOwnerEnforced" - } + { + "documentation": "accelerate (dualstack=false)@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

The container element for object ownership for a bucket's ownership controls.

\n

\n BucketOwnerPreferred - Objects uploaded to the bucket change ownership to\n the bucket owner if the objects are uploaded with the\n bucket-owner-full-control canned ACL.

\n

\n ObjectWriter - The uploading account will own the object if the object is\n uploaded with the bucket-owner-full-control canned ACL.

\n

\n BucketOwnerEnforced - Access control lists (ACLs) are disabled and no\n longer affect permissions. The bucket owner automatically owns and has full control over\n every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL\n or specify bucket owner full control ACLs (such as the predefined\n bucket-owner-full-control canned ACL or a custom ACL in XML format that\n grants the same permissions).

\n

By default, ObjectOwnership is set to BucketOwnerEnforced and\n ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where\n you must control access for each object individually. For more information about S3 Object\n Ownership, see Controlling ownership of\n objects and disabling ACLs for your bucket in the\n Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

\n
" - } - }, - "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": "

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumSHA1": { - "target": "com.amazonaws.s3#ChecksumSHA1", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumSHA256": { - "target": "com.amazonaws.s3#ChecksumSHA256", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } + { + "documentation": "virtual addressing + fips@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } }, - "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" - }, - "com.amazonaws.s3#ObjectSizeLessThanBytes": { - "type": "long" - }, - "com.amazonaws.s3#ObjectStorageClass": { - "type": "enum", - "members": { - "STANDARD": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STANDARD" - } - }, - "REDUCED_REDUNDANCY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "REDUCED_REDUNDANCY" - } - }, - "GLACIER": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GLACIER" - } - }, - "STANDARD_IA": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STANDARD_IA" - } - }, - "ONEZONE_IA": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ONEZONE_IA" - } - }, - "INTELLIGENT_TIERING": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INTELLIGENT_TIERING" - } - }, - "DEEP_ARCHIVE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DEEP_ARCHIVE" - } - }, - "OUTPOSTS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "OUTPOSTS" - } - }, - "GLACIER_IR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GLACIER_IR" - } - }, - "SNOW": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SNOW" - } - }, - "EXPRESS_ONEZONE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "EXPRESS_ONEZONE" - } + { + "documentation": "virtual addressing + dualstack + fips@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#ObjectVersion": { - "type": "structure", - "members": { - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "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": {} - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "Size": { - "target": "com.amazonaws.s3#Size", - "traits": { - "smithy.api#documentation": "

Size in bytes of the object.

" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#ObjectVersionStorageClass", - "traits": { - "smithy.api#documentation": "

The class of storage used to store the object.

" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The object key.

" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID of an object.

" - } - }, - "IsLatest": { - "target": "com.amazonaws.s3#IsLatest", - "traits": { - "smithy.api#documentation": "

Specifies whether the object is (true) or is not (false) the latest version of an\n object.

" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Date and time when the object was last modified.

" - } - }, - "Owner": { - "target": "com.amazonaws.s3#Owner", - "traits": { - "smithy.api#documentation": "

Specifies the owner of the object.

" - } - }, - "RestoreStatus": { - "target": "com.amazonaws.s3#RestoreStatus", - "traits": { - "smithy.api#documentation": "

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "accelerate + fips = error@us-west-2", + "expect": { + "error": "Accelerate cannot be used with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla virtual addressing@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.cn-north-1.amazonaws.com.cn" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

The version of an object.

" - } - }, - "com.amazonaws.s3#ObjectVersionId": { - "type": "string" - }, - "com.amazonaws.s3#ObjectVersionList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#ObjectVersion" - } - }, - "com.amazonaws.s3#ObjectVersionStorageClass": { - "type": "enum", - "members": { - "STANDARD": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STANDARD" - } + { + "documentation": "virtual addressing + dualstack@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.cn-north-1.amazonaws.com.cn" } - } - }, - "com.amazonaws.s3#OptionalObjectAttributes": { - "type": "enum", - "members": { - "RESTORE_STATUS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "RestoreStatus" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate (dualstack=false)@cn-north-1", + "expect": { + "error": "S3 Accelerate cannot be used in this region" + }, + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + fips@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla virtual addressing@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.af-south-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#OptionalObjectAttributesList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#OptionalObjectAttributes" - } - }, - "com.amazonaws.s3#OutputLocation": { - "type": "structure", - "members": { - "S3": { - "target": "com.amazonaws.s3#S3Location", - "traits": { - "smithy.api#documentation": "

Describes an S3 location that will receive the results of the restore request.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.dualstack.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

Describes the location where the restore job's output is stored.

" - } - }, - "com.amazonaws.s3#OutputSerialization": { - "type": "structure", - "members": { - "CSV": { - "target": "com.amazonaws.s3#CSVOutput", - "traits": { - "smithy.api#documentation": "

Describes the serialization of CSV-encoded Select results.

" - } - }, - "JSON": { - "target": "com.amazonaws.s3#JSONOutput", - "traits": { - "smithy.api#documentation": "

Specifies JSON as request's output serialization format.

" - } + { + "documentation": "accelerate (dualstack=false)@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

Describes how results of the Select job are serialized.

" - } - }, - "com.amazonaws.s3#Owner": { - "type": "structure", - "members": { - "DisplayName": { - "target": "com.amazonaws.s3#DisplayName", - "traits": { - "smithy.api#documentation": "

Container for the display name of the owner. This value is only supported in the\n 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\u00e3o Paulo)

    \n
  • \n
\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "ID": { - "target": "com.amazonaws.s3#ID", - "traits": { - "smithy.api#documentation": "

Container for the ID of the owner.

" - } + { + "documentation": "virtual addressing + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.af-south-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } }, - "traits": { - "smithy.api#documentation": "

Container for the owner's display name and ID.

" - } - }, - "com.amazonaws.s3#OwnerOverride": { - "type": "enum", - "members": { - "Destination": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Destination" - } + { + "documentation": "virtual addressing + dualstack + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.af-south-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#OwnershipControls": { - "type": "structure", - "members": { - "Rules": { - "target": "com.amazonaws.s3#OwnershipControlsRules", - "traits": { - "smithy.api#documentation": "

The container element for an ownership control rule.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Rule" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "accelerate + fips = error@af-south-1", + "expect": { + "error": "Accelerate cannot be used with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla path style@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

The container element for a bucket's ownership controls.

" - } - }, - "com.amazonaws.s3#OwnershipControlsRule": { - "type": "structure", - "members": { - "ObjectOwnership": { - "target": "com.amazonaws.s3#ObjectOwnership", - "traits": { - "smithy.api#required": {} - } + { + "documentation": "fips@us-gov-west-2, bucket is not S3-dns-compatible (subdomains)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "us-gov-west-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.us-gov-west-1.amazonaws.com/bucket.with.dots" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.with.dots", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket.with.dots", + "Region": "us-gov-west-1", + "UseDualStack": false, + "UseFIPS": true + } }, - "traits": { - "smithy.api#documentation": "

The container element for an ownership control rule.

" - } - }, - "com.amazonaws.s3#OwnershipControlsRules": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#OwnershipControlsRule" - } - }, - "com.amazonaws.s3#ParquetInput": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

Container for Parquet.

" - } - }, - "com.amazonaws.s3#Part": { - "type": "structure", - "members": { - "PartNumber": { - "target": "com.amazonaws.s3#PartNumber", - "traits": { - "smithy.api#documentation": "

Part number identifying the part. This is a positive integer between 1 and\n 10,000.

" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

Date and time at which the part was uploaded.

" - } - }, - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "smithy.api#documentation": "

Entity tag returned when the part was uploaded.

" - } - }, - "Size": { - "target": "com.amazonaws.s3#Size", - "traits": { - "smithy.api#documentation": "

Size in bytes of the uploaded part data.

" - } - }, - "ChecksumCRC32": { - "target": "com.amazonaws.s3#ChecksumCRC32", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present\n if the object was uploaded with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumSHA1": { - "target": "com.amazonaws.s3#ChecksumSHA1", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } - }, - "ChecksumSHA256": { - "target": "com.amazonaws.s3#ChecksumSHA256", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" - } + { + "documentation": "path style + accelerate = error@us-west-2", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

Container for elements related to a part.

" - } - }, - "com.amazonaws.s3#PartNumber": { - "type": "integer" - }, - "com.amazonaws.s3#PartNumberMarker": { - "type": "string" - }, - "com.amazonaws.s3#PartitionDateSource": { - "type": "enum", - "members": { - "EventTime": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "EventTime" - } - }, - "DeliveryTime": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DeliveryTime" - } + { + "documentation": "path style + arn is error@us-west-2", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/99a_b" } - } - }, - "com.amazonaws.s3#PartitionedPrefix": { - "type": "structure", - "members": { - "PartitionDateSource": { - "target": "com.amazonaws.s3#PartitionDateSource", - "traits": { - "smithy.api#documentation": "

Specifies the partition date source for the partitioned prefix.\n PartitionDateSource can be EventTime or\n DeliveryTime.

\n

For DeliveryTime, the time in the log file names corresponds to the\n delivery time for the log files.

\n

For EventTime, The logs delivered are for a specific day only. The year,\n month, and day correspond to the day on which the event occurred, and the hour, minutes and\n seconds are set to 00 in the key.

" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "no path style + invalid DNS name@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/99a_b" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

Amazon S3 keys for log objects are partitioned in the following format:

\n

\n [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]\n

\n

PartitionedPrefix defaults to EventTime delivery when server access logs are\n delivered.

", - "smithy.api#xmlName": "PartitionedPrefix" - } - }, - "com.amazonaws.s3#Parts": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Part" - } - }, - "com.amazonaws.s3#PartsCount": { - "type": "integer" - }, - "com.amazonaws.s3#PartsList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#ObjectPart" - } - }, - "com.amazonaws.s3#Payer": { - "type": "enum", - "members": { - "Requester": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Requester" - } - }, - "BucketOwner": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "BucketOwner" - } + { + "documentation": "vanilla path style@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/bucket-name" } - } - }, - "com.amazonaws.s3#Permission": { - "type": "enum", - "members": { - "FULL_CONTROL": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FULL_CONTROL" - } - }, - "WRITE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "WRITE" - } - }, - "WRITE_ACP": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "WRITE_ACP" - } - }, - "READ": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READ" - } - }, - "READ_ACP": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READ_ACP" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + fips@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@cn-north-1", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.cn-north-1.amazonaws.com.cn/bucket-name" } - } - }, - "com.amazonaws.s3#Policy": { - "type": "string" - }, - "com.amazonaws.s3#PolicyStatus": { - "type": "structure", - "members": { - "IsPublic": { - "target": "com.amazonaws.s3#IsPublic", - "traits": { - "smithy.api#documentation": "

The policy status for this bucket. TRUE indicates that this bucket is\n public. FALSE indicates that the bucket is not public.

", - "smithy.api#xmlName": "IsPublic" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "path style + arn is error@cn-north-1", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

The container element for a bucket's policy status.

" - } - }, - "com.amazonaws.s3#Prefix": { - "type": "string" - }, - "com.amazonaws.s3#Priority": { - "type": "integer" - }, - "com.amazonaws.s3#Progress": { - "type": "structure", - "members": { - "BytesScanned": { - "target": "com.amazonaws.s3#BytesScanned", - "traits": { - "smithy.api#documentation": "

The current number of object bytes scanned.

" - } - }, - "BytesProcessed": { - "target": "com.amazonaws.s3#BytesProcessed", - "traits": { - "smithy.api#documentation": "

The current number of uncompressed object bytes processed.

" - } - }, - "BytesReturned": { - "target": "com.amazonaws.s3#BytesReturned", - "traits": { - "smithy.api#documentation": "

The current number of bytes of records payload data returned.

" - } + { + "documentation": "no path style + invalid DNS name@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

This data type contains information about progress of an operation.

" - } - }, - "com.amazonaws.s3#ProgressEvent": { - "type": "structure", - "members": { - "Details": { - "target": "com.amazonaws.s3#Progress", - "traits": { - "smithy.api#documentation": "

The Progress event details.

", - "smithy.api#eventPayload": {} - } + { + "documentation": "vanilla path style@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

This data type contains information about the progress event of an operation.

" - } - }, - "com.amazonaws.s3#Protocol": { - "type": "enum", - "members": { - "http": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "http" - } - }, - "https": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "https" - } + { + "documentation": "path style + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.af-south-1.amazonaws.com/bucket-name" } - } - }, - "com.amazonaws.s3#PublicAccessBlockConfiguration": { - "type": "structure", - "members": { - "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#xmlName": "BlockPublicAcls" - } - }, - "IgnorePublicAcls": { - "target": "com.amazonaws.s3#Setting", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this\n bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on\n this bucket and objects in this bucket.

\n

Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't\n prevent new public ACLs from being set.

", - "smithy.api#xmlName": "IgnorePublicAcls" - } - }, - "BlockPublicPolicy": { - "target": "com.amazonaws.s3#Setting", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this\n element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the\n specified bucket policy allows public access.

\n

Enabling this setting doesn't affect existing bucket policies.

", - "smithy.api#xmlName": "BlockPublicPolicy" - } - }, - "RestrictPublicBuckets": { - "target": "com.amazonaws.s3#Setting", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting\n this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has\n a public policy.

\n

Enabling this setting doesn't affect previously stored bucket policies, except that\n public and cross-account access within any public bucket policy, including non-public\n delegation to specific accounts, is blocked.

", - "smithy.api#xmlName": "RestrictPublicBuckets" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@af-south-1", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.af-south-1.amazonaws.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } }, - "traits": { - "smithy.api#documentation": "

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can\n enable the configuration options in any combination. For more information about when Amazon S3\n considers a bucket or object public, see The Meaning of \"Public\" in the Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#PutBucketAccelerateConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketAccelerateConfigurationRequest" + { + "documentation": "path style + arn is error@af-south-1", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "path style + invalid DNS name@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm" - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

The Transfer Acceleration state of a bucket can be set to one of the following two\n values:

\n
    \n
  • \n

    Enabled \u2013 Enables accelerated data transfers to the bucket.

    \n
  • \n
  • \n

    Suspended \u2013 Disables accelerated data transfers to the bucket.

    \n
  • \n
\n

The GetBucketAccelerateConfiguration action returns the transfer acceleration state\n of a bucket.

\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

The name of the bucket used for Transfer Acceleration must be DNS-compliant and must\n not contain periods (\".\").

\n

For more information about transfer acceleration, see Transfer\n Acceleration.

\n

The following operations are related to\n PutBucketAccelerateConfiguration:

\n ", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?accelerate", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "no path style + invalid DNS name@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/99a_b" } - } - }, - "com.amazonaws.s3#PutBucketAccelerateConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which the accelerate configuration is set.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "AccelerateConfiguration": { - "target": "com.amazonaws.s3#AccelerateConfiguration", - "traits": { - "smithy.api#documentation": "

Container for setting the transfer acceleration state.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "AccelerateConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketAcl": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketAclRequest" + { + "documentation": "path style + private link@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "SDK::Host + FIPS@us-west-2", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets the permissions on an existing bucket using access control lists (ACL). For more\n information, see Using ACLs. To set the ACL of a\n bucket, you must have the WRITE_ACP permission.

\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

You cannot specify access permission using both the body and the request\n headers.

\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

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

You can set access permissions by using one of the following methods:

\n
    \n
  • \n

    Specify a canned ACL with the x-amz-acl request header. Amazon S3\n supports a set of predefined ACLs, known as canned\n ACLs. Each canned ACL has a predefined set of grantees and\n permissions. Specify the canned ACL name as the value of\n x-amz-acl. If you use this header, you cannot use other\n access control-specific headers in your request. For more information, see\n Canned\n 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. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use the x-amz-acl header to set a canned\n ACL. These parameters map to the set of permissions that Amazon S3 supports in an\n 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\n the following:

    \n
      \n
    • \n

      \n id \u2013 if the value specified is the canonical user ID\n of an Amazon Web Services account

      \n
    • \n
    • \n

      \n uri \u2013 if you are granting permissions to a predefined\n group

      \n
    • \n
    • \n

      \n emailAddress \u2013 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\u00e3o 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\n create, overwrite, and delete objects permission to LogDelivery group\n predefined by Amazon S3 and two Amazon Web Services accounts identified by their email\n addresses.

    \n

    \n x-amz-grant-write:\n uri=\"http://acs.amazonaws.com/groups/s3/LogDelivery\", id=\"111122223333\",\n id=\"555566667777\" \n

    \n
  • \n
\n

You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.

\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights\n (using 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<>&\n

    \n

    The grantee is resolved to the CanonicalUser and, in a response to a GET\n Object 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\u00e3o 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

The following operations are related to PutBucketAcl:

\n ", - "smithy.api#examples": [ - { - "title": "Put bucket acl", - "documentation": "The following example replaces existing ACL on a bucket. The ACL grants the bucket owner (specified using the owner ID) and write permission to the LogDelivery group. Because this is a replace operation, you must specify all the grants in your request. To incrementally add or remove ACL grants, you might use the console.", - "input": { - "Bucket": "examplebucket", - "GrantFullControl": "id=examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484", - "GrantWrite": "uri=http://acs.amazonaws.com/groups/s3/LogDelivery" - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?acl", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutBucketAclRequest": { - "type": "structure", - "members": { - "ACL": { - "target": "com.amazonaws.s3#BucketCannedACL", - "traits": { - "smithy.api#documentation": "

The canned ACL to apply to the bucket.

", - "smithy.api#httpHeader": "x-amz-acl" - } - }, - "AccessControlPolicy": { - "target": "com.amazonaws.s3#AccessControlPolicy", - "traits": { - "smithy.api#documentation": "

Contains the elements that set the ACL permissions for an object per grantee.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "AccessControlPolicy" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket to which to apply the ACL.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

", - "smithy.api#httpHeader": "x-amz-grant-full-control" - } - }, - "GrantRead": { - "target": "com.amazonaws.s3#GrantRead", - "traits": { - "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

", - "smithy.api#httpHeader": "x-amz-grant-read" - } - }, - "GrantReadACP": { - "target": "com.amazonaws.s3#GrantReadACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

", - "smithy.api#httpHeader": "x-amz-grant-read-acp" - } - }, - "GrantWrite": { - "target": "com.amazonaws.s3#GrantWrite", - "traits": { - "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

", - "smithy.api#httpHeader": "x-amz-grant-write" - } - }, - "GrantWriteACP": { - "target": "com.amazonaws.s3#GrantWriteACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

", - "smithy.api#httpHeader": "x-amz-grant-write-acp" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + { + "documentation": "SDK::Host + DualStack@us-west-2", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@us-west-2", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketAnalyticsConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketAnalyticsConfigurationRequest" + { + "documentation": "SDK::Host + access point ARN@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets an analytics configuration for the bucket (specified by the analytics configuration\n ID). You can have up to 1,000 analytics configurations per bucket.

\n

You can choose to have storage class analysis export analysis reports sent to a\n comma-separated values (CSV) flat file. See the DataExport request element.\n Reports are updated daily and are based on the object filters that you configure. When\n selecting data export, you specify a destination bucket and an optional destination prefix\n where the file is written. You can export the data to a destination bucket in a different\n account. However, the destination bucket must be in the same Region as the bucket that you\n are making the PUT analytics configuration to. For more information, see Amazon S3\n Analytics \u2013 Storage Class Analysis.

\n \n

You must create a bucket policy on the destination bucket where the exported file is\n written to grant permissions to Amazon S3 to write objects to the bucket. For an example\n policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

\n
\n

To use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration 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 PutBucketAnalyticsConfiguration has the following special errors:

\n
    \n
  • \n
      \n
    • \n

      \n HTTP Error: HTTP 400 Bad Request\n

      \n
    • \n
    • \n

      \n Code: InvalidArgument\n

      \n
    • \n
    • \n

      \n Cause: Invalid argument.\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n HTTP Error: HTTP 400 Bad Request\n

      \n
    • \n
    • \n

      \n Code: TooManyConfigurations\n

      \n
    • \n
    • \n

      \n Cause: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n HTTP Error: HTTP 403 Forbidden\n

      \n
    • \n
    • \n

      \n Code: AccessDenied\n

      \n
    • \n
    • \n

      \n Cause: You are not the owner of the specified bucket, or you do\n not have the s3:PutAnalyticsConfiguration bucket permission to set the\n configuration on the bucket.\n

      \n
    • \n
    \n
  • \n
\n

The following operations are related to\n PutBucketAnalyticsConfiguration:

\n ", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?analytics", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "virtual addressing + private link@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutBucketAnalyticsConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket to which an analytics configuration is stored.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#AnalyticsId", - "traits": { - "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "AnalyticsConfiguration": { - "target": "com.amazonaws.s3#AnalyticsConfiguration", - "traits": { - "smithy.api#documentation": "

The configuration and any analyses for the analytics filter.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "AnalyticsConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + private link@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketCors": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketCorsRequest" + { + "documentation": "FIPS@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "SDK::Host + DualStack@cn-north-1", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.

\n

The following operations are related to PutBucketCors:

\n ", - "smithy.api#examples": [ - { - "title": "To set cors configuration on a bucket.", - "documentation": "The following example enables PUT, POST, and DELETE requests from www.example.com, and enables GET requests from any domain.", - "input": { - "Bucket": "", - "CORSConfiguration": { - "CORSRules": [ - { - "AllowedOrigins": [ - "http://www.example.com" - ], - "AllowedHeaders": [ - "*" - ], - "AllowedMethods": [ - "PUT", - "POST", - "DELETE" - ], - "MaxAgeSeconds": 3000, - "ExposeHeaders": [ - "x-amz-server-side-encryption" - ] - }, - { - "AllowedOrigins": [ - "*" - ], - "AllowedHeaders": [ - "Authorization" - ], - "AllowedMethods": [ - "GET" - ], - "MaxAgeSeconds": 3000 - } - ] - }, - "ContentMD5": "" - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?cors", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "SDK::HOST + accelerate@cn-north-1", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" } - } - }, - "com.amazonaws.s3#PutBucketCorsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

Specifies the bucket impacted by the corsconfiguration.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "CORSConfiguration": { - "target": "com.amazonaws.s3#CORSConfiguration", - "traits": { - "smithy.api#documentation": "

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more\n information, see Enabling\n Cross-Origin Resource Sharing in the\n Amazon S3 User Guide.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "CORSConfiguration" - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketEncryption": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketEncryptionRequest" + { + "documentation": "path style + private link@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "

This operation configures default encryption and Amazon S3 Bucket Keys for an existing\n bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n

By default, all buckets have a default encryption configuration that uses server-side\n encryption with Amazon S3 managed keys (SSE-S3).

\n \n
    \n
  • \n

    \n General purpose buckets\n

    \n
      \n
    • \n

      You can optionally configure default encryption for a bucket by using\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify\n default encryption by using SSE-KMS, you can also configure Amazon S3\n Bucket Keys. For information about the bucket default encryption\n feature, see Amazon S3 Bucket Default\n Encryption in the Amazon S3 User Guide.

      \n
    • \n
    • \n

      If you use PutBucketEncryption to set your default bucket\n encryption to SSE-KMS, you should verify that your KMS key ID\n is correct. Amazon S3 doesn't validate the KMS key ID provided in\n PutBucketEncryption requests.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory buckets - You can\n optionally configure default encryption for a bucket by using server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS).

    \n
      \n
    • \n

      We recommend that the bucket's default encryption uses the desired\n encryption configuration and you don't override the bucket default\n encryption in your CreateSession requests or PUT\n object requests. Then, new objects are automatically encrypted with the\n desired encryption settings.\n For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      \n
    • \n
    • \n

      Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

      \n
    • \n
    • \n

      S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      \n
    • \n
    • \n

      When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      \n
    • \n
    • \n

      For directory buckets, if you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, Amazon S3 validates the\n KMS key ID provided in PutBucketEncryption requests.

      \n
    • \n
    \n
  • \n
\n
\n \n

If you're specifying a customer managed KMS key, we recommend using a fully\n qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the\n key within the requester\u2019s account. This behavior can result in data that's encrypted\n with a KMS key that belongs to the requester, and not the bucket owner.

\n

Also, this action requires Amazon Web Services Signature Version 4. For more information, see\n Authenticating\n Requests (Amazon Web Services Signature Version 4).

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n

    To set a directory bucket default encryption with SSE-KMS, you must also\n have the kms:GenerateDataKey and the kms:Decrypt\n permissions in IAM identity-based policies and KMS key policies for the\n target KMS key.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to PutBucketEncryption:

\n ", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?encryption", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "SDK::Host + FIPS@af-south-1", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "SDK::Host + DualStack@af-south-1", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@af-south-1", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" } - } - }, - "com.amazonaws.s3#PutBucketEncryptionRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

Specifies default encryption for a bucket using server-side encryption with different\n key options.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the server-side encryption\n configuration.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", - "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" - } - }, - "ServerSideEncryptionConfiguration": { - "target": "com.amazonaws.s3#ServerSideEncryptionConfiguration", - "traits": { - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "ServerSideEncryptionConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketIntelligentTieringConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketIntelligentTieringConfigurationRequest" + { + "documentation": "access point arn + FIPS@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to\n 1,000 S3 Intelligent-Tiering configurations per bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to PutBucketIntelligentTieringConfiguration include:

\n \n \n

You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically\n move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access\n or Deep Archive Access tier.

\n
\n

\n PutBucketIntelligentTieringConfiguration has the following special\n errors:

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: InvalidArgument

\n

\n Cause: Invalid Argument

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: TooManyConfigurations

\n

\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.

\n
\n
HTTP 403 Forbidden Error
\n
\n

\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutIntelligentTieringConfiguration bucket\n permission to set the configuration on the bucket.

\n
\n
", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?intelligent-tiering", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "access point arn + accelerate = error@us-west-2", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS + DualStack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutBucketIntelligentTieringConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#IntelligentTieringId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "IntelligentTieringConfiguration": { - "target": "com.amazonaws.s3#IntelligentTieringConfiguration", - "traits": { - "smithy.api#documentation": "

Container for S3 Intelligent-Tiering configuration.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "IntelligentTieringConfiguration" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "vanilla access point arn@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.cn-north-1.amazonaws.com.cn" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketInventoryConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketInventoryConfigurationRequest" + { + "documentation": "access point arn + FIPS@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the PUT action adds an inventory configuration\n (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory\n configurations per bucket.

\n

Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly\n basis, and the results are published to a flat file. The bucket that is inventoried is\n called the source bucket, and the bucket where the inventory flat file\n is stored is called the destination bucket. The\n destination bucket must be in the same Amazon Web Services Region as the\n source bucket.

\n

When you configure an inventory for a source bucket, you specify\n the destination bucket where you want the inventory to be stored, and\n whether to generate the inventory daily or weekly. You can also configure what object\n metadata to include and whether to inventory all object versions or only current versions.\n For more information, see Amazon S3 Inventory in the\n Amazon S3 User Guide.

\n \n

You must create a bucket policy on the destination bucket to\n grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an\n example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

\n
\n
\n
Permissions
\n
\n

To use this operation, you must have permission to perform the\n s3:PutInventoryConfiguration action. The bucket owner has this\n permission by default and can grant this permission to others.

\n

The s3:PutInventoryConfiguration permission allows a user to\n create an S3 Inventory\n report that includes all object metadata fields available and to specify the\n destination bucket to store the inventory. A user with read access to objects in\n the destination bucket can also access all object metadata fields that are\n available in the inventory report.

\n

To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the\n Amazon S3 User Guide. For more information about the metadata\n fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For\n more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the\n Amazon S3 User Guide.

\n
\n
\n

\n PutBucketInventoryConfiguration has the following special errors:

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: InvalidArgument

\n

\n Cause: Invalid Argument

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: TooManyConfigurations

\n

\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.

\n
\n
HTTP 403 Forbidden Error
\n
\n

\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutInventoryConfiguration bucket permission to\n set the configuration on the bucket.

\n
\n
\n

The following operations are related to\n PutBucketInventoryConfiguration:

\n ", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?inventory", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutBucketInventoryConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket where the inventory configuration will be stored.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#InventoryId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "InventoryConfiguration": { - "target": "com.amazonaws.s3#InventoryConfiguration", - "traits": { - "smithy.api#documentation": "

Specifies the inventory configuration.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "InventoryConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "access point arn + accelerate = error@cn-north-1", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS + DualStack@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "vanilla access point arn@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.af-south-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketLifecycleConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketLifecycleConfigurationRequest" + { + "documentation": "access point arn + FIPS@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } }, - "output": { - "target": "com.amazonaws.s3#PutBucketLifecycleConfigurationOutput" + { + "documentation": "access point arn + accelerate = error@af-south-1", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "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,\n so if you want to retain any configuration details, they must be included in the new\n lifecycle configuration. For information about lifecycle configuration, see Managing\n your storage lifecycle.

\n \n

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility.\n For the related API description, see PutBucketLifecycle.

\n
\n
\n
Rules
\n
Permissions
\n
HTTP Host header syntax
\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\n Lifecycle configuration can have up to 1,000 rules. This limit is not\n adjustable.

\n

Bucket lifecycle configuration supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, object size, or any combination\n of these. Accordingly, this section describes the latest API. The previous version\n of the API supported filtering based only on an object key name prefix, which is\n supported for backward compatibility for general purpose buckets. For the related\n API description, see PutBucketLifecycle.

\n \n

Lifecyle configurations for directory buckets only support expiring objects and\n cancelling multipart uploads. Expiring of versioned objects,transitions and tag\n filters are not supported.

\n
\n

A lifecycle rule consists of the following:

\n
    \n
  • \n

    A filter identifying a subset of objects to which the rule applies. The\n filter can be based on a key name prefix, object tags, object size, or any\n combination of these.

    \n
  • \n
  • \n

    A status indicating whether the rule is in effect.

    \n
  • \n
  • \n

    One or more lifecycle transition and expiration actions that you want\n Amazon S3 to perform on the objects identified by the filter. If the state of\n your bucket is versioning-enabled or versioning-suspended, you can have many\n versions of the same object (one current version and zero or more noncurrent\n versions). Amazon S3 provides predefined actions that you can specify for current\n and noncurrent object versions.

    \n
  • \n
\n

For more information, see Object Lifecycle\n Management and Lifecycle Configuration\n Elements.

\n
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:PutLifecycleConfiguration\n permission.

    \n

    You can also explicitly deny permissions. An explicit deny also\n supersedes any other permissions. If you want to block users or accounts\n from removing or deleting objects from your bucket, you must deny them\n permissions for the following actions:

    \n \n
  • \n
\n
    \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:PutLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n

The following operations are related to\n PutBucketLifecycleConfiguration:

\n \n
\n
", - "smithy.api#examples": [ - { - "title": "Put bucket lifecycle", - "documentation": "The following example replaces existing lifecycle configuration, if any, on the specified bucket. ", - "input": { - "Bucket": "examplebucket", - "LifecycleConfiguration": { - "Rules": [ - { - "Filter": { - "Prefix": "documents/" - }, - "Status": "Enabled", - "Transitions": [ - { - "Days": 365, - "StorageClass": "GLACIER" - } - ], - "Expiration": { - "Days": 3650 - }, - "ID": "TestOnly" - } - ] - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?lifecycle", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "access point arn + FIPS + DualStack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.af-south-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutBucketLifecycleConfigurationOutput": { - "type": "structure", - "members": { - "TransitionDefaultMinimumObjectSize": { - "target": "com.amazonaws.s3#TransitionDefaultMinimumObjectSize", - "traits": { - "smithy.api#documentation": "

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not\n transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", - "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "S3 outposts vanilla test", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#PutBucketLifecycleConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which to set the configuration.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ChecksumAlgorithm": { - "target": "com.amazonaws.s3#ChecksumAlgorithm", - "traits": { - "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

Container for lifecycle rules. You can add as many as 1,000 rules.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "LifecycleConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "TransitionDefaultMinimumObjectSize": { - "target": "com.amazonaws.s3#TransitionDefaultMinimumObjectSize", - "traits": { - "smithy.api#documentation": "

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not\n transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", - "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" - } + { + "documentation": "S3 outposts custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.example.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Endpoint": "https://example.amazonaws.com" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketLogging": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketLoggingRequest" + { + "documentation": "outposts arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "outposts arn with region mismatch, custom region and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Endpoint": "https://example.com", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n the source bucket. To set the logging status of a bucket, you must be the bucket\n owner.

\n

The bucket owner is automatically granted FULL_CONTROL to all logs. You use the\n 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 setting for S3\n Object Ownership, you can't use the Grantee request element to grant access\n to others. Permissions can only be granted using policies. For more information, see\n Permissions for server access log delivery in the\n Amazon S3 User Guide.

\n
\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights (by\n using request elements) in the following ways:

\n
    \n
  • \n

    By the person's ID:

    \n

    \n <>ID<><>GranteesEmail<>\n \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\n response to a GETObjectAcl request, appears as the\n 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\n elements. To disable logging, you use an empty BucketLoggingStatus request\n element:

\n

\n \n

\n

For more information about server access logging, see Server Access Logging in the\n Amazon S3 User Guide.

\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

The following operations are related to PutBucketLogging:

\n ", - "smithy.api#examples": [ - { - "title": "Set logging configuration for a bucket", - "documentation": "The following example sets logging policy on a bucket. For the Log Delivery group to deliver logs to the destination bucket, it needs permission for the READ_ACP action which the policy grants.", - "input": { - "Bucket": "sourcebucket", - "BucketLoggingStatus": { - "LoggingEnabled": { - "TargetBucket": "targetbucket", - "TargetPrefix": "MyBucketLogs/", - "TargetGrants": [ - { - "Grantee": { - "Type": "Group", - "URI": "http://acs.amazonaws.com/groups/global/AllUsers" - }, - "Permission": "READ" - } - ] - } - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?logging", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "outposts arn with region mismatch and UseArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutBucketLoggingRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which to set the logging parameters.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "BucketLoggingStatus": { - "target": "com.amazonaws.s3#BucketLoggingStatus", - "traits": { - "smithy.api#documentation": "

Container for logging status information.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "BucketLoggingStatus" - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The MD5 hash of the PutBucketLogging request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with region mismatch and UseArnRegion unset", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketMetricsConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketMetricsConfigurationRequest" + { + "documentation": "outposts arn with partition mismatch and UseArnRegion=true", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets a metrics configuration (specified by the metrics configuration ID) for the bucket.\n You can have up to 1,000 metrics configurations per bucket. If you're updating an existing\n metrics configuration, note that this is a full replacement of the existing metrics\n configuration. If you don't include the elements you want to keep, they are erased.

\n

To use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.

\n

The following operations are related to\n PutBucketMetricsConfiguration:

\n \n

\n PutBucketMetricsConfiguration has the following special error:

\n
    \n
  • \n

    Error code: TooManyConfigurations\n

    \n
      \n
    • \n

      Description: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.

      \n
    • \n
    • \n

      HTTP Status Code: HTTP 400 Bad Request

      \n
    • \n
    \n
  • \n
", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?metrics", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutBucketMetricsConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket for which the metrics configuration is set.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Id": { - "target": "com.amazonaws.s3#MetricsId", - "traits": { - "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", - "smithy.api#httpQuery": "id", - "smithy.api#required": {} - } - }, - "MetricsConfiguration": { - "target": "com.amazonaws.s3#MetricsConfiguration", - "traits": { - "smithy.api#documentation": "

Specifies the metrics configuration.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "MetricsConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "ARN with UseGlobalEndpoint and use-east-1 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketNotificationConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketNotificationConfigurationRequest" + { + "documentation": "S3 outposts does not support dualstack", + "expect": { + "error": "S3 Outposts does not support Dual-stack" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "S3 outposts does not support fips", + "expect": { + "error": "S3 Outposts does not support FIPS" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Enables notifications of specified events for a bucket. For more information about event\n notifications, see Configuring Event\n Notifications.

\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

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

This action replaces the existing notification configuration with the configuration you\n include in the request body.

\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 Events.

\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\n create per bucket, see Amazon S3 service quotas in Amazon Web Services\n 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 the required s3:PutBucketNotification permission.

\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 the\n configuration to your bucket.

\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

The following action is related to\n PutBucketNotificationConfiguration:

\n ", - "smithy.api#examples": [ - { - "title": "Set notification configuration for a bucket", - "documentation": "The following example sets notification configuration on a bucket to publish the object created events to an SNS topic.", - "input": { - "Bucket": "examplebucket", - "NotificationConfiguration": { - "TopicConfigurations": [ - { - "TopicArn": "arn:aws:sns:us-west-2:123456789012:s3-notification-topic", - "Events": [ - "s3:ObjectCreated:*" - ] - } - ] - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?notification", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "S3 outposts does not support accelerate", + "expect": { + "error": "S3 Outposts does not support S3 Accelerate" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "validates against subresource", + "expect": { + "error": "Invalid Arn: Outpost Access Point ARN contains sub resources" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:mybucket:object:foo" + } + }, + { + "documentation": "object lambda @us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutBucketNotificationConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "NotificationConfiguration": { - "target": "com.amazonaws.s3#NotificationConfiguration", - "traits": { - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "NotificationConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "SkipDestinationValidation": { - "target": "com.amazonaws.s3#SkipValidation", - "traits": { - "smithy.api#documentation": "

Skips validation of Amazon SQS, Amazon SNS, and Lambda\n destinations. True or false value.

", - "smithy.api#httpHeader": "x-amz-skip-destination-validation" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketOwnershipControls": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketOwnershipControlsRequest" + { + "documentation": "object lambda, colon resource deliminator @us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner" + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "object lambda @us-east-1, client region us-west-2, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n policy.

\n

For information about Amazon S3 Object Ownership, see Using object\n ownership.

\n

The following operations are related to PutBucketOwnershipControls:

\n ", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?ownershipControls", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutBucketOwnershipControlsRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose OwnershipControls you want to set.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The MD5 hash of the OwnershipControls request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "smithy.api#httpHeader": "Content-MD5" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "OwnershipControls": { - "target": "com.amazonaws.s3#OwnershipControls", - "traits": { - "smithy.api#documentation": "

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or\n ObjectWriter) that you want to apply to this Amazon S3 bucket.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "OwnershipControls" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "s3-external-1", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "s3-external-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `s3-external-1` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "s3-external-1", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "s3-external-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketPolicy": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketPolicyRequest" + { + "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `aws-global` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "object lambda @cn-north-1, client region us-west-2 (cross partition), useArnRegion=true", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner`) has `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "

Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n PutBucketPolicy permissions on the specified bucket and belong to\n the bucket owner's account in order to use this operation.

\n

If you don't have PutBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutBucketPolicy permission is required in a policy. For\n more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Example bucket policies
\n
\n

\n General purpose buckets example bucket policies\n - See Bucket policy\n examples in the Amazon S3 User Guide.

\n

\n Directory bucket example bucket policies\n - See Example bucket policies for S3 Express One Zone in the\n Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to PutBucketPolicy:

\n ", - "smithy.api#examples": [ - { - "title": "Set bucket policy", - "documentation": "The following example sets a permission policy on a bucket.", - "input": { - "Bucket": "examplebucket", - "Policy": "{\"Version\": \"2012-10-17\", \"Statement\": [{ \"Sid\": \"id-1\",\"Effect\": \"Allow\",\"Principal\": {\"AWS\": \"arn:aws:iam::123456789012:root\"}, \"Action\": [ \"s3:PutObject\",\"s3:PutObjectAcl\"], \"Resource\": [\"arn:aws:s3:::acl3/*\" ] } ]}" - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?policy", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutBucketPolicyRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The MD5 hash of the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", - "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" - } - }, - "ConfirmRemoveSelfBucketAccess": { - "target": "com.amazonaws.s3#ConfirmRemoveSelfBucketAccess", - "traits": { - "smithy.api#documentation": "

Set this parameter to true to confirm that you want to remove your permissions to change\n this bucket policy in the future.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-confirm-remove-self-bucket-access" - } - }, - "Policy": { - "target": "com.amazonaws.s3#Policy", - "traits": { - "smithy.api#documentation": "

The bucket policy as a JSON document.

\n

For directory buckets, the only IAM action supported in the bucket policy is\n s3express:CreateSession.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {} - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + { + "documentation": "object lambda with dualstack", + "expect": { + "error": "S3 Object Lambda does not support Dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketReplication": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketReplicationRequest" + { + "documentation": "object lambda @us-gov-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "object lambda @us-gov-east-1, with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Creates a replication configuration or replaces an existing one. For more information,\n see Replication in the Amazon S3 User Guide.

\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. You can invoke this request for a specific Amazon Web Services\n Region by using the \n aws:RequestedRegion\n condition key.

\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

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
Handling Replication of Encrypted Objects
\n
\n

By default, Amazon S3 doesn't replicate objects that are stored at rest using\n server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects,\n add the following: SourceSelectionCriteria,\n SseKmsEncryptedObjects, Status,\n EncryptionConfiguration, and ReplicaKmsKeyID. For\n information about replication configuration, see Replicating\n Objects Created with SSE Using KMS keys.

\n

For information on PutBucketReplication errors, see List of\n replication-related error codes\n

\n
\n
Permissions
\n
\n

To create a PutBucketReplication request, you must have\n s3:PutReplicationConfiguration permissions for the bucket.\n \n

\n

By default, a resource owner, in this case the Amazon Web Services account that created the\n bucket, can perform this operation. The resource owner can also grant others\n permissions to perform the operation. For more information about permissions, see\n Specifying Permissions in\n a Policy and Managing Access\n Permissions to Your Amazon S3 Resources.

\n \n

To perform this operation, the user or role performing the action must have\n the iam:PassRole\n permission.

\n
\n
\n
\n

The following operations are related to PutBucketReplication:

\n ", - "smithy.api#examples": [ - { - "title": "Set replication configuration on a bucket", - "documentation": "The following example sets replication configuration on a bucket.", - "input": { - "Bucket": "examplebucket", - "ReplicationConfiguration": { - "Role": "arn:aws:iam::123456789012:role/examplerole", - "Rules": [ - { - "Prefix": "", - "Status": "Enabled", - "Destination": { - "Bucket": "arn:aws:s3:::destinationbucket", - "StorageClass": "STANDARD" - } - } - ] - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?replication", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutBucketReplicationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "ReplicationConfiguration" - } - }, - "Token": { - "target": "com.amazonaws.s3#ObjectLockToken", - "traits": { - "smithy.api#documentation": "

A token to allow Object Lock to be enabled for an existing bucket.

", - "smithy.api#httpHeader": "x-amz-bucket-object-lock-token" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + { + "documentation": "object lambda @cn-north-1, with fips", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketRequestPayment": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketRequestPaymentRequest" + { + "documentation": "object lambda with accelerate", + "expect": { + "error": "S3 Object Lambda does not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true, + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "object lambda with invalid arn - bad service and someresource", + "expect": { + "error": "Invalid ARN: Unrecognized format: arn:aws:sqs:us-west-2:123456789012:someresource (type: someresource)" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource" + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

The following operations are related to PutBucketRequestPayment:

\n ", - "smithy.api#examples": [ - { - "title": "Set request payment configuration on a bucket.", - "documentation": "The following example sets request payment configuration on a bucket so that person requesting the download is charged.", - "input": { - "Bucket": "examplebucket", - "RequestPaymentConfiguration": { - "Payer": "Requester" - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?requestPayment", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutBucketRequestPaymentRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

Container for Payer.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "RequestPaymentConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "object lambda with invalid arn - invalid resource", + "expect": { + "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `bucket_name`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:bucket_name:mybucket" + } + }, + { + "documentation": "object lambda with invalid arn - missing region", + "expect": { + "error": "Invalid ARN: bucket ARN is missing a region" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda::123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - missing account-id", + "expect": { + "error": "Invalid ARN: Missing account id" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2::accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - account id contains invalid characters", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123.45678.9012`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket" + } + }, + { + "documentation": "object lambda with invalid arn - missing access point name", + "expect": { + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains invalid character: *", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `*`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:*" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains invalid character: .", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `my.bucket`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:my.bucket" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains sub resources", + "expect": { + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`." + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybucket:object:foo" + } + }, + { + "documentation": "object lambda with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.my-endpoint.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://my-endpoint.com", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Endpoint": "https://my-endpoint.com" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketTagging": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketTaggingRequest" + { + "documentation": "object lambda arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "WriteGetObjectResponse @ us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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,\n sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost\n of combined resources, organize your billing information according to resources with the\n same 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 and\n Tagging and Using Cost Allocation in Amazon S3\n Bucket Tags.

\n \n

When this operation sets the tags for a bucket, it will overwrite any current tags\n the bucket already has. You cannot use this operation to add tags to an existing list of\n 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\n Access Permissions to Your Amazon S3 Resources.

\n

\n PutBucketTagging has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.

\n
    \n
  • \n

    \n InvalidTag - The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Using\n Cost Allocation in Amazon S3 Bucket Tags.

    \n
  • \n
  • \n

    \n MalformedXML - The XML provided does not match the\n schema.

    \n
  • \n
  • \n

    \n OperationAborted - A conflicting conditional action is\n currently in progress against this resource. Please try again.

    \n
  • \n
  • \n

    \n InternalError - The service was unable to apply the provided\n tag to the bucket.

    \n
  • \n
\n

The following operations are related to PutBucketTagging:

\n ", - "smithy.api#examples": [ - { - "title": "Set tags on a bucket", - "documentation": "The following example sets tags on a bucket. Any existing tags are replaced.", - "input": { - "Bucket": "examplebucket", - "Tagging": { - "TagSet": [ - { - "Key": "Key1", - "Value": "Value1" - }, - { - "Key": "Key2", - "Value": "Value2" - } - ] - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?tagging", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } + { + "documentation": "WriteGetObjectResponse with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://my-endpoint.com" } - } - }, - "com.amazonaws.s3#PutBucketTaggingRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

Container for the TagSet and Tag elements.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "Tagging" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://my-endpoint.com" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Endpoint": "https://my-endpoint.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse @ us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda-fips.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "WriteGetObjectResponse with dualstack", + "expect": { + "error": "S3 Object Lambda does not support Dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with accelerate", + "expect": { + "error": "S3 Object Lambda does not support S3 Accelerate" + }, + "params": { + "Accelerate": true, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with fips in CN", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Region": "cn-north-1", + "UseObjectLambdaEndpoint": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "WriteGetObjectResponse with invalid partition", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "not a valid DNS name", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with an unknown partition", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "disableDoubleEncoding": true, + "signingRegion": "us-east.special" + } + ] + }, + "url": "https://s3-object-lambda.us-east.special.amazonaws.com" + } + }, + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east.special", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Prod us-west-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.op-0b1d075431d83bebd.s3-outposts.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Prod ap-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "ap-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.op-0b1d075431d83bebd.s3-outposts.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Prod us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.ec2.s3-outposts.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Prod me-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "me-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.ec2.s3-outposts.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "Bucket": "test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Beta", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3.op-0b1d075431d83bebd.example.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3", + "Endpoint": "https://example.amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketVersioning": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketVersioningRequest" + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Beta", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3.ec2.example.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3", + "Endpoint": "https://example.amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "S3 Outposts bucketAlias - No endpoint set for beta", + "expect": { + "error": "Expected a endpoint to be specified but no endpoint was found" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n \n

When you enable versioning on a bucket for the first time, it might take a short\n amount of time for the change to be fully propagated. While this change is propagating,\n you might encounter intermittent HTTP 404 NoSuchKey errors for requests to\n objects created or updated after enabling versioning. We recommend that you wait for 15\n minutes after enabling versioning before issuing write operations (PUT or\n DELETE) on objects in the bucket.

\n
\n

Sets the versioning state of an existing bucket.

\n

You can set the versioning state with one of the following values:

\n

\n Enabled\u2014Enables versioning for the objects in the\n bucket. All objects added to the bucket receive a unique version ID.

\n

\n Suspended\u2014Disables versioning for the objects in the\n bucket. All objects added to the bucket receive the version ID null.

\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

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 include the\n x-amz-mfa request header and the Status and the\n MfaDelete request elements in a request to set the versioning state of the\n bucket.

\n \n

If you have an object expiration lifecycle configuration in your non-versioned bucket\n and you want to maintain the same permanent delete behavior when you enable versioning,\n you must add a noncurrent expiration policy. The noncurrent expiration lifecycle\n configuration will manage the deletes of the noncurrent object versions in the\n version-enabled bucket. (A version-enabled bucket maintains one current and zero or more\n noncurrent object versions.) For more information, see Lifecycle and Versioning.

\n
\n

The following operations are related to PutBucketVersioning:

\n ", - "smithy.api#examples": [ - { - "title": "Set versioning configuration on a bucket", - "documentation": "The following example sets versioning configuration on bucket. The configuration enables versioning on the bucket.", - "input": { - "Bucket": "examplebucket", - "VersioningConfiguration": { - "MFADelete": "Disabled", - "Status": "Enabled" - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?versioning", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutBucketVersioningRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

>The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a\n message integrity check to verify that the request body was not corrupted in transit. For\n more information, see RFC\n 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device.

", - "smithy.api#httpHeader": "x-amz-mfa" - } - }, - "VersioningConfiguration": { - "target": "com.amazonaws.s3#VersioningConfiguration", - "traits": { - "smithy.api#documentation": "

Container for setting the versioning state.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "VersioningConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + { + "documentation": "S3 Outposts bucketAlias Invalid hardware type", + "expect": { + "error": "Unrecognized hardware type: \"Expected hardware type o or e but got h\"" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-h0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutBucketWebsite": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutBucketWebsiteRequest" + { + "documentation": "S3 Outposts bucketAlias Special character in Outpost Arn", + "expect": { + "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`." + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o00000754%1d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "output": { - "target": "smithy.api#Unit" + { + "documentation": "S3 Outposts bucketAlias - No endpoint set for beta", + "expect": { + "error": "Expected a endpoint to be specified but no endpoint was found" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-e0b1d075431d83bebde8xz5w8ijx1qzlbp3i3ebeta0--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

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

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

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.

\n

The maximum request length is limited to 128 KB.

", - "smithy.api#examples": [ - { - "title": "Set website configuration on a bucket", - "documentation": "The following example adds website configuration to a bucket.", - "input": { - "Bucket": "examplebucket", - "ContentMD5": "", - "WebsiteConfiguration": { - "IndexDocument": { - "Suffix": "index.html" - }, - "ErrorDocument": { - "Key": "error.html" - } - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?website", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutBucketWebsiteRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

Container for the request.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "WebsiteConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + { + "documentation": "S3 Snow with bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://10.0.1.12:433/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "http://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutObject": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutObjectRequest" + { + "documentation": "S3 Snow without bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://10.0.1.12:433" + } + }, + "params": { + "Region": "snow", + "Endpoint": "https://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "output": { - "target": "com.amazonaws.s3#PutObjectOutput" + { + "documentation": "S3 Snow no port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://10.0.1.12/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "http://10.0.1.12", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow dns endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://amazonaws.com/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "https://amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } }, - "errors": [ + { + "documentation": "Data Plane with short zone name", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ { - "target": "com.amazonaws.s3#EncryptionTypeMismatch" - }, + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--abcd-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--abcd-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone name china region", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ { - "target": "com.amazonaws.s3#InvalidRequest" - }, + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--abcd-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "mybucket--abcd-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone name with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ { - "target": "com.amazonaws.s3#InvalidWriteOffset" - }, + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--abcd-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--abcd-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone name with AP china region", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ { - "target": "com.amazonaws.s3#TooManyParts" + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--abcd-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "myaccesspoint--abcd-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone names (13 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" } - ], - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm" - }, - "smithy.api#documentation": "

Adds an object to a bucket.

\n \n
    \n
  • \n

    Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added\n the entire object to the bucket. You cannot use PutObject to only\n update a single piece of metadata for an existing object. You must put the entire\n object with updated metadata if you want to update some values.

    \n
  • \n
  • \n

    If your bucket uses the bucket owner enforced setting for Object Ownership,\n ACLs are disabled and no longer affect permissions. All objects written to the\n bucket by any account will be owned by the bucket owner.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\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. However, Amazon S3 provides\n features that can modify this behavior:

\n
    \n
  • \n

    \n S3 Object Lock - To prevent objects from\n being deleted or overwritten, you can use Amazon S3 Object\n Lock in the Amazon S3 User Guide.

    \n \n

    This functionality is not supported for directory buckets.

    \n
    \n
  • \n
  • \n

    \n If-None-Match - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a 412 Precondition Failed error. If a conflicting operation occurs during the upload, S3 returns a 409 ConditionalRequestConflict response. On a 409 failure, retry the upload.

    \n

    Expects the * character (asterisk).

    \n

    For more information, see Add preconditions to S3 operations with conditional requests in the Amazon S3 User Guide or RFC 7232.\n

    \n \n

    This functionality is not supported for S3 on Outposts.

    \n
    \n
  • \n
  • \n

    \n S3 Versioning - When you enable versioning\n for a bucket, if Amazon S3 receives multiple write requests for the same object\n simultaneously, it stores all versions of the objects. For each write request that is\n made to the same object, Amazon S3 automatically generates a unique version ID of that\n object being stored in Amazon S3. You can retrieve, replace, or delete any version of the\n object. For more information about versioning, see Adding\n Objects to Versioning-Enabled Buckets in the Amazon S3 User\n Guide. For information about returning the versioning state of a\n bucket, see GetBucketVersioning.

    \n \n

    This functionality is not supported for directory buckets.

    \n
    \n
  • \n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n following permissions are required in your policies when your\n PutObject request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:PutObject\n -\n To successfully complete the PutObject request, you must\n always have the s3:PutObject permission on a bucket to\n add an object to it.

      \n
    • \n
    • \n

      \n \n s3:PutObjectAcl\n - To successfully change the objects ACL of your\n PutObject request, you must have the\n s3:PutObjectAcl.

      \n
    • \n
    • \n

      \n \n s3:PutObjectTagging\n - To successfully set the tag-set with your\n PutObject request, you must have the\n s3:PutObjectTagging.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Data integrity with Content-MD5
\n
\n
    \n
  • \n

    \n General purpose bucket - To ensure that\n data is not corrupted traversing the network, use the\n Content-MD5 header. When you use this header, Amazon S3 checks\n the object against the provided MD5 value and, if they do not match, Amazon S3\n returns an error. Alternatively, when the object's ETag is its MD5 digest,\n you can calculate the MD5 while putting the object to Amazon S3 and compare the\n returned ETag to the calculated MD5 value.

    \n
  • \n
  • \n

    \n Directory bucket -\n This functionality is not supported for directory buckets.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

For more information about related Amazon S3 APIs, see the following:

\n ", - "smithy.api#examples": [ - { - "title": "To create an object.", - "documentation": "The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.", - "input": { - "Body": "filetoupload", - "Bucket": "examplebucket", - "Key": "objectkey" - }, - "output": { - "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" - } - }, - { - "title": "To upload an object (specify optional headers)", - "documentation": "The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.", - "input": { - "Body": "HappyFace.jpg", - "Bucket": "examplebucket", - "Key": "HappyFace.jpg", - "ServerSideEncryption": "AES256", - "StorageClass": "STANDARD_IA" - }, - "output": { - "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "ServerSideEncryption": "AES256" - } - }, - { - "title": "To upload an object", - "documentation": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", - "input": { - "Body": "HappyFace.jpg", - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" - }, - "output": { - "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" - } - }, - { - "title": "To upload an object and specify canned ACL.", - "documentation": "The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.", - "input": { - "ACL": "authenticated-read", - "Body": "filetoupload", - "Bucket": "examplebucket", - "Key": "exampleobject" - }, - "output": { - "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" - } - }, - { - "title": "To upload an object and specify optional tags", - "documentation": "The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.", - "input": { - "Body": "c:\\HappyFace.jpg", - "Bucket": "examplebucket", - "Key": "HappyFace.jpg", - "Tagging": "key1=value1&key2=value2" - }, - "output": { - "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" - } - }, - { - "title": "To upload an object and specify server-side encryption and object tags", - "documentation": "The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", - "input": { - "Body": "filetoupload", - "Bucket": "examplebucket", - "Key": "exampleobject", - "ServerSideEncryption": "AES256", - "Tagging": "key1=value1&key2=value2" - }, - "output": { - "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "ServerSideEncryption": "AES256" - } - }, - { - "title": "To upload object and specify user-defined metadata", - "documentation": "The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.", - "input": { - "Body": "filetoupload", - "Bucket": "examplebucket", - "Key": "exampleobject", - "Metadata": { - "metadata1": "value1", - "metadata2": "value2" - } - }, - "output": { - "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}/{Key+}?x-id=PutObject", - "code": 200 + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone names (13 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutObjectAcl": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutObjectAclRequest" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "output": { - "target": "com.amazonaws.s3#PutObjectAclOutput" + { + "documentation": "Data Plane with medium zone names (14 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "errors": [ + { + "documentation": "Data Plane with medium zone names (14 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ { - "target": "com.amazonaws.s3#NoSuchKey" + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long zone names (20 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" } - ], - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 the 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 functionality is not supported for Amazon S3 on Outposts.

\n

Depending on your application needs, you can choose to set the ACL on an object 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, you can continue to use that approach.\n For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.

\n
\n
\n
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\n supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has\n a predefined set of grantees and permissions. Specify the canned ACL name as\n the value of x-amz-acl. If you use this header, you cannot use\n other access control-specific headers in your request. For more information,\n see Canned\n 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. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use x-amz-acl header to set a canned ACL.\n These parameters map to the set of permissions that Amazon S3 supports in an ACL.\n 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\n the following:

    \n
      \n
    • \n

      \n id \u2013 if the value specified is the canonical user ID\n of an Amazon Web Services account

      \n
    • \n
    • \n

      \n uri \u2013 if you are granting permissions to a predefined\n group

      \n
    • \n
    • \n

      \n emailAddress \u2013 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\u00e3o 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\n list 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

You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.

\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights\n (using 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\n Object 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\u00e3o 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\n the ACL of the current version of an object. To set the ACL of a different\n version, use the versionId subresource.

\n
\n
\n

The following operations are related to PutObjectAcl:

\n ", - "smithy.api#examples": [ - { - "title": "To grant permissions using object ACL", - "documentation": "The following example adds grants to an object ACL. The first permission grants user1 and user2 FULL_CONTROL and the AllUsers group READ permission.", - "input": { - "AccessControlPolicy": {}, - "Bucket": "examplebucket", - "GrantFullControl": "emailaddress=user1@example.com,emailaddress=user2@example.com", - "GrantRead": "uri=http://acs.amazonaws.com/groups/global/AllUsers", - "Key": "HappyFace.jpg" - }, - "output": {} - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}/{Key+}?acl", - "code": 200 + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long zone names (20 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutObjectAclOutput": { - "type": "structure", - "members": { - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-ab1--x-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#PutObjectAclRequest": { - "type": "structure", - "members": { - "ACL": { - "target": "com.amazonaws.s3#ObjectCannedACL", - "traits": { - "smithy.api#documentation": "

The canned ACL to apply to the object. For more information, see Canned\n ACL.

", - "smithy.api#httpHeader": "x-amz-acl" - } - }, - "AccessControlPolicy": { - "target": "com.amazonaws.s3#AccessControlPolicy", - "traits": { - "smithy.api#documentation": "

Contains the elements that set the ACL permissions for an object per grantee.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "AccessControlPolicy" - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name that contains the object to which you want to attach the ACL.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.>\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", - "smithy.api#httpHeader": "x-amz-grant-full-control" - } - }, - "GrantRead": { - "target": "com.amazonaws.s3#GrantRead", - "traits": { - "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", - "smithy.api#httpHeader": "x-amz-grant-read" - } - }, - "GrantReadACP": { - "target": "com.amazonaws.s3#GrantReadACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

\n

This functionality is not supported for Amazon S3 on Outposts.

", - "smithy.api#httpHeader": "x-amz-grant-read-acp" - } - }, - "GrantWrite": { - "target": "com.amazonaws.s3#GrantWrite", - "traits": { - "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

", - "smithy.api#httpHeader": "x-amz-grant-write" - } - }, - "GrantWriteACP": { - "target": "com.amazonaws.s3#GrantWriteACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", - "smithy.api#httpHeader": "x-amz-grant-write-acp" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Key for which the PUT action was initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpQuery": "versionId" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "Data Plane with short zone fips china region", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short zone fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-ab1--xa-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutObjectLegalHold": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutObjectLegalHoldRequest" + { + "documentation": "Data Plane with short zone fips with AP china region", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "output": { - "target": "com.amazonaws.s3#PutObjectLegalHoldOutput" + { + "documentation": "Data Plane with short zone (13 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Applies a legal hold configuration to the specified object. For more information, see\n Locking\n Objects.

\n

This functionality is not supported for Amazon S3 on Outposts.

", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}/{Key+}?legal-hold", - "code": 200 + { + "documentation": "Data Plane with short zone (13 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutObjectLegalHoldOutput": { - "type": "structure", - "members": { - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with medium zone (14 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#PutObjectLegalHoldRequest": { - "type": "structure", - "members": { - "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

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "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#httpLabel": {}, - "smithy.api#required": {} - } - }, - "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#httpPayload": {}, - "smithy.api#xmlName": "LegalHold" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "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#httpQuery": "versionId" - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "Data Plane with medium zone (14 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long zone (20 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long zone (20 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutObjectLockConfiguration": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutObjectLockConfigurationRequest" + { + "documentation": "Data Plane with long AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "output": { - "target": "com.amazonaws.s3#PutObjectLockConfigurationOutput" + { + "documentation": "Data Plane with long AZ with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

    The DefaultRetention settings require both a mode and a\n period.

    \n
  • \n
  • \n

    The DefaultRetention period can be either Days or\n Years but you must select one. You cannot specify\n Days and Years at the same time.

    \n
  • \n
  • \n

    You can enable Object Lock for new or existing buckets. For more information,\n see Configuring Object\n Lock.

    \n
  • \n
\n
", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?object-lock", - "code": 200 + { + "documentation": "Data Plane with long AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" } - } - }, - "com.amazonaws.s3#PutObjectLockConfigurationOutput": { - "type": "structure", - "members": { - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long AZ fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#PutObjectLockConfigurationRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket whose Object Lock configuration you want to create or replace.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ObjectLockConfiguration": { - "target": "com.amazonaws.s3#ObjectLockConfiguration", - "traits": { - "smithy.api#documentation": "

The Object Lock configuration that you want to apply to the specified bucket.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "ObjectLockConfiguration" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "Token": { - "target": "com.amazonaws.s3#ObjectLockToken", - "traits": { - "smithy.api#documentation": "

A token to allow Object Lock to be enabled for an existing bucket.

", - "smithy.api#httpHeader": "x-amz-bucket-object-lock-token" - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "Control plane with short AZ bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutObjectOutput": { - "type": "structure", - "members": { - "Expiration": { - "target": "com.amazonaws.s3#Expiration", - "traits": { - "smithy.api#documentation": "

If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide,\n the response includes this header. It includes the expiry-date and\n rule-id key-value pairs that provide information about object expiration.\n The value of the rule-id is URL-encoded.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-expiration" - } - }, - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "smithy.api#documentation": "

Entity tag for the uploaded object.

\n

\n General purpose buckets - To ensure that data is not\n corrupted traversing the network, for objects where the ETag is the MD5 digest of the\n object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned\n ETag to the calculated MD5 value.

\n

\n Directory buckets - The ETag for the object in\n a directory bucket isn't the MD5 digest of the object.

", - "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header\n is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it\n was uploaded without a checksum (and Amazon S3 added the default checksum,\n CRC64NVME, to the uploaded object). For more information about how\n checksums are calculated with multipart uploads, see Checking object integrity\n in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" - } - }, - "ChecksumSHA1": { - "target": "com.amazonaws.s3#ChecksumSHA1", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" - } - }, - "ChecksumType": { - "target": "com.amazonaws.s3#ChecksumType", - "traits": { - "smithy.api#documentation": "

This header specifies the checksum type of the object, which determines how part-level\n checksums are combined to create an object-level checksum for multipart objects. For\n PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a\n data integrity check to verify that the checksum type that is received is the same checksum\n that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-type" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

Version ID of the object.

\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. For more information about versioning, see\n Adding Objects to\n Versioning-Enabled Buckets in the Amazon S3 User Guide. For\n information about returning the versioning state of a bucket, see GetBucketVersioning.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-version-id" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" - } - }, - "SSECustomerKeyMD5": { - "target": "com.amazonaws.s3#SSECustomerKeyMD5", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSEKMSEncryptionContext": { - "target": "com.amazonaws.s3#SSEKMSEncryptionContext", - "traits": { - "smithy.api#documentation": "

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets\n passed on to Amazon Web Services KMS for future GetObject \n operations on this object.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-context" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "Size": { - "target": "com.amazonaws.s3#Size", - "traits": { - "smithy.api#documentation": "

\n The size of the object in bytes. This value is only be present if you append to an object.\n

\n \n

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-size" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + { + "documentation": "Control plane with short AZ bucket china region", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control.cn-north-1.amazonaws.com.cn/mybucket--test-ab1--x-s3" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#PutObjectRequest": { - "type": "structure", - "members": { - "ACL": { - "target": "com.amazonaws.s3#ObjectCannedACL", - "traits": { - "smithy.api#documentation": "

The canned ACL to apply to the object. For more information, see Canned\n ACL in the Amazon S3 User Guide.

\n

When adding a new object, you can use headers to grant ACL-based permissions to\n individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are\n then added to the ACL on the object. By default, all objects are private. Only the owner\n has full access control. For more information, see Access Control List (ACL) Overview\n and Managing\n ACLs Using the REST API in the Amazon S3 User Guide.

\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\n canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that\n contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a\n 400 error with the error code AccessControlListNotSupported.\n For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-acl" - } - }, - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

Object data.

", - "smithy.api#httpPayload": {} - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name to which the PUT action was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "CacheControl": { - "target": "com.amazonaws.s3#CacheControl", - "traits": { - "smithy.api#documentation": "

Can be used to specify caching behavior along the request/reply chain. For more\n information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

", - "smithy.api#httpHeader": "Cache-Control" - } - }, - "ContentDisposition": { - "target": "com.amazonaws.s3#ContentDisposition", - "traits": { - "smithy.api#documentation": "

Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

", - "smithy.api#httpHeader": "Content-Disposition" - } - }, - "ContentEncoding": { - "target": "com.amazonaws.s3#ContentEncoding", - "traits": { - "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

", - "smithy.api#httpHeader": "Content-Encoding" - } - }, - "ContentLanguage": { - "target": "com.amazonaws.s3#ContentLanguage", - "traits": { - "smithy.api#documentation": "

The language the content is in.

", - "smithy.api#httpHeader": "Content-Language" - } - }, - "ContentLength": { - "target": "com.amazonaws.s3#ContentLength", - "traits": { - "smithy.api#documentation": "

Size of the body in bytes. This parameter is useful when the size of the body cannot be\n determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

", - "smithy.api#httpHeader": "Content-Length" - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to\n RFC 1864. This header can be used as a message integrity check to verify that the data is\n the same data that was originally sent. Although it is optional, we recommend using the\n Content-MD5 mechanism as an end-to-end integrity check. For more information about REST\n request authentication, see REST Authentication.

\n \n

The Content-MD5 or x-amz-sdk-checksum-algorithm header is\n required for any request to upload an object with a retention period configured using\n Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the\n Amazon S3 User Guide.

\n
\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "Content-MD5" - } - }, - "ContentType": { - "target": "com.amazonaws.s3#ContentType", - "traits": { - "smithy.api#documentation": "

A standard MIME type describing the format of the contents. For more information, see\n https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

", - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n \n

The Content-MD5 or x-amz-sdk-checksum-algorithm header is\n required for any request to upload an object with a retention period configured using\n Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the\n Amazon S3 User Guide.

\n
\n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

", - "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" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the object. The CRC64NVME checksum is\n always a full object checksum. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" - } - }, - "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 SHA1 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 SHA256 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": { - "smithy.api#documentation": "

The date and time at which the object is no longer cacheable. For more information, see\n https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

", - "smithy.api#httpHeader": "Expires" - } - }, - "IfMatch": { - "target": "com.amazonaws.s3#IfMatch", - "traits": { - "smithy.api#documentation": "

Uploads the object only if the ETag (entity tag) value provided during the WRITE\n operation matches the ETag of the object in S3. If the ETag values do not match, the\n operation returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

\n

Expects the ETag value as a string.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "If-Match" - } - }, - "IfNoneMatch": { - "target": "com.amazonaws.s3#IfNoneMatch", - "traits": { - "smithy.api#documentation": "

Uploads the object only if the object key name does not already exist in the bucket\n specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should retry the\n upload.

\n

Expects the '*' (asterisk) character.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "If-None-Match" - } - }, - "GrantFullControl": { - "target": "com.amazonaws.s3#GrantFullControl", - "traits": { - "smithy.api#documentation": "

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-full-control" - } - }, - "GrantRead": { - "target": "com.amazonaws.s3#GrantRead", - "traits": { - "smithy.api#documentation": "

Allows grantee to read the object data and its metadata.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-read" - } - }, - "GrantReadACP": { - "target": "com.amazonaws.s3#GrantReadACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to read the object ACL.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-read-acp" - } - }, - "GrantWriteACP": { - "target": "com.amazonaws.s3#GrantWriteACP", - "traits": { - "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-grant-write-acp" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which the PUT action was initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "WriteOffsetBytes": { - "target": "com.amazonaws.s3#WriteOffsetBytes", - "traits": { - "smithy.api#documentation": "

\n Specifies the offset for appending data to existing objects in bytes. \n The offset must be equal to the size of the existing object being appended to. \n If no object exists, setting this header to 0 will create a new object.\n

\n \n

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-write-offset-bytes" - } - }, - "Metadata": { - "target": "com.amazonaws.s3#Metadata", - "traits": { - "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", - "smithy.api#httpPrefixHeaders": "x-amz-meta-" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm that was used when you store this object in Amazon S3\n (for example, AES256, aws:kms, aws:kms:dsse).

\n
    \n
  • \n

    \n General purpose buckets - You have four mutually\n exclusive options to protect data using server-side encryption in Amazon S3, depending on\n how you choose to manage the encryption keys. Specifically, the encryption key\n options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and\n customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by\n using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt\n data at rest by using server-side encryption with other key options. For more\n information, see Using Server-Side\n Encryption in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n
  • \n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "smithy.api#documentation": "

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. For more information, see\n Storage\n Classes in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

    \n
  • \n
  • \n

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
", - "smithy.api#httpHeader": "x-amz-storage-class" - } - }, - "WebsiteRedirectLocation": { - "target": "com.amazonaws.s3#WebsiteRedirectLocation", - "traits": { - "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata. For information about object metadata, see Object Key and Metadata in the\n Amazon S3 User Guide.

\n

In the following example, the request header sets the redirect to an object\n (anotherPage.html) in the same bucket:

\n

\n x-amz-website-redirect-location: /anotherPage.html\n

\n

In the following example, the request header sets the object redirect to another\n website:

\n

\n x-amz-website-redirect-location: http://www.example.com/\n

\n

For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and\n How to\n Configure Website Page Redirects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-website-redirect-location" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example,\n AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same\n account that's issuing the command, you must use the full Key ARN not the Key ID.

\n

\n General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS \n key to use. If you specify\n x-amz-server-side-encryption:aws:kms or\n x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key\n (aws/s3) to protect the data.

\n

\n Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSEKMSEncryptionContext": { - "target": "com.amazonaws.s3#SSEKMSEncryptionContext", - "traits": { - "smithy.api#documentation": "

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets passed on\n to Amazon Web Services KMS for future GetObject operations on\n this object.

\n

\n General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-context" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

\n

\n General purpose buckets - Setting this header to\n true causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3\n Bucket Key.

\n

\n Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "Tagging": { - "target": "com.amazonaws.s3#TaggingHeader", - "traits": { - "smithy.api#documentation": "

The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For\n example, \"Key1=Value1\")

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-tagging" - } - }, - "ObjectLockMode": { - "target": "com.amazonaws.s3#ObjectLockMode", - "traits": { - "smithy.api#documentation": "

The Object Lock mode that you want to apply to this object.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-mode" - } - }, - "ObjectLockRetainUntilDate": { - "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", - "traits": { - "smithy.api#documentation": "

The date and time when you want this object's Object Lock to expire. Must be formatted\n as a timestamp parameter.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" - } - }, - "ObjectLockLegalHoldStatus": { - "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether a legal hold will be applied to this object. For more information\n about S3 Object Lock, see Object Lock in the\n Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "Control plane with short AZ bucket and fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control-fips.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutObjectRetention": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutObjectRetentionRequest" + { + "documentation": "Control plane with short AZ bucket and fips china region", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3" + } + } + ], + "params": { + "Region": "cn-north-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } }, - "output": { - "target": "com.amazonaws.s3#PutObjectRetentionOutput" + { + "documentation": "Control plane without bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "ListDirectoryBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane without bucket and fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "ListDirectoryBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short zone (13 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short zone (13 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short zone (13 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short zone (13 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with medium zone(14 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with medium zone(14 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long zone(20 chars)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long zone(20 chars) with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-az1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with medium zone (14 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with medium zone (14 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long zone (20 chars) fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--test1-long1-zone-ab1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long zone (20 chars) fips with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--test1-long1-zone-ab1--xa-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Control Plane host override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.custom.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "Control Plane host override with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--usw2-az1--xa-s3.custom.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "Control Plane host override no bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://custom.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://custom.com" + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n place an Object Retention configuration on objects. Bypassing a Governance Retention\n configuration requires the s3:BypassGovernanceRetention permission.

\n

This functionality is not supported for Amazon S3 on Outposts.

", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}/{Key+}?retention", - "code": 200 - } - } - }, - "com.amazonaws.s3#PutObjectRetentionOutput": { - "type": "structure", - "members": { - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } + { + "documentation": "Data plane host override non virtual session auth", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/mybucket--usw2-az1--x-s3" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://10.0.0.1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://10.0.0.1" + } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#PutObjectRetentionRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name that contains the object you want to apply this Object Retention\n configuration to.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The key name for the object that you want to apply this Object Retention configuration\n to.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "Retention": { - "target": "com.amazonaws.s3#ObjectLockRetention", - "traits": { - "smithy.api#documentation": "

The container element for the Object Retention configuration.

", - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "Retention" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The version ID for the object that you want to apply this Object Retention configuration\n to.

", - "smithy.api#httpQuery": "versionId" - } - }, - "BypassGovernanceRetention": { - "target": "com.amazonaws.s3#BypassGovernanceRetention", - "traits": { - "smithy.api#documentation": "

Indicates whether this action should bypass Governance-mode restrictions.

", - "smithy.api#httpHeader": "x-amz-bypass-governance-retention" - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + { + "documentation": "Data plane host override non virtual session auth with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://10.0.0.1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://10.0.0.1" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutObjectTagging": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutObjectTaggingRequest" + { + "documentation": "Control Plane host override ip", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/mybucket--usw2-az1--x-s3" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://10.0.0.1" + } }, - "output": { - "target": "com.amazonaws.s3#PutObjectTaggingOutput" + { + "documentation": "Control Plane host override ip with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://10.0.0.1" + } }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets the supplied tag-set to an object that already exists in a bucket. A tag is a\n key-value pair. For more information, see Object Tagging.

\n

You can associate tags with an object by sending a PUT request against the tagging\n subresource that is associated with the object. You can retrieve tags by sending a GET\n request. For more information, see GetObjectTagging.

\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

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

To put tags of any other version, use the versionId query parameter. You\n also need permission for the s3:PutObjectVersionTagging action.

\n

\n PutObjectTagging has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.

\n
    \n
  • \n

    \n InvalidTag - The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Object\n Tagging.

    \n
  • \n
  • \n

    \n MalformedXML - The XML provided does not match the\n schema.

    \n
  • \n
  • \n

    \n OperationAborted - A conflicting conditional action is\n currently in progress against this resource. Please try again.

    \n
  • \n
  • \n

    \n InternalError - The service was unable to apply the provided\n tag to the object.

    \n
  • \n
\n

The following operations are related to PutObjectTagging:

\n ", - "smithy.api#examples": [ - { - "title": "To add tags to an existing object", - "documentation": "The following example adds tags to an existing object.", - "input": { - "Bucket": "examplebucket", - "Key": "HappyFace.jpg", - "Tagging": { - "TagSet": [ - { - "Key": "Key3", - "Value": "Value3" - }, - { - "Key": "Key4", - "Value": "Value4" - } - ] - } - }, - "output": { - "VersionId": "null" - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}/{Key+}?tagging", - "code": 200 - } - } - }, - "com.amazonaws.s3#PutObjectTaggingOutput": { - "type": "structure", - "members": { - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The versionId of the object the tag-set was added to.

", - "smithy.api#httpHeader": "x-amz-version-id" - } + { + "documentation": "Data plane host override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.custom.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#PutObjectTaggingRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name containing the object.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Name of the object key.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

The versionId of the object that the tag-set will be added to.

", - "smithy.api#httpQuery": "versionId" - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

Container for the TagSet and Tag elements

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "Tagging" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "smithy.api#httpHeader": "x-amz-request-payer" - } + { + "documentation": "Data plane host override with AP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://myaccesspoint--usw2-az1--xa-s3.custom.com" } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#PutPublicAccessBlock": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#PutPublicAccessBlockRequest" + { + "documentation": "bad format error", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usaz1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--usaz1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm", - "requestChecksumRequired": true - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".

\n

The following operations are related to PutPublicAccessBlock:

\n ", - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}?publicAccessBlock", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseS3ExpressControlEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#PutPublicAccessBlockRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want\n to set.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The MD5 hash of the PutPublicAccessBlock request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { - "smithy.api#documentation": "

The PublicAccessBlock configuration that you want to apply to this Amazon S3\n bucket. You can enable the configuration options in any combination. For more information\n about when Amazon S3 considers a bucket or object public, see The Meaning of \"Public\" in the Amazon S3 User Guide.

", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "PublicAccessBlockConfiguration" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + { + "documentation": "bad AP format error", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--usaz1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--usaz1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#QueueArn": { - "type": "string" - }, - "com.amazonaws.s3#QueueConfiguration": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.s3#NotificationId" - }, - "QueueArn": { - "target": "com.amazonaws.s3#QueueArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message\n when it detects events of the specified type.

", - "smithy.api#required": {}, - "smithy.api#xmlName": "Queue" - } - }, - "Events": { - "target": "com.amazonaws.s3#EventList", - "traits": { - "smithy.api#documentation": "

A collection of bucket events for which to send notifications

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Event" - } - }, - "Filter": { - "target": "com.amazonaws.s3#NotificationConfigurationFilter" - } + { + "documentation": "bad format error no session auth", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usaz1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--usaz1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } }, - "traits": { - "smithy.api#documentation": "

Specifies the configuration for publishing messages to an Amazon Simple Queue Service\n (Amazon SQS) queue when Amazon S3 detects specified events.

" - } - }, - "com.amazonaws.s3#QueueConfigurationList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#QueueConfiguration" - } - }, - "com.amazonaws.s3#Quiet": { - "type": "boolean" - }, - "com.amazonaws.s3#QuoteCharacter": { - "type": "string" - }, - "com.amazonaws.s3#QuoteEscapeCharacter": { - "type": "string" - }, - "com.amazonaws.s3#QuoteFields": { - "type": "enum", - "members": { - "ALWAYS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ALWAYS" - } - }, - "ASNEEDED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ASNEEDED" - } - } - } - }, - "com.amazonaws.s3#Range": { - "type": "string" - }, - "com.amazonaws.s3#RecordDelimiter": { - "type": "string" - }, - "com.amazonaws.s3#RecordsEvent": { - "type": "structure", - "members": { - "Payload": { - "target": "com.amazonaws.s3#Body", - "traits": { - "smithy.api#documentation": "

The byte array of partial, one or more result records. S3 Select doesn't guarantee that\n a record will be self-contained in one record frame. To ensure continuous streaming of\n data, S3 Select might split the same record across multiple record frames instead of\n aggregating the results in memory. Some S3 clients (for example, the SDKforJava) handle this behavior by creating a ByteStream out of the response by\n default. Other clients might not handle this behavior by default. In those cases, you must\n aggregate the results on the client side and parse the response.

", - "smithy.api#eventPayload": {} - } - } + { + "documentation": "bad AP format error no session auth", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--usaz1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--usaz1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } }, - "traits": { - "smithy.api#documentation": "

The container for the records event.

" - } - }, - "com.amazonaws.s3#Redirect": { - "type": "structure", - "members": { - "HostName": { - "target": "com.amazonaws.s3#HostName", - "traits": { - "smithy.api#documentation": "

The host name to use in the redirect request.

" - } - }, - "HttpRedirectCode": { - "target": "com.amazonaws.s3#HttpRedirectCode", - "traits": { - "smithy.api#documentation": "

The HTTP redirect code to use on the response. Not required if one of the siblings is\n present.

" - } - }, - "Protocol": { - "target": "com.amazonaws.s3#Protocol", - "traits": { - "smithy.api#documentation": "

Protocol to use when redirecting requests. The default is the protocol that is used in\n the original request.

" - } - }, - "ReplaceKeyPrefixWith": { - "target": "com.amazonaws.s3#ReplaceKeyPrefixWith", - "traits": { - "smithy.api#documentation": "

The object key prefix to use in the redirect request. For example, to redirect requests\n for all pages with prefix docs/ (objects in the docs/ folder) to\n documents/, you can set a condition block with KeyPrefixEquals\n set to docs/ and in the Redirect set ReplaceKeyPrefixWith to\n /documents. Not required if one of the siblings is present. Can be present\n only if ReplaceKeyWith is not provided.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" - } - }, - "ReplaceKeyWith": { - "target": "com.amazonaws.s3#ReplaceKeyWith", - "traits": { - "smithy.api#documentation": "

The specific object key to use in the redirect request. For example, redirect request to\n error.html. Not required if one of the siblings is present. Can be present\n only if ReplaceKeyPrefixWith is not provided.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" - } - } + { + "documentation": "dual-stack error", + "expect": { + "error": "S3Express does not support Dual-stack." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#documentation": "

Specifies how requests are redirected. In the event of an error, you can specify a\n different error code to return.

" - } - }, - "com.amazonaws.s3#RedirectAllRequestsTo": { - "type": "structure", - "members": { - "HostName": { - "target": "com.amazonaws.s3#HostName", - "traits": { - "smithy.api#documentation": "

Name of the host where requests are redirected.

", - "smithy.api#required": {} - } - }, - "Protocol": { - "target": "com.amazonaws.s3#Protocol", - "traits": { - "smithy.api#documentation": "

Protocol to use when redirecting requests. The default is the protocol that is used in\n the original request.

" - } - } + { + "documentation": "dual-stack error with AP", + "expect": { + "error": "S3Express does not support Dual-stack." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#documentation": "

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3\n bucket.

" - } - }, - "com.amazonaws.s3#Region": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 20 - } - } - }, - "com.amazonaws.s3#ReplaceKeyPrefixWith": { - "type": "string" - }, - "com.amazonaws.s3#ReplaceKeyWith": { - "type": "string" - }, - "com.amazonaws.s3#ReplicaKmsKeyID": { - "type": "string" - }, - "com.amazonaws.s3#ReplicaModifications": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#ReplicaModificationsStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 replicates modifications on replicas.

", - "smithy.api#required": {} - } - } + { + "documentation": "accelerate error", + "expect": { + "error": "S3Express does not support S3 Accelerate." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#documentation": "

A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't\n replicate replica modifications by default. In the latest version of replication\n configuration (when Filter is specified), you can specify this element and set\n the status to Enabled to replicate modifications on replicas.

\n \n

If you don't specify the Filter element, Amazon S3 assumes that the\n replication configuration is the earlier version, V1. In the earlier version, this\n element is not allowed.

\n
" - } - }, - "com.amazonaws.s3#ReplicaModificationsStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } - } - } - }, - "com.amazonaws.s3#ReplicationConfiguration": { - "type": "structure", - "members": { - "Role": { - "target": "com.amazonaws.s3#Role", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when\n replicating objects. For more information, see How to Set Up Replication\n in the Amazon S3 User Guide.

", - "smithy.api#required": {} - } - }, - "Rules": { - "target": "com.amazonaws.s3#ReplicationRules", - "traits": { - "smithy.api#documentation": "

A container for one or more replication rules. A replication configuration must have at\n least one rule and can contain a maximum of 1,000 rules.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Rule" - } - } + { + "documentation": "accelerate error with AP", + "expect": { + "error": "S3Express does not support S3 Accelerate." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "myaccesspoint--test-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#documentation": "

A container for replication rules. You can add up to 1,000 rules. The maximum size of a\n replication configuration is 2 MB.

" - } - }, - "com.amazonaws.s3#ReplicationRule": { - "type": "structure", - "members": { - "ID": { - "target": "com.amazonaws.s3#ID", - "traits": { - "smithy.api#documentation": "

A unique identifier for the rule. The maximum value is 255 characters.

" - } - }, - "Priority": { - "target": "com.amazonaws.s3#Priority", - "traits": { - "smithy.api#documentation": "

The priority indicates which rule has precedence whenever two or more replication rules\n conflict. Amazon S3 will attempt to replicate objects according to all replication rules.\n However, if there are two or more rules with the same destination bucket, then objects will\n be replicated according to the rule with the highest priority. The higher the number, the\n higher the priority.

\n

For more information, see Replication in the\n Amazon S3 User Guide.

" - } - }, - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#deprecated": {}, - "smithy.api#documentation": "

An object key name prefix that identifies the object or objects to which the rule\n applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket,\n specify an empty string.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" - } - }, - "Filter": { - "target": "com.amazonaws.s3#ReplicationRuleFilter" - }, - "Status": { - "target": "com.amazonaws.s3#ReplicationRuleStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether the rule is enabled.

", - "smithy.api#required": {} - } - }, - "SourceSelectionCriteria": { - "target": "com.amazonaws.s3#SourceSelectionCriteria", - "traits": { - "smithy.api#documentation": "

A container that describes additional filters for identifying the source objects that\n you want to replicate. You can choose to enable or disable the replication of these\n objects. Currently, Amazon S3 supports only the filter that you can specify for objects created\n with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service\n (SSE-KMS).

" - } - }, - "ExistingObjectReplication": { - "target": "com.amazonaws.s3#ExistingObjectReplication", - "traits": { - "smithy.api#documentation": "

Optional configuration to replicate existing source bucket objects.

\n \n

This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the\n Amazon S3 User Guide.

\n
" - } - }, - "Destination": { - "target": "com.amazonaws.s3#Destination", - "traits": { - "smithy.api#documentation": "

A container for information about the replication destination and its configurations\n including enabling the S3 Replication Time Control (S3 RTC).

", - "smithy.api#required": {} - } - }, - "DeleteMarkerReplication": { - "target": "com.amazonaws.s3#DeleteMarkerReplication" - } + { + "documentation": "Data plane bucket format error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.bucket--test-ab1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "my.bucket--test-ab1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#documentation": "

Specifies which Amazon S3 objects to replicate and where to store the replicas.

" - } - }, - "com.amazonaws.s3#ReplicationRuleAndOperator": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

" - } - }, - "Tags": { - "target": "com.amazonaws.s3#TagSet", - "traits": { - "smithy.api#documentation": "

An array of tags containing key and value pairs.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - } + { + "documentation": "Data plane AP format error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.myaccesspoint--test-ab1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "my.myaccesspoint--test-ab1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } }, - "traits": { - "smithy.api#documentation": "

A container for specifying rule filters. The filters determine the subset of objects to\n which the rule applies. This element is required only if you specify more than one filter.

\n

For example:

\n
    \n
  • \n

    If you specify both a Prefix and a Tag filter, wrap\n these filters in an And tag.

    \n
  • \n
  • \n

    If you specify a filter based on multiple tags, wrap the Tag elements\n in an And tag.

    \n
  • \n
" - } - }, - "com.amazonaws.s3#ReplicationRuleFilter": { - "type": "structure", - "members": { - "Prefix": { - "target": "com.amazonaws.s3#Prefix", - "traits": { - "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" - } - }, - "Tag": { - "target": "com.amazonaws.s3#Tag", - "traits": { - "smithy.api#documentation": "

A container for specifying a tag key and value.

\n

The rule applies only to objects that have the tag in their tag set.

" - } - }, - "And": { - "target": "com.amazonaws.s3#ReplicationRuleAndOperator", - "traits": { - "smithy.api#documentation": "

A container for specifying rule filters. The filters determine the subset of objects to\n which the rule applies. This element is required only if you specify more than one filter.\n For example:

\n
    \n
  • \n

    If you specify both a Prefix and a Tag filter, wrap\n these filters in an And tag.

    \n
  • \n
  • \n

    If you specify a filter based on multiple tags, wrap the Tag elements\n in an And tag.

    \n
  • \n
" - } - } + { + "documentation": "host override data plane bucket error session auth", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.bucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "my.bucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } }, - "traits": { - "smithy.api#documentation": "

A filter that identifies the subset of objects to which the replication rule applies. A\n Filter must specify exactly one Prefix, Tag, or\n an And child element.

" - } - }, - "com.amazonaws.s3#ReplicationRuleStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } - } - } - }, - "com.amazonaws.s3#ReplicationRules": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#ReplicationRule" - } - }, - "com.amazonaws.s3#ReplicationStatus": { - "type": "enum", - "members": { - "COMPLETE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COMPLETE" - } - }, - "PENDING": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "PENDING" - } - }, - "FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FAILED" - } - }, - "REPLICA": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "REPLICA" - } - }, - "COMPLETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COMPLETED" - } - } - } - }, - "com.amazonaws.s3#ReplicationTime": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#ReplicationTimeStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether the replication time is enabled.

", - "smithy.api#required": {} - } - }, - "Time": { - "target": "com.amazonaws.s3#ReplicationTimeValue", - "traits": { - "smithy.api#documentation": "

A container specifying the time by which replication should be complete for all objects\n and operations on objects.

", - "smithy.api#required": {} - } - } + { + "documentation": "host override data plane AP error session auth", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "host override data plane bucket error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "params": { + "Region": "us-west-2", + "Bucket": "my.bucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com", + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "host override data plane AP error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "params": { + "Region": "us-west-2", + "Bucket": "my.myaccesspoint--usw2-az1--xa-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com", + "DisableS3ExpressSessionAuth": true + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.s3#AnalyticsAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix to use when evaluating an AND predicate: The prefix that an object must have\n to be included in the metrics results.

" + } + }, + "Tags": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

The list of tags to use when evaluating an AND predicate.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + } + }, + "traits": { + "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates in any combination, and an object must match\n all of the predicates for the filter to apply.

" + } + }, + "com.amazonaws.s3#AnalyticsConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#AnalyticsId", + "traits": { + "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", + "smithy.api#required": {} + } + }, + "Filter": { + "target": "com.amazonaws.s3#AnalyticsFilter", + "traits": { + "smithy.api#documentation": "

The filter used to describe a set of objects for analyses. A filter must have exactly\n one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided,\n all objects will be considered in any analysis.

" + } + }, + "StorageClassAnalysis": { + "target": "com.amazonaws.s3#StorageClassAnalysis", + "traits": { + "smithy.api#documentation": "

Contains data related to access patterns to be collected and made available to analyze\n the tradeoffs between different storage classes.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the configuration and any analyses for the analytics filter of an Amazon S3\n bucket.

" + } + }, + "com.amazonaws.s3#AnalyticsConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#AnalyticsConfiguration" + } + }, + "com.amazonaws.s3#AnalyticsExportDestination": { + "type": "structure", + "members": { + "S3BucketDestination": { + "target": "com.amazonaws.s3#AnalyticsS3BucketDestination", + "traits": { + "smithy.api#documentation": "

A destination signifying output to an S3 bucket.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Where to publish the analytics results.

" + } + }, + "com.amazonaws.s3#AnalyticsFilter": { + "type": "union", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix to use when evaluating an analytics filter.

" + } + }, + "Tag": { + "target": "com.amazonaws.s3#Tag", + "traits": { + "smithy.api#documentation": "

The tag to use when evaluating an analytics filter.

" + } + }, + "And": { + "target": "com.amazonaws.s3#AnalyticsAndOperator", + "traits": { + "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating an analytics\n filter. The operator must have at least two predicates.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The filter used to describe a set of objects for analyses. A filter must have exactly\n one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided,\n all objects will be considered in any analysis.

" + } + }, + "com.amazonaws.s3#AnalyticsId": { + "type": "string" + }, + "com.amazonaws.s3#AnalyticsS3BucketDestination": { + "type": "structure", + "members": { + "Format": { + "target": "com.amazonaws.s3#AnalyticsS3ExportFileFormat", + "traits": { + "smithy.api#documentation": "

Specifies the file format used when exporting data to Amazon S3.

", + "smithy.api#required": {} + } + }, + "BucketAccountId": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID that owns the destination S3 bucket. If no account ID is provided, the\n owner is not validated before exporting data.

\n \n

Although this value is optional, we strongly recommend that you set it to help\n prevent problems if the destination bucket ownership changes.

\n
" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket to which data is exported.

", + "smithy.api#required": {} + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix to use when exporting data. The prefix is prepended to all results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains information about where to publish the analytics results.

" + } + }, + "com.amazonaws.s3#AnalyticsS3ExportFileFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" + } + } + } + }, + "com.amazonaws.s3#ArchiveStatus": { + "type": "enum", + "members": { + "ARCHIVE_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVE_ACCESS" + } + }, + "DEEP_ARCHIVE_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE_ACCESS" + } + } + } + }, + "com.amazonaws.s3#Body": { + "type": "blob" + }, + "com.amazonaws.s3#Bucket": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket.

" + } + }, + "CreationDate": { + "target": "com.amazonaws.s3#CreationDate", + "traits": { + "smithy.api#documentation": "

Date the bucket was created. This date can change when making changes to your bucket,\n such as editing its bucket policy.

" + } + }, + "BucketRegion": { + "target": "com.amazonaws.s3#BucketRegion", + "traits": { + "smithy.api#documentation": "

\n BucketRegion indicates the Amazon Web Services region where the bucket is located. If the\n request contains at least one valid parameter, it is included in the response.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

In terms of implementation, a Bucket is a resource.

" + } + }, + "com.amazonaws.s3#BucketAccelerateStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Suspended": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Suspended" + } + } + } + }, + "com.amazonaws.s3#BucketAlreadyExists": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The requested bucket name is not available. The bucket namespace is shared by all users\n of the system. Select a different name and try again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.s3#BucketAlreadyOwnedByYou": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The bucket you tried to create already exists, and you own it. Amazon S3 returns this error\n in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you\n re-create an existing bucket that you already own in the North Virginia Region, Amazon S3\n returns 200 OK and resets the bucket access control lists (ACLs).

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.s3#BucketCannedACL": { + "type": "enum", + "members": { + "private": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "private" + } + }, + "public_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read" + } + }, + "public_read_write": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read-write" + } + }, + "authenticated_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "authenticated-read" + } + } + } + }, + "com.amazonaws.s3#BucketInfo": { + "type": "structure", + "members": { + "DataRedundancy": { + "target": "com.amazonaws.s3#DataRedundancy", + "traits": { + "smithy.api#documentation": "

The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

" + } + }, + "Type": { + "target": "com.amazonaws.s3#BucketType", + "traits": { + "smithy.api#documentation": "

The type of bucket.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the information about the bucket that will be created. For more information\n about directory buckets, see Directory buckets in the Amazon S3 User Guide.

\n \n

This functionality is only supported by directory buckets.

\n
" + } + }, + "com.amazonaws.s3#BucketKeyEnabled": { + "type": "boolean" + }, + "com.amazonaws.s3#BucketLifecycleConfiguration": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.s3#LifecycleRules", + "traits": { + "smithy.api#documentation": "

A lifecycle rule for individual objects in an Amazon S3 bucket.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Rule" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more\n information, see Object Lifecycle Management\n in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#BucketLocationConstraint": { + "type": "enum", + "members": { + "af_south_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "af-south-1" + } + }, + "ap_east_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-east-1" + } + }, + "ap_northeast_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-northeast-1" + } + }, + "ap_northeast_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-northeast-2" + } + }, + "ap_northeast_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-northeast-3" + } + }, + "ap_south_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-south-1" + } + }, + "ap_south_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-south-2" + } + }, + "ap_southeast_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-1" + } + }, + "ap_southeast_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-2" + } + }, + "ap_southeast_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-3" + } + }, + "ap_southeast_4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-4" + } + }, + "ap_southeast_5": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-southeast-5" + } + }, + "ca_central_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ca-central-1" + } + }, + "cn_north_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cn-north-1" + } + }, + "cn_northwest_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cn-northwest-1" + } + }, + "EU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EU" + } + }, + "eu_central_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-central-1" + } + }, + "eu_central_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-central-2" + } + }, + "eu_north_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-north-1" + } + }, + "eu_south_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-south-1" + } + }, + "eu_south_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-south-2" + } + }, + "eu_west_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-west-1" + } + }, + "eu_west_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-west-2" + } + }, + "eu_west_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-west-3" + } + }, + "il_central_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "il-central-1" + } + }, + "me_central_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "me-central-1" + } + }, + "me_south_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "me-south-1" + } + }, + "sa_east_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sa-east-1" + } + }, + "us_east_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-east-2" + } + }, + "us_gov_east_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-gov-east-1" + } + }, + "us_gov_west_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-gov-west-1" + } + }, + "us_west_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-west-1" + } + }, + "us_west_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us-west-2" + } + } + } + }, + "com.amazonaws.s3#BucketLocationName": { + "type": "string" + }, + "com.amazonaws.s3#BucketLoggingStatus": { + "type": "structure", + "members": { + "LoggingEnabled": { + "target": "com.amazonaws.s3#LoggingEnabled" + } + }, + "traits": { + "smithy.api#documentation": "

Container for logging status information.

" + } + }, + "com.amazonaws.s3#BucketLogsPermission": { + "type": "enum", + "members": { + "FULL_CONTROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL_CONTROL" + } + }, + "READ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READ" + } + }, + "WRITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WRITE" + } + } + } + }, + "com.amazonaws.s3#BucketName": { + "type": "string" + }, + "com.amazonaws.s3#BucketRegion": { + "type": "string" + }, + "com.amazonaws.s3#BucketType": { + "type": "enum", + "members": { + "Directory": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Directory" + } + } + } + }, + "com.amazonaws.s3#BucketVersioningStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Suspended": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Suspended" + } + } + } + }, + "com.amazonaws.s3#Buckets": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Bucket", + "traits": { + "smithy.api#xmlName": "Bucket" + } + } + }, + "com.amazonaws.s3#BypassGovernanceRetention": { + "type": "boolean" + }, + "com.amazonaws.s3#BytesProcessed": { + "type": "long" + }, + "com.amazonaws.s3#BytesReturned": { + "type": "long" + }, + "com.amazonaws.s3#BytesScanned": { + "type": "long" + }, + "com.amazonaws.s3#CORSConfiguration": { + "type": "structure", + "members": { + "CORSRules": { + "target": "com.amazonaws.s3#CORSRules", + "traits": { + "smithy.api#documentation": "

A set of origins and methods (cross-origin access that you want to allow). You can add\n up to 100 rules to the configuration.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "CORSRule" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more\n information, see Enabling\n Cross-Origin Resource Sharing in the\n Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#CORSRule": { + "type": "structure", + "members": { + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

Unique identifier for the rule. The value cannot be longer than 255 characters.

" + } + }, + "AllowedHeaders": { + "target": "com.amazonaws.s3#AllowedHeaders", + "traits": { + "smithy.api#documentation": "

Headers that are specified in the Access-Control-Request-Headers header.\n These headers are allowed in a preflight OPTIONS request. In response to any preflight\n OPTIONS request, Amazon S3 returns any requested headers that are allowed.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AllowedHeader" + } + }, + "AllowedMethods": { + "target": "com.amazonaws.s3#AllowedMethods", + "traits": { + "smithy.api#documentation": "

An HTTP method that you allow the origin to execute. Valid values are GET,\n PUT, HEAD, POST, and DELETE.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AllowedMethod" + } + }, + "AllowedOrigins": { + "target": "com.amazonaws.s3#AllowedOrigins", + "traits": { + "smithy.api#documentation": "

One or more origins you want customers to be able to access the bucket from.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AllowedOrigin" + } + }, + "ExposeHeaders": { + "target": "com.amazonaws.s3#ExposeHeaders", + "traits": { + "smithy.api#documentation": "

One or more headers in the response that you want customers to be able to access from\n their applications (for example, from a JavaScript XMLHttpRequest\n object).

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "ExposeHeader" + } + }, + "MaxAgeSeconds": { + "target": "com.amazonaws.s3#MaxAgeSeconds", + "traits": { + "smithy.api#documentation": "

The time in seconds that your browser is to cache the preflight response for the\n specified resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a cross-origin access rule for an Amazon S3 bucket.

" + } + }, + "com.amazonaws.s3#CORSRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#CORSRule" + } + }, + "com.amazonaws.s3#CSVInput": { + "type": "structure", + "members": { + "FileHeaderInfo": { + "target": "com.amazonaws.s3#FileHeaderInfo", + "traits": { + "smithy.api#documentation": "

Describes the first line of input. Valid values are:

\n
    \n
  • \n

    \n NONE: First line is not a header.

    \n
  • \n
  • \n

    \n IGNORE: First line is a header, but you can't use the header values\n to indicate the column in an expression. You can use column position (such as _1, _2,\n \u2026) to indicate the column (SELECT s._1 FROM OBJECT s).

    \n
  • \n
  • \n

    \n Use: First line is a header, and you can use the header value to\n identify a column in an expression (SELECT \"name\" FROM OBJECT).

    \n
  • \n
" + } + }, + "Comments": { + "target": "com.amazonaws.s3#Comments", + "traits": { + "smithy.api#documentation": "

A single character used to indicate that a row should be ignored when the character is\n present at the start of that row. You can specify any character to indicate a comment line.\n The default character is #.

\n

Default: #\n

" + } + }, + "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\n \".

" + } + }, + "RecordDelimiter": { + "target": "com.amazonaws.s3#RecordDelimiter", + "traits": { + "smithy.api#documentation": "

A single character used to separate individual records in the input. Instead of the\n default value, you can specify an arbitrary delimiter.

" + } + }, + "FieldDelimiter": { + "target": "com.amazonaws.s3#FieldDelimiter", + "traits": { + "smithy.api#documentation": "

A single character used to separate individual fields in a record. You can specify an\n arbitrary delimiter.

" + } + }, + "QuoteCharacter": { + "target": "com.amazonaws.s3#QuoteCharacter", + "traits": { + "smithy.api#documentation": "

A single character used for escaping when the field delimiter is part of the value. For\n example, if the value is a, b, Amazon S3 wraps this field value in quotation marks,\n as follows: \" a , b \".

\n

Type: String

\n

Default: \"\n

\n

Ancestors: CSV\n

" + } + }, + "AllowQuotedRecordDelimiter": { + "target": "com.amazonaws.s3#AllowQuotedRecordDelimiter", + "traits": { + "smithy.api#documentation": "

Specifies that CSV field values may contain quoted record delimiters and such records\n should be allowed. Default value is FALSE. Setting this value to TRUE may lower\n performance.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes how an uncompressed comma-separated values (CSV)-formatted input object is\n formatted.

" + } + }, + "com.amazonaws.s3#CSVOutput": { + "type": "structure", + "members": { + "QuoteFields": { + "target": "com.amazonaws.s3#QuoteFields", + "traits": { + "smithy.api#documentation": "

Indicates whether to use quotation marks around output fields.

\n
    \n
  • \n

    \n ALWAYS: Always use quotation marks for output fields.

    \n
  • \n
  • \n

    \n ASNEEDED: Use quotation marks for output fields when needed.

    \n
  • \n
" + } + }, + "QuoteEscapeCharacter": { + "target": "com.amazonaws.s3#QuoteEscapeCharacter", + "traits": { + "smithy.api#documentation": "

The single character used for escaping the quote character inside an already escaped\n value.

" + } + }, + "RecordDelimiter": { + "target": "com.amazonaws.s3#RecordDelimiter", + "traits": { + "smithy.api#documentation": "

A single character used to separate individual records in the output. Instead of the\n default value, you can specify an arbitrary delimiter.

" + } + }, + "FieldDelimiter": { + "target": "com.amazonaws.s3#FieldDelimiter", + "traits": { + "smithy.api#documentation": "

The value used to separate individual fields in a record. You can specify an arbitrary\n delimiter.

" + } + }, + "QuoteCharacter": { + "target": "com.amazonaws.s3#QuoteCharacter", + "traits": { + "smithy.api#documentation": "

A single character used for escaping when the field delimiter is part of the value. For\n example, if the value is a, b, Amazon S3 wraps this field value in quotation marks,\n as follows: \" a , b \".

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes how uncompressed comma-separated values (CSV)-formatted results are\n formatted.

" + } + }, + "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present\n if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see 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": "enum", + "members": { + "CRC32": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CRC32" + } + }, + "CRC32C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CRC32C" + } + }, + "SHA1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHA1" + } + }, + "SHA256": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHA256" + } + }, + "CRC64NVME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CRC64NVME" + } + } + } + }, + "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#ChecksumCRC64NVME": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumMode": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + } + } + }, + "com.amazonaws.s3#ChecksumSHA1": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumSHA256": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumType": { + "type": "enum", + "members": { + "COMPOSITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPOSITE" + } + }, + "FULL_OBJECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL_OBJECT" + } + } + } + }, + "com.amazonaws.s3#Code": { + "type": "string" + }, + "com.amazonaws.s3#Comments": { + "type": "string" + }, + "com.amazonaws.s3#CommonPrefix": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Container for the specified common prefix.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for all (if there are any) keys between Prefix and the next occurrence of the\n string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in\n the directory specified by Prefix. For example, if the prefix is notes/ and the delimiter\n is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

" + } + }, + "com.amazonaws.s3#CommonPrefixList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#CommonPrefix" + } + }, + "com.amazonaws.s3#CompleteMultipartUpload": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CompleteMultipartUploadRequest" + }, + "output": { + "target": "com.amazonaws.s3#CompleteMultipartUploadOutput" + }, + "traits": { + "smithy.api#documentation": "

Completes a multipart upload by assembling previously uploaded parts.

\n

You first initiate the multipart upload and then upload all parts using the UploadPart\n operation or the UploadPartCopy operation.\n After successfully uploading all relevant parts of an upload, you call this\n CompleteMultipartUpload operation to complete the upload. Upon receiving\n this request, Amazon S3 concatenates all the parts in ascending order by part number to create a\n new object. In the CompleteMultipartUpload request, you must provide the parts list and\n ensure that the parts list is complete. The CompleteMultipartUpload API operation\n concatenates the parts that you provide in the list. For each part in the list, you must\n provide the PartNumber value and the ETag value that are returned\n after that part was uploaded.

\n

The processing of a CompleteMultipartUpload request could take several minutes to\n finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that\n specifies a 200 OK response. While processing is in progress, Amazon S3\n periodically sends white space characters to keep the connection from timing out. A request\n could fail after the initial 200 OK response has been sent. This means that a\n 200 OK response can contain either a success or an error. The error\n response might be embedded in the 200 OK response. If you call this API\n operation directly, make sure to design your application to parse the contents of the\n response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition.\n The SDKs detect the embedded error and apply error handling per your configuration settings\n (including automatically retrying the request as appropriate). If the condition persists,\n the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an\n error).

\n

Note that if CompleteMultipartUpload fails, applications should be prepared\n to retry any failed requests (including 500 error responses). For more information, see\n Amazon S3 Error\n Best Practices.

\n \n

You can't use Content-Type: application/x-www-form-urlencoded for the\n CompleteMultipartUpload requests. Also, if you don't provide a Content-Type\n header, CompleteMultipartUpload can still return a 200 OK\n response.

\n
\n

For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n

    If you provide an additional checksum\n value in your MultipartUpload requests and the\n object is encrypted with Key Management Service, you must have permission to use the\n kms:Decrypt action for the\n CompleteMultipartUpload request to succeed.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: EntityTooSmall\n

    \n
      \n
    • \n

      Description: Your proposed upload is smaller than the minimum\n allowed object size. Each part must be at least 5 MB in size, except\n the last part.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

      \n
    • \n
    \n
  • \n
  • \n

    Error Code: InvalidPart\n

    \n
      \n
    • \n

      Description: One or more of the specified parts could not be found.\n The part might not have been uploaded, or the specified ETag might not\n have matched the uploaded part's ETag.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

      \n
    • \n
    \n
  • \n
  • \n

    Error Code: InvalidPartOrder\n

    \n
      \n
    • \n

      Description: The list of parts was not in ascending order. The\n parts list must be specified in order by part number.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

      \n
    • \n
    \n
  • \n
  • \n

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CompleteMultipartUpload:

\n ", + "smithy.api#examples": [ + { + "title": "To complete multipart upload", + "documentation": "The following example completes a multipart upload.", + "input": { + "Bucket": "examplebucket", + "Key": "bigobject", + "MultipartUpload": { + "Parts": [ + { + "PartNumber": 1, + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" + }, + { + "PartNumber": 2, + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" + } + ] + }, + "UploadId": "7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" }, - "traits": { - "smithy.api#documentation": "

A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is\n enabled and the time when all objects and operations on objects must be replicated. Must be\n specified together with a Metrics block.

" - } - }, - "com.amazonaws.s3#ReplicationTimeStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } - }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } - } - } - }, - "com.amazonaws.s3#ReplicationTimeValue": { - "type": "structure", - "members": { - "Minutes": { - "target": "com.amazonaws.s3#Minutes", - "traits": { - "smithy.api#documentation": "

Contains an integer specifying time in minutes.

\n

Valid value: 15

" - } - } + "output": { + "ETag": "\"4d9031c7644d8081c2829f4ea23c55f7-2\"", + "Bucket": "acexamplebucket", + "Location": "https://examplebucket.s3..amazonaws.com/bigobject", + "Key": "bigobject" + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}/{Key+}", + "code": 200 + } + } + }, + "com.amazonaws.s3#CompleteMultipartUploadOutput": { + "type": "structure", + "members": { + "Location": { + "target": "com.amazonaws.s3#Location", + "traits": { + "smithy.api#documentation": "

The URI that identifies the newly created object.

" + } + }, + "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\n ARN or access point alias if used.

\n \n

Access points are not supported by directory buckets.

\n
" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key of the newly created object.

" + } + }, + "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\n rule-id is URL-encoded.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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. For more information about\n how the entity tag is calculated, see Checking object\n 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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the object. The CRC64NVME checksum is\n always a full object checksum. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header as a data integrity\n check to verify that the checksum type that is received is the same checksum type that was\n specified during the CreateMultipartUpload request. For more information, see\n Checking object integrity\n in the Amazon S3 User Guide.

" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when storing this object in Amazon S3 (for example,\n AES256, aws:kms).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the newly created object, in case the bucket has versioning turned\n on.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "CompleteMultipartUploadResult" + } + }, + "com.amazonaws.s3#CompleteMultipartUploadRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Name of the bucket to which the multipart upload was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "MultipartUpload": { + "target": "com.amazonaws.s3#CompletedMultipartUpload", + "traits": { + "smithy.api#documentation": "

The container for the multipart upload request information.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "CompleteMultipartUpload" + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

ID for the initiated multipart upload.

", + "smithy.api#httpQuery": "uploadId", + "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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the object. The CRC64NVME checksum is\n always a full object checksum. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "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 SHA1 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 SHA256 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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

This header specifies the checksum type of the object, which determines how part-level\n checksums are combined to create an object-level checksum for multipart objects. You can\n use this header as a data integrity check to verify that the checksum type that is received\n is the same checksum that was specified. If the checksum type doesn\u2019t match the checksum\n type that was specified for the object during the CreateMultipartUpload\n request, it\u2019ll result in a BadDigest error. For more information, see Checking\n object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + }, + "MpuObjectSize": { + "target": "com.amazonaws.s3#MpuObjectSize", + "traits": { + "smithy.api#documentation": "

The expected total object size of the multipart upload request. If there\u2019s a mismatch\n between the specified object size value and the actual object size value, it results in an\n HTTP 400 InvalidRequest error.

", + "smithy.api#httpHeader": "x-amz-mp-object-size" + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "IfMatch": { + "target": "com.amazonaws.s3#IfMatch", + "traits": { + "smithy.api#documentation": "

Uploads the object only if the ETag (entity tag) value provided during the WRITE\n operation matches the ETag of the object in S3. If the ETag values do not match, the\n operation returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the\n multipart upload with CreateMultipartUpload, and re-upload each part.

\n

Expects the ETag value as a string.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "If-Match" + } + }, + "IfNoneMatch": { + "target": "com.amazonaws.s3#IfNoneMatch", + "traits": { + "smithy.api#documentation": "

Uploads the object only if the object key name does not already exist in the bucket\n specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should re-initiate the\n multipart upload with CreateMultipartUpload and re-upload each part.

\n

Expects the '*' (asterisk) character.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "If-None-Match" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is\n required only when the object was created using a checksum algorithm or if your bucket\n policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User\n Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CompletedMultipartUpload": { + "type": "structure", + "members": { + "Parts": { + "target": "com.amazonaws.s3#CompletedPartList", + "traits": { + "smithy.api#documentation": "

Array of CompletedPart data types.

\n

If you do not supply a valid Part with your request, the service sends back\n an HTTP 400 response.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Part" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container for the completed multipart upload details.

" + } + }, + "com.amazonaws.s3#CompletedPart": { + "type": "structure", + "members": { + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "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 part. This checksum is present\n if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number that identifies the part. This is a positive integer between 1 and\n 10,000.

\n \n
    \n
  • \n

    \n General purpose buckets - In\n CompleteMultipartUpload, when a additional checksum (including\n x-amz-checksum-crc32, x-amz-checksum-crc32c,\n x-amz-checksum-sha1, or x-amz-checksum-sha256) is\n applied to each part, the PartNumber must start at 1 and the part\n numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad\n Request status code and an InvalidPartOrder error\n code.

    \n
  • \n
  • \n

    \n Directory buckets - In\n CompleteMultipartUpload, the PartNumber must start at\n 1 and the part numbers must be consecutive.

    \n
  • \n
\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details of the parts that were uploaded.

" + } + }, + "com.amazonaws.s3#CompletedPartList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#CompletedPart" + } + }, + "com.amazonaws.s3#CompressionType": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "GZIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GZIP" + } + }, + "BZIP2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BZIP2" + } + } + } + }, + "com.amazonaws.s3#Condition": { + "type": "structure", + "members": { + "HttpErrorCodeReturnedEquals": { + "target": "com.amazonaws.s3#HttpErrorCodeReturnedEquals", + "traits": { + "smithy.api#documentation": "

The HTTP error code when the redirect is applied. In the event of an error, if the error\n code equals this value, then the specified redirect is applied. Required when parent\n element Condition is specified and sibling KeyPrefixEquals is not\n specified. If both are specified, then both must be true for the redirect to be\n applied.

" + } + }, + "KeyPrefixEquals": { + "target": "com.amazonaws.s3#KeyPrefixEquals", + "traits": { + "smithy.api#documentation": "

The object key name prefix when the redirect is applied. For example, to redirect\n requests for ExamplePage.html, the key prefix will be\n ExamplePage.html. To redirect request for all pages with the prefix\n docs/, the key prefix will be /docs, which identifies all\n objects in the docs/ folder. Required when the parent element\n Condition is specified and sibling HttpErrorCodeReturnedEquals\n is not specified. If both conditions are specified, both must be true for the redirect to\n be applied.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for describing a condition that must be met for the specified redirect to\n apply. For example, 1. If request is for pages in the /docs folder, redirect\n to the /documents folder. 2. If request results in HTTP error 4xx, redirect\n request to another host where you might process the error.

" + } + }, + "com.amazonaws.s3#ConfirmRemoveSelfBucketAccess": { + "type": "boolean" + }, + "com.amazonaws.s3#ContentDisposition": { + "type": "string" + }, + "com.amazonaws.s3#ContentEncoding": { + "type": "string" + }, + "com.amazonaws.s3#ContentLanguage": { + "type": "string" + }, + "com.amazonaws.s3#ContentLength": { + "type": "long" + }, + "com.amazonaws.s3#ContentMD5": { + "type": "string" + }, + "com.amazonaws.s3#ContentRange": { + "type": "string" + }, + "com.amazonaws.s3#ContentType": { + "type": "string" + }, + "com.amazonaws.s3#ContinuationEvent": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

" + } + }, + "com.amazonaws.s3#CopyObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CopyObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#CopyObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#ObjectNotInActiveTierError" + } + ], + "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 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

You can copy individual objects between general purpose buckets, between directory buckets,\n and between general purpose buckets and directory buckets.

\n \n
    \n
  • \n

    Amazon S3 supports copy operations using Multi-Region Access Points only as a\n destination when using the Multi-Region Access Point ARN.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    VPC endpoints don't support cross-Region requests (including copies). If you're\n using VPC endpoints, your source and destination buckets should be in the same\n Amazon Web Services Region as your VPC endpoint.

    \n
  • \n
\n
\n

Both the Region that you want to copy the object from and the Region that you want to\n copy the object to must be enabled for your account. For more information about how to\n enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services\n Account Management Guide.

\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\n Acceleration.

\n
\n
\n
Authentication and authorization
\n
\n

All CopyObject requests must be authenticated and signed by using\n IAM credentials (access key ID and secret access key for the IAM identities).\n All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use the\n IAM credentials to authenticate and authorize your access to the\n CopyObject API operation, instead of using the temporary security\n credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

You must have read access to the source object and\n write access to the destination bucket.

\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have permissions in an IAM policy based on the source and destination\n bucket types in a CopyObject operation.

    \n
      \n
    • \n

      If the source object is in a general purpose bucket, you must have\n \n s3:GetObject\n \n permission to read the source object that is being copied.

      \n
    • \n
    • \n

      If the destination bucket is a general purpose bucket, you must have\n \n s3:PutObject\n \n permission to write the object copy to the destination bucket.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have permissions in a bucket policy or an IAM identity-based policy based on the\n source and destination bucket types in a CopyObject\n operation.

    \n
      \n
    • \n

      If the source object that you want to copy is in a\n directory bucket, you must have the \n s3express:CreateSession\n permission in\n the Action element of a policy to read the object. By\n default, the session is in the ReadWrite mode. If you\n want to restrict the access, you can explicitly set the\n s3express:SessionMode condition key to\n ReadOnly on the copy source bucket.

      \n
    • \n
    • \n

      If the copy destination is a directory bucket, you must have the\n \n s3express:CreateSession\n permission in the\n Action element of a policy to write the object to the\n destination. The s3express:SessionMode condition key\n can't be set to ReadOnly on the copy destination bucket.\n

      \n
    • \n
    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n

    For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Response and special errors
\n
\n

When the request is an HTTP 1.1 request, the response is chunk encoded. When\n the request is not an HTTP 1.1 request, the response would not contain the\n Content-Length. You always need to read the entire response body\n to check if the copy succeeds.

\n
    \n
  • \n

    If the copy is successful, you receive a response with information about\n the copied object.

    \n
  • \n
  • \n

    A copy request might return an error when Amazon S3 receives the copy request\n or while Amazon S3 is copying the files. A 200 OK response can\n contain either a success or an error.

    \n
      \n
    • \n

      If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error.

      \n
    • \n
    • \n

      If the error occurs during the copy operation, the error response\n is embedded in the 200 OK response. For example, in a\n cross-region copy, you may encounter throttling and receive a\n 200 OK response. For more information, see Resolve the Error 200 response when copying objects to\n Amazon S3. The 200 OK status code means the copy\n was accepted, but it doesn't mean the copy is complete. Another\n example is when you disconnect from Amazon S3 before the copy is complete,\n Amazon S3 might cancel the copy and you may receive a 200 OK\n response. You must stay connected to Amazon S3 until the entire response is\n successfully received and processed.

      \n

      If you call this API operation directly, make sure to design your\n application to parse the content of the response and handle it\n appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The\n SDKs detect the embedded error and apply error handling per your\n configuration settings (including automatically retrying the request\n as appropriate). If the condition persists, the SDKs throw an\n exception (or, for the SDKs that don't use exceptions, they return an\n error).

      \n
    • \n
    \n
  • \n
\n
\n
Charge
\n
\n

The copy request charge is based on the storage class and Region that you\n specify for the destination object. The request can also result in a data\n retrieval charge for the source if the source storage class bills for data\n retrieval. If the copy source is in a different region, the data transfer is\n billed to the copy source account. For pricing information, see Amazon S3 pricing.

\n
\n
HTTP Host header syntax
\n
\n
    \n
  • \n

    \n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    \n
  • \n
  • \n

    \n Amazon S3 on Outposts - When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.

    \n
  • \n
\n
\n
\n

The following operations are related to CopyObject:

\n ", + "smithy.api#examples": [ + { + "title": "To copy an object", + "documentation": "The following example copies an object from one bucket to another.", + "input": { + "Bucket": "destinationbucket", + "CopySource": "/sourcebucket/HappyFacejpg", + "Key": "HappyFaceCopyjpg" }, - "traits": { - "smithy.api#documentation": "

A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics\n EventThreshold.

" - } - }, - "com.amazonaws.s3#RequestCharged": { - "type": "enum", - "members": { - "requester": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "requester" - } - } + "output": { + "CopyObjectResult": { + "LastModified": "2016-12-15T17:38:53.000Z", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?x-id=CopyObject", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "DisableS3ExpressSessionAuth": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CopyObjectOutput": { + "type": "structure", + "members": { + "CopyObjectResult": { + "target": "com.amazonaws.s3#CopyObjectResult", + "traits": { + "smithy.api#documentation": "

Container for all response elements.

", + "smithy.api#httpPayload": {} + } + }, + "Expiration": { + "target": "com.amazonaws.s3#Expiration", + "traits": { + "smithy.api#documentation": "

If the object expiration is configured, the response includes this header.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-expiration" + } + }, + "CopySourceVersionId": { + "target": "com.amazonaws.s3#CopySourceVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the source object that was copied.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-version-id" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the newly created copy.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms, aws:kms:dsse).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSEKMSEncryptionContext": { + "target": "com.amazonaws.s3#SSEKMSEncryptionContext", + "traits": { + "smithy.api#documentation": "

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The\n value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption\n context key-value pairs.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-context" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the copied object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#CopyObjectRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned access control list (ACL) to apply to the object.

\n

When you copy an object, the ACL metadata is not preserved and is set to\n private by default. Only the owner has full access control. To override the\n default ACL setting, specify a new ACL when you generate a copy request. For more\n information, see Using ACLs.

\n

If the destination bucket that you're copying objects to uses the bucket owner enforced\n setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.\n Buckets that use this setting only accept PUT requests that don't specify an\n ACL or PUT requests that specify bucket owner full control ACLs, such as the\n bucket-owner-full-control canned ACL or an equivalent form of this ACL\n expressed in the XML format. For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    If your destination bucket uses the bucket owner enforced setting for Object\n Ownership, all objects written to the bucket by any account will be owned by the\n bucket owner.

    \n
  • \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the destination bucket.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n \n

Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, \n you get an HTTP 400 Bad Request error with the error code InvalidRequest.

\n
\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. \n \n You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. \n For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. \n When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format \n \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies the caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm that 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.

\n

When you copy an object, if the source object has a checksum, that checksum value will\n be copied to the new object by default. If the CopyObject request does not\n include this x-amz-checksum-algorithm header, the checksum algorithm will be\n copied from the source object to the destination object (if it's present on the source\n object). You can optionally specify a different checksum algorithm to use with the\n x-amz-checksum-algorithm header. Unrecognized or unsupported values will\n respond with the HTTP status code 400 Bad Request.

\n \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", + "smithy.api#httpHeader": "x-amz-checksum-algorithm" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object. Indicates whether an object should\n be displayed in a web browser or downloaded as a file. It allows specifying the desired\n filename for the downloaded file.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

\n \n

For directory buckets, only the aws-chunked value is supported in this header field.

\n
", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type that describes the format of the object data.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CopySource": { + "target": "com.amazonaws.s3#CopySource", + "traits": { + "smithy.api#documentation": "

Specifies the source object for the copy operation. The source object can be up to 5 GB.\n If the source object is an object that was uploaded by using a multipart upload, the object\n copy will be a single part object after the source object is copied to the destination\n bucket.

\n

You specify the value of the copy source in one of two formats, depending on whether you\n 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 general purpose bucket\n awsexamplebucket, use\n awsexamplebucket/reports/january.pdf. The value must be URL-encoded.\n To copy the object reports/january.pdf from the directory bucket\n awsexamplebucket--use1-az5--x-s3, use\n awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must\n 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
      \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
    • \n

      Access points are not supported by directory buckets.

      \n
    • \n
    \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

If your source bucket versioning is enabled, the x-amz-copy-source header\n by default identifies the current version of an object to copy. If the current version is a\n delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use\n the versionId query parameter. Specifically, append\n ?versionId= 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.

\n

If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID\n for the copied object. 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 destination bucket, the version ID\n that Amazon S3 generates in the x-amz-version-id response header is always\n null.

\n \n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source", + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "CopySource" + } + } + }, + "CopySourceIfMatch": { + "target": "com.amazonaws.s3#CopySourceIfMatch", + "traits": { + "smithy.api#documentation": "

Copies the object if its entity tag (ETag) matches the specified tag.

\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
", + "smithy.api#httpHeader": "x-amz-copy-source-if-match" + } + }, + "CopySourceIfModifiedSince": { + "target": "com.amazonaws.s3#CopySourceIfModifiedSince", + "traits": { + "smithy.api#documentation": "

Copies the object if it has been modified since the specified time.

\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
", + "smithy.api#httpHeader": "x-amz-copy-source-if-modified-since" + } + }, + "CopySourceIfNoneMatch": { + "target": "com.amazonaws.s3#CopySourceIfNoneMatch", + "traits": { + "smithy.api#documentation": "

Copies the object if its entity tag (ETag) is different than the specified ETag.

\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
", + "smithy.api#httpHeader": "x-amz-copy-source-if-none-match" + } + }, + "CopySourceIfUnmodifiedSince": { + "target": "com.amazonaws.s3#CopySourceIfUnmodifiedSince", + "traits": { + "smithy.api#documentation": "

Copies the object if it hasn't been modified since the specified time.

\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
", + "smithy.api#httpHeader": "x-amz-copy-source-if-unmodified-since" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", + "smithy.api#httpHeader": "Expires" + } + }, + "GrantFullControl": { + "target": "com.amazonaws.s3#GrantFullControl", + "traits": { + "smithy.api#documentation": "

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the object data and its metadata.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the object ACL.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key of the destination object.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "MetadataDirective": { + "target": "com.amazonaws.s3#MetadataDirective", + "traits": { + "smithy.api#documentation": "

Specifies whether the metadata is copied from the source object or replaced with\n metadata that's provided in the request. When copying an object, you can preserve all\n metadata (the default) or specify new metadata. If this header isn\u2019t specified,\n COPY is the default behavior.

\n

\n General purpose bucket - For general purpose buckets, when you\n grant permissions, you can use the s3:x-amz-metadata-directive condition key\n to enforce certain metadata behavior when objects are uploaded. For more information, see\n Amazon S3\n condition key examples in the Amazon S3 User Guide.

\n \n

\n x-amz-website-redirect-location is unique to each object and is not\n copied when using the x-amz-metadata-directive header. To copy the value,\n you must specify x-amz-website-redirect-location in the request\n header.

\n
", + "smithy.api#httpHeader": "x-amz-metadata-directive" + } + }, + "TaggingDirective": { + "target": "com.amazonaws.s3#TaggingDirective", + "traits": { + "smithy.api#documentation": "

Specifies whether the object tag-set is copied from the source object or replaced with\n the tag-set that's provided in the request.

\n

The default value is COPY.

\n \n

\n Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. \nWhen the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    \n
  • \n
  • \n

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    \n
  • \n
\n

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-tagging-directive" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized\n or unsupported values won\u2019t write a destination object and will receive a 400 Bad\n Request response.

\n

Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When\n copying an object, if you don't specify encryption information in your copy request, the\n encryption setting of the target object is set to the default encryption configuration of\n the destination bucket. By default, all buckets have a base level of encryption\n configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the\n destination bucket has a different default encryption configuration, Amazon S3 uses the\n corresponding encryption key to encrypt the target object copy.

\n

With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in\n its data centers and decrypts the data when you access it. For more information about\n server-side encryption, see Using Server-Side Encryption\n in the Amazon S3 User Guide.

\n

\n General purpose buckets \n

\n
    \n
  • \n

    For general purpose buckets, there are the following supported options for server-side\n encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption\n with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding\n KMS key, or a customer-provided key to encrypt the target object copy.

    \n
  • \n
  • \n

    When you perform a CopyObject operation, if you want to use a\n different type of encryption setting for the target object, you can specify\n appropriate encryption-related headers to encrypt the target object with an Amazon S3\n managed key, a KMS key, or a customer-provided key. If the encryption setting in\n your request is different from the default encryption configuration of the\n destination bucket, the encryption setting in your request takes precedence.

    \n
  • \n
\n

\n Directory buckets \n

\n
    \n
  • \n

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n
  • \n
  • \n

    To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you\n specify SSE-KMS as the directory bucket's default encryption configuration with\n a KMS key (specifically, a customer managed key).\n The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS\n configuration can only support 1 customer managed key per\n directory bucket for the lifetime of the bucket. After you specify a customer managed key for\n SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS\n configuration. Then, when you perform a CopyObject operation and want to\n specify server-side encryption settings for new object copies with SSE-KMS in the\n encryption-related request headers, you must ensure the encryption key is the same\n customer managed key that you specified for the directory bucket's default encryption\n configuration.\n

    \n
  • \n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

If the x-amz-storage-class header is not used, the copied object will be\n stored in the STANDARD Storage Class by default. The STANDARD\n storage class provides high durability and high availability. Depending on performance\n needs, you can specify a different Storage Class.

\n \n
    \n
  • \n

    \n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. \nUnsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    \n
  • \n
  • \n

    \n Amazon S3 on Outposts - S3 on Outposts only\n uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
\n

You can use the CopyObject action to change the storage class of an object\n that is already stored in Amazon S3 by using the x-amz-storage-class header. For\n more information, see Storage Classes in the\n Amazon S3 User Guide.

\n

Before using an object as a source object for the copy operation, you must restore a\n copy of it if it meets any of the following conditions:

\n
    \n
  • \n

    The storage class of the source object is GLACIER or\n DEEP_ARCHIVE.

    \n
  • \n
  • \n

    The storage class of the source object is INTELLIGENT_TIERING and\n it's S3 Intelligent-Tiering access tier is Archive Access or\n Deep Archive Access.

    \n
  • \n
\n

For more information, see RestoreObject and Copying\n Objects in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "WebsiteRedirectLocation": { + "target": "com.amazonaws.s3#WebsiteRedirectLocation", + "traits": { + "smithy.api#documentation": "

If the destination bucket is configured as a website, redirects requests for this object\n copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of\n this header in the object metadata. This value is unique to each object and is not copied\n when using the x-amz-metadata-directive header. Instead, you may opt to\n provide this header in combination with the x-amz-metadata-directive\n header.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example,\n AES256).

\n

When you perform a CopyObject operation, if you want to use a different\n type of encryption setting for the target object, you can specify appropriate\n encryption-related headers to encrypt the target object with an Amazon S3 managed key, a\n KMS key, or a customer-provided key. If the encryption setting in your request is\n different from the default encryption configuration of the destination bucket, the\n encryption setting in your request takes precedence.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption.\n All GET and PUT requests for an object protected by KMS will fail if they're not made via\n SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services\n SDKs and Amazon Web Services CLI, see Specifying the\n Signature Version in Request Authentication in the\n Amazon S3 User Guide.

\n

\n Directory buckets -\n To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSEKMSEncryptionContext": { + "target": "com.amazonaws.s3#SSEKMSEncryptionContext", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use\n for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

\n

\n General purpose buckets - This value must be explicitly\n added to specify encryption context for CopyObject requests if you want an\n additional encryption context for your destination object. The additional encryption\n context of the source object won't be copied to the destination object. For more\n information, see Encryption\n context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-context" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses\n SSE-KMS, you can enable an S3 Bucket Key for the object.

\n

Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object\n encryption with SSE-KMS. Specifying this header with a COPY action doesn\u2019t affect\n bucket-level settings for S3 Bucket Key.

\n

For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.

\n \n

\n Directory buckets -\n S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "CopySourceSSECustomerAlgorithm": { + "target": "com.amazonaws.s3#CopySourceSSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when decrypting the source object (for example,\n AES256).

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-algorithm" + } + }, + "CopySourceSSECustomerKey": { + "target": "com.amazonaws.s3#CopySourceSSECustomerKey", + "traits": { + "smithy.api#documentation": "

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be the same one that was used when\n the source object was created.

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key" + } + }, + "CopySourceSSECustomerKeyMD5": { + "target": "com.amazonaws.s3#CopySourceSSECustomerKeyMD5", + "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.

\n

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the\n necessary encryption information in your request so that Amazon S3 can decrypt the object for\n copying.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key-MD5" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "Tagging": { + "target": "com.amazonaws.s3#TaggingHeader", + "traits": { + "smithy.api#documentation": "

The tag-set for the object copy in the destination bucket. This value must be used in\n conjunction with the x-amz-tagging-directive if you choose\n REPLACE for the x-amz-tagging-directive. If you choose\n COPY for the x-amz-tagging-directive, you don't need to set\n the x-amz-tagging header, because the tag-set will be copied from the source\n object directly. The tag-set must be encoded as URL Query parameters.

\n

The default value is the empty value.

\n \n

\n Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. \nWhen the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    \n
  • \n
  • \n

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    \n
  • \n
\n

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

\n
    \n
  • \n

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    \n
  • \n
  • \n

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-tagging" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

The Object Lock mode that you want to apply to the object copy.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when you want the Object Lock of the object copy to expire.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether you want to apply a legal hold to the object copy.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the destination bucket, 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 account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-source-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CopyObjectResult": { + "type": "structure", + "members": { + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

Returns the ETag of the new object. The ETag reflects only changes to the contents of an\n object, not its metadata.

" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Creation date of the object.

" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking 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 checksum is only present if the object was uploaded\n with the object. For more information, 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 the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present\n if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for all response elements.

" + } + }, + "com.amazonaws.s3#CopyPartResult": { + "type": "structure", + "members": { + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

Entity tag of the object.

" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Date and time at which the object was uploaded.

" + } + }, + "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 part. 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": "

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 part. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "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 SHA1 checksum of the part. For more information, see\n Checking object integrity in the\n 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 SHA256 checksum of the part. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for all response elements.

" + } + }, + "com.amazonaws.s3#CopySource": { + "type": "string", + "traits": { + "smithy.api#pattern": "^\\/?.+\\/.+$" + } + }, + "com.amazonaws.s3#CopySourceIfMatch": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceIfModifiedSince": { + "type": "timestamp" + }, + "com.amazonaws.s3#CopySourceIfNoneMatch": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceIfUnmodifiedSince": { + "type": "timestamp" + }, + "com.amazonaws.s3#CopySourceRange": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceSSECustomerAlgorithm": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceSSECustomerKey": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#CopySourceSSECustomerKeyMD5": { + "type": "string" + }, + "com.amazonaws.s3#CopySourceVersionId": { + "type": "string" + }, + "com.amazonaws.s3#CreateBucket": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateBucketRequest" + }, + "output": { + "target": "com.amazonaws.s3#CreateBucketOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#BucketAlreadyExists" + }, + { + "target": "com.amazonaws.s3#BucketAlreadyOwnedByYou" + } + ], + "traits": { + "smithy.api#documentation": "\n

This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see \n CreateBucket\n .

\n
\n

Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services\n Access Key ID to authenticate requests. Anonymous requests are never allowed to create\n buckets. By creating the bucket, you become the bucket owner.

\n

There are two types of buckets: general purpose buckets and directory buckets. For more\n information about these bucket types, see Creating, configuring, and\n working with Amazon S3 buckets in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    \n General purpose buckets - If you send your\n CreateBucket request to the s3.amazonaws.com global\n endpoint, the request goes to the us-east-1 Region. So the signature\n calculations in Signature Version 4 must use us-east-1 as the Region,\n even if the location constraint in the request specifies another Region where the\n bucket is to be created. If you create a bucket in a Region other than US East (N.\n Virginia), your application must be able to handle 307 redirect. For more\n information, see Virtual hosting of\n buckets in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - In\n addition to the s3:CreateBucket permission, the following\n permissions are required in a policy when your CreateBucket\n request includes specific headers:

    \n
      \n
    • \n

      \n Access control lists (ACLs)\n - In your CreateBucket request, if you specify an\n access control list (ACL) and set it to public-read,\n public-read-write, authenticated-read, or\n if you explicitly specify any other custom ACLs, both\n s3:CreateBucket and s3:PutBucketAcl\n permissions are required. In your CreateBucket request,\n if you set the ACL to private, or if you don't specify\n any ACLs, only the s3:CreateBucket permission is\n required.

      \n
    • \n
    • \n

      \n Object Lock - In your\n CreateBucket request, if you set\n x-amz-bucket-object-lock-enabled to true, the\n s3:PutBucketObjectLockConfiguration and\n s3:PutBucketVersioning permissions are\n required.

      \n
    • \n
    • \n

      \n S3 Object Ownership - If\n your CreateBucket request includes the\n x-amz-object-ownership header, then the\n s3:PutBucketOwnershipControls permission is\n required.

      \n \n

      To set an ACL on a bucket as part of a\n CreateBucket request, you must explicitly set S3\n Object Ownership for the bucket to a different value than the\n default, BucketOwnerEnforced. Additionally, if your\n desired bucket ACL grants public access, you must first create the\n bucket (without the bucket ACL) and then explicitly disable Block\n Public Access on the bucket before using PutBucketAcl\n to set the ACL. If you try to create a bucket with a public ACL,\n the request will fail.

      \n

      For the majority of modern use cases in S3, we recommend that\n you keep all Block Public Access settings enabled and keep ACLs\n disabled. If you would like to share data with users outside of\n your account, you can use bucket policies as needed. For more\n information, see Controlling ownership of objects and disabling ACLs for your\n bucket and Blocking public access to your Amazon S3 storage in\n the Amazon S3 User Guide.

      \n
      \n
    • \n
    • \n

      \n S3 Block Public Access - If\n your specific use case requires granting public access to your S3\n resources, you can disable Block Public Access. Specifically, you can\n create a new bucket with Block Public Access enabled, then separately\n call the \n DeletePublicAccessBlock\n API. To use this operation, you must have the\n s3:PutBucketPublicAccessBlock permission. For more\n information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:CreateBucket permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n \n

    The permissions for ACLs, Object Lock, S3 Object Ownership, and S3\n Block Public Access are not supported for directory buckets. For\n directory buckets, all Block Public Access settings are enabled at the\n bucket level and S3 Object Ownership is set to Bucket owner enforced\n (ACLs disabled). These settings can't be modified.

    \n

    For more information about permissions for creating and working with\n directory buckets, see Directory buckets in the\n Amazon S3 User Guide. For more information about\n supported S3 features for directory buckets, see Features of S3 Express One Zone in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CreateBucket:

\n ", + "smithy.api#examples": [ + { + "title": "To create a bucket in a specific region", + "documentation": "The following example creates a bucket. The request specifies an AWS region where to create the bucket.", + "input": { + "Bucket": "examplebucket", + "CreateBucketConfiguration": { + "LocationConstraint": "eu-west-1" + } }, - "traits": { - "smithy.api#documentation": "

If present, indicates that the requester was successfully charged for the\n request.

\n \n

This functionality is not supported for directory buckets.

\n
" + "output": { + "Location": "http://examplebucket..s3.amazonaws.com/" } - }, - "com.amazonaws.s3#RequestPayer": { - "type": "enum", - "members": { - "requester": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "requester" - } - } + }, + { + "title": "To create a bucket ", + "documentation": "The following example creates a bucket.", + "input": { + "Bucket": "examplebucket" }, - "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. If either the source or\n destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding\n charges to copy the object. For information about downloading objects from Requester Pays\n buckets, see Downloading Objects in\n Requester Pays Buckets in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
" - } - }, - "com.amazonaws.s3#RequestPaymentConfiguration": { - "type": "structure", - "members": { - "Payer": { - "target": "com.amazonaws.s3#Payer", - "traits": { - "smithy.api#documentation": "

Specifies who pays for the download and request fees.

", - "smithy.api#required": {} - } - } + "output": { + "Location": "/examplebucket" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + }, + "DisableAccessPoints": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CreateBucketConfiguration": { + "type": "structure", + "members": { + "LocationConstraint": { + "target": "com.amazonaws.s3#BucketLocationConstraint", + "traits": { + "smithy.api#documentation": "

Specifies the Region where the bucket will be created. You might choose a Region to\n optimize latency, minimize costs, or address regulatory requirements. For example, if you\n reside in Europe, you will probably find it advantageous to create buckets in the Europe\n (Ireland) Region.

\n

If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region\n (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

\n

For a list of the valid values for all of the Amazon Web Services Regions, see Regions and\n Endpoints.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "Location": { + "target": "com.amazonaws.s3#LocationInfo", + "traits": { + "smithy.api#documentation": "

Specifies the location where the bucket will be created.

\n

\n Directory buckets - The location type is Availability Zone or Local Zone. \n To use the Local Zone location type, your account must be enabled for Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the \n error code AccessDenied. To learn more, see Enable accounts for Local Zones in the Amazon S3 User Guide.\n

\n \n

This functionality is only supported by directory buckets.

\n
" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketInfo", + "traits": { + "smithy.api#documentation": "

Specifies the information about the bucket that will be created.

\n \n

This functionality is only supported by directory buckets.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration information for the bucket.

" + } + }, + "com.amazonaws.s3#CreateBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Creates a metadata table configuration for a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the following permissions. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n

If you also want to integrate your table bucket with Amazon Web Services analytics services so that you \n can query your metadata table, you need additional permissions. For more information, see \n \n Integrating Amazon S3 Tables with Amazon Web Services analytics services in the \n Amazon S3 User Guide.

\n
    \n
  • \n

    \n s3:CreateBucketMetadataTableConfiguration\n

    \n
  • \n
  • \n

    \n s3tables:CreateNamespace\n

    \n
  • \n
  • \n

    \n s3tables:GetTable\n

    \n
  • \n
  • \n

    \n s3tables:CreateTable\n

    \n
  • \n
  • \n

    \n s3tables:PutTablePolicy\n

    \n
  • \n
\n
\n
\n

The following operations are related to CreateBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}?metadataTable", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CreateBucketMetadataTableConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n The general purpose bucket that you want to create the metadata table configuration in.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

\n The Content-MD5 header for the metadata table configuration.\n

", + "smithy.api#httpHeader": "Content-MD5" + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

\n The checksum algorithm to use with your metadata table configuration. \n

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, + "MetadataTableConfiguration": { + "target": "com.amazonaws.s3#MetadataTableConfiguration", + "traits": { + "smithy.api#documentation": "

\n The contents of your metadata table configuration. \n

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "MetadataTableConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected owner of the general purpose bucket that contains your metadata table configuration.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CreateBucketOutput": { + "type": "structure", + "members": { + "Location": { + "target": "com.amazonaws.s3#Location", + "traits": { + "smithy.api#documentation": "

A forward slash followed by the name of the bucket.

", + "smithy.api#httpHeader": "Location" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#CreateBucketRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#BucketCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket to create.

\n

\n General purpose buckets - For information about bucket naming\n restrictions, see Bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CreateBucketConfiguration": { + "target": "com.amazonaws.s3#CreateBucketConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for the bucket.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "CreateBucketConfiguration" + } + }, + "GrantFullControl": { + "target": "com.amazonaws.s3#GrantFullControl", + "traits": { + "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWrite": { + "target": "com.amazonaws.s3#GrantWrite", + "traits": { + "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-write" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "ObjectLockEnabledForBucket": { + "target": "com.amazonaws.s3#ObjectLockEnabledForBucket", + "traits": { + "smithy.api#documentation": "

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-bucket-object-lock-enabled" + } + }, + "ObjectOwnership": { + "target": "com.amazonaws.s3#ObjectOwnership", + "traits": { + "smithy.api#httpHeader": "x-amz-object-ownership" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CreateMultipartUpload": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateMultipartUploadRequest" + }, + "output": { + "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 request.\n For more information about multipart uploads, see Multipart Upload Overview in the\n Amazon S3 User Guide.

\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 stops charging you for\n storing them only after you either complete or abort a multipart upload.

\n
\n

If you have configured a lifecycle rule to abort incomplete multipart uploads, the\n created multipart upload must be completed within the number of days specified in the\n bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible\n for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.

\n \n
    \n
  • \n

    \n Directory buckets -\n S3 Lifecycle is not supported by directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Request signing
\n
\n

For request signing, multipart upload is just a series of regular requests. You\n initiate a multipart upload, send one or more requests to upload parts, and then\n complete the multipart upload process. You sign each request individually. There\n is nothing special about signing multipart upload requests. For more information\n about signing, see Authenticating\n Requests (Amazon Web Services Signature Version 4) in the\n Amazon S3 User Guide.

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n perform a multipart upload with encryption using an Key Management Service (KMS)\n KMS key, the requester must have permission to the\n kms:Decrypt and kms:GenerateDataKey actions on\n the key. The requester must also have permissions for the\n kms:GenerateDataKey action for the\n CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs. These\n permissions are required because Amazon S3 must decrypt and read data from the\n encrypted file parts before it completes the multipart upload. For more\n information, see Multipart upload API and permissions and Protecting data\n using server-side encryption with Amazon Web Services KMS in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose buckets - Server-side\n encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it.\n Amazon S3 automatically encrypts all new objects that are uploaded to an S3\n bucket. When doing a multipart upload, if you don't specify encryption\n information in your request, the encryption setting of the uploaded parts is\n set to the default encryption configuration of the destination bucket. By\n default, all buckets have a base level of encryption configuration that uses\n server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination\n bucket has a default encryption configuration that uses server-side\n encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided\n encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a\n customer-provided key to encrypt the uploaded parts. When you perform a\n CreateMultipartUpload operation, if you want to use a different type of\n encryption setting for the uploaded parts, you can request that Amazon S3\n encrypts the object with a different encryption key (such as an Amazon S3 managed\n key, a KMS key, or a customer-provided key). When the encryption setting\n in your request is different from the default encryption configuration of\n the destination bucket, the encryption setting in your request takes\n precedence. If you choose to provide your own encryption key, the request\n headers you provide in UploadPart and\n UploadPartCopy\n requests must match the headers you used in the\n CreateMultipartUpload request.

    \n
      \n
    • \n

      Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key\n (aws/s3) and KMS customer managed keys stored in Key Management Service\n (KMS) \u2013 If you want Amazon Web Services to manage the keys used to encrypt data,\n 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
        \n
      • \n

        If you specify\n x-amz-server-side-encryption:aws:kms, but\n don't provide\n x-amz-server-side-encryption-aws-kms-key-id,\n Amazon S3 uses the Amazon Web Services managed key (aws/s3 key) in\n KMS to protect the data.

        \n
      • \n
      • \n

        To perform a multipart upload with encryption by using an\n Amazon Web Services KMS key, the requester must have permission to the\n kms:Decrypt and\n kms:GenerateDataKey* actions on the key.\n These permissions are required because Amazon S3 must decrypt and\n read data from the encrypted file parts before it completes\n the multipart upload. For more information, see Multipart upload API and permissions and Protecting data using server-side encryption with Amazon Web Services\n KMS in the\n Amazon S3 User Guide.

        \n
      • \n
      • \n

        If your Identity and Access Management (IAM) user or role is in the same\n Amazon Web Services account as the KMS key, then you must have these\n permissions on the key policy. If your IAM user or role is\n in a different account from the key, then you must have the\n permissions on both the key policy and your IAM user or\n role.

        \n
      • \n
      • \n

        All GET and PUT requests for an\n object protected by KMS fail if you don't make them by\n using Secure Sockets Layer (SSL), Transport Layer Security\n (TLS), or Signature Version 4. For information about\n configuring any of the officially supported Amazon Web Services SDKs and\n Amazon Web Services CLI, see Specifying the Signature Version in\n Request Authentication in the\n Amazon S3 User Guide.

        \n
      • \n
      \n
      \n

      For more information about server-side encryption with KMS keys\n (SSE-KMS), see Protecting\n Data Using Server-Side Encryption with KMS keys in the\n Amazon S3 User Guide.

      \n
    • \n
    • \n

      Use customer-provided encryption keys (SSE-C) \u2013 If you want to\n manage your own encryption keys, provide all the following headers in\n 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\n customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with\n customer-provided encryption keys (SSE-C) in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n \n

    For directory buckets, when you perform a\n CreateMultipartUpload operation and an\n UploadPartCopy operation, the request headers you provide\n in the CreateMultipartUpload request must match the default\n encryption configuration of the destination bucket.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to CreateMultipartUpload:

\n ", + "smithy.api#examples": [ + { + "title": "To initiate a multipart upload", + "documentation": "The following example initiates a multipart upload.", + "input": { + "Bucket": "examplebucket", + "Key": "largeobject" }, - "traits": { - "smithy.api#documentation": "

Container for Payer.

" + "output": { + "Bucket": "examplebucket", + "UploadId": "ibZBv_75gd9r8lH_gqXatLdxMVpAlj6ZQjEs.OwyF3953YdwbcQnMA2BLGn8Lx12fQNICtMw5KyteFeHw.Sjng--", + "Key": "largeobject" + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}/{Key+}?uploads", + "code": 200 + } + } + }, + "com.amazonaws.s3#CreateMultipartUploadOutput": { + "type": "structure", + "members": { + "AbortDate": { + "target": "com.amazonaws.s3#AbortDate", + "traits": { + "smithy.api#documentation": "

If the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, the response includes this header. The header indicates when the initiated\n multipart upload becomes eligible for an abort operation. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in\n the Amazon S3 User Guide.

\n

The response also includes the x-amz-abort-rule-id header that provides the\n ID of the lifecycle configuration rule that defines the abort action.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-abort-date" + } + }, + "AbortRuleId": { + "target": "com.amazonaws.s3#AbortRuleId", + "traits": { + "smithy.api#documentation": "

This header is returned along with the x-amz-abort-date header. It\n identifies the applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-abort-rule-id" + } + }, + "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\n access point ARN or access point alias if used.

\n \n

Access points are not supported by directory buckets.

\n
", + "smithy.api#xmlName": "Bucket" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

" + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

ID for the initiated multipart upload.

" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSEKMSEncryptionContext": { + "target": "com.amazonaws.s3#SSEKMSEncryptionContext", + "traits": { + "smithy.api#documentation": "

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-context" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

Indicates the checksum type that you want Amazon S3 to use to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "InitiateMultipartUploadResult" + } + }, + "com.amazonaws.s3#CreateMultipartUploadRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as\n canned ACLs. Each canned ACL has a predefined set of grantees and\n permissions. For more information, see Canned ACL in the\n Amazon S3 User Guide.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to\n predefined groups defined by Amazon S3. These permissions are then added to the access control\n list (ACL) on the new object. For more information, see Using ACLs. One way to grant\n the permissions using the request headers is to specify a canned ACL with the\n x-amz-acl request header.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket where the multipart upload is initiated and where the object is\n uploaded.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

\n \n

For directory buckets, only the aws-chunked value is supported in this header field.

\n
", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language that the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", + "smithy.api#httpHeader": "Expires" + } + }, + "GrantFullControl": { + "target": "com.amazonaws.s3#GrantFullControl", + "traits": { + "smithy.api#documentation": "

Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP\n permissions on the object.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

You specify each grantee as a type=value pair, where the type is one of the\n following:

\n
    \n
  • \n

    \n id \u2013 if the value specified is the canonical user ID of an\n Amazon Web Services account

    \n
  • \n
  • \n

    \n uri \u2013 if you are granting permissions to a predefined group

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Specify access permissions explicitly to allow grantee to read the object data and its\n metadata.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

You specify each grantee as a type=value pair, where the type is one of the\n following:

\n
    \n
  • \n

    \n id \u2013 if the value specified is the canonical user ID of an\n Amazon Web Services account

    \n
  • \n
  • \n

    \n uri \u2013 if you are granting permissions to a predefined group

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Specify access permissions explicitly to allows grantee to read the object ACL.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

You specify each grantee as a type=value pair, where the type is one of the\n following:

\n
    \n
  • \n

    \n id \u2013 if the value specified is the canonical user ID of an\n Amazon Web Services account

    \n
  • \n
  • \n

    \n uri \u2013 if you are granting permissions to a predefined group

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Specify access permissions explicitly to allows grantee to allow grantee to write the\n ACL for the applicable object.

\n

By default, all objects are private. Only the owner has full access control. When\n uploading an object, you can use this header to explicitly grant access permissions to\n specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3\n supports in an ACL. For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n

You specify each grantee as a type=value pair, where the type is one of the\n following:

\n
    \n
  • \n

    \n id \u2013 if the value specified is the canonical user ID of an\n Amazon Web Services account

    \n
  • \n
  • \n

    \n uri \u2013 if you are granting permissions to a predefined group

    \n
  • \n
  • \n

    \n emailAddress \u2013 if the value specified is the email address of an\n 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\u00e3o 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

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload is to be initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

\n
    \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n
  • \n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

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. For more information, see\n Storage\n Classes in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

    \n
  • \n
  • \n

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "WebsiteRedirectLocation": { + "target": "com.amazonaws.s3#WebsiteRedirectLocation", + "traits": { + "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 customer-provided encryption key according to\n RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption\n key was transmitted without error.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same\n account that's issuing the command, you must use the full Key ARN not the Key ID.

\n

\n General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS \n key to use. If you specify\n x-amz-server-side-encryption:aws:kms or\n x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key\n (aws/s3) to protect the data.

\n

\n Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSEKMSEncryptionContext": { + "target": "com.amazonaws.s3#SSEKMSEncryptionContext", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-context" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

\n

\n General purpose buckets - Setting this header to\n true causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3\n Bucket Key.

\n

\n Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "Tagging": { + "target": "com.amazonaws.s3#TaggingHeader", + "traits": { + "smithy.api#documentation": "

The tag-set for the object. The tag-set must be encoded as URL Query parameters.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-tagging" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

Specifies the Object Lock mode that you want to apply to the uploaded object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

Specifies the date and time when you want the Object Lock to expire.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether you want to apply a legal hold to the uploaded object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, 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 that 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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

Indicates the checksum type that you want Amazon S3 to use to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CreateSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#CreateSessionRequest" + }, + "output": { + "target": "com.amazonaws.s3#CreateSessionOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchBucket" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a session that establishes temporary security credentials to support fast\n authentication and authorization for the Zonal endpoint API operations on directory buckets. For more\n information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone\n APIs in the Amazon S3 User Guide.

\n

To make Zonal endpoint API requests on a directory bucket, use the CreateSession\n API operation. Specifically, you grant s3express:CreateSession permission to a\n bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the\n CreateSession API request on the bucket, which returns temporary security\n credentials that include the access key ID, secret access key, session token, and\n expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After\n the session is created, you don\u2019t need to use other policies to grant permissions to each\n Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by\n applying the temporary security credentials of the session to the request headers and\n following the SigV4 protocol for authentication. You also apply the session token to the\n x-amz-s3session-token request header for authorization. Temporary security\n credentials are scoped to the bucket and expire after 5 minutes. After the expiration time,\n any calls that you make with those credentials will fail. You must use IAM credentials\n again to make a CreateSession API request that generates a new set of\n temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond\n the original specified interval.

\n

If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid\n service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to\n initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the\n Amazon S3 User Guide.

\n \n
    \n
  • \n

    You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n \n CopyObject API operation -\n Unlike other Zonal endpoint API operations, the CopyObject API operation doesn't use\n the temporary security credentials returned from the CreateSession\n API operation for authentication and authorization. For information about\n authentication and authorization of the CopyObject API operation on\n directory buckets, see CopyObject.

    \n
  • \n
  • \n

    \n \n HeadBucket API operation -\n Unlike other Zonal endpoint API operations, the HeadBucket API operation doesn't use\n the temporary security credentials returned from the CreateSession\n API operation for authentication and authorization. For information about\n authentication and authorization of the HeadBucket API operation on\n directory buckets, see HeadBucket.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n

To obtain temporary security credentials, you must create\n a bucket policy or an IAM identity-based policy that grants s3express:CreateSession\n permission to the bucket. In a policy, you can have the\n s3express:SessionMode condition key to control who can create a\n ReadWrite or ReadOnly session. For more information\n about ReadWrite or ReadOnly sessions, see \n x-amz-create-session-mode\n . For example policies, see\n Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

\n

To grant cross-account access to Zonal endpoint API operations, the bucket policy should also\n grant both accounts the s3express:CreateSession permission.

\n

If you want to encrypt objects with SSE-KMS, you must also have the\n kms:GenerateDataKey and the kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the target KMS\n key.

\n
\n
Encryption
\n
\n

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

\n

For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, \nyou authenticate and authorize requests through CreateSession for low latency. \n To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

\n \n

\n Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. \n After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration.\n

\n
\n

In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, \n you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

\n \n

When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n it's not supported to override the values of the encryption settings from the CreateSession request. \n\n

\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?session", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "DisableS3ExpressSessionAuth": { + "value": true + } + } + } + }, + "com.amazonaws.s3#CreateSessionOutput": { + "type": "structure", + "members": { + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store objects in the directory bucket.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS \n symmetric encryption customer managed key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSEKMSEncryptionContext": { + "target": "com.amazonaws.s3#SSEKMSEncryptionContext", + "traits": { + "smithy.api#documentation": "

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets\n passed on to Amazon Web Services KMS for future GetObject \n operations on this object.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-context" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether to use an S3 Bucket Key for server-side encryption\n with KMS keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "Credentials": { + "target": "com.amazonaws.s3#SessionCredentials", + "traits": { + "smithy.api#documentation": "

The established temporary security credentials for the created session.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "Credentials" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "CreateSessionResult" + } + }, + "com.amazonaws.s3#CreateSessionRequest": { + "type": "structure", + "members": { + "SessionMode": { + "target": "com.amazonaws.s3#SessionMode", + "traits": { + "smithy.api#documentation": "

Specifies the mode of the session that will be created, either ReadWrite or\n ReadOnly. By default, a ReadWrite session is created. A\n ReadWrite session is capable of executing all the Zonal endpoint API operations on a\n directory bucket. A ReadOnly session is constrained to execute the following\n Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2,\n GetObjectAttributes, ListParts, and\n ListMultipartUploads.

", + "smithy.api#httpHeader": "x-amz-create-session-mode" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket that you create a session for.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm to use when you store objects in the directory bucket.

\n

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. \n For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If you specify x-amz-server-side-encryption with aws:kms, you must specify the \n x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS \n symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same\n account that't issuing the command, you must use the full Key ARN not the Key ID.

\n

Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSEKMSEncryptionContext": { + "target": "com.amazonaws.s3#SSEKMSEncryptionContext", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets passed on\n to Amazon Web Services KMS for future GetObject operations on\n this object.

\n

\n General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-context" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using KMS keys (SSE-KMS).

\n

S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#CreationDate": { + "type": "timestamp" + }, + "com.amazonaws.s3#DataRedundancy": { + "type": "enum", + "members": { + "SingleAvailabilityZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SingleAvailabilityZone" + } + }, + "SingleLocalZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SingleLocalZone" + } + } + } + }, + "com.amazonaws.s3#Date": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.s3#Days": { + "type": "integer" + }, + "com.amazonaws.s3#DaysAfterInitiation": { + "type": "integer" + }, + "com.amazonaws.s3#DefaultRetention": { + "type": "structure", + "members": { + "Mode": { + "target": "com.amazonaws.s3#ObjectLockRetentionMode", + "traits": { + "smithy.api#documentation": "

The default Object Lock retention mode you want to apply to new objects placed in the\n specified bucket. Must be used with either Days or Years.

" + } + }, + "Days": { + "target": "com.amazonaws.s3#Days", + "traits": { + "smithy.api#documentation": "

The number of days that you want to specify for the default retention period. Must be\n used with Mode.

" + } + }, + "Years": { + "target": "com.amazonaws.s3#Years", + "traits": { + "smithy.api#documentation": "

The number of years that you want to specify for the default retention period. Must be\n used with Mode.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for optionally specifying the default Object Lock retention\n settings for new objects placed in the specified bucket.

\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 or\n Years but you must select one. You cannot specify\n Days and Years at the same time.

    \n
  • \n
\n
" + } + }, + "com.amazonaws.s3#Delete": { + "type": "structure", + "members": { + "Objects": { + "target": "com.amazonaws.s3#ObjectIdentifierList", + "traits": { + "smithy.api#documentation": "

The object to delete.

\n \n

\n Directory buckets - For directory buckets,\n an object that's composed entirely of whitespace characters is not supported by the\n DeleteObjects API operation. The request will receive a 400 Bad\n Request error and none of the objects in the request will be deleted.

\n
", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Object" + } + }, + "Quiet": { + "target": "com.amazonaws.s3#Quiet", + "traits": { + "smithy.api#documentation": "

Element to enable quiet mode for the request. When you add this element, you must set\n its value to true.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the objects to delete.

" + } + }, + "com.amazonaws.s3#DeleteBucket": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

Deletes the S3 bucket. All objects (including all object versions and delete markers) in\n the bucket must be deleted before the bucket itself can be deleted.

\n \n
    \n
  • \n

    \n Directory buckets - If multipart\n uploads in a directory bucket are in progress, you can't delete the bucket until\n all the in-progress multipart uploads are aborted or completed.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the s3:DeleteBucket permission on the specified\n bucket in a policy.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:DeleteBucket permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucket:

\n ", + "smithy.api#examples": [ + { + "title": "To delete a bucket", + "documentation": "The following example deletes the specified bucket.", + "input": { + "Bucket": "forrandall2" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketAnalyticsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketAnalyticsConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes an analytics configuration for the bucket (specified by the analytics\n configuration ID).

\n

To use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration 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

For information about the Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis.

\n

The following operations are related to\n DeleteBucketAnalyticsConfiguration:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?analytics", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketAnalyticsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket from which an analytics configuration is deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#AnalyticsId", + "traits": { + "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketCors": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketCorsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the cors configuration information set for the bucket.

\n

To use this operation, you must have permission to perform the\n s3:PutBucketCORS action. The bucket owner has this permission by default\n and can grant this permission to others.

\n

For information about cors, see Enabling Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.

\n

\n Related Resources\n

\n ", + "smithy.api#examples": [ + { + "title": "To delete cors configuration on a bucket.", + "documentation": "The following example deletes CORS configuration on a bucket.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?cors", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketCorsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies the bucket whose cors configuration is being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketEncryption": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketEncryptionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

This implementation of the DELETE action resets the default encryption for the bucket as\n server-side encryption with Amazon S3 managed keys (SSE-S3).

\n \n \n \n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucketEncryption:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?encryption", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketEncryptionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the server-side encryption configuration to\n delete.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketIntelligentTieringConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketIntelligentTieringConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to DeleteBucketIntelligentTieringConfiguration include:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?intelligent-tiering", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketIntelligentTieringConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#IntelligentTieringId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketInventoryConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketInventoryConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes an inventory configuration (identified by the inventory ID) from the\n bucket.

\n

To use this operation, you must have permissions to perform the\n s3:PutInventoryConfiguration 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

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

\n

Operations related to DeleteBucketInventoryConfiguration include:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?inventory", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketInventoryConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the inventory configuration to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#InventoryId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketLifecycle": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketLifecycleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the\n lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your\n objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of\n rules contained in the deleted lifecycle configuration.

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:PutLifecycleConfiguration\n permission.

    \n

    For more information about permissions, see Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
\n
    \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:PutLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n

For more information about the object expiration, see Elements to Describe Lifecycle Actions.

\n

Related actions include:

\n ", + "smithy.api#examples": [ + { + "title": "To delete lifecycle configuration on a bucket.", + "documentation": "The following example deletes lifecycle configuration on a bucket.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?lifecycle", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketLifecycleRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name of the lifecycle to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

\n Deletes a metadata table configuration from a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n
\n
\n

The following operations are related to DeleteBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?metadataTable", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketMetadataTableConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n The general purpose bucket that you want to remove the metadata table configuration from.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected bucket owner of the general purpose bucket that you want to remove the \n metadata table configuration from.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketMetricsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketMetricsConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the\n metrics configuration ID) from the bucket. Note that this doesn't include the daily storage\n metrics.

\n

To use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with\n Amazon CloudWatch.

\n

The following operations are related to\n DeleteBucketMetricsConfiguration:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?metrics", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketMetricsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the metrics configuration to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#MetricsId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketOwnershipControls": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketOwnershipControlsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you\n must have the s3:PutBucketOwnershipControls permission. For more information\n about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\n

For information about Amazon S3 Object Ownership, see Using Object Ownership.

\n

The following operations are related to\n DeleteBucketOwnershipControls:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?ownershipControls", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketOwnershipControlsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon S3 bucket whose OwnershipControls you want to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketPolicyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

Deletes the policy of a specified bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n DeleteBucketPolicy permissions on the specified bucket and belong\n to the bucket owner's account in order to use this operation.

\n

If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:DeleteBucketPolicy permission is required in a policy.\n For more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:DeleteBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteBucketPolicy\n

\n ", + "smithy.api#examples": [ + { + "title": "To delete bucket policy", + "documentation": "The following example deletes bucket policy on the specified bucket.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?policy", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketPolicyRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketReplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketReplicationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the replication configuration from the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:PutReplicationConfiguration action. The bucket owner has these\n permissions by default and can grant it to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n \n

It can take a while for the deletion of a replication configuration to fully\n propagate.

\n
\n

For information about replication configuration, see Replication in the\n Amazon S3 User Guide.

\n

The following operations are related to DeleteBucketReplication:

\n ", + "smithy.api#examples": [ + { + "title": "To delete bucket replication configuration", + "documentation": "The following example deletes replication configuration set on bucket.", + "input": { + "Bucket": "example" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?replication", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketReplicationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies the bucket being deleted.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketTaggingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Deletes the tags from the bucket.

\n

To use this operation, you must have permission to perform the\n s3:PutBucketTagging action. By default, the bucket owner has this\n permission and can grant this permission to others.

\n

The following operations are related to DeleteBucketTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To delete bucket tags", + "documentation": "The following example deletes bucket tags.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?tagging", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket that has the tag set to be removed.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteBucketWebsite": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteBucketWebsiteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This action removes the website configuration for a bucket. Amazon S3 returns a 200\n OK response upon successfully deleting a website configuration on the specified\n bucket. You will get a 200 OK response if the website configuration you are\n trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if\n the bucket specified in the request does not exist.

\n

This DELETE action requires the S3:DeleteBucketWebsite permission. By\n default, only the bucket owner can delete the website configuration attached to a bucket.\n However, bucket owners can grant other users permission to delete the website configuration\n by writing a bucket policy granting them the S3:DeleteBucketWebsite\n permission.

\n

For more information about hosting websites, see Hosting Websites on Amazon S3.

\n

The following operations are related to DeleteBucketWebsite:

\n ", + "smithy.api#examples": [ + { + "title": "To delete bucket website configuration", + "documentation": "The following example deletes bucket website configuration.", + "input": { + "Bucket": "examplebucket" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?website", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeleteBucketWebsiteRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which you want to remove the website configuration.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteMarker": { + "type": "boolean" + }, + "com.amazonaws.s3#DeleteMarkerEntry": { + "type": "structure", + "members": { + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

The account that created the delete marker.

" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key.

" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of an object.

" + } + }, + "IsLatest": { + "target": "com.amazonaws.s3#IsLatest", + "traits": { + "smithy.api#documentation": "

Specifies whether the object is (true) or is not (false) the latest version of an\n object.

" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Date and time when the object was last modified.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the delete marker.

" + } + }, + "com.amazonaws.s3#DeleteMarkerReplication": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#DeleteMarkerReplicationStatus", + "traits": { + "smithy.api#documentation": "

Indicates whether to replicate delete markers.

\n \n

Indicates whether to replicate delete markers.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 replicates delete markers. If you specify a Filter\n in your replication configuration, you must also include a\n DeleteMarkerReplication element. If your Filter includes a\n Tag element, the DeleteMarkerReplication\n Status must be set to Disabled, because Amazon S3 does not support replicating\n delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration.

\n

For more information about delete marker replication, see Basic Rule\n Configuration.

\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
" + } + }, + "com.amazonaws.s3#DeleteMarkerReplicationStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#DeleteMarkerVersionId": { + "type": "string" + }, + "com.amazonaws.s3#DeleteMarkers": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#DeleteMarkerEntry" + } + }, + "com.amazonaws.s3#DeleteObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#DeleteObjectOutput" + }, + "traits": { + "smithy.api#documentation": "

Removes an object from a bucket. The behavior depends on the bucket's versioning state:

\n
    \n
  • \n

    If bucket versioning is not enabled, the operation permanently deletes the object.

    \n
  • \n
  • \n

    If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object\u2019s versionId in the request. For more information about versioning-enabled buckets, see Deleting object versions from a versioning-enabled bucket.

    \n
  • \n
  • \n

    If bucket versioning is suspended, the operation removes the object that has a null versionId, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null versionId, and all versions of the object have a versionId, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a versionId, you must include the object\u2019s versionId in the request. For more information about versioning-suspended buckets, see Deleting objects from versioning-suspended buckets.

    \n
  • \n
\n \n
    \n
  • \n

    \n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null \n to the versionId query parameter in the request.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n

To remove a specific version, you must use the versionId query parameter. Using this\n query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3\n sets the response header x-amz-delete-marker to true.

\n

If the object you want to delete is in a bucket where the bucket versioning\n configuration is MFA Delete enabled, you must include the x-amz-mfa request\n header in the DELETE versionId request. Requests that include\n x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3\n User Guide. To see sample\n requests that use versioning, see Sample\n Request.

\n \n

\n Directory buckets - MFA delete is not supported by directory buckets.

\n
\n

You can delete objects by explicitly calling DELETE Object or calling \n (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block\n users or accounts from removing or deleting objects from your bucket, you must deny them\n the s3:DeleteObject, s3:DeleteObjectVersion, and\n s3:PutLifeCycleConfiguration actions.

\n \n

\n Directory buckets - S3 Lifecycle is not supported by directory buckets.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The following permissions are required in your policies when your \n DeleteObjects request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:DeleteObject\n - To delete an object from a bucket, you must always have the s3:DeleteObject permission.

      \n
    • \n
    • \n

      \n \n s3:DeleteObjectVersion\n - To delete a specific version of an object from a versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following action is related to DeleteObject:

\n ", + "smithy.api#examples": [ + { + "title": "To delete an object (from a non-versioned bucket)", + "documentation": "The following example deletes an object from a non-versioned bucket.", + "input": { + "Bucket": "ExampleBucket", + "Key": "HappyFace.jpg" } - }, - "com.amazonaws.s3#RequestProgress": { - "type": "structure", - "members": { - "Enabled": { - "target": "com.amazonaws.s3#EnableRequestProgress", - "traits": { - "smithy.api#documentation": "

Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE,\n FALSE. Default value: FALSE.

" - } - } + }, + { + "title": "To delete an object", + "documentation": "The following example deletes an object from an S3 bucket.", + "input": { + "Bucket": "examplebucket", + "Key": "objectkey.jpg" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}/{Key+}?x-id=DeleteObject", + "code": 204 + } + } + }, + "com.amazonaws.s3#DeleteObjectOutput": { + "type": "structure", + "members": { + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

Indicates whether the specified object version that was permanently deleted was (true)\n or was not (false) a delete marker before deletion. In a simple DELETE, this header\n indicates whether (true) or not (false) the current version of the object is a delete\n marker. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-delete-marker" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Returns the version ID of the delete marker created as a result of the DELETE\n operation.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#DeleteObjectRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name of the bucket containing the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Key name of the object to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "MFA": { + "target": "com.amazonaws.s3#MFA", + "traits": { + "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-mfa" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n \n

For directory buckets in this API operation, only the null value of the version ID is supported.

\n
", + "smithy.api#httpQuery": "versionId" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "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\n s3:BypassGovernanceRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "IfMatch": { + "target": "com.amazonaws.s3#IfMatch", + "traits": { + "smithy.api#documentation": "

The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns\n a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No \n Content) response.

\n

For more information about conditional requests, see RFC 7232.

\n \n

This functionality is only supported for directory buckets.

\n
", + "smithy.api#httpHeader": "If-Match" + } + }, + "IfMatchLastModifiedTime": { + "target": "com.amazonaws.s3#IfMatchLastModifiedTime", + "traits": { + "smithy.api#documentation": "

If present, the object is deleted only if its modification times matches the provided\n Timestamp. If the Timestamp values do not match, the operation\n returns a 412 Precondition Failed error. If the Timestamp matches\n or if the object doesn\u2019t exist, the operation returns a 204 Success (No\n Content) response.

\n \n

This functionality is only supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-if-match-last-modified-time" + } + }, + "IfMatchSize": { + "target": "com.amazonaws.s3#IfMatchSize", + "traits": { + "smithy.api#documentation": "

If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn\u2019t exist, \n the operation returns a 204 Success (No Content) response.

\n \n

This functionality is only supported for directory buckets.

\n
\n \n

You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size \n conditional headers in conjunction with each-other or individually.

\n
", + "smithy.api#httpHeader": "x-amz-if-match-size" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteObjectTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteObjectTaggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#DeleteObjectTaggingOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes the entire tag set from the specified object. For more information about\n managing object tags, see Object Tagging.

\n

To use this operation, you must have permission to perform the\n s3:DeleteObjectTagging action.

\n

To delete tags of a specific object version, add the versionId query\n parameter in the request. You will need permission for the\n s3:DeleteObjectVersionTagging action.

\n

The following operations are related to DeleteObjectTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To remove tag set from an object", + "documentation": "The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" }, - "traits": { - "smithy.api#documentation": "

Container for specifying if periodic QueryProgress messages should be\n sent.

" - } - }, - "com.amazonaws.s3#RequestRoute": { - "type": "string" - }, - "com.amazonaws.s3#RequestToken": { - "type": "string" - }, - "com.amazonaws.s3#ResponseCacheControl": { - "type": "string" - }, - "com.amazonaws.s3#ResponseContentDisposition": { - "type": "string" - }, - "com.amazonaws.s3#ResponseContentEncoding": { - "type": "string" - }, - "com.amazonaws.s3#ResponseContentLanguage": { - "type": "string" - }, - "com.amazonaws.s3#ResponseContentType": { - "type": "string" - }, - "com.amazonaws.s3#ResponseExpires": { - "type": "timestamp", - "traits": { - "smithy.api#timestampFormat": "http-date" + "output": { + "VersionId": "null" } - }, - "com.amazonaws.s3#Restore": { - "type": "string" - }, - "com.amazonaws.s3#RestoreExpiryDate": { - "type": "timestamp" - }, - "com.amazonaws.s3#RestoreObject": { - "type": "operation", + }, + { + "title": "To remove tag set from an object version", + "documentation": "The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.", "input": { - "target": "com.amazonaws.s3#RestoreObjectRequest" + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" }, "output": { - "target": "com.amazonaws.s3#RestoreObjectOutput" - }, - "errors": [ - { - "target": "com.amazonaws.s3#ObjectAlreadyInActiveTierError" - } - ], - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm" - }, - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Restores an archived copy of an object back into Amazon S3

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

This action performs the following types of requests:

\n
    \n
  • \n

    \n restore an archive - Restore an archived object

    \n
  • \n
\n

For more information about the S3 structure in the request body, see the\n following:

\n \n
\n
Permissions
\n
\n

To use this operation, you must have permissions to perform the\n s3:RestoreObject action. The bucket owner has this permission by\n default and can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

\n
\n
Restoring objects
\n
\n

Objects that you archive to the S3 Glacier Flexible Retrieval or 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 the\n S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive\n storage classes, you must first initiate a restore request, and then wait until a\n temporary copy of the object is available. If you want a permanent copy of the\n object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket.\n To access an archived object, you must restore the object for the duration (number\n of days) that you specify. For objects in the Archive Access or Deep Archive\n Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request,\n and then wait until the object is moved into the Frequent Access tier.

\n

To restore a specific object version, you can provide a version ID. If you\n don't provide a version ID, Amazon S3 restores the current version.

\n

When restoring an archived object, you can specify one of the following data\n access tier options in the Tier element of the request body:

\n
    \n
  • \n

    \n Expedited - Expedited retrievals allow you to quickly access\n your data stored in the S3 Glacier Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests\n for restoring archives are required. For all but the largest archived\n objects (250 MB+), data accessed using Expedited retrievals is typically\n made available within 1\u20135 minutes. Provisioned capacity ensures that\n retrieval capacity for Expedited retrievals is available when you need it.\n Expedited retrievals and provisioned capacity are not available for objects\n stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.

    \n
  • \n
  • \n

    \n Standard - Standard retrievals allow you to access any of\n your archived objects within several hours. This is the default option for\n retrieval requests that do not specify the retrieval option. Standard\n retrievals typically finish within 3\u20135 hours for objects stored in the\n S3 Glacier Flexible Retrieval storage class or\n 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\n in S3 Intelligent-Tiering.

    \n
  • \n
  • \n

    \n Bulk - Bulk retrievals free for objects stored in the\n S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes,\n enabling you to retrieve large amounts, even petabytes, of data at no cost.\n Bulk retrievals typically finish within 5\u201312 hours for objects stored in the\n S3 Glacier Flexible Retrieval storage class or\n S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost\n retrieval option when restoring objects from\n S3 Glacier Deep Archive. They typically finish within 48 hours for\n objects stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.

    \n
  • \n
\n

For more information about archive retrieval options and provisioned capacity\n for Expedited data access, see Restoring Archived\n Objects in the Amazon S3 User Guide.

\n

You can use Amazon S3 restore speed upgrade to change the restore speed to a faster\n speed while it is in progress. For more information, see 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\n request. Operations return the x-amz-restore header, which provides\n information about the restoration status, in the response. You can use Amazon S3 event\n notifications to notify you when a restore is initiated or completed. For more\n information, see Configuring Amazon S3 Event\n Notifications in the Amazon S3 User Guide.

\n

After restoring an archived object, you can update the restoration period by\n reissuing the request with a new period. Amazon S3 updates the restoration period\n relative to the current time and charges only for the request-there are no\n data transfer charges. You cannot update the restoration period when Amazon S3 is\n actively processing your current restore request for the object.

\n

If your bucket has a lifecycle configuration with a rule that includes an\n expiration action, the object expiration overrides the life span that you specify\n in a restore request. For example, if you restore an object copy for 10 days, but\n the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days.\n For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle\n Management in 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\n the response.

    \n
  • \n
\n
    \n
  • \n

    Special errors:

    \n
      \n
    • \n

      \n Code: RestoreAlreadyInProgress\n

      \n
    • \n
    • \n

      \n Cause: Object restore is already in progress.\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.\n Try again later. (Returned if there is insufficient capacity to\n process the Expedited request. This error applies only to Expedited\n retrievals and not to 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

The following operations are related to RestoreObject:

\n ", - "smithy.api#examples": [ - { - "title": "To restore an archived object", - "documentation": "The following example restores for one day an archived copy of an object back into Amazon S3 bucket.", - "input": { - "Bucket": "examplebucket", - "Key": "archivedobjectkey", - "RestoreRequest": { - "Days": 1, - "GlacierJobParameters": { - "Tier": "Expedited" - } - } - }, - "output": {} - } + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + } + } + ], + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}/{Key+}?tagging", + "code": 204 + } + } + }, + "com.amazonaws.s3#DeleteObjectTaggingOutput": { + "type": "structure", + "members": { + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object the tag-set was removed from.

", + "smithy.api#httpHeader": "x-amz-version-id" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#DeleteObjectTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the objects from which to remove the tags.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key that identifies the object in the bucket from which to remove all tags.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object that the tag-set will be removed from.

", + "smithy.api#httpQuery": "versionId" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeleteObjects": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeleteObjectsRequest" + }, + "output": { + "target": "com.amazonaws.s3#DeleteObjectsOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

This operation 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 operation provides\n a suitable alternative to sending individual delete requests, reducing per-request\n overhead.

\n

The request can contain a list of up to 1,000 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 operation and returns the result of that delete, success or failure, in the response.\n If the object specified in the request isn't found, Amazon S3 confirms the deletion by returning the result as deleted.

\n \n
    \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n

The operation supports two modes for the response: verbose and quiet. By default, the\n operation 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 operation encountered an error. For a successful deletion in a quiet mode, the operation\n does not return any information about the delete in the response body.

\n

When performing this action on an MFA Delete enabled bucket, that attempts to delete any\n 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 in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n MFA delete is not supported by directory buckets.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n following permissions are required in your policies when your\n DeleteObjects request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:DeleteObject\n \n - To delete an object from a bucket, you must always specify\n the s3:DeleteObject permission.

      \n
    • \n
    • \n

      \n \n s3:DeleteObjectVersion\n - To delete a specific version of an object from a\n versioning-enabled bucket, you must specify the\n s3:DeleteObjectVersion permission.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Content-MD5 request header
\n
\n
    \n
  • \n

    \n General purpose bucket - The Content-MD5\n request header is required for all Multi-Object Delete requests. Amazon S3 uses\n the header value to ensure that your request body has not been altered in\n transit.

    \n
  • \n
  • \n

    \n Directory bucket - The\n Content-MD5 request header or a additional checksum request header\n (including x-amz-checksum-crc32,\n x-amz-checksum-crc32c, x-amz-checksum-sha1, or\n x-amz-checksum-sha256) is required for all Multi-Object\n Delete requests.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to DeleteObjects:

\n ", + "smithy.api#examples": [ + { + "title": "To delete multiple object versions from a versioned bucket", + "documentation": "The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.", + "input": { + "Bucket": "examplebucket", + "Delete": { + "Objects": [ + { + "Key": "HappyFace.jpg", + "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + }, + { + "Key": "HappyFace.jpg", + "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + } ], - "smithy.api#http": { - "method": "POST", - "uri": "/{Bucket}/{Key+}?restore", - "code": 200 - } - } - }, - "com.amazonaws.s3#RestoreObjectOutput": { - "type": "structure", - "members": { - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - }, - "RestoreOutputPath": { - "target": "com.amazonaws.s3#RestoreOutputPath", - "traits": { - "smithy.api#documentation": "

Indicates the path in the provided S3 output location where Select results will be\n restored to.

", - "smithy.api#httpHeader": "x-amz-restore-output-path" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#RestoreObjectRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name containing the object to restore.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which the action was initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

VersionId used to reference a specific version of the object.

", - "smithy.api#httpQuery": "versionId" - } - }, - "RestoreRequest": { - "target": "com.amazonaws.s3#RestoreRequest", - "traits": { - "smithy.api#httpPayload": {}, - "smithy.api#xmlName": "RestoreRequest" - } - }, - "RequestPayer": { - "target": "com.amazonaws.s3#RequestPayer", - "traits": { - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#RestoreOutputPath": { - "type": "string" - }, - "com.amazonaws.s3#RestoreRequest": { - "type": "structure", - "members": { - "Days": { - "target": "com.amazonaws.s3#Days", - "traits": { - "smithy.api#documentation": "

Lifetime of the active copy in days. Do not use with restores that specify\n OutputLocation.

\n

The Days element is required for regular restores, and must not be provided for select\n requests.

" - } - }, - "GlacierJobParameters": { - "target": "com.amazonaws.s3#GlacierJobParameters", - "traits": { - "smithy.api#documentation": "

S3 Glacier related parameters pertaining to this job. Do not use with restores that\n specify OutputLocation.

" - } - }, - "Type": { - "target": "com.amazonaws.s3#RestoreRequestType", - "traits": { - "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Type of restore request.

" - } - }, - "Tier": { - "target": "com.amazonaws.s3#Tier", - "traits": { - "smithy.api#documentation": "

Retrieval tier at which the restore will be processed.

" - } - }, - "Description": { - "target": "com.amazonaws.s3#Description", - "traits": { - "smithy.api#documentation": "

The optional description for the job.

" - } - }, - "SelectParameters": { - "target": "com.amazonaws.s3#SelectParameters", - "traits": { - "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Describes the parameters for Select job types.

" - } - }, - "OutputLocation": { - "target": "com.amazonaws.s3#OutputLocation", - "traits": { - "smithy.api#documentation": "

Describes the location where the restore job's output is stored.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for restore job parameters.

" - } - }, - "com.amazonaws.s3#RestoreRequestType": { - "type": "enum", - "members": { - "SELECT": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SELECT" - } - } - } - }, - "com.amazonaws.s3#RestoreStatus": { - "type": "structure", - "members": { - "IsRestoreInProgress": { - "target": "com.amazonaws.s3#IsRestoreInProgress", - "traits": { - "smithy.api#documentation": "

Specifies whether the object is currently being restored. If the object restoration is\n in progress, the header returns the value TRUE. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"true\"\n

\n

If the object restoration has completed, the header returns the value\n FALSE. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"false\",\n RestoreExpiryDate=\"2012-12-21T00:00:00.000Z\"\n

\n

If the object hasn't been restored, there is no header response.

" - } - }, - "RestoreExpiryDate": { - "target": "com.amazonaws.s3#RestoreExpiryDate", - "traits": { - "smithy.api#documentation": "

Indicates when the restored copy will expire. This value is populated only if the object\n has already been restored. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"false\",\n RestoreExpiryDate=\"2012-12-21T00:00:00.000Z\"\n

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" - } - }, - "com.amazonaws.s3#Role": { - "type": "string" - }, - "com.amazonaws.s3#RoutingRule": { - "type": "structure", - "members": { - "Condition": { - "target": "com.amazonaws.s3#Condition", - "traits": { - "smithy.api#documentation": "

A container for describing a condition that must be met for the specified redirect to\n apply. For example, 1. If request is for pages in the /docs folder, redirect\n to the /documents folder. 2. If request results in HTTP error 4xx, redirect\n request to another host where you might process the error.

" - } - }, - "Redirect": { - "target": "com.amazonaws.s3#Redirect", - "traits": { - "smithy.api#documentation": "

Container for redirect information. You can redirect requests to another host, to\n another page, or with another protocol. In the event of an error, you can specify a\n different error code to return.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the redirect behavior and when a redirect is applied. For more information\n about routing rules, see Configuring advanced conditional redirects in the\n Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#RoutingRules": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#RoutingRule", - "traits": { - "smithy.api#xmlName": "RoutingRule" - } - } - }, - "com.amazonaws.s3#S3KeyFilter": { - "type": "structure", - "members": { - "FilterRules": { - "target": "com.amazonaws.s3#FilterRuleList", - "traits": { - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "FilterRule" - } - } - }, - "traits": { - "smithy.api#documentation": "

A container for object key name prefix and suffix filtering rules.

" - } - }, - "com.amazonaws.s3#S3Location": { - "type": "structure", - "members": { - "BucketName": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket where the restore results will be placed.

", - "smithy.api#required": {} - } - }, - "Prefix": { - "target": "com.amazonaws.s3#LocationPrefix", - "traits": { - "smithy.api#documentation": "

The prefix that is prepended to the restore results for this request.

", - "smithy.api#required": {} - } - }, - "Encryption": { - "target": "com.amazonaws.s3#Encryption" - }, - "CannedACL": { - "target": "com.amazonaws.s3#ObjectCannedACL", - "traits": { - "smithy.api#documentation": "

The canned ACL to apply to the restore results.

" - } - }, - "AccessControlList": { - "target": "com.amazonaws.s3#Grants", - "traits": { - "smithy.api#documentation": "

A list of grants that control access to the staged results.

" - } - }, - "Tagging": { - "target": "com.amazonaws.s3#Tagging", - "traits": { - "smithy.api#documentation": "

The tag-set that is applied to the restore results.

" - } - }, - "UserMetadata": { - "target": "com.amazonaws.s3#UserMetadata", - "traits": { - "smithy.api#documentation": "

A list of metadata to store with the restore results in S3.

" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "smithy.api#documentation": "

The class of storage used to store the restore results.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Describes an Amazon S3 location that will receive the results of the restore request.

" - } - }, - "com.amazonaws.s3#S3TablesArn": { - "type": "string" - }, - "com.amazonaws.s3#S3TablesBucketArn": { - "type": "string" - }, - "com.amazonaws.s3#S3TablesDestination": { - "type": "structure", - "members": { - "TableBucketArn": { - "target": "com.amazonaws.s3#S3TablesBucketArn", - "traits": { - "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the table bucket that's specified as the \n destination in the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket.\n

", - "smithy.api#required": {} - } - }, - "TableName": { - "target": "com.amazonaws.s3#S3TablesName", - "traits": { - "smithy.api#documentation": "

\n The name for the metadata table in your metadata table configuration. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", - "smithy.api#required": {} - } - } + "Quiet": false + } }, - "traits": { - "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket. \n

" - } - }, - "com.amazonaws.s3#S3TablesDestinationResult": { - "type": "structure", - "members": { - "TableBucketArn": { - "target": "com.amazonaws.s3#S3TablesBucketArn", - "traits": { - "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the table bucket that's specified as the \n destination in the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket.\n

", - "smithy.api#required": {} - } - }, - "TableName": { - "target": "com.amazonaws.s3#S3TablesName", - "traits": { - "smithy.api#documentation": "

\n The name for the metadata table in your metadata table configuration. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", - "smithy.api#required": {} - } - }, - "TableArn": { - "target": "com.amazonaws.s3#S3TablesArn", - "traits": { - "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The \n specified metadata table name must be unique within the aws_s3_metadata namespace \n in the destination table bucket.\n

", - "smithy.api#required": {} - } + "output": { + "Deleted": [ + { + "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd", + "Key": "HappyFace.jpg" }, - "TableNamespace": { - "target": "com.amazonaws.s3#S3TablesNamespace", - "traits": { - "smithy.api#documentation": "

\n The table bucket namespace for the metadata table in your metadata table configuration. This value \n is always aws_s3_metadata.\n

", - "smithy.api#required": {} - } + { + "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b", + "Key": "HappyFace.jpg" } - }, - "traits": { - "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

" - } - }, - "com.amazonaws.s3#S3TablesName": { - "type": "string" - }, - "com.amazonaws.s3#S3TablesNamespace": { - "type": "string" - }, - "com.amazonaws.s3#SSECustomerAlgorithm": { - "type": "string" - }, - "com.amazonaws.s3#SSECustomerKey": { - "type": "string", - "traits": { - "smithy.api#sensitive": {} + ] } - }, - "com.amazonaws.s3#SSECustomerKeyMD5": { - "type": "string" - }, - "com.amazonaws.s3#SSEKMS": { - "type": "structure", - "members": { - "KeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for\n encrypting inventory reports.

", - "smithy.api#required": {} - } - } + }, + { + "title": "To delete multiple objects from a versioned bucket", + "documentation": "The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.", + "input": { + "Bucket": "examplebucket", + "Delete": { + "Objects": [ + { + "Key": "objectkey1" + }, + { + "Key": "objectkey2" + } + ], + "Quiet": false + } }, - "traits": { - "smithy.api#documentation": "

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

", - "smithy.api#xmlName": "SSE-KMS" - } - }, - "com.amazonaws.s3#SSEKMSEncryptionContext": { - "type": "string", - "traits": { - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.s3#SSEKMSKeyId": { - "type": "string", - "traits": { - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.s3#SSES3": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

", - "smithy.api#xmlName": "SSE-S3" - } - }, - "com.amazonaws.s3#ScanRange": { - "type": "structure", - "members": { - "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\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.

" - } + "output": { + "Deleted": [ + { + "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", + "Key": "objectkey1", + "DeleteMarker": true }, - "End": { - "target": "com.amazonaws.s3#End", - "traits": { - "smithy.api#documentation": "

Specifies the end of the byte range. This parameter is optional. Valid values:\n non-negative integers. The default value is one less than the size of the object being\n queried. If only the End parameter is supplied, it is interpreted to mean scan the last N\n bytes of the file. For example,\n 50 means scan the\n last 50 bytes.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Specifies the byte range of the object to get the records from. A record is processed\n when its first byte is contained by the range. This parameter is optional, but when\n specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the\n start and end of the range.

" - } - }, - "com.amazonaws.s3#SelectObjectContent": { - "type": "operation", + { + "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", + "Key": "objectkey2", + "DeleteMarker": true + } + ] + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}?delete", + "code": 200 + } + } + }, + "com.amazonaws.s3#DeleteObjectsOutput": { + "type": "structure", + "members": { + "Deleted": { + "target": "com.amazonaws.s3#DeletedObjects", + "traits": { + "smithy.api#documentation": "

Container element for a successful delete. It identifies the object that was\n successfully deleted.

", + "smithy.api#xmlFlattened": {} + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + }, + "Errors": { + "target": "com.amazonaws.s3#Errors", + "traits": { + "smithy.api#documentation": "

Container for a failed delete action that describes the object that Amazon S3 attempted to\n delete and the error it encountered.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Error" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "DeleteResult" + } + }, + "com.amazonaws.s3#DeleteObjectsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the objects to delete.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delete": { + "target": "com.amazonaws.s3#Delete", + "traits": { + "smithy.api#documentation": "

Container for the request.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "Delete" + } + }, + "MFA": { + "target": "com.amazonaws.s3#MFA", + "traits": { + "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device. Required to permanently delete a versioned\n object if versioning is configured with MFA delete enabled.

\n

When performing the DeleteObjects operation on an MFA delete enabled\n bucket, which attempts to delete the specified versioned objects, you must include an MFA\n token. If you don't provide an MFA token, the entire request will fail, even if there are\n non-versioned objects that you are trying to delete. If you provide an invalid token,\n whether there are versioned object keys in the request or not, the entire Multi-Object\n Delete request will fail. For information about MFA Delete, see MFA\n Delete in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-mfa" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "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\n s3:BypassGovernanceRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, 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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeletePublicAccessBlock": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#DeletePublicAccessBlockRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this\n operation, you must have the s3:PutBucketPublicAccessBlock permission. For\n more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

The following operations are related to DeletePublicAccessBlock:

\n ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/{Bucket}?publicAccessBlock", + "code": 204 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#DeletePublicAccessBlockRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#DeletedObject": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The name of the deleted object.

" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The version ID of the deleted object.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

Indicates whether the specified object version that was permanently deleted was (true)\n or was not (false) a delete marker before deletion. In a simple DELETE, this header\n indicates whether (true) or not (false) the current version of the object is a delete\n marker. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "DeleteMarkerVersionId": { + "target": "com.amazonaws.s3#DeleteMarkerVersionId", + "traits": { + "smithy.api#documentation": "

The version ID of the delete marker created as a result of the DELETE operation. If you\n delete a specific object version, the value returned by this header is the version ID of\n the object version deleted.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the deleted object.

" + } + }, + "com.amazonaws.s3#DeletedObjects": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#DeletedObject" + } + }, + "com.amazonaws.s3#Delimiter": { + "type": "string" + }, + "com.amazonaws.s3#Description": { + "type": "string" + }, + "com.amazonaws.s3#Destination": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the\n results.

", + "smithy.api#required": {} + } + }, + "Account": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to\n change replica ownership to the Amazon Web Services account that owns the destination bucket by\n specifying the AccessControlTranslation property, this is the account ID of\n the destination bucket owner. For more information, see Replication Additional\n Configuration: Changing the Replica Owner in the\n Amazon S3 User Guide.

" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

The storage class to use when replicating objects, such as S3 Standard or reduced\n redundancy. By default, Amazon S3 uses the storage class of the source object to create the\n object replica.

\n

For valid values, see the StorageClass element of the PUT Bucket\n replication action in the Amazon S3 API Reference.

" + } + }, + "AccessControlTranslation": { + "target": "com.amazonaws.s3#AccessControlTranslation", + "traits": { + "smithy.api#documentation": "

Specify this only in a cross-account scenario (where source and destination bucket\n owners are not the same), and you want to change replica ownership to the Amazon Web Services account\n that owns the destination bucket. If this is not specified in the replication\n configuration, the replicas are owned by same Amazon Web Services account that owns the source\n object.

" + } + }, + "EncryptionConfiguration": { + "target": "com.amazonaws.s3#EncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

A container that provides information about encryption. If\n SourceSelectionCriteria is specified, you must specify this element.

" + } + }, + "ReplicationTime": { + "target": "com.amazonaws.s3#ReplicationTime", + "traits": { + "smithy.api#documentation": "

A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time\n when all objects and operations on objects must be replicated. Must be specified together\n with a Metrics block.

" + } + }, + "Metrics": { + "target": "com.amazonaws.s3#Metrics", + "traits": { + "smithy.api#documentation": "

A container specifying replication metrics-related settings enabling replication\n metrics and events.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies information about where to publish analysis or configuration results for an\n Amazon S3 bucket and S3 Replication Time Control (S3 RTC).

" + } + }, + "com.amazonaws.s3#DirectoryBucketToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, + "com.amazonaws.s3#DisplayName": { + "type": "string" + }, + "com.amazonaws.s3#ETag": { + "type": "string" + }, + "com.amazonaws.s3#EmailAddress": { + "type": "string" + }, + "com.amazonaws.s3#EnableRequestProgress": { + "type": "boolean" + }, + "com.amazonaws.s3#EncodingType": { + "type": "enum", + "members": { + "url": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "url" + } + } + }, + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
" + } + }, + "com.amazonaws.s3#Encryption": { + "type": "structure", + "members": { + "EncryptionType": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when storing job results in Amazon S3 (for example,\n AES256, aws:kms).

", + "smithy.api#required": {} + } + }, + "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 encryption customer managed key to use for encryption of job results. Amazon S3 only\n supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service\n Developer Guide.

" + } + }, + "KMSContext": { + "target": "com.amazonaws.s3#KMSContext", + "traits": { + "smithy.api#documentation": "

If the encryption type is aws:kms, this optional value can be used to\n specify the encryption context for the restore results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the type of server-side encryption used.

" + } + }, + "com.amazonaws.s3#EncryptionConfiguration": { + "type": "structure", + "members": { + "ReplicaKmsKeyID": { + "target": "com.amazonaws.s3#ReplicaKmsKeyID", + "traits": { + "smithy.api#documentation": "

Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in\n Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to\n encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more\n information, see Asymmetric keys in Amazon Web Services\n KMS in the Amazon Web Services Key Management Service Developer\n Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies encryption-related information for an Amazon S3 bucket that is a destination for\n replicated objects.

\n \n

If you're specifying a customer managed KMS key, we recommend using a fully\n qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the\n key within the requester\u2019s account. This behavior can result in data that's encrypted\n with a KMS key that belongs to the requester, and not the bucket owner.

\n
" + } + }, + "com.amazonaws.s3#EncryptionTypeMismatch": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

\n The existing object was created with a different encryption type. \n Subsequent write requests must include the appropriate encryption \n parameters in the request or while creating the session.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.s3#End": { + "type": "long" + }, + "com.amazonaws.s3#EndEvent": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

A message that indicates the request is complete and no more messages will be sent. You\n should not assume that the request is complete until the client receives an\n EndEvent.

" + } + }, + "com.amazonaws.s3#Error": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The error key.

" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The version ID of the error.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "Code": { + "target": "com.amazonaws.s3#Code", + "traits": { + "smithy.api#documentation": "

The error code is a string that uniquely identifies an error condition. It is meant to\n be read and understood by programs that detect and handle errors by type. The following is\n a list of Amazon S3 error codes. For more information, see Error responses.

\n
    \n
  • \n
      \n
    • \n

      \n Code: AccessDenied

      \n
    • \n
    • \n

      \n Description: Access Denied

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: AccountProblem

      \n
    • \n
    • \n

      \n Description: There is a problem with your Amazon Web Services account\n that prevents the action from completing successfully. Contact Amazon Web Services Support\n for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: AllAccessDisabled

      \n
    • \n
    • \n

      \n Description: All access to this Amazon S3 resource has been\n disabled. Contact Amazon Web Services Support for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: AmbiguousGrantByEmailAddress

      \n
    • \n
    • \n

      \n Description: The email address you provided is\n associated with more than one account.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: AuthorizationHeaderMalformed

      \n
    • \n
    • \n

      \n Description: The authorization header you provided is\n invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: BadDigest

      \n
    • \n
    • \n

      \n Description: The Content-MD5 you specified did not\n match what we received.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: BucketAlreadyExists

      \n
    • \n
    • \n

      \n Description: The requested bucket name is not\n available. The bucket namespace is shared by all users of the system. Please\n select a different name and try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: BucketAlreadyOwnedByYou

      \n
    • \n
    • \n

      \n Description: The bucket you tried to create already\n exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in\n the North Virginia Region. For legacy compatibility, if you re-create an\n existing bucket that you already own in the North Virginia Region, Amazon S3 returns\n 200 OK and resets the bucket access control lists (ACLs).

      \n
    • \n
    • \n

      \n Code: 409 Conflict (in all Regions except the North\n Virginia Region)

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: BucketNotEmpty

      \n
    • \n
    • \n

      \n Description: The bucket you tried to delete is not\n empty.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: CredentialsNotSupported

      \n
    • \n
    • \n

      \n Description: This request does not support\n credentials.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: CrossLocationLoggingProhibited

      \n
    • \n
    • \n

      \n Description: Cross-location logging not allowed.\n Buckets in one geographic location cannot log information to a bucket in\n another location.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: EntityTooSmall

      \n
    • \n
    • \n

      \n Description: Your proposed upload is smaller than the\n minimum allowed object size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: EntityTooLarge

      \n
    • \n
    • \n

      \n Description: Your proposed upload exceeds the maximum\n allowed object size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: ExpiredToken

      \n
    • \n
    • \n

      \n Description: The provided token has expired.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: IllegalVersioningConfigurationException

      \n
    • \n
    • \n

      \n Description: Indicates that the versioning\n configuration specified in the request is invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: IncompleteBody

      \n
    • \n
    • \n

      \n Description: You did not provide the number of bytes\n specified by the Content-Length HTTP header

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: IncorrectNumberOfFilesInPostRequest

      \n
    • \n
    • \n

      \n Description: POST requires exactly one file upload per\n request.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InlineDataTooLarge

      \n
    • \n
    • \n

      \n Description: Inline data exceeds the maximum allowed\n size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InternalError

      \n
    • \n
    • \n

      \n Description: We encountered an internal error. Please\n try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 500 Internal Server Error

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidAccessKeyId

      \n
    • \n
    • \n

      \n Description: The Amazon Web Services access key ID you provided does\n not exist in our records.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidAddressingHeader

      \n
    • \n
    • \n

      \n Description: You must specify the Anonymous\n role.

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidArgument

      \n
    • \n
    • \n

      \n Description: Invalid Argument

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidBucketName

      \n
    • \n
    • \n

      \n Description: The specified bucket is not valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidBucketState

      \n
    • \n
    • \n

      \n Description: The request is not valid with the current\n state of the bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidDigest

      \n
    • \n
    • \n

      \n Description: The Content-MD5 you specified is not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidEncryptionAlgorithmError

      \n
    • \n
    • \n

      \n Description: The encryption request you specified is\n not valid. The valid value is AES256.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidLocationConstraint

      \n
    • \n
    • \n

      \n Description: The specified location constraint is not\n valid. For more information about Regions, see How to Select\n a Region for Your Buckets.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidObjectState

      \n
    • \n
    • \n

      \n Description: The action is not valid for the current\n state of the object.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidPart

      \n
    • \n
    • \n

      \n Description: One or more of the specified parts could\n not be found. The part might not have been uploaded, or the specified entity\n tag might not have matched the part's entity tag.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidPartOrder

      \n
    • \n
    • \n

      \n Description: The list of parts was not in ascending\n order. Parts list must be specified in order by part number.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidPayer

      \n
    • \n
    • \n

      \n Description: All access to this object has been\n disabled. Please contact Amazon Web Services Support for further assistance.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidPolicyDocument

      \n
    • \n
    • \n

      \n Description: The content of the form does not meet the\n conditions specified in the policy document.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRange

      \n
    • \n
    • \n

      \n Description: The requested range cannot be\n satisfied.

      \n
    • \n
    • \n

      \n HTTP Status Code: 416 Requested Range Not\n Satisfiable

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Please use\n AWS4-HMAC-SHA256.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: SOAP requests must be made over an HTTPS\n connection.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported for buckets with non-DNS compliant names.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported for buckets with periods (.) in their names.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate endpoint only\n supports virtual style requests.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate is not configured\n on this bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Accelerate is disabled on\n this bucket.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration is not\n supported on this bucket. Contact Amazon Web Services Support for more information.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest

      \n
    • \n
    • \n

      \n Description: Amazon S3 Transfer Acceleration cannot be\n enabled on this bucket. Contact Amazon Web Services Support for more information.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n Code: N/A

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidSecurity

      \n
    • \n
    • \n

      \n Description: The provided security credentials are not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidSOAPRequest

      \n
    • \n
    • \n

      \n Description: The SOAP request body is invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidStorageClass

      \n
    • \n
    • \n

      \n Description: The storage class you specified is not\n valid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidTargetBucketForLogging

      \n
    • \n
    • \n

      \n Description: The target bucket for logging does not\n exist, is not owned by you, or does not have the appropriate grants for the\n log-delivery group.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidToken

      \n
    • \n
    • \n

      \n Description: The provided token is malformed or\n otherwise invalid.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidURI

      \n
    • \n
    • \n

      \n Description: Couldn't parse the specified URI.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: KeyTooLongError

      \n
    • \n
    • \n

      \n Description: Your key is too long.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MalformedACLError

      \n
    • \n
    • \n

      \n Description: The XML you provided was not well-formed\n or did not validate against our published schema.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MalformedPOSTRequest

      \n
    • \n
    • \n

      \n Description: The body of your POST request is not\n well-formed multipart/form-data.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MalformedXML

      \n
    • \n
    • \n

      \n Description: This happens when the user sends malformed\n XML (XML that doesn't conform to the published XSD) for the configuration. The\n error message is, \"The XML you provided was not well-formed or did not validate\n against our published schema.\"

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MaxMessageLengthExceeded

      \n
    • \n
    • \n

      \n Description: Your request was too big.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MaxPostPreDataLengthExceededError

      \n
    • \n
    • \n

      \n Description: Your POST request fields preceding the\n upload file were too large.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MetadataTooLarge

      \n
    • \n
    • \n

      \n Description: Your metadata headers exceed the maximum\n allowed metadata size.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MethodNotAllowed

      \n
    • \n
    • \n

      \n Description: The specified method is not allowed\n against this resource.

      \n
    • \n
    • \n

      \n HTTP Status Code: 405 Method Not Allowed

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingAttachment

      \n
    • \n
    • \n

      \n Description: A SOAP attachment was expected, but none\n were found.

      \n
    • \n
    • \n

      \n HTTP Status Code: N/A

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingContentLength

      \n
    • \n
    • \n

      \n Description: You must provide the Content-Length HTTP\n header.

      \n
    • \n
    • \n

      \n HTTP Status Code: 411 Length Required

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingRequestBodyError

      \n
    • \n
    • \n

      \n Description: This happens when the user sends an empty\n XML document as a request. The error message is, \"Request body is empty.\"\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingSecurityElement

      \n
    • \n
    • \n

      \n Description: The SOAP 1.1 request is missing a security\n element.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MissingSecurityHeader

      \n
    • \n
    • \n

      \n Description: Your request is missing a required\n header.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoLoggingStatusForKey

      \n
    • \n
    • \n

      \n Description: There is no such thing as a logging status\n subresource for a key.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchBucket

      \n
    • \n
    • \n

      \n Description: The specified bucket does not\n exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchBucketPolicy

      \n
    • \n
    • \n

      \n Description: The specified bucket does not have a\n bucket policy.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchKey

      \n
    • \n
    • \n

      \n Description: The specified key does not exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchLifecycleConfiguration

      \n
    • \n
    • \n

      \n Description: The lifecycle configuration does not\n exist.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchUpload

      \n
    • \n
    • \n

      \n Description: The specified multipart upload does not\n exist. The upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NoSuchVersion

      \n
    • \n
    • \n

      \n Description: Indicates that the version ID specified in\n the request does not match an existing version.

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NotImplemented

      \n
    • \n
    • \n

      \n Description: A header you provided implies\n functionality that is not implemented.

      \n
    • \n
    • \n

      \n HTTP Status Code: 501 Not Implemented

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: NotSignedUp

      \n
    • \n
    • \n

      \n Description: Your account is not signed up for the Amazon S3\n service. You must sign up before you can use Amazon S3. You can sign up at the\n following URL: Amazon S3\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: OperationAborted

      \n
    • \n
    • \n

      \n Description: A conflicting conditional action is\n currently in progress against this resource. Try again.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: PermanentRedirect

      \n
    • \n
    • \n

      \n Description: The bucket you are attempting to access\n must be addressed using the specified endpoint. Send all future requests to\n this endpoint.

      \n
    • \n
    • \n

      \n HTTP Status Code: 301 Moved Permanently

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: PreconditionFailed

      \n
    • \n
    • \n

      \n Description: At least one of the preconditions you\n specified did not hold.

      \n
    • \n
    • \n

      \n HTTP Status Code: 412 Precondition Failed

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: Redirect

      \n
    • \n
    • \n

      \n Description: Temporary redirect.

      \n
    • \n
    • \n

      \n HTTP Status Code: 307 Moved Temporarily

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RestoreAlreadyInProgress

      \n
    • \n
    • \n

      \n Description: Object restore is already in\n progress.

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RequestIsNotMultiPartContent

      \n
    • \n
    • \n

      \n Description: Bucket POST must be of the enclosure-type\n multipart/form-data.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RequestTimeout

      \n
    • \n
    • \n

      \n Description: Your socket connection to the server was\n not read from or written to within the timeout period.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RequestTimeTooSkewed

      \n
    • \n
    • \n

      \n Description: The difference between the request time\n and the server's time is too large.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: RequestTorrentOfBucketError

      \n
    • \n
    • \n

      \n Description: Requesting the torrent file of a bucket is\n not permitted.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: SignatureDoesNotMatch

      \n
    • \n
    • \n

      \n Description: The request signature we calculated does\n not match the signature you provided. Check your Amazon Web Services secret access key and\n signing method. For more information, see REST\n Authentication and SOAP\n Authentication for details.

      \n
    • \n
    • \n

      \n HTTP Status Code: 403 Forbidden

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: ServiceUnavailable

      \n
    • \n
    • \n

      \n Description: Service is unable to handle\n request.

      \n
    • \n
    • \n

      \n HTTP Status Code: 503 Service Unavailable

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: SlowDown

      \n
    • \n
    • \n

      \n Description: Reduce your request rate.

      \n
    • \n
    • \n

      \n HTTP Status Code: 503 Slow Down

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Server

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: TemporaryRedirect

      \n
    • \n
    • \n

      \n Description: You are being redirected to the bucket\n while DNS updates.

      \n
    • \n
    • \n

      \n HTTP Status Code: 307 Moved Temporarily

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: TokenRefreshRequired

      \n
    • \n
    • \n

      \n Description: The provided token must be\n refreshed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: TooManyBuckets

      \n
    • \n
    • \n

      \n Description: You have attempted to create more buckets\n than allowed.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: UnexpectedContent

      \n
    • \n
    • \n

      \n Description: This request does not support\n content.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: UnresolvableGrantByEmailAddress

      \n
    • \n
    • \n

      \n Description: The email address you provided does not\n match any account on record.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: UserKeyMustBeSpecified

      \n
    • \n
    • \n

      \n Description: The bucket POST must contain the specified\n field name. If it is specified, check the order of the fields.

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
\n

" + } + }, + "Message": { + "target": "com.amazonaws.s3#Message", + "traits": { + "smithy.api#documentation": "

The error message contains a generic description of the error condition in English. It\n is intended for a human audience. Simple programs display the message directly to the end\n user if they encounter an error condition they don't know how or don't care to handle.\n Sophisticated programs with more exhaustive error handling and proper internationalization\n are more likely to ignore the error message.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for all error elements.

" + } + }, + "com.amazonaws.s3#ErrorCode": { + "type": "string" + }, + "com.amazonaws.s3#ErrorDetails": { + "type": "structure", + "members": { + "ErrorCode": { + "target": "com.amazonaws.s3#ErrorCode", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code. The possible error codes and \n error messages are as follows:\n

\n
    \n
  • \n

    \n AccessDeniedCreatingResources - You don't have sufficient permissions to \n create the required resources. Make sure that you have s3tables:CreateNamespace, \n s3tables:CreateTable, s3tables:GetTable and \n s3tables:PutTablePolicy permissions, and then try again. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.\n

    \n
  • \n
  • \n

    \n AccessDeniedWritingToTable - Unable to write to the metadata table because of \n missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new \n metadata table. To create a new metadata table, you must delete the metadata configuration for \n this bucket, and then create a new metadata configuration.

    \n
  • \n
  • \n

    \n DestinationTableNotFound - The destination table doesn't exist. To create a \n new metadata table, you must delete the metadata configuration for this bucket, and then \n create a new metadata configuration.

    \n
  • \n
  • \n

    \n ServerInternalError - An internal error has occurred. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.

    \n
  • \n
  • \n

    \n TableAlreadyExists - The table that you specified already exists in the table \n bucket's namespace. Specify a different table name. To create a new metadata table, you must \n delete the metadata configuration for this bucket, and then create a new metadata \n configuration.

    \n
  • \n
  • \n

    \n TableBucketNotFound - The table bucket that you specified doesn't exist in \n this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new \n metadata table, you must delete the metadata configuration for this bucket, and then create \n a new metadata configuration.

    \n
  • \n
" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.s3#ErrorMessage", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error message. The possible error codes and \n error messages are as follows:\n

\n
    \n
  • \n

    \n AccessDeniedCreatingResources - You don't have sufficient permissions to \n create the required resources. Make sure that you have s3tables:CreateNamespace, \n s3tables:CreateTable, s3tables:GetTable and \n s3tables:PutTablePolicy permissions, and then try again. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.\n

    \n
  • \n
  • \n

    \n AccessDeniedWritingToTable - Unable to write to the metadata table because of \n missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new \n metadata table. To create a new metadata table, you must delete the metadata configuration for \n this bucket, and then create a new metadata configuration.

    \n
  • \n
  • \n

    \n DestinationTableNotFound - The destination table doesn't exist. To create a \n new metadata table, you must delete the metadata configuration for this bucket, and then \n create a new metadata configuration.

    \n
  • \n
  • \n

    \n ServerInternalError - An internal error has occurred. To create a new metadata \n table, you must delete the metadata configuration for this bucket, and then create a new \n metadata configuration.

    \n
  • \n
  • \n

    \n TableAlreadyExists - The table that you specified already exists in the table \n bucket's namespace. Specify a different table name. To create a new metadata table, you must \n delete the metadata configuration for this bucket, and then create a new metadata \n configuration.

    \n
  • \n
  • \n

    \n TableBucketNotFound - The table bucket that you specified doesn't exist in \n this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new \n metadata table, you must delete the metadata configuration for this bucket, and then create \n a new metadata configuration.

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code and error message.\n

" + } + }, + "com.amazonaws.s3#ErrorDocument": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key name to use when a 4XX class error occurs.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The error information.

" + } + }, + "com.amazonaws.s3#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.s3#Errors": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Error" + } + }, + "com.amazonaws.s3#Event": { + "type": "enum", + "members": { + "s3_ReducedRedundancyLostObject": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ReducedRedundancyLostObject" + } + }, + "s3_ObjectCreated_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:*" + } + }, + "s3_ObjectCreated_Put": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:Put" + } + }, + "s3_ObjectCreated_Post": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:Post" + } + }, + "s3_ObjectCreated_Copy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:Copy" + } + }, + "s3_ObjectCreated_CompleteMultipartUpload": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectCreated:CompleteMultipartUpload" + } + }, + "s3_ObjectRemoved_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRemoved:*" + } + }, + "s3_ObjectRemoved_Delete": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRemoved:Delete" + } + }, + "s3_ObjectRemoved_DeleteMarkerCreated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRemoved:DeleteMarkerCreated" + } + }, + "s3_ObjectRestore_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRestore:*" + } + }, + "s3_ObjectRestore_Post": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRestore:Post" + } + }, + "s3_ObjectRestore_Completed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRestore:Completed" + } + }, + "s3_Replication_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:*" + } + }, + "s3_Replication_OperationFailedReplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:OperationFailedReplication" + } + }, + "s3_Replication_OperationNotTracked": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:OperationNotTracked" + } + }, + "s3_Replication_OperationMissedThreshold": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:OperationMissedThreshold" + } + }, + "s3_Replication_OperationReplicatedAfterThreshold": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:Replication:OperationReplicatedAfterThreshold" + } + }, + "s3_ObjectRestore_Delete": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectRestore:Delete" + } + }, + "s3_LifecycleTransition": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:LifecycleTransition" + } + }, + "s3_IntelligentTiering": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:IntelligentTiering" + } + }, + "s3_ObjectAcl_Put": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectAcl:Put" + } + }, + "s3_LifecycleExpiration_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:LifecycleExpiration:*" + } + }, + "s3_LifecycleExpiration_Delete": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:LifecycleExpiration:Delete" + } + }, + "s3_LifecycleExpiration_DeleteMarkerCreated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:LifecycleExpiration:DeleteMarkerCreated" + } + }, + "s3_ObjectTagging_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectTagging:*" + } + }, + "s3_ObjectTagging_Put": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectTagging:Put" + } + }, + "s3_ObjectTagging_Delete": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3:ObjectTagging:Delete" + } + } + }, + "traits": { + "smithy.api#documentation": "

The bucket event for which to send notifications.

" + } + }, + "com.amazonaws.s3#EventBridgeConfiguration": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

A container for specifying the configuration for Amazon EventBridge.

" + } + }, + "com.amazonaws.s3#EventList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Event" + } + }, + "com.amazonaws.s3#ExistingObjectReplication": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#ExistingObjectReplicationStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 replicates existing source bucket objects.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Optional configuration to replicate existing source bucket objects.

\n \n

This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the\n Amazon S3 User Guide.

\n
" + } + }, + "com.amazonaws.s3#ExistingObjectReplicationStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#Expiration": { + "type": "string" + }, + "com.amazonaws.s3#ExpirationStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#ExpiredObjectDeleteMarker": { + "type": "boolean" + }, + "com.amazonaws.s3#Expires": { + "type": "timestamp" + }, + "com.amazonaws.s3#ExposeHeader": { + "type": "string" + }, + "com.amazonaws.s3#ExposeHeaders": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ExposeHeader" + } + }, + "com.amazonaws.s3#Expression": { + "type": "string" + }, + "com.amazonaws.s3#ExpressionType": { + "type": "enum", + "members": { + "SQL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SQL" + } + } + } + }, + "com.amazonaws.s3#FetchOwner": { + "type": "boolean" + }, + "com.amazonaws.s3#FieldDelimiter": { + "type": "string" + }, + "com.amazonaws.s3#FileHeaderInfo": { + "type": "enum", + "members": { + "USE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USE" + } + }, + "IGNORE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IGNORE" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + } + } + }, + "com.amazonaws.s3#FilterRule": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.s3#FilterRuleName", + "traits": { + "smithy.api#documentation": "

The object key name prefix or suffix identifying one or more objects to which the\n filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and\n suffixes are not supported. For more information, see Configuring Event Notifications\n in the Amazon S3 User Guide.

" + } + }, + "Value": { + "target": "com.amazonaws.s3#FilterRuleValue", + "traits": { + "smithy.api#documentation": "

The value that the filter searches for in object key names.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned\n to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of\n the object key name. A prefix is a specific string of characters at the beginning of an\n object key name, which you can use to organize objects. For example, you can start the key\n names of related objects with a prefix, such as 2023- or\n engineering/. Then, you can use FilterRule to find objects in\n a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it\n is at the end of the object key name instead of at the beginning.

" + } + }, + "com.amazonaws.s3#FilterRuleList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#FilterRule" + }, + "traits": { + "smithy.api#documentation": "

A list of containers for the key-value pair that defines the criteria for the filter\n rule.

" + } + }, + "com.amazonaws.s3#FilterRuleName": { + "type": "enum", + "members": { + "prefix": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "prefix" + } + }, + "suffix": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "suffix" + } + } + } + }, + "com.amazonaws.s3#FilterRuleValue": { + "type": "string" + }, + "com.amazonaws.s3#GetBucketAccelerateConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketAccelerateConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketAccelerateConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action uses the accelerate subresource to\n return the Transfer Acceleration state of a bucket, which is either Enabled or\n Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that\n enables you to perform faster data transfers to and from Amazon S3.

\n

To use this operation, you must have permission to perform the\n s3:GetAccelerateConfiguration 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 in the\n Amazon S3 User Guide.

\n

You set the Transfer Acceleration state of an existing bucket to Enabled or\n Suspended by using the PutBucketAccelerateConfiguration operation.

\n

A GET accelerate request does not return a state value for a bucket that\n has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state\n has never been set on the bucket.

\n

For more information about transfer acceleration, see Transfer Acceleration in\n the Amazon S3 User Guide.

\n

The following operations are related to\n GetBucketAccelerateConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?accelerate", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketAccelerateConfigurationOutput": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#BucketAccelerateStatus", + "traits": { + "smithy.api#documentation": "

The accelerate configuration of the bucket.

" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "AccelerateConfiguration" + } + }, + "com.amazonaws.s3#GetBucketAccelerateConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which the accelerate configuration is retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketAcl": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketAclRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketAclOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action uses the acl subresource\n to return the access control list (ACL) of a bucket. To use GET to return the\n ACL of the bucket, you must have the READ_ACP access to the bucket. If\n READ_ACP permission is granted to the anonymous user, you can return the\n ACL of the bucket without using an authorization header.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\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\n bucket-owner-full-control ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.

\n
\n

The following operations are related to GetBucketAcl:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?acl", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketAclOutput": { + "type": "structure", + "members": { + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

Container for the bucket owner's display name and ID.

" + } + }, + "Grants": { + "target": "com.amazonaws.s3#Grants", + "traits": { + "smithy.api#documentation": "

A list of grants.

", + "smithy.api#xmlName": "AccessControlList" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "AccessControlPolicy" + } + }, + "com.amazonaws.s3#GetBucketAclRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies the S3 bucket whose ACL is being requested.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketAnalyticsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketAnalyticsConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketAnalyticsConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the GET action returns an analytics configuration (identified by\n the analytics configuration ID) from the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration 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 in the\n Amazon S3 User Guide.

\n

For information about Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis in the Amazon S3 User Guide.

\n

The following operations are related to\n GetBucketAnalyticsConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketAnalyticsConfigurationOutput": { + "type": "structure", + "members": { + "AnalyticsConfiguration": { + "target": "com.amazonaws.s3#AnalyticsConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration and any analyses for the analytics filter.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketAnalyticsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket from which an analytics configuration is retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#AnalyticsId", + "traits": { + "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketCors": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketCorsRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketCorsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the\n bucket.

\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

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n

For more information about CORS, see Enabling Cross-Origin Resource\n Sharing.

\n

The following operations are related to GetBucketCors:

\n ", + "smithy.api#examples": [ + { + "title": "To get cors configuration set on a bucket", + "documentation": "The following example returns cross-origin resource sharing (CORS) configuration set on a bucket.", "input": { - "target": "com.amazonaws.s3#SelectObjectContentRequest" + "Bucket": "examplebucket" }, "output": { - "target": "com.amazonaws.s3#SelectObjectContentOutput" + "CORSRules": [ + { + "AllowedHeaders": [ + "Authorization" + ], + "MaxAgeSeconds": 3000, + "AllowedMethods": [ + "GET" + ], + "AllowedOrigins": [ + "*" + ] + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?cors", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketCorsOutput": { + "type": "structure", + "members": { + "CORSRules": { + "target": "com.amazonaws.s3#CORSRules", + "traits": { + "smithy.api#documentation": "

A set of origins and methods (cross-origin access that you want to allow). You can add\n up to 100 rules to the configuration.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "CORSRule" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "CORSConfiguration" + } + }, + "com.amazonaws.s3#GetBucketCorsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which to get the cors configuration.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketEncryption": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketEncryptionRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketEncryptionOutput" + }, + "traits": { + "smithy.api#documentation": "

Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets\n have a default encryption configuration that uses server-side encryption with Amazon S3 managed\n keys (SSE-S3).

\n \n \n \n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:GetEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:GetEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to GetBucketEncryption:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?encryption", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketEncryptionOutput": { + "type": "structure", + "members": { + "ServerSideEncryptionConfiguration": { + "target": "com.amazonaws.s3#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketEncryptionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket from which the server-side encryption configuration is\n retrieved.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketIntelligentTieringConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Gets the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to GetBucketIntelligentTieringConfiguration include:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationOutput": { + "type": "structure", + "members": { + "IntelligentTieringConfiguration": { + "target": "com.amazonaws.s3#IntelligentTieringConfiguration", + "traits": { + "smithy.api#documentation": "

Container for S3 Intelligent-Tiering configuration.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketIntelligentTieringConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#IntelligentTieringId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketInventoryConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketInventoryConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketInventoryConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns an inventory configuration (identified by the inventory configuration ID) from\n the bucket.

\n

To use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration action. The bucket owner has this permission\n by default and can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

\n

The following operations are related to\n GetBucketInventoryConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketInventoryConfigurationOutput": { + "type": "structure", + "members": { + "InventoryConfiguration": { + "target": "com.amazonaws.s3#InventoryConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the inventory configuration.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketInventoryConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the inventory configuration to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#InventoryId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketLifecycleConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketLifecycleConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketLifecycleConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "

Returns the lifecycle configuration information set on the bucket. For information about\n lifecycle configuration, see Object Lifecycle\n Management.

\n

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object\n key name prefix, one or more object tags, object size, or any combination of these.\n Accordingly, this section describes the latest API, which is compatible with the new\n functionality. The previous version of the API supported filtering based only on an object\n key name prefix, which is supported for general purpose buckets for backward compatibility.\n For the related API description, see GetBucketLifecycle.

\n \n

Lifecyle configurations for directory buckets only support expiring objects and\n cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters\n are not supported.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:GetLifecycleConfiguration\n permission.

    \n

    For more information about permissions, see Managing Access\n Permissions to Your Amazon S3 Resources.

    \n
  • \n
\n
    \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:GetLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n

\n GetBucketLifecycleConfiguration has the following special error:

\n
    \n
  • \n

    Error code: NoSuchLifecycleConfiguration\n

    \n
      \n
    • \n

      Description: The lifecycle configuration does not exist.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
\n

The following operations are related to\n GetBucketLifecycleConfiguration:

\n ", + "smithy.api#examples": [ + { + "title": "To get lifecycle configuration on a bucket", + "documentation": "The following example retrieves lifecycle configuration on set on a bucket. ", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This action filters the contents of an Amazon S3 object based on a simple structured query\n language (SQL) statement. In the request, along with the SQL expression, you must also\n specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses\n this format to parse object data into records, and returns only records that match the\n specified SQL expression. You must also specify the data serialization format for the\n response.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

For more information about Amazon S3 Select, see Selecting Content from\n Objects and SELECT\n Command in the Amazon S3 User Guide.

\n

\n
\n
Permissions
\n
\n

You must have the s3:GetObject permission for this operation.\u00a0Amazon S3\n Select does not support anonymous access. For more information about permissions,\n see Specifying Permissions in\n a Policy in the Amazon S3 User Guide.

\n
\n
Object Data Formats
\n
\n

You can use Amazon S3 Select to query objects that have the following format\n properties:

\n
    \n
  • \n

    \n CSV, JSON, and Parquet - Objects must be in CSV,\n JSON, or Parquet format.

    \n
  • \n
  • \n

    \n UTF-8 - UTF-8 is the only encoding type Amazon S3 Select\n supports.

    \n
  • \n
  • \n

    \n GZIP or BZIP2 - CSV and JSON files can be compressed\n using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that\n Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar\n compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support\n whole-object compression for Parquet objects.

    \n
  • \n
  • \n

    \n Server-side encryption - Amazon S3 Select supports\n querying objects that are protected with server-side encryption.

    \n

    For objects that are encrypted with customer-provided encryption keys\n (SSE-C), you must use HTTPS, and you must use the headers that are\n documented in the GetObject. For more\n information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys)\n in the Amazon S3 User Guide.

    \n

    For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and\n Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently,\n so you don't need to specify anything. For more information about\n server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
Working with the Response Body
\n
\n

Given the response size is unknown, Amazon S3 Select streams the response as a\n series of messages and includes a Transfer-Encoding header with\n chunked as its value in the response. For more information, see\n Appendix:\n SelectObjectContent\n Response.

\n
\n
GetObject Support
\n
\n

The SelectObjectContent action does not support the following\n GetObject functionality. For more information, see GetObject.

\n
    \n
  • \n

    \n Range: Although you can specify a scan range for an Amazon S3 Select\n request (see SelectObjectContentRequest - ScanRange in the request\n parameters), you cannot specify the range of bytes of an object to return.\n

    \n
  • \n
  • \n

    The GLACIER, DEEP_ARCHIVE, and\n REDUCED_REDUNDANCY storage classes, or the\n ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access\n tiers of the INTELLIGENT_TIERING storage class: You cannot\n query objects in the GLACIER, DEEP_ARCHIVE, or\n REDUCED_REDUNDANCY storage classes, nor objects in the\n ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access\n tiers of the INTELLIGENT_TIERING storage class. For more\n information about storage classes, see Using Amazon S3\n storage classes in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
Special Errors
\n
\n

For a list of special errors for this operation, see List of SELECT Object Content Error Codes\n

\n
\n
\n

The following operations are related to SelectObjectContent:

\n ", - "smithy.api#http": { - "method": "POST", - "uri": "/{Bucket}/{Key+}?select&select-type=2", - "code": 200 - } - } - }, - "com.amazonaws.s3#SelectObjectContentEventStream": { - "type": "union", - "members": { - "Records": { - "target": "com.amazonaws.s3#RecordsEvent", - "traits": { - "smithy.api#documentation": "

The Records Event.

" - } - }, - "Stats": { - "target": "com.amazonaws.s3#StatsEvent", - "traits": { - "smithy.api#documentation": "

The Stats Event.

" - } - }, - "Progress": { - "target": "com.amazonaws.s3#ProgressEvent", - "traits": { - "smithy.api#documentation": "

The Progress Event.

" - } - }, - "Cont": { - "target": "com.amazonaws.s3#ContinuationEvent", - "traits": { - "smithy.api#documentation": "

The Continuation Event.

" - } - }, - "End": { - "target": "com.amazonaws.s3#EndEvent", - "traits": { - "smithy.api#documentation": "

The End Event.

" + "output": { + "Rules": [ + { + "Prefix": "TaxDocs", + "Status": "Enabled", + "Transitions": [ + { + "Days": 365, + "StorageClass": "STANDARD_IA" } + ], + "ID": "Rule for TaxDocs/" } - }, - "traits": { - "smithy.api#documentation": "

The container for selecting objects from a content event stream.

", - "smithy.api#streaming": {} + ] } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?lifecycle", + "code": 200 }, - "com.amazonaws.s3#SelectObjectContentOutput": { - "type": "structure", - "members": { - "Payload": { - "target": "com.amazonaws.s3#SelectObjectContentEventStream", - "traits": { - "smithy.api#documentation": "

The array of results.

", - "smithy.api#httpPayload": {} - } - } + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketLifecycleConfigurationOutput": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.s3#LifecycleRules", + "traits": { + "smithy.api#documentation": "

Container for a lifecycle rule.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Rule" + } + }, + "TransitionDefaultMinimumObjectSize": { + "target": "com.amazonaws.s3#TransitionDefaultMinimumObjectSize", + "traits": { + "smithy.api#documentation": "

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It isn't supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", + "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "LifecycleConfiguration" + } + }, + "com.amazonaws.s3#GetBucketLifecycleConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the lifecycle information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketLocation": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketLocationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketLocationOutput" + }, + "traits": { + "aws.customizations#s3UnwrappedXmlOutput": {}, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the Region the bucket resides in. You set the bucket's Region using the\n LocationConstraint request parameter in a CreateBucket\n request. For more information, see CreateBucket.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

We recommend that you use HeadBucket to return the Region\n that a bucket resides in. For backward compatibility, Amazon S3 continues to support\n GetBucketLocation.

\n
\n

The following operations are related to GetBucketLocation:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket location", + "documentation": "The following example returns bucket location.", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#SelectObjectContentRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The S3 bucket.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

The object key.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "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" - } - }, - "Expression": { - "target": "com.amazonaws.s3#Expression", - "traits": { - "smithy.api#documentation": "

The expression that is used to query the object.

", - "smithy.api#required": {} - } - }, - "ExpressionType": { - "target": "com.amazonaws.s3#ExpressionType", - "traits": { - "smithy.api#documentation": "

The type of the provided expression (for example, SQL).

", - "smithy.api#required": {} - } - }, - "RequestProgress": { - "target": "com.amazonaws.s3#RequestProgress", - "traits": { - "smithy.api#documentation": "

Specifies if periodic request progress information should be enabled.

" - } - }, - "InputSerialization": { - "target": "com.amazonaws.s3#InputSerialization", - "traits": { - "smithy.api#documentation": "

Describes the format of the data in the object that is being queried.

", - "smithy.api#required": {} - } - }, - "OutputSerialization": { - "target": "com.amazonaws.s3#OutputSerialization", - "traits": { - "smithy.api#documentation": "

Describes the format of the data that you want Amazon S3 to return in response.

", - "smithy.api#required": {} - } - }, - "ScanRange": { - "target": "com.amazonaws.s3#ScanRange", - "traits": { - "smithy.api#documentation": "

Specifies the byte range of the object to get the records from. A record is processed\n when its first byte is contained by the range. This parameter is optional, but when\n specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the\n start and end of the range.

\n

\n ScanRangemay be used in the following ways:

\n
    \n
  • \n

    \n 50100\n - process only the records starting between the bytes 50 and 100 (inclusive, counting\n from zero)

    \n
  • \n
  • \n

    \n 50 -\n process only the records starting after the byte 50

    \n
  • \n
  • \n

    \n 50 -\n process only the records within the last 50 bytes of the file.

    \n
  • \n
" - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + "output": { + "LocationConstraint": "us-west-2" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?location", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketLocationOutput": { + "type": "structure", + "members": { + "LocationConstraint": { + "target": "com.amazonaws.s3#BucketLocationConstraint", + "traits": { + "smithy.api#documentation": "

Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported\n location constraints by Region, see Regions and Endpoints.

\n

Buckets in Region us-east-1 have a LocationConstraint of\n null. Buckets with a LocationConstraint of EU reside in eu-west-1.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "LocationConstraint" + } + }, + "com.amazonaws.s3#GetBucketLocationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the location.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketLogging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketLoggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketLoggingOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the logging status of a bucket and the permissions users have to view and modify\n that status.

\n

The following operations are related to GetBucketLogging:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?logging", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketLoggingOutput": { + "type": "structure", + "members": { + "LoggingEnabled": { + "target": "com.amazonaws.s3#LoggingEnabled" + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "BucketLoggingStatus" + } + }, + "com.amazonaws.s3#GetBucketLoggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which to get the logging information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "

\n Retrieves the metadata table configuration for a general purpose bucket. For more\n information, see Accelerating data\n discovery with S3 Metadata in the Amazon S3 User Guide.

\n
\n
Permissions
\n
\n

To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more\n information, see Setting up\n permissions for configuring metadata tables in the\n Amazon S3 User Guide.

\n
\n
\n

The following operations are related to GetBucketMetadataTableConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?metadataTable", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfigurationOutput": { + "type": "structure", + "members": { + "GetBucketMetadataTableConfigurationResult": { + "target": "com.amazonaws.s3#GetBucketMetadataTableConfigurationResult", + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for the general purpose bucket.\n

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n The general purpose bucket that contains the metadata table configuration that you want to retrieve.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

\n The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.\n

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketMetadataTableConfigurationResult": { + "type": "structure", + "members": { + "MetadataTableConfigurationResult": { + "target": "com.amazonaws.s3#MetadataTableConfigurationResult", + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.s3#MetadataTableStatus", + "traits": { + "smithy.api#documentation": "

\n The status of the metadata table. The status values are:\n

\n
    \n
  • \n

    \n CREATING - The metadata table is in the process of being created in the \n specified table bucket.

    \n
  • \n
  • \n

    \n ACTIVE - The metadata table has been created successfully and records \n are being delivered to the table.\n

    \n
  • \n
  • \n

    \n FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver \n records. See ErrorDetails for details.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "Error": { + "target": "com.amazonaws.s3#ErrorDetails", + "traits": { + "smithy.api#documentation": "

\n If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was \n unable to create the table, this structure contains the error code and error message. \n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

" + } + }, + "com.amazonaws.s3#GetBucketMetricsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketMetricsConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketMetricsConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Gets a metrics configuration (specified by the metrics configuration ID) from the\n bucket. Note that this doesn't include the daily storage metrics.

\n

To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.

\n

The following operations are related to\n GetBucketMetricsConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketMetricsConfigurationOutput": { + "type": "structure", + "members": { + "MetricsConfiguration": { + "target": "com.amazonaws.s3#MetricsConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the metrics configuration.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketMetricsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the metrics configuration to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#MetricsId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketNotificationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketNotificationConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#NotificationConfiguration" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the notification configuration of a bucket.

\n

If notifications are not enabled on the bucket, the action returns an empty\n NotificationConfiguration element.

\n

By default, you must be the bucket owner to read the notification configuration of a\n bucket. However, the bucket owner can use a bucket policy to grant permission to other\n users to read this configuration with the s3:GetBucketNotification\n permission.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n

For more information about setting and reading the notification configuration on a\n bucket, see Setting Up Notification of Bucket Events. For more information about bucket\n policies, see Using Bucket Policies.

\n

The following action is related to GetBucketNotification:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?notification", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketNotificationConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the notification configuration.

\n

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketOwnershipControls": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketOwnershipControlsRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketOwnershipControlsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you\n must have the s3:GetBucketOwnershipControls permission. For more information\n about Amazon S3 permissions, see Specifying permissions in a\n policy.

\n

For information about Amazon S3 Object Ownership, see Using Object\n Ownership.

\n

The following operations are related to GetBucketOwnershipControls:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?ownershipControls", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketOwnershipControlsOutput": { + "type": "structure", + "members": { + "OwnershipControls": { + "target": "com.amazonaws.s3#OwnershipControls", + "traits": { + "smithy.api#documentation": "

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or\n ObjectWriter) currently in effect for this Amazon S3 bucket.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketOwnershipControlsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketPolicyRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketPolicyOutput" + }, + "traits": { + "smithy.api#documentation": "

Returns the policy of a specified bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n GetBucketPolicy permissions on the specified bucket and belong to\n the bucket owner's account in order to use this operation.

\n

If you don't have GetBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:GetBucketPolicy permission is required in a policy. For\n more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:GetBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Example bucket policies
\n
\n

\n General purpose buckets example bucket policies\n - See Bucket policy\n examples in the Amazon S3 User Guide.

\n

\n Directory bucket example bucket policies\n - See Example bucket policies for S3 Express One Zone in the\n Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following action is related to GetBucketPolicy:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket policy", + "documentation": "The following example returns bucket policy associated with a bucket.", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#documentation": "\n

Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Request to filter the contents of an Amazon S3 object based on a simple Structured Query\n Language (SQL) statement. In the request, along with the SQL expression, you must specify a\n data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data\n into records. It returns only records that match the specified SQL expression. You must\n also specify the data serialization format for the response. For more information, see\n S3Select API Documentation.

", - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#SelectParameters": { - "type": "structure", - "members": { - "InputSerialization": { - "target": "com.amazonaws.s3#InputSerialization", - "traits": { - "smithy.api#documentation": "

Describes the serialization format of the object.

", - "smithy.api#required": {} - } - }, - "ExpressionType": { - "target": "com.amazonaws.s3#ExpressionType", - "traits": { - "smithy.api#documentation": "

The type of the provided expression (for example, SQL).

", - "smithy.api#required": {} - } - }, - "Expression": { - "target": "com.amazonaws.s3#Expression", - "traits": { - "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

The expression that is used to query the object.

", - "smithy.api#required": {} - } - }, - "OutputSerialization": { - "target": "com.amazonaws.s3#OutputSerialization", - "traits": { - "smithy.api#documentation": "

Describes how the results of the Select job are serialized.

", - "smithy.api#required": {} - } - } + "output": { + "Policy": "{\"Version\":\"2008-10-17\",\"Id\":\"LogPolicy\",\"Statement\":[{\"Sid\":\"Enables the log delivery group to publish logs to your bucket \",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"111122223333\"},\"Action\":[\"s3:GetBucketAcl\",\"s3:GetObjectAcl\",\"s3:PutObject\"],\"Resource\":[\"arn:aws:s3:::policytest1/*\",\"arn:aws:s3:::policytest1\"]}]}" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?policy", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketPolicyOutput": { + "type": "structure", + "members": { + "Policy": { + "target": "com.amazonaws.s3#Policy", + "traits": { + "smithy.api#documentation": "

The bucket policy as a JSON document.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketPolicyRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name to get the bucket policy for.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

\n

\n Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

\n

\n Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketPolicyStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketPolicyStatusRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketPolicyStatusOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public.\n In order to use this operation, you must have the s3:GetBucketPolicyStatus\n permission. For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\n

For more information about when Amazon S3 considers a bucket public, see The Meaning of \"Public\".

\n

The following operations are related to GetBucketPolicyStatus:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?policyStatus", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketPolicyStatusOutput": { + "type": "structure", + "members": { + "PolicyStatus": { + "target": "com.amazonaws.s3#PolicyStatus", + "traits": { + "smithy.api#documentation": "

The policy status for the specified bucket.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketPolicyStatusRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose policy status you want to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketReplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketReplicationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketReplicationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the replication configuration of a bucket.

\n \n

It can take a while to propagate the put or delete a replication configuration to\n all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong\n result.

\n
\n

For information about replication configuration, see Replication in the\n Amazon S3 User Guide.

\n

This action requires permissions for the s3:GetReplicationConfiguration\n action. For more information about permissions, see Using Bucket Policies and User\n Policies.

\n

If you include the Filter element in a replication configuration, you must\n also include the DeleteMarkerReplication and Priority elements.\n The response also returns those elements.

\n

For information about GetBucketReplication errors, see List of\n replication-related error codes\n

\n

The following operations are related to GetBucketReplication:

\n ", + "smithy.api#examples": [ + { + "title": "To get replication configuration set on a bucket", + "documentation": "The following example returns replication configuration set on a bucket.", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Describes the parameters for Select job types.

\n

Learn How to optimize querying your data in Amazon S3 using\n Amazon Athena, S3 Object Lambda, or client-side filtering.

" - } - }, - "com.amazonaws.s3#ServerSideEncryption": { - "type": "enum", - "members": { - "AES256": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AES256" - } - }, - "aws_kms": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "aws:kms" - } - }, - "aws_kms_dsse": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "aws:kms:dsse" - } - } - } - }, - "com.amazonaws.s3#ServerSideEncryptionByDefault": { - "type": "structure", - "members": { - "SSEAlgorithm": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

Server-side encryption algorithm to use for the default encryption.

\n \n

For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

\n
", - "smithy.api#required": {} - } - }, - "KMSMasterKeyID": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default\n encryption.

\n \n
    \n
  • \n

    \n General purpose buckets - This parameter is\n allowed if and only if SSEAlgorithm is set to aws:kms or\n aws:kms:dsse.

    \n
  • \n
  • \n

    \n Directory buckets - This parameter is\n allowed if and only if SSEAlgorithm is set to\n aws:kms.

    \n
  • \n
\n
\n

You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS\n key.

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN:\n arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key Alias: alias/alias-name\n

    \n
  • \n
\n

If you are using encryption with cross-account or Amazon Web Services service operations, you must use\n a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

\n \n
    \n
  • \n

    \n General purpose buckets - If you're specifying\n a customer managed KMS key, we recommend using a fully qualified KMS key ARN.\n If you use a KMS key alias instead, then KMS resolves the key within the\n requester\u2019s account. This behavior can result in data that's encrypted with a\n KMS key that belongs to the requester, and not the bucket owner. Also, if you\n use a key ID, you can run into a LogDestination undeliverable error when creating\n a VPC flow log.

    \n
  • \n
  • \n

    \n Directory buckets -\n When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

    \n
  • \n
\n
\n \n

Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service\n Developer Guide.

\n
" - } - } + "output": { + "ReplicationConfiguration": { + "Rules": [ + { + "Status": "Enabled", + "Prefix": "Tax", + "Destination": { + "Bucket": "arn:aws:s3:::destination-bucket" + }, + "ID": "MWIwNTkwZmItMTE3MS00ZTc3LWJkZDEtNzRmODQwYzc1OTQy" + } + ], + "Role": "arn:aws:iam::acct-id:role/example-role" + } + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?replication", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketReplicationOutput": { + "type": "structure", + "members": { + "ReplicationConfiguration": { + "target": "com.amazonaws.s3#ReplicationConfiguration", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetBucketReplicationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which to get the replication information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketRequestPayment": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketRequestPaymentRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketRequestPaymentOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the request payment configuration of a bucket. To use this version of the\n operation, you must be the bucket owner. For more information, see Requester Pays\n Buckets.

\n

The following operations are related to GetBucketRequestPayment:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket versioning configuration", + "documentation": "The following example retrieves bucket versioning configuration.", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#documentation": "

Describes the default server-side encryption to apply to new objects in the bucket. If a\n PUT Object request doesn't specify any server-side encryption, this default encryption will\n be applied. For more information, see PutBucketEncryption.

\n \n
    \n
  • \n

    \n General purpose buckets - If you don't specify\n a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key\n (aws/s3) in your Amazon Web Services account the first time that you add an\n object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key\n for SSE-KMS.

    \n
  • \n
  • \n

    \n Directory buckets -\n Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

    \n
  • \n
\n
" - } - }, - "com.amazonaws.s3#ServerSideEncryptionConfiguration": { - "type": "structure", - "members": { - "Rules": { - "target": "com.amazonaws.s3#ServerSideEncryptionRules", - "traits": { - "smithy.api#documentation": "

Container for information about a particular server-side encryption configuration\n rule.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Rule" - } - } + "output": { + "Payer": "BucketOwner" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?requestPayment", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketRequestPaymentOutput": { + "type": "structure", + "members": { + "Payer": { + "target": "com.amazonaws.s3#Payer", + "traits": { + "smithy.api#documentation": "

Specifies who pays for the download and request fees.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "RequestPaymentConfiguration" + } + }, + "com.amazonaws.s3#GetBucketRequestPaymentRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the payment request configuration

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketTaggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketTaggingOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 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

The following operations are related to GetBucketTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To get tag set associated with a bucket", + "documentation": "The following example returns tag set associated with a bucket", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#documentation": "

Specifies the default server-side-encryption configuration.

" - } - }, - "com.amazonaws.s3#ServerSideEncryptionRule": { - "type": "structure", - "members": { - "ApplyServerSideEncryptionByDefault": { - "target": "com.amazonaws.s3#ServerSideEncryptionByDefault", - "traits": { - "smithy.api#documentation": "

Specifies the default server-side encryption to apply to new objects in the bucket. If a\n PUT Object request doesn't specify any server-side encryption, this default encryption will\n be applied.

" - } + "output": { + "TagSet": [ + { + "Value": "value1", + "Key": "key1" }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS\n (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the\n BucketKeyEnabled element to true causes Amazon S3 to use an S3\n Bucket Key.

\n \n
    \n
  • \n

    \n General purpose buckets - By default, S3\n Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    \n
  • \n
\n
" - } - } + { + "Value": "value2", + "Key": "key2" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?tagging", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketTaggingOutput": { + "type": "structure", + "members": { + "TagSet": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

Contains the tag set.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "Tagging" + } + }, + "com.amazonaws.s3#GetBucketTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the tagging information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketVersioning": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketVersioningRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketVersioningOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the versioning state of a bucket.

\n

To retrieve the versioning state of a bucket, you must be the bucket owner.

\n

This implementation also returns the MFA Delete status of the versioning state. If the\n MFA Delete status is enabled, the bucket owner must use an authentication\n device to change the versioning state of the bucket.

\n

The following operations are related to GetBucketVersioning:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket versioning configuration", + "documentation": "The following example retrieves bucket versioning configuration.", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#documentation": "

Specifies the default server-side encryption configuration.

\n \n
    \n
  • \n

    \n General purpose buckets - If you're specifying\n a customer managed KMS key, we recommend using a fully qualified KMS key ARN.\n If you use a KMS key alias instead, then KMS resolves the key within the\n requester\u2019s account. This behavior can result in data that's encrypted with a\n KMS key that belongs to the requester, and not the bucket owner.

    \n
  • \n
  • \n

    \n Directory buckets -\n When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

    \n
  • \n
\n
" - } - }, - "com.amazonaws.s3#ServerSideEncryptionRules": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#ServerSideEncryptionRule" - } - }, - "com.amazonaws.s3#SessionCredentialValue": { - "type": "string", - "traits": { - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.s3#SessionCredentials": { - "type": "structure", - "members": { - "AccessKeyId": { - "target": "com.amazonaws.s3#AccessKeyIdValue", - "traits": { - "smithy.api#documentation": "

A unique identifier that's associated with a secret access key. The access key ID and\n the secret access key are used together to sign programmatic Amazon Web Services requests\n cryptographically.

", - "smithy.api#required": {}, - "smithy.api#xmlName": "AccessKeyId" - } - }, - "SecretAccessKey": { - "target": "com.amazonaws.s3#SessionCredentialValue", - "traits": { - "smithy.api#documentation": "

A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services\n requests. Signing a request identifies the sender and prevents the request from being\n altered.

", - "smithy.api#required": {}, - "smithy.api#xmlName": "SecretAccessKey" - } - }, - "SessionToken": { - "target": "com.amazonaws.s3#SessionCredentialValue", - "traits": { - "smithy.api#documentation": "

A part of the temporary security credentials. The session token is used to validate the\n temporary security credentials.\n \n

", - "smithy.api#required": {}, - "smithy.api#xmlName": "SessionToken" - } - }, - "Expiration": { - "target": "com.amazonaws.s3#SessionExpiration", - "traits": { - "smithy.api#documentation": "

Temporary security credentials expire after a specified interval. After temporary\n credentials expire, any calls that you make with those credentials will fail. So you must\n generate a new set of temporary credentials. Temporary credentials cannot be extended or\n refreshed beyond the original specified interval.

", - "smithy.api#required": {}, - "smithy.api#xmlName": "Expiration" - } - } + "output": { + "Status": "Enabled", + "MFADelete": "Disabled" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?versioning", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketVersioningOutput": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#BucketVersioningStatus", + "traits": { + "smithy.api#documentation": "

The versioning state of the bucket.

" + } + }, + "MFADelete": { + "target": "com.amazonaws.s3#MFADeleteStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether MFA delete is enabled in the bucket versioning configuration. This\n element is only returned if the bucket has been configured with MFA delete. If the bucket\n has never been so configured, this element is not returned.

", + "smithy.api#xmlName": "MfaDelete" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "VersioningConfiguration" + } + }, + "com.amazonaws.s3#GetBucketVersioningRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to get the versioning information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetBucketWebsite": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetBucketWebsiteRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetBucketWebsiteOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the website configuration for a bucket. To host website on Amazon S3, you can\n configure a bucket as website by adding a website configuration. For more information about\n hosting websites, see Hosting Websites on Amazon S3.

\n

This GET action requires the S3:GetBucketWebsite permission. By default,\n only the bucket owner can read the bucket website configuration. However, bucket owners can\n allow other users to read the website configuration by writing a bucket policy granting\n them the S3:GetBucketWebsite permission.

\n

The following operations are related to GetBucketWebsite:

\n ", + "smithy.api#examples": [ + { + "title": "To get bucket website configuration", + "documentation": "The following example retrieves website configuration of a bucket.", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#documentation": "

The established temporary security credentials of the session.

\n \n

\n Directory buckets - These session\n credentials are only supported for the authentication and authorization of Zonal endpoint API operations\n on directory buckets.

\n
" - } - }, - "com.amazonaws.s3#SessionExpiration": { - "type": "timestamp" - }, - "com.amazonaws.s3#SessionMode": { - "type": "enum", - "members": { - "ReadOnly": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ReadOnly" - } - }, - "ReadWrite": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ReadWrite" - } - } - } - }, - "com.amazonaws.s3#Setting": { - "type": "boolean" - }, - "com.amazonaws.s3#SimplePrefix": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

To use simple format for S3 keys for log objects, set SimplePrefix to an empty\n object.

\n

\n [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]\n

", - "smithy.api#xmlName": "SimplePrefix" - } - }, - "com.amazonaws.s3#Size": { - "type": "long" - }, - "com.amazonaws.s3#SkipValidation": { - "type": "boolean" - }, - "com.amazonaws.s3#SourceSelectionCriteria": { - "type": "structure", - "members": { - "SseKmsEncryptedObjects": { - "target": "com.amazonaws.s3#SseKmsEncryptedObjects", - "traits": { - "smithy.api#documentation": "

A container for filter information for the selection of Amazon S3 objects encrypted with\n Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication\n configuration, this element is required.

" - } - }, - "ReplicaModifications": { - "target": "com.amazonaws.s3#ReplicaModifications", - "traits": { - "smithy.api#documentation": "

A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't\n replicate replica modifications by default. In the latest version of replication\n configuration (when Filter is specified), you can specify this element and set\n the status to Enabled to replicate modifications on replicas.

\n \n

If you don't specify the Filter element, Amazon S3 assumes that the\n replication configuration is the earlier version, V1. In the earlier version, this\n element is not allowed

\n
" - } - } + "output": { + "IndexDocument": { + "Suffix": "index.html" + }, + "ErrorDocument": { + "Key": "error.html" + } + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?website", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetBucketWebsiteOutput": { + "type": "structure", + "members": { + "RedirectAllRequestsTo": { + "target": "com.amazonaws.s3#RedirectAllRequestsTo", + "traits": { + "smithy.api#documentation": "

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3\n bucket.

" + } + }, + "IndexDocument": { + "target": "com.amazonaws.s3#IndexDocument", + "traits": { + "smithy.api#documentation": "

The name of the index document for the website (for example\n index.html).

" + } + }, + "ErrorDocument": { + "target": "com.amazonaws.s3#ErrorDocument", + "traits": { + "smithy.api#documentation": "

The object key name of the website error document to use for 4XX class errors.

" + } + }, + "RoutingRules": { + "target": "com.amazonaws.s3#RoutingRules", + "traits": { + "smithy.api#documentation": "

Rules that define when a redirect is applied and the redirect behavior.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "WebsiteConfiguration" + } + }, + "com.amazonaws.s3#GetBucketWebsiteRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name for which to get the website configuration.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#InvalidObjectState" + }, + { + "target": "com.amazonaws.s3#NoSuchKey" + } + ], + "traits": { + "aws.protocols#httpChecksum": { + "requestValidationModeMember": "ChecksumMode", + "responseAlgorithms": [ + "CRC64NVME", + "CRC32", + "CRC32C", + "SHA256", + "SHA1" + ] + }, + "smithy.api#documentation": "

Retrieves an object from Amazon S3.

\n

In the GetObject request, specify the full key name for the object.

\n

\n General purpose buckets - Both the virtual-hosted-style\n requests and the path-style requests are supported. For a virtual hosted-style request\n example, if you have the object photos/2006/February/sample.jpg, specify the\n object key name as /photos/2006/February/sample.jpg. For a path-style request\n example, if you have the object photos/2006/February/sample.jpg in the bucket\n named examplebucket, specify the object key name as\n /examplebucket/photos/2006/February/sample.jpg. For more information about\n request types, see HTTP Host\n Header Bucket Specification in the Amazon S3 User Guide.

\n

\n Directory buckets -\n Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named amzn-s3-demo-bucket--usw2-az1--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the required permissions in a policy. To use\n GetObject, you must have the READ access to the\n object (or version). If you grant READ access to the anonymous\n user, the GetObject operation returns the object without using\n an authorization header. For more information, see Specifying permissions in a policy in the\n Amazon S3 User Guide.

    \n

    If you include a versionId in your request header, you must\n have the s3:GetObjectVersion permission to access a specific\n version of an object. The s3:GetObject permission is not\n required in this scenario.

    \n

    If you request the current version of an object without a specific\n versionId in the request header, only the\n s3:GetObject permission is required. The\n s3:GetObjectVersion permission is not required in this\n scenario.

    \n

    If the object that you request doesn\u2019t exist, the error that Amazon S3 returns\n depends on whether you also have the s3:ListBucket\n permission.

    \n
      \n
    • \n

      If you have the s3:ListBucket permission on the\n bucket, Amazon S3 returns an HTTP status code 404 Not Found\n error.

      \n
    • \n
    • \n

      If you don\u2019t have the s3:ListBucket permission, Amazon S3\n returns an HTTP status code 403 Access Denied\n error.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If\n the\n object is encrypted using SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Storage classes
\n
\n

If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval\n storage class, the S3 Glacier Deep Archive storage class, the\n S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier,\n before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an\n InvalidObjectState error. For information about restoring archived\n objects, see Restoring Archived\n Objects in the Amazon S3 User Guide.

\n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. \nUnsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

\n
\n
Encryption
\n
\n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for the GetObject requests, if your object uses\n server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side\n encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your\n GetObject requests for the object that uses these types of keys,\n you\u2019ll get an HTTP 400 Bad Request error.

\n

\n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

\n
\n
Overriding response header values through the request
\n
\n

There are times when you want to override certain response header values of a\n GetObject response. For example, you might override the\n Content-Disposition response header value through your\n GetObject request.

\n

You can override values for a set of response headers. These modified response\n header values are included only in a successful response, that is, when the HTTP\n status code 200 OK is returned. The headers you can override using\n the following query parameters in the request are a subset of the headers that\n Amazon S3 accepts when you create an object.

\n

The response headers that you can override for the GetObject\n response are Cache-Control, Content-Disposition,\n Content-Encoding, Content-Language,\n Content-Type, and Expires.

\n

To override values for a set of response headers in the GetObject\n response, you can use the following query parameters in the request.

\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 response-content-language\n

    \n
  • \n
  • \n

    \n response-content-type\n

    \n
  • \n
  • \n

    \n response-expires\n

    \n
  • \n
\n \n

When you use these parameters, you must sign the request by using either an\n Authorization header or a presigned URL. These parameters cannot be used with\n an unsigned (anonymous) request.

\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to GetObject:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve a byte range of an object ", + "documentation": "The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.", + "input": { + "Bucket": "examplebucket", + "Key": "SampleFile.txt", + "Range": "bytes=0-9" }, - "traits": { - "smithy.api#documentation": "

A container that describes additional filters for identifying the source objects that\n you want to replicate. You can choose to enable or disable the replication of these\n objects. Currently, Amazon S3 supports only the filter that you can specify for objects created\n with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service\n (SSE-KMS).

" - } - }, - "com.amazonaws.s3#SseKmsEncryptedObjects": { - "type": "structure", - "members": { - "Status": { - "target": "com.amazonaws.s3#SseKmsEncryptedObjectsStatus", - "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 replicates objects created with server-side encryption using an\n Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

", - "smithy.api#required": {} - } - } + "output": { + "AcceptRanges": "bytes", + "ContentType": "text/plain", + "LastModified": "2014-10-09T22:57:28.000Z", + "ContentLength": 10, + "VersionId": "null", + "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"", + "ContentRange": "bytes 0-9/43", + "Metadata": {} + } + }, + { + "title": "To retrieve an object", + "documentation": "The following example retrieves an object for an S3 bucket.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" }, - "traits": { - "smithy.api#documentation": "

A container for filter information for the selection of S3 objects encrypted with Amazon Web Services\n KMS.

" - } - }, - "com.amazonaws.s3#SseKmsEncryptedObjectsStatus": { - "type": "enum", - "members": { - "Enabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Enabled" - } + "output": { + "AcceptRanges": "bytes", + "ContentType": "image/jpeg", + "LastModified": "2016-12-15T01:19:41.000Z", + "ContentLength": 3191, + "VersionId": "null", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "TagCount": 2, + "Metadata": {} + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?x-id=GetObject", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectAcl": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectAclRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectAclOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchKey" + } + ], + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 functionality is not supported for Amazon S3 on Outposts.

\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\n bucket-owner-full-control ACL with the owner being the account that\n created the bucket. For more information, see Controlling object\n ownership and disabling ACLs in the\n Amazon S3 User Guide.

\n
\n

The following operations are related to GetObjectAcl:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve object ACL", + "documentation": "The following example retrieves access control list (ACL) of an object.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Grants": [ + { + "Grantee": { + "Type": "CanonicalUser", + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Permission": "WRITE" }, - "Disabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Disabled" - } - } - } - }, - "com.amazonaws.s3#Start": { - "type": "long" - }, - "com.amazonaws.s3#StartAfter": { - "type": "string" - }, - "com.amazonaws.s3#Stats": { - "type": "structure", - "members": { - "BytesScanned": { - "target": "com.amazonaws.s3#BytesScanned", - "traits": { - "smithy.api#documentation": "

The total number of object bytes scanned.

" - } + { + "Grantee": { + "Type": "CanonicalUser", + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Permission": "WRITE_ACP" }, - "BytesProcessed": { - "target": "com.amazonaws.s3#BytesProcessed", - "traits": { - "smithy.api#documentation": "

The total number of uncompressed object bytes processed.

" - } + { + "Grantee": { + "Type": "CanonicalUser", + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Permission": "READ" }, - "BytesReturned": { - "target": "com.amazonaws.s3#BytesReturned", - "traits": { - "smithy.api#documentation": "

The total number of bytes of records payload data returned.

" - } - } + { + "Grantee": { + "Type": "CanonicalUser", + "DisplayName": "owner-display-name", + "ID": "852b113eexamplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Permission": "READ_ACP" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?acl", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectAclOutput": { + "type": "structure", + "members": { + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

Container for the bucket owner's display name and ID.

" + } + }, + "Grants": { + "target": "com.amazonaws.s3#Grants", + "traits": { + "smithy.api#documentation": "

A list of grants.

", + "smithy.api#xmlName": "AccessControlList" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "AccessControlPolicy" + } + }, + "com.amazonaws.s3#GetObjectAclRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name that contains the object for which to get the ACL information.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key of the object for which to get the ACL information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpQuery": "versionId" + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "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 of the metadata from an object without returning the object itself. This\n operation is useful if you're interested only in an object's metadata.

\n

\n GetObjectAttributes combines the functionality of HeadObject\n and ListParts. All of the data returned with both of those individual calls\n can be returned with a single call to GetObjectAttributes.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n use GetObjectAttributes, you must have READ access to the object.

    \n

    The other permissions that you need to use this operation depend on\n whether the bucket is versioned and if a version ID is passed in the GetObjectAttributes request.

    \n
      \n
    • \n

      If you pass a version ID in your request, you need both the s3:GetObjectVersion and\n s3:GetObjectVersionAttributes permissions.

      \n
    • \n
    • \n

      If you do not pass a version ID in your request, you need the\n s3:GetObject and s3:GetObjectAttributes\n permissions.

      \n
    • \n
    \n

    For more information, see Specifying\n Permissions in a Policy in the\n Amazon S3 User Guide.

    \n

    If the object that you request does\n not exist, the error Amazon S3 returns depends on whether you also have the\n s3:ListBucket permission.

    \n
      \n
    • \n

      If you have the s3:ListBucket permission on the\n bucket, Amazon S3 returns an HTTP status code 404 Not Found\n (\"no such key\") error.

      \n
    • \n
    • \n

      If you don't have the s3:ListBucket permission, Amazon S3\n returns an HTTP status code 403 Forbidden (\"access\n denied\") error.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If\n the\n object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Encryption
\n
\n \n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for HEAD requests if your object uses\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side\n encryption with Amazon S3 managed encryption keys (SSE-S3). The\n x-amz-server-side-encryption header is used when you\n PUT an object to S3 and want to specify the encryption method.\n If you include this header in a GET request for an object that\n uses these types of keys, you\u2019ll get an HTTP 400 Bad Request\n error. It's because the encryption method can't be changed when you retrieve\n the object.

\n
\n

If you encrypted an object when you stored the object in Amazon S3 by using server-side encryption with customer-provided\n encryption keys (SSE-C), then when you retrieve\n the metadata from the object, you must use the following headers. These headers provide the\n server with the encryption key required to retrieve the object's metadata. The\n headers are:

\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\n Encryption (Using Customer-Provided Encryption Keys) in the\n Amazon S3 User Guide.

\n \n

\n Directory bucket permissions -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

\n
\n
\n
Versioning
\n
\n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

\n
\n
Conditional request headers
\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\n true.

      \n
    • \n
    • \n

      \n If-Unmodified-Since condition evaluates to\n false.

      \n
    • \n
    \n

    For more information about conditional requests, see RFC 7232.

    \n
  • \n
  • \n

    If both of the If-None-Match and\n If-Modified-Since headers are present in the request as\n follows, then Amazon S3 returns the HTTP status code 304 Not\n 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

    For more information about conditional requests, see RFC 7232.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\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. To learn more about delete markers, see Working with delete markers.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-delete-marker" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Date and time when the object was last modified.

", + "smithy.api#httpHeader": "Last-Modified" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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

For more information, see Storage Classes.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" + } + }, + "ObjectSize": { + "target": "com.amazonaws.s3#ObjectSize", + "traits": { + "smithy.api#documentation": "

The size of the object in bytes.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "GetObjectAttributesResponse" + } + }, + "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 true\n indicates that the list was truncated. A list can be truncated if the number of parts\n 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.

\n \n
    \n
  • \n

    \n General purpose buckets - For\n GetObjectAttributes, if a additional checksum (including\n x-amz-checksum-crc32, x-amz-checksum-crc32c,\n x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't\n applied to the object specified in the request, the response doesn't return\n Part.

    \n
  • \n
  • \n

    \n Directory buckets - For\n GetObjectAttributes, no matter whether a additional checksum is\n applied to the object specified in the request, the response returns\n Part.

    \n
  • \n
\n
", + "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

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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.

\n \n

S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

\n
", + "smithy.api#httpQuery": "versionId" + } + }, + "MaxParts": { + "target": "com.amazonaws.s3#MaxParts", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of parts to return. For more information, see Uploading and copying objects using multipart upload in Amazon S3 in the Amazon Simple Storage Service user guide.

", + "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. For more information, see Uploading and copying objects using multipart upload in Amazon S3 in the Amazon Simple Storage Service user guide.

", + "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, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, 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": "

Specifies the fields at the root level that you want returned in the response. Fields\n that you do not specify are not returned.

", + "smithy.api#httpHeader": "x-amz-object-attributes", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectLegalHold": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectLegalHoldRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectLegalHoldOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Gets an object's current legal hold status. For more information, see Locking\n Objects.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectLegalHold:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?legal-hold", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectLegalHoldOutput": { + "type": "structure", + "members": { + "LegalHold": { + "target": "com.amazonaws.s3#ObjectLockLegalHold", + "traits": { + "smithy.api#documentation": "

The current legal hold status for the specified object.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "LegalHold" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectLegalHoldRequest": { + "type": "structure", + "members": { + "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

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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#httpLabel": {}, + "smithy.api#required": {} + } + }, + "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#httpQuery": "versionId" + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectLockConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectLockConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectLockConfigurationOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 Objects.

\n

The following action is related to GetObjectLockConfiguration:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?object-lock", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectLockConfigurationOutput": { + "type": "structure", + "members": { + "ObjectLockConfiguration": { + "target": "com.amazonaws.s3#ObjectLockConfiguration", + "traits": { + "smithy.api#documentation": "

The specified bucket's Object Lock configuration.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectLockConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket whose Object Lock configuration you want to retrieve.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectOutput": { + "type": "structure", + "members": { + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

Object data.

", + "smithy.api#httpPayload": {} + } + }, + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.

\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

    If the specified version in the request is a delete marker, the response\n returns a 405 Method Not Allowed error and the Last-Modified:\n timestamp response header.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-delete-marker" + } + }, + "AcceptRanges": { + "target": "com.amazonaws.s3#AcceptRanges", + "traits": { + "smithy.api#documentation": "

Indicates that a range of bytes was specified in the request.

", + "smithy.api#httpHeader": "accept-ranges" + } + }, + "Expiration": { + "target": "com.amazonaws.s3#Expiration", + "traits": { + "smithy.api#documentation": "

If the object expiration is configured (see \n PutBucketLifecycleConfiguration\n ), the response includes this\n header. It includes the expiry-date and rule-id key-value pairs\n providing object expiration information. The value of the rule-id is\n URL-encoded.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-expiration" + } + }, + "Restore": { + "target": "com.amazonaws.s3#Restore", + "traits": { + "smithy.api#documentation": "

Provides information about object restoration action and expiration time of the restored\n object copy.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", + "smithy.api#httpHeader": "x-amz-restore" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Date and time when the object was last modified.

\n

\n General purpose buckets - When you specify a\n versionId of the object in your request, if the specified version in the\n request is a delete marker, the response returns a 405 Method Not Allowed\n error and the Last-Modified: timestamp response header.

", + "smithy.api#httpHeader": "Last-Modified" + } + }, + "ContentLength": { + "target": "com.amazonaws.s3#ContentLength", + "traits": { + "smithy.api#documentation": "

Size of the body in bytes.

", + "smithy.api#httpHeader": "Content-Length" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "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 checksum is only present if the object was uploaded\n with the object. For more information, 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 the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32c" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. For more information, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha256" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in the\n CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + }, + "MissingMeta": { + "target": "com.amazonaws.s3#MissingMeta", + "traits": { + "smithy.api#documentation": "

This is set to the number of metadata entries not returned in the headers that are\n prefixed with x-amz-meta-. This can happen if you create metadata using an API\n like SOAP that supports more flexible metadata than the REST API. For example, using SOAP,\n you can create metadata whose values are not legal HTTP headers.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-missing-meta" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Indicates what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentRange": { + "target": "com.amazonaws.s3#ContentRange", + "traits": { + "smithy.api#documentation": "

The portion of the object returned in the response.

", + "smithy.api#httpHeader": "Content-Range" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", + "smithy.api#httpHeader": "Expires" + } + }, + "WebsiteRedirectLocation": { + "target": "com.amazonaws.s3#WebsiteRedirectLocation", + "traits": { + "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the object uses an S3 Bucket Key for server-side encryption with\n Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "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

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + }, + "ReplicationStatus": { + "target": "com.amazonaws.s3#ReplicationStatus", + "traits": { + "smithy.api#documentation": "

Amazon S3 can return this if your request involves a bucket that is either a source or\n destination in a replication rule.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-replication-status" + } + }, + "PartsCount": { + "target": "com.amazonaws.s3#PartsCount", + "traits": { + "smithy.api#documentation": "

The count of parts this object has. This value is only returned if you specify\n partNumber in your request and the object was uploaded as a multipart\n upload.

", + "smithy.api#httpHeader": "x-amz-mp-parts-count" + } + }, + "TagCount": { + "target": "com.amazonaws.s3#TagCount", + "traits": { + "smithy.api#documentation": "

The number of tags, if any, on the object, when you have the relevant permission to read\n object tags.

\n

You can use GetObjectTagging to retrieve\n the tag set associated with an object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-tagging-count" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

The Object Lock mode that's currently in place for this object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when this object's Object Lock will expire.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Indicates whether this object has an active legal hold. This field is only returned if\n you have permission to view an object's legal hold status.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-legal-hold" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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 in this\n header; otherwise, return a 412 Precondition Failed error.

\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

For more information about conditional requests, see RFC 7232.

", + "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 error.

\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 status code.

\n

For more information about conditional requests, see RFC 7232.

", + "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 in\n this header; otherwise, return a 304 Not Modified error.

\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 HTTP status\n code.

\n

For more information about conditional requests, see RFC 7232.

", + "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 error.

\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

For more information about conditional requests, see RFC 7232.

", + "smithy.api#httpHeader": "If-Unmodified-Since" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Key of the object to get.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "Range": { + "target": "com.amazonaws.s3#Range", + "traits": { + "smithy.api#documentation": "

Downloads the specified byte range of an object. For more information about the HTTP\n Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

\n \n

Amazon S3 doesn't support retrieving multiple ranges of data per GET\n request.

\n
", + "smithy.api#httpHeader": "Range" + } + }, + "ResponseCacheControl": { + "target": "com.amazonaws.s3#ResponseCacheControl", + "traits": { + "smithy.api#documentation": "

Sets the Cache-Control header of the response.

", + "smithy.api#httpQuery": "response-cache-control" + } + }, + "ResponseContentDisposition": { + "target": "com.amazonaws.s3#ResponseContentDisposition", + "traits": { + "smithy.api#documentation": "

Sets the Content-Disposition header of the response.

", + "smithy.api#httpQuery": "response-content-disposition" + } + }, + "ResponseContentEncoding": { + "target": "com.amazonaws.s3#ResponseContentEncoding", + "traits": { + "smithy.api#documentation": "

Sets the Content-Encoding header of the response.

", + "smithy.api#httpQuery": "response-content-encoding" + } + }, + "ResponseContentLanguage": { + "target": "com.amazonaws.s3#ResponseContentLanguage", + "traits": { + "smithy.api#documentation": "

Sets the Content-Language header of the response.

", + "smithy.api#httpQuery": "response-content-language" + } + }, + "ResponseContentType": { + "target": "com.amazonaws.s3#ResponseContentType", + "traits": { + "smithy.api#documentation": "

Sets the Content-Type header of the response.

", + "smithy.api#httpQuery": "response-content-type" + } + }, + "ResponseExpires": { + "target": "com.amazonaws.s3#ResponseExpires", + "traits": { + "smithy.api#documentation": "

Sets the Expires header of the response.

", + "smithy.api#httpQuery": "response-expires" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n

By default, the GetObject operation returns the current version of an\n object. To return a different version, use the versionId subresource.

\n \n
    \n
  • \n

    If you include a versionId in your request header, you must have\n the s3:GetObjectVersion permission to access a specific version of an\n object. The s3:GetObject permission is not required in this\n scenario.

    \n
  • \n
  • \n

    If you request the current version of an object without a specific\n versionId in the request header, only the\n s3:GetObject permission is required. The\n s3:GetObjectVersion permission is not required in this\n scenario.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the\n versionId query parameter in the request.

    \n
  • \n
\n
\n

For more information about versioning, see PutBucketVersioning.

", + "smithy.api#httpQuery": "versionId" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when decrypting the object (for example,\n AES256).

\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

    \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

This functionality is not supported for directory buckets.

\n
", + "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 that you originally provided for Amazon S3 to\n encrypt the data before storing it. This value is used to decrypt the object when\n recovering it and must match the one used when storing the data. The key must be\n appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm header.

\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

    \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

This functionality is not supported for directory buckets.

\n
", + "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 customer-provided encryption key according to\n RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption\n key was transmitted without 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

    \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

This functionality is not supported for directory buckets.

\n
", + "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" + } + }, + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number of the object being read. This is a positive integer between 1 and 10,000.\n Effectively performs a 'ranged' GET request for the part specified. Useful for downloading\n just a part of an object.

", + "smithy.api#httpQuery": "partNumber" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectResponseStatusCode": { + "type": "integer" + }, + "com.amazonaws.s3#GetObjectRetention": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectRetentionRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectRetentionOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves an object's retention settings. For more information, see Locking\n Objects.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectRetention:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?retention", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectRetentionOutput": { + "type": "structure", + "members": { + "Retention": { + "target": "com.amazonaws.s3#ObjectLockRetention", + "traits": { + "smithy.api#documentation": "

The container element for an object's retention settings.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "Retention" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectRetentionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object whose retention settings you want to retrieve.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key name for the object whose retention settings you want to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The version ID for the object whose retention settings you want to retrieve.

", + "smithy.api#httpQuery": "versionId" + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectTaggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectTaggingOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns the tag-set of an object. You send the GET request against the tagging\n subresource associated with the object.

\n

To use this operation, you must have permission to perform the\n s3:GetObjectTagging action. By default, the GET action returns information\n about current version of an object. For a versioned bucket, you can have multiple versions\n of an object in your bucket. To retrieve tags of any other version, use the versionId query\n parameter. You also need permission for the s3:GetObjectVersionTagging\n action.

\n

By default, the bucket owner has this permission and can grant this permission to\n others.

\n

For information about the Amazon S3 object tagging feature, see Object Tagging.

\n

The following actions are related to GetObjectTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve tag set of a specific object version", + "documentation": "The following example retrieves tag set of an object. The request specifies object version.", + "input": { + "Bucket": "examplebucket", + "Key": "exampleobject", + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" }, - "traits": { - "smithy.api#documentation": "

Container for the stats details.

" - } - }, - "com.amazonaws.s3#StatsEvent": { - "type": "structure", - "members": { - "Details": { - "target": "com.amazonaws.s3#Stats", - "traits": { - "smithy.api#documentation": "

The Stats event details.

", - "smithy.api#eventPayload": {} - } + "output": { + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI", + "TagSet": [ + { + "Value": "Value1", + "Key": "Key1" } - }, - "traits": { - "smithy.api#documentation": "

Container for the Stats Event.

" + ] } - }, - "com.amazonaws.s3#StorageClass": { - "type": "enum", - "members": { - "STANDARD": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STANDARD" - } - }, - "REDUCED_REDUNDANCY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "REDUCED_REDUNDANCY" - } - }, - "STANDARD_IA": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STANDARD_IA" - } - }, - "ONEZONE_IA": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ONEZONE_IA" - } - }, - "INTELLIGENT_TIERING": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INTELLIGENT_TIERING" - } - }, - "GLACIER": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GLACIER" - } - }, - "DEEP_ARCHIVE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DEEP_ARCHIVE" - } - }, - "OUTPOSTS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "OUTPOSTS" - } - }, - "GLACIER_IR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GLACIER_IR" - } - }, - "SNOW": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SNOW" - } + }, + { + "title": "To retrieve tag set of an object", + "documentation": "The following example retrieves tag set of an object.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "VersionId": "null", + "TagSet": [ + { + "Value": "Value4", + "Key": "Key4" }, - "EXPRESS_ONEZONE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "EXPRESS_ONEZONE" - } + { + "Value": "Value3", + "Key": "Key3" } + ] } - }, - "com.amazonaws.s3#StorageClassAnalysis": { - "type": "structure", - "members": { - "DataExport": { - "target": "com.amazonaws.s3#StorageClassAnalysisDataExport", - "traits": { - "smithy.api#documentation": "

Specifies how data related to the storage class analysis for an Amazon S3 bucket should be\n exported.

" - } - } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?tagging", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectTaggingOutput": { + "type": "structure", + "members": { + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object for which you got the tagging information.

", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "TagSet": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

Contains the tag set.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "Tagging" + } + }, + "com.amazonaws.s3#GetObjectTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object for which to get the tagging information.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which to get the tagging information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object for which to get the tagging information.

", + "smithy.api#httpQuery": "versionId" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetObjectTorrent": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectTorrentRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectTorrentOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're\n distributing large files.

\n \n

You can get torrent only for objects that are less than 5 GB in size, and that are\n not encrypted using server-side encryption with a customer-provided encryption\n key.

\n
\n

To use GET, you must have READ access to the object.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

The following action is related to GetObjectTorrent:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve torrent files for an object", + "documentation": "The following example retrieves torrent files of an object.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?torrent", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectTorrentOutput": { + "type": "structure", + "members": { + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

A Bencoded dictionary as defined by the BitTorrent specification

", + "smithy.api#httpPayload": {} + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetObjectTorrentRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the object for which to get the torrent files.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key for which to get the information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GetPublicAccessBlock": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetPublicAccessBlockRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetPublicAccessBlockOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use\n this operation, you must have the s3:GetBucketPublicAccessBlock permission.\n For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\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 settings are different between the bucket and the\n account, Amazon S3 uses the most restrictive combination of the bucket-level and\n account-level settings.

\n
\n

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".

\n

The following operations are related to GetPublicAccessBlock:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?publicAccessBlock", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#GetPublicAccessBlockOutput": { + "type": "structure", + "members": { + "PublicAccessBlockConfiguration": { + "target": "com.amazonaws.s3#PublicAccessBlockConfiguration", + "traits": { + "smithy.api#documentation": "

The PublicAccessBlock configuration currently in effect for this Amazon S3\n bucket.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#GetPublicAccessBlockRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want\n to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#GlacierJobParameters": { + "type": "structure", + "members": { + "Tier": { + "target": "com.amazonaws.s3#Tier", + "traits": { + "smithy.api#documentation": "

Retrieval tier at which the restore will be processed.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for S3 Glacier job parameters.

" + } + }, + "com.amazonaws.s3#Grant": { + "type": "structure", + "members": { + "Grantee": { + "target": "com.amazonaws.s3#Grantee", + "traits": { + "smithy.api#documentation": "

The person being granted permissions.

", + "smithy.api#xmlNamespace": { + "uri": "http://www.w3.org/2001/XMLSchema-instance", + "prefix": "xsi" + } + } + }, + "Permission": { + "target": "com.amazonaws.s3#Permission", + "traits": { + "smithy.api#documentation": "

Specifies the permission given to the grantee.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for grant information.

" + } + }, + "com.amazonaws.s3#GrantFullControl": { + "type": "string" + }, + "com.amazonaws.s3#GrantRead": { + "type": "string" + }, + "com.amazonaws.s3#GrantReadACP": { + "type": "string" + }, + "com.amazonaws.s3#GrantWrite": { + "type": "string" + }, + "com.amazonaws.s3#GrantWriteACP": { + "type": "string" + }, + "com.amazonaws.s3#Grantee": { + "type": "structure", + "members": { + "DisplayName": { + "target": "com.amazonaws.s3#DisplayName", + "traits": { + "smithy.api#documentation": "

Screen name of the grantee.

" + } + }, + "EmailAddress": { + "target": "com.amazonaws.s3#EmailAddress", + "traits": { + "smithy.api#documentation": "

Email address of the grantee.

\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\u00e3o 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
" + } + }, + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

The canonical user ID of the grantee.

" + } + }, + "URI": { + "target": "com.amazonaws.s3#URI", + "traits": { + "smithy.api#documentation": "

URI of the grantee group.

" + } + }, + "Type": { + "target": "com.amazonaws.s3#Type", + "traits": { + "smithy.api#documentation": "

Type of grantee

", + "smithy.api#required": {}, + "smithy.api#xmlAttribute": {}, + "smithy.api#xmlName": "xsi:type" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the person being granted permissions.

" + } + }, + "com.amazonaws.s3#Grants": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Grant", + "traits": { + "smithy.api#xmlName": "Grant" + } + } + }, + "com.amazonaws.s3#HeadBucket": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#HeadBucketRequest" + }, + "output": { + "target": "com.amazonaws.s3#HeadBucketOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NotFound" + } + ], + "traits": { + "smithy.api#documentation": "

You can use this operation to determine if a bucket exists and if you have permission to\n access it. The action returns a 200 OK if the bucket exists and you have\n permission to access it.

\n \n

If the bucket does not exist or you do not have permission to access it, the\n HEAD request returns a generic 400 Bad Request, 403\n Forbidden or 404 Not Found code. A message body is not included,\n so you cannot determine the exception beyond these HTTP response codes.

\n
\n
\n
Authentication and authorization
\n
\n

\n General purpose buckets - Request to public\n buckets that grant the s3:ListBucket permission publicly do not need to be signed.\n All other HeadBucket requests must be authenticated and signed by\n using IAM credentials (access key ID and secret access key for the IAM\n identities). All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use IAM\n credentials to authenticate and authorize your access to the\n HeadBucket API operation, instead of using the temporary security\n credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

\n \n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n \n

You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
", + "smithy.api#examples": [ + { + "title": "To determine if bucket exists", + "documentation": "This operation checks to see if a bucket exists.", + "input": { + "Bucket": "acl1" + } + } + ], + "smithy.api#http": { + "method": "HEAD", + "uri": "/{Bucket}", + "code": 200 + }, + "smithy.waiters#waitable": { + "BucketExists": { + "acceptors": [ + { + "state": "success", + "matcher": { + "success": true + } + }, + { + "state": "retry", + "matcher": { + "errorType": "NotFound" + } + } + ], + "minDelay": 5 + }, + "BucketNotExists": { + "acceptors": [ + { + "state": "success", + "matcher": { + "errorType": "NotFound" + } + } + ], + "minDelay": 5 + } + } + } + }, + "com.amazonaws.s3#HeadBucketOutput": { + "type": "structure", + "members": { + "BucketLocationType": { + "target": "com.amazonaws.s3#LocationType", + "traits": { + "smithy.api#documentation": "

The type of location where the bucket is created.

\n \n

This functionality is only supported by directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-bucket-location-type" + } + }, + "BucketLocationName": { + "target": "com.amazonaws.s3#BucketLocationName", + "traits": { + "smithy.api#documentation": "

The name of the location where the bucket will be created.

\n

For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

\n \n

This functionality is only supported by directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-bucket-location-name" + } + }, + "BucketRegion": { + "target": "com.amazonaws.s3#Region", + "traits": { + "smithy.api#documentation": "

The Region that the bucket is located.

", + "smithy.api#httpHeader": "x-amz-bucket-region" + } + }, + "AccessPointAlias": { + "target": "com.amazonaws.s3#AccessPointAlias", + "traits": { + "smithy.api#documentation": "

Indicates whether the bucket name used in the request is an access point alias.

\n \n

For directory buckets, the value of this field is false.

\n
", + "smithy.api#httpHeader": "x-amz-access-point-alias" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#HeadBucketRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. \nIf the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. \nFor more information about InvalidAccessPointAliasError, see List of\n Error Codes.

\n \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#HeadObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#HeadObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#HeadObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NotFound" + } + ], + "traits": { + "smithy.api#documentation": "

The HEAD operation retrieves metadata from an object without returning the\n object itself. This operation is useful if you're interested only in an object's\n metadata.

\n \n

A HEAD request has the same options as a GET operation on\n an object. The response is identical to the GET response except that there\n is no response body. Because of this, if the HEAD request generates an\n error, it returns a generic code, such as 400 Bad Request, 403\n Forbidden, 404 Not Found, 405 Method Not Allowed,\n 412 Precondition Failed, or 304 Not Modified. It's not\n possible to retrieve the exact exception of these error codes.

\n
\n

Request headers are limited to 8 KB in size. For more information, see Common\n Request Headers.

\n
\n
Permissions
\n
\n

\n
    \n
  • \n

    \n General purpose bucket permissions - To\n use HEAD, you must have the s3:GetObject\n permission. You need the relevant read object (or version) permission for\n this operation. For more information, see Actions, resources, and\n condition keys for Amazon S3 in the Amazon S3 User\n Guide. For more information about the permissions to S3 API\n operations by S3 resource types, see Required permissions for Amazon S3 API operations in the\n Amazon S3 User Guide.

    \n

    If the object you request doesn't exist, the error that Amazon S3 returns\n depends on whether you also have the s3:ListBucket\n permission.

    \n
      \n
    • \n

      If you have the s3:ListBucket permission on the\n bucket, Amazon S3 returns an HTTP status code 404 Not Found\n error.

      \n
    • \n
    • \n

      If you don\u2019t have the s3:ListBucket permission, Amazon S3\n returns an HTTP status code 403 Forbidden error.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If you enable x-amz-checksum-mode in the request and the\n object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must\n also have the kms:GenerateDataKey and kms:Decrypt\n permissions in IAM identity-based policies and KMS key policies for the\n KMS key to retrieve the checksum of the object.

    \n
  • \n
\n
\n
Encryption
\n
\n \n

Encryption request headers, like x-amz-server-side-encryption,\n should not be sent for HEAD requests if your object uses\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side\n encryption with Amazon S3 managed encryption keys (SSE-S3). The\n x-amz-server-side-encryption header is used when you\n PUT an object to S3 and want to specify the encryption method.\n If you include this header in a HEAD request for an object that\n uses these types of keys, you\u2019ll get an HTTP 400 Bad Request\n error. It's because the encryption method can't be changed when you retrieve\n the object.

\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\n the metadata from the object, you must use the following headers to provide the\n encryption key for the server to be able to retrieve the object's metadata. The\n headers are:

\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\n Encryption (Using Customer-Provided Encryption Keys) in the\n Amazon S3 User Guide.

\n \n

\n Directory bucket -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

\n
\n
\n
Versioning
\n
\n
    \n
  • \n

    If the current version of the object is a delete marker, Amazon S3 behaves as\n if the object was deleted and includes x-amz-delete-marker:\n true in the response.

    \n
  • \n
  • \n

    If the specified version is a delete marker, the response returns a\n 405 Method Not Allowed error and the Last-Modified:\n timestamp response header.

    \n
  • \n
\n \n
    \n
  • \n

    \n Directory buckets -\n Delete marker is not supported for directory buckets.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null\n to the versionId query parameter in the request.

    \n
  • \n
\n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n \n

For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
\n

The following actions are related to HeadObject:

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve metadata of an object without returning the object itself", + "documentation": "The following example retrieves an object metadata.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" }, - "traits": { - "smithy.api#documentation": "

Specifies data related to access patterns to be collected and made available to analyze\n the tradeoffs between different storage classes for an Amazon S3 bucket.

" - } - }, - "com.amazonaws.s3#StorageClassAnalysisDataExport": { - "type": "structure", - "members": { - "OutputSchemaVersion": { - "target": "com.amazonaws.s3#StorageClassAnalysisSchemaVersion", - "traits": { - "smithy.api#documentation": "

The version of the output schema to use when exporting data. Must be\n V_1.

", - "smithy.api#required": {} - } + "output": { + "AcceptRanges": "bytes", + "ContentType": "image/jpeg", + "LastModified": "2016-12-15T01:19:41.000Z", + "ContentLength": 3191, + "VersionId": "null", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "Metadata": {} + } + } + ], + "smithy.api#http": { + "method": "HEAD", + "uri": "/{Bucket}/{Key+}", + "code": 200 + }, + "smithy.waiters#waitable": { + "ObjectExists": { + "acceptors": [ + { + "state": "success", + "matcher": { + "success": true + } + }, + { + "state": "retry", + "matcher": { + "errorType": "NotFound" + } + } + ], + "minDelay": 5 + }, + "ObjectNotExists": { + "acceptors": [ + { + "state": "success", + "matcher": { + "errorType": "NotFound" + } + } + ], + "minDelay": 5 + } + } + } + }, + "com.amazonaws.s3#HeadObjectOutput": { + "type": "structure", + "members": { + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If\n false, this response header does not appear in the response.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-delete-marker" + } + }, + "AcceptRanges": { + "target": "com.amazonaws.s3#AcceptRanges", + "traits": { + "smithy.api#documentation": "

Indicates that a range of bytes was specified.

", + "smithy.api#httpHeader": "accept-ranges" + } + }, + "Expiration": { + "target": "com.amazonaws.s3#Expiration", + "traits": { + "smithy.api#documentation": "

If the object expiration is configured (see \n PutBucketLifecycleConfiguration\n ), the response includes this\n header. It includes the expiry-date and rule-id key-value pairs\n providing object expiration information. The value of the rule-id is\n URL-encoded.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-expiration" + } + }, + "Restore": { + "target": "com.amazonaws.s3#Restore", + "traits": { + "smithy.api#documentation": "

If the object is an archived object (an object whose storage class is GLACIER), the\n response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

\n

If an archive copy is already restored, the header value indicates when Amazon S3 is\n scheduled to delete the object copy. For example:

\n

\n x-amz-restore: ongoing-request=\"false\", expiry-date=\"Fri, 21 Dec 2012 00:00:00\n GMT\"\n

\n

If the object restoration is in progress, the header returns the value\n ongoing-request=\"true\".

\n

For more information about archiving objects, see Transitioning Objects: General Considerations.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", + "smithy.api#httpHeader": "x-amz-restore" + } + }, + "ArchiveStatus": { + "target": "com.amazonaws.s3#ArchiveStatus", + "traits": { + "smithy.api#documentation": "

The archive state of the head object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-archive-status" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Date and time when the object was last modified.

", + "smithy.api#httpHeader": "Last-Modified" + } + }, + "ContentLength": { + "target": "com.amazonaws.s3#ContentLength", + "traits": { + "smithy.api#documentation": "

Size of the body in bytes.

", + "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in\n CreateMultipartUpload request. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "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" + } + }, + "MissingMeta": { + "target": "com.amazonaws.s3#MissingMeta", + "traits": { + "smithy.api#documentation": "

This is set to the number of metadata entries not returned in x-amz-meta\n headers. This can happen if you create metadata using an API like SOAP that supports more\n flexible metadata than the REST API. For example, using SOAP, you can create metadata whose\n values are not legal HTTP headers.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-missing-meta" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Indicates what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "ContentRange": { + "target": "com.amazonaws.s3#ContentRange", + "traits": { + "smithy.api#documentation": "

The portion of the object returned in the response for a GET request.

", + "smithy.api#httpHeader": "Content-Range" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", + "smithy.api#httpHeader": "Expires" + } + }, + "WebsiteRedirectLocation": { + "target": "com.amazonaws.s3#WebsiteRedirectLocation", + "traits": { + "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms, aws:kms:dsse).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the object uses an S3 Bucket Key for server-side encryption with\n Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "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

For more information, see Storage Classes.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + }, + "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

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,\n Amazon S3 will return the x-amz-replication-status header if the object in\n your request is 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\n bucket, Amazon S3 will return the x-amz-replication-status header\n with value REPLICA if the object in your request is a replica that Amazon S3 created and\n there is no replica modification replication in progress.

    \n
  • \n
  • \n

    \n When replicating objects to multiple destination\n buckets, the x-amz-replication-status header acts\n differently. The header of the source object will only return a value of COMPLETED\n when replication is successful to all destinations. The header will remain at value\n PENDING until replication has completed for all destinations. If one or more\n destinations fails replication the header will return FAILED.

    \n
  • \n
\n

For more information, see Replication.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-replication-status" + } + }, + "PartsCount": { + "target": "com.amazonaws.s3#PartsCount", + "traits": { + "smithy.api#documentation": "

The count of parts this object has. This value is only returned if you specify\n partNumber in your request and the object was uploaded as a multipart\n upload.

", + "smithy.api#httpHeader": "x-amz-mp-parts-count" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

The Object Lock mode, if any, that's in effect for this object. This header is only\n returned if the requester has the s3:GetObjectRetention permission. For more\n information about S3 Object Lock, see Object Lock.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when the Object Lock retention period expires. This header is only\n returned if the requester has the s3:GetObjectRetention permission.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether a legal hold is in effect for this object. This header is only\n returned if the requester has the s3:GetObjectLegalHold permission. This\n header is not returned if the specified version of this object has never had a legal hold\n applied. For more information about S3 Object Lock, see Object Lock.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-legal-hold" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#HeadObjectRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket that contains the object.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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) error.

\n

If both of the If-Match and If-Unmodified-Since headers are\n present in the request as follows:

\n
    \n
  • \n

    \n If-Match condition evaluates to true, and;

    \n
  • \n
  • \n

    \n If-Unmodified-Since condition evaluates to false;

    \n
  • \n
\n

Then Amazon S3 returns 200 OK and the data requested.

\n

For more information about conditional requests, see RFC 7232.

", + "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) error.

\n

If both of the If-None-Match and If-Modified-Since headers are\n present in the request as follows:

\n
    \n
  • \n

    \n If-None-Match condition evaluates to false, and;

    \n
  • \n
  • \n

    \n If-Modified-Since condition evaluates to true;

    \n
  • \n
\n

Then Amazon S3 returns the 304 Not Modified response code.

\n

For more information about conditional requests, see RFC 7232.

", + "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) error.

\n

If both of the If-None-Match and If-Modified-Since headers are\n present in the request as follows:

\n
    \n
  • \n

    \n If-None-Match condition evaluates to false, and;

    \n
  • \n
  • \n

    \n If-Modified-Since condition evaluates to true;

    \n
  • \n
\n

Then Amazon S3 returns the 304 Not Modified response code.

\n

For more information about conditional requests, see RFC 7232.

", + "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) error.

\n

If both of the If-Match and If-Unmodified-Since headers are\n present in the request as follows:

\n
    \n
  • \n

    \n If-Match condition evaluates to true, and;

    \n
  • \n
  • \n

    \n If-Unmodified-Since condition evaluates to false;

    \n
  • \n
\n

Then Amazon S3 returns 200 OK and the data requested.

\n

For more information about conditional requests, see RFC 7232.

", + "smithy.api#httpHeader": "If-Unmodified-Since" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "Range": { + "target": "com.amazonaws.s3#Range", + "traits": { + "smithy.api#documentation": "

HeadObject returns only the metadata for an object. If the Range is satisfiable, only\n the ContentLength is affected in the response. If the Range is not\n satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

", + "smithy.api#httpHeader": "Range" + } + }, + "ResponseCacheControl": { + "target": "com.amazonaws.s3#ResponseCacheControl", + "traits": { + "smithy.api#documentation": "

Sets the Cache-Control header of the response.

", + "smithy.api#httpQuery": "response-cache-control" + } + }, + "ResponseContentDisposition": { + "target": "com.amazonaws.s3#ResponseContentDisposition", + "traits": { + "smithy.api#documentation": "

Sets the Content-Disposition header of the response.

", + "smithy.api#httpQuery": "response-content-disposition" + } + }, + "ResponseContentEncoding": { + "target": "com.amazonaws.s3#ResponseContentEncoding", + "traits": { + "smithy.api#documentation": "

Sets the Content-Encoding header of the response.

", + "smithy.api#httpQuery": "response-content-encoding" + } + }, + "ResponseContentLanguage": { + "target": "com.amazonaws.s3#ResponseContentLanguage", + "traits": { + "smithy.api#documentation": "

Sets the Content-Language header of the response.

", + "smithy.api#httpQuery": "response-content-language" + } + }, + "ResponseContentType": { + "target": "com.amazonaws.s3#ResponseContentType", + "traits": { + "smithy.api#documentation": "

Sets the Content-Type header of the response.

", + "smithy.api#httpQuery": "response-content-type" + } + }, + "ResponseExpires": { + "target": "com.amazonaws.s3#ResponseExpires", + "traits": { + "smithy.api#documentation": "

Sets the Expires header of the response.

", + "smithy.api#httpQuery": "response-expires" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n \n

For directory buckets in this API operation, only the null value of the version ID is supported.

\n
", + "smithy.api#httpQuery": "versionId" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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" + } + }, + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number of the object being read. This is a positive integer between 1 and 10,000.\n Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about\n the size of the part and the number of parts in this object.

", + "smithy.api#httpQuery": "partNumber" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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

\n General purpose buckets -\n If you enable checksum mode and the object is uploaded with a\n checksum\n and encrypted with an Key Management Service (KMS) key, you must have permission to use the\n kms:Decrypt action to retrieve the checksum.

\n

\n Directory buckets - If you enable\n ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service\n (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and\n kms:Decrypt permissions in IAM identity-based policies and KMS key\n policies for the KMS key to retrieve the checksum of the object.

", + "smithy.api#httpHeader": "x-amz-checksum-mode" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#HostName": { + "type": "string" + }, + "com.amazonaws.s3#HttpErrorCodeReturnedEquals": { + "type": "string" + }, + "com.amazonaws.s3#HttpRedirectCode": { + "type": "string" + }, + "com.amazonaws.s3#ID": { + "type": "string" + }, + "com.amazonaws.s3#IfMatch": { + "type": "string" + }, + "com.amazonaws.s3#IfMatchInitiatedTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "com.amazonaws.s3#IfMatchLastModifiedTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "com.amazonaws.s3#IfMatchSize": { + "type": "long" + }, + "com.amazonaws.s3#IfModifiedSince": { + "type": "timestamp" + }, + "com.amazonaws.s3#IfNoneMatch": { + "type": "string" + }, + "com.amazonaws.s3#IfUnmodifiedSince": { + "type": "timestamp" + }, + "com.amazonaws.s3#IndexDocument": { + "type": "structure", + "members": { + "Suffix": { + "target": "com.amazonaws.s3#Suffix", + "traits": { + "smithy.api#documentation": "

A suffix that is appended to a request that is for a directory on the website endpoint.\n (For example, if the suffix is index.html and you make a request to\n samplebucket/images/, the data that is returned will be for the object with\n the key name images/index.html.) The suffix must not be empty and must not\n include a slash character.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the Suffix element.

" + } + }, + "com.amazonaws.s3#Initiated": { + "type": "timestamp" + }, + "com.amazonaws.s3#Initiator": { + "type": "structure", + "members": { + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the\n principal is an IAM User, it provides a user ARN value.

\n \n

\n Directory buckets - If the principal is an\n Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it\n provides a user ARN value.

\n
" + } + }, + "DisplayName": { + "target": "com.amazonaws.s3#DisplayName", + "traits": { + "smithy.api#documentation": "

Name of the Principal.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container element that identifies who initiated the multipart upload.

" + } + }, + "com.amazonaws.s3#InputSerialization": { + "type": "structure", + "members": { + "CSV": { + "target": "com.amazonaws.s3#CSVInput", + "traits": { + "smithy.api#documentation": "

Describes the serialization of a CSV-encoded object.

" + } + }, + "CompressionType": { + "target": "com.amazonaws.s3#CompressionType", + "traits": { + "smithy.api#documentation": "

Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value:\n NONE.

" + } + }, + "JSON": { + "target": "com.amazonaws.s3#JSONInput", + "traits": { + "smithy.api#documentation": "

Specifies JSON as object's input serialization format.

" + } + }, + "Parquet": { + "target": "com.amazonaws.s3#ParquetInput", + "traits": { + "smithy.api#documentation": "

Specifies Parquet as object's input serialization format.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the serialization format of the object.

" + } + }, + "com.amazonaws.s3#IntelligentTieringAccessTier": { + "type": "enum", + "members": { + "ARCHIVE_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVE_ACCESS" + } + }, + "DEEP_ARCHIVE_ACCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE_ACCESS" + } + } + } + }, + "com.amazonaws.s3#IntelligentTieringAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the\n configuration applies.

" + } + }, + "Tags": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

All of these tags must exist in the object's tag set in order for the configuration to\n apply.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for specifying S3 Intelligent-Tiering filters. The filters determine the\n subset of objects to which the rule applies.

" + } + }, + "com.amazonaws.s3#IntelligentTieringConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#IntelligentTieringId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", + "smithy.api#required": {} + } + }, + "Filter": { + "target": "com.amazonaws.s3#IntelligentTieringFilter", + "traits": { + "smithy.api#documentation": "

Specifies a bucket filter. The configuration only includes objects that meet the\n filter's criteria.

" + } + }, + "Status": { + "target": "com.amazonaws.s3#IntelligentTieringStatus", + "traits": { + "smithy.api#documentation": "

Specifies the status of the configuration.

", + "smithy.api#required": {} + } + }, + "Tierings": { + "target": "com.amazonaws.s3#TieringList", + "traits": { + "smithy.api#documentation": "

Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tiering" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

\n

For information about the S3 Intelligent-Tiering storage class, see Storage class\n for automatically optimizing frequently and infrequently accessed\n objects.

" + } + }, + "com.amazonaws.s3#IntelligentTieringConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#IntelligentTieringConfiguration" + } + }, + "com.amazonaws.s3#IntelligentTieringDays": { + "type": "integer" + }, + "com.amazonaws.s3#IntelligentTieringFilter": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "Tag": { + "target": "com.amazonaws.s3#Tag" + }, + "And": { + "target": "com.amazonaws.s3#IntelligentTieringAndOperator", + "traits": { + "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Filter is used to identify objects that the S3 Intelligent-Tiering\n configuration applies to.

" + } + }, + "com.amazonaws.s3#IntelligentTieringId": { + "type": "string" + }, + "com.amazonaws.s3#IntelligentTieringStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#InvalidObjectState": { + "type": "structure", + "members": { + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass" + }, + "AccessTier": { + "target": "com.amazonaws.s3#IntelligentTieringAccessTier" + } + }, + "traits": { + "smithy.api#documentation": "

Object is archived and inaccessible until restored.

\n

If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage\n class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access\n tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you\n must first restore a copy using RestoreObject. Otherwise, this\n operation returns an InvalidObjectState error. For information about restoring\n archived objects, see Restoring Archived Objects in\n the Amazon S3 User Guide.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.s3#InvalidRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

\n
    \n
  • \n

    Cannot specify both a write offset value and user-defined object metadata for existing objects.

    \n
  • \n
  • \n

    Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

    \n
  • \n
  • \n

    Request body cannot be empty when 'write offset' is specified.

    \n
  • \n
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.s3#InvalidWriteOffset": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

\n The write offset value that you specified does not match the current object size.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.s3#InventoryConfiguration": { + "type": "structure", + "members": { + "Destination": { + "target": "com.amazonaws.s3#InventoryDestination", + "traits": { + "smithy.api#documentation": "

Contains information about where to publish the inventory results.

", + "smithy.api#required": {} + } + }, + "IsEnabled": { + "target": "com.amazonaws.s3#IsEnabled", + "traits": { + "smithy.api#documentation": "

Specifies whether the inventory is enabled or disabled. If set to True, an\n inventory list is generated. If set to False, no inventory list is\n generated.

", + "smithy.api#required": {} + } + }, + "Filter": { + "target": "com.amazonaws.s3#InventoryFilter", + "traits": { + "smithy.api#documentation": "

Specifies an inventory filter. The inventory only includes objects that meet the\n filter's criteria.

" + } + }, + "Id": { + "target": "com.amazonaws.s3#InventoryId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", + "smithy.api#required": {} + } + }, + "IncludedObjectVersions": { + "target": "com.amazonaws.s3#InventoryIncludedObjectVersions", + "traits": { + "smithy.api#documentation": "

Object versions to include in the inventory list. If set to All, the list\n includes all the object versions, which adds the version-related fields\n VersionId, IsLatest, and DeleteMarker to the\n list. If set to Current, the list does not contain these version-related\n fields.

", + "smithy.api#required": {} + } + }, + "OptionalFields": { + "target": "com.amazonaws.s3#InventoryOptionalFields", + "traits": { + "smithy.api#documentation": "

Contains the optional fields that are included in the inventory results.

" + } + }, + "Schedule": { + "target": "com.amazonaws.s3#InventorySchedule", + "traits": { + "smithy.api#documentation": "

Specifies the schedule for generating inventory results.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the inventory configuration for an Amazon S3 bucket. For more information, see\n GET Bucket inventory in the Amazon S3 API Reference.

" + } + }, + "com.amazonaws.s3#InventoryConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#InventoryConfiguration" + } + }, + "com.amazonaws.s3#InventoryDestination": { + "type": "structure", + "members": { + "S3BucketDestination": { + "target": "com.amazonaws.s3#InventoryS3BucketDestination", + "traits": { + "smithy.api#documentation": "

Contains the bucket name, file format, bucket owner (optional), and prefix (optional)\n where inventory results are published.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the inventory configuration for an Amazon S3 bucket.

" + } + }, + "com.amazonaws.s3#InventoryEncryption": { + "type": "structure", + "members": { + "SSES3": { + "target": "com.amazonaws.s3#SSES3", + "traits": { + "smithy.api#documentation": "

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

", + "smithy.api#xmlName": "SSE-S3" + } + }, + "SSEKMS": { + "target": "com.amazonaws.s3#SSEKMS", + "traits": { + "smithy.api#documentation": "

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

", + "smithy.api#xmlName": "SSE-KMS" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the type of server-side encryption used to encrypt the inventory\n results.

" + } + }, + "com.amazonaws.s3#InventoryFilter": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix that an object must have to be included in the inventory results.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies an inventory filter. The inventory only includes objects that meet the\n filter's criteria.

" + } + }, + "com.amazonaws.s3#InventoryFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" + } + }, + "ORC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ORC" + } + }, + "Parquet": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Parquet" + } + } + } + }, + "com.amazonaws.s3#InventoryFrequency": { + "type": "enum", + "members": { + "Daily": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Daily" + } + }, + "Weekly": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Weekly" + } + } + } + }, + "com.amazonaws.s3#InventoryId": { + "type": "string" + }, + "com.amazonaws.s3#InventoryIncludedObjectVersions": { + "type": "enum", + "members": { + "All": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "All" + } + }, + "Current": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Current" + } + } + } + }, + "com.amazonaws.s3#InventoryOptionalField": { + "type": "enum", + "members": { + "Size": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Size" + } + }, + "LastModifiedDate": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LastModifiedDate" + } + }, + "StorageClass": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "StorageClass" + } + }, + "ETag": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ETag" + } + }, + "IsMultipartUploaded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IsMultipartUploaded" + } + }, + "ReplicationStatus": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReplicationStatus" + } + }, + "EncryptionStatus": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EncryptionStatus" + } + }, + "ObjectLockRetainUntilDate": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectLockRetainUntilDate" + } + }, + "ObjectLockMode": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectLockMode" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectLockLegalHoldStatus" + } + }, + "IntelligentTieringAccessTier": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IntelligentTieringAccessTier" + } + }, + "BucketKeyStatus": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BucketKeyStatus" + } + }, + "ChecksumAlgorithm": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ChecksumAlgorithm" + } + }, + "ObjectAccessControlList": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectAccessControlList" + } + }, + "ObjectOwner": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectOwner" + } + } + } + }, + "com.amazonaws.s3#InventoryOptionalFields": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#InventoryOptionalField", + "traits": { + "smithy.api#xmlName": "Field" + } + } + }, + "com.amazonaws.s3#InventoryS3BucketDestination": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID that owns the destination S3 bucket. If no account ID is provided, the\n owner is not validated before exporting data.

\n \n

Although this value is optional, we strongly recommend that you set it to help\n prevent problems if the destination bucket ownership changes.

\n
" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the bucket where inventory results will be\n published.

", + "smithy.api#required": {} + } + }, + "Format": { + "target": "com.amazonaws.s3#InventoryFormat", + "traits": { + "smithy.api#documentation": "

Specifies the output format of the inventory results.

", + "smithy.api#required": {} + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix that is prepended to all inventory results.

" + } + }, + "Encryption": { + "target": "com.amazonaws.s3#InventoryEncryption", + "traits": { + "smithy.api#documentation": "

Contains the type of server-side encryption used to encrypt the inventory\n results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the bucket name, file format, bucket owner (optional), and prefix (optional)\n where inventory results are published.

" + } + }, + "com.amazonaws.s3#InventorySchedule": { + "type": "structure", + "members": { + "Frequency": { + "target": "com.amazonaws.s3#InventoryFrequency", + "traits": { + "smithy.api#documentation": "

Specifies how frequently inventory results are produced.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the schedule for generating inventory results.

" + } + }, + "com.amazonaws.s3#IsEnabled": { + "type": "boolean" + }, + "com.amazonaws.s3#IsLatest": { + "type": "boolean" + }, + "com.amazonaws.s3#IsPublic": { + "type": "boolean" + }, + "com.amazonaws.s3#IsRestoreInProgress": { + "type": "boolean" + }, + "com.amazonaws.s3#IsTruncated": { + "type": "boolean" + }, + "com.amazonaws.s3#JSONInput": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.s3#JSONType", + "traits": { + "smithy.api#documentation": "

The type of JSON. Valid values: Document, Lines.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies JSON as object's input serialization format.

" + } + }, + "com.amazonaws.s3#JSONOutput": { + "type": "structure", + "members": { + "RecordDelimiter": { + "target": "com.amazonaws.s3#RecordDelimiter", + "traits": { + "smithy.api#documentation": "

The value used to separate individual records in the output. If no value is specified,\n Amazon S3 uses a newline character ('\\n').

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies JSON as request's output serialization format.

" + } + }, + "com.amazonaws.s3#JSONType": { + "type": "enum", + "members": { + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOCUMENT" + } + }, + "LINES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINES" + } + } + } + }, + "com.amazonaws.s3#KMSContext": { + "type": "string" + }, + "com.amazonaws.s3#KeyCount": { + "type": "integer" + }, + "com.amazonaws.s3#KeyMarker": { + "type": "string" + }, + "com.amazonaws.s3#KeyPrefixEquals": { + "type": "string" + }, + "com.amazonaws.s3#LambdaFunctionArn": { + "type": "string" + }, + "com.amazonaws.s3#LambdaFunctionConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#NotificationId" + }, + "LambdaFunctionArn": { + "target": "com.amazonaws.s3#LambdaFunctionArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the\n specified event type occurs.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "CloudFunction" + } + }, + "Events": { + "target": "com.amazonaws.s3#EventList", + "traits": { + "smithy.api#documentation": "

The Amazon S3 bucket event for which to invoke the Lambda function. For more information,\n see Supported\n Event Types in the Amazon S3 User Guide.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Event" + } + }, + "Filter": { + "target": "com.amazonaws.s3#NotificationConfigurationFilter" + } + }, + "traits": { + "smithy.api#documentation": "

A container for specifying the configuration for Lambda notifications.

" + } + }, + "com.amazonaws.s3#LambdaFunctionConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#LambdaFunctionConfiguration" + } + }, + "com.amazonaws.s3#LastModified": { + "type": "timestamp" + }, + "com.amazonaws.s3#LastModifiedTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "com.amazonaws.s3#LifecycleExpiration": { + "type": "structure", + "members": { + "Date": { + "target": "com.amazonaws.s3#Date", + "traits": { + "smithy.api#documentation": "

Indicates at what date the object is to be moved or deleted. The date value must conform\n to the ISO 8601 format. The time is always midnight UTC.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + }, + "Days": { + "target": "com.amazonaws.s3#Days", + "traits": { + "smithy.api#documentation": "

Indicates the lifetime, in days, of the objects that are subject to the rule. The value\n must be a non-zero positive integer.

" + } + }, + "ExpiredObjectDeleteMarker": { + "target": "com.amazonaws.s3#ExpiredObjectDeleteMarker", + "traits": { + "smithy.api#documentation": "

Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set\n to true, the delete marker will be expired; if set to false the policy takes no action.\n This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the expiration for the lifecycle of the object.

\n

For more information see, Managing your storage\n lifecycle in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#LifecycleRule": { + "type": "structure", + "members": { + "Expiration": { + "target": "com.amazonaws.s3#LifecycleExpiration", + "traits": { + "smithy.api#documentation": "

Specifies the expiration for the lifecycle of the object in the form of date, days and,\n whether the object has a delete marker.

" + } + }, + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

Unique identifier for the rule. The value cannot be longer than 255 characters.

" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#deprecated": {}, + "smithy.api#documentation": "

Prefix identifying one or more objects to which the rule applies. This is\n no longer used; use Filter instead.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "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,\n ObjectSizeGreaterThan, ObjectSizeLessThan, or And specified. Filter is required if the\n LifecycleRule does not contain a Prefix element.

\n \n

\n Tag filters are not supported for directory buckets.

\n
" + } + }, + "Status": { + "target": "com.amazonaws.s3#ExpirationStatus", + "traits": { + "smithy.api#documentation": "

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not\n currently being applied.

", + "smithy.api#required": {} + } + }, + "Transitions": { + "target": "com.amazonaws.s3#TransitionList", + "traits": { + "smithy.api#documentation": "

Specifies when an Amazon S3 object transitions to a specified storage class.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Transition" + } + }, + "NoncurrentVersionTransitions": { + "target": "com.amazonaws.s3#NoncurrentVersionTransitionList", + "traits": { + "smithy.api#documentation": "

Specifies the transition rule for the lifecycle rule that describes when noncurrent\n objects transition to a specific storage class. If your bucket is versioning-enabled (or\n versioning is suspended), you can set this action to request that Amazon S3 transition\n noncurrent object versions to a specific storage class at a set period in the object's\n lifetime.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "NoncurrentVersionTransition" + } + }, + "NoncurrentVersionExpiration": { + "target": "com.amazonaws.s3#NoncurrentVersionExpiration" + }, + "AbortIncompleteMultipartUpload": { + "target": "com.amazonaws.s3#AbortIncompleteMultipartUpload" + } + }, + "traits": { + "smithy.api#documentation": "

A lifecycle rule for individual objects in an Amazon S3 bucket.

\n

For more information see, Managing your storage\n lifecycle in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#LifecycleRuleAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Prefix identifying one or more objects to which the rule applies.

" + } + }, + "Tags": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

All of these tags must exist in the object's tag set in order for the rule to\n apply.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + }, + "ObjectSizeGreaterThan": { + "target": "com.amazonaws.s3#ObjectSizeGreaterThanBytes", + "traits": { + "smithy.api#documentation": "

Minimum object size to which the rule applies.

" + } + }, + "ObjectSizeLessThan": { + "target": "com.amazonaws.s3#ObjectSizeLessThanBytes", + "traits": { + "smithy.api#documentation": "

Maximum object size to which the rule applies.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This is used in a Lifecycle Rule Filter to apply a logical AND to two or more\n predicates. The Lifecycle Rule will apply to any object matching all of the predicates\n configured inside the And operator.

" + } + }, + "com.amazonaws.s3#LifecycleRuleFilter": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Prefix identifying one or more objects to which the rule applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "Tag": { + "target": "com.amazonaws.s3#Tag", + "traits": { + "smithy.api#documentation": "

This tag must exist in the object's tag set in order for the rule to apply.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + }, + "ObjectSizeGreaterThan": { + "target": "com.amazonaws.s3#ObjectSizeGreaterThanBytes", + "traits": { + "smithy.api#documentation": "

Minimum object size to which the rule applies.

" + } + }, + "ObjectSizeLessThan": { + "target": "com.amazonaws.s3#ObjectSizeLessThanBytes", + "traits": { + "smithy.api#documentation": "

Maximum object size to which the rule applies.

" + } + }, + "And": { + "target": "com.amazonaws.s3#LifecycleRuleAndOperator" + } + }, + "traits": { + "smithy.api#documentation": "

The Filter is used to identify objects that a Lifecycle Rule applies to. A\n Filter can have exactly one of Prefix, Tag,\n ObjectSizeGreaterThan, ObjectSizeLessThan, or And\n specified. If the Filter element is left empty, the Lifecycle Rule applies to\n all objects in the bucket.

" + } + }, + "com.amazonaws.s3#LifecycleRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#LifecycleRule" + } + }, + "com.amazonaws.s3#ListBucketAnalyticsConfigurations": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurationsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketAnalyticsConfigurationsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the analytics configurations for the bucket. You can have up to 1,000 analytics\n configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. You should always check the IsTruncated element in the response. If\n there are no more configurations to list, IsTruncated is set to false. If\n there are more configurations to list, IsTruncated is set to true, and there\n will be a value in NextContinuationToken. You use the\n NextContinuationToken value to continue the pagination of the list by\n passing the value in continuation-token in the request to GET the next\n page.

\n

To use this operation, you must have permissions to perform the\n s3:GetAnalyticsConfiguration 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

For information about Amazon S3 analytics feature, see Amazon S3 Analytics \u2013 Storage Class\n Analysis.

\n

The following operations are related to\n ListBucketAnalyticsConfigurations:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#ListBucketAnalyticsConfigurationsOutput": { + "type": "structure", + "members": { + "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.

" + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The marker that is used as a starting point for this analytics configuration list\n response. This value is present if it was sent in the request.

" + } + }, + "NextContinuationToken": { + "target": "com.amazonaws.s3#NextToken", + "traits": { + "smithy.api#documentation": "

\n NextContinuationToken is sent when isTruncated is true, which\n indicates that there are more analytics configurations to list. The next request must\n include this NextContinuationToken. The token is obfuscated and is not a\n usable value.

" + } + }, + "AnalyticsConfigurationList": { + "target": "com.amazonaws.s3#AnalyticsConfigurationList", + "traits": { + "smithy.api#documentation": "

The list of analytics configurations for a bucket.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AnalyticsConfiguration" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListBucketAnalyticsConfigurationResult" + } + }, + "com.amazonaws.s3#ListBucketAnalyticsConfigurationsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket from which analytics configurations are retrieved.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request\n should begin.

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListBucketIntelligentTieringConfigurations": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the S3 Intelligent-Tiering configuration from the specified bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to ListBucketIntelligentTieringConfigurations include:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsOutput": { + "type": "structure", + "members": { + "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\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\n should begin.

" + } + }, + "NextContinuationToken": { + "target": "com.amazonaws.s3#NextToken", + "traits": { + "smithy.api#documentation": "

The marker used to continue this inventory configuration listing. Use the\n NextContinuationToken from this response to continue the listing in a\n subsequent request. The continuation token is an opaque value that Amazon S3 understands.

" + } + }, + "IntelligentTieringConfigurationList": { + "target": "com.amazonaws.s3#IntelligentTieringConfigurationList", + "traits": { + "smithy.api#documentation": "

The list of S3 Intelligent-Tiering configurations for a bucket.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "IntelligentTieringConfiguration" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#ListBucketIntelligentTieringConfigurationsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request\n should begin.

", + "smithy.api#httpQuery": "continuation-token" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListBucketInventoryConfigurations": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketInventoryConfigurationsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketInventoryConfigurationsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns a list of inventory configurations for the bucket. You can have up to 1,000\n analytics configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated element in the response. If there are no\n more configurations to list, IsTruncated is set to false. If there are more\n configurations to list, IsTruncated is set to true, and there is a value in\n NextContinuationToken. You use the NextContinuationToken value\n to continue the pagination of the list by passing the value in continuation-token in the\n request to GET the next page.

\n

To use this operation, you must have permissions to perform the\n s3:GetInventoryConfiguration 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

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory\n

\n

The following operations are related to\n ListBucketInventoryConfigurations:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#ListBucketInventoryConfigurationsOutput": { + "type": "structure", + "members": { + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

If sent in the request, the marker that is used as a starting point for this inventory\n configuration list response.

" + } + }, + "InventoryConfigurationList": { + "target": "com.amazonaws.s3#InventoryConfigurationList", + "traits": { + "smithy.api#documentation": "

The list of inventory configurations for a bucket.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "InventoryConfiguration" + } + }, + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

Tells whether the returned list of inventory configurations is complete. A value of true\n indicates that the list is not complete and the NextContinuationToken is provided for a\n subsequent request.

" + } + }, + "NextContinuationToken": { + "target": "com.amazonaws.s3#NextToken", + "traits": { + "smithy.api#documentation": "

The marker used to continue this inventory configuration listing. Use the\n NextContinuationToken from this response to continue the listing in a\n subsequent request. The continuation token is an opaque value that Amazon S3 understands.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListInventoryConfigurationsResult" + } + }, + "com.amazonaws.s3#ListBucketInventoryConfigurationsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the inventory configurations to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The marker used to continue an inventory configuration listing that has been truncated.\n Use the NextContinuationToken from a previously truncated list response to\n continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListBucketMetricsConfigurations": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketMetricsConfigurationsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketMetricsConfigurationsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Lists the metrics configurations for the bucket. The metrics configurations are only for\n the request metrics of the bucket and do not provide information on daily storage metrics.\n You can have up to 1,000 configurations per bucket.

\n

This action supports list pagination and does not return more than 100 configurations at\n a time. Always check the IsTruncated element in the response. If there are no\n more configurations to list, IsTruncated is set to false. If there are more\n configurations to list, IsTruncated is set to true, and there is a value in\n NextContinuationToken. You use the NextContinuationToken value\n to continue the pagination of the list by passing the value in\n continuation-token in the request to GET the next page.

\n

To use this operation, you must have permissions to perform the\n s3:GetMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For more information about metrics configurations and CloudWatch request metrics, see\n Monitoring Metrics with Amazon CloudWatch.

\n

The following operations are related to\n ListBucketMetricsConfigurations:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", + "code": 200 + } + } + }, + "com.amazonaws.s3#ListBucketMetricsConfigurationsOutput": { + "type": "structure", + "members": { + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

Indicates whether the returned list of metrics 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.

" + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The marker that is used as a starting point for this metrics configuration list\n response. This value is present if it was sent in the request.

" + } + }, + "NextContinuationToken": { + "target": "com.amazonaws.s3#NextToken", + "traits": { + "smithy.api#documentation": "

The marker used to continue a metrics configuration listing that has been truncated. Use\n the NextContinuationToken from a previously truncated list response to\n continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

" + } + }, + "MetricsConfigurationList": { + "target": "com.amazonaws.s3#MetricsConfigurationList", + "traits": { + "smithy.api#documentation": "

The list of metrics configurations for a bucket.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MetricsConfiguration" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListMetricsConfigurationsResult" + } + }, + "com.amazonaws.s3#ListBucketMetricsConfigurationsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the metrics configurations to retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

The marker that is used to continue a metrics configuration listing that has been\n truncated. Use the NextContinuationToken from a previously truncated list\n response to continue the listing. The continuation token is an opaque value that Amazon S3\n understands.

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListBuckets": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListBucketsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListBucketsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns a list of all buckets owned by the authenticated sender of the request. To grant IAM permission to use\n this operation, you must add the s3:ListAllMyBuckets policy action.

\n

For information about Amazon S3 buckets, see Creating, configuring, and\n working with Amazon S3 buckets.

\n \n

We strongly recommend using only paginated ListBuckets requests. Unpaginated ListBuckets requests are only supported for \n Amazon Web Services accounts set to the default general purpose bucket quota of 10,000. If you have an approved \n general purpose bucket quota above 10,000, you must send paginated ListBuckets requests to list your account\u2019s buckets. \n All unpaginated ListBuckets requests will be rejected for Amazon Web Services accounts with a general purpose bucket quota \n greater than 10,000.

\n
", + "smithy.api#examples": [ + { + "title": "To list all buckets", + "documentation": "The following example returns all the buckets owned by the sender of this request.", + "output": { + "Owner": { + "DisplayName": "own-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31" + }, + "Buckets": [ + { + "CreationDate": "2012-02-15T21:03:02.000Z", + "Name": "examplebucket" }, - "Destination": { - "target": "com.amazonaws.s3#AnalyticsExportDestination", - "traits": { - "smithy.api#documentation": "

The place to store the data for an analysis.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Container for data related to the storage class analysis for an Amazon S3 bucket for\n export.

" - } - }, - "com.amazonaws.s3#StorageClassAnalysisSchemaVersion": { - "type": "enum", - "members": { - "V_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "V_1" - } - } - } - }, - "com.amazonaws.s3#StreamingBlob": { - "type": "blob", - "traits": { - "smithy.api#streaming": {} - } - }, - "com.amazonaws.s3#Suffix": { - "type": "string" - }, - "com.amazonaws.s3#Tag": { - "type": "structure", - "members": { - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Name of the object key.

", - "smithy.api#required": {} - } + { + "CreationDate": "2011-07-24T19:33:50.000Z", + "Name": "examplebucket2" }, - "Value": { - "target": "com.amazonaws.s3#Value", - "traits": { - "smithy.api#documentation": "

Value of the tag.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

A container of a key value name pair.

" - } - }, - "com.amazonaws.s3#TagCount": { - "type": "integer" - }, - "com.amazonaws.s3#TagSet": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Tag", - "traits": { - "smithy.api#xmlName": "Tag" - } - } - }, - "com.amazonaws.s3#Tagging": { - "type": "structure", - "members": { - "TagSet": { - "target": "com.amazonaws.s3#TagSet", - "traits": { - "smithy.api#documentation": "

A collection for a set of tags

", - "smithy.api#required": {} - } - } + { + "CreationDate": "2010-12-17T00:56:49.000Z", + "Name": "examplebucket3" + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/?x-id=ListBuckets", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "ContinuationToken", + "outputToken": "ContinuationToken", + "items": "Buckets", + "pageSize": "MaxBuckets" + } + } + }, + "com.amazonaws.s3#ListBucketsOutput": { + "type": "structure", + "members": { + "Buckets": { + "target": "com.amazonaws.s3#Buckets", + "traits": { + "smithy.api#documentation": "

The list of buckets owned by the requester.

" + } + }, + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

The owner of the buckets listed.

" + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#NextToken", + "traits": { + "smithy.api#documentation": "

\n ContinuationToken is included in the response when there are more buckets\n that can be listed with pagination. The next ListBuckets request to Amazon S3 can\n be continued with this ContinuationToken. ContinuationToken is\n obfuscated and is not a real bucket.

" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

If Prefix was sent with the request, it is included in the response.

\n

All bucket names in the response begin with the specified bucket name prefix.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListAllMyBucketsResult" + } + }, + "com.amazonaws.s3#ListBucketsRequest": { + "type": "structure", + "members": { + "MaxBuckets": { + "target": "com.amazonaws.s3#MaxBuckets", + "traits": { + "smithy.api#documentation": "

Maximum number of buckets to be returned in response. When the number is more than the\n count of buckets that are owned by an Amazon Web Services account, return all the buckets in\n response.

", + "smithy.api#httpQuery": "max-buckets" + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken is obfuscated and is not a real\n key. You can use this ContinuationToken for pagination of the list results.

\n

Length Constraints: Minimum length of 0. Maximum length of 1024.

\n

Required: No.

\n \n

If you specify the bucket-region, prefix, or continuation-token \n query parameters without using max-buckets to set the maximum number of buckets returned in the response, \n Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

\n
", + "smithy.api#httpQuery": "continuation-token" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Limits the response to bucket names that begin with the specified bucket name\n prefix.

", + "smithy.api#httpQuery": "prefix" + } + }, + "BucketRegion": { + "target": "com.amazonaws.s3#BucketRegion", + "traits": { + "smithy.api#documentation": "

Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services\n Region must be expressed according to the Amazon Web Services Region code, such as us-west-2\n for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services\n Regions, see Regions and Endpoints.

\n \n

Requests made to a Regional endpoint that is different from the\n bucket-region parameter are not supported. For example, if you want to\n limit the response to your buckets in Region us-west-2, the request must be\n made to an endpoint in Region us-west-2.

\n
", + "smithy.api#httpQuery": "bucket-region" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListDirectoryBuckets": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListDirectoryBucketsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListDirectoryBucketsOutput" + }, + "traits": { + "smithy.api#documentation": "

Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the\n request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

You must have the s3express:ListAllMyDirectoryBuckets permission\n in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n
\n
\n \n

The BucketRegion response element is not part of the\n ListDirectoryBuckets Response Syntax.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/?x-id=ListDirectoryBuckets", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "ContinuationToken", + "outputToken": "ContinuationToken", + "items": "Buckets", + "pageSize": "MaxDirectoryBuckets" + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#ListDirectoryBucketsOutput": { + "type": "structure", + "members": { + "Buckets": { + "target": "com.amazonaws.s3#Buckets", + "traits": { + "smithy.api#documentation": "

The list of buckets owned by the requester.

" + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#DirectoryBucketToken", + "traits": { + "smithy.api#documentation": "

If ContinuationToken was sent with the request, it is included in the\n response. You can use the returned ContinuationToken for pagination of the\n list response.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListAllMyDirectoryBucketsResult" + } + }, + "com.amazonaws.s3#ListDirectoryBucketsRequest": { + "type": "structure", + "members": { + "ContinuationToken": { + "target": "com.amazonaws.s3#DirectoryBucketToken", + "traits": { + "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n buckets in this account with a token. ContinuationToken is obfuscated and is\n not a real bucket name. You can use this ContinuationToken for the pagination\n of the list results.

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "MaxDirectoryBuckets": { + "target": "com.amazonaws.s3#MaxDirectoryBuckets", + "traits": { + "smithy.api#documentation": "

Maximum number of buckets to be returned in response. When the number is more than the\n count of buckets that are owned by an Amazon Web Services account, return all the buckets in\n response.

", + "smithy.api#httpQuery": "max-directory-buckets" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListMultipartUploads": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListMultipartUploadsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListMultipartUploadsOutput" + }, + "traits": { + "smithy.api#documentation": "

This operation lists in-progress multipart uploads in a bucket. An in-progress multipart\n upload is a multipart upload that has been initiated by the\n CreateMultipartUpload request, but has not yet been completed or\n aborted.

\n \n

\n Directory buckets - If multipart uploads in\n a directory bucket are in progress, you can't delete the bucket until all the\n in-progress multipart uploads are aborted or completed. To delete these in-progress\n multipart uploads, use the ListMultipartUploads operation to list the\n in-progress multipart uploads in the bucket and use the\n AbortMultipartUpload operation to abort all the in-progress multipart\n uploads.

\n
\n

The ListMultipartUploads operation returns a maximum of 1,000 multipart\n uploads in the response. The limit of 1,000 multipart uploads is also the default value.\n You can further limit the number of uploads in a response by specifying the\n max-uploads request parameter. If there are more than 1,000 multipart\n uploads that satisfy your ListMultipartUploads request, the response returns\n an IsTruncated element with the value of true, a\n NextKeyMarker element, and a NextUploadIdMarker element. To\n list the remaining multipart uploads, you need to make subsequent\n ListMultipartUploads requests. In these requests, include two query\n parameters: key-marker and upload-id-marker. Set the value of\n key-marker to the NextKeyMarker value from the previous\n response. Similarly, set the value of upload-id-marker to the\n NextUploadIdMarker value from the previous response.

\n \n

\n Directory buckets - The\n upload-id-marker element and the NextUploadIdMarker element\n aren't supported by directory buckets. To list the additional multipart uploads, you\n only need to set the value of key-marker to the NextKeyMarker\n value from the previous response.

\n
\n

For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n 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

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Sorting of multipart uploads in response
\n
\n
    \n
  • \n

    \n General purpose bucket - In the\n ListMultipartUploads response, the multipart uploads are\n sorted based on two criteria:

    \n
      \n
    • \n

      Key-based sorting - Multipart uploads are initially sorted\n in ascending order based on their object keys.

      \n
    • \n
    • \n

      Time-based sorting - For uploads that share the same object\n key, they are further sorted in ascending order based on the upload\n initiation time. Among uploads with the same key, the one that was\n initiated first will appear before the ones that were initiated\n later.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket - In the\n ListMultipartUploads response, the multipart uploads aren't\n sorted lexicographically based on the object keys.\n \n

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to ListMultipartUploads:

\n ", + "smithy.api#examples": [ + { + "title": "List next set of multipart uploads when previous result is truncated", + "documentation": "The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads.", + "input": { + "Bucket": "examplebucket", + "KeyMarker": "nextkeyfrompreviousresponse", + "MaxUploads": 2, + "UploadIdMarker": "valuefrompreviousresponse" }, - "traits": { - "smithy.api#documentation": "

Container for TagSet elements.

" - } - }, - "com.amazonaws.s3#TaggingDirective": { - "type": "enum", - "members": { - "COPY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COPY" - } - }, - "REPLACE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "REPLACE" - } - } - } - }, - "com.amazonaws.s3#TaggingHeader": { - "type": "string" - }, - "com.amazonaws.s3#TargetBucket": { - "type": "string" - }, - "com.amazonaws.s3#TargetGrant": { - "type": "structure", - "members": { - "Grantee": { - "target": "com.amazonaws.s3#Grantee", - "traits": { - "smithy.api#documentation": "

Container for the person being granted permissions.

", - "smithy.api#xmlNamespace": { - "uri": "http://www.w3.org/2001/XMLSchema-instance", - "prefix": "xsi" - } - } + "output": { + "UploadIdMarker": "", + "NextKeyMarker": "someobjectkey", + "Bucket": "acl1", + "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", + "Uploads": [ + { + "Initiator": { + "DisplayName": "ownder-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiated": "2014-05-01T05:40:58.000Z", + "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--", + "StorageClass": "STANDARD", + "Key": "JavaFile", + "Owner": { + "DisplayName": "mohanataws", + "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + } }, - "Permission": { - "target": "com.amazonaws.s3#BucketLogsPermission", - "traits": { - "smithy.api#documentation": "

Logging permissions assigned to the grantee for the bucket.

" - } - } + { + "Initiator": { + "DisplayName": "ownder-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiated": "2014-05-01T05:41:27.000Z", + "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", + "StorageClass": "STANDARD", + "Key": "JavaFile", + "Owner": { + "DisplayName": "ownder-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + } + } + ], + "KeyMarker": "", + "MaxUploads": 2, + "IsTruncated": true + } + }, + { + "title": "To list in-progress multipart uploads on a bucket", + "documentation": "The following example lists in-progress multipart uploads on a specific bucket.", + "input": { + "Bucket": "examplebucket" }, - "traits": { - "smithy.api#documentation": "

Container for granting information.

\n

Buckets that use the bucket owner enforced setting for Object Ownership don't support\n target grants. For more information, see Permissions server access log delivery in the\n Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#TargetGrants": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#TargetGrant", - "traits": { - "smithy.api#xmlName": "Grant" - } - } - }, - "com.amazonaws.s3#TargetObjectKeyFormat": { - "type": "structure", - "members": { - "SimplePrefix": { - "target": "com.amazonaws.s3#SimplePrefix", - "traits": { - "smithy.api#documentation": "

To use the simple format for S3 keys for log objects. To specify SimplePrefix format,\n set SimplePrefix to {}.

", - "smithy.api#xmlName": "SimplePrefix" - } + "output": { + "Uploads": [ + { + "Initiator": { + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiated": "2014-05-01T05:40:58.000Z", + "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--", + "StorageClass": "STANDARD", + "Key": "JavaFile", + "Owner": { + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + } }, - "PartitionedPrefix": { - "target": "com.amazonaws.s3#PartitionedPrefix", - "traits": { - "smithy.api#documentation": "

Partitioned S3 key for log objects.

", - "smithy.api#xmlName": "PartitionedPrefix" - } - } + { + "Initiator": { + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiated": "2014-05-01T05:41:27.000Z", + "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", + "StorageClass": "STANDARD", + "Key": "JavaFile", + "Owner": { + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + } + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?uploads", + "code": 200 + } + } + }, + "com.amazonaws.s3#ListMultipartUploadsOutput": { + "type": "structure", + "members": { + "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\n access point ARN or access point alias if used.

" + } + }, + "KeyMarker": { + "target": "com.amazonaws.s3#KeyMarker", + "traits": { + "smithy.api#documentation": "

The key at or after which the listing began.

" + } + }, + "UploadIdMarker": { + "target": "com.amazonaws.s3#UploadIdMarker", + "traits": { + "smithy.api#documentation": "

Together with key-marker, specifies the multipart upload after which listing should\n begin. If key-marker is not specified, the upload-id-marker parameter is ignored.\n Otherwise, any multipart uploads for a key equal to the key-marker might be included in the\n list only if they have an upload ID lexicographically greater than the specified\n upload-id-marker.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "NextKeyMarker": { + "target": "com.amazonaws.s3#NextKeyMarker", + "traits": { + "smithy.api#documentation": "

When a list is truncated, this element specifies the value that should be used for the\n key-marker request parameter in a subsequent request.

" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

When a prefix is provided in the request, this field contains the specified prefix. The\n result contains only keys starting with the specified prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
" + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

Contains the delimiter you specified in the request. If you don't specify a delimiter in\n your request, this element is absent from the response.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

\n
" + } + }, + "NextUploadIdMarker": { + "target": "com.amazonaws.s3#NextUploadIdMarker", + "traits": { + "smithy.api#documentation": "

When a list is truncated, this element specifies the value that should be used for the\n upload-id-marker request parameter in a subsequent request.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "MaxUploads": { + "target": "com.amazonaws.s3#MaxUploads", + "traits": { + "smithy.api#documentation": "

Maximum number of multipart uploads that could have been included in the\n response.

" + } + }, + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

Indicates whether the returned list of multipart uploads is truncated. A value of true\n indicates that the list was truncated. The list can be truncated if the number of multipart\n uploads exceeds the limit allowed or specified by max uploads.

" + } + }, + "Uploads": { + "target": "com.amazonaws.s3#MultipartUploadList", + "traits": { + "smithy.api#documentation": "

Container for elements related to a particular multipart upload. A response can contain\n zero or more Upload elements.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Upload" + } + }, + "CommonPrefixes": { + "target": "com.amazonaws.s3#CommonPrefixList", + "traits": { + "smithy.api#documentation": "

If you specify a delimiter in the request, then the result returns each distinct key\n prefix containing the delimiter in a CommonPrefixes element. The distinct key\n prefixes are returned in the Prefix child element.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", + "smithy.api#xmlFlattened": {} + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode object keys in the response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n Delimiter, KeyMarker, Prefix,\n NextKeyMarker, Key.

" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListMultipartUploadsResult" + } + }, + "com.amazonaws.s3#ListMultipartUploadsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

Character you use to group keys.

\n

All keys that contain the same string between the prefix, if specified, and the first\n occurrence of the delimiter after the prefix are grouped under a single result element,\n CommonPrefixes. If you don't specify the prefix parameter, then the\n substring starts at the beginning of the key. The keys that are grouped under\n CommonPrefixes result element are not returned elsewhere in the\n response.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

\n
", + "smithy.api#httpQuery": "delimiter" + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#httpQuery": "encoding-type" + } + }, + "KeyMarker": { + "target": "com.amazonaws.s3#KeyMarker", + "traits": { + "smithy.api#documentation": "

Specifies the multipart upload after which listing should begin.

\n \n
    \n
  • \n

    \n General purpose buckets - For\n general purpose buckets, key-marker is an object key. Together with\n upload-id-marker, this parameter specifies the multipart upload\n after which listing should begin.

    \n

    If upload-id-marker is not specified, only the keys\n lexicographically greater than the specified key-marker will be\n included in the list.

    \n

    If upload-id-marker is specified, any multipart uploads for a key\n equal to the key-marker might also be included, provided those\n multipart uploads have upload IDs lexicographically greater than the specified\n upload-id-marker.

    \n
  • \n
  • \n

    \n Directory buckets - For\n directory buckets, key-marker is obfuscated and isn't a real object\n key. The upload-id-marker parameter isn't supported by\n directory buckets. To list the additional multipart uploads, you only need to set\n the value of key-marker to the NextKeyMarker value from\n the previous response.

    \n

    In the ListMultipartUploads response, the multipart uploads aren't\n sorted lexicographically based on the object keys.\n \n

    \n
  • \n
\n
", + "smithy.api#httpQuery": "key-marker" + } + }, + "MaxUploads": { + "target": "com.amazonaws.s3#MaxUploads", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response\n body. 1,000 is the maximum number of uploads that can be returned in a response.

", + "smithy.api#httpQuery": "max-uploads" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Lists in-progress uploads only for those keys that begin with the specified prefix. You\n can use prefixes to separate a bucket into different grouping of keys. (You can think of\n using prefix to make groups in the same way that you'd use a folder in a file\n system.)

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", + "smithy.api#httpQuery": "prefix", + "smithy.rules#contextParam": { + "name": "Prefix" + } + } + }, + "UploadIdMarker": { + "target": "com.amazonaws.s3#UploadIdMarker", + "traits": { + "smithy.api#documentation": "

Together with key-marker, specifies the multipart upload after which listing should\n begin. If key-marker is not specified, the upload-id-marker parameter is ignored.\n Otherwise, any multipart uploads for a key equal to the key-marker might be included in the\n list only if they have an upload ID lexicographically greater than the specified\n upload-id-marker.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpQuery": "upload-id-marker" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListObjectVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListObjectVersionsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListObjectVersionsOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns metadata about all versions of the objects in a bucket. You can also use request\n parameters as selection criteria to return metadata about a subset of all the object\n versions.

\n \n

To use this operation, you must have permission to perform the\n s3:ListBucketVersions action. Be aware of the name difference.

\n
\n \n

A 200 OK response can contain valid or invalid XML. Make sure to design\n your application to parse the contents of the response and handle it\n appropriately.

\n
\n

To use this operation, you must have READ access to the bucket.

\n

The following operations are related to ListObjectVersions:

\n ", + "smithy.api#examples": [ + { + "title": "To list object versions", + "documentation": "The following example returns versions of an object with specific key name prefix.", + "input": { + "Bucket": "examplebucket", + "Prefix": "HappyFace.jpg" }, - "traits": { - "smithy.api#documentation": "

Amazon S3 key format for log objects. Only one format, PartitionedPrefix or\n SimplePrefix, is allowed.

" - } - }, - "com.amazonaws.s3#TargetPrefix": { - "type": "string" - }, - "com.amazonaws.s3#Tier": { - "type": "enum", - "members": { - "Standard": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Standard" - } - }, - "Bulk": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Bulk" - } - }, - "Expedited": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Expedited" - } - } - } - }, - "com.amazonaws.s3#Tiering": { - "type": "structure", - "members": { - "Days": { - "target": "com.amazonaws.s3#IntelligentTieringDays", - "traits": { - "smithy.api#documentation": "

The number of consecutive days of no access after which an object will be eligible to be\n transitioned to the corresponding tier. The minimum number of days specified for\n Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least\n 180 days. The maximum can be up to 2 years (730 days).

", - "smithy.api#required": {} - } + "output": { + "Versions": [ + { + "LastModified": "2016-12-15T01:19:41.000Z", + "VersionId": "null", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "StorageClass": "STANDARD", + "Key": "HappyFace.jpg", + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "IsLatest": true, + "Size": 3191 }, - "AccessTier": { - "target": "com.amazonaws.s3#IntelligentTieringAccessTier", - "traits": { - "smithy.api#documentation": "

S3 Intelligent-Tiering access tier. See Storage class\n for automatically optimizing frequently and infrequently accessed objects for a\n list of access tiers in the S3 Intelligent-Tiering storage class.

", - "smithy.api#required": {} - } - } + { + "LastModified": "2016-12-13T00:58:26.000Z", + "VersionId": "PHtexPGjH2y.zBgT8LmB7wwLI2mpbz.k", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "StorageClass": "STANDARD", + "Key": "HappyFace.jpg", + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "IsLatest": false, + "Size": 3191 + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?versions", + "code": 200 + } + } + }, + "com.amazonaws.s3#ListObjectVersionsOutput": { + "type": "structure", + "members": { + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search\n criteria. If your results were truncated, you can make a follow-up paginated request by\n using the NextKeyMarker and NextVersionIdMarker response\n parameters as a starting place in another request to return the rest of the results.

" + } + }, + "KeyMarker": { + "target": "com.amazonaws.s3#KeyMarker", + "traits": { + "smithy.api#documentation": "

Marks the last key returned in a truncated response.

" + } + }, + "VersionIdMarker": { + "target": "com.amazonaws.s3#VersionIdMarker", + "traits": { + "smithy.api#documentation": "

Marks the last version of the key returned in a truncated response.

" + } + }, + "NextKeyMarker": { + "target": "com.amazonaws.s3#NextKeyMarker", + "traits": { + "smithy.api#documentation": "

When the number of responses exceeds the value of MaxKeys,\n NextKeyMarker specifies the first key not returned that satisfies the\n search criteria. Use this value for the key-marker request parameter in a subsequent\n request.

" + } + }, + "NextVersionIdMarker": { + "target": "com.amazonaws.s3#NextVersionIdMarker", + "traits": { + "smithy.api#documentation": "

When the number of responses exceeds the value of MaxKeys,\n NextVersionIdMarker specifies the first object version not returned that\n satisfies the search criteria. Use this value for the version-id-marker\n request parameter in a subsequent request.

" + } + }, + "Versions": { + "target": "com.amazonaws.s3#ObjectVersionList", + "traits": { + "smithy.api#documentation": "

Container for version information.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Version" + } + }, + "DeleteMarkers": { + "target": "com.amazonaws.s3#DeleteMarkers", + "traits": { + "smithy.api#documentation": "

Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "DeleteMarker" + } + }, + "Name": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Selects objects that start with the value supplied by this parameter.

" + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

The delimiter grouping the included keys. A delimiter is a character that you specify to\n group keys. All keys that contain the same string between the prefix and the first\n occurrence of the delimiter are grouped under a single result element in\n CommonPrefixes. These groups are counted as one result against the\n max-keys limitation. These keys are not returned elsewhere in the\n response.

" + } + }, + "MaxKeys": { + "target": "com.amazonaws.s3#MaxKeys", + "traits": { + "smithy.api#documentation": "

Specifies the maximum number of objects to return.

" + } + }, + "CommonPrefixes": { + "target": "com.amazonaws.s3#CommonPrefixList", + "traits": { + "smithy.api#documentation": "

All of the keys rolled up into a common prefix count as a single return when calculating\n the number of returns.

", + "smithy.api#xmlFlattened": {} + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode object key names in the XML response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListVersionsResult" + } + }, + "com.amazonaws.s3#ListObjectVersionsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name that contains the objects.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

A delimiter is a character that you specify to group keys. All keys that contain the\n same string between the prefix and the first occurrence of the delimiter are\n grouped under a single result element in CommonPrefixes. These groups are\n counted as one result against the max-keys limitation. These keys are not\n returned elsewhere in the response.

", + "smithy.api#httpQuery": "delimiter" + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#httpQuery": "encoding-type" + } + }, + "KeyMarker": { + "target": "com.amazonaws.s3#KeyMarker", + "traits": { + "smithy.api#documentation": "

Specifies the key to start with when listing objects in a bucket.

", + "smithy.api#httpQuery": "key-marker" + } + }, + "MaxKeys": { + "target": "com.amazonaws.s3#MaxKeys", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain more.\n If additional keys satisfy the search criteria, but were not returned because\n max-keys was exceeded, the response contains\n true. To return the additional keys,\n see key-marker and version-id-marker.

", + "smithy.api#httpQuery": "max-keys" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Use this parameter to select only those keys that begin with the specified prefix. You\n can use prefixes to separate a bucket into different groupings of keys. (You can think of\n using prefix to make groups in the same way that you'd use a folder in a file\n system.) You can use prefix with delimiter to roll up numerous\n objects into a single result under CommonPrefixes.

", + "smithy.api#httpQuery": "prefix", + "smithy.rules#contextParam": { + "name": "Prefix" + } + } + }, + "VersionIdMarker": { + "target": "com.amazonaws.s3#VersionIdMarker", + "traits": { + "smithy.api#documentation": "

Specifies the object version you want to start listing from.

", + "smithy.api#httpQuery": "version-id-marker" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "OptionalObjectAttributes": { + "target": "com.amazonaws.s3#OptionalObjectAttributesList", + "traits": { + "smithy.api#documentation": "

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

", + "smithy.api#httpHeader": "x-amz-optional-object-attributes" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListObjects": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListObjectsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListObjectsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchBucket" + } + ], + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Returns some or all (up to 1,000) of the objects in a bucket. You can use the request\n parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK\n response can contain valid or invalid XML. Be sure to design your application to parse the\n contents of the response and handle it appropriately.

\n \n

This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility,\n Amazon S3 continues to support ListObjects.

\n
\n

The following operations are related to ListObjects:

\n ", + "smithy.api#examples": [ + { + "title": "To list objects in a bucket", + "documentation": "The following example list two objects in a bucket.", + "input": { + "Bucket": "examplebucket", + "MaxKeys": 2 }, - "traits": { - "smithy.api#documentation": "

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by\n automatically moving data to the most cost-effective storage access tier, without\n additional operational overhead.

" - } - }, - "com.amazonaws.s3#TieringList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Tiering" - } - }, - "com.amazonaws.s3#Token": { - "type": "string" - }, - "com.amazonaws.s3#TooManyParts": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

\n You have attempted to add more parts than the maximum of 10000 \n that are allowed for this object. You can use the CopyObject operation \n to copy this object to another and then add more data to the newly copied object.\n

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.s3#TopicArn": { - "type": "string" - }, - "com.amazonaws.s3#TopicConfiguration": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.s3#NotificationId" - }, - "TopicArn": { - "target": "com.amazonaws.s3#TopicArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message\n when it detects events of the specified type.

", - "smithy.api#required": {}, - "smithy.api#xmlName": "Topic" - } - }, - "Events": { - "target": "com.amazonaws.s3#EventList", - "traits": { - "smithy.api#documentation": "

The Amazon S3 bucket event about which to send notifications. For more information, see\n Supported\n Event Types in the Amazon S3 User Guide.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Event" - } + "output": { + "NextMarker": "eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ==", + "Contents": [ + { + "LastModified": "2014-11-21T19:40:05.000Z", + "ETag": "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"", + "StorageClass": "STANDARD", + "Key": "example1.jpg", + "Owner": { + "DisplayName": "myname", + "ID": "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Size": 11 }, - "Filter": { - "target": "com.amazonaws.s3#NotificationConfigurationFilter" - } + { + "LastModified": "2013-11-15T01:10:49.000Z", + "ETag": "\"9c8af9a76df052144598c115ef33e511\"", + "StorageClass": "STANDARD", + "Key": "example2.jpg", + "Owner": { + "DisplayName": "myname", + "ID": "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Size": 713193 + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}", + "code": 200 + } + } + }, + "com.amazonaws.s3#ListObjectsOutput": { + "type": "structure", + "members": { + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search\n criteria.

" + } + }, + "Marker": { + "target": "com.amazonaws.s3#Marker", + "traits": { + "smithy.api#documentation": "

Indicates where in the bucket listing begins. Marker is included in the response if it\n was sent with the request.

" + } + }, + "NextMarker": { + "target": "com.amazonaws.s3#NextMarker", + "traits": { + "smithy.api#documentation": "

When the response is truncated (the IsTruncated element value in the\n response is true), you can use the key name in this field as the\n marker parameter in the subsequent request to get the next set of objects.\n Amazon S3 lists objects in alphabetical order.

\n \n

This element is returned only if you have the delimiter request\n parameter specified. If the response does not include the NextMarker\n element and it is truncated, you can use the value of the last Key element\n in the response as the marker parameter in the subsequent request to get\n the next set of object keys.

\n
" + } + }, + "Contents": { + "target": "com.amazonaws.s3#ObjectList", + "traits": { + "smithy.api#documentation": "

Metadata about each object returned.

", + "smithy.api#xmlFlattened": {} + } + }, + "Name": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Keys that begin with the indicated prefix.

" + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

Causes keys that contain the same string between the prefix and the first occurrence of\n the delimiter to be rolled up into a single result element in the\n CommonPrefixes collection. These rolled-up keys are not returned elsewhere\n in the response. Each rolled-up result counts as only one return against the\n MaxKeys value.

" + } + }, + "MaxKeys": { + "target": "com.amazonaws.s3#MaxKeys", + "traits": { + "smithy.api#documentation": "

The maximum number of keys returned in the response body.

" + } + }, + "CommonPrefixes": { + "target": "com.amazonaws.s3#CommonPrefixList", + "traits": { + "smithy.api#documentation": "

All of the keys (up to 1,000) rolled up in a common prefix count as a single return when\n calculating the number of returns.

\n

A response can contain CommonPrefixes only if you specify a\n delimiter.

\n

\n CommonPrefixes contains all (if there are any) keys between\n Prefix and the next occurrence of the string specified by the\n delimiter.

\n

\n CommonPrefixes lists keys that act like subdirectories in the directory\n specified by Prefix.

\n

For example, if the prefix is notes/ and the delimiter is a slash\n (/), as in notes/summer/july, the common prefix is\n notes/summer/. All of the keys that roll up into a common prefix count as a\n single return when calculating the number of returns.

", + "smithy.api#xmlFlattened": {} + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListBucketResult" + } + }, + "com.amazonaws.s3#ListObjectsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket containing the objects.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

A delimiter is a character that you use to group keys.

", + "smithy.api#httpQuery": "delimiter" + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#httpQuery": "encoding-type" + } + }, + "Marker": { + "target": "com.amazonaws.s3#Marker", + "traits": { + "smithy.api#documentation": "

Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this\n specified key. Marker can be any key in the bucket.

", + "smithy.api#httpQuery": "marker" + } + }, + "MaxKeys": { + "target": "com.amazonaws.s3#MaxKeys", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain more.\n

", + "smithy.api#httpQuery": "max-keys" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Limits the response to keys that begin with the specified prefix.

", + "smithy.api#httpQuery": "prefix", + "smithy.rules#contextParam": { + "name": "Prefix" + } + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#documentation": "

Confirms that the requester knows that she or he will be charged for the list objects\n request. Bucket owners need not specify this parameter in their requests.

", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "OptionalObjectAttributes": { + "target": "com.amazonaws.s3#OptionalObjectAttributesList", + "traits": { + "smithy.api#documentation": "

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

", + "smithy.api#httpHeader": "x-amz-optional-object-attributes" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListObjectsV2": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListObjectsV2Request" + }, + "output": { + "target": "com.amazonaws.s3#ListObjectsV2Output" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchBucket" + } + ], + "traits": { + "smithy.api#documentation": "

Returns some or all (up to 1,000) of the objects in a bucket with each request. You can\n use the request parameters as selection criteria to return a subset of the objects in a\n bucket. A 200 OK response can contain valid or invalid XML. Make sure to\n design your application to parse the contents of the response and handle it appropriately.\n For more information about listing objects, see Listing object keys\n programmatically in the Amazon S3 User Guide. To get a list of\n your buckets, see ListBuckets.

\n \n
    \n
  • \n

    \n General purpose bucket - For general purpose buckets,\n ListObjectsV2 doesn't return prefixes that are related only to\n in-progress multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets - For\n directory buckets, ListObjectsV2 response includes the prefixes that\n are related only to in-progress multipart uploads.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n use this operation, you must have READ access to the bucket. You must have\n permission to perform the s3:ListBucket action. The bucket\n owner has this permission by default and can grant this permission to\n others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access\n Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Sorting order of returned objects
\n
\n
    \n
  • \n

    \n General purpose bucket - For\n general purpose buckets, ListObjectsV2 returns objects in\n lexicographical order based on their key names.

    \n
  • \n
  • \n

    \n Directory bucket - For\n directory buckets, ListObjectsV2 does not return objects in\n lexicographical order.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n \n

This section describes the latest revision of this action. We recommend that you use\n this revised API operation for application development. For backward compatibility, Amazon S3\n continues to support the prior version of this API operation, ListObjects.

\n
\n

The following operations are related to ListObjectsV2:

\n ", + "smithy.api#examples": [ + { + "title": "To get object list", + "documentation": "The following example retrieves object list. The request specifies max keys to limit response to include only 2 object keys. ", + "input": { + "Bucket": "DOC-EXAMPLE-BUCKET", + "MaxKeys": 2 }, - "traits": { - "smithy.api#documentation": "

A container for specifying the configuration for publication of messages to an Amazon\n Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

" - } - }, - "com.amazonaws.s3#TopicConfigurationList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#TopicConfiguration" - } - }, - "com.amazonaws.s3#Transition": { - "type": "structure", - "members": { - "Date": { - "target": "com.amazonaws.s3#Date", - "traits": { - "smithy.api#documentation": "

Indicates when objects are transitioned to the specified storage class. The date value\n must be in ISO 8601 format. The time is always midnight UTC.

" - } - }, - "Days": { - "target": "com.amazonaws.s3#Days", - "traits": { - "smithy.api#documentation": "

Indicates the number of days after creation when objects are transitioned to the\n specified storage class. If the specified storage class is INTELLIGENT_TIERING, \n GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are \n 0 or positive integers. If the specified storage class is STANDARD_IA \n or ONEZONE_IA, valid values are positive integers greater than 30. Be \n aware that some storage classes have a minimum storage duration and that you're charged for \n transitioning objects before their minimum storage duration. For more information, see \n \n Constraints and considerations for transitions in the \n Amazon S3 User Guide.

" - } + "output": { + "Name": "DOC-EXAMPLE-BUCKET", + "MaxKeys": 2, + "Prefix": "", + "KeyCount": 2, + "NextContinuationToken": "1w41l63U0xa8q7smH50vCxyTQqdxo69O3EmK28Bi5PcROI4wI/EyIJg==", + "IsTruncated": true, + "Contents": [ + { + "LastModified": "2014-11-21T19:40:05.000Z", + "ETag": "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"", + "StorageClass": "STANDARD", + "Key": "happyface.jpg", + "Size": 11 }, - "StorageClass": { - "target": "com.amazonaws.s3#TransitionStorageClass", - "traits": { - "smithy.api#documentation": "

The storage class to which you want the object to transition.

" - } - } + { + "LastModified": "2014-05-02T04:51:50.000Z", + "ETag": "\"becf17f89c30367a9a44495d62ed521a-1\"", + "StorageClass": "STANDARD", + "Key": "test.jpg", + "Size": 4192256 + } + ] + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}?list-type=2", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "ContinuationToken", + "outputToken": "NextContinuationToken", + "pageSize": "MaxKeys" + } + } + }, + "com.amazonaws.s3#ListObjectsV2Output": { + "type": "structure", + "members": { + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

Set to false if all of the results were returned. Set to true\n if more keys are available to return. If the number of results exceeds that specified by\n MaxKeys, all of the results might not be returned.

" + } + }, + "Contents": { + "target": "com.amazonaws.s3#ObjectList", + "traits": { + "smithy.api#documentation": "

Metadata about each object returned.

", + "smithy.api#xmlFlattened": {} + } + }, + "Name": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Keys that begin with the indicated prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
" + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

Causes keys that contain the same string between the prefix and the first\n occurrence of the delimiter to be rolled up into a single result element in the\n CommonPrefixes collection. These rolled-up keys are not returned elsewhere\n in the response. Each rolled-up result counts as only one return against the\n MaxKeys value.

\n \n

\n Directory buckets - For directory buckets, / is the only supported delimiter.

\n
" + } + }, + "MaxKeys": { + "target": "com.amazonaws.s3#MaxKeys", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain\n more.

" + } + }, + "CommonPrefixes": { + "target": "com.amazonaws.s3#CommonPrefixList", + "traits": { + "smithy.api#documentation": "

All of the keys (up to 1,000) that share the same prefix are grouped together. When\n counting the total numbers of returns by this API operation, this group of keys is\n considered as one item.

\n

A response can contain CommonPrefixes only if you specify a\n delimiter.

\n

\n CommonPrefixes contains all (if there are any) keys between\n Prefix and the next occurrence of the string specified by a\n delimiter.

\n

\n CommonPrefixes lists keys that act like subdirectories in the directory\n specified by Prefix.

\n

For example, if the prefix is notes/ and the delimiter is a slash\n (/) as in notes/summer/july, the common prefix is\n notes/summer/. All of the keys that roll up into a common prefix count as a\n single return when calculating the number of returns.

\n \n
    \n
  • \n

    \n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    \n
  • \n
  • \n

    \n Directory buckets - When you query\n ListObjectsV2 with a delimiter during in-progress multipart\n uploads, the CommonPrefixes response parameter contains the prefixes\n that are associated with the in-progress multipart uploads. For more information\n about multipart uploads, see Multipart Upload Overview in\n the Amazon S3 User Guide.

    \n
  • \n
\n
", + "smithy.api#xmlFlattened": {} + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode object key names in the XML response.

\n

If you specify the encoding-type request parameter, Amazon S3 includes this\n element in the response, and returns encoded key name values in the following response\n elements:

\n

\n Delimiter, Prefix, Key, and StartAfter.

" + } + }, + "KeyCount": { + "target": "com.amazonaws.s3#KeyCount", + "traits": { + "smithy.api#documentation": "

\n KeyCount is the number of keys returned with this request.\n KeyCount will always be less than or equal to the MaxKeys\n field. For example, if you ask for 50 keys, your result will include 50 keys or\n fewer.

" + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

If ContinuationToken was sent with the request, it is included in the\n response. You can use the returned ContinuationToken for pagination of the\n list response. You can use this ContinuationToken for pagination of the list\n results.

" + } + }, + "NextContinuationToken": { + "target": "com.amazonaws.s3#NextToken", + "traits": { + "smithy.api#documentation": "

\n NextContinuationToken is sent when isTruncated is true, which\n means there are more keys in the bucket that can be listed. The next list requests to Amazon S3\n can be continued with this NextContinuationToken.\n NextContinuationToken is obfuscated and is not a real key

" + } + }, + "StartAfter": { + "target": "com.amazonaws.s3#StartAfter", + "traits": { + "smithy.api#documentation": "

If StartAfter was sent with the request, it is included in the response.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListBucketResult" + } + }, + "com.amazonaws.s3#ListObjectsV2Request": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Delimiter": { + "target": "com.amazonaws.s3#Delimiter", + "traits": { + "smithy.api#documentation": "

A delimiter is a character that you use to group keys.

\n \n
    \n
  • \n

    \n Directory buckets - For directory buckets, / is the only supported delimiter.

    \n
  • \n
  • \n

    \n Directory buckets - When you query\n ListObjectsV2 with a delimiter during in-progress multipart\n uploads, the CommonPrefixes response parameter contains the prefixes\n that are associated with the in-progress multipart uploads. For more information\n about multipart uploads, see Multipart Upload Overview in\n the Amazon S3 User Guide.

    \n
  • \n
\n
", + "smithy.api#httpQuery": "delimiter" + } + }, + "EncodingType": { + "target": "com.amazonaws.s3#EncodingType", + "traits": { + "smithy.api#documentation": "

Encoding type used by Amazon S3 to encode the object keys in the response.\n Responses are encoded only in UTF-8. An object key can contain any Unicode character.\n However, the XML 1.0 parser can't parse certain characters, such as characters with an\n ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this\n parameter to request that Amazon S3 encode the keys in the response. For more information about\n characters to avoid in object key names, see Object key naming\n guidelines.

\n \n

When using the URL encoding type, non-ASCII characters that are used in an object's\n key name will be percent-encoded according to UTF-8 code values. For example, the object\n test_file(3).png will appear as\n test_file%283%29.png.

\n
", + "smithy.api#httpQuery": "encoding-type" + } + }, + "MaxKeys": { + "target": "com.amazonaws.s3#MaxKeys", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of keys returned in the response. By default, the action returns\n up to 1,000 key names. The response might contain fewer keys but will never contain\n more.

", + "smithy.api#httpQuery": "max-keys" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

Limits the response to keys that begin with the specified prefix.

\n \n

\n Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

\n
", + "smithy.api#httpQuery": "prefix", + "smithy.rules#contextParam": { + "name": "Prefix" + } + } + }, + "ContinuationToken": { + "target": "com.amazonaws.s3#Token", + "traits": { + "smithy.api#documentation": "

\n ContinuationToken indicates to Amazon S3 that the list is being continued on\n this bucket with a token. ContinuationToken is obfuscated and is not a real\n key. You can use this ContinuationToken for pagination of the list results.\n

", + "smithy.api#httpQuery": "continuation-token" + } + }, + "FetchOwner": { + "target": "com.amazonaws.s3#FetchOwner", + "traits": { + "smithy.api#documentation": "

The owner field is not present in ListObjectsV2 by default. If you want to\n return the owner field with each key in the result, then set the FetchOwner\n field to true.

\n \n

\n Directory buckets - For directory buckets,\n the bucket owner is returned as the object owner for all objects.

\n
", + "smithy.api#httpQuery": "fetch-owner" + } + }, + "StartAfter": { + "target": "com.amazonaws.s3#StartAfter", + "traits": { + "smithy.api#documentation": "

StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this\n specified key. StartAfter can be any key in the bucket.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpQuery": "start-after" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#documentation": "

Confirms that the requester knows that she or he will be charged for the list objects\n request in V2 style. Bucket owners need not specify this parameter in their\n requests.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "OptionalObjectAttributes": { + "target": "com.amazonaws.s3#OptionalObjectAttributesList", + "traits": { + "smithy.api#documentation": "

Specifies the optional fields that you want returned in the response. Fields that you do\n not specify are not returned.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-optional-object-attributes" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#ListParts": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#ListPartsRequest" + }, + "output": { + "target": "com.amazonaws.s3#ListPartsOutput" + }, + "traits": { + "smithy.api#documentation": "

Lists the parts that have been uploaded for a specific multipart upload.

\n

To use this operation, you must provide the upload ID in the request. You\n obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

\n

The ListParts request returns a maximum of 1,000 uploaded parts. The limit\n of 1,000 parts is also the default value. You can restrict the number of parts in a\n response by specifying the max-parts request parameter. If your multipart\n upload consists of more than 1,000 parts, the response returns an IsTruncated\n field with the value of true, and a NextPartNumberMarker element.\n To list remaining uploaded parts, in subsequent ListParts requests, include\n the part-number-marker query string parameter and set its value to the\n NextPartNumberMarker field value from the previous response.

\n

For more information on multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - For\n information about permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n

    If the upload was created using server-side encryption with Key Management Service\n (KMS) keys (SSE-KMS) or dual-layer server-side encryption with\n Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the\n kms:Decrypt action for the ListParts request to\n succeed.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to ListParts:

\n ", + "smithy.api#examples": [ + { + "title": "To list parts of a multipart upload.", + "documentation": "The following example lists parts uploaded for a specific multipart upload.", + "input": { + "Bucket": "examplebucket", + "Key": "bigobject", + "UploadId": "example7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" }, - "traits": { - "smithy.api#documentation": "

Specifies when an object transitions to a specified storage class. For more information\n about Amazon S3 lifecycle configuration rules, see Transitioning\n Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

" - } - }, - "com.amazonaws.s3#TransitionDefaultMinimumObjectSize": { - "type": "enum", - "members": { - "varies_by_storage_class": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "varies_by_storage_class" - } - }, - "all_storage_classes_128K": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "all_storage_classes_128K" - } - } - } - }, - "com.amazonaws.s3#TransitionList": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#Transition" - } - }, - "com.amazonaws.s3#TransitionStorageClass": { - "type": "enum", - "members": { - "GLACIER": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GLACIER" - } - }, - "STANDARD_IA": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STANDARD_IA" - } - }, - "ONEZONE_IA": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ONEZONE_IA" - } - }, - "INTELLIGENT_TIERING": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INTELLIGENT_TIERING" - } - }, - "DEEP_ARCHIVE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DEEP_ARCHIVE" - } - }, - "GLACIER_IR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "GLACIER_IR" - } - } - } - }, - "com.amazonaws.s3#Type": { - "type": "enum", - "members": { - "CanonicalUser": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CanonicalUser" - } - }, - "AmazonCustomerByEmail": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AmazonCustomerByEmail" - } + "output": { + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Initiator": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "Parts": [ + { + "LastModified": "2016-12-16T00:11:42.000Z", + "PartNumber": 1, + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", + "Size": 26246026 }, - "Group": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Group" - } - } - } - }, - "com.amazonaws.s3#URI": { - "type": "string" - }, - "com.amazonaws.s3#UploadIdMarker": { - "type": "string" - }, - "com.amazonaws.s3#UploadPart": { - "type": "operation", + { + "LastModified": "2016-12-16T00:15:01.000Z", + "PartNumber": 2, + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", + "Size": 26246026 + } + ], + "StorageClass": "STANDARD" + } + } + ], + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?x-id=ListParts", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "PartNumberMarker", + "outputToken": "NextPartNumberMarker", + "items": "Parts", + "pageSize": "MaxParts" + } + } + }, + "com.amazonaws.s3#ListPartsOutput": { + "type": "structure", + "members": { + "AbortDate": { + "target": "com.amazonaws.s3#AbortDate", + "traits": { + "smithy.api#documentation": "

If the bucket has a lifecycle rule configured with an action to abort incomplete\n multipart uploads and the prefix in the lifecycle rule matches the object name in the\n request, then the response includes this header indicating when the initiated multipart\n upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle\n Configuration.

\n

The response will also include the x-amz-abort-rule-id header that will\n provide the ID of the lifecycle configuration rule that defines this action.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-abort-date" + } + }, + "AbortRuleId": { + "target": "com.amazonaws.s3#AbortRuleId", + "traits": { + "smithy.api#documentation": "

This header is returned along with the x-amz-abort-date header. It\n identifies applicable lifecycle configuration rule that defines the action to abort\n incomplete multipart uploads.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-abort-rule-id" + } + }, + "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\n access point ARN or access point alias if used.

" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

" + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID identifying the multipart upload whose parts are being listed.

" + } + }, + "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.

" + } + }, + "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 part-number-marker request parameter in a subsequent\n request.

" + } + }, + "MaxParts": { + "target": "com.amazonaws.s3#MaxParts", + "traits": { + "smithy.api#documentation": "

Maximum number of parts that were allowed in the response.

" + } + }, + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

Indicates whether the returned list of parts is truncated. A true value indicates that\n the list was truncated. A list can be truncated if the number of parts exceeds the limit\n returned in the MaxParts element.

" + } + }, + "Parts": { + "target": "com.amazonaws.s3#Parts", + "traits": { + "smithy.api#documentation": "

Container for elements related to a particular part. A response can contain zero or more\n Part elements.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Part" + } + }, + "Initiator": { + "target": "com.amazonaws.s3#Initiator", + "traits": { + "smithy.api#documentation": "

Container element that identifies who initiated the multipart upload. If the initiator\n is an Amazon Web Services account, this element provides the same information as the Owner\n element. If the initiator is an IAM User, this element provides the user ARN and display\n name.

" + } + }, + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

Container element that identifies the object owner, after the object is created. If\n multipart upload is initiated by an IAM user, this element provides the parent account ID\n and display name.

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner for all the parts.

\n
" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

The class of storage used to store the uploaded object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "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.

" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type, which determines how part-level checksums are combined to create an\n object-level checksum for multipart objects. You can use this header response to verify\n that the checksum type that is received is the same checksum type that was specified in\n CreateMultipartUpload request. For more\n information, see Checking object integrity\n in the Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#output": {}, + "smithy.api#xmlName": "ListPartsResult" + } + }, + "com.amazonaws.s3#ListPartsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket to which the parts are being uploaded.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "MaxParts": { + "target": "com.amazonaws.s3#MaxParts", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of parts to return.

", + "smithy.api#httpQuery": "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#httpQuery": "part-number-marker" + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID identifying the multipart upload whose parts are being listed.

", + "smithy.api#httpQuery": "uploadId", + "smithy.api#required": {} + } + }, + "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 account ID that you provide does not match the actual owner of the bucket, 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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#Location": { + "type": "string" + }, + "com.amazonaws.s3#LocationInfo": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.s3#LocationType", + "traits": { + "smithy.api#documentation": "

The type of location where the bucket will be created.

" + } + }, + "Name": { + "target": "com.amazonaws.s3#LocationNameAsString", + "traits": { + "smithy.api#documentation": "

The name of the location where the bucket will be created.

\n

For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the location where the bucket will be created.

\n

For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see \n Working with directory buckets in the Amazon S3 User Guide.

\n \n

This functionality is only supported by directory buckets.

\n
" + } + }, + "com.amazonaws.s3#LocationNameAsString": { + "type": "string" + }, + "com.amazonaws.s3#LocationPrefix": { + "type": "string" + }, + "com.amazonaws.s3#LocationType": { + "type": "enum", + "members": { + "AvailabilityZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AvailabilityZone" + } + }, + "LocalZone": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LocalZone" + } + } + } + }, + "com.amazonaws.s3#LoggingEnabled": { + "type": "structure", + "members": { + "TargetBucket": { + "target": "com.amazonaws.s3#TargetBucket", + "traits": { + "smithy.api#documentation": "

Specifies the bucket where you want Amazon S3 to store server access logs. You can have your\n logs delivered to any bucket that you own, including the same bucket that is being logged.\n You can also configure multiple buckets to deliver their logs to the same target bucket. In\n this case, you should choose a different TargetPrefix for each source bucket\n so that the delivered log files can be distinguished by key.

", + "smithy.api#required": {} + } + }, + "TargetGrants": { + "target": "com.amazonaws.s3#TargetGrants", + "traits": { + "smithy.api#documentation": "

Container for granting information.

\n

Buckets that use the bucket owner enforced setting for Object Ownership don't support\n target grants. For more information, see Permissions for server access log delivery in the\n Amazon S3 User Guide.

" + } + }, + "TargetPrefix": { + "target": "com.amazonaws.s3#TargetPrefix", + "traits": { + "smithy.api#documentation": "

A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a\n single bucket, you can use a prefix to distinguish which log files came from which\n bucket.

", + "smithy.api#required": {} + } + }, + "TargetObjectKeyFormat": { + "target": "com.amazonaws.s3#TargetObjectKeyFormat", + "traits": { + "smithy.api#documentation": "

Amazon S3 key format for log objects.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys\n for a bucket. For more information, see PUT Bucket logging in the\n Amazon S3 API Reference.

" + } + }, + "com.amazonaws.s3#MFA": { + "type": "string" + }, + "com.amazonaws.s3#MFADelete": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#MFADeleteStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#Marker": { + "type": "string" + }, + "com.amazonaws.s3#MaxAgeSeconds": { + "type": "integer" + }, + "com.amazonaws.s3#MaxBuckets": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 10000 + } + } + }, + "com.amazonaws.s3#MaxDirectoryBuckets": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 1000 + } + } + }, + "com.amazonaws.s3#MaxKeys": { + "type": "integer" + }, + "com.amazonaws.s3#MaxParts": { + "type": "integer" + }, + "com.amazonaws.s3#MaxUploads": { + "type": "integer" + }, + "com.amazonaws.s3#Message": { + "type": "string" + }, + "com.amazonaws.s3#Metadata": { + "type": "map", + "key": { + "target": "com.amazonaws.s3#MetadataKey" + }, + "value": { + "target": "com.amazonaws.s3#MetadataValue" + } + }, + "com.amazonaws.s3#MetadataDirective": { + "type": "enum", + "members": { + "COPY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COPY" + } + }, + "REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLACE" + } + } + } + }, + "com.amazonaws.s3#MetadataEntry": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.s3#MetadataKey", + "traits": { + "smithy.api#documentation": "

Name of the object.

" + } + }, + "Value": { + "target": "com.amazonaws.s3#MetadataValue", + "traits": { + "smithy.api#documentation": "

Value of the object.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A metadata key-value pair to store with an object.

" + } + }, + "com.amazonaws.s3#MetadataKey": { + "type": "string" + }, + "com.amazonaws.s3#MetadataTableConfiguration": { + "type": "structure", + "members": { + "S3TablesDestination": { + "target": "com.amazonaws.s3#S3TablesDestination", + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket.\n

" + } + }, + "com.amazonaws.s3#MetadataTableConfigurationResult": { + "type": "structure", + "members": { + "S3TablesDestinationResult": { + "target": "com.amazonaws.s3#S3TablesDestinationResult", + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The metadata table configuration for a general purpose bucket. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket. \n

" + } + }, + "com.amazonaws.s3#MetadataTableStatus": { + "type": "string" + }, + "com.amazonaws.s3#MetadataValue": { + "type": "string" + }, + "com.amazonaws.s3#Metrics": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#MetricsStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether the replication metrics are enabled.

", + "smithy.api#required": {} + } + }, + "EventThreshold": { + "target": "com.amazonaws.s3#ReplicationTimeValue", + "traits": { + "smithy.api#documentation": "

A container specifying the time threshold for emitting the\n s3:Replication:OperationMissedThreshold event.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container specifying replication metrics-related settings enabling replication\n metrics and events.

" + } + }, + "com.amazonaws.s3#MetricsAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix used when evaluating an AND predicate.

" + } + }, + "Tags": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

The list of tags used when evaluating an AND predicate.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + }, + "AccessPointArn": { + "target": "com.amazonaws.s3#AccessPointArn", + "traits": { + "smithy.api#documentation": "

The access point ARN used when evaluating an AND predicate.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

" + } + }, + "com.amazonaws.s3#MetricsConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#MetricsId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", + "smithy.api#required": {} + } + }, + "Filter": { + "target": "com.amazonaws.s3#MetricsFilter", + "traits": { + "smithy.api#documentation": "

Specifies a metrics configuration filter. The metrics configuration will only include\n objects that meet the filter's criteria. A filter must be a prefix, an object tag, an\n access point ARN, or a conjunction (MetricsAndOperator).

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a metrics configuration for the CloudWatch request metrics (specified by the\n metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics\n configuration, note that this is a full replacement of the existing metrics configuration.\n If you don't include the elements you want to keep, they are erased. For more information,\n see PutBucketMetricsConfiguration.

" + } + }, + "com.amazonaws.s3#MetricsConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#MetricsConfiguration" + } + }, + "com.amazonaws.s3#MetricsFilter": { + "type": "union", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

The prefix used when evaluating a metrics filter.

" + } + }, + "Tag": { + "target": "com.amazonaws.s3#Tag", + "traits": { + "smithy.api#documentation": "

The tag used when evaluating a metrics filter.

" + } + }, + "AccessPointArn": { + "target": "com.amazonaws.s3#AccessPointArn", + "traits": { + "smithy.api#documentation": "

The access point ARN used when evaluating a metrics filter.

" + } + }, + "And": { + "target": "com.amazonaws.s3#MetricsAndOperator", + "traits": { + "smithy.api#documentation": "

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter.\n The operator must have at least two predicates, and an object must match all of the\n predicates in order for the filter to apply.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a metrics configuration filter. The metrics configuration only includes\n objects that meet the filter's criteria. A filter must be a prefix, an object tag, an\n access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

" + } + }, + "com.amazonaws.s3#MetricsId": { + "type": "string" + }, + "com.amazonaws.s3#MetricsStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#Minutes": { + "type": "integer" + }, + "com.amazonaws.s3#MissingMeta": { + "type": "integer" + }, + "com.amazonaws.s3#MpuObjectSize": { + "type": "long" + }, + "com.amazonaws.s3#MultipartUpload": { + "type": "structure", + "members": { + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID that identifies the multipart upload.

" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Key of the object for which the multipart upload was initiated.

" + } + }, + "Initiated": { + "target": "com.amazonaws.s3#Initiated", + "traits": { + "smithy.api#documentation": "

Date and time at which the multipart upload was initiated.

" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

The class of storage used to store the object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" + } + }, + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

Specifies the owner of the object that is part of the multipart upload.

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner for all the objects.

\n
" + } + }, + "Initiator": { + "target": "com.amazonaws.s3#Initiator", + "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.

" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the MultipartUpload for the Amazon S3 object.

" + } + }, + "com.amazonaws.s3#MultipartUploadId": { + "type": "string" + }, + "com.amazonaws.s3#MultipartUploadList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#MultipartUpload" + } + }, + "com.amazonaws.s3#NextKeyMarker": { + "type": "string" + }, + "com.amazonaws.s3#NextMarker": { + "type": "string" + }, + "com.amazonaws.s3#NextPartNumberMarker": { + "type": "string" + }, + "com.amazonaws.s3#NextToken": { + "type": "string" + }, + "com.amazonaws.s3#NextUploadIdMarker": { + "type": "string" + }, + "com.amazonaws.s3#NextVersionIdMarker": { + "type": "string" + }, + "com.amazonaws.s3#NoSuchBucket": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The specified bucket does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.s3#NoSuchKey": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The specified key does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.s3#NoSuchUpload": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The specified multipart upload does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.s3#NoncurrentVersionExpiration": { + "type": "structure", + "members": { + "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. The value must be a non-zero positive integer. For information about the\n noncurrent days calculations, see How\n Amazon S3 Calculates When an Object Became Noncurrent in the\n Amazon S3 User Guide.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + }, + "NewerNoncurrentVersions": { + "target": "com.amazonaws.s3#VersionCount", + "traits": { + "smithy.api#documentation": "

Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100\n noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent\n versions beyond the specified number to retain. For more information about noncurrent\n versions, see Lifecycle configuration\n elements in the Amazon S3 User Guide.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently\n deletes the noncurrent object versions. You set this lifecycle configuration action on a\n bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent\n object versions at a specific period in the object's lifetime.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
" + } + }, + "com.amazonaws.s3#NoncurrentVersionTransition": { + "type": "structure", + "members": { + "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 How Long an Object Has Been Noncurrent in the\n Amazon S3 User Guide.

" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#TransitionStorageClass", + "traits": { + "smithy.api#documentation": "

The class of storage used to store the object.

" + } + }, + "NewerNoncurrentVersions": { + "target": "com.amazonaws.s3#VersionCount", + "traits": { + "smithy.api#documentation": "

Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before\n transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will\n transition any additional noncurrent versions beyond the specified number to retain. For\n more information about noncurrent versions, see Lifecycle configuration\n elements in the Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the transition rule that describes when noncurrent objects transition to\n the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,\n GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage\n class. If your bucket is versioning-enabled (or versioning is suspended), you can set this\n action to request that Amazon S3 transition noncurrent object versions to the\n STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,\n GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage\n class at a specific period in the object's lifetime.

" + } + }, + "com.amazonaws.s3#NoncurrentVersionTransitionList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#NoncurrentVersionTransition" + } + }, + "com.amazonaws.s3#NotFound": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The specified content does not exist.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.s3#NotificationConfiguration": { + "type": "structure", + "members": { + "TopicConfigurations": { + "target": "com.amazonaws.s3#TopicConfigurationList", + "traits": { + "smithy.api#documentation": "

The topic to which notifications are sent and the events for which notifications are\n generated.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "TopicConfiguration" + } + }, + "QueueConfigurations": { + "target": "com.amazonaws.s3#QueueConfigurationList", + "traits": { + "smithy.api#documentation": "

The Amazon Simple Queue Service queues to publish messages to and the events for which\n to publish messages.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "QueueConfiguration" + } + }, + "LambdaFunctionConfigurations": { + "target": "com.amazonaws.s3#LambdaFunctionConfigurationList", + "traits": { + "smithy.api#documentation": "

Describes the Lambda functions to invoke and the events for which to invoke\n them.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "CloudFunctionConfiguration" + } + }, + "EventBridgeConfiguration": { + "target": "com.amazonaws.s3#EventBridgeConfiguration", + "traits": { + "smithy.api#documentation": "

Enables delivery of events to Amazon EventBridge.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for specifying the notification configuration of the bucket. If this element\n is empty, notifications are turned off for the bucket.

" + } + }, + "com.amazonaws.s3#NotificationConfigurationFilter": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#S3KeyFilter", + "traits": { + "smithy.api#xmlName": "S3Key" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies object key name filtering rules. For information about key name filtering, see\n Configuring event\n notifications using object key name filtering in the\n Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#NotificationId": { + "type": "string", + "traits": { + "smithy.api#documentation": "

An optional unique identifier for configurations in a notification configuration. If you\n don't provide one, Amazon S3 will assign an ID.

" + } + }, + "com.amazonaws.s3#Object": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The name that you assign to an object. You use the object key to retrieve the\n object.

" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Creation date of the object.

" + } + }, + "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\n are 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 is\n 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
\n \n

\n Directory buckets - MD5 is not supported by directory buckets.

\n
" + } + }, + "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": {} + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "Size": { + "target": "com.amazonaws.s3#Size", + "traits": { + "smithy.api#documentation": "

Size in bytes of the object

" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#ObjectStorageClass", + "traits": { + "smithy.api#documentation": "

The class of storage used to store the object.

\n \n

\n Directory buckets -\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" + } + }, + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

The owner of the object

\n \n

\n Directory buckets - The bucket owner is\n returned as the object owner.

\n
" + } + }, + "RestoreStatus": { + "target": "com.amazonaws.s3#RestoreStatus", + "traits": { + "smithy.api#documentation": "

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

An object consists of data and its descriptive metadata.

" + } + }, + "com.amazonaws.s3#ObjectAlreadyInActiveTierError": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

This action is not allowed against this storage tier.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.s3#ObjectAttributes": { + "type": "enum", + "members": { + "ETAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ETag" + } + }, + "CHECKSUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Checksum" + } + }, + "OBJECT_PARTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectParts" + } + }, + "STORAGE_CLASS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "StorageClass" + } + }, + "OBJECT_SIZE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectSize" + } + } + } + }, + "com.amazonaws.s3#ObjectAttributesList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectAttributes" + } + }, + "com.amazonaws.s3#ObjectCannedACL": { + "type": "enum", + "members": { + "private": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "private" + } + }, + "public_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read" + } + }, + "public_read_write": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read-write" + } + }, + "authenticated_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "authenticated-read" + } + }, + "aws_exec_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aws-exec-read" + } + }, + "bucket_owner_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bucket-owner-read" + } + }, + "bucket_owner_full_control": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bucket-owner-full-control" + } + } + } + }, + "com.amazonaws.s3#ObjectIdentifier": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Key name of the object.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
", + "smithy.api#required": {} + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID for the specific version of the object to delete.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL.\n This header field makes the request method conditional on ETags.

\n \n

Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

\n
" + } + }, + "LastModifiedTime": { + "target": "com.amazonaws.s3#LastModifiedTime", + "traits": { + "smithy.api#documentation": "

If present, the objects are deleted only if its modification times matches the provided Timestamp. \n

\n \n

This functionality is only supported for directory buckets.

\n
" + } + }, + "Size": { + "target": "com.amazonaws.s3#Size", + "traits": { + "smithy.api#documentation": "

If present, the objects are deleted only if its size matches the provided size in bytes.

\n \n

This functionality is only supported for directory buckets.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Object Identifier is unique value to identify objects.

" + } + }, + "com.amazonaws.s3#ObjectIdentifierList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectIdentifier" + } + }, + "com.amazonaws.s3#ObjectKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.s3#ObjectList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Object" + } + }, + "com.amazonaws.s3#ObjectLockConfiguration": { + "type": "structure", + "members": { + "ObjectLockEnabled": { + "target": "com.amazonaws.s3#ObjectLockEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether this bucket has an Object Lock configuration enabled. Enable\n ObjectLockEnabled when you apply ObjectLockConfiguration to a\n bucket.

" + } + }, + "Rule": { + "target": "com.amazonaws.s3#ObjectLockRule", + "traits": { + "smithy.api#documentation": "

Specifies the Object Lock rule for the specified object. Enable the this rule when you\n apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode\n and a period. The period can be either Days or Years but you must\n select one. You cannot specify Days and Years at the same\n time.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for Object Lock configuration parameters.

" + } + }, + "com.amazonaws.s3#ObjectLockEnabled": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + } + } + }, + "com.amazonaws.s3#ObjectLockEnabledForBucket": { + "type": "boolean" + }, + "com.amazonaws.s3#ObjectLockLegalHold": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "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.

" + } + }, + "com.amazonaws.s3#ObjectLockLegalHoldStatus": { + "type": "enum", + "members": { + "ON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ON" + } + }, + "OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OFF" + } + } + } + }, + "com.amazonaws.s3#ObjectLockMode": { + "type": "enum", + "members": { + "GOVERNANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GOVERNANCE" + } + }, + "COMPLIANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLIANCE" + } + } + } + }, + "com.amazonaws.s3#ObjectLockRetainUntilDate": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.s3#ObjectLockRetention": { + "type": "structure", + "members": { + "Mode": { + "target": "com.amazonaws.s3#ObjectLockRetentionMode", + "traits": { + "smithy.api#documentation": "

Indicates the Retention mode for the specified object.

" + } + }, + "RetainUntilDate": { + "target": "com.amazonaws.s3#Date", + "traits": { + "smithy.api#documentation": "

The date on which this Object Lock Retention will expire.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A Retention configuration for an object.

" + } + }, + "com.amazonaws.s3#ObjectLockRetentionMode": { + "type": "enum", + "members": { + "GOVERNANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GOVERNANCE" + } + }, + "COMPLIANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLIANCE" + } + } + } + }, + "com.amazonaws.s3#ObjectLockRule": { + "type": "structure", + "members": { + "DefaultRetention": { + "target": "com.amazonaws.s3#DefaultRetention", + "traits": { + "smithy.api#documentation": "

The default Object Lock retention mode and period that you want to apply to new objects\n placed in the specified bucket. Bucket settings require both a mode and a period. The\n period can be either Days or Years but you must select one. You\n cannot specify Days and Years at the same time.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for an Object Lock rule.

" + } + }, + "com.amazonaws.s3#ObjectLockToken": { + "type": "string" + }, + "com.amazonaws.s3#ObjectNotInActiveTierError": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

The source object of the COPY action is not in the active tier and is only stored in\n Amazon S3 Glacier.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.s3#ObjectOwnership": { + "type": "enum", + "members": { + "BucketOwnerPreferred": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BucketOwnerPreferred" + } + }, + "ObjectWriter": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectWriter" + } + }, + "BucketOwnerEnforced": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BucketOwnerEnforced" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for object ownership for a bucket's ownership controls.

\n

\n BucketOwnerPreferred - Objects uploaded to the bucket change ownership to\n the bucket owner if the objects are uploaded with the\n bucket-owner-full-control canned ACL.

\n

\n ObjectWriter - The uploading account will own the object if the object is\n uploaded with the bucket-owner-full-control canned ACL.

\n

\n BucketOwnerEnforced - Access control lists (ACLs) are disabled and no\n longer affect permissions. The bucket owner automatically owns and has full control over\n every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL\n or specify bucket owner full control ACLs (such as the predefined\n bucket-owner-full-control canned ACL or a custom ACL in XML format that\n grants the same permissions).

\n

By default, ObjectOwnership is set to BucketOwnerEnforced and\n ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where\n you must control access for each object individually. For more information about S3 Object\n Ownership, see Controlling ownership of\n objects and disabling ACLs for your bucket in the\n Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

\n
" + } + }, + "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": "

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see 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" + }, + "com.amazonaws.s3#ObjectSizeLessThanBytes": { + "type": "long" + }, + "com.amazonaws.s3#ObjectStorageClass": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" + } + }, + "REDUCED_REDUNDANCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REDUCED_REDUNDANCY" + } + }, + "GLACIER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER" + } + }, + "STANDARD_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD_IA" + } + }, + "ONEZONE_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONEZONE_IA" + } + }, + "INTELLIGENT_TIERING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTELLIGENT_TIERING" + } + }, + "DEEP_ARCHIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE" + } + }, + "OUTPOSTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OUTPOSTS" + } + }, + "GLACIER_IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER_IR" + } + }, + "SNOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNOW" + } + }, + "EXPRESS_ONEZONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXPRESS_ONEZONE" + } + } + } + }, + "com.amazonaws.s3#ObjectVersion": { + "type": "structure", + "members": { + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "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": {} + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

The checksum type that is used to calculate the object\u2019s\n checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "Size": { + "target": "com.amazonaws.s3#Size", + "traits": { + "smithy.api#documentation": "

Size in bytes of the object.

" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#ObjectVersionStorageClass", + "traits": { + "smithy.api#documentation": "

The class of storage used to store the object.

" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key.

" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of an object.

" + } + }, + "IsLatest": { + "target": "com.amazonaws.s3#IsLatest", + "traits": { + "smithy.api#documentation": "

Specifies whether the object is (true) or is not (false) the latest version of an\n object.

" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Date and time when the object was last modified.

" + } + }, + "Owner": { + "target": "com.amazonaws.s3#Owner", + "traits": { + "smithy.api#documentation": "

Specifies the owner of the object.

" + } + }, + "RestoreStatus": { + "target": "com.amazonaws.s3#RestoreStatus", + "traits": { + "smithy.api#documentation": "

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The version of an object.

" + } + }, + "com.amazonaws.s3#ObjectVersionId": { + "type": "string" + }, + "com.amazonaws.s3#ObjectVersionList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectVersion" + } + }, + "com.amazonaws.s3#ObjectVersionStorageClass": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" + } + } + } + }, + "com.amazonaws.s3#OptionalObjectAttributes": { + "type": "enum", + "members": { + "RESTORE_STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RestoreStatus" + } + } + } + }, + "com.amazonaws.s3#OptionalObjectAttributesList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#OptionalObjectAttributes" + } + }, + "com.amazonaws.s3#OutputLocation": { + "type": "structure", + "members": { + "S3": { + "target": "com.amazonaws.s3#S3Location", + "traits": { + "smithy.api#documentation": "

Describes an S3 location that will receive the results of the restore request.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the location where the restore job's output is stored.

" + } + }, + "com.amazonaws.s3#OutputSerialization": { + "type": "structure", + "members": { + "CSV": { + "target": "com.amazonaws.s3#CSVOutput", + "traits": { + "smithy.api#documentation": "

Describes the serialization of CSV-encoded Select results.

" + } + }, + "JSON": { + "target": "com.amazonaws.s3#JSONOutput", + "traits": { + "smithy.api#documentation": "

Specifies JSON as request's output serialization format.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes how results of the Select job are serialized.

" + } + }, + "com.amazonaws.s3#Owner": { + "type": "structure", + "members": { + "DisplayName": { + "target": "com.amazonaws.s3#DisplayName", + "traits": { + "smithy.api#documentation": "

Container for the display name of the owner. This value is only supported in the\n 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\u00e3o Paulo)

    \n
  • \n
\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

Container for the ID of the owner.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the owner's display name and ID.

" + } + }, + "com.amazonaws.s3#OwnerOverride": { + "type": "enum", + "members": { + "Destination": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Destination" + } + } + } + }, + "com.amazonaws.s3#OwnershipControls": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.s3#OwnershipControlsRules", + "traits": { + "smithy.api#documentation": "

The container element for an ownership control rule.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Rule" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for a bucket's ownership controls.

" + } + }, + "com.amazonaws.s3#OwnershipControlsRule": { + "type": "structure", + "members": { + "ObjectOwnership": { + "target": "com.amazonaws.s3#ObjectOwnership", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for an ownership control rule.

" + } + }, + "com.amazonaws.s3#OwnershipControlsRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#OwnershipControlsRule" + } + }, + "com.amazonaws.s3#ParquetInput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

Container for Parquet.

" + } + }, + "com.amazonaws.s3#Part": { + "type": "structure", + "members": { + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number identifying the part. This is a positive integer between 1 and\n 10,000.

" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

Date and time at which the part was uploaded.

" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

Entity tag returned when the part was uploaded.

" + } + }, + "Size": { + "target": "com.amazonaws.s3#Size", + "traits": { + "smithy.api#documentation": "

Size in bytes of the uploaded part data.

" + } + }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present\n if the object was uploaded with the CRC32 checksum algorithm. For more information, see 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 part. This checksum is present\n if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present\n if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a\n checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present\n if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present\n if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for elements related to a part.

" + } + }, + "com.amazonaws.s3#PartNumber": { + "type": "integer" + }, + "com.amazonaws.s3#PartNumberMarker": { + "type": "string" + }, + "com.amazonaws.s3#PartitionDateSource": { + "type": "enum", + "members": { + "EventTime": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EventTime" + } + }, + "DeliveryTime": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DeliveryTime" + } + } + } + }, + "com.amazonaws.s3#PartitionedPrefix": { + "type": "structure", + "members": { + "PartitionDateSource": { + "target": "com.amazonaws.s3#PartitionDateSource", + "traits": { + "smithy.api#documentation": "

Specifies the partition date source for the partitioned prefix.\n PartitionDateSource can be EventTime or\n DeliveryTime.

\n

For DeliveryTime, the time in the log file names corresponds to the\n delivery time for the log files.

\n

For EventTime, The logs delivered are for a specific day only. The year,\n month, and day correspond to the day on which the event occurred, and the hour, minutes and\n seconds are set to 00 in the key.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Amazon S3 keys for log objects are partitioned in the following format:

\n

\n [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]\n

\n

PartitionedPrefix defaults to EventTime delivery when server access logs are\n delivered.

", + "smithy.api#xmlName": "PartitionedPrefix" + } + }, + "com.amazonaws.s3#Parts": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Part" + } + }, + "com.amazonaws.s3#PartsCount": { + "type": "integer" + }, + "com.amazonaws.s3#PartsList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectPart" + } + }, + "com.amazonaws.s3#Payer": { + "type": "enum", + "members": { + "Requester": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Requester" + } + }, + "BucketOwner": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BucketOwner" + } + } + } + }, + "com.amazonaws.s3#Permission": { + "type": "enum", + "members": { + "FULL_CONTROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL_CONTROL" + } + }, + "WRITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WRITE" + } + }, + "WRITE_ACP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WRITE_ACP" + } + }, + "READ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READ" + } + }, + "READ_ACP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READ_ACP" + } + } + } + }, + "com.amazonaws.s3#Policy": { + "type": "string" + }, + "com.amazonaws.s3#PolicyStatus": { + "type": "structure", + "members": { + "IsPublic": { + "target": "com.amazonaws.s3#IsPublic", + "traits": { + "smithy.api#documentation": "

The policy status for this bucket. TRUE indicates that this bucket is\n public. FALSE indicates that the bucket is not public.

", + "smithy.api#xmlName": "IsPublic" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container element for a bucket's policy status.

" + } + }, + "com.amazonaws.s3#Prefix": { + "type": "string" + }, + "com.amazonaws.s3#Priority": { + "type": "integer" + }, + "com.amazonaws.s3#Progress": { + "type": "structure", + "members": { + "BytesScanned": { + "target": "com.amazonaws.s3#BytesScanned", + "traits": { + "smithy.api#documentation": "

The current number of object bytes scanned.

" + } + }, + "BytesProcessed": { + "target": "com.amazonaws.s3#BytesProcessed", + "traits": { + "smithy.api#documentation": "

The current number of uncompressed object bytes processed.

" + } + }, + "BytesReturned": { + "target": "com.amazonaws.s3#BytesReturned", + "traits": { + "smithy.api#documentation": "

The current number of bytes of records payload data returned.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This data type contains information about progress of an operation.

" + } + }, + "com.amazonaws.s3#ProgressEvent": { + "type": "structure", + "members": { + "Details": { + "target": "com.amazonaws.s3#Progress", + "traits": { + "smithy.api#documentation": "

The Progress event details.

", + "smithy.api#eventPayload": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

This data type contains information about the progress event of an operation.

" + } + }, + "com.amazonaws.s3#Protocol": { + "type": "enum", + "members": { + "http": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "http" + } + }, + "https": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "https" + } + } + } + }, + "com.amazonaws.s3#PublicAccessBlockConfiguration": { + "type": "structure", + "members": { + "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#xmlName": "BlockPublicAcls" + } + }, + "IgnorePublicAcls": { + "target": "com.amazonaws.s3#Setting", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this\n bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on\n this bucket and objects in this bucket.

\n

Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't\n prevent new public ACLs from being set.

", + "smithy.api#xmlName": "IgnorePublicAcls" + } + }, + "BlockPublicPolicy": { + "target": "com.amazonaws.s3#Setting", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this\n element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the\n specified bucket policy allows public access.

\n

Enabling this setting doesn't affect existing bucket policies.

", + "smithy.api#xmlName": "BlockPublicPolicy" + } + }, + "RestrictPublicBuckets": { + "target": "com.amazonaws.s3#Setting", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting\n this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has\n a public policy.

\n

Enabling this setting doesn't affect previously stored bucket policies, except that\n public and cross-account access within any public bucket policy, including non-public\n delegation to specific accounts, is blocked.

", + "smithy.api#xmlName": "RestrictPublicBuckets" + } + } + }, + "traits": { + "smithy.api#documentation": "

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can\n enable the configuration options in any combination. For more information about when Amazon S3\n considers a bucket or object public, see The Meaning of \"Public\" in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#PutBucketAccelerateConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketAccelerateConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

The Transfer Acceleration state of a bucket can be set to one of the following two\n values:

\n
    \n
  • \n

    Enabled \u2013 Enables accelerated data transfers to the bucket.

    \n
  • \n
  • \n

    Suspended \u2013 Disables accelerated data transfers to the bucket.

    \n
  • \n
\n

The GetBucketAccelerateConfiguration action returns the transfer acceleration state\n of a bucket.

\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

The name of the bucket used for Transfer Acceleration must be DNS-compliant and must\n not contain periods (\".\").

\n

For more information about transfer acceleration, see Transfer\n Acceleration.

\n

The following operations are related to\n PutBucketAccelerateConfiguration:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?accelerate", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketAccelerateConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which the accelerate configuration is set.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "AccelerateConfiguration": { + "target": "com.amazonaws.s3#AccelerateConfiguration", + "traits": { + "smithy.api#documentation": "

Container for setting the transfer acceleration state.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "AccelerateConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, 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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketAcl": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketAclRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets the permissions on an existing bucket using access control lists (ACL). For more\n information, see Using ACLs. To set the ACL of a\n bucket, you must have the WRITE_ACP permission.

\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

You cannot specify access permission using both the body and the request\n headers.

\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

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

You can set access permissions by using one of the following methods:

\n
    \n
  • \n

    Specify a canned ACL with the x-amz-acl request header. Amazon S3\n supports a set of predefined ACLs, known as canned\n ACLs. Each canned ACL has a predefined set of grantees and\n permissions. Specify the canned ACL name as the value of\n x-amz-acl. If you use this header, you cannot use other\n access control-specific headers in your request. For more information, see\n Canned\n 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. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use the x-amz-acl header to set a canned\n ACL. These parameters map to the set of permissions that Amazon S3 supports in an\n 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\n the following:

    \n
      \n
    • \n

      \n id \u2013 if the value specified is the canonical user ID\n of an Amazon Web Services account

      \n
    • \n
    • \n

      \n uri \u2013 if you are granting permissions to a predefined\n group

      \n
    • \n
    • \n

      \n emailAddress \u2013 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\u00e3o 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\n create, overwrite, and delete objects permission to LogDelivery group\n predefined by Amazon S3 and two Amazon Web Services accounts identified by their email\n addresses.

    \n

    \n x-amz-grant-write:\n uri=\"http://acs.amazonaws.com/groups/s3/LogDelivery\", id=\"111122223333\",\n id=\"555566667777\" \n

    \n
  • \n
\n

You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.

\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights\n (using 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<>&\n

    \n

    The grantee is resolved to the CanonicalUser and, in a response to a GET\n Object 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\u00e3o 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

The following operations are related to PutBucketAcl:

\n ", + "smithy.api#examples": [ + { + "title": "Put bucket acl", + "documentation": "The following example replaces existing ACL on a bucket. The ACL grants the bucket owner (specified using the owner ID) and write permission to the LogDelivery group. Because this is a replace operation, you must specify all the grants in your request. To incrementally add or remove ACL grants, you might use the console.", "input": { - "target": "com.amazonaws.s3#UploadPartRequest" - }, - "output": { - "target": "com.amazonaws.s3#UploadPartOutput" - }, - "traits": { - "aws.protocols#httpChecksum": { - "requestAlgorithmMember": "ChecksumAlgorithm" - }, - "smithy.api#documentation": "

Uploads a part in a multipart upload.

\n \n

In this operation, you provide new data as a part of an object in your request.\n However, you have an option to specify your existing Amazon S3 object as a data source for\n the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

\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\n specifications, see Multipart upload limits in the Amazon S3 User Guide.

\n \n

After you initiate multipart upload and upload one or more parts, you must either\n complete or abort multipart upload in order to stop getting charged for storage of the\n uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up\n the parts storage and stops charging you for the parts storage.

\n
\n

For more information on multipart uploads, go to Multipart Upload Overview in the\n Amazon S3 User Guide .

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n perform a multipart upload with encryption using an Key Management Service key, the\n requester must have permission to the kms:Decrypt and\n kms:GenerateDataKey actions on the key. The requester must\n also have permissions for the kms:GenerateDataKey action for\n the CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs.

    \n

    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\n more information about KMS permissions, see Protecting data\n using server-side encryption with KMS in the\n Amazon S3 User Guide. For information about the\n permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Data integrity
\n
\n

\n General purpose bucket - To ensure that data\n is not corrupted traversing the network, specify the Content-MD5\n header in the upload part request. Amazon S3 checks the part data against the provided\n MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is\n 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\n Version 4).

\n \n

\n Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

\n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose bucket - Server-side\n encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it.\n You have mutually exclusive options to protect data using server-side\n encryption in Amazon S3, depending on how you choose to manage the encryption\n keys. Specifically, the encryption key options are Amazon S3 managed keys\n (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C).\n Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys\n (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest\n using server-side encryption with other key options. The option you use\n depends on whether you want to use KMS keys (SSE-KMS) or provide your own\n encryption key (SSE-C).

    \n

    Server-side encryption is supported by the S3 Multipart Upload\n operations. Unless you are using a customer-provided encryption key (SSE-C),\n you don't need to specify the encryption parameters in each UploadPart\n request. Instead, you only need to specify the server-side encryption\n parameters in the initial Initiate Multipart request. For more information,\n see CreateMultipartUpload.

    \n

    If you request server-side encryption using a customer-provided\n encryption key (SSE-C) in your initiate multipart upload request, you must\n provide identical encryption information in each part upload using the\n following request 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, see Using\n Server-Side Encryption in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms).

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to UploadPart:

\n ", - "smithy.api#examples": [ - { - "title": "To upload a part", - "documentation": "The following example uploads part 1 of a multipart upload. The example specifies a file name for the part data. The Upload ID is same that is returned by the initiate multipart upload.", - "input": { - "Body": "fileToUpload", - "Bucket": "examplebucket", - "Key": "examplelargeobject", - "PartNumber": 1, - "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" - }, - "output": { - "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}/{Key+}?x-id=UploadPart", - "code": 200 - } - } - }, - "com.amazonaws.s3#UploadPartCopy": { - "type": "operation", + "Bucket": "examplebucket", + "GrantFullControl": "id=examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484", + "GrantWrite": "uri=http://acs.amazonaws.com/groups/s3/LogDelivery" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?acl", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketAclRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#BucketCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the bucket.

", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "AccessControlPolicy": { + "target": "com.amazonaws.s3#AccessControlPolicy", + "traits": { + "smithy.api#documentation": "

Contains the elements that set the ACL permissions for an object per grantee.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "AccessControlPolicy" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket to which to apply the ACL.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWrite": { + "target": "com.amazonaws.s3#GrantWrite", + "traits": { + "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

", + "smithy.api#httpHeader": "x-amz-grant-write" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketAnalyticsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketAnalyticsConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets an analytics configuration for the bucket (specified by the analytics configuration\n ID). You can have up to 1,000 analytics configurations per bucket.

\n

You can choose to have storage class analysis export analysis reports sent to a\n comma-separated values (CSV) flat file. See the DataExport request element.\n Reports are updated daily and are based on the object filters that you configure. When\n selecting data export, you specify a destination bucket and an optional destination prefix\n where the file is written. You can export the data to a destination bucket in a different\n account. However, the destination bucket must be in the same Region as the bucket that you\n are making the PUT analytics configuration to. For more information, see Amazon S3\n Analytics \u2013 Storage Class Analysis.

\n \n

You must create a bucket policy on the destination bucket where the exported file is\n written to grant permissions to Amazon S3 to write objects to the bucket. For an example\n policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

\n
\n

To use this operation, you must have permissions to perform the\n s3:PutAnalyticsConfiguration 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 PutBucketAnalyticsConfiguration has the following special errors:

\n
    \n
  • \n
      \n
    • \n

      \n HTTP Error: HTTP 400 Bad Request\n

      \n
    • \n
    • \n

      \n Code: InvalidArgument\n

      \n
    • \n
    • \n

      \n Cause: Invalid argument.\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n HTTP Error: HTTP 400 Bad Request\n

      \n
    • \n
    • \n

      \n Code: TooManyConfigurations\n

      \n
    • \n
    • \n

      \n Cause: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n HTTP Error: HTTP 403 Forbidden\n

      \n
    • \n
    • \n

      \n Code: AccessDenied\n

      \n
    • \n
    • \n

      \n Cause: You are not the owner of the specified bucket, or you do\n not have the s3:PutAnalyticsConfiguration bucket permission to set the\n configuration on the bucket.\n

      \n
    • \n
    \n
  • \n
\n

The following operations are related to\n PutBucketAnalyticsConfiguration:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?analytics", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketAnalyticsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket to which an analytics configuration is stored.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#AnalyticsId", + "traits": { + "smithy.api#documentation": "

The ID that identifies the analytics configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "AnalyticsConfiguration": { + "target": "com.amazonaws.s3#AnalyticsConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration and any analyses for the analytics filter.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "AnalyticsConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketCors": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketCorsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 Cross-Origin Resource Sharing in\n the Amazon S3 User Guide.

\n

The following operations are related to PutBucketCors:

\n ", + "smithy.api#examples": [ + { + "title": "To set cors configuration on a bucket.", + "documentation": "The following example enables PUT, POST, and DELETE requests from www.example.com, and enables GET requests from any domain.", "input": { - "target": "com.amazonaws.s3#UploadPartCopyRequest" - }, - "output": { - "target": "com.amazonaws.s3#UploadPartCopyOutput" - }, - "traits": { - "smithy.api#documentation": "

Uploads a part by copying data from an existing object as data source. To specify the\n data source, you add the request header x-amz-copy-source in your request. To\n specify a byte range, you add the request header x-amz-copy-source-range in\n your request.

\n

For information about maximum and minimum part sizes and other multipart upload\n specifications, see Multipart upload limits in the Amazon S3 User Guide.

\n \n

Instead of copying data from an existing object as part data, you might use the\n UploadPart action to upload new data as a part of an object in your\n request.

\n
\n

You must initiate a multipart upload before you can upload any part. In response to your\n initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in\n your upload part request.

\n

For conceptual information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide. For information about\n copying objects using a single atomic action vs. a multipart upload, see Operations on\n Objects in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Authentication and authorization
\n
\n

All UploadPartCopy requests must be authenticated and signed by\n using IAM credentials (access key ID and secret access key for the IAM\n identities). All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use IAM\n credentials to authenticate and authorize your access to the\n UploadPartCopy API operation, instead of using the temporary\n security credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

You must have READ access to the source object and\n WRITE access to the destination bucket.

\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the permissions in a policy based on the bucket types of your\n source bucket and destination bucket in an UploadPartCopy\n operation.

    \n
      \n
    • \n

      If the source object is in a general purpose bucket, you must have the\n \n s3:GetObject\n \n permission to read the source object that is being copied.

      \n
    • \n
    • \n

      If the destination bucket is a general purpose bucket, you must have the\n \n s3:PutObject\n \n permission to write the object copy to the destination bucket.

      \n
    • \n
    • \n

      To perform a multipart upload with encryption using an Key Management Service\n key, the requester must have permission to the\n kms:Decrypt and kms:GenerateDataKey\n actions on the key. The requester must also have permissions for the\n kms:GenerateDataKey action for the\n CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs. These\n permissions are required because Amazon S3 must decrypt and read data from\n the encrypted file parts before it completes the multipart upload. For\n more information about KMS permissions, see Protecting\n data using server-side encryption with KMS in the\n Amazon S3 User Guide. For information about the\n permissions required to use the multipart upload API, see Multipart upload\n and permissions and Multipart upload API and permissions in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have permissions in a bucket policy or an IAM identity-based policy based on the\n source and destination bucket types in an UploadPartCopy\n operation.

    \n
      \n
    • \n

      If the source object that you want to copy is in a\n directory bucket, you must have the \n s3express:CreateSession\n permission in\n the Action element of a policy to read the object. By\n default, the session is in the ReadWrite mode. If you\n want to restrict the access, you can explicitly set the\n s3express:SessionMode condition key to\n ReadOnly on the copy source bucket.

      \n
    • \n
    • \n

      If the copy destination is a directory bucket, you must have the\n \n s3express:CreateSession\n permission in the\n Action element of a policy to write the object to the\n destination. The s3express:SessionMode condition key\n cannot be set to ReadOnly on the copy destination.\n

      \n
    • \n
    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n

    For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose buckets -\n For information about using\n server-side encryption with customer-provided encryption keys with the\n UploadPartCopy operation, see CopyObject and\n UploadPart.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    \n \n

    For directory buckets, when you perform a\n CreateMultipartUpload operation and an\n UploadPartCopy operation, the request headers you provide\n in the CreateMultipartUpload request must match the default\n encryption configuration of the destination bucket.

    \n
    \n

    S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through UploadPartCopy. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    \n
  • \n
  • \n

    Error Code: InvalidRequest\n

    \n
      \n
    • \n

      Description: The specified copy source is not supported as a\n byte-range copy source.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to UploadPartCopy:

\n ", - "smithy.api#examples": [ - { - "title": "To upload a part by copying byte range from an existing object as data source", - "documentation": "The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.", - "input": { - "Bucket": "examplebucket", - "CopySource": "/bucketname/sourceobjectkey", - "CopySourceRange": "bytes=1-100000", - "Key": "examplelargeobject", - "PartNumber": 2, - "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" - }, - "output": { - "CopyPartResult": { - "LastModified": "2016-12-29T21:44:28.000Z", - "ETag": "\"65d16d19e65a7508a51f043180edcc36\"" - } - } + "Bucket": "", + "CORSConfiguration": { + "CORSRules": [ + { + "AllowedOrigins": [ + "http://www.example.com" + ], + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "PUT", + "POST", + "DELETE" + ], + "MaxAgeSeconds": 3000, + "ExposeHeaders": [ + "x-amz-server-side-encryption" + ] + }, + { + "AllowedOrigins": [ + "*" + ], + "AllowedHeaders": [ + "Authorization" + ], + "AllowedMethods": [ + "GET" + ], + "MaxAgeSeconds": 3000 + } + ] + }, + "ContentMD5": "" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?cors", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketCorsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies the bucket impacted by the corsconfiguration.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CORSConfiguration": { + "target": "com.amazonaws.s3#CORSConfiguration", + "traits": { + "smithy.api#documentation": "

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more\n information, see Enabling\n Cross-Origin Resource Sharing in the\n Amazon S3 User Guide.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "CORSConfiguration" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketEncryption": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketEncryptionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

This operation configures default encryption and Amazon S3 Bucket Keys for an existing\n bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n

By default, all buckets have a default encryption configuration that uses server-side\n encryption with Amazon S3 managed keys (SSE-S3).

\n \n
    \n
  • \n

    \n General purpose buckets\n

    \n
      \n
    • \n

      You can optionally configure default encryption for a bucket by using\n server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer\n server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify\n default encryption by using SSE-KMS, you can also configure Amazon S3\n Bucket Keys. For information about the bucket default encryption\n feature, see Amazon S3 Bucket Default\n Encryption in the Amazon S3 User Guide.

      \n
    • \n
    • \n

      If you use PutBucketEncryption to set your default bucket\n encryption to SSE-KMS, you should verify that your KMS key ID\n is correct. Amazon S3 doesn't validate the KMS key ID provided in\n PutBucketEncryption requests.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory buckets - You can\n optionally configure default encryption for a bucket by using server-side\n encryption with Key Management Service (KMS) keys (SSE-KMS).

    \n
      \n
    • \n

      We recommend that the bucket's default encryption uses the desired\n encryption configuration and you don't override the bucket default\n encryption in your CreateSession requests or PUT\n object requests. Then, new objects are automatically encrypted with the\n desired encryption settings.\n For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      \n
    • \n
    • \n

      Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

      \n
    • \n
    • \n

      S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      \n
    • \n
    • \n

      When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      \n
    • \n
    • \n

      For directory buckets, if you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, Amazon S3 validates the\n KMS key ID provided in PutBucketEncryption requests.

      \n
    • \n
    \n
  • \n
\n
\n \n

If you're specifying a customer managed KMS key, we recommend using a fully\n qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the\n key within the requester\u2019s account. This behavior can result in data that's encrypted\n with a KMS key that belongs to the requester, and not the bucket owner.

\n

Also, this action requires Amazon Web Services Signature Version 4. For more information, see\n Authenticating\n Requests (Amazon Web Services Signature Version 4).

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutEncryptionConfiguration permission is required in a\n policy. The bucket owner has this permission by default. The bucket owner\n can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Operations and Managing Access\n Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutEncryptionConfiguration permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n

    To set a directory bucket default encryption with SSE-KMS, you must also\n have the kms:GenerateDataKey and the kms:Decrypt\n permissions in IAM identity-based policies and KMS key policies for the\n target KMS key.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to PutBucketEncryption:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?encryption", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketEncryptionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

Specifies default encryption for a bucket using server-side encryption with different\n key options.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the server-side encryption\n configuration.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, + "ServerSideEncryptionConfiguration": { + "target": "com.amazonaws.s3#ServerSideEncryptionConfiguration", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "ServerSideEncryptionConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketIntelligentTieringConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketIntelligentTieringConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to\n 1,000 S3 Intelligent-Tiering configurations per bucket.

\n

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

\n

The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

\n

For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

\n

Operations related to PutBucketIntelligentTieringConfiguration include:

\n \n \n

You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically\n move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access\n or Deep Archive Access tier.

\n
\n

\n PutBucketIntelligentTieringConfiguration has the following special\n errors:

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: InvalidArgument

\n

\n Cause: Invalid Argument

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: TooManyConfigurations

\n

\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.

\n
\n
HTTP 403 Forbidden Error
\n
\n

\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutIntelligentTieringConfiguration bucket\n permission to set the configuration on the bucket.

\n
\n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?intelligent-tiering", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketIntelligentTieringConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#IntelligentTieringId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the S3 Intelligent-Tiering configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "IntelligentTieringConfiguration": { + "target": "com.amazonaws.s3#IntelligentTieringConfiguration", + "traits": { + "smithy.api#documentation": "

Container for S3 Intelligent-Tiering configuration.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "IntelligentTieringConfiguration" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketInventoryConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketInventoryConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This implementation of the PUT action adds an inventory configuration\n (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory\n configurations per bucket.

\n

Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly\n basis, and the results are published to a flat file. The bucket that is inventoried is\n called the source bucket, and the bucket where the inventory flat file\n is stored is called the destination bucket. The\n destination bucket must be in the same Amazon Web Services Region as the\n source bucket.

\n

When you configure an inventory for a source bucket, you specify\n the destination bucket where you want the inventory to be stored, and\n whether to generate the inventory daily or weekly. You can also configure what object\n metadata to include and whether to inventory all object versions or only current versions.\n For more information, see Amazon S3 Inventory in the\n Amazon S3 User Guide.

\n \n

You must create a bucket policy on the destination bucket to\n grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an\n example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

\n
\n
\n
Permissions
\n
\n

To use this operation, you must have permission to perform the\n s3:PutInventoryConfiguration action. The bucket owner has this\n permission by default and can grant this permission to others.

\n

The s3:PutInventoryConfiguration permission allows a user to\n create an S3 Inventory\n report that includes all object metadata fields available and to specify the\n destination bucket to store the inventory. A user with read access to objects in\n the destination bucket can also access all object metadata fields that are\n available in the inventory report.

\n

To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the\n Amazon S3 User Guide. For more information about the metadata\n fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For\n more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the\n Amazon S3 User Guide.

\n
\n
\n

\n PutBucketInventoryConfiguration has the following special errors:

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: InvalidArgument

\n

\n Cause: Invalid Argument

\n
\n
HTTP 400 Bad Request Error
\n
\n

\n Code: TooManyConfigurations

\n

\n Cause: You are attempting to create a new configuration\n but have already reached the 1,000-configuration limit.

\n
\n
HTTP 403 Forbidden Error
\n
\n

\n Cause: You are not the owner of the specified bucket, or\n you do not have the s3:PutInventoryConfiguration bucket permission to\n set the configuration on the bucket.

\n
\n
\n

The following operations are related to\n PutBucketInventoryConfiguration:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?inventory", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketInventoryConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket where the inventory configuration will be stored.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#InventoryId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the inventory configuration.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "InventoryConfiguration": { + "target": "com.amazonaws.s3#InventoryConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the inventory configuration.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "InventoryConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketLifecycleConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketLifecycleConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutBucketLifecycleConfigurationOutput" + }, + "traits": { + "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,\n so if you want to retain any configuration details, they must be included in the new\n lifecycle configuration. For information about lifecycle configuration, see Managing\n your storage lifecycle.

\n \n

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility.\n For the related API description, see PutBucketLifecycle.

\n
\n
\n
Rules
\n
Permissions
\n
HTTP Host header syntax
\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\n Lifecycle configuration can have up to 1,000 rules. This limit is not\n adjustable.

\n

Bucket lifecycle configuration supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, object size, or any combination\n of these. Accordingly, this section describes the latest API. The previous version\n of the API supported filtering based only on an object key name prefix, which is\n supported for backward compatibility for general purpose buckets. For the related\n API description, see PutBucketLifecycle.

\n \n

Lifecyle configurations for directory buckets only support expiring objects and\n cancelling multipart uploads. Expiring of versioned objects,transitions and tag\n filters are not supported.

\n
\n

A lifecycle rule consists of the following:

\n
    \n
  • \n

    A filter identifying a subset of objects to which the rule applies. The\n filter can be based on a key name prefix, object tags, object size, or any\n combination of these.

    \n
  • \n
  • \n

    A status indicating whether the rule is in effect.

    \n
  • \n
  • \n

    One or more lifecycle transition and expiration actions that you want\n Amazon S3 to perform on the objects identified by the filter. If the state of\n your bucket is versioning-enabled or versioning-suspended, you can have many\n versions of the same object (one current version and zero or more noncurrent\n versions). Amazon S3 provides predefined actions that you can specify for current\n and noncurrent object versions.

    \n
  • \n
\n

For more information, see Object Lifecycle\n Management and Lifecycle Configuration\n Elements.

\n
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - By\n default, all Amazon S3 resources are private, including buckets, objects, and\n related subresources (for example, lifecycle configuration and website\n configuration). Only the resource owner (that is, the Amazon Web Services account that\n created it) can access the resource. The resource owner can optionally grant\n access permissions to others by writing an access policy. For this\n operation, a user must have the s3:PutLifecycleConfiguration\n permission.

    \n

    You can also explicitly deny permissions. An explicit deny also\n supersedes any other permissions. If you want to block users or accounts\n from removing or deleting objects from your bucket, you must deny them\n permissions for the following actions:

    \n \n
  • \n
\n
    \n
  • \n

    \n Directory bucket permissions -\n You must have the s3express:PutLifecycleConfiguration\n permission in an IAM identity-based policy to use this operation.\n Cross-account access to this API operation isn't supported. The resource\n owner can optionally grant access permissions to others by creating a role\n or user for them as long as they are within the same account as the owner\n and resource.

    \n

    For more information about directory bucket policies and permissions, see\n Authorizing Regional endpoint APIs with IAM in the\n Amazon S3 User Guide.

    \n \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
\n

\n Directory buckets - The HTTP Host\n header syntax is\n s3express-control.region.amazonaws.com.

\n

The following operations are related to\n PutBucketLifecycleConfiguration:

\n \n
\n
", + "smithy.api#examples": [ + { + "title": "Put bucket lifecycle", + "documentation": "The following example replaces existing lifecycle configuration, if any, on the specified bucket. ", + "input": { + "Bucket": "examplebucket", + "LifecycleConfiguration": { + "Rules": [ + { + "Filter": { + "Prefix": "documents/" + }, + "Status": "Enabled", + "Transitions": [ + { + "Days": 365, + "StorageClass": "GLACIER" + } + ], + "Expiration": { + "Days": 3650 }, + "ID": "TestOnly" + } + ] + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?lifecycle", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketLifecycleConfigurationOutput": { + "type": "structure", + "members": { + "TransitionDefaultMinimumObjectSize": { + "target": "com.amazonaws.s3#TransitionDefaultMinimumObjectSize", + "traits": { + "smithy.api#documentation": "

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not\n transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", + "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutBucketLifecycleConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to set the configuration.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for lifecycle rules. You can add as many as 1,000 rules.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "LifecycleConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "TransitionDefaultMinimumObjectSize": { + "target": "com.amazonaws.s3#TransitionDefaultMinimumObjectSize", + "traits": { + "smithy.api#documentation": "

Indicates which default minimum object size behavior is applied to the lifecycle\n configuration.

\n \n

This parameter applies to general purpose buckets only. It is not supported for\n directory bucket lifecycle configurations.

\n
\n
    \n
  • \n

    \n all_storage_classes_128K - Objects smaller than 128 KB will not\n transition to any storage class by default.

    \n
  • \n
  • \n

    \n varies_by_storage_class - Objects smaller than 128 KB will\n transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By\n default, all other storage classes will prevent transitions smaller than 128 KB.\n

    \n
  • \n
\n

To customize the minimum object size for any transition you can add a filter that\n specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in\n the body of your transition rule. Custom filters always take precedence over the default\n transition behavior.

", + "smithy.api#httpHeader": "x-amz-transition-default-minimum-object-size" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketLogging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketLoggingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n the source bucket. To set the logging status of a bucket, you must be the bucket\n owner.

\n

The bucket owner is automatically granted FULL_CONTROL to all logs. You use the\n 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 setting for S3\n Object Ownership, you can't use the Grantee request element to grant access\n to others. Permissions can only be granted using policies. For more information, see\n Permissions for server access log delivery in the\n Amazon S3 User Guide.

\n
\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights (by\n using request elements) in the following ways:

\n
    \n
  • \n

    By the person's ID:

    \n

    \n <>ID<><>GranteesEmail<>\n \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\n response to a GETObjectAcl request, appears as the\n 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\n elements. To disable logging, you use an empty BucketLoggingStatus request\n element:

\n

\n \n

\n

For more information about server access logging, see Server Access Logging in the\n Amazon S3 User Guide.

\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

The following operations are related to PutBucketLogging:

\n ", + "smithy.api#examples": [ + { + "title": "Set logging configuration for a bucket", + "documentation": "The following example sets logging policy on a bucket. For the Log Delivery group to deliver logs to the destination bucket, it needs permission for the READ_ACP action which the policy grants.", + "input": { + "Bucket": "sourcebucket", + "BucketLoggingStatus": { + "LoggingEnabled": { + "TargetBucket": "targetbucket", + "TargetPrefix": "MyBucketLogs/", + "TargetGrants": [ { - "title": "To upload a part by copying data from an existing object as data source", - "documentation": "The following example uploads a part of a multipart upload by copying data from an existing object as data source.", - "input": { - "Bucket": "examplebucket", - "CopySource": "/bucketname/sourceobjectkey", - "Key": "examplelargeobject", - "PartNumber": 1, - "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" - }, - "output": { - "CopyPartResult": { - "LastModified": "2016-12-29T21:24:43.000Z", - "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"" - } - } - } - ], - "smithy.api#http": { - "method": "PUT", - "uri": "/{Bucket}/{Key+}?x-id=UploadPartCopy", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "DisableS3ExpressSessionAuth": { - "value": true - } - } - } - }, - "com.amazonaws.s3#UploadPartCopyOutput": { - "type": "structure", - "members": { - "CopySourceVersionId": { - "target": "com.amazonaws.s3#CopySourceVersionId", - "traits": { - "smithy.api#documentation": "

The version of the source object that was copied, if you have enabled versioning on the\n source bucket.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source-version-id" - } - }, - "CopyPartResult": { - "target": "com.amazonaws.s3#CopyPartResult", - "traits": { - "smithy.api#documentation": "

Container for all response elements.

", - "smithy.api#httpPayload": {} - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" - } - }, - "SSECustomerKeyMD5": { - "target": "com.amazonaws.s3#SSECustomerKeyMD5", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#UploadPartCopyRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n \n

Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, \n you get an HTTP 400 Bad Request error with the error code InvalidRequest.

\n
\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "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 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
      \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
    • \n

      Access points are not supported by directory buckets.

      \n
    • \n
    \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

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 source object to copy. To copy a specific version of the source object to copy, append\n ?versionId= to the x-amz-copy-source request\n header (for example, x-amz-copy-source:\n /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

\n

If the current version is a delete marker and you don't specify a versionId in the\n x-amz-copy-source request header, Amazon S3 returns a 404 Not Found\n error, because the object does not exist. If you specify versionId in the\n x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an\n HTTP 400 Bad Request error, because you are not allowed to specify a delete\n marker as a version for the x-amz-copy-source.

\n \n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source", - "smithy.api#required": {} - } - }, - "CopySourceIfMatch": { - "target": "com.amazonaws.s3#CopySourceIfMatch", - "traits": { - "smithy.api#documentation": "

Copies the object if its entity tag (ETag) matches the specified tag.

\n

If both of the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request as\n 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

", - "smithy.api#httpHeader": "x-amz-copy-source-if-match" - } - }, - "CopySourceIfModifiedSince": { - "target": "com.amazonaws.s3#CopySourceIfModifiedSince", - "traits": { - "smithy.api#documentation": "

Copies the object if it has been modified since the specified time.

\n

If both of the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request as\n follows:

\n

\n x-amz-copy-source-if-none-match condition evaluates to false,\n 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

", - "smithy.api#httpHeader": "x-amz-copy-source-if-modified-since" - } - }, - "CopySourceIfNoneMatch": { - "target": "com.amazonaws.s3#CopySourceIfNoneMatch", - "traits": { - "smithy.api#documentation": "

Copies the object if its entity tag (ETag) is different than the specified ETag.

\n

If both of the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request as\n follows:

\n

\n x-amz-copy-source-if-none-match condition evaluates to false,\n 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

", - "smithy.api#httpHeader": "x-amz-copy-source-if-none-match" - } - }, - "CopySourceIfUnmodifiedSince": { - "target": "com.amazonaws.s3#CopySourceIfUnmodifiedSince", - "traits": { - "smithy.api#documentation": "

Copies the object if it hasn't been modified since the specified time.

\n

If both of the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request as\n 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

", - "smithy.api#httpHeader": "x-amz-copy-source-if-unmodified-since" - } - }, - "CopySourceRange": { - "target": "com.amazonaws.s3#CopySourceRange", - "traits": { - "smithy.api#documentation": "

The range of bytes to copy from the source object. The range value must use the form\n bytes=first-last, where the first and last are the zero-based byte offsets to copy. For\n example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You\n can copy a range only if the source object is greater than 5 MB.

", - "smithy.api#httpHeader": "x-amz-copy-source-range" - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "PartNumber": { - "target": "com.amazonaws.s3#PartNumber", - "traits": { - "smithy.api#documentation": "

Part number of part being copied. This is a positive integer between 1 and\n 10,000.

", - "smithy.api#httpQuery": "partNumber", - "smithy.api#required": {} - } - }, - "UploadId": { - "target": "com.amazonaws.s3#MultipartUploadId", - "traits": { - "smithy.api#documentation": "

Upload ID identifying the multipart upload whose part is being copied.

", - "smithy.api#httpQuery": "uploadId", - "smithy.api#required": {} - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example, AES256).

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", - "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. This must be the\n same encryption key specified in the initiate multipart upload request.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", - "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "CopySourceSSECustomerAlgorithm": { - "target": "com.amazonaws.s3#CopySourceSSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when decrypting the source object (for example,\n AES256).

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-algorithm" - } - }, - "CopySourceSSECustomerKey": { - "target": "com.amazonaws.s3#CopySourceSSECustomerKey", - "traits": { - "smithy.api#documentation": "

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be one that was used when the\n source object was created.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key" - } - }, - "CopySourceSSECustomerKeyMD5": { - "target": "com.amazonaws.s3#CopySourceSSECustomerKeyMD5", - "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.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", - "smithy.api#httpHeader": "x-amz-copy-source-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 destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } + "Grantee": { + "Type": "Group", + "URI": "http://acs.amazonaws.com/groups/global/AllUsers" + }, + "Permission": "READ" + } + ] + } + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?logging", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketLoggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which to set the logging parameters.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "BucketLoggingStatus": { + "target": "com.amazonaws.s3#BucketLoggingStatus", + "traits": { + "smithy.api#documentation": "

Container for logging status information.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "BucketLoggingStatus" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash of the PutBucketLogging request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketMetricsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketMetricsConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets a metrics configuration (specified by the metrics configuration ID) for the bucket.\n You can have up to 1,000 metrics configurations per bucket. If you're updating an existing\n metrics configuration, note that this is a full replacement of the existing metrics\n configuration. If you don't include the elements you want to keep, they are erased.

\n

To use this operation, you must have permissions to perform the\n s3:PutMetricsConfiguration action. The bucket owner has this permission by\n default. The bucket owner can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n

For information about CloudWatch request metrics for Amazon S3, see Monitoring\n Metrics with Amazon CloudWatch.

\n

The following operations are related to\n PutBucketMetricsConfiguration:

\n \n

\n PutBucketMetricsConfiguration has the following special error:

\n
    \n
  • \n

    Error code: TooManyConfigurations\n

    \n
      \n
    • \n

      Description: You are attempting to create a new configuration but have\n already reached the 1,000-configuration limit.

      \n
    • \n
    • \n

      HTTP Status Code: HTTP 400 Bad Request

      \n
    • \n
    \n
  • \n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?metrics", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketMetricsConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket for which the metrics configuration is set.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Id": { + "target": "com.amazonaws.s3#MetricsId", + "traits": { + "smithy.api#documentation": "

The ID used to identify the metrics configuration. The ID has a 64 character limit and\n can only contain letters, numbers, periods, dashes, and underscores.

", + "smithy.api#httpQuery": "id", + "smithy.api#required": {} + } + }, + "MetricsConfiguration": { + "target": "com.amazonaws.s3#MetricsConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the metrics configuration.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "MetricsConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketNotificationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketNotificationConfigurationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Enables notifications of specified events for a bucket. For more information about event\n notifications, see Configuring Event\n Notifications.

\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

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

This action replaces the existing notification configuration with the configuration you\n include in the request body.

\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 Events.

\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\n create per bucket, see Amazon S3 service quotas in Amazon Web Services\n 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 the required s3:PutBucketNotification permission.

\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 the\n configuration to your bucket.

\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

The following action is related to\n PutBucketNotificationConfiguration:

\n ", + "smithy.api#examples": [ + { + "title": "Set notification configuration for a bucket", + "documentation": "The following example sets notification configuration on a bucket to publish the object created events to an SNS topic.", + "input": { + "Bucket": "examplebucket", + "NotificationConfiguration": { + "TopicConfigurations": [ + { + "TopicArn": "arn:aws:sns:us-west-2:123456789012:s3-notification-topic", + "Events": [ + "s3:ObjectCreated:*" + ] + } + ] + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?notification", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketNotificationConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "NotificationConfiguration": { + "target": "com.amazonaws.s3#NotificationConfiguration", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "NotificationConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "SkipDestinationValidation": { + "target": "com.amazonaws.s3#SkipValidation", + "traits": { + "smithy.api#documentation": "

Skips validation of Amazon SQS, Amazon SNS, and Lambda\n destinations. True or false value.

", + "smithy.api#httpHeader": "x-amz-skip-destination-validation" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketOwnershipControls": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketOwnershipControlsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n policy.

\n

For information about Amazon S3 Object Ownership, see Using object\n ownership.

\n

The following operations are related to PutBucketOwnershipControls:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?ownershipControls", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketOwnershipControlsRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose OwnershipControls you want to set.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash of the OwnershipControls request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "smithy.api#httpHeader": "Content-MD5" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "OwnershipControls": { + "target": "com.amazonaws.s3#OwnershipControls", + "traits": { + "smithy.api#documentation": "

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or\n ObjectWriter) that you want to apply to this Amazon S3 bucket.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "OwnershipControls" + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when you use the\n SDK. This header will not provide any additional functionality if you don't use the\n SDK. When you send this header, there must be a corresponding\n x-amz-checksum-algorithm\n header sent. Otherwise, Amazon S3 fails the request with the HTTP\n status code 400 Bad Request. For more information, see Checking object\n integrity in the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketPolicyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

\n \n

\n Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. \nFor more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n

If you are using an identity other than the root user of the Amazon Web Services account that\n owns the bucket, the calling identity must both have the\n PutBucketPolicy permissions on the specified bucket and belong to\n the bucket owner's account in order to use this operation.

\n

If you don't have PutBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but\n you're not using an identity that belongs to the bucket owner's account, Amazon S3\n returns a 405 Method Not Allowed error.

\n \n

To ensure that bucket owners don't inadvertently lock themselves out of\n their own buckets, the root principal in a bucket owner's Amazon Web Services account can\n perform the GetBucketPolicy, PutBucketPolicy, and\n DeleteBucketPolicy API actions, even if their bucket policy\n explicitly denies the root principal's access. Bucket owner root principals can\n only be blocked from performing these API actions by VPC endpoint policies and\n Amazon Web Services Organizations policies.

\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n s3:PutBucketPolicy permission is required in a policy. For\n more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions -\n To grant access to this API operation, you must have the\n s3express:PutBucketPolicy permission in\n an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource.\n For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Example bucket policies
\n
\n

\n General purpose buckets example bucket policies\n - See Bucket policy\n examples in the Amazon S3 User Guide.

\n

\n Directory bucket example bucket policies\n - See Example bucket policies for S3 Express One Zone in the\n Amazon S3 User Guide.

\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to PutBucketPolicy:

\n ", + "smithy.api#examples": [ + { + "title": "Set bucket policy", + "documentation": "The following example sets a permission policy on a bucket.", + "input": { + "Bucket": "examplebucket", + "Policy": "{\"Version\": \"2012-10-17\", \"Statement\": [{ \"Sid\": \"id-1\",\"Effect\": \"Allow\",\"Principal\": {\"AWS\": \"arn:aws:iam::123456789012:root\"}, \"Action\": [ \"s3:PutObject\",\"s3:PutObjectAcl\"], \"Resource\": [\"arn:aws:s3:::acl3/*\" ] } ]}" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?policy", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketPolicyRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name\n . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash of the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n \n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

\n
", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, + "ConfirmRemoveSelfBucketAccess": { + "target": "com.amazonaws.s3#ConfirmRemoveSelfBucketAccess", + "traits": { + "smithy.api#documentation": "

Set this parameter to true to confirm that you want to remove your permissions to change\n this bucket policy in the future.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-confirm-remove-self-bucket-access" + } + }, + "Policy": { + "target": "com.amazonaws.s3#Policy", + "traits": { + "smithy.api#documentation": "

The bucket policy as a JSON document.

\n

For directory buckets, the only IAM action supported in the bucket policy is\n s3express:CreateSession.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

\n \n

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code \n501 Not Implemented.

\n
", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketReplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketReplicationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Creates a replication configuration or replaces an existing one. For more information,\n see Replication in the Amazon S3 User Guide.

\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. You can invoke this request for a specific Amazon Web Services\n Region by using the \n aws:RequestedRegion\n condition key.

\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

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
Handling Replication of Encrypted Objects
\n
\n

By default, Amazon S3 doesn't replicate objects that are stored at rest using\n server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects,\n add the following: SourceSelectionCriteria,\n SseKmsEncryptedObjects, Status,\n EncryptionConfiguration, and ReplicaKmsKeyID. For\n information about replication configuration, see Replicating\n Objects Created with SSE Using KMS keys.

\n

For information on PutBucketReplication errors, see List of\n replication-related error codes\n

\n
\n
Permissions
\n
\n

To create a PutBucketReplication request, you must have\n s3:PutReplicationConfiguration permissions for the bucket.\n \n

\n

By default, a resource owner, in this case the Amazon Web Services account that created the\n bucket, can perform this operation. The resource owner can also grant others\n permissions to perform the operation. For more information about permissions, see\n Specifying Permissions in\n a Policy and Managing Access\n Permissions to Your Amazon S3 Resources.

\n \n

To perform this operation, the user or role performing the action must have\n the iam:PassRole\n permission.

\n
\n
\n
\n

The following operations are related to PutBucketReplication:

\n ", + "smithy.api#examples": [ + { + "title": "Set replication configuration on a bucket", + "documentation": "The following example sets replication configuration on a bucket.", + "input": { + "Bucket": "examplebucket", + "ReplicationConfiguration": { + "Role": "arn:aws:iam::123456789012:role/examplerole", + "Rules": [ + { + "Prefix": "", + "Status": "Enabled", + "Destination": { + "Bucket": "arn:aws:s3:::destinationbucket", + "StorageClass": "STANDARD" + } + } + ] + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?replication", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketReplicationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "ReplicationConfiguration" + } + }, + "Token": { + "target": "com.amazonaws.s3#ObjectLockToken", + "traits": { + "smithy.api#documentation": "

A token to allow Object Lock to be enabled for an existing bucket.

", + "smithy.api#httpHeader": "x-amz-bucket-object-lock-token" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketRequestPayment": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketRequestPaymentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

The following operations are related to PutBucketRequestPayment:

\n ", + "smithy.api#examples": [ + { + "title": "Set request payment configuration on a bucket.", + "documentation": "The following example sets request payment configuration on a bucket so that person requesting the download is charged.", + "input": { + "Bucket": "examplebucket", + "RequestPaymentConfiguration": { + "Payer": "Requester" + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?requestPayment", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketRequestPaymentRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for Payer.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "RequestPaymentConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketTaggingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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,\n sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost\n of combined resources, organize your billing information according to resources with the\n same 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 and\n Tagging and Using Cost Allocation in Amazon S3\n Bucket Tags.

\n \n

When this operation sets the tags for a bucket, it will overwrite any current tags\n the bucket already has. You cannot use this operation to add tags to an existing list of\n 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\n Access Permissions to Your Amazon S3 Resources.

\n

\n PutBucketTagging has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.

\n
    \n
  • \n

    \n InvalidTag - The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Using\n Cost Allocation in Amazon S3 Bucket Tags.

    \n
  • \n
  • \n

    \n MalformedXML - The XML provided does not match the\n schema.

    \n
  • \n
  • \n

    \n OperationAborted - A conflicting conditional action is\n currently in progress against this resource. Please try again.

    \n
  • \n
  • \n

    \n InternalError - The service was unable to apply the provided\n tag to the bucket.

    \n
  • \n
\n

The following operations are related to PutBucketTagging:

\n ", + "smithy.api#examples": [ + { + "title": "Set tags on a bucket", + "documentation": "The following example sets tags on a bucket. Any existing tags are replaced.", + "input": { + "Bucket": "examplebucket", + "Tagging": { + "TagSet": [ + { + "Key": "Key1", + "Value": "Value1" + }, + { + "Key": "Key2", + "Value": "Value2" + } + ] + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?tagging", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for the TagSet and Tag elements.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "Tagging" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketVersioning": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketVersioningRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n \n

When you enable versioning on a bucket for the first time, it might take a short\n amount of time for the change to be fully propagated. While this change is propagating,\n you might encounter intermittent HTTP 404 NoSuchKey errors for requests to\n objects created or updated after enabling versioning. We recommend that you wait for 15\n minutes after enabling versioning before issuing write operations (PUT or\n DELETE) on objects in the bucket.

\n
\n

Sets the versioning state of an existing bucket.

\n

You can set the versioning state with one of the following values:

\n

\n Enabled\u2014Enables versioning for the objects in the\n bucket. All objects added to the bucket receive a unique version ID.

\n

\n Suspended\u2014Disables versioning for the objects in the\n bucket. All objects added to the bucket receive the version ID null.

\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

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 include the\n x-amz-mfa request header and the Status and the\n MfaDelete request elements in a request to set the versioning state of the\n bucket.

\n \n

If you have an object expiration lifecycle configuration in your non-versioned bucket\n and you want to maintain the same permanent delete behavior when you enable versioning,\n you must add a noncurrent expiration policy. The noncurrent expiration lifecycle\n configuration will manage the deletes of the noncurrent object versions in the\n version-enabled bucket. (A version-enabled bucket maintains one current and zero or more\n noncurrent object versions.) For more information, see Lifecycle and Versioning.

\n
\n

The following operations are related to PutBucketVersioning:

\n ", + "smithy.api#examples": [ + { + "title": "Set versioning configuration on a bucket", + "documentation": "The following example sets versioning configuration on bucket. The configuration enables versioning on the bucket.", + "input": { + "Bucket": "examplebucket", + "VersioningConfiguration": { + "MFADelete": "Disabled", + "Status": "Enabled" + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?versioning", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketVersioningRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

>The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a\n message integrity check to verify that the request body was not corrupted in transit. For\n more information, see RFC\n 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

The concatenation of the authentication device's serial number, a space, and the value\n that is displayed on your authentication device.

", + "smithy.api#httpHeader": "x-amz-mfa" + } + }, + "VersioningConfiguration": { + "target": "com.amazonaws.s3#VersioningConfiguration", + "traits": { + "smithy.api#documentation": "

Container for setting the versioning state.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "VersioningConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutBucketWebsite": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutBucketWebsiteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

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

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

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.

\n

The maximum request length is limited to 128 KB.

", + "smithy.api#examples": [ + { + "title": "Set website configuration on a bucket", + "documentation": "The following example adds website configuration to a bucket.", + "input": { + "Bucket": "examplebucket", + "ContentMD5": "", + "WebsiteConfiguration": { + "IndexDocument": { + "Suffix": "index.html" }, - "ExpectedSourceBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-source-expected-bucket-owner" - } + "ErrorDocument": { + "Key": "error.html" } - }, - "traits": { - "smithy.api#input": {} + } } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?website", + "code": 200 }, - "com.amazonaws.s3#UploadPartOutput": { - "type": "structure", - "members": { - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption" - } - }, - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "smithy.api#documentation": "

Entity tag for the uploaded object.

", - "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" - } - }, - "ChecksumSHA1": { - "target": "com.amazonaws.s3#ChecksumSHA1", - "traits": { - "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" - } - }, - "SSECustomerKeyMD5": { - "target": "com.amazonaws.s3#SSECustomerKeyMD5", - "traits": { - "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", - "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-request-charged" - } - } + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutBucketWebsiteRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, see RFC 1864.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 request when you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for the request.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "WebsiteConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#EncryptionTypeMismatch" + }, + { + "target": "com.amazonaws.s3#InvalidRequest" + }, + { + "target": "com.amazonaws.s3#InvalidWriteOffset" + }, + { + "target": "com.amazonaws.s3#TooManyParts" + } + ], + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "

Adds an object to a bucket.

\n \n
    \n
  • \n

    Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added\n the entire object to the bucket. You cannot use PutObject to only\n update a single piece of metadata for an existing object. You must put the entire\n object with updated metadata if you want to update some values.

    \n
  • \n
  • \n

    If your bucket uses the bucket owner enforced setting for Object Ownership,\n ACLs are disabled and no longer affect permissions. All objects written to the\n bucket by any account will be owned by the bucket owner.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

    \n
  • \n
\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. However, Amazon S3 provides\n features that can modify this behavior:

\n
    \n
  • \n

    \n S3 Object Lock - To prevent objects from\n being deleted or overwritten, you can use Amazon S3 Object\n Lock in the Amazon S3 User Guide.

    \n \n

    This functionality is not supported for directory buckets.

    \n
    \n
  • \n
  • \n

    \n If-None-Match - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a 412 Precondition Failed error. If a conflicting operation occurs during the upload, S3 returns a 409 ConditionalRequestConflict response. On a 409 failure, retry the upload.

    \n

    Expects the * character (asterisk).

    \n

    For more information, see Add preconditions to S3 operations with conditional requests in the Amazon S3 User Guide or RFC 7232.\n

    \n \n

    This functionality is not supported for S3 on Outposts.

    \n
    \n
  • \n
  • \n

    \n S3 Versioning - When you enable versioning\n for a bucket, if Amazon S3 receives multiple write requests for the same object\n simultaneously, it stores all versions of the objects. For each write request that is\n made to the same object, Amazon S3 automatically generates a unique version ID of that\n object being stored in Amazon S3. You can retrieve, replace, or delete any version of the\n object. For more information about versioning, see Adding\n Objects to Versioning-Enabled Buckets in the Amazon S3 User\n Guide. For information about returning the versioning state of a\n bucket, see GetBucketVersioning.

    \n \n

    This functionality is not supported for directory buckets.

    \n
    \n
  • \n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The\n following permissions are required in your policies when your\n PutObject request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:PutObject\n -\n To successfully complete the PutObject request, you must\n always have the s3:PutObject permission on a bucket to\n add an object to it.

      \n
    • \n
    • \n

      \n \n s3:PutObjectAcl\n - To successfully change the objects ACL of your\n PutObject request, you must have the\n s3:PutObjectAcl.

      \n
    • \n
    • \n

      \n \n s3:PutObjectTagging\n - To successfully set the tag-set with your\n PutObject request, you must have the\n s3:PutObjectTagging.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Data integrity with Content-MD5
\n
\n
    \n
  • \n

    \n General purpose bucket - To ensure that\n data is not corrupted traversing the network, use the\n Content-MD5 header. When you use this header, Amazon S3 checks\n the object against the provided MD5 value and, if they do not match, Amazon S3\n returns an error. Alternatively, when the object's ETag is its MD5 digest,\n you can calculate the MD5 while putting the object to Amazon S3 and compare the\n returned ETag to the calculated MD5 value.

    \n
  • \n
  • \n

    \n Directory bucket -\n This functionality is not supported for directory buckets.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

For more information about related Amazon S3 APIs, see the following:

\n ", + "smithy.api#examples": [ + { + "title": "To create an object.", + "documentation": "The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "objectkey" }, - "traits": { - "smithy.api#output": {} + "output": { + "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" } - }, - "com.amazonaws.s3#UploadPartRequest": { - "type": "structure", - "members": { - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

Object data.

", - "smithy.api#httpPayload": {} - } - }, - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "ContentLength": { - "target": "com.amazonaws.s3#ContentLength", - "traits": { - "smithy.api#documentation": "

Size of the body in bytes. This parameter is useful when the size of the body cannot be\n determined automatically.

", - "smithy.api#httpHeader": "Content-Length" - } - }, - "ContentMD5": { - "target": "com.amazonaws.s3#ContentMD5", - "traits": { - "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated\n when using the command from the CLI. This parameter is required if object lock parameters\n are specified.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 value\n 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" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" - } - }, - "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 SHA1 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 SHA256 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": { - "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Key" - } - } - }, - "PartNumber": { - "target": "com.amazonaws.s3#PartNumber", - "traits": { - "smithy.api#documentation": "

Part number of part being uploaded. This is a positive integer between 1 and\n 10,000.

", - "smithy.api#httpQuery": "partNumber", - "smithy.api#required": {} - } - }, - "UploadId": { - "target": "com.amazonaws.s3#MultipartUploadId", - "traits": { - "smithy.api#documentation": "

Upload ID identifying the multipart upload whose part is being uploaded.

", - "smithy.api#httpQuery": "uploadId", - "smithy.api#required": {} - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", - "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. This must be the\n same encryption key specified in the initiate multipart upload request.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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.

\n \n

This functionality is not supported for directory buckets.

\n
", - "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } + }, + { + "title": "To upload an object (specify optional headers)", + "documentation": "The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.", + "input": { + "Body": "HappyFace.jpg", + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", + "ServerSideEncryption": "AES256", + "StorageClass": "STANDARD_IA" }, - "traits": { - "smithy.api#input": {} + "output": { + "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "ServerSideEncryption": "AES256" + } + }, + { + "title": "To upload an object", + "documentation": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", + "input": { + "Body": "HappyFace.jpg", + "Bucket": "examplebucket", + "Key": "HappyFace.jpg" + }, + "output": { + "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" } - }, - "com.amazonaws.s3#UserMetadata": { - "type": "list", - "member": { - "target": "com.amazonaws.s3#MetadataEntry", - "traits": { - "smithy.api#xmlName": "MetadataEntry" - } + }, + { + "title": "To upload an object and specify canned ACL.", + "documentation": "The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "ACL": "authenticated-read", + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "exampleobject" + }, + "output": { + "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" } - }, - "com.amazonaws.s3#Value": { - "type": "string" - }, - "com.amazonaws.s3#VersionCount": { - "type": "integer" - }, - "com.amazonaws.s3#VersionIdMarker": { - "type": "string" - }, - "com.amazonaws.s3#VersioningConfiguration": { - "type": "structure", - "members": { - "MFADelete": { - "target": "com.amazonaws.s3#MFADelete", - "traits": { - "smithy.api#documentation": "

Specifies whether MFA delete is enabled in the bucket versioning configuration. This\n element is only returned if the bucket has been configured with MFA delete. If the bucket\n has never been so configured, this element is not returned.

", - "smithy.api#xmlName": "MfaDelete" - } - }, - "Status": { - "target": "com.amazonaws.s3#BucketVersioningStatus", - "traits": { - "smithy.api#documentation": "

The versioning state of the bucket.

" - } - } + }, + { + "title": "To upload an object and specify optional tags", + "documentation": "The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.", + "input": { + "Body": "c:\\HappyFace.jpg", + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", + "Tagging": "key1=value1&key2=value2" }, - "traits": { - "smithy.api#documentation": "

Describes the versioning state of an Amazon S3 bucket. For more information, see PUT\n Bucket versioning in the Amazon S3 API Reference.

" + "output": { + "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" } - }, - "com.amazonaws.s3#WebsiteConfiguration": { - "type": "structure", - "members": { - "ErrorDocument": { - "target": "com.amazonaws.s3#ErrorDocument", - "traits": { - "smithy.api#documentation": "

The name of the error document for the website.

" - } - }, - "IndexDocument": { - "target": "com.amazonaws.s3#IndexDocument", - "traits": { - "smithy.api#documentation": "

The name of the index document for the website.

" - } - }, - "RedirectAllRequestsTo": { - "target": "com.amazonaws.s3#RedirectAllRequestsTo", - "traits": { - "smithy.api#documentation": "

The redirect behavior for every request to this bucket's website endpoint.

\n \n

If you specify this property, you can't specify any other property.

\n
" - } - }, - "RoutingRules": { - "target": "com.amazonaws.s3#RoutingRules", - "traits": { - "smithy.api#documentation": "

Rules that define when a redirect is applied and the redirect behavior.

" - } + }, + { + "title": "To upload an object and specify server-side encryption and object tags", + "documentation": "The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "exampleobject", + "ServerSideEncryption": "AES256", + "Tagging": "key1=value1&key2=value2" + }, + "output": { + "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "ServerSideEncryption": "AES256" + } + }, + { + "title": "To upload object and specify user-defined metadata", + "documentation": "The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.", + "input": { + "Body": "filetoupload", + "Bucket": "examplebucket", + "Key": "exampleobject", + "Metadata": { + "metadata1": "value1", + "metadata2": "value2" + } + }, + "output": { + "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?x-id=PutObject", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectAcl": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectAclRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectAclOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchKey" + } + ], + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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 the 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 functionality is not supported for Amazon S3 on Outposts.

\n

Depending on your application needs, you can choose to set the ACL on an object 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, you can continue to use that approach.\n For more information, see Access Control List (ACL) Overview\n in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs\n are disabled and no longer affect permissions. You must use policies to grant access to\n your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return\n the AccessControlListNotSupported error code. Requests to read ACLs are\n still supported. For more information, see Controlling object\n ownership in the Amazon S3 User Guide.

\n
\n
\n
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\n supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has\n a predefined set of grantees and permissions. Specify the canned ACL name as\n the value of x-amz-acl. If you use this header, you cannot use\n other access control-specific headers in your request. For more information,\n see Canned\n 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. When using these headers,\n you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3\n groups) who will receive the permission. If you use these ACL-specific\n headers, you cannot use x-amz-acl header to set a canned ACL.\n These parameters map to the set of permissions that Amazon S3 supports in an ACL.\n 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\n the following:

    \n
      \n
    • \n

      \n id \u2013 if the value specified is the canonical user ID\n of an Amazon Web Services account

      \n
    • \n
    • \n

      \n uri \u2013 if you are granting permissions to a predefined\n group

      \n
    • \n
    • \n

      \n emailAddress \u2013 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\u00e3o 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\n list 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

You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.

\n
\n
Grantee Values
\n
\n

You can specify the person (grantee) to whom you're assigning access rights\n (using 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\n Object 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\u00e3o 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\n the ACL of the current version of an object. To set the ACL of a different\n version, use the versionId subresource.

\n
\n
\n

The following operations are related to PutObjectAcl:

\n ", + "smithy.api#examples": [ + { + "title": "To grant permissions using object ACL", + "documentation": "The following example adds grants to an object ACL. The first permission grants user1 and user2 FULL_CONTROL and the AllUsers group READ permission.", + "input": { + "AccessControlPolicy": {}, + "Bucket": "examplebucket", + "GrantFullControl": "emailaddress=user1@example.com,emailaddress=user2@example.com", + "GrantRead": "uri=http://acs.amazonaws.com/groups/global/AllUsers", + "Key": "HappyFace.jpg" + }, + "output": {} + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?acl", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectAclOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectAclRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the object. For more information, see Canned\n ACL.

", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "AccessControlPolicy": { + "target": "com.amazonaws.s3#AccessControlPolicy", + "traits": { + "smithy.api#documentation": "

Contains the elements that set the ACL permissions for an object per grantee.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "AccessControlPolicy" + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name that contains the object to which you want to attach the ACL.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message\n integrity check to verify that the request body was not corrupted in transit. For more\n information, go to RFC\n 1864.>\n

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Allows grantee the read, write, read ACP, and write ACP permissions on the\n bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to list the objects in the bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the bucket ACL.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWrite": { + "target": "com.amazonaws.s3#GrantWrite", + "traits": { + "smithy.api#documentation": "

Allows grantee to create new objects in the bucket.

\n

For the bucket and object owners of existing objects, also allows deletions and\n overwrites of those objects.

", + "smithy.api#httpHeader": "x-amz-grant-write" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable bucket.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Key for which the PUT action was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID used to reference a specific version of the object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpQuery": "versionId" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectLegalHold": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectLegalHoldRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectLegalHoldOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Applies a legal hold configuration to the specified object. For more information, see\n Locking\n Objects.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?legal-hold", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectLegalHoldOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectLegalHoldRequest": { + "type": "structure", + "members": { + "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

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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#httpLabel": {}, + "smithy.api#required": {} + } + }, + "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#httpPayload": {}, + "smithy.api#xmlName": "LegalHold" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "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#httpQuery": "versionId" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectLockConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectLockConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectLockConfigurationOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

    The DefaultRetention settings require both a mode and a\n period.

    \n
  • \n
  • \n

    The DefaultRetention period can be either Days or\n Years but you must select one. You cannot specify\n Days and Years at the same time.

    \n
  • \n
  • \n

    You can enable Object Lock for new or existing buckets. For more information,\n see Configuring Object\n Lock.

    \n
  • \n
\n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?object-lock", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectLockConfigurationOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectLockConfigurationRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket whose Object Lock configuration you want to create or replace.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ObjectLockConfiguration": { + "target": "com.amazonaws.s3#ObjectLockConfiguration", + "traits": { + "smithy.api#documentation": "

The Object Lock configuration that you want to apply to the specified bucket.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "ObjectLockConfiguration" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "Token": { + "target": "com.amazonaws.s3#ObjectLockToken", + "traits": { + "smithy.api#documentation": "

A token to allow Object Lock to be enabled for an existing bucket.

", + "smithy.api#httpHeader": "x-amz-bucket-object-lock-token" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectOutput": { + "type": "structure", + "members": { + "Expiration": { + "target": "com.amazonaws.s3#Expiration", + "traits": { + "smithy.api#documentation": "

If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide,\n the response includes this header. It includes the expiry-date and\n rule-id key-value pairs that provide information about object expiration.\n The value of the rule-id is URL-encoded.

\n \n

Object expiration information is not returned in directory buckets and this header returns the value \"NotImplemented\" in all responses for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-expiration" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

Entity tag for the uploaded object.

\n

\n General purpose buckets - To ensure that data is not\n corrupted traversing the network, for objects where the ETag is the MD5 digest of the\n object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned\n ETag to the calculated MD5 value.

\n

\n Directory buckets - The ETag for the object in\n a directory bucket isn't the MD5 digest of the object.

", + "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header\n is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it\n was uploaded without a checksum (and Amazon S3 added the default checksum,\n CRC64NVME, to the uploaded object). For more information about how\n checksums are calculated with multipart uploads, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumType": { + "target": "com.amazonaws.s3#ChecksumType", + "traits": { + "smithy.api#documentation": "

This header specifies the checksum type of the object, which determines how part-level\n checksums are combined to create an object-level checksum for multipart objects. For\n PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a\n data integrity check to verify that the checksum type that is received is the same checksum\n that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-type" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

Version ID of the object.

\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. For more information about versioning, see\n Adding Objects to\n Versioning-Enabled Buckets in the Amazon S3 User Guide. For\n information about returning the versioning state of a bucket, see GetBucketVersioning.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSEKMSEncryptionContext": { + "target": "com.amazonaws.s3#SSEKMSEncryptionContext", + "traits": { + "smithy.api#documentation": "

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets\n passed on to Amazon Web Services KMS for future GetObject \n operations on this object.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-context" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "Size": { + "target": "com.amazonaws.s3#Size", + "traits": { + "smithy.api#documentation": "

\n The size of the object in bytes. This value is only be present if you append to an object.\n

\n \n

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-size" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectRequest": { + "type": "structure", + "members": { + "ACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the object. For more information, see Canned\n ACL in the Amazon S3 User Guide.

\n

When adding a new object, you can use headers to grant ACL-based permissions to\n individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are\n then added to the ACL on the object. By default, all objects are private. Only the owner\n has full access control. For more information, see Access Control List (ACL) Overview\n and Managing\n ACLs Using the REST API in the Amazon S3 User Guide.

\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\n canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that\n contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a\n 400 error with the error code AccessControlListNotSupported.\n For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-acl" + } + }, + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

Object data.

", + "smithy.api#httpPayload": {} + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name to which the PUT action was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Can be used to specify caching behavior along the request/reply chain. For more\n information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

", + "smithy.api#httpHeader": "Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

", + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "Content-Language" + } + }, + "ContentLength": { + "target": "com.amazonaws.s3#ContentLength", + "traits": { + "smithy.api#documentation": "

Size of the body in bytes. This parameter is useful when the size of the body cannot be\n determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

", + "smithy.api#httpHeader": "Content-Length" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to\n RFC 1864. This header can be used as a message integrity check to verify that the data is\n the same data that was originally sent. Although it is optional, we recommend using the\n Content-MD5 mechanism as an end-to-end integrity check. For more information about REST\n request authentication, see REST Authentication.

\n \n

The Content-MD5 or x-amz-sdk-checksum-algorithm header is\n required for any request to upload an object with a retention period configured using\n Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the\n Amazon S3 User Guide.

\n
\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "Content-MD5" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the contents. For more information, see\n https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm\n or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

\n

For the x-amz-checksum-algorithm\n header, replace \n algorithm\n with the supported algorithm from the following list:

\n
    \n
  • \n

    \n CRC32\n

    \n
  • \n
  • \n

    \n CRC32C\n

    \n
  • \n
  • \n

    \n CRC64NVME\n

    \n
  • \n
  • \n

    \n SHA1\n

    \n
  • \n
  • \n

    \n SHA256\n

    \n
  • \n
\n

For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If the individual checksum value you provide through x-amz-checksum-algorithm\n doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

\n \n

The Content-MD5 or x-amz-sdk-checksum-algorithm header is\n required for any request to upload an object with a retention period configured using\n Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the\n Amazon S3 User Guide.

\n
\n

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

", + "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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the object. The CRC64NVME checksum is\n always a full object checksum. For more information, see Checking object integrity\n in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "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 SHA1 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 SHA256 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": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable. For more information, see\n https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

", + "smithy.api#httpHeader": "Expires" + } + }, + "IfMatch": { + "target": "com.amazonaws.s3#IfMatch", + "traits": { + "smithy.api#documentation": "

Uploads the object only if the ETag (entity tag) value provided during the WRITE\n operation matches the ETag of the object in S3. If the ETag values do not match, the\n operation returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

\n

Expects the ETag value as a string.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "If-Match" + } + }, + "IfNoneMatch": { + "target": "com.amazonaws.s3#IfNoneMatch", + "traits": { + "smithy.api#documentation": "

Uploads the object only if the object key name does not already exist in the bucket\n specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

\n

If a conflicting operation occurs during the upload S3 returns a 409\n ConditionalRequestConflict response. On a 409 failure you should retry the\n upload.

\n

Expects the '*' (asterisk) character.

\n

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "If-None-Match" + } + }, + "GrantFullControl": { + "target": "com.amazonaws.s3#GrantFullControl", + "traits": { + "smithy.api#documentation": "

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-full-control" + } + }, + "GrantRead": { + "target": "com.amazonaws.s3#GrantRead", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the object data and its metadata.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read" + } + }, + "GrantReadACP": { + "target": "com.amazonaws.s3#GrantReadACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to read the object ACL.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-read-acp" + } + }, + "GrantWriteACP": { + "target": "com.amazonaws.s3#GrantWriteACP", + "traits": { + "smithy.api#documentation": "

Allows grantee to write the ACL for the applicable object.

\n \n
    \n
  • \n

    This functionality is not supported for directory buckets.

    \n
  • \n
  • \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-grant-write-acp" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the PUT action was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "WriteOffsetBytes": { + "target": "com.amazonaws.s3#WriteOffsetBytes", + "traits": { + "smithy.api#documentation": "

\n Specifies the offset for appending data to existing objects in bytes. \n The offset must be equal to the size of the existing object being appended to. \n If no object exists, setting this header to 0 will create a new object.\n

\n \n

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-write-offset-bytes" + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm that was used when you store this object in Amazon S3\n (for example, AES256, aws:kms, aws:kms:dsse).

\n
    \n
  • \n

    \n General purpose buckets - You have four mutually\n exclusive options to protect data using server-side encryption in Amazon S3, depending on\n how you choose to manage the encryption keys. Specifically, the encryption key\n options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and\n customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by\n using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt\n data at rest by using server-side encryption with other key options. For more\n information, see Using Server-Side\n Encryption in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your \n CreateSession requests or PUT object requests. Then, new objects \n are automatically encrypted with the desired encryption settings. For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    \n

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. \n You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. \n You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and \n Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. \n

    \n \n

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the \n CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. \n So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), \n the encryption request headers must match the default encryption configuration of the directory bucket.\n\n

    \n
    \n
  • \n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

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. For more information, see\n Storage\n Classes in the Amazon S3 User Guide.

\n \n
    \n
  • \n

    Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

    \n
  • \n
  • \n

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    \n
  • \n
\n
", + "smithy.api#httpHeader": "x-amz-storage-class" + } + }, + "WebsiteRedirectLocation": { + "target": "com.amazonaws.s3#WebsiteRedirectLocation", + "traits": { + "smithy.api#documentation": "

If the bucket is configured as a website, redirects requests for this object to another\n object in the same bucket or to an external URL. Amazon S3 stores the value of this header in\n the object metadata. For information about object metadata, see Object Key and Metadata in the\n Amazon S3 User Guide.

\n

In the following example, the request header sets the redirect to an object\n (anotherPage.html) in the same bucket:

\n

\n x-amz-website-redirect-location: /anotherPage.html\n

\n

In the following example, the request header sets the object redirect to another\n website:

\n

\n x-amz-website-redirect-location: http://www.example.com/\n

\n

For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and\n How to\n Configure Website Page Redirects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-website-redirect-location" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example,\n AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same\n account that's issuing the command, you must use the full Key ARN not the Key ID.

\n

\n General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS \n key to use. If you specify\n x-amz-server-side-encryption:aws:kms or\n x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key\n (aws/s3) to protect the data.

\n

\n Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the \nx-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses \nthe bucket's default KMS customer managed key ID. If you want to explicitly set the \n x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n \n Incorrect key specification results in an HTTP 400 Bad Request error.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSEKMSEncryptionContext": { + "target": "com.amazonaws.s3#SSEKMSEncryptionContext", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of\n this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. \n This value is stored as object metadata and automatically gets passed on\n to Amazon Web Services KMS for future GetObject operations on\n this object.

\n

\n General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

\n

\n Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-context" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with\n server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

\n

\n General purpose buckets - Setting this header to\n true causes Amazon S3 to use an S3 Bucket Key for object encryption with\n SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3\n Bucket Key.

\n

\n Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "Tagging": { + "target": "com.amazonaws.s3#TaggingHeader", + "traits": { + "smithy.api#documentation": "

The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For\n example, \"Key1=Value1\")

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-tagging" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

The Object Lock mode that you want to apply to this object.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-mode" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when you want this object's Object Lock to expire. Must be formatted\n as a timestamp parameter.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-object-lock-retain-until-date" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether a legal hold will be applied to this object. For more information\n about S3 Object Lock, see Object Lock in the\n Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectRetention": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectRetentionRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectRetentionOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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\n place an Object Retention configuration on objects. Bypassing a Governance Retention\n configuration requires the s3:BypassGovernanceRetention permission.

\n

This functionality is not supported for Amazon S3 on Outposts.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?retention", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectRetentionOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectRetentionRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name that contains the object you want to apply this Object Retention\n configuration to.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The key name for the object that you want to apply this Object Retention configuration\n to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Retention": { + "target": "com.amazonaws.s3#ObjectLockRetention", + "traits": { + "smithy.api#documentation": "

The container element for the Object Retention configuration.

", + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "Retention" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The version ID for the object that you want to apply this Object Retention configuration\n to.

", + "smithy.api#httpQuery": "versionId" + } + }, + "BypassGovernanceRetention": { + "target": "com.amazonaws.s3#BypassGovernanceRetention", + "traits": { + "smithy.api#documentation": "

Indicates whether this action should bypass Governance-mode restrictions.

", + "smithy.api#httpHeader": "x-amz-bypass-governance-retention" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutObjectTagging": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutObjectTaggingRequest" + }, + "output": { + "target": "com.amazonaws.s3#PutObjectTaggingOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Sets the supplied tag-set to an object that already exists in a bucket. A tag is a\n key-value pair. For more information, see Object Tagging.

\n

You can associate tags with an object by sending a PUT request against the tagging\n subresource that is associated with the object. You can retrieve tags by sending a GET\n request. For more information, see GetObjectTagging.

\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

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

To put tags of any other version, use the versionId query parameter. You\n also need permission for the s3:PutObjectVersionTagging action.

\n

\n PutObjectTagging has the following special errors. For more Amazon S3 errors\n see, Error\n Responses.

\n
    \n
  • \n

    \n InvalidTag - The tag provided was not a valid tag. This error\n can occur if the tag did not pass input validation. For more information, see Object\n Tagging.

    \n
  • \n
  • \n

    \n MalformedXML - The XML provided does not match the\n schema.

    \n
  • \n
  • \n

    \n OperationAborted - A conflicting conditional action is\n currently in progress against this resource. Please try again.

    \n
  • \n
  • \n

    \n InternalError - The service was unable to apply the provided\n tag to the object.

    \n
  • \n
\n

The following operations are related to PutObjectTagging:

\n ", + "smithy.api#examples": [ + { + "title": "To add tags to an existing object", + "documentation": "The following example adds tags to an existing object.", + "input": { + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", + "Tagging": { + "TagSet": [ + { + "Key": "Key3", + "Value": "Value3" + }, + { + "Key": "Key4", + "Value": "Value4" + } + ] + } + }, + "output": { + "VersionId": "null" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?tagging", + "code": 200 + } + } + }, + "com.amazonaws.s3#PutObjectTaggingOutput": { + "type": "structure", + "members": { + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object the tag-set was added to.

", + "smithy.api#httpHeader": "x-amz-version-id" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#PutObjectTaggingRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Name of the object key.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The versionId of the object that the tag-set will be added to.

", + "smithy.api#httpQuery": "versionId" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash for the request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

Container for the TagSet and Tag elements

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "Tagging" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#PutPublicAccessBlock": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#PutPublicAccessBlockRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

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

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

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".

\n

The following operations are related to PutPublicAccessBlock:

\n ", + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}?publicAccessBlock", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseS3ExpressControlEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#PutPublicAccessBlockRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want\n to set.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The MD5 hash of the PutPublicAccessBlock request body.

\n

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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": { + "smithy.api#documentation": "

The PublicAccessBlock configuration that you want to apply to this Amazon S3\n bucket. You can enable the configuration options in any combination. For more information\n about when Amazon S3 considers a bucket or object public, see The Meaning of \"Public\" in the Amazon S3 User Guide.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "PublicAccessBlockConfiguration" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#QueueArn": { + "type": "string" + }, + "com.amazonaws.s3#QueueConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#NotificationId" + }, + "QueueArn": { + "target": "com.amazonaws.s3#QueueArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message\n when it detects events of the specified type.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "Queue" + } + }, + "Events": { + "target": "com.amazonaws.s3#EventList", + "traits": { + "smithy.api#documentation": "

A collection of bucket events for which to send notifications

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Event" + } + }, + "Filter": { + "target": "com.amazonaws.s3#NotificationConfigurationFilter" + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the configuration for publishing messages to an Amazon Simple Queue Service\n (Amazon SQS) queue when Amazon S3 detects specified events.

" + } + }, + "com.amazonaws.s3#QueueConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#QueueConfiguration" + } + }, + "com.amazonaws.s3#Quiet": { + "type": "boolean" + }, + "com.amazonaws.s3#QuoteCharacter": { + "type": "string" + }, + "com.amazonaws.s3#QuoteEscapeCharacter": { + "type": "string" + }, + "com.amazonaws.s3#QuoteFields": { + "type": "enum", + "members": { + "ALWAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALWAYS" + } + }, + "ASNEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASNEEDED" + } + } + } + }, + "com.amazonaws.s3#Range": { + "type": "string" + }, + "com.amazonaws.s3#RecordDelimiter": { + "type": "string" + }, + "com.amazonaws.s3#RecordsEvent": { + "type": "structure", + "members": { + "Payload": { + "target": "com.amazonaws.s3#Body", + "traits": { + "smithy.api#documentation": "

The byte array of partial, one or more result records. S3 Select doesn't guarantee that\n a record will be self-contained in one record frame. To ensure continuous streaming of\n data, S3 Select might split the same record across multiple record frames instead of\n aggregating the results in memory. Some S3 clients (for example, the SDKforJava) handle this behavior by creating a ByteStream out of the response by\n default. Other clients might not handle this behavior by default. In those cases, you must\n aggregate the results on the client side and parse the response.

", + "smithy.api#eventPayload": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The container for the records event.

" + } + }, + "com.amazonaws.s3#Redirect": { + "type": "structure", + "members": { + "HostName": { + "target": "com.amazonaws.s3#HostName", + "traits": { + "smithy.api#documentation": "

The host name to use in the redirect request.

" + } + }, + "HttpRedirectCode": { + "target": "com.amazonaws.s3#HttpRedirectCode", + "traits": { + "smithy.api#documentation": "

The HTTP redirect code to use on the response. Not required if one of the siblings is\n present.

" + } + }, + "Protocol": { + "target": "com.amazonaws.s3#Protocol", + "traits": { + "smithy.api#documentation": "

Protocol to use when redirecting requests. The default is the protocol that is used in\n the original request.

" + } + }, + "ReplaceKeyPrefixWith": { + "target": "com.amazonaws.s3#ReplaceKeyPrefixWith", + "traits": { + "smithy.api#documentation": "

The object key prefix to use in the redirect request. For example, to redirect requests\n for all pages with prefix docs/ (objects in the docs/ folder) to\n documents/, you can set a condition block with KeyPrefixEquals\n set to docs/ and in the Redirect set ReplaceKeyPrefixWith to\n /documents. Not required if one of the siblings is present. Can be present\n only if ReplaceKeyWith is not provided.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "ReplaceKeyWith": { + "target": "com.amazonaws.s3#ReplaceKeyWith", + "traits": { + "smithy.api#documentation": "

The specific object key to use in the redirect request. For example, redirect request to\n error.html. Not required if one of the siblings is present. Can be present\n only if ReplaceKeyPrefixWith is not provided.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies how requests are redirected. In the event of an error, you can specify a\n different error code to return.

" + } + }, + "com.amazonaws.s3#RedirectAllRequestsTo": { + "type": "structure", + "members": { + "HostName": { + "target": "com.amazonaws.s3#HostName", + "traits": { + "smithy.api#documentation": "

Name of the host where requests are redirected.

", + "smithy.api#required": {} + } + }, + "Protocol": { + "target": "com.amazonaws.s3#Protocol", + "traits": { + "smithy.api#documentation": "

Protocol to use when redirecting requests. The default is the protocol that is used in\n the original request.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3\n bucket.

" + } + }, + "com.amazonaws.s3#Region": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 20 + } + } + }, + "com.amazonaws.s3#ReplaceKeyPrefixWith": { + "type": "string" + }, + "com.amazonaws.s3#ReplaceKeyWith": { + "type": "string" + }, + "com.amazonaws.s3#ReplicaKmsKeyID": { + "type": "string" + }, + "com.amazonaws.s3#ReplicaModifications": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#ReplicaModificationsStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 replicates modifications on replicas.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't\n replicate replica modifications by default. In the latest version of replication\n configuration (when Filter is specified), you can specify this element and set\n the status to Enabled to replicate modifications on replicas.

\n \n

If you don't specify the Filter element, Amazon S3 assumes that the\n replication configuration is the earlier version, V1. In the earlier version, this\n element is not allowed.

\n
" + } + }, + "com.amazonaws.s3#ReplicaModificationsStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#ReplicationConfiguration": { + "type": "structure", + "members": { + "Role": { + "target": "com.amazonaws.s3#Role", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when\n replicating objects. For more information, see How to Set Up Replication\n in the Amazon S3 User Guide.

", + "smithy.api#required": {} + } + }, + "Rules": { + "target": "com.amazonaws.s3#ReplicationRules", + "traits": { + "smithy.api#documentation": "

A container for one or more replication rules. A replication configuration must have at\n least one rule and can contain a maximum of 1,000 rules.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Rule" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for replication rules. You can add up to 1,000 rules. The maximum size of a\n replication configuration is 2 MB.

" + } + }, + "com.amazonaws.s3#ReplicationRule": { + "type": "structure", + "members": { + "ID": { + "target": "com.amazonaws.s3#ID", + "traits": { + "smithy.api#documentation": "

A unique identifier for the rule. The maximum value is 255 characters.

" + } + }, + "Priority": { + "target": "com.amazonaws.s3#Priority", + "traits": { + "smithy.api#documentation": "

The priority indicates which rule has precedence whenever two or more replication rules\n conflict. Amazon S3 will attempt to replicate objects according to all replication rules.\n However, if there are two or more rules with the same destination bucket, then objects will\n be replicated according to the rule with the highest priority. The higher the number, the\n higher the priority.

\n

For more information, see Replication in the\n Amazon S3 User Guide.

" + } + }, + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#deprecated": {}, + "smithy.api#documentation": "

An object key name prefix that identifies the object or objects to which the rule\n applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket,\n specify an empty string.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "Filter": { + "target": "com.amazonaws.s3#ReplicationRuleFilter" + }, + "Status": { + "target": "com.amazonaws.s3#ReplicationRuleStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether the rule is enabled.

", + "smithy.api#required": {} + } + }, + "SourceSelectionCriteria": { + "target": "com.amazonaws.s3#SourceSelectionCriteria", + "traits": { + "smithy.api#documentation": "

A container that describes additional filters for identifying the source objects that\n you want to replicate. You can choose to enable or disable the replication of these\n objects. Currently, Amazon S3 supports only the filter that you can specify for objects created\n with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service\n (SSE-KMS).

" + } + }, + "ExistingObjectReplication": { + "target": "com.amazonaws.s3#ExistingObjectReplication", + "traits": { + "smithy.api#documentation": "

Optional configuration to replicate existing source bucket objects.

\n \n

This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the\n Amazon S3 User Guide.

\n
" + } + }, + "Destination": { + "target": "com.amazonaws.s3#Destination", + "traits": { + "smithy.api#documentation": "

A container for information about the replication destination and its configurations\n including enabling the S3 Replication Time Control (S3 RTC).

", + "smithy.api#required": {} + } + }, + "DeleteMarkerReplication": { + "target": "com.amazonaws.s3#DeleteMarkerReplication" + } + }, + "traits": { + "smithy.api#documentation": "

Specifies which Amazon S3 objects to replicate and where to store the replicas.

" + } + }, + "com.amazonaws.s3#ReplicationRuleAndOperator": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

" + } + }, + "Tags": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

An array of tags containing key and value pairs.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for specifying rule filters. The filters determine the subset of objects to\n which the rule applies. This element is required only if you specify more than one filter.

\n

For example:

\n
    \n
  • \n

    If you specify both a Prefix and a Tag filter, wrap\n these filters in an And tag.

    \n
  • \n
  • \n

    If you specify a filter based on multiple tags, wrap the Tag elements\n in an And tag.

    \n
  • \n
" + } + }, + "com.amazonaws.s3#ReplicationRuleFilter": { + "type": "structure", + "members": { + "Prefix": { + "target": "com.amazonaws.s3#Prefix", + "traits": { + "smithy.api#documentation": "

An object key name prefix that identifies the subset of objects to which the rule\n applies.

\n \n

Replacement must be made for object keys containing special characters (such as carriage returns) when using \n XML requests. For more information, see \n XML related object key constraints.

\n
" + } + }, + "Tag": { + "target": "com.amazonaws.s3#Tag", + "traits": { + "smithy.api#documentation": "

A container for specifying a tag key and value.

\n

The rule applies only to objects that have the tag in their tag set.

" + } + }, + "And": { + "target": "com.amazonaws.s3#ReplicationRuleAndOperator", + "traits": { + "smithy.api#documentation": "

A container for specifying rule filters. The filters determine the subset of objects to\n which the rule applies. This element is required only if you specify more than one filter.\n For example:

\n
    \n
  • \n

    If you specify both a Prefix and a Tag filter, wrap\n these filters in an And tag.

    \n
  • \n
  • \n

    If you specify a filter based on multiple tags, wrap the Tag elements\n in an And tag.

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

A filter that identifies the subset of objects to which the replication rule applies. A\n Filter must specify exactly one Prefix, Tag, or\n an And child element.

" + } + }, + "com.amazonaws.s3#ReplicationRuleStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#ReplicationRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ReplicationRule" + } + }, + "com.amazonaws.s3#ReplicationStatus": { + "type": "enum", + "members": { + "COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETE" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "REPLICA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLICA" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } + } + }, + "com.amazonaws.s3#ReplicationTime": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#ReplicationTimeStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether the replication time is enabled.

", + "smithy.api#required": {} + } + }, + "Time": { + "target": "com.amazonaws.s3#ReplicationTimeValue", + "traits": { + "smithy.api#documentation": "

A container specifying the time by which replication should be complete for all objects\n and operations on objects.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is\n enabled and the time when all objects and operations on objects must be replicated. Must be\n specified together with a Metrics block.

" + } + }, + "com.amazonaws.s3#ReplicationTimeStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#ReplicationTimeValue": { + "type": "structure", + "members": { + "Minutes": { + "target": "com.amazonaws.s3#Minutes", + "traits": { + "smithy.api#documentation": "

Contains an integer specifying time in minutes.

\n

Valid value: 15

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics\n EventThreshold.

" + } + }, + "com.amazonaws.s3#RequestCharged": { + "type": "enum", + "members": { + "requester": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requester" + } + } + }, + "traits": { + "smithy.api#documentation": "

If present, indicates that the requester was successfully charged for the\n request. For more information, see Using Requester Pays buckets for storage transfers and usage in the Amazon Simple Storage Service user guide.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "com.amazonaws.s3#RequestPayer": { + "type": "enum", + "members": { + "requester": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requester" + } + } + }, + "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. If either the source or\n destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding\n charges to copy the object. For information about downloading objects from Requester Pays\n buckets, see Downloading Objects in\n Requester Pays Buckets in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.

\n
" + } + }, + "com.amazonaws.s3#RequestPaymentConfiguration": { + "type": "structure", + "members": { + "Payer": { + "target": "com.amazonaws.s3#Payer", + "traits": { + "smithy.api#documentation": "

Specifies who pays for the download and request fees.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for Payer.

" + } + }, + "com.amazonaws.s3#RequestProgress": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.s3#EnableRequestProgress", + "traits": { + "smithy.api#documentation": "

Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE,\n FALSE. Default value: FALSE.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for specifying if periodic QueryProgress messages should be\n sent.

" + } + }, + "com.amazonaws.s3#RequestRoute": { + "type": "string" + }, + "com.amazonaws.s3#RequestToken": { + "type": "string" + }, + "com.amazonaws.s3#ResponseCacheControl": { + "type": "string" + }, + "com.amazonaws.s3#ResponseContentDisposition": { + "type": "string" + }, + "com.amazonaws.s3#ResponseContentEncoding": { + "type": "string" + }, + "com.amazonaws.s3#ResponseContentLanguage": { + "type": "string" + }, + "com.amazonaws.s3#ResponseContentType": { + "type": "string" + }, + "com.amazonaws.s3#ResponseExpires": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "com.amazonaws.s3#Restore": { + "type": "string" + }, + "com.amazonaws.s3#RestoreExpiryDate": { + "type": "timestamp" + }, + "com.amazonaws.s3#RestoreObject": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#RestoreObjectRequest" + }, + "output": { + "target": "com.amazonaws.s3#RestoreObjectOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#ObjectAlreadyInActiveTierError" + } + ], + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Restores an archived copy of an object back into Amazon S3

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

This action performs the following types of requests:

\n
    \n
  • \n

    \n restore an archive - Restore an archived object

    \n
  • \n
\n

For more information about the S3 structure in the request body, see the\n following:

\n \n
\n
Permissions
\n
\n

To use this operation, you must have permissions to perform the\n s3:RestoreObject action. The bucket owner has this permission by\n default and can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the\n Amazon S3 User Guide.

\n
\n
Restoring objects
\n
\n

Objects that you archive to the S3 Glacier Flexible Retrieval or 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 the\n S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive\n storage classes, you must first initiate a restore request, and then wait until a\n temporary copy of the object is available. If you want a permanent copy of the\n object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket.\n To access an archived object, you must restore the object for the duration (number\n of days) that you specify. For objects in the Archive Access or Deep Archive\n Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request,\n and then wait until the object is moved into the Frequent Access tier.

\n

To restore a specific object version, you can provide a version ID. If you\n don't provide a version ID, Amazon S3 restores the current version.

\n

When restoring an archived object, you can specify one of the following data\n access tier options in the Tier element of the request body:

\n
    \n
  • \n

    \n Expedited - Expedited retrievals allow you to quickly access\n your data stored in the S3 Glacier Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests\n for restoring archives are required. For all but the largest archived\n objects (250 MB+), data accessed using Expedited retrievals is typically\n made available within 1\u20135 minutes. Provisioned capacity ensures that\n retrieval capacity for Expedited retrievals is available when you need it.\n Expedited retrievals and provisioned capacity are not available for objects\n stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.

    \n
  • \n
  • \n

    \n Standard - Standard retrievals allow you to access any of\n your archived objects within several hours. This is the default option for\n retrieval requests that do not specify the retrieval option. Standard\n retrievals typically finish within 3\u20135 hours for objects stored in the\n S3 Glacier Flexible Retrieval storage class or\n 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\n in S3 Intelligent-Tiering.

    \n
  • \n
  • \n

    \n Bulk - Bulk retrievals free for objects stored in the\n S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes,\n enabling you to retrieve large amounts, even petabytes, of data at no cost.\n Bulk retrievals typically finish within 5\u201312 hours for objects stored in the\n S3 Glacier Flexible Retrieval storage class or\n S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost\n retrieval option when restoring objects from\n S3 Glacier Deep Archive. They typically finish within 48 hours for\n objects stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier.

    \n
  • \n
\n

For more information about archive retrieval options and provisioned capacity\n for Expedited data access, see Restoring Archived\n Objects in the Amazon S3 User Guide.

\n

You can use Amazon S3 restore speed upgrade to change the restore speed to a faster\n speed while it is in progress. For more information, see 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\n request. Operations return the x-amz-restore header, which provides\n information about the restoration status, in the response. You can use Amazon S3 event\n notifications to notify you when a restore is initiated or completed. For more\n information, see Configuring Amazon S3 Event\n Notifications in the Amazon S3 User Guide.

\n

After restoring an archived object, you can update the restoration period by\n reissuing the request with a new period. Amazon S3 updates the restoration period\n relative to the current time and charges only for the request-there are no\n data transfer charges. You cannot update the restoration period when Amazon S3 is\n actively processing your current restore request for the object.

\n

If your bucket has a lifecycle configuration with a rule that includes an\n expiration action, the object expiration overrides the life span that you specify\n in a restore request. For example, if you restore an object copy for 10 days, but\n the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days.\n For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle\n Management in 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\n the response.

    \n
  • \n
\n
    \n
  • \n

    Special errors:

    \n
      \n
    • \n

      \n Code: RestoreAlreadyInProgress\n

      \n
    • \n
    • \n

      \n Cause: Object restore is already in progress.\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.\n Try again later. (Returned if there is insufficient capacity to\n process the Expedited request. This error applies only to Expedited\n retrievals and not to 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

The following operations are related to RestoreObject:

\n ", + "smithy.api#examples": [ + { + "title": "To restore an archived object", + "documentation": "The following example restores for one day an archived copy of an object back into Amazon S3 bucket.", + "input": { + "Bucket": "examplebucket", + "Key": "archivedobjectkey", + "RestoreRequest": { + "Days": 1, + "GlacierJobParameters": { + "Tier": "Expedited" } + } }, - "traits": { - "smithy.api#documentation": "

Specifies website configuration parameters for an Amazon S3 bucket.

" - } - }, - "com.amazonaws.s3#WebsiteRedirectLocation": { - "type": "string" - }, - "com.amazonaws.s3#WriteGetObjectResponse": { - "type": "operation", + "output": {} + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}/{Key+}?restore", + "code": 200 + } + } + }, + "com.amazonaws.s3#RestoreObjectOutput": { + "type": "structure", + "members": { + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + }, + "RestoreOutputPath": { + "target": "com.amazonaws.s3#RestoreOutputPath", + "traits": { + "smithy.api#documentation": "

Indicates the path in the provided S3 output location where Select results will be\n restored to.

", + "smithy.api#httpHeader": "x-amz-restore-output-path" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#RestoreObjectRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name containing the object to restore.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the action was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

VersionId used to reference a specific version of the object.

", + "smithy.api#httpQuery": "versionId" + } + }, + "RestoreRequest": { + "target": "com.amazonaws.s3#RestoreRequest", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "RestoreRequest" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#RestoreOutputPath": { + "type": "string" + }, + "com.amazonaws.s3#RestoreRequest": { + "type": "structure", + "members": { + "Days": { + "target": "com.amazonaws.s3#Days", + "traits": { + "smithy.api#documentation": "

Lifetime of the active copy in days. Do not use with restores that specify\n OutputLocation.

\n

The Days element is required for regular restores, and must not be provided for select\n requests.

" + } + }, + "GlacierJobParameters": { + "target": "com.amazonaws.s3#GlacierJobParameters", + "traits": { + "smithy.api#documentation": "

S3 Glacier related parameters pertaining to this job. Do not use with restores that\n specify OutputLocation.

" + } + }, + "Type": { + "target": "com.amazonaws.s3#RestoreRequestType", + "traits": { + "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Type of restore request.

" + } + }, + "Tier": { + "target": "com.amazonaws.s3#Tier", + "traits": { + "smithy.api#documentation": "

Retrieval tier at which the restore will be processed.

" + } + }, + "Description": { + "target": "com.amazonaws.s3#Description", + "traits": { + "smithy.api#documentation": "

The optional description for the job.

" + } + }, + "SelectParameters": { + "target": "com.amazonaws.s3#SelectParameters", + "traits": { + "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Describes the parameters for Select job types.

" + } + }, + "OutputLocation": { + "target": "com.amazonaws.s3#OutputLocation", + "traits": { + "smithy.api#documentation": "

Describes the location where the restore job's output is stored.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for restore job parameters.

" + } + }, + "com.amazonaws.s3#RestoreRequestType": { + "type": "enum", + "members": { + "SELECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SELECT" + } + } + } + }, + "com.amazonaws.s3#RestoreStatus": { + "type": "structure", + "members": { + "IsRestoreInProgress": { + "target": "com.amazonaws.s3#IsRestoreInProgress", + "traits": { + "smithy.api#documentation": "

Specifies whether the object is currently being restored. If the object restoration is\n in progress, the header returns the value TRUE. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"true\"\n

\n

If the object restoration has completed, the header returns the value\n FALSE. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"false\",\n RestoreExpiryDate=\"2012-12-21T00:00:00.000Z\"\n

\n

If the object hasn't been restored, there is no header response.

" + } + }, + "RestoreExpiryDate": { + "target": "com.amazonaws.s3#RestoreExpiryDate", + "traits": { + "smithy.api#documentation": "

Indicates when the restored copy will expire. This value is populated only if the object\n has already been restored. For example:

\n

\n x-amz-optional-object-attributes: IsRestoreInProgress=\"false\",\n RestoreExpiryDate=\"2012-12-21T00:00:00.000Z\"\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the restoration status of an object. Objects in certain storage classes must\n be restored before they can be retrieved. For more information about these storage classes\n and how to work with archived objects, see Working with archived\n objects in the Amazon S3 User Guide.

\n \n

This functionality is not supported for directory buckets.\n Directory buckets only support EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.

\n
" + } + }, + "com.amazonaws.s3#Role": { + "type": "string" + }, + "com.amazonaws.s3#RoutingRule": { + "type": "structure", + "members": { + "Condition": { + "target": "com.amazonaws.s3#Condition", + "traits": { + "smithy.api#documentation": "

A container for describing a condition that must be met for the specified redirect to\n apply. For example, 1. If request is for pages in the /docs folder, redirect\n to the /documents folder. 2. If request results in HTTP error 4xx, redirect\n request to another host where you might process the error.

" + } + }, + "Redirect": { + "target": "com.amazonaws.s3#Redirect", + "traits": { + "smithy.api#documentation": "

Container for redirect information. You can redirect requests to another host, to\n another page, or with another protocol. In the event of an error, you can specify a\n different error code to return.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the redirect behavior and when a redirect is applied. For more information\n about routing rules, see Configuring advanced conditional redirects in the\n Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#RoutingRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#RoutingRule", + "traits": { + "smithy.api#xmlName": "RoutingRule" + } + } + }, + "com.amazonaws.s3#S3KeyFilter": { + "type": "structure", + "members": { + "FilterRules": { + "target": "com.amazonaws.s3#FilterRuleList", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "FilterRule" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for object key name prefix and suffix filtering rules.

" + } + }, + "com.amazonaws.s3#S3Location": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket where the restore results will be placed.

", + "smithy.api#required": {} + } + }, + "Prefix": { + "target": "com.amazonaws.s3#LocationPrefix", + "traits": { + "smithy.api#documentation": "

The prefix that is prepended to the restore results for this request.

", + "smithy.api#required": {} + } + }, + "Encryption": { + "target": "com.amazonaws.s3#Encryption" + }, + "CannedACL": { + "target": "com.amazonaws.s3#ObjectCannedACL", + "traits": { + "smithy.api#documentation": "

The canned ACL to apply to the restore results.

" + } + }, + "AccessControlList": { + "target": "com.amazonaws.s3#Grants", + "traits": { + "smithy.api#documentation": "

A list of grants that control access to the staged results.

" + } + }, + "Tagging": { + "target": "com.amazonaws.s3#Tagging", + "traits": { + "smithy.api#documentation": "

The tag-set that is applied to the restore results.

" + } + }, + "UserMetadata": { + "target": "com.amazonaws.s3#UserMetadata", + "traits": { + "smithy.api#documentation": "

A list of metadata to store with the restore results in S3.

" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

The class of storage used to store the restore results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes an Amazon S3 location that will receive the results of the restore request.

" + } + }, + "com.amazonaws.s3#S3TablesArn": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesBucketArn": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesDestination": { + "type": "structure", + "members": { + "TableBucketArn": { + "target": "com.amazonaws.s3#S3TablesBucketArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the table bucket that's specified as the \n destination in the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket.\n

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.s3#S3TablesName", + "traits": { + "smithy.api#documentation": "

\n The name for the metadata table in your metadata table configuration. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket. \n

" + } + }, + "com.amazonaws.s3#S3TablesDestinationResult": { + "type": "structure", + "members": { + "TableBucketArn": { + "target": "com.amazonaws.s3#S3TablesBucketArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the table bucket that's specified as the \n destination in the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket.\n

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.s3#S3TablesName", + "traits": { + "smithy.api#documentation": "

\n The name for the metadata table in your metadata table configuration. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

", + "smithy.api#required": {} + } + }, + "TableArn": { + "target": "com.amazonaws.s3#S3TablesArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The \n specified metadata table name must be unique within the aws_s3_metadata namespace \n in the destination table bucket.\n

", + "smithy.api#required": {} + } + }, + "TableNamespace": { + "target": "com.amazonaws.s3#S3TablesNamespace", + "traits": { + "smithy.api#documentation": "

\n The table bucket namespace for the metadata table in your metadata table configuration. This value \n is always aws_s3_metadata.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The destination information for the metadata table configuration. The destination table bucket\n must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata\n table name must be unique within the aws_s3_metadata namespace in the destination \n table bucket.\n

" + } + }, + "com.amazonaws.s3#S3TablesName": { + "type": "string" + }, + "com.amazonaws.s3#S3TablesNamespace": { + "type": "string" + }, + "com.amazonaws.s3#SSECustomerAlgorithm": { + "type": "string" + }, + "com.amazonaws.s3#SSECustomerKey": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#SSECustomerKeyMD5": { + "type": "string" + }, + "com.amazonaws.s3#SSEKMS": { + "type": "structure", + "members": { + "KeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for\n encrypting inventory reports.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

", + "smithy.api#xmlName": "SSE-KMS" + } + }, + "com.amazonaws.s3#SSEKMSEncryptionContext": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#SSEKMSKeyId": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#SSES3": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

", + "smithy.api#xmlName": "SSE-S3" + } + }, + "com.amazonaws.s3#ScanRange": { + "type": "structure", + "members": { + "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\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": { + "target": "com.amazonaws.s3#End", + "traits": { + "smithy.api#documentation": "

Specifies the end of the byte range. This parameter is optional. Valid values:\n non-negative integers. The default value is one less than the size of the object being\n queried. If only the End parameter is supplied, it is interpreted to mean scan the last N\n bytes of the file. For example,\n 50 means scan the\n last 50 bytes.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the byte range of the object to get the records from. A record is processed\n when its first byte is contained by the range. This parameter is optional, but when\n specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the\n start and end of the range.

" + } + }, + "com.amazonaws.s3#SelectObjectContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#SelectObjectContentRequest" + }, + "output": { + "target": "com.amazonaws.s3#SelectObjectContentOutput" + }, + "traits": { + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

This action filters the contents of an Amazon S3 object based on a simple structured query\n language (SQL) statement. In the request, along with the SQL expression, you must also\n specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses\n this format to parse object data into records, and returns only records that match the\n specified SQL expression. You must also specify the data serialization format for the\n response.

\n

This functionality is not supported for Amazon S3 on Outposts.

\n

For more information about Amazon S3 Select, see Selecting Content from\n Objects and SELECT\n Command in the Amazon S3 User Guide.

\n

\n
\n
Permissions
\n
\n

You must have the s3:GetObject permission for this operation.\u00a0Amazon S3\n Select does not support anonymous access. For more information about permissions,\n see Specifying Permissions in\n a Policy in the Amazon S3 User Guide.

\n
\n
Object Data Formats
\n
\n

You can use Amazon S3 Select to query objects that have the following format\n properties:

\n
    \n
  • \n

    \n CSV, JSON, and Parquet - Objects must be in CSV,\n JSON, or Parquet format.

    \n
  • \n
  • \n

    \n UTF-8 - UTF-8 is the only encoding type Amazon S3 Select\n supports.

    \n
  • \n
  • \n

    \n GZIP or BZIP2 - CSV and JSON files can be compressed\n using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that\n Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar\n compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support\n whole-object compression for Parquet objects.

    \n
  • \n
  • \n

    \n Server-side encryption - Amazon S3 Select supports\n querying objects that are protected with server-side encryption.

    \n

    For objects that are encrypted with customer-provided encryption keys\n (SSE-C), you must use HTTPS, and you must use the headers that are\n documented in the GetObject. For more\n information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys)\n in the Amazon S3 User Guide.

    \n

    For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and\n Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently,\n so you don't need to specify anything. For more information about\n server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
Working with the Response Body
\n
\n

Given the response size is unknown, Amazon S3 Select streams the response as a\n series of messages and includes a Transfer-Encoding header with\n chunked as its value in the response. For more information, see\n Appendix:\n SelectObjectContent\n Response.

\n
\n
GetObject Support
\n
\n

The SelectObjectContent action does not support the following\n GetObject functionality. For more information, see GetObject.

\n
    \n
  • \n

    \n Range: Although you can specify a scan range for an Amazon S3 Select\n request (see SelectObjectContentRequest - ScanRange in the request\n parameters), you cannot specify the range of bytes of an object to return.\n

    \n
  • \n
  • \n

    The GLACIER, DEEP_ARCHIVE, and\n REDUCED_REDUNDANCY storage classes, or the\n ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access\n tiers of the INTELLIGENT_TIERING storage class: You cannot\n query objects in the GLACIER, DEEP_ARCHIVE, or\n REDUCED_REDUNDANCY storage classes, nor objects in the\n ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access\n tiers of the INTELLIGENT_TIERING storage class. For more\n information about storage classes, see Using Amazon S3\n storage classes in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n
Special Errors
\n
\n

For a list of special errors for this operation, see List of SELECT Object Content Error Codes\n

\n
\n
\n

The following operations are related to SelectObjectContent:

\n ", + "smithy.api#http": { + "method": "POST", + "uri": "/{Bucket}/{Key+}?select&select-type=2", + "code": 200 + } + } + }, + "com.amazonaws.s3#SelectObjectContentEventStream": { + "type": "union", + "members": { + "Records": { + "target": "com.amazonaws.s3#RecordsEvent", + "traits": { + "smithy.api#documentation": "

The Records Event.

" + } + }, + "Stats": { + "target": "com.amazonaws.s3#StatsEvent", + "traits": { + "smithy.api#documentation": "

The Stats Event.

" + } + }, + "Progress": { + "target": "com.amazonaws.s3#ProgressEvent", + "traits": { + "smithy.api#documentation": "

The Progress Event.

" + } + }, + "Cont": { + "target": "com.amazonaws.s3#ContinuationEvent", + "traits": { + "smithy.api#documentation": "

The Continuation Event.

" + } + }, + "End": { + "target": "com.amazonaws.s3#EndEvent", + "traits": { + "smithy.api#documentation": "

The End Event.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The container for selecting objects from a content event stream.

", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.s3#SelectObjectContentOutput": { + "type": "structure", + "members": { + "Payload": { + "target": "com.amazonaws.s3#SelectObjectContentEventStream", + "traits": { + "smithy.api#documentation": "

The array of results.

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#SelectObjectContentRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The S3 bucket.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "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" + } + }, + "Expression": { + "target": "com.amazonaws.s3#Expression", + "traits": { + "smithy.api#documentation": "

The expression that is used to query the object.

", + "smithy.api#required": {} + } + }, + "ExpressionType": { + "target": "com.amazonaws.s3#ExpressionType", + "traits": { + "smithy.api#documentation": "

The type of the provided expression (for example, SQL).

", + "smithy.api#required": {} + } + }, + "RequestProgress": { + "target": "com.amazonaws.s3#RequestProgress", + "traits": { + "smithy.api#documentation": "

Specifies if periodic request progress information should be enabled.

" + } + }, + "InputSerialization": { + "target": "com.amazonaws.s3#InputSerialization", + "traits": { + "smithy.api#documentation": "

Describes the format of the data in the object that is being queried.

", + "smithy.api#required": {} + } + }, + "OutputSerialization": { + "target": "com.amazonaws.s3#OutputSerialization", + "traits": { + "smithy.api#documentation": "

Describes the format of the data that you want Amazon S3 to return in response.

", + "smithy.api#required": {} + } + }, + "ScanRange": { + "target": "com.amazonaws.s3#ScanRange", + "traits": { + "smithy.api#documentation": "

Specifies the byte range of the object to get the records from. A record is processed\n when its first byte is contained by the range. This parameter is optional, but when\n specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the\n start and end of the range.

\n

\n ScanRangemay be used in the following ways:

\n
    \n
  • \n

    \n 50100\n - process only the records starting between the bytes 50 and 100 (inclusive, counting\n from zero)

    \n
  • \n
  • \n

    \n 50 -\n process only the records starting after the byte 50

    \n
  • \n
  • \n

    \n 50 -\n process only the records within the last 50 bytes of the file.

    \n
  • \n
" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#documentation": "\n

Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Request to filter the contents of an Amazon S3 object based on a simple Structured Query\n Language (SQL) statement. In the request, along with the SQL expression, you must specify a\n data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data\n into records. It returns only records that match the specified SQL expression. You must\n also specify the data serialization format for the response. For more information, see\n S3Select API Documentation.

", + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#SelectParameters": { + "type": "structure", + "members": { + "InputSerialization": { + "target": "com.amazonaws.s3#InputSerialization", + "traits": { + "smithy.api#documentation": "

Describes the serialization format of the object.

", + "smithy.api#required": {} + } + }, + "ExpressionType": { + "target": "com.amazonaws.s3#ExpressionType", + "traits": { + "smithy.api#documentation": "

The type of the provided expression (for example, SQL).

", + "smithy.api#required": {} + } + }, + "Expression": { + "target": "com.amazonaws.s3#Expression", + "traits": { + "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

The expression that is used to query the object.

", + "smithy.api#required": {} + } + }, + "OutputSerialization": { + "target": "com.amazonaws.s3#OutputSerialization", + "traits": { + "smithy.api#documentation": "

Describes how the results of the Select job are serialized.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "\n

Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

\n
\n

Describes the parameters for Select job types.

\n

Learn How to optimize querying your data in Amazon S3 using\n Amazon Athena, S3 Object Lambda, or client-side filtering.

" + } + }, + "com.amazonaws.s3#ServerSideEncryption": { + "type": "enum", + "members": { + "AES256": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AES256" + } + }, + "aws_kms": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aws:kms" + } + }, + "aws_kms_dsse": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aws:kms:dsse" + } + } + } + }, + "com.amazonaws.s3#ServerSideEncryptionByDefault": { + "type": "structure", + "members": { + "SSEAlgorithm": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

Server-side encryption algorithm to use for the default encryption.

\n \n

For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

\n
", + "smithy.api#required": {} + } + }, + "KMSMasterKeyID": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default\n encryption.

\n \n
    \n
  • \n

    \n General purpose buckets - This parameter is\n allowed if and only if SSEAlgorithm is set to aws:kms or\n aws:kms:dsse.

    \n
  • \n
  • \n

    \n Directory buckets - This parameter is\n allowed if and only if SSEAlgorithm is set to\n aws:kms.

    \n
  • \n
\n
\n

You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS\n key.

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN:\n arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key Alias: alias/alias-name\n

    \n
  • \n
\n

If you are using encryption with cross-account or Amazon Web Services service operations, you must use\n a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

\n \n
    \n
  • \n

    \n General purpose buckets - If you're specifying\n a customer managed KMS key, we recommend using a fully qualified KMS key ARN.\n If you use a KMS key alias instead, then KMS resolves the key within the\n requester\u2019s account. This behavior can result in data that's encrypted with a\n KMS key that belongs to the requester, and not the bucket owner. Also, if you\n use a key ID, you can run into a LogDestination undeliverable error when creating\n a VPC flow log.

    \n
  • \n
  • \n

    \n Directory buckets -\n When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

    \n
  • \n
\n
\n \n

Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service\n Developer Guide.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the default server-side encryption to apply to new objects in the bucket. If a\n PUT Object request doesn't specify any server-side encryption, this default encryption will\n be applied. For more information, see PutBucketEncryption.

\n \n
    \n
  • \n

    \n General purpose buckets - If you don't specify\n a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key\n (aws/s3) in your Amazon Web Services account the first time that you add an\n object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key\n for SSE-KMS.

    \n
  • \n
  • \n

    \n Directory buckets -\n Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. \nThe Amazon Web Services managed key (aws/s3) isn't supported. \n

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

    \n
  • \n
\n
" + } + }, + "com.amazonaws.s3#ServerSideEncryptionConfiguration": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.s3#ServerSideEncryptionRules", + "traits": { + "smithy.api#documentation": "

Container for information about a particular server-side encryption configuration\n rule.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Rule" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the default server-side-encryption configuration.

" + } + }, + "com.amazonaws.s3#ServerSideEncryptionRule": { + "type": "structure", + "members": { + "ApplyServerSideEncryptionByDefault": { + "target": "com.amazonaws.s3#ServerSideEncryptionByDefault", + "traits": { + "smithy.api#documentation": "

Specifies the default server-side encryption to apply to new objects in the bucket. If a\n PUT Object request doesn't specify any server-side encryption, this default encryption will\n be applied.

" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS\n (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the\n BucketKeyEnabled element to true causes Amazon S3 to use an S3\n Bucket Key.

\n \n
    \n
  • \n

    \n General purpose buckets - By default, S3\n Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can\u2019t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or \n the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    \n
  • \n
\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the default server-side encryption configuration.

\n \n
    \n
  • \n

    \n General purpose buckets - If you're specifying\n a customer managed KMS key, we recommend using a fully qualified KMS key ARN.\n If you use a KMS key alias instead, then KMS resolves the key within the\n requester\u2019s account. This behavior can result in data that's encrypted with a\n KMS key that belongs to the requester, and not the bucket owner.

    \n
  • \n
  • \n

    \n Directory buckets -\n When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

    \n
  • \n
\n
" + } + }, + "com.amazonaws.s3#ServerSideEncryptionRules": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ServerSideEncryptionRule" + } + }, + "com.amazonaws.s3#SessionCredentialValue": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.s3#SessionCredentials": { + "type": "structure", + "members": { + "AccessKeyId": { + "target": "com.amazonaws.s3#AccessKeyIdValue", + "traits": { + "smithy.api#documentation": "

A unique identifier that's associated with a secret access key. The access key ID and\n the secret access key are used together to sign programmatic Amazon Web Services requests\n cryptographically.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "AccessKeyId" + } + }, + "SecretAccessKey": { + "target": "com.amazonaws.s3#SessionCredentialValue", + "traits": { + "smithy.api#documentation": "

A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services\n requests. Signing a request identifies the sender and prevents the request from being\n altered.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "SecretAccessKey" + } + }, + "SessionToken": { + "target": "com.amazonaws.s3#SessionCredentialValue", + "traits": { + "smithy.api#documentation": "

A part of the temporary security credentials. The session token is used to validate the\n temporary security credentials.\n \n

", + "smithy.api#required": {}, + "smithy.api#xmlName": "SessionToken" + } + }, + "Expiration": { + "target": "com.amazonaws.s3#SessionExpiration", + "traits": { + "smithy.api#documentation": "

Temporary security credentials expire after a specified interval. After temporary\n credentials expire, any calls that you make with those credentials will fail. So you must\n generate a new set of temporary credentials. Temporary credentials cannot be extended or\n refreshed beyond the original specified interval.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "Expiration" + } + } + }, + "traits": { + "smithy.api#documentation": "

The established temporary security credentials of the session.

\n \n

\n Directory buckets - These session\n credentials are only supported for the authentication and authorization of Zonal endpoint API operations\n on directory buckets.

\n
" + } + }, + "com.amazonaws.s3#SessionExpiration": { + "type": "timestamp" + }, + "com.amazonaws.s3#SessionMode": { + "type": "enum", + "members": { + "ReadOnly": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReadOnly" + } + }, + "ReadWrite": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReadWrite" + } + } + } + }, + "com.amazonaws.s3#Setting": { + "type": "boolean" + }, + "com.amazonaws.s3#SimplePrefix": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

To use simple format for S3 keys for log objects, set SimplePrefix to an empty\n object.

\n

\n [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]\n

", + "smithy.api#xmlName": "SimplePrefix" + } + }, + "com.amazonaws.s3#Size": { + "type": "long" + }, + "com.amazonaws.s3#SkipValidation": { + "type": "boolean" + }, + "com.amazonaws.s3#SourceSelectionCriteria": { + "type": "structure", + "members": { + "SseKmsEncryptedObjects": { + "target": "com.amazonaws.s3#SseKmsEncryptedObjects", + "traits": { + "smithy.api#documentation": "

A container for filter information for the selection of Amazon S3 objects encrypted with\n Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication\n configuration, this element is required.

" + } + }, + "ReplicaModifications": { + "target": "com.amazonaws.s3#ReplicaModifications", + "traits": { + "smithy.api#documentation": "

A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't\n replicate replica modifications by default. In the latest version of replication\n configuration (when Filter is specified), you can specify this element and set\n the status to Enabled to replicate modifications on replicas.

\n \n

If you don't specify the Filter element, Amazon S3 assumes that the\n replication configuration is the earlier version, V1. In the earlier version, this\n element is not allowed

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container that describes additional filters for identifying the source objects that\n you want to replicate. You can choose to enable or disable the replication of these\n objects. Currently, Amazon S3 supports only the filter that you can specify for objects created\n with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service\n (SSE-KMS).

" + } + }, + "com.amazonaws.s3#SseKmsEncryptedObjects": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.s3#SseKmsEncryptedObjectsStatus", + "traits": { + "smithy.api#documentation": "

Specifies whether Amazon S3 replicates objects created with server-side encryption using an\n Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for filter information for the selection of S3 objects encrypted with Amazon Web Services\n KMS.

" + } + }, + "com.amazonaws.s3#SseKmsEncryptedObjectsStatus": { + "type": "enum", + "members": { + "Enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enabled" + } + }, + "Disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disabled" + } + } + } + }, + "com.amazonaws.s3#Start": { + "type": "long" + }, + "com.amazonaws.s3#StartAfter": { + "type": "string" + }, + "com.amazonaws.s3#Stats": { + "type": "structure", + "members": { + "BytesScanned": { + "target": "com.amazonaws.s3#BytesScanned", + "traits": { + "smithy.api#documentation": "

The total number of object bytes scanned.

" + } + }, + "BytesProcessed": { + "target": "com.amazonaws.s3#BytesProcessed", + "traits": { + "smithy.api#documentation": "

The total number of uncompressed object bytes processed.

" + } + }, + "BytesReturned": { + "target": "com.amazonaws.s3#BytesReturned", + "traits": { + "smithy.api#documentation": "

The total number of bytes of records payload data returned.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the stats details.

" + } + }, + "com.amazonaws.s3#StatsEvent": { + "type": "structure", + "members": { + "Details": { + "target": "com.amazonaws.s3#Stats", + "traits": { + "smithy.api#documentation": "

The Stats event details.

", + "smithy.api#eventPayload": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the Stats Event.

" + } + }, + "com.amazonaws.s3#StorageClass": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" + } + }, + "REDUCED_REDUNDANCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REDUCED_REDUNDANCY" + } + }, + "STANDARD_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD_IA" + } + }, + "ONEZONE_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONEZONE_IA" + } + }, + "INTELLIGENT_TIERING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTELLIGENT_TIERING" + } + }, + "GLACIER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER" + } + }, + "DEEP_ARCHIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE" + } + }, + "OUTPOSTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OUTPOSTS" + } + }, + "GLACIER_IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER_IR" + } + }, + "SNOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNOW" + } + }, + "EXPRESS_ONEZONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXPRESS_ONEZONE" + } + } + } + }, + "com.amazonaws.s3#StorageClassAnalysis": { + "type": "structure", + "members": { + "DataExport": { + "target": "com.amazonaws.s3#StorageClassAnalysisDataExport", + "traits": { + "smithy.api#documentation": "

Specifies how data related to the storage class analysis for an Amazon S3 bucket should be\n exported.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies data related to access patterns to be collected and made available to analyze\n the tradeoffs between different storage classes for an Amazon S3 bucket.

" + } + }, + "com.amazonaws.s3#StorageClassAnalysisDataExport": { + "type": "structure", + "members": { + "OutputSchemaVersion": { + "target": "com.amazonaws.s3#StorageClassAnalysisSchemaVersion", + "traits": { + "smithy.api#documentation": "

The version of the output schema to use when exporting data. Must be\n V_1.

", + "smithy.api#required": {} + } + }, + "Destination": { + "target": "com.amazonaws.s3#AnalyticsExportDestination", + "traits": { + "smithy.api#documentation": "

The place to store the data for an analysis.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for data related to the storage class analysis for an Amazon S3 bucket for\n export.

" + } + }, + "com.amazonaws.s3#StorageClassAnalysisSchemaVersion": { + "type": "enum", + "members": { + "V_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "V_1" + } + } + } + }, + "com.amazonaws.s3#StreamingBlob": { + "type": "blob", + "traits": { + "smithy.api#streaming": {} + } + }, + "com.amazonaws.s3#Suffix": { + "type": "string" + }, + "com.amazonaws.s3#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Name of the object key.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.s3#Value", + "traits": { + "smithy.api#documentation": "

Value of the tag.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A container of a key value name pair.

" + } + }, + "com.amazonaws.s3#TagCount": { + "type": "integer" + }, + "com.amazonaws.s3#TagSet": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Tag", + "traits": { + "smithy.api#xmlName": "Tag" + } + } + }, + "com.amazonaws.s3#Tagging": { + "type": "structure", + "members": { + "TagSet": { + "target": "com.amazonaws.s3#TagSet", + "traits": { + "smithy.api#documentation": "

A collection for a set of tags

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for TagSet elements.

" + } + }, + "com.amazonaws.s3#TaggingDirective": { + "type": "enum", + "members": { + "COPY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COPY" + } + }, + "REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLACE" + } + } + } + }, + "com.amazonaws.s3#TaggingHeader": { + "type": "string" + }, + "com.amazonaws.s3#TargetBucket": { + "type": "string" + }, + "com.amazonaws.s3#TargetGrant": { + "type": "structure", + "members": { + "Grantee": { + "target": "com.amazonaws.s3#Grantee", + "traits": { + "smithy.api#documentation": "

Container for the person being granted permissions.

", + "smithy.api#xmlNamespace": { + "uri": "http://www.w3.org/2001/XMLSchema-instance", + "prefix": "xsi" + } + } + }, + "Permission": { + "target": "com.amazonaws.s3#BucketLogsPermission", + "traits": { + "smithy.api#documentation": "

Logging permissions assigned to the grantee for the bucket.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for granting information.

\n

Buckets that use the bucket owner enforced setting for Object Ownership don't support\n target grants. For more information, see Permissions server access log delivery in the\n Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#TargetGrants": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#TargetGrant", + "traits": { + "smithy.api#xmlName": "Grant" + } + } + }, + "com.amazonaws.s3#TargetObjectKeyFormat": { + "type": "structure", + "members": { + "SimplePrefix": { + "target": "com.amazonaws.s3#SimplePrefix", + "traits": { + "smithy.api#documentation": "

To use the simple format for S3 keys for log objects. To specify SimplePrefix format,\n set SimplePrefix to {}.

", + "smithy.api#xmlName": "SimplePrefix" + } + }, + "PartitionedPrefix": { + "target": "com.amazonaws.s3#PartitionedPrefix", + "traits": { + "smithy.api#documentation": "

Partitioned S3 key for log objects.

", + "smithy.api#xmlName": "PartitionedPrefix" + } + } + }, + "traits": { + "smithy.api#documentation": "

Amazon S3 key format for log objects. Only one format, PartitionedPrefix or\n SimplePrefix, is allowed.

" + } + }, + "com.amazonaws.s3#TargetPrefix": { + "type": "string" + }, + "com.amazonaws.s3#Tier": { + "type": "enum", + "members": { + "Standard": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Standard" + } + }, + "Bulk": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bulk" + } + }, + "Expedited": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Expedited" + } + } + } + }, + "com.amazonaws.s3#Tiering": { + "type": "structure", + "members": { + "Days": { + "target": "com.amazonaws.s3#IntelligentTieringDays", + "traits": { + "smithy.api#documentation": "

The number of consecutive days of no access after which an object will be eligible to be\n transitioned to the corresponding tier. The minimum number of days specified for\n Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least\n 180 days. The maximum can be up to 2 years (730 days).

", + "smithy.api#required": {} + } + }, + "AccessTier": { + "target": "com.amazonaws.s3#IntelligentTieringAccessTier", + "traits": { + "smithy.api#documentation": "

S3 Intelligent-Tiering access tier. See Storage class\n for automatically optimizing frequently and infrequently accessed objects for a\n list of access tiers in the S3 Intelligent-Tiering storage class.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by\n automatically moving data to the most cost-effective storage access tier, without\n additional operational overhead.

" + } + }, + "com.amazonaws.s3#TieringList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Tiering" + } + }, + "com.amazonaws.s3#Token": { + "type": "string" + }, + "com.amazonaws.s3#TooManyParts": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

\n You have attempted to add more parts than the maximum of 10000 \n that are allowed for this object. You can use the CopyObject operation \n to copy this object to another and then add more data to the newly copied object.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.s3#TopicArn": { + "type": "string" + }, + "com.amazonaws.s3#TopicConfiguration": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.s3#NotificationId" + }, + "TopicArn": { + "target": "com.amazonaws.s3#TopicArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message\n when it detects events of the specified type.

", + "smithy.api#required": {}, + "smithy.api#xmlName": "Topic" + } + }, + "Events": { + "target": "com.amazonaws.s3#EventList", + "traits": { + "smithy.api#documentation": "

The Amazon S3 bucket event about which to send notifications. For more information, see\n Supported\n Event Types in the Amazon S3 User Guide.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Event" + } + }, + "Filter": { + "target": "com.amazonaws.s3#NotificationConfigurationFilter" + } + }, + "traits": { + "smithy.api#documentation": "

A container for specifying the configuration for publication of messages to an Amazon\n Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

" + } + }, + "com.amazonaws.s3#TopicConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#TopicConfiguration" + } + }, + "com.amazonaws.s3#Transition": { + "type": "structure", + "members": { + "Date": { + "target": "com.amazonaws.s3#Date", + "traits": { + "smithy.api#documentation": "

Indicates when objects are transitioned to the specified storage class. The date value\n must be in ISO 8601 format. The time is always midnight UTC.

" + } + }, + "Days": { + "target": "com.amazonaws.s3#Days", + "traits": { + "smithy.api#documentation": "

Indicates the number of days after creation when objects are transitioned to the\n specified storage class. If the specified storage class is INTELLIGENT_TIERING, \n GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are \n 0 or positive integers. If the specified storage class is STANDARD_IA \n or ONEZONE_IA, valid values are positive integers greater than 30. Be \n aware that some storage classes have a minimum storage duration and that you're charged for \n transitioning objects before their minimum storage duration. For more information, see \n \n Constraints and considerations for transitions in the \n Amazon S3 User Guide.

" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#TransitionStorageClass", + "traits": { + "smithy.api#documentation": "

The storage class to which you want the object to transition.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies when an object transitions to a specified storage class. For more information\n about Amazon S3 lifecycle configuration rules, see Transitioning\n Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

" + } + }, + "com.amazonaws.s3#TransitionDefaultMinimumObjectSize": { + "type": "enum", + "members": { + "varies_by_storage_class": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "varies_by_storage_class" + } + }, + "all_storage_classes_128K": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all_storage_classes_128K" + } + } + } + }, + "com.amazonaws.s3#TransitionList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#Transition" + } + }, + "com.amazonaws.s3#TransitionStorageClass": { + "type": "enum", + "members": { + "GLACIER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER" + } + }, + "STANDARD_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD_IA" + } + }, + "ONEZONE_IA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONEZONE_IA" + } + }, + "INTELLIGENT_TIERING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTELLIGENT_TIERING" + } + }, + "DEEP_ARCHIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE" + } + }, + "GLACIER_IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER_IR" + } + } + } + }, + "com.amazonaws.s3#Type": { + "type": "enum", + "members": { + "CanonicalUser": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CanonicalUser" + } + }, + "AmazonCustomerByEmail": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AmazonCustomerByEmail" + } + }, + "Group": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Group" + } + } + } + }, + "com.amazonaws.s3#URI": { + "type": "string" + }, + "com.amazonaws.s3#UploadIdMarker": { + "type": "string" + }, + "com.amazonaws.s3#UploadPart": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#UploadPartRequest" + }, + "output": { + "target": "com.amazonaws.s3#UploadPartOutput" + }, + "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "

Uploads a part in a multipart upload.

\n \n

In this operation, you provide new data as a part of an object in your request.\n However, you have an option to specify your existing Amazon S3 object as a data source for\n the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

\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\n specifications, see Multipart upload limits in the Amazon S3 User Guide.

\n \n

After you initiate multipart upload and upload one or more parts, you must either\n complete or abort multipart upload in order to stop getting charged for storage of the\n uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up\n the parts storage and stops charging you for the parts storage.

\n
\n

For more information on multipart uploads, go to Multipart Upload Overview in the\n Amazon S3 User Guide .

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - To\n perform a multipart upload with encryption using an Key Management Service key, the\n requester must have permission to the kms:Decrypt and\n kms:GenerateDataKey actions on the key. The requester must\n also have permissions for the kms:GenerateDataKey action for\n the CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs.

    \n

    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\n more information about KMS permissions, see Protecting data\n using server-side encryption with KMS in the\n Amazon S3 User Guide. For information about the\n permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n
  • \n
\n
\n
Data integrity
\n
\n

\n General purpose bucket - To ensure that data\n is not corrupted traversing the network, specify the Content-MD5\n header in the upload part request. Amazon S3 checks the part data against the provided\n MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is\n 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\n Version 4).

\n \n

\n Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

\n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose bucket - Server-side\n encryption is for data encryption at rest. Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it when you access it.\n You have mutually exclusive options to protect data using server-side\n encryption in Amazon S3, depending on how you choose to manage the encryption\n keys. Specifically, the encryption key options are Amazon S3 managed keys\n (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C).\n Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys\n (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest\n using server-side encryption with other key options. The option you use\n depends on whether you want to use KMS keys (SSE-KMS) or provide your own\n encryption key (SSE-C).

    \n

    Server-side encryption is supported by the S3 Multipart Upload\n operations. Unless you are using a customer-provided encryption key (SSE-C),\n you don't need to specify the encryption parameters in each UploadPart\n request. Instead, you only need to specify the server-side encryption\n parameters in the initial Initiate Multipart request. For more information,\n see CreateMultipartUpload.

    \n

    If you request server-side encryption using a customer-provided\n encryption key (SSE-C) in your initiate multipart upload request, you must\n provide identical encryption information in each part upload using the\n following request 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, see Using\n Server-Side Encryption in the\n Amazon S3 User Guide.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms).

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    • \n

      SOAP Fault Code Prefix: Client

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to UploadPart:

\n ", + "smithy.api#examples": [ + { + "title": "To upload a part", + "documentation": "The following example uploads part 1 of a multipart upload. The example specifies a file name for the part data. The Upload ID is same that is returned by the initiate multipart upload.", "input": { - "target": "com.amazonaws.s3#WriteGetObjectResponseRequest" + "Body": "fileToUpload", + "Bucket": "examplebucket", + "Key": "examplelargeobject", + "PartNumber": 1, + "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" }, "output": { - "target": "smithy.api#Unit" + "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?x-id=UploadPart", + "code": 200 + } + } + }, + "com.amazonaws.s3#UploadPartCopy": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#UploadPartCopyRequest" + }, + "output": { + "target": "com.amazonaws.s3#UploadPartCopyOutput" + }, + "traits": { + "smithy.api#documentation": "

Uploads a part by copying data from an existing object as data source. To specify the\n data source, you add the request header x-amz-copy-source in your request. To\n specify a byte range, you add the request header x-amz-copy-source-range in\n your request.

\n

For information about maximum and minimum part sizes and other multipart upload\n specifications, see Multipart upload limits in the Amazon S3 User Guide.

\n \n

Instead of copying data from an existing object as part data, you might use the\n UploadPart action to upload new data as a part of an object in your\n request.

\n
\n

You must initiate a multipart upload before you can upload any part. In response to your\n initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in\n your upload part request.

\n

For conceptual information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide. For information about\n copying objects using a single atomic action vs. a multipart upload, see Operations on\n Objects in the Amazon S3 User Guide.

\n \n

\n Directory buckets -\n For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name\n . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the\n Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the\n Amazon S3 User Guide.

\n
\n
\n
Authentication and authorization
\n
\n

All UploadPartCopy requests must be authenticated and signed by\n using IAM credentials (access key ID and secret access key for the IAM\n identities). All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed. For more information, see\n REST Authentication.

\n

\n Directory buckets - You must use IAM\n credentials to authenticate and authorize your access to the\n UploadPartCopy API operation, instead of using the temporary\n security credentials through the CreateSession API operation.

\n

Amazon Web Services CLI or SDKs handles authentication and authorization on your\n behalf.

\n
\n
Permissions
\n
\n

You must have READ access to the source object and\n WRITE access to the destination bucket.

\n
    \n
  • \n

    \n General purpose bucket permissions - You\n must have the permissions in a policy based on the bucket types of your\n source bucket and destination bucket in an UploadPartCopy\n operation.

    \n
      \n
    • \n

      If the source object is in a general purpose bucket, you must have the\n \n s3:GetObject\n \n permission to read the source object that is being copied.

      \n
    • \n
    • \n

      If the destination bucket is a general purpose bucket, you must have the\n \n s3:PutObject\n \n permission to write the object copy to the destination bucket.

      \n
    • \n
    • \n

      To perform a multipart upload with encryption using an Key Management Service\n key, the requester must have permission to the\n kms:Decrypt and kms:GenerateDataKey\n actions on the key. The requester must also have permissions for the\n kms:GenerateDataKey action for the\n CreateMultipartUpload API. Then, the requester needs\n permissions for the kms:Decrypt action on the\n UploadPart and UploadPartCopy APIs. These\n permissions are required because Amazon S3 must decrypt and read data from\n the encrypted file parts before it completes the multipart upload. For\n more information about KMS permissions, see Protecting\n data using server-side encryption with KMS in the\n Amazon S3 User Guide. For information about the\n permissions required to use the multipart upload API, see Multipart upload\n and permissions and Multipart upload API and permissions in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions -\n You must have permissions in a bucket policy or an IAM identity-based policy based on the\n source and destination bucket types in an UploadPartCopy\n operation.

    \n
      \n
    • \n

      If the source object that you want to copy is in a\n directory bucket, you must have the \n s3express:CreateSession\n permission in\n the Action element of a policy to read the object. By\n default, the session is in the ReadWrite mode. If you\n want to restrict the access, you can explicitly set the\n s3express:SessionMode condition key to\n ReadOnly on the copy source bucket.

      \n
    • \n
    • \n

      If the copy destination is a directory bucket, you must have the\n \n s3express:CreateSession\n permission in the\n Action element of a policy to write the object to the\n destination. The s3express:SessionMode condition key\n cannot be set to ReadOnly on the copy destination.\n

      \n
    • \n
    \n

    If the object is encrypted with SSE-KMS, you must also have the\n kms:GenerateDataKey and kms:Decrypt permissions\n in IAM identity-based policies and KMS key policies for the KMS\n key.

    \n

    For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for\n S3 Express One Zone in the Amazon S3 User Guide.

    \n
  • \n
\n
\n
Encryption
\n
\n
    \n
  • \n

    \n General purpose buckets -\n For information about using\n server-side encryption with customer-provided encryption keys with the\n UploadPartCopy operation, see CopyObject and\n UploadPart.

    \n
  • \n
  • \n

    \n Directory buckets -\n For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). For more\n information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    \n \n

    For directory buckets, when you perform a\n CreateMultipartUpload operation and an\n UploadPartCopy operation, the request headers you provide\n in the CreateMultipartUpload request must match the default\n encryption configuration of the destination bucket.

    \n
    \n

    S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets \nto directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through UploadPartCopy. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    \n
  • \n
\n
\n
Special errors
\n
\n
    \n
  • \n

    Error Code: NoSuchUpload\n

    \n
      \n
    • \n

      Description: The specified multipart upload does not exist. The\n upload ID might be invalid, or the multipart upload might have been\n aborted or completed.

      \n
    • \n
    • \n

      HTTP Status Code: 404 Not Found

      \n
    • \n
    \n
  • \n
  • \n

    Error Code: InvalidRequest\n

    \n
      \n
    • \n

      Description: The specified copy source is not supported as a\n byte-range copy source.

      \n
    • \n
    • \n

      HTTP Status Code: 400 Bad Request

      \n
    • \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket-name.s3express-zone-id.region-code.amazonaws.com.

\n
\n
\n

The following operations are related to UploadPartCopy:

\n ", + "smithy.api#examples": [ + { + "title": "To upload a part by copying byte range from an existing object as data source", + "documentation": "The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.", + "input": { + "Bucket": "examplebucket", + "CopySource": "/bucketname/sourceobjectkey", + "CopySourceRange": "bytes=1-100000", + "Key": "examplelargeobject", + "PartNumber": 2, + "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" }, - "traits": { - "aws.auth#unsignedPayload": {}, - "smithy.api#auth": [ - "aws.auth#sigv4" - ], - "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Passes transformed objects to a GetObject operation when using Object Lambda access points. For\n information about Object Lambda access points, see Transforming objects with\n Object Lambda access points in the Amazon S3 User Guide.

\n

This operation supports metadata that can be returned by GetObject, in addition to\n RequestRoute, RequestToken, StatusCode,\n ErrorCode, and ErrorMessage. The GetObject\n response metadata is supported so that the WriteGetObjectResponse caller,\n typically an Lambda function, can provide the same metadata when it internally invokes\n GetObject. When WriteGetObjectResponse is called by a\n customer-owned Lambda function, the metadata returned to the end user\n GetObject call might differ from what Amazon S3 would normally return.

\n

You can include any number of metadata headers. When including a metadata header, it\n should be prefaced with x-amz-meta. For example,\n x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this\n is to forward GetObject metadata.

\n

Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to\n detect and redact personally identifiable information (PII) and decompress S3 objects.\n These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and\n can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

\n

Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a\n natural language processing (NLP) service using machine learning to find insights and\n relationships in text. It automatically detects personally identifiable information (PII)\n such as names, addresses, dates, credit card numbers, and social security numbers from\n documents in your Amazon S3 bucket.

\n

Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural\n language processing (NLP) service using machine learning to find insights and relationships\n in text. It automatically redacts personally identifiable information (PII) such as names,\n addresses, dates, credit card numbers, and social security numbers from documents in your\n Amazon S3 bucket.

\n

Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is\n equipped to decompress objects stored in S3 in one of six compressed file formats including\n bzip2, gzip, snappy, zlib, zstandard and ZIP.

\n

For information on how to view and use these functions, see Using Amazon Web Services built Lambda\n functions in the Amazon S3 User Guide.

", - "smithy.api#endpoint": { - "hostPrefix": "{RequestRoute}." - }, - "smithy.api#http": { - "method": "POST", - "uri": "/WriteGetObjectResponse", - "code": 200 - }, - "smithy.rules#staticContextParams": { - "UseObjectLambdaEndpoint": { - "value": true - } - } - } - }, - "com.amazonaws.s3#WriteGetObjectResponseRequest": { - "type": "structure", - "members": { - "RequestRoute": { - "target": "com.amazonaws.s3#RequestRoute", - "traits": { - "smithy.api#documentation": "

Route prefix to the HTTP URL generated.

", - "smithy.api#hostLabel": {}, - "smithy.api#httpHeader": "x-amz-request-route", - "smithy.api#required": {} - } - }, - "RequestToken": { - "target": "com.amazonaws.s3#RequestToken", - "traits": { - "smithy.api#documentation": "

A single use encrypted token that maps WriteGetObjectResponse to the end\n user GetObject request.

", - "smithy.api#httpHeader": "x-amz-request-token", - "smithy.api#required": {} - } - }, - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

The object data.

", - "smithy.api#httpPayload": {} - } - }, - "StatusCode": { - "target": "com.amazonaws.s3#GetObjectResponseStatusCode", - "traits": { - "smithy.api#documentation": "

The integer status code for an HTTP response of a corresponding GetObject\n request. The following is a list of status codes.

\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. The regular expression (regex)\n value is \"^[A-Z][a-zA-Z]+$\".

", - "smithy.api#httpHeader": "x-amz-fwd-error-code" - } - }, - "ErrorMessage": { - "target": "com.amazonaws.s3#ErrorMessage", - "traits": { - "smithy.api#documentation": "

Contains a generic description of the error condition. Returned in the \n tag of the error XML response for a corresponding GetObject call. Cannot be\n used with a successful StatusCode header or when the transformed object is\n provided in body.

", - "smithy.api#httpHeader": "x-amz-fwd-error-message" - } - }, - "AcceptRanges": { - "target": "com.amazonaws.s3#AcceptRanges", - "traits": { - "smithy.api#documentation": "

Indicates that a range of bytes was specified.

", - "smithy.api#httpHeader": "x-amz-fwd-header-accept-ranges" - } - }, - "CacheControl": { - "target": "com.amazonaws.s3#CacheControl", - "traits": { - "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", - "smithy.api#httpHeader": "x-amz-fwd-header-Cache-Control" - } - }, - "ContentDisposition": { - "target": "com.amazonaws.s3#ContentDisposition", - "traits": { - "smithy.api#documentation": "

Specifies presentational information for the object.

", - "smithy.api#httpHeader": "x-amz-fwd-header-Content-Disposition" - } - }, - "ContentEncoding": { - "target": "com.amazonaws.s3#ContentEncoding", - "traits": { - "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", - "smithy.api#httpHeader": "x-amz-fwd-header-Content-Encoding" - } - }, - "ContentLanguage": { - "target": "com.amazonaws.s3#ContentLanguage", - "traits": { - "smithy.api#documentation": "

The language the content is in.

", - "smithy.api#httpHeader": "x-amz-fwd-header-Content-Language" - } - }, - "ContentLength": { - "target": "com.amazonaws.s3#ContentLength", - "traits": { - "smithy.api#documentation": "

The size of the content body in bytes.

", - "smithy.api#httpHeader": "Content-Length" - } - }, - "ContentRange": { - "target": "com.amazonaws.s3#ContentRange", - "traits": { - "smithy.api#documentation": "

The portion of the object returned in the response.

", - "smithy.api#httpHeader": "x-amz-fwd-header-Content-Range" - } - }, - "ContentType": { - "target": "com.amazonaws.s3#ContentType", - "traits": { - "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", - "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\n the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32\n checksum of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n 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\n the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C\n checksum of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n headers, this request will fail.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-crc32c" - } - }, - "ChecksumCRC64NVME": { - "target": "com.amazonaws.s3#ChecksumCRC64NVME", - "traits": { - "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-crc64nvme" - } - }, - "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\n the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1\n digest of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n 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\n the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256\n digest of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n headers, this request will fail.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-sha256" - } - }, - "DeleteMarker": { - "target": "com.amazonaws.s3#DeleteMarker", - "traits": { - "smithy.api#documentation": "

Specifies whether an object stored in Amazon S3 is (true) or is not\n (false) a delete marker. To learn more about delete markers, see Working with delete markers.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-delete-marker" - } - }, - "ETag": { - "target": "com.amazonaws.s3#ETag", - "traits": { - "smithy.api#documentation": "

An opaque identifier assigned by a web server to a specific version of a resource found\n at a URL.

", - "smithy.api#httpHeader": "x-amz-fwd-header-ETag" - } - }, - "Expires": { - "target": "com.amazonaws.s3#Expires", - "traits": { - "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", - "smithy.api#httpHeader": "x-amz-fwd-header-Expires" - } - }, - "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\n pairs that provide the object expiration information. The value of the rule-id\n is URL-encoded.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-expiration" - } - }, - "LastModified": { - "target": "com.amazonaws.s3#LastModified", - "traits": { - "smithy.api#documentation": "

The date and time that the object was last modified.

", - "smithy.api#httpHeader": "x-amz-fwd-header-Last-Modified" - } - }, - "MissingMeta": { - "target": "com.amazonaws.s3#MissingMeta", - "traits": { - "smithy.api#documentation": "

Set to the number of metadata entries not returned in x-amz-meta headers.\n This can happen if you create metadata using an API like SOAP that supports more flexible\n metadata than the REST API. For example, using SOAP, you can create metadata whose values\n are not legal HTTP headers.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-missing-meta" - } - }, - "Metadata": { - "target": "com.amazonaws.s3#Metadata", - "traits": { - "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", - "smithy.api#httpPrefixHeaders": "x-amz-meta-" - } - }, - "ObjectLockMode": { - "target": "com.amazonaws.s3#ObjectLockMode", - "traits": { - "smithy.api#documentation": "

Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information\n about S3 Object Lock, see Object Lock.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-mode" - } - }, - "ObjectLockLegalHoldStatus": { - "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", - "traits": { - "smithy.api#documentation": "

Indicates whether an object stored in Amazon S3 has an active legal hold.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-legal-hold" - } - }, - "ObjectLockRetainUntilDate": { - "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", - "traits": { - "smithy.api#documentation": "

The date and time when Object Lock is configured to expire.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-retain-until-date" - } - }, - "PartsCount": { - "target": "com.amazonaws.s3#PartsCount", - "traits": { - "smithy.api#documentation": "

The count of parts this object has.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-mp-parts-count" - } - }, - "ReplicationStatus": { - "target": "com.amazonaws.s3#ReplicationStatus", - "traits": { - "smithy.api#documentation": "

Indicates if request involves bucket that is either a source or destination in a\n Replication rule. For more information about S3 Replication, see Replication.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-replication-status" - } - }, - "RequestCharged": { - "target": "com.amazonaws.s3#RequestCharged", - "traits": { - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-request-charged" - } - }, - "Restore": { - "target": "com.amazonaws.s3#Restore", - "traits": { - "smithy.api#documentation": "

Provides information about object restoration operation and expiration time of the\n restored object copy.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-restore" - } - }, - "ServerSideEncryption": { - "target": "com.amazonaws.s3#ServerSideEncryption", - "traits": { - "smithy.api#documentation": "

The server-side encryption algorithm used when storing requested object in Amazon S3 (for\n example, AES256, aws:kms).

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption" - } - }, - "SSECustomerAlgorithm": { - "target": "com.amazonaws.s3#SSECustomerAlgorithm", - "traits": { - "smithy.api#documentation": "

Encryption algorithm used if server-side encryption with a customer-provided encryption\n key was specified for object stored in Amazon S3.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm" - } - }, - "SSEKMSKeyId": { - "target": "com.amazonaws.s3#SSEKMSKeyId", - "traits": { - "smithy.api#documentation": "

If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key\n Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in\n Amazon S3 object.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id" - } - }, - "SSECustomerKeyMD5": { - "target": "com.amazonaws.s3#SSECustomerKeyMD5", - "traits": { - "smithy.api#documentation": "

128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data\n stored in S3. For more information, see Protecting data\n using server-side encryption with customer-provided encryption keys\n (SSE-C).

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5" - } - }, - "StorageClass": { - "target": "com.amazonaws.s3#StorageClass", - "traits": { - "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

For more information, see Storage Classes.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-storage-class" - } - }, - "TagCount": { - "target": "com.amazonaws.s3#TagCount", - "traits": { - "smithy.api#documentation": "

The number of tags, if any, on the object.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-tagging-count" - } - }, - "VersionId": { - "target": "com.amazonaws.s3#ObjectVersionId", - "traits": { - "smithy.api#documentation": "

An ID used to reference a specific version of the object.

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-version-id" - } - }, - "BucketKeyEnabled": { - "target": "com.amazonaws.s3#BucketKeyEnabled", - "traits": { - "smithy.api#documentation": "

Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side\n encryption with Amazon Web Services KMS (SSE-KMS).

", - "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled" - } - } + "output": { + "CopyPartResult": { + "LastModified": "2016-12-29T21:44:28.000Z", + "ETag": "\"65d16d19e65a7508a51f043180edcc36\"" + } + } + }, + { + "title": "To upload a part by copying data from an existing object as data source", + "documentation": "The following example uploads a part of a multipart upload by copying data from an existing object as data source.", + "input": { + "Bucket": "examplebucket", + "CopySource": "/bucketname/sourceobjectkey", + "Key": "examplelargeobject", + "PartNumber": 1, + "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#WriteOffsetBytes": { - "type": "long" - }, - "com.amazonaws.s3#Years": { - "type": "integer" + "output": { + "CopyPartResult": { + "LastModified": "2016-12-29T21:24:43.000Z", + "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"" + } + } + } + ], + "smithy.api#http": { + "method": "PUT", + "uri": "/{Bucket}/{Key+}?x-id=UploadPartCopy", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "DisableS3ExpressSessionAuth": { + "value": true + } + } + } + }, + "com.amazonaws.s3#UploadPartCopyOutput": { + "type": "structure", + "members": { + "CopySourceVersionId": { + "target": "com.amazonaws.s3#CopySourceVersionId", + "traits": { + "smithy.api#documentation": "

The version of the source object that was copied, if you have enabled versioning on the\n source bucket.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-version-id" + } + }, + "CopyPartResult": { + "target": "com.amazonaws.s3#CopyPartResult", + "traits": { + "smithy.api#documentation": "

Container for all response elements.

", + "smithy.api#httpPayload": {} + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#UploadPartCopyRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name.

\n

\n Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n \n

Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, \n you get an HTTP 400 Bad Request error with the error code InvalidRequest.

\n
\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "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 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
      \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
    • \n

      Access points are not supported by directory buckets.

      \n
    • \n
    \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

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 source object to copy. To copy a specific version of the source object to copy, append\n ?versionId= to the x-amz-copy-source request\n header (for example, x-amz-copy-source:\n /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

\n

If the current version is a delete marker and you don't specify a versionId in the\n x-amz-copy-source request header, Amazon S3 returns a 404 Not Found\n error, because the object does not exist. If you specify versionId in the\n x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an\n HTTP 400 Bad Request error, because you are not allowed to specify a delete\n marker as a version for the x-amz-copy-source.

\n \n

\n Directory buckets -\n S3 Versioning isn't enabled and supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source", + "smithy.api#required": {} + } + }, + "CopySourceIfMatch": { + "target": "com.amazonaws.s3#CopySourceIfMatch", + "traits": { + "smithy.api#documentation": "

Copies the object if its entity tag (ETag) matches the specified tag.

\n

If both of the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request as\n 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

", + "smithy.api#httpHeader": "x-amz-copy-source-if-match" + } + }, + "CopySourceIfModifiedSince": { + "target": "com.amazonaws.s3#CopySourceIfModifiedSince", + "traits": { + "smithy.api#documentation": "

Copies the object if it has been modified since the specified time.

\n

If both of the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request as\n follows:

\n

\n x-amz-copy-source-if-none-match condition evaluates to false,\n 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

", + "smithy.api#httpHeader": "x-amz-copy-source-if-modified-since" + } + }, + "CopySourceIfNoneMatch": { + "target": "com.amazonaws.s3#CopySourceIfNoneMatch", + "traits": { + "smithy.api#documentation": "

Copies the object if its entity tag (ETag) is different than the specified ETag.

\n

If both of the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request as\n follows:

\n

\n x-amz-copy-source-if-none-match condition evaluates to false,\n 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

", + "smithy.api#httpHeader": "x-amz-copy-source-if-none-match" + } + }, + "CopySourceIfUnmodifiedSince": { + "target": "com.amazonaws.s3#CopySourceIfUnmodifiedSince", + "traits": { + "smithy.api#documentation": "

Copies the object if it hasn't been modified since the specified time.

\n

If both of the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request as\n 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

", + "smithy.api#httpHeader": "x-amz-copy-source-if-unmodified-since" + } + }, + "CopySourceRange": { + "target": "com.amazonaws.s3#CopySourceRange", + "traits": { + "smithy.api#documentation": "

The range of bytes to copy from the source object. The range value must use the form\n bytes=first-last, where the first and last are the zero-based byte offsets to copy. For\n example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You\n can copy a range only if the source object is greater than 5 MB.

", + "smithy.api#httpHeader": "x-amz-copy-source-range" + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number of part being copied. This is a positive integer between 1 and\n 10,000.

", + "smithy.api#httpQuery": "partNumber", + "smithy.api#required": {} + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID identifying the multipart upload whose part is being copied.

", + "smithy.api#httpQuery": "uploadId", + "smithy.api#required": {} + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example, AES256).

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "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. This must be the\n same encryption key specified in the initiate multipart upload request.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "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.

\n \n

This functionality is not supported when the destination bucket is a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "CopySourceSSECustomerAlgorithm": { + "target": "com.amazonaws.s3#CopySourceSSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when decrypting the source object (for example,\n AES256).

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-algorithm" + } + }, + "CopySourceSSECustomerKey": { + "target": "com.amazonaws.s3#CopySourceSSECustomerKey", + "traits": { + "smithy.api#documentation": "

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source\n object. The encryption key provided in this header must be one that was used when the\n source object was created.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-server-side-encryption-customer-key" + } + }, + "CopySourceSSECustomerKeyMD5": { + "target": "com.amazonaws.s3#CopySourceSSECustomerKeyMD5", + "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.

\n \n

This functionality is not supported when the source object is in a directory bucket.

\n
", + "smithy.api#httpHeader": "x-amz-copy-source-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 destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, 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 account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-source-expected-bucket-owner" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#UploadPartOutput": { + "type": "structure", + "members": { + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when you store this object in Amazon S3 (for\n example, AES256, aws:kms).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

Entity tag for the uploaded object.

", + "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 checksum is only be present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 checksum is only present if the checksum was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded\n with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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 SHA256 digest of the object. This will only be present if the object was uploaded\n with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. 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": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to confirm the encryption algorithm that's used.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

If server-side encryption with a customer-provided encryption key was requested, the\n response will include this header to provide the round-trip message integrity verification\n of the customer-provided encryption key.

\n \n

This functionality is not supported for directory buckets.

\n
", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, indicates the ID of the KMS key that was used for object encryption.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption\n with Key Management Service (KMS) keys (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-bucket-key-enabled" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.s3#UploadPartRequest": { + "type": "structure", + "members": { + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

Object data.

", + "smithy.api#httpPayload": {} + } + }, + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

\n Directory buckets -\n When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format \n Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format \n bucket-base-name--zone-id--x-s3 (for example, \n amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming\n restrictions, see Directory bucket naming\n rules in the Amazon S3 User Guide.

\n

\n Access points - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, 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 \n

Object Lambda access points are not supported by directory buckets.

\n
\n

\n S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the \n form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Bucket" + } + } + }, + "ContentLength": { + "target": "com.amazonaws.s3#ContentLength", + "traits": { + "smithy.api#documentation": "

Size of the body in bytes. This parameter is useful when the size of the body cannot be\n determined automatically.

", + "smithy.api#httpHeader": "Content-Length" + } + }, + "ContentMD5": { + "target": "com.amazonaws.s3#ContentMD5", + "traits": { + "smithy.api#documentation": "

The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated\n when using the command from the CLI. This parameter is required if object lock parameters\n are specified.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 you use the SDK. This header will not provide any\n additional functionality if you don't use the SDK. When you send 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 value\n 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" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc64nvme" + } + }, + "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 SHA1 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 SHA256 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": { + "smithy.api#documentation": "

Object key for which the multipart upload was initiated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.rules#contextParam": { + "name": "Key" + } + } + }, + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

Part number of part being uploaded. This is a positive integer between 1 and\n 10,000.

", + "smithy.api#httpQuery": "partNumber", + "smithy.api#required": {} + } + }, + "UploadId": { + "target": "com.amazonaws.s3#MultipartUploadId", + "traits": { + "smithy.api#documentation": "

Upload ID identifying the multipart upload whose part is being uploaded.

", + "smithy.api#httpQuery": "uploadId", + "smithy.api#required": {} + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example, AES256).

\n \n

This functionality is not supported for directory buckets.

\n
", + "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. This must be the\n same encryption key specified in the initiate multipart upload request.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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.

\n \n

This functionality is not supported for directory buckets.

\n
", + "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 account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#UserMetadata": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#MetadataEntry", + "traits": { + "smithy.api#xmlName": "MetadataEntry" + } + } + }, + "com.amazonaws.s3#Value": { + "type": "string" + }, + "com.amazonaws.s3#VersionCount": { + "type": "integer" + }, + "com.amazonaws.s3#VersionIdMarker": { + "type": "string" + }, + "com.amazonaws.s3#VersioningConfiguration": { + "type": "structure", + "members": { + "MFADelete": { + "target": "com.amazonaws.s3#MFADelete", + "traits": { + "smithy.api#documentation": "

Specifies whether MFA delete is enabled in the bucket versioning configuration. This\n element is only returned if the bucket has been configured with MFA delete. If the bucket\n has never been so configured, this element is not returned.

", + "smithy.api#xmlName": "MfaDelete" + } + }, + "Status": { + "target": "com.amazonaws.s3#BucketVersioningStatus", + "traits": { + "smithy.api#documentation": "

The versioning state of the bucket.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the versioning state of an Amazon S3 bucket. For more information, see PUT\n Bucket versioning in the Amazon S3 API Reference.

" + } + }, + "com.amazonaws.s3#WebsiteConfiguration": { + "type": "structure", + "members": { + "ErrorDocument": { + "target": "com.amazonaws.s3#ErrorDocument", + "traits": { + "smithy.api#documentation": "

The name of the error document for the website.

" + } + }, + "IndexDocument": { + "target": "com.amazonaws.s3#IndexDocument", + "traits": { + "smithy.api#documentation": "

The name of the index document for the website.

" + } + }, + "RedirectAllRequestsTo": { + "target": "com.amazonaws.s3#RedirectAllRequestsTo", + "traits": { + "smithy.api#documentation": "

The redirect behavior for every request to this bucket's website endpoint.

\n \n

If you specify this property, you can't specify any other property.

\n
" + } + }, + "RoutingRules": { + "target": "com.amazonaws.s3#RoutingRules", + "traits": { + "smithy.api#documentation": "

Rules that define when a redirect is applied and the redirect behavior.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies website configuration parameters for an Amazon S3 bucket.

" + } + }, + "com.amazonaws.s3#WebsiteRedirectLocation": { + "type": "string" + }, + "com.amazonaws.s3#WriteGetObjectResponse": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#WriteGetObjectResponseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "aws.auth#unsignedPayload": {}, + "smithy.api#auth": [ + "aws.auth#sigv4" + ], + "smithy.api#documentation": "\n

This operation is not supported for directory buckets.

\n
\n

Passes transformed objects to a GetObject operation when using Object Lambda access points. For\n information about Object Lambda access points, see Transforming objects with\n Object Lambda access points in the Amazon S3 User Guide.

\n

This operation supports metadata that can be returned by GetObject, in addition to\n RequestRoute, RequestToken, StatusCode,\n ErrorCode, and ErrorMessage. The GetObject\n response metadata is supported so that the WriteGetObjectResponse caller,\n typically an Lambda function, can provide the same metadata when it internally invokes\n GetObject. When WriteGetObjectResponse is called by a\n customer-owned Lambda function, the metadata returned to the end user\n GetObject call might differ from what Amazon S3 would normally return.

\n

You can include any number of metadata headers. When including a metadata header, it\n should be prefaced with x-amz-meta. For example,\n x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this\n is to forward GetObject metadata.

\n

Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to\n detect and redact personally identifiable information (PII) and decompress S3 objects.\n These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and\n can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

\n

Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a\n natural language processing (NLP) service using machine learning to find insights and\n relationships in text. It automatically detects personally identifiable information (PII)\n such as names, addresses, dates, credit card numbers, and social security numbers from\n documents in your Amazon S3 bucket.

\n

Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural\n language processing (NLP) service using machine learning to find insights and relationships\n in text. It automatically redacts personally identifiable information (PII) such as names,\n addresses, dates, credit card numbers, and social security numbers from documents in your\n Amazon S3 bucket.

\n

Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is\n equipped to decompress objects stored in S3 in one of six compressed file formats including\n bzip2, gzip, snappy, zlib, zstandard and ZIP.

\n

For information on how to view and use these functions, see Using Amazon Web Services built Lambda\n functions in the Amazon S3 User Guide.

", + "smithy.api#endpoint": { + "hostPrefix": "{RequestRoute}." + }, + "smithy.api#http": { + "method": "POST", + "uri": "/WriteGetObjectResponse", + "code": 200 + }, + "smithy.rules#staticContextParams": { + "UseObjectLambdaEndpoint": { + "value": true + } + } + } + }, + "com.amazonaws.s3#WriteGetObjectResponseRequest": { + "type": "structure", + "members": { + "RequestRoute": { + "target": "com.amazonaws.s3#RequestRoute", + "traits": { + "smithy.api#documentation": "

Route prefix to the HTTP URL generated.

", + "smithy.api#hostLabel": {}, + "smithy.api#httpHeader": "x-amz-request-route", + "smithy.api#required": {} + } + }, + "RequestToken": { + "target": "com.amazonaws.s3#RequestToken", + "traits": { + "smithy.api#documentation": "

A single use encrypted token that maps WriteGetObjectResponse to the end\n user GetObject request.

", + "smithy.api#httpHeader": "x-amz-request-token", + "smithy.api#required": {} + } + }, + "Body": { + "target": "com.amazonaws.s3#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#documentation": "

The object data.

", + "smithy.api#httpPayload": {} + } + }, + "StatusCode": { + "target": "com.amazonaws.s3#GetObjectResponseStatusCode", + "traits": { + "smithy.api#documentation": "

The integer status code for an HTTP response of a corresponding GetObject\n request. The following is a list of status codes.

\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. The regular expression (regex)\n value is \"^[A-Z][a-zA-Z]+$\".

", + "smithy.api#httpHeader": "x-amz-fwd-error-code" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.s3#ErrorMessage", + "traits": { + "smithy.api#documentation": "

Contains a generic description of the error condition. Returned in the \n tag of the error XML response for a corresponding GetObject call. Cannot be\n used with a successful StatusCode header or when the transformed object is\n provided in body.

", + "smithy.api#httpHeader": "x-amz-fwd-error-message" + } + }, + "AcceptRanges": { + "target": "com.amazonaws.s3#AcceptRanges", + "traits": { + "smithy.api#documentation": "

Indicates that a range of bytes was specified.

", + "smithy.api#httpHeader": "x-amz-fwd-header-accept-ranges" + } + }, + "CacheControl": { + "target": "com.amazonaws.s3#CacheControl", + "traits": { + "smithy.api#documentation": "

Specifies caching behavior along the request/reply chain.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Cache-Control" + } + }, + "ContentDisposition": { + "target": "com.amazonaws.s3#ContentDisposition", + "traits": { + "smithy.api#documentation": "

Specifies presentational information for the object.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Content-Disposition" + } + }, + "ContentEncoding": { + "target": "com.amazonaws.s3#ContentEncoding", + "traits": { + "smithy.api#documentation": "

Specifies what content encodings have been applied to the object and thus what decoding\n mechanisms must be applied to obtain the media-type referenced by the Content-Type header\n field.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Content-Encoding" + } + }, + "ContentLanguage": { + "target": "com.amazonaws.s3#ContentLanguage", + "traits": { + "smithy.api#documentation": "

The language the content is in.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Content-Language" + } + }, + "ContentLength": { + "target": "com.amazonaws.s3#ContentLength", + "traits": { + "smithy.api#documentation": "

The size of the content body in bytes.

", + "smithy.api#httpHeader": "Content-Length" + } + }, + "ContentRange": { + "target": "com.amazonaws.s3#ContentRange", + "traits": { + "smithy.api#documentation": "

The portion of the object returned in the response.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Content-Range" + } + }, + "ContentType": { + "target": "com.amazonaws.s3#ContentType", + "traits": { + "smithy.api#documentation": "

A standard MIME type describing the format of the object data.

", + "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\n the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32\n checksum of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n 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\n the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C\n checksum of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n headers, this request will fail.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-crc32c" + } + }, + "ChecksumCRC64NVME": { + "target": "com.amazonaws.s3#ChecksumCRC64NVME", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is\n the same data that was originally sent. This header specifies the Base64 encoded, 64-bit\n CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-crc64nvme" + } + }, + "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\n the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1\n digest of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n 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\n the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256\n digest of the object returned by the Object Lambda function. This may not match the\n checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values\n only when the original GetObject request required checksum validation. For\n more information about checksums, see Checking object\n integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple checksum\n headers, this request will fail.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-sha256" + } + }, + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

Specifies whether an object stored in Amazon S3 is (true) or is not\n (false) a delete marker. To learn more about delete markers, see Working with delete markers.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-delete-marker" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

An opaque identifier assigned by a web server to a specific version of a resource found\n at a URL.

", + "smithy.api#httpHeader": "x-amz-fwd-header-ETag" + } + }, + "Expires": { + "target": "com.amazonaws.s3#Expires", + "traits": { + "smithy.api#documentation": "

The date and time at which the object is no longer cacheable.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Expires" + } + }, + "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\n pairs that provide the object expiration information. The value of the rule-id\n is URL-encoded.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-expiration" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

The date and time that the object was last modified.

", + "smithy.api#httpHeader": "x-amz-fwd-header-Last-Modified" + } + }, + "MissingMeta": { + "target": "com.amazonaws.s3#MissingMeta", + "traits": { + "smithy.api#documentation": "

Set to the number of metadata entries not returned in x-amz-meta headers.\n This can happen if you create metadata using an API like SOAP that supports more flexible\n metadata than the REST API. For example, using SOAP, you can create metadata whose values\n are not legal HTTP headers.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-missing-meta" + } + }, + "Metadata": { + "target": "com.amazonaws.s3#Metadata", + "traits": { + "smithy.api#documentation": "

A map of metadata to store with the object in S3.

", + "smithy.api#httpPrefixHeaders": "x-amz-meta-" + } + }, + "ObjectLockMode": { + "target": "com.amazonaws.s3#ObjectLockMode", + "traits": { + "smithy.api#documentation": "

Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information\n about S3 Object Lock, see Object Lock.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-mode" + } + }, + "ObjectLockLegalHoldStatus": { + "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", + "traits": { + "smithy.api#documentation": "

Indicates whether an object stored in Amazon S3 has an active legal hold.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-legal-hold" + } + }, + "ObjectLockRetainUntilDate": { + "target": "com.amazonaws.s3#ObjectLockRetainUntilDate", + "traits": { + "smithy.api#documentation": "

The date and time when Object Lock is configured to expire.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-object-lock-retain-until-date" + } + }, + "PartsCount": { + "target": "com.amazonaws.s3#PartsCount", + "traits": { + "smithy.api#documentation": "

The count of parts this object has.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-mp-parts-count" + } + }, + "ReplicationStatus": { + "target": "com.amazonaws.s3#ReplicationStatus", + "traits": { + "smithy.api#documentation": "

Indicates if request involves bucket that is either a source or destination in a\n Replication rule. For more information about S3 Replication, see Replication.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-replication-status" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-request-charged" + } + }, + "Restore": { + "target": "com.amazonaws.s3#Restore", + "traits": { + "smithy.api#documentation": "

Provides information about object restoration operation and expiration time of the\n restored object copy.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-restore" + } + }, + "ServerSideEncryption": { + "target": "com.amazonaws.s3#ServerSideEncryption", + "traits": { + "smithy.api#documentation": "

The server-side encryption algorithm used when storing requested object in Amazon S3 (for\n example, AES256, aws:kms).

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Encryption algorithm used if server-side encryption with a customer-provided encryption\n key was specified for object stored in Amazon S3.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSEKMSKeyId": { + "target": "com.amazonaws.s3#SSEKMSKeyId", + "traits": { + "smithy.api#documentation": "

If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key\n Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in\n Amazon S3 object.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data\n stored in S3. For more information, see Protecting data\n using server-side encryption with customer-provided encryption keys\n (SSE-C).

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "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

For more information, see Storage Classes.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-storage-class" + } + }, + "TagCount": { + "target": "com.amazonaws.s3#TagCount", + "traits": { + "smithy.api#documentation": "

The number of tags, if any, on the object.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-tagging-count" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

An ID used to reference a specific version of the object.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-version-id" + } + }, + "BucketKeyEnabled": { + "target": "com.amazonaws.s3#BucketKeyEnabled", + "traits": { + "smithy.api#documentation": "

Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side\n encryption with Amazon Web Services KMS (SSE-KMS).

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.s3#WriteOffsetBytes": { + "type": "long" + }, + "com.amazonaws.s3#Years": { + "type": "integer" } + } } diff --git a/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/ResolverTest.java b/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/ResolverTest.java index 0f98e9c21..a80291ab7 100644 --- a/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/ResolverTest.java +++ b/aws/client/aws-client-rulesengine/src/test/java/software/amazon/smithy/java/aws/client/rulesengine/ResolverTest.java @@ -27,6 +27,7 @@ import software.amazon.smithy.java.client.core.interceptors.RequestHook; import software.amazon.smithy.java.client.rulesengine.EndpointRulesPlugin; import software.amazon.smithy.java.client.rulesengine.EndpointUtils; +import software.amazon.smithy.java.client.rulesengine.RulesEngineBuilder; import software.amazon.smithy.java.client.rulesengine.RulesEvaluationError; import software.amazon.smithy.java.core.serde.document.Document; import software.amazon.smithy.java.dynamicclient.DynamicClient; @@ -49,6 +50,9 @@ public class ResolverTest { private static EndpointRulesPlugin plugin; private static DynamicClient client; + private Map overrideMap = null; + private Object inputParams = null; + // S3 requires a customization to remove buckets from the path :( private static Model customizeS3Model(Model m) { return ModelTransformer.create().mapShapes(m, s -> { @@ -77,7 +81,8 @@ public static void before() throws Exception { .unwrap(); model = customizeS3Model(model); service = model.expectShape(ShapeId.from("com.amazonaws.s3#AmazonS3"), ServiceShape.class); - plugin = EndpointRulesPlugin.create(); + var engine = new RulesEngineBuilder(); + plugin = EndpointRulesPlugin.create(engine); client = DynamicClient.builder() .model(model) .service(service.getId()) @@ -95,7 +100,8 @@ public void caseRunner(EndpointTestCase test) { try { var result = resolveEndpoint(test, client); if (expectedError != null) { - Assertions.fail("Expected ruleset to fail: " + test.getDocumentation() + " : " + expectedError); + Assertions.fail("Expected ruleset to fail: " + test.getDocumentation() + + " : " + expectedError + " : but got " + result[0]); } Endpoint ep = (Endpoint) result[0]; @@ -109,7 +115,10 @@ public void caseRunner(EndpointTestCase test) { // TODO: validate properties too. } catch (RulesEvaluationError e) { if (expectedError == null) { - Assertions.fail("Expected ruleset to succeed: " + test.getDocumentation() + " : " + e, e); + String msg = "Expected ruleset to succeed: " + test.getDocumentation(); + msg += " Input: " + inputParams + "\n"; + msg += " Overrides: " + overrideMap; + Assertions.fail(msg, e); } } } @@ -144,7 +153,7 @@ public void readBeforeTransmit(RequestHook hook) { var inputs = test.getOperationInputs().get(0); var name = inputs.getOperationName(); - var inputParams = EndpointUtils.convertNode(inputs.getOperationParams(), true); + inputParams = EndpointUtils.convertNode(inputs.getOperationParams(), true); if (!inputs.getBuiltInParams().isEmpty()) { inputs.getBuiltInParams().getStringMember("SDK::Endpoint").ifPresent(value -> { @@ -179,8 +188,8 @@ public void readBeforeTransmit(RequestHook hook) { override.putConfig(S3EndpointSettings.S3_FORCE_PATH_STYLE, value.getValue()); }); - override.putConfig(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, - (Map) EndpointUtils.convertNode(test.getParams(), true)); + overrideMap = (Map) EndpointUtils.convertNode(test.getParams(), true); + override.putConfig(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, overrideMap); try { var document = Document.ofObject(inputParams); diff --git a/client/client-rulesengine/build.gradle.kts b/client/client-rulesengine/build.gradle.kts index d27ff49bd..604812ac8 100644 --- a/client/client-rulesengine/build.gradle.kts +++ b/client/client-rulesengine/build.gradle.kts @@ -1,6 +1,5 @@ plugins { id("smithy-java.module-conventions") - id("me.champeau.jmh") version "0.7.3" } description = "Implements the rules engine traits used to resolve endpoints" @@ -16,13 +15,5 @@ dependencies { testImplementation(project(":aws:client:aws-client-awsjson")) testImplementation(project(":client:dynamic-client")) -} - -jmh { - warmupIterations = 2 - iterations = 5 - fork = 1 - // profilers.add("async:output=flamegraph") - // profilers.add("gc") - duplicateClassesStrategy = DuplicatesStrategy.WARN + testImplementation(project(":aws:client:aws-client-rulesengine")) } diff --git a/client/client-rulesengine/src/jmh/java/software/amazon/smithy/java/client/rulesengine/VmBench.java b/client/client-rulesengine/src/jmh/java/software/amazon/smithy/java/client/rulesengine/VmBench.java deleted file mode 100644 index f3b7cbbbf..000000000 --- a/client/client-rulesengine/src/jmh/java/software/amazon/smithy/java/client/rulesengine/VmBench.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import org.openjdk.jmh.annotations.Benchmark; -import org.openjdk.jmh.annotations.BenchmarkMode; -import org.openjdk.jmh.annotations.Fork; -import org.openjdk.jmh.annotations.Measurement; -import org.openjdk.jmh.annotations.Mode; -import org.openjdk.jmh.annotations.OutputTimeUnit; -import org.openjdk.jmh.annotations.Param; -import org.openjdk.jmh.annotations.Scope; -import org.openjdk.jmh.annotations.Setup; -import org.openjdk.jmh.annotations.State; -import org.openjdk.jmh.annotations.Warmup; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.model.node.Node; -import software.amazon.smithy.rulesengine.language.EndpointRuleSet; -import software.amazon.smithy.utils.IoUtils; - -@State(Scope.Benchmark) -@OutputTimeUnit(TimeUnit.NANOSECONDS) -@BenchmarkMode(Mode.AverageTime) -@Warmup( - iterations = 2, - time = 3, - timeUnit = TimeUnit.SECONDS) -@Measurement( - iterations = 3, - time = 3, - timeUnit = TimeUnit.SECONDS) -@Fork(1) -public class VmBench { - - private static final Map> CASES = Map.ofEntries( - Map.entry("example-complex-ruleset.json-1", - Map.of( - "Endpoint", - "https://example.com", - "UseFIPS", - false)), - Map.entry("minimal-ruleset.json-1", Map.of("Region", "us-east-1"))); - - @Param({ - "yes", - "no", - }) - private String optimize; - - @Param({ - "example-complex-ruleset.json-1", - "minimal-ruleset.json-1" - }) - private String testName; - - private EndpointRuleSet ruleSet; - private Map parameters; - private RulesProgram program; - private Context ctx; - - @Setup - public void setup() throws Exception { - parameters = new HashMap<>(CASES.get(testName)); - var actualFile = testName.substring(0, testName.length() - 2); - var url = VmBench.class.getResource(actualFile); - if (url == null) { - throw new RuntimeException("Test case not found: " + actualFile); - } - var data = Node.parse(IoUtils.readUtf8Url(url)); - ruleSet = EndpointRuleSet.fromNode(data); - - var engine = new RulesEngine(); - if (optimize.equals("no")) { - engine.disableOptimizations(); - } - program = engine.compile(ruleSet); - ctx = Context.create(); - } - - // @Benchmark - // public Object compile() { - // // TODO - // return null; - // } - - @Benchmark - public Object evaluate() { - return program.resolveEndpoint(ctx, parameters); - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/AttrExpression.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/AttrExpression.java deleted file mode 100644 index b3fe6c9c4..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/AttrExpression.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.net.URI; -import java.util.List; -import java.util.Map; -import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.GetAttr; - -/** - * Implements the getAttr function by extracting paths from objects. - */ -sealed interface AttrExpression { - - Object apply(Object o); - - static AttrExpression from(GetAttr getAttr) { - var path = getAttr.getPath(); - - // Set the toString value on the final result. - String str = getAttr.toString(); // in the form of something#path - int position = str.lastIndexOf('#'); - var tostringValue = str.substring(position + 1); - - if (path.isEmpty()) { - throw new UnsupportedOperationException("Invalid getAttr expression: requires at least one part"); - } else if (path.size() == 1) { - return new ToString(tostringValue, from(getAttr.getPath().get(0))); - } - - // Parse the multi-level expression ("foo.bar.baz[9]"). - var result = new AndThen(from(path.get(0)), from(path.get(1))); - for (var i = 2; i < path.size(); i++) { - result = new AndThen(result, from(path.get(i))); - } - - return new ToString(tostringValue, result); - } - - private static AttrExpression from(GetAttr.Part part) { - if (part instanceof GetAttr.Part.Key k) { - return new GetKey(k.key().toString()); - } else if (part instanceof GetAttr.Part.Index i) { - return new GetIndex(i.index()); - } else { - throw new UnsupportedOperationException("Unexpected GetAttr part: " + part); - } - } - - /** - * Creates an AttrExpression from a string. Generally used when loading from pre-compiled programs. - * - * @param value Value to parse. - * @return the expression. - */ - static AttrExpression parse(String value) { - var values = value.split("\\."); - - // Parse a single-level expression ("foo" or "bar[0]"). - if (values.length == 1) { - return new ToString(value, parsePart(value)); - } - - // Parse the multi-level expression ("foo.bar.baz[9]"). - var result = new AndThen(parsePart(values[0]), parsePart(values[1])); - for (var i = 2; i < values.length; i++) { - result = new AndThen(result, parsePart(values[i])); - } - - // Set the toString value on the final result. - return new ToString(value, result); - } - - private static AttrExpression parsePart(String part) { - int position = part.indexOf('['); - if (position == -1) { - return new GetKey(part); - } else { - String numberString = part.substring(position + 1, part.length() - 1); - int index = Integer.parseInt(numberString); - String key = part.substring(0, position); - return new AndThen(new GetKey(key), new GetIndex(index)); - } - } - - record ToString(String original, AttrExpression delegate) implements AttrExpression { - @Override - public Object apply(Object o) { - return delegate.apply(o); - } - - @Override - public String toString() { - return original; - } - } - - record AndThen(AttrExpression left, AttrExpression right) implements AttrExpression { - @Override - public Object apply(Object o) { - var result = left.apply(o); - if (result != null) { - result = right.apply(result); - } - return result; - } - } - - record GetKey(String key) implements AttrExpression { - @Override - @SuppressWarnings("rawtypes") - public Object apply(Object o) { - if (o instanceof Map m) { - return m.get(key); - } else if (o instanceof URI u) { - return EndpointUtils.getUriProperty(u, key); - } else { - return null; - } - } - } - - record GetIndex(int index) implements AttrExpression { - @Override - @SuppressWarnings("rawtypes") - public Object apply(Object o) { - if (o instanceof List l && l.size() > index) { - return l.get(index); - } - return null; - } - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java new file mode 100644 index 000000000..2e0bcc413 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java @@ -0,0 +1,427 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import software.amazon.smithy.rulesengine.logic.bdd.Bdd; +import software.amazon.smithy.rulesengine.logic.bdd.BddNodeConsumer; + +/** + * Compiled bytecode representation of endpoint rules. + * + *

This class represents a compiled rules program that can be efficiently evaluated + * by a bytecode interpreter. The bytecode format is designed for fast loading and + * minimal memory allocation during evaluation. + * + *

Binary Format

+ * + *

The bytecode uses a binary format with the following structure: + * + *

Header (44 bytes)

+ *
+ * Offset  Size  Description
+ * ------  ----  -----------
+ * 0       4     Magic number (0x52554C45 = "RULE")
+ * 4       2     Version (major.minor, currently 0x0101 = 1.1)
+ * 6       2     Condition count (unsigned short)
+ * 8       2     Result count (unsigned short)
+ * 10      2     Register count (unsigned short)
+ * 12      2     Constant pool size (unsigned short)
+ * 14      2     Function count (unsigned short)
+ * 16      4     BDD node count
+ * 20      4     BDD root reference
+ * 24      4     Condition table offset
+ * 28      4     Result table offset
+ * 32      4     Function table offset
+ * 36      4     Constant pool offset
+ * 40      4     BDD table offset
+ * 
+ * + *

File Layout

+ *

After the header, the file contains the following sections in order: + * + *

    + *
  1. Condition Table - Array of 4-byte offsets pointing to each condition's bytecode
  2. + *
  3. Result Table - Array of 4-byte offsets pointing to each result's bytecode
  4. + *
  5. Function Table - Array of function names
  6. + *
  7. Register Definitions - Array of parameter/register metadata
  8. + *
  9. BDD Table - Array of BDD nodes
  10. + *
  11. Bytecode Section - Compiled instructions for conditions and results
  12. + *
  13. Constant Pool - All constants referenced by the bytecode
  14. + *
+ * + *

Condition Table

+ *

Array of 4-byte offsets pointing to the start of each condition's bytecode. + * Each offset is absolute from the start of the file. + * + *

Result Table

+ *

Array of 4-byte offsets pointing to the start of each result's bytecode. + * Each offset is absolute from the start of the file. + * + *

Function Table

+ *

Array of function names used in the bytecode. Each function name is encoded as: + *

+ * [length:2][UTF-8 bytes]
+ * 
+ * + *

Register Definitions

+ *

Immediately follows the function table. Each register is encoded as: + *

+ * [nameLen:2][name:UTF-8][required:1][temp:1][hasDefault:1][default:?][hasBuiltin:1][builtin:?]
+ * 
+ * Where: + *
    + *
  • nameLen: 2-byte length of the name
  • + *
  • name: UTF-8 encoded parameter name
  • + *
  • required: 1 if this parameter must be provided (0 or 1)
  • + *
  • temp: 1 if this is a temporary register (0 or 1)
  • + *
  • hasDefault: 1 if a default value follows (0 or 1)
  • + *
  • default: constant value (only present if hasDefault=1)
  • + *
  • hasBuiltin: 1 if a builtin name follows (0 or 1)
  • + *
  • builtin: UTF-8 encoded builtin name (only present if hasBuiltin=1)
  • + *
+ * + *

BDD Table

+ *

Array of BDD nodes for efficient condition evaluation. Each node is encoded as 12 bytes: + *

+ * [varIdx:4][highRef:4][lowRef:4]
+ * 
+ * + *

Bytecode Section

+ *

Contains the compiled bytecode instructions for all conditions and results. + * The condition/result tables point to offsets within this section. Instructions + * use a stack-based virtual machine with opcodes defined in {@link Opcodes}. + * + *

Constant Pool

+ *

Contains all constants referenced by the bytecode. Each constant is prefixed + * with a type byte: + * + *

+ * Type  Value   Format
+ * ----  -----   ------
+ * 0     NULL    (no data)
+ * 1     STRING  [length:2][UTF-8 bytes]
+ * 2     INTEGER [value:4]
+ * 3     BOOLEAN [value:1]
+ * 4     LIST    [count:2][element:?]...
+ * 5     MAP     [count:2]([keyLen:2][key:UTF-8][value:?])...
+ * 
+ * + *

Lists and maps can contain nested values of any supported type. + * + *

Usage

+ * + *

Loading from disk: + *

{@code
+ * byte[] data = Files.readAllBytes(Path.of("rules.bytecode"));
+ * Bytecode bytecode = engine.load(data);
+ * }
+ * + *

Building new bytecode: + *

{@code
+ * BytecodeCompiler compiler = new BytecodeCompiler(...);
+ * Bytecode bytecode = compiler.compile();
+ * }
+ */ +public final class Bytecode { + + static final int MAGIC = 0x52554C45; // "RULE" + static final short VERSION = 0x0101; // 1.1 + static final byte CONST_NULL = 0; + static final byte CONST_STRING = 1; + static final byte CONST_INTEGER = 2; + static final byte CONST_BOOLEAN = 3; + static final byte CONST_LIST = 4; + static final byte CONST_MAP = 5; + + private final byte[] bytecode; + private final int[] conditionOffsets; + private final int[] resultOffsets; + private final RegisterDefinition[] registerDefinitions; + private final Object[] constantPool; + private final RulesFunction[] functions; + + // BDD structure + private final int[] bddNodes; + private final int bddRootRef; + + // Register management - pre-computed for efficiency + final Object[] registerTemplate; + private final int[] builtinIndices; + private final int[] hardRequiredIndices; + private final Map inputRegisterMap; + + private Bdd bdd; + + Bytecode( + byte[] bytecode, + int[] conditionOffsets, + int[] resultOffsets, + RegisterDefinition[] registerDefinitions, + Object[] constantPool, + RulesFunction[] functions, + int[] bddNodes, + int bddRootRef + ) { + this.bytecode = Objects.requireNonNull(bytecode); + this.conditionOffsets = Objects.requireNonNull(conditionOffsets); + this.resultOffsets = Objects.requireNonNull(resultOffsets); + this.registerDefinitions = Objects.requireNonNull(registerDefinitions); + this.constantPool = Objects.requireNonNull(constantPool); + this.functions = functions; + this.bddNodes = Objects.requireNonNull(bddNodes); + this.bddRootRef = bddRootRef; + + this.registerTemplate = createRegisterTemplate(registerDefinitions); + this.builtinIndices = findBuiltinIndicesWithoutDefaults(registerDefinitions); + this.hardRequiredIndices = findRequiredIndicesWithoutDefaultsOrBuiltins(registerDefinitions); + this.inputRegisterMap = createInputRegisterMap(registerDefinitions); + } + + /** + * Get the number of conditions in the bytecode. + * + * @return the count of conditions. + */ + public int getConditionCount() { + return conditionOffsets.length; + } + + /** + * Gets the start offset for a condition. + * + * @param conditionIndex the condition index + * @return the start offset in the bytecode + */ + public int getConditionStartOffset(int conditionIndex) { + return conditionOffsets[conditionIndex]; + } + + /** + * Get the bytecode offset of a result. + * + * @param resultIndex Result index. + * @return the bytecode offset of the result. + */ + public int getResultOffset(int resultIndex) { + return resultOffsets[resultIndex]; + } + + /** + * Get the number of results in the bytecode. + * + * @return the result count. + */ + public int getResultCount() { + return resultOffsets.length; + } + + /** + * Get a specific constant from the constant pool by index. + * + * @param constantIndex Constant index to get. + * @return the constant. + */ + public Object getConstant(int constantIndex) { + return constantPool[constantIndex]; + } + + /** + * Get the number of constants in the pool. + * + * @return return the number of constants in the constant pool. + */ + public int getConstantPoolCount() { + return constantPool.length; + } + + /** + * Get the constant pool array. + * + * @return the constant pool. + */ + public Object[] getConstantPool() { + return constantPool; + } + + /** + * Get the functions used in this bytecode. + * + * @return the functions array. + */ + public RulesFunction[] getFunctions() { + return functions; + } + + /** + * Get the raw bytecode. + * + * @return the bytecode. + */ + public byte[] getBytecode() { + return bytecode; + } + + /** + * Get the register definitions for the bytecode (both input parameters and temp registers). + * + * @return the register definitions. + */ + public RegisterDefinition[] getRegisterDefinitions() { + return registerDefinitions; + } + + /** + * Get the BDD nodes array. + * + * @return the BDD nodes as a flat array where each node occupies 3 consecutive positions + */ + public int[] getBddNodes() { + return bddNodes; + } + + /** + * Gets the BDD representation of this bytecode. + * + * @return the BDD representation + */ + public Bdd getBdd() { + if (bdd == null) { + bdd = new Bdd(bddRootRef, getConditionCount(), getResultCount(), getBddNodeCount(), this::streamNodes); + } + return bdd; + } + + private void streamNodes(BddNodeConsumer consumer) { + int nodeCount = bddNodes.length / 3; + for (int i = 0; i < nodeCount; i++) { + int baseIdx = i * 3; + consumer.accept(bddNodes[baseIdx], bddNodes[baseIdx + 1], bddNodes[baseIdx + 2]); + } + } + + /** + * Gets the number of BDD nodes. + * + * @return the node count + */ + public int getBddNodeCount() { + return bddNodes.length / 3; + } + + /** + * Get the BDD root reference. + * + * @return the root reference for BDD evaluation + */ + public int getBddRootRef() { + return bddRootRef; + } + + /** + * Get the register template array (package-private for RegisterFiller). + * + * @return the register template with default values + */ + Object[] getRegisterTemplate() { + return registerTemplate; + } + + /** + * Get the builtin indices array (package-private for RegisterFiller). + * + * @return the builtin indices array + */ + int[] getBuiltinIndices() { + return builtinIndices; + } + + /** + * Get the hard required indices array (package-private for RegisterFiller). + * + * @return the hard required indices array + */ + int[] getHardRequiredIndices() { + return hardRequiredIndices; + } + + /** + * Get the input register map (package-private for RegisterFiller). + * + * @return the input register map + */ + Map getInputRegisterMap() { + return inputRegisterMap; + } + + private static Map createInputRegisterMap(RegisterDefinition[] definitions) { + Map map = new HashMap<>(); + for (int i = 0; i < definitions.length; i++) { + if (!definitions[i].temp()) { + map.put(definitions[i].name(), i); + } + } + return map; + } + + private static Object[] createRegisterTemplate(RegisterDefinition[] definitions) { + Object[] template = new Object[definitions.length]; + for (int i = 0; i < definitions.length; i++) { + template[i] = definitions[i].defaultValue(); + } + return template; + } + + private static int[] findBuiltinIndicesWithoutDefaults(RegisterDefinition[] definitions) { + List indices = new ArrayList<>(); + for (int i = 0; i < definitions.length; i++) { + RegisterDefinition def = definitions[i]; + // Only track builtins that don't already have defaults + if (def.builtin() != null && def.defaultValue() == null) { + indices.add(i); + } + } + return indices.stream().mapToInt(Integer::intValue).toArray(); + } + + private static int[] findRequiredIndicesWithoutDefaultsOrBuiltins(RegisterDefinition[] definitions) { + List indices = new ArrayList<>(); + for (int i = 0; i < definitions.length; i++) { + RegisterDefinition def = definitions[i]; + // Only track if truly required (no default, no builtin, not temp) + if (def.required() && def.defaultValue() == null && def.builtin() == null && !def.temp()) { + indices.add(i); + } + } + return indices.stream().mapToInt(Integer::intValue).toArray(); + } + + @Override + public String toString() { + return new BytecodeDisassembler(this).disassemble(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof Bytecode other)) { + return false; + } + return Arrays.equals(bytecode, other.bytecode); + } + + @Override + public int hashCode() { + return Arrays.hashCode(bytecode); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java new file mode 100644 index 000000000..2ed2f2f8c --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java @@ -0,0 +1,466 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.rulesengine.language.evaluation.value.Value; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; +import software.amazon.smithy.rulesengine.language.syntax.expressions.ExpressionVisitor; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Reference; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.FunctionDefinition; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.GetAttr; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsSet; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.BooleanLiteral; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.IntegerLiteral; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.RecordLiteral; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.StringLiteral; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.TupleLiteral; +import software.amazon.smithy.rulesengine.language.syntax.rule.Condition; +import software.amazon.smithy.rulesengine.language.syntax.rule.EndpointRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.ErrorRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.NoMatchRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; +import software.amazon.smithy.rulesengine.logic.bdd.Bdd; +import software.amazon.smithy.rulesengine.logic.bdd.BddNodeConsumer; +import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; + +final class BytecodeCompiler { + + private final List extensions; + private final BddTrait bdd; + private final Map> builtinProviders; + private final BytecodeWriter writer = new BytecodeWriter(); + private final List usedFunctions = new ArrayList<>(); + private final Map usedFunctionIndex = new HashMap<>(); + private final Map availableFunctions; + private final RegisterAllocator registerAllocator; + + BytecodeCompiler( + List extensions, + BddTrait bdd, + Map functions, + Map> builtinProviders + ) { + this.extensions = extensions; + this.builtinProviders = builtinProviders; + this.availableFunctions = functions; + this.bdd = bdd; + this.registerAllocator = new RegisterAllocator.FlatAllocator(); + + // Add parameters as registry values + for (var param : bdd.getParameters()) { + var defaultValue = param.getDefault().map(Value::toObject).orElse(null); + var builtin = param.getBuiltIn().orElse(null); + registerAllocator.allocate(param.getName().toString(), param.isRequired(), defaultValue, builtin, false); + } + } + + private byte getFunctionIndex(String name) { + Byte index = usedFunctionIndex.get(name); + if (index == null) { + var fn = availableFunctions.get(name); + if (fn == null) { + throw new RulesEvaluationError("Rules engine referenced unknown function: " + name); + } + index = (byte) usedFunctionIndex.size(); + usedFunctionIndex.put(name, index); + usedFunctions.add(fn); + writer.registerFunction(name); + } + return index; + } + + Bytecode compile() { + // Compile all conditions + for (int i = 0; i < bdd.getConditions().size(); i++) { + writer.markConditionStart(); + compileCondition(bdd.getConditions().get(i)); + } + + // Compile all results + for (Rule result : bdd.getResults()) { + writer.markResultStart(); + if (result == null || result instanceof NoMatchRule) { + // No match: push null and return + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(null)); + writer.writeByte(Opcodes.RETURN_VALUE); + } else if (result instanceof EndpointRule e) { + compileEndpointRule(e); + } else if (result instanceof ErrorRule e) { + compileErrorRule(e); + } else { + throw new UnsupportedOperationException("Unexpected result type: " + result.getClass()); + } + } + + return buildProgram(); + } + + private void compileCondition(Condition condition) { + compileExpression(condition.getFunction()); + condition.getResult().ifPresent(result -> { + byte register = registerAllocator.shadow(result.toString()); + writer.writeByte(Opcodes.SET_REGISTER); + writer.writeByte(register); + }); + writer.writeByte(Opcodes.RETURN_VALUE); + } + + private void compileEndpointRule(EndpointRule rule) { + var e = rule.getEndpoint(); + + // Add endpoint header instructions + if (!e.getHeaders().isEmpty()) { + for (var entry : e.getHeaders().entrySet()) { + // Header values. Then header name. + for (var h : entry.getValue()) { + compileExpression(h); + } + // Process the N header values that are on the stack + compileListCreation(entry.getValue().size()); + // Now the header name + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(entry.getKey())); + } + // Combine the N headers that are on the stack + compileMapCreation(e.getHeaders().size()); + } + + // Add property instructions + if (!e.getProperties().isEmpty()) { + for (var entry : e.getProperties().entrySet()) { + compileExpression(entry.getValue()); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(entry.getKey().toString())); + } + compileMapCreation(e.getProperties().size()); + } + + // Compile the URL expression + compileExpression(e.getUrl()); + + // Add the return endpoint instruction + writer.writeByte(Opcodes.RETURN_ENDPOINT); + byte packed = 0; + if (!e.getHeaders().isEmpty()) { + packed |= 1; + } + if (!e.getProperties().isEmpty()) { + packed |= 2; + } + writer.writeByte(packed); + } + + private void compileErrorRule(ErrorRule rule) { + compileExpression(rule.getError()); + writer.writeByte(Opcodes.RETURN_ERROR); + } + + private void compileExpression(Expression expression) { + expression.accept(new ExpressionVisitor() { + @Override + public Void visitLiteral(Literal literal) { + compileLiteral(literal); + return null; + } + + @Override + public Void visitRef(Reference reference) { + var index = registerAllocator.getRegister(reference.getName().toString()); + writer.writeByte(Opcodes.LOAD_REGISTER); + writer.writeByte(index); + return null; + } + + @Override + public Void visitGetAttr(GetAttr getAttr) { + compileGetAttr(getAttr); + return null; + } + + @Override + public Void visitIsSet(Expression fn) { + if (fn instanceof Reference ref) { + writer.writeByte(Opcodes.TEST_REGISTER_ISSET); + writer.writeByte(registerAllocator.getRegister(ref.getName().toString())); + } else { + compileExpression(fn); + writer.writeByte(Opcodes.ISSET); + } + return null; + } + + @Override + public Void visitNot(Expression not) { + if (not instanceof IsSet isset && isset.getArguments().get(0) instanceof Reference ref) { + writer.writeByte(Opcodes.TEST_REGISTER_NOT_SET); + writer.writeByte(registerAllocator.getRegister(ref.getName().toString())); + } else { + compileExpression(not); + writer.writeByte(Opcodes.NOT); + } + return null; + } + + @Override + public Void visitBoolEquals(Expression left, Expression right) { + if (left instanceof BooleanLiteral b) { + compileBooleanOptimization(b, right); + } else if (right instanceof BooleanLiteral b) { + compileBooleanOptimization(b, left); + } else { + compileExpression(left); + compileExpression(right); + writer.writeByte(Opcodes.BOOLEAN_EQUALS); + } + return null; + } + + private void compileBooleanOptimization(BooleanLiteral b, Expression other) { + var value = b.value().getValue(); + if (other instanceof Reference ref) { + if (value) { + writer.writeByte(Opcodes.TEST_REGISTER_IS_TRUE); + } else { + writer.writeByte(Opcodes.TEST_REGISTER_IS_FALSE); + } + writer.writeByte(registerAllocator.getRegister(ref.getName().toString())); + } else { + compileExpression(other); + writer.writeByte(Opcodes.IS_TRUE); + if (!value) { + writer.writeByte(Opcodes.NOT); + } + } + } + + @Override + public Void visitStringEquals(Expression left, Expression right) { + compileExpression(left); + compileExpression(right); + writer.writeByte(Opcodes.STRING_EQUALS); + return null; + } + + @Override + public Void visitLibraryFunction(FunctionDefinition fn, List args) { + String fnId = fn.getId(); + + // Handle special built-in functions + switch (fnId) { + case "substring" -> { + compileExpression(args.get(0)); // string + writer.writeByte(Opcodes.SUBSTRING); + writer.writeByte(args.get(1).toNode().expectNumberNode().getValue().byteValue()); + writer.writeByte(args.get(2).toNode().expectNumberNode().getValue().byteValue()); + writer.writeByte(args.get(3).toNode().expectBooleanNode().getValue() ? (byte) 1 : (byte) 0); + return null; + } + case "isValidHostLabel" -> { + compileExpression(args.get(0)); // string + compileExpression(args.get(1)); // allowDots + writer.writeByte(Opcodes.IS_VALID_HOST_LABEL); + return null; + } + case "parseURL" -> { + compileExpression(args.get(0)); // urlString + writer.writeByte(Opcodes.PARSE_URL); + return null; + } + case "uriEncode" -> { + compileExpression(args.get(0)); // string + writer.writeByte(Opcodes.URI_ENCODE); + return null; + } + } + + // Regular function call + var index = getFunctionIndex(fnId); + + // Compile arguments + for (var arg : args) { + compileExpression(arg); + } + + // Use the appropriate function opcode based on argument count + switch (args.size()) { + case 0 -> { + writer.writeByte(Opcodes.FN0); + writer.writeByte(index); + } + case 1 -> { + writer.writeByte(Opcodes.FN1); + writer.writeByte(index); + } + case 2 -> { + writer.writeByte(Opcodes.FN2); + writer.writeByte(index); + } + case 3 -> { + writer.writeByte(Opcodes.FN3); + writer.writeByte(index); + } + default -> { + writer.writeByte(Opcodes.FN); + writer.writeByte(index); + } + } + return null; + } + }); + } + + private void compileGetAttr(GetAttr getAttr) { + var path = getAttr.getPath(); + if (path.isEmpty()) { + throw new UnsupportedOperationException("Invalid getAttr expression: requires at least one part"); + } + + // Check if we can optimize to register-based access + if (getAttr.getTarget() instanceof Reference ref && path.size() == 1) { + var part = path.get(0); + byte regIndex = registerAllocator.getRegister(ref.getName().toString()); + + if (part instanceof GetAttr.Part.Key key) { + writer.writeByte(Opcodes.GET_PROPERTY_REG); + writer.writeByte(regIndex); + int propIndex = writer.getConstantIndex(key.key().toString()); + writer.writeShort(propIndex); + } else if (part instanceof GetAttr.Part.Index idx) { + writer.writeByte(Opcodes.GET_INDEX_REG); + writer.writeByte(regIndex); + writer.writeByte(idx.index()); + } + return; + } + + // Compile the target + compileExpression(getAttr.getTarget()); + + // Apply each part of the path + for (var part : path) { + if (part instanceof GetAttr.Part.Key key) { + int propIndex = writer.getConstantIndex(key.key().toString()); + writer.writeByte(Opcodes.GET_PROPERTY); + writer.writeShort(propIndex); + } else if (part instanceof GetAttr.Part.Index idx) { + writer.writeByte(Opcodes.GET_INDEX); + writer.writeByte(idx.index()); + } + } + } + + private void compileLiteral(Literal literal) { + if (literal instanceof StringLiteral s) { + var template = s.value(); + var parts = template.getParts(); + + if (parts.size() == 1 && parts.get(0) instanceof Template.Literal) { + // Simple string with no interpolation + addLoadConst(parts.get(0).toString()); + } else if (parts.size() == 1 && parts.get(0) instanceof Template.Dynamic dynamic) { + // Single dynamic expression - just evaluate it + compileExpression(dynamic.toExpression()); + } else { + // Multiple parts - need to concatenate + int expressionCount = 0; + for (var part : parts) { + if (part instanceof Template.Dynamic d) { + compileExpression(d.toExpression()); + } else { + addLoadConst(part.toString()); + } + expressionCount++; + } + writer.writeByte(Opcodes.RESOLVE_TEMPLATE); + writer.writeByte(expressionCount); + } + } else if (literal instanceof TupleLiteral t) { + for (var e : t.members()) { + compileLiteral(e); + } + compileListCreation(t.members().size()); + } else if (literal instanceof RecordLiteral r) { + for (var e : r.members().entrySet()) { + compileLiteral(e.getValue()); // value then key to make popping ordered + addLoadConst(e.getKey().toString()); + } + compileMapCreation(r.members().size()); + } else if (literal instanceof BooleanLiteral b) { + addLoadConst(b.value().getValue()); + } else if (literal instanceof IntegerLiteral i) { + addLoadConst(i.toNode().expectNumberNode().getValue()); + } else { + throw new UnsupportedOperationException("Unexpected rules engine Literal type: " + literal); + } + } + + private void compileListCreation(int size) { + switch (size) { + case 0 -> writer.writeByte(Opcodes.LIST0); + case 1 -> writer.writeByte(Opcodes.LIST1); + case 2 -> writer.writeByte(Opcodes.LIST2); + default -> { + writer.writeByte(Opcodes.LISTN); + writer.writeByte(size); + } + } + } + + private void compileMapCreation(int size) { + switch (size) { + case 0 -> writer.writeByte(Opcodes.MAP0); + case 1 -> writer.writeByte(Opcodes.MAP1); + case 2 -> writer.writeByte(Opcodes.MAP2); + case 3 -> writer.writeByte(Opcodes.MAP3); + case 4 -> writer.writeByte(Opcodes.MAP4); + default -> { + writer.writeByte(Opcodes.MAPN); + writer.writeByte(size); + } + } + } + + private void addLoadConst(Object value) { + int constant = writer.getConstantIndex(value); + if (constant < 256) { + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(constant); + } else { + writer.writeByte(Opcodes.LOAD_CONST_W); + writer.writeShort(constant); + } + } + + private Bytecode buildProgram() { + var registerDefs = registerAllocator.getRegistry().toArray(new RegisterDefinition[0]); + var fns = usedFunctions.toArray(new RulesFunction[0]); + + // Extract BDD nodes to an array using the consumer approach + Bdd bddData = bdd.getBdd(); + int nodeCount = bddData.getNodeCount(); + int[] bddNodes = new int[nodeCount * 3]; + bddData.getNodes(new BddNodeConsumer() { + private int index = 0; + @Override + public void accept(int var, int high, int low) { + bddNodes[index++] = var; + bddNodes[index++] = high; + bddNodes[index++] = low; + } + }); + + return writer.build(registerDefs, fns, bddNodes, bddData.getRootRef()); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java new file mode 100644 index 000000000..99d9d8dbe --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java @@ -0,0 +1,427 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.io.StringWriter; +import java.util.Map; +import software.amazon.smithy.rulesengine.logic.bdd.BddFormatter; + +/** + * Provides a human-readable representation of a Bytecode program. + */ +final class BytecodeDisassembler { + + private static final Map INSTRUCTION_DEFS = Map.ofEntries( + // Basic stack operations (0-3) + Map.entry(Opcodes.LOAD_CONST, new InstructionDef("LOAD_CONST", OperandType.BYTE, Show.CONST)), + Map.entry(Opcodes.LOAD_CONST_W, new InstructionDef("LOAD_CONST_W", OperandType.SHORT, Show.CONST)), + Map.entry(Opcodes.SET_REGISTER, new InstructionDef("SET_REGISTER", OperandType.BYTE, Show.REGISTER)), + Map.entry(Opcodes.LOAD_REGISTER, new InstructionDef("LOAD_REGISTER", OperandType.BYTE, Show.REGISTER)), + + // Boolean operations (4-7) + Map.entry(Opcodes.NOT, new InstructionDef("NOT", OperandType.NONE)), + Map.entry(Opcodes.ISSET, new InstructionDef("ISSET", OperandType.NONE)), + Map.entry(Opcodes.TEST_REGISTER_ISSET, + new InstructionDef("TEST_REGISTER_ISSET", OperandType.BYTE, Show.REGISTER)), + Map.entry(Opcodes.TEST_REGISTER_NOT_SET, + new InstructionDef("TEST_REGISTER_NOT_SET", OperandType.BYTE, Show.REGISTER)), + + // List operations (8-11) + Map.entry(Opcodes.LIST0, new InstructionDef("LIST0", OperandType.NONE)), + Map.entry(Opcodes.LIST1, new InstructionDef("LIST1", OperandType.NONE)), + Map.entry(Opcodes.LIST2, new InstructionDef("LIST2", OperandType.NONE)), + Map.entry(Opcodes.LISTN, new InstructionDef("LISTN", OperandType.BYTE, Show.NUMBER)), + + // Map operations (12-17) + Map.entry(Opcodes.MAP0, new InstructionDef("MAP0", OperandType.NONE)), + Map.entry(Opcodes.MAP1, new InstructionDef("MAP1", OperandType.NONE)), + Map.entry(Opcodes.MAP2, new InstructionDef("MAP2", OperandType.NONE)), + Map.entry(Opcodes.MAP3, new InstructionDef("MAP3", OperandType.NONE)), + Map.entry(Opcodes.MAP4, new InstructionDef("MAP4", OperandType.NONE)), + Map.entry(Opcodes.MAPN, new InstructionDef("MAPN", OperandType.BYTE, Show.NUMBER)), + + // Template operation (18) + Map.entry(Opcodes.RESOLVE_TEMPLATE, + new InstructionDef("RESOLVE_TEMPLATE", OperandType.BYTE, Show.NUMBER)), + + // Function operations (19-23) + Map.entry(Opcodes.FN0, new InstructionDef("FN0", OperandType.BYTE, Show.FN)), + Map.entry(Opcodes.FN1, new InstructionDef("FN1", OperandType.BYTE, Show.FN)), + Map.entry(Opcodes.FN2, new InstructionDef("FN2", OperandType.BYTE, Show.FN)), + Map.entry(Opcodes.FN3, new InstructionDef("FN3", OperandType.BYTE, Show.FN)), + Map.entry(Opcodes.FN, new InstructionDef("FN", OperandType.BYTE, Show.FN)), + + // Property access operations (24-27) + Map.entry(Opcodes.GET_PROPERTY, new InstructionDef("GET_PROPERTY", OperandType.SHORT, Show.CONST)), + Map.entry(Opcodes.GET_INDEX, new InstructionDef("GET_INDEX", OperandType.BYTE, Show.NUMBER)), + Map.entry(Opcodes.GET_PROPERTY_REG, + new InstructionDef("GET_PROPERTY_REG", OperandType.BYTE_SHORT, Show.REG_PROPERTY)), + Map.entry(Opcodes.GET_INDEX_REG, + new InstructionDef("GET_INDEX_REG", OperandType.TWO_BYTES, Show.REG_INDEX)), + + // Boolean test operations (28-30) + Map.entry(Opcodes.IS_TRUE, new InstructionDef("IS_TRUE", OperandType.NONE)), + Map.entry(Opcodes.TEST_REGISTER_IS_TRUE, + new InstructionDef("TEST_REGISTER_IS_TRUE", OperandType.BYTE, Show.REGISTER)), + Map.entry(Opcodes.TEST_REGISTER_IS_FALSE, + new InstructionDef("TEST_REGISTER_IS_FALSE", OperandType.BYTE, Show.REGISTER)), + + // Comparison operations (31-33) + Map.entry(Opcodes.EQUALS, new InstructionDef("EQUALS", OperandType.NONE)), + Map.entry(Opcodes.STRING_EQUALS, new InstructionDef("STRING_EQUALS", OperandType.NONE)), + Map.entry(Opcodes.BOOLEAN_EQUALS, new InstructionDef("BOOLEAN_EQUALS", OperandType.NONE)), + + // String operations (34-37) + Map.entry(Opcodes.SUBSTRING, new InstructionDef("SUBSTRING", OperandType.THREE_BYTES, Show.SUBSTRING)), + Map.entry(Opcodes.IS_VALID_HOST_LABEL, new InstructionDef("IS_VALID_HOST_LABEL", OperandType.NONE)), + Map.entry(Opcodes.PARSE_URL, new InstructionDef("PARSE_URL", OperandType.NONE)), + Map.entry(Opcodes.URI_ENCODE, new InstructionDef("URI_ENCODE", OperandType.NONE)), + + // Return operations (38-40) + Map.entry(Opcodes.RETURN_ERROR, new InstructionDef("RETURN_ERROR", OperandType.NONE)), + Map.entry(Opcodes.RETURN_ENDPOINT, + new InstructionDef("RETURN_ENDPOINT", OperandType.BYTE, Show.ENDPOINT_FLAGS)), + Map.entry(Opcodes.RETURN_VALUE, new InstructionDef("RETURN_VALUE", OperandType.NONE))); + + // Enum to define operand types + private enum OperandType { + NONE(0), + BYTE(1), + SHORT(2), + TWO_BYTES(2), + BYTE_SHORT(3), + THREE_BYTES(3); + + private final int byteCount; + + OperandType(int byteCount) { + this.byteCount = byteCount; + } + } + + private enum Show { + CONST, FN, REGISTER, NUMBER, ENDPOINT_FLAGS, SUBSTRING, REG_PROPERTY, REG_INDEX + } + + // Instruction definition class + private record InstructionDef(String name, OperandType operandType, Show show) { + InstructionDef(String name, OperandType operandType) { + this(name, operandType, null); + } + } + + // Result class for operand parsing + private record OperandResult(int value, int nextPc, int secondValue) { + OperandResult(int value, int nextPc) { + this(value, nextPc, -1); + } + } + + private final Bytecode bytecode; + + BytecodeDisassembler(Bytecode bytecode) { + this.bytecode = bytecode; + } + + String disassemble() { + StringBuilder s = new StringBuilder(); + + // Header + s.append("=== Bytecode Program ===\n"); + s.append("Conditions: ").append(bytecode.getConditionCount()).append("\n"); + s.append("Results: ").append(bytecode.getResultCount()).append("\n"); + s.append("Registers: ").append(bytecode.getRegisterDefinitions().length).append("\n"); + s.append("Functions: ").append(bytecode.getFunctions().length).append("\n"); + s.append("Constants: ").append(bytecode.getConstantPoolCount()).append("\n"); + s.append("BDD Nodes: ").append(bytecode.getBddNodes().length / 3).append("\n"); + s.append("BDD Root: ").append(BddFormatter.formatReference(bytecode.getBddRootRef())).append("\n"); + s.append("\n"); + + // Functions + if (bytecode.getFunctions().length > 0) { + s.append("=== Functions ===\n"); + int i = 0; + for (var fn : bytecode.getFunctions()) { + s.append(String.format(" %2d: %-20s [%d args]\n", + i++, + fn.getFunctionName(), + fn.getArgumentCount())); + } + s.append("\n"); + } + + // Registers + if (bytecode.getRegisterDefinitions().length > 0) { + s.append("=== Registers ===\n"); + int i = 0; + for (var r : bytecode.getRegisterDefinitions()) { + s.append(String.format(" %2d: %-20s", i++, r.name())); + if (r.required()) + s.append(" [required]"); + if (r.temp()) + s.append(" [temp]"); + if (r.defaultValue() != null) { + s.append(" default=").append(formatValue(r.defaultValue())); + } + if (r.builtin() != null) { + s.append(" builtin=").append(r.builtin()); + } + s.append("\n"); + } + s.append("\n"); + } + + // BDD Structure + if (bytecode.getBddNodes().length > 0) { + s.append("=== BDD Structure ===\n"); + + try { + StringWriter sw = new StringWriter(); + BddFormatter formatter = new BddFormatter(bytecode.getBdd(), sw, ""); + formatter.format(); + s.append(sw); + } catch (Exception e) { + // Fallback if formatting fails + s.append("Error formatting BDD nodes: ").append(e.getMessage()).append("\n"); + } + + s.append("\n"); + } + + // Constants + if (bytecode.getConstantPoolCount() > 0) { + s.append("=== Constant Pool ===\n"); + for (int i = 0; i < bytecode.getConstantPoolCount(); i++) { + s.append(String.format(" %3d: ", i)); + s.append(formatConstant(bytecode.getConstant(i))).append("\n"); + } + s.append("\n"); + } + + // Conditions + if (bytecode.getConditionCount() > 0) { + s.append("=== Conditions ===\n"); + for (int i = 0; i < bytecode.getConditionCount(); i++) { + s.append(String.format("Condition %d:\n", i)); + int startOffset = bytecode.getConditionStartOffset(i); + disassembleSection(s, startOffset, Integer.MAX_VALUE, " "); + s.append("\n"); + } + } + + // Results + if (bytecode.getResultCount() > 0) { + s.append("=== Results ===\n"); + for (int i = 0; i < bytecode.getResultCount(); i++) { + s.append(String.format("Result %d:\n", i)); + int startOffset = bytecode.getResultOffset(i); + disassembleSection(s, startOffset, Integer.MAX_VALUE, " "); + s.append("\n"); + } + } + + return s.toString(); + } + + private void disassembleSection(StringBuilder s, int startOffset, int endOffset, String indent) { + byte[] instructions = bytecode.getBytecode(); + + for (int pc = startOffset; pc < endOffset && pc < instructions.length;) { + // Check if this is a return opcode + byte opcode = instructions[pc]; + + int nextPc = writeInstruction(s, pc, indent); + if (nextPc < 0) { + break; + } + + pc = nextPc; + + // Stop after return instructions + if (opcode == Opcodes.RETURN_VALUE || opcode == Opcodes.RETURN_ENDPOINT || opcode == Opcodes.RETURN_ERROR) { + break; + } + } + } + + private int writeInstruction(StringBuilder s, int pc, String indent) { + byte[] instructions = bytecode.getBytecode(); + + // instruction address + s.append(indent).append(String.format("%04d: ", pc)); + + byte opcode = instructions[pc]; + InstructionDef def = INSTRUCTION_DEFS.get(opcode); + + // Handle unknown instruction + if (def == null) { + s.append(String.format("UNKNOWN_OPCODE(0x%02X)\n", opcode)); + return -1; + } + + s.append(String.format("%-22s", def.name())); + + // Parse operands based on type + OperandResult operandResult = parseOperands(s, pc, def.operandType(), instructions); + int nextPc = operandResult.nextPc(); + int displayValue = operandResult.value(); + int secondValue = operandResult.secondValue(); + + // Add symbolic information if available + if (def.show() != null) { + s.append(" ; "); + appendSymbolicInfo(s, pc, displayValue, secondValue, def.show, instructions); + } + + s.append("\n"); + return nextPc; + } + + private OperandResult parseOperands(StringBuilder s, int pc, OperandType type, byte[] instructions) { + return switch (type) { + case NONE -> new OperandResult(-1, pc + 1); + case BYTE -> { + int value = appendByte(s, pc, instructions); + yield new OperandResult(value, pc + 2); + } + case SHORT, TWO_BYTES -> { + int value = appendShort(s, pc, instructions); + yield new OperandResult(value, pc + 3); + } + case BYTE_SHORT -> { + s.append(" "); + int b1 = appendByte(s, pc, instructions); + int b2 = appendShort(s, pc + 1, instructions); + yield new OperandResult(b1, pc + 4, b2); + } + case THREE_BYTES -> { + s.append(" "); + int b1 = appendByte(s, pc, instructions); + int b2 = appendByte(s, pc + 1, instructions); + int b3 = appendByte(s, pc + 2, instructions); + yield new OperandResult(b1, pc + 4, b2); + } + }; + } + + private void appendSymbolicInfo( + StringBuilder s, + int pc, + int value, + int secondValue, + Show show, + byte[] instructions + ) { + switch (show) { + case CONST -> { + if (value >= 0 && value < bytecode.getConstantPoolCount()) { + s.append(formatConstant(bytecode.getConstant(value))); + } + } + case FN -> { + if (value >= 0 && value < bytecode.getFunctions().length) { + var fn = bytecode.getFunctions()[value]; + s.append(fn.getFunctionName()).append("(").append(fn.getArgumentCount()).append(" args)"); + } + } + case REGISTER -> { + if (value >= 0 && value < bytecode.getRegisterDefinitions().length) { + s.append(bytecode.getRegisterDefinitions()[value].name()); + } + } + case NUMBER -> s.append(value); + case ENDPOINT_FLAGS -> { + boolean hasHeaders = (value & 1) != 0; + boolean hasProperties = (value & 2) != 0; + s.append("headers=").append(hasHeaders).append(", properties=").append(hasProperties); + } + case SUBSTRING -> { + if (pc + 3 < instructions.length) { + int start = instructions[pc + 1] & 0xFF; + int end = instructions[pc + 2] & 0xFF; + boolean reverse = (instructions[pc + 3] & 0xFF) != 0; + s.append("start=") + .append(start) + .append(", end=") + .append(end) + .append(", reverse=") + .append(reverse); + } + } + case REG_PROPERTY -> { + if (value >= 0 && value < bytecode.getRegisterDefinitions().length) { + s.append(bytecode.getRegisterDefinitions()[value].name()); + s.append("."); + if (secondValue >= 0 && secondValue < bytecode.getConstantPoolCount()) { + Object prop = bytecode.getConstant(secondValue); + if (prop instanceof String) { + s.append(prop); + } + } + } + } + case REG_INDEX -> { + if (value >= 0 && value < bytecode.getRegisterDefinitions().length) { + s.append(bytecode.getRegisterDefinitions()[value].name()); + s.append("[").append(secondValue).append("]"); + } + } + } + } + + private int appendByte(StringBuilder s, int pc, byte[] instructions) { + if (instructions.length <= pc + 1) { + s.append("??"); + return -1; + } else { + int result = instructions[pc + 1] & 0xFF; + s.append(String.format("%3d", result)); + return result; + } + } + + private int appendShort(StringBuilder s, int pc, byte[] instructions) { + if (instructions.length <= pc + 2) { + s.append("??"); + return -1; + } else { + int result = EndpointUtils.bytesToShort(instructions, pc + 1); + s.append(String.format("%5d", result)); + return result; + } + } + + private String formatConstant(Object value) { + if (value == null) { + return "null"; + } else if (value instanceof String) { + return "\"" + escapeString((String) value) + "\""; + } else { + return value.getClass().getSimpleName() + "[" + value + "]"; + } + } + + private String formatValue(Object value) { + if (value == null) { + return "null"; + } else if (value instanceof String) { + return "\"" + escapeString((String) value) + "\""; + } else { + return value.toString(); + } + } + + private String escapeString(String s) { + if (s.length() > 50) { + s = s.substring(0, 47) + "..."; + } + return s.replace("\\", "\\\\") + .replace("\"", "\\\"") + .replace("\n", "\\n") + .replace("\r", "\\r") + .replace("\t", "\\t"); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java new file mode 100644 index 000000000..070b5a6c1 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java @@ -0,0 +1,77 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.logging.InternalLogger; +import software.amazon.smithy.rulesengine.logic.bdd.Bdd; + +/** + * Endpoint resolver that uses a compiled endpoint rules program from a BDD. + */ +final class BytecodeEndpointResolver implements EndpointResolver { + + private static final InternalLogger LOGGER = InternalLogger.getLogger(BytecodeEndpointResolver.class); + private static final CompletableFuture NULL_RESULT = CompletableFuture.completedFuture(null); + + private final Bytecode bytecode; + private final Bdd bdd; + private final RulesExtension[] extensions; + private final RegisterFiller registerFiller; + private final ContextProvider ctxProvider = new ContextProvider.OrchestratingProvider(); + private final ThreadLocal threadLocalEvaluator; + + BytecodeEndpointResolver( + Bytecode bytecode, + List extensions, + Map> builtinProviders + ) { + this.bytecode = bytecode; + this.extensions = extensions.toArray(new RulesExtension[0]); + this.registerFiller = RegisterFiller.of(bytecode, builtinProviders); + this.bdd = bytecode.getBdd(); + + this.threadLocalEvaluator = ThreadLocal.withInitial(() -> { + return new BytecodeEvaluator(bytecode, this.extensions); + }); + } + + @Override + public CompletableFuture resolveEndpoint(EndpointResolverParams params) { + try { + var evaluator = threadLocalEvaluator.get(); + var operation = params.operation(); + var ctx = params.context(); + // Get reusable params array and clear it + var inputParams = evaluator.paramsCache; + inputParams.clear(); + // Prep the input parameters by grabbing them from the input and from other traits. + ContextProvider.createEndpointParams(inputParams, ctxProvider, ctx, operation, params.inputValue()); + + // Use RegisterFiller to set up registers + Object[] registers = evaluator.getRegisters(); + registerFiller.fillRegisters(registers, ctx, inputParams); + evaluator.resetWithFilledRegisters(ctx); + + LOGGER.debug("Resolving endpoint of {} using VM with params: {}", operation, inputParams); + + var resultIndex = bdd.evaluate(evaluator); + if (resultIndex < 0) { + return NULL_RESULT; + } + return CompletableFuture.completedFuture(evaluator.resolveResult(resultIndex)); + } catch (RulesEvaluationError e) { + return CompletableFuture.failedFuture(e); + } + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java new file mode 100644 index 000000000..a3e65be1f --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java @@ -0,0 +1,424 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.net.URI; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointContext; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.io.uri.URLEncoding; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsValidHostLabel; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.ParseUrl; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring; +import software.amazon.smithy.rulesengine.logic.ConditionEvaluator; + +/** + * Evaluates bytecode for a single specific condition or result per evaluation. + */ +final class BytecodeEvaluator implements ConditionEvaluator { + + final Map paramsCache = new HashMap<>(); + + private final Bytecode bytecode; + private final Object[] registers; + private final RulesExtension[] extensions; + private Object[] tempArray = new Object[8]; + private int tempArraySize = 8; + private Object[] stack = new Object[16]; + private int stackPosition = 0; + private int pc; + private final StringBuilder stringBuilder = new StringBuilder(64); + private final UriFactory uriFactory = new UriFactory(); + private Context context; + + BytecodeEvaluator(Bytecode bytecode, RulesExtension[] extensions) { + this.bytecode = bytecode; + this.extensions = extensions; + this.registers = new Object[bytecode.getRegisterDefinitions().length]; + } + + /** + * Get the registers array for external filling by RegisterFiller. + * + * @return the registers array + */ + Object[] getRegisters() { + return registers; + } + + /** + * Reset the evaluator with pre-filled registers. + * + *

This method assumes the registers have already been filled by RegisterFiller. + * It only resets the stack position and sets the context. + */ + BytecodeEvaluator resetWithFilledRegisters(Context context) { + this.context = context; + this.stackPosition = 0; + return this; + } + + @Override + public boolean test(int conditionIndex) { + // Reset stack position for fresh evaluation + stackPosition = 0; + Object result = run(bytecode.getConditionStartOffset(conditionIndex)); + return result != null && result != Boolean.FALSE; + } + + public Endpoint resolveResult(int resultIndex) { + if (resultIndex <= -1) { + return null; + } else { + stackPosition = 0; + return (Endpoint) run(bytecode.getResultOffset(resultIndex)); + } + } + + private void push(Object value) { + if (stackPosition == stack.length) { + resizeStack(); + } + stack[stackPosition++] = value; + } + + private void resizeStack() { + Object[] newStack = new Object[stack.length + (stack.length >> 1)]; + System.arraycopy(stack, 0, newStack, 0, stack.length); + stack = newStack; + } + + private Object[] getTempArray(int requiredSize) { + return tempArraySize >= requiredSize ? tempArray : resizeTempArray(requiredSize); + } + + private Object[] resizeTempArray(int requiredSize) { + // Resize and round up to next power of two + int newSize = Integer.highestOneBit(requiredSize - 1) << 1; + tempArray = new Object[newSize]; + tempArraySize = newSize; + return tempArray; + } + + @SuppressWarnings("unchecked") + private Object run(int start) { + pc = start; + + var instructions = bytecode.getBytecode(); + var functions = bytecode.getFunctions(); + var constantPool = bytecode.getConstantPool(); + + while (pc < instructions.length) { + int opcode = instructions[pc++] & 0xFF; + switch (opcode) { + case Opcodes.LOAD_CONST -> { + push(constantPool[instructions[pc++] & 0xFF]); + } + case Opcodes.LOAD_CONST_W -> { + int constIdx = ((instructions[pc] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); + push(constantPool[constIdx]); + pc += 2; + } + case Opcodes.SET_REGISTER -> { + int index = instructions[pc++] & 0xFF; + registers[index] = stack[stackPosition - 1]; + } + case Opcodes.LOAD_REGISTER -> { + int index = instructions[pc++] & 0xFF; + push(registers[index]); + } + case Opcodes.NOT -> { + // In-place operation + int idx = stackPosition - 1; + stack[idx] = stack[idx] == Boolean.FALSE ? Boolean.TRUE : Boolean.FALSE; + } + case Opcodes.ISSET -> { + // In-place operation + int idx = stackPosition - 1; + stack[idx] = stack[idx] != null ? Boolean.TRUE : Boolean.FALSE; + } + case Opcodes.TEST_REGISTER_ISSET -> { + push(registers[instructions[pc++] & 0xFF] != null ? Boolean.TRUE : Boolean.FALSE); + } + case Opcodes.TEST_REGISTER_NOT_SET -> { + push(registers[instructions[pc++] & 0xFF] == null ? Boolean.TRUE : Boolean.FALSE); + } + // List operations + case Opcodes.LIST0 -> push(Collections.emptyList()); + case Opcodes.LIST1 -> { + // Pops 1, pushes 1: reuse position + int idx = stackPosition - 1; + stack[idx] = List.of(stack[idx]); + } + case Opcodes.LIST2 -> { + // Pops 2, pushes 1 + int idx = stackPosition - 2; + stack[idx] = List.of(stack[idx], stack[idx + 1]); + stackPosition = idx + 1; + } + case Opcodes.LISTN -> { + var size = instructions[pc++] & 0xFF; + var values = new Object[size]; + for (var i = size - 1; i >= 0; i--) { + values[i] = stack[--stackPosition]; + } + push(Arrays.asList(values)); // dynamic size + } + // Map operations + case Opcodes.MAP0 -> push(Map.of()); + case Opcodes.MAP1 -> { + // Pops 2, pushes 1 + int idx = stackPosition - 2; + stack[idx] = Map.of((String) stack[idx + 1], stack[idx]); + stackPosition = idx + 1; + } + case Opcodes.MAP2 -> { + // Pops 4, pushes 1 + int idx = stackPosition - 4; + stack[idx] = Map.of( + (String) stack[idx + 1], // key + stack[idx], // value + (String) stack[idx + 3], // key + stack[idx + 2]); // value + stackPosition = idx + 1; + } + case Opcodes.MAP3 -> { + // Pops 6, pushes 1 + int idx = stackPosition - 6; + stack[idx] = Map.of( + (String) stack[idx + 2], // key + stack[idx + 1], // value + (String) stack[idx + 4], // key + stack[idx + 3], // value + (String) stack[idx + 5], // key + stack[idx]); + stackPosition = idx + 1; + } + case Opcodes.MAP4 -> { + // Pops 8, pushes 1 + int idx = stackPosition - 8; + stack[idx] = Map.of( + (String) stack[idx + 1], // key + stack[idx], // value + (String) stack[idx + 3], // key + stack[idx + 2], // value + (String) stack[idx + 5], // key + stack[idx + 4], // value + (String) stack[idx + 7], // key + stack[idx + 6]); // value + stackPosition = idx + 1; + } + case Opcodes.MAPN -> { + var size = instructions[pc++] & 0xFF; + Map map = new HashMap<>(size + 1, 1.0f); + for (var i = 0; i < size; i++) { + map.put((String) stack[--stackPosition], stack[--stackPosition]); + } + push(map); // dynamic size + } + case Opcodes.RESOLVE_TEMPLATE -> { + int argCount = instructions[pc++] & 0xFF; + stringBuilder.setLength(0); + // Calculate where the first argument is on the stack + int firstArgPosition = stackPosition - argCount; + for (int i = 0; i < argCount; i++) { + stringBuilder.append(stack[firstArgPosition + i]); + } + // Result goes where first arg was + stack[firstArgPosition] = stringBuilder.toString(); + stackPosition = firstArgPosition + 1; + } + case Opcodes.FN0 -> { + // Can't optimize: no args to pop + var fn = functions[instructions[pc++] & 0xFF]; + push(fn.apply0()); + } + case Opcodes.FN1 -> { + // Pops 1, pushes 1 - reuse position + var fn = functions[instructions[pc++] & 0xFF]; + int idx = stackPosition - 1; + stack[idx] = fn.apply1(stack[idx]); + } + case Opcodes.FN2 -> { + // Pops 2, pushes 1 + var fn = functions[instructions[pc++] & 0xFF]; + int idx = stackPosition - 2; + stack[idx] = fn.apply2(stack[idx], stack[idx + 1]); + stackPosition = idx + 1; + } + case Opcodes.FN3 -> { + // Pops 3, pushes 1 + var fn = functions[instructions[pc++] & 0xFF]; + int idx = stackPosition - 3; + stack[idx] = fn.apply(stack[idx], stack[idx + 1], stack[idx + 2]); + stackPosition = idx + 1; + } + case Opcodes.FN -> { + var fn = functions[instructions[pc++] & 0xFF]; + var temp = getTempArray(fn.getArgumentCount()); + for (int i = fn.getArgumentCount() - 1; i >= 0; i--) { + temp[i] = stack[--stackPosition]; + } + push(fn.apply(temp)); // dynamic size + } + case Opcodes.GET_PROPERTY -> { + int propertyIdx = ((instructions[pc] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); + var propertyName = (String) constantPool[propertyIdx]; + int idx = stackPosition - 1; + stack[idx] = getProperty(stack[idx], propertyName); + pc += 2; + } + case Opcodes.GET_INDEX -> { + int index = instructions[pc++] & 0xFF; + int idx = stackPosition - 1; + stack[idx] = getIndex(stack[idx], index); + } + case Opcodes.GET_PROPERTY_REG -> { + int regIndex = instructions[pc++] & 0xFF; + int propertyIdx = ((instructions[pc] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); + var propertyName = (String) constantPool[propertyIdx]; + var target = registers[regIndex]; + push(getProperty(target, propertyName)); + pc += 2; + } + case Opcodes.GET_INDEX_REG -> { + int regIndex = instructions[pc++] & 0xFF; + int index = instructions[pc++] & 0xFF; + var target = registers[regIndex]; + push(getIndex(target, index)); + } + case Opcodes.IS_TRUE -> { + // In-place operation + int idx = stackPosition - 1; + stack[idx] = stack[idx] == Boolean.TRUE ? Boolean.TRUE : Boolean.FALSE; + } + case Opcodes.TEST_REGISTER_IS_TRUE -> { + push(registers[instructions[pc++] & 0xFF] == Boolean.TRUE ? Boolean.TRUE : Boolean.FALSE); + } + case Opcodes.TEST_REGISTER_IS_FALSE -> { + push(registers[instructions[pc++] & 0xFF] == Boolean.FALSE ? Boolean.TRUE : Boolean.FALSE); + } + case Opcodes.EQUALS -> { + // Pops 2, pushes 1 + int idx = stackPosition - 2; + stack[idx] = Objects.equals(stack[idx], stack[idx + 1]) ? Boolean.TRUE : Boolean.FALSE; + stackPosition = idx + 1; + } + case Opcodes.STRING_EQUALS -> { + // Pops 2, pushes 1 + int idx = stackPosition - 2; + var a = (String) stack[idx]; + var b = (String) stack[idx + 1]; + stack[idx] = a != null && a.equals(b) ? Boolean.TRUE : Boolean.FALSE; + stackPosition = idx + 1; + } + case Opcodes.BOOLEAN_EQUALS -> { + // Pops 2, pushes 1 + int idx = stackPosition - 2; + var a = (Boolean) stack[idx]; + var b = (Boolean) stack[idx + 1]; + stack[idx] = a != null && a.equals(b) ? Boolean.TRUE : Boolean.FALSE; + stackPosition = idx + 1; + } + case Opcodes.SUBSTRING -> { + int idx = stackPosition - 1; + var string = (String) stack[idx]; + var startPos = instructions[pc++] & 0xFF; + var endPos = instructions[pc++] & 0xFF; + var reverse = (instructions[pc++] & 0xFF) != 0; + stack[idx] = Substring.getSubstring(string, startPos, endPos, reverse); + } + case Opcodes.IS_VALID_HOST_LABEL -> { + // Pops 2, pushes 1 + int idx = stackPosition - 2; + var hostLabel = (String) stack[idx]; + var allowDots = (Boolean) stack[idx + 1]; + stack[idx] = IsValidHostLabel.isValidHostLabel(hostLabel, Boolean.TRUE.equals(allowDots)) + ? Boolean.TRUE + : Boolean.FALSE; + stackPosition = idx + 1; + } + case Opcodes.PARSE_URL -> { + int idx = stackPosition - 1; + var urlString = (String) stack[idx]; + stack[idx] = urlString == null ? null : uriFactory.createUri(urlString); + } + case Opcodes.URI_ENCODE -> { + int idx = stackPosition - 1; + var string = (String) stack[idx]; + stack[idx] = URLEncoding.encodeUnreserved(string, false); + } + case Opcodes.RETURN_ERROR -> throw new RulesEvaluationError((String) stack[--stackPosition], pc); + case Opcodes.RETURN_ENDPOINT -> { + var packed = instructions[pc++]; + boolean hasHeaders = (packed & 1) != 0; + boolean hasProperties = (packed & 2) != 0; + var urlString = (String) stack[--stackPosition]; + var properties = (Map) (hasProperties ? stack[--stackPosition] : Map.of()); + var headers = (Map>) (hasHeaders ? stack[--stackPosition] : Map.of()); + var builder = Endpoint.builder().uri(uriFactory.createUri(urlString)); + if (!headers.isEmpty()) { + builder.putProperty(EndpointContext.HEADERS, headers); + } + for (var extension : extensions) { + extension.extractEndpointProperties(builder, context, properties, headers); + } + return builder.build(); + } + case Opcodes.RETURN_VALUE -> { + return stack[--stackPosition]; + } + case Opcodes.JT_OR_POP -> { + Object value = stack[stackPosition - 1]; + // Read as unsigned 16-bit value (0-65535) + int offset = ((instructions[pc] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); + pc += 2; + if (value != null && value != Boolean.FALSE) { + pc += offset; // Jump forward, keeping value on stack + } else { + stackPosition--; // Pop the falsey value + } + } + default -> throw new RulesEvaluationError("Unknown rules engine instruction: " + opcode, pc); + } + } + + throw new IllegalArgumentException("Expected to return a value during evaluation"); + } + + // Get a property from a map or URI, or return null. + private Object getProperty(Object target, String propertyName) { + if (target instanceof Map m) { + return m.get(propertyName); + } else if (target instanceof URI u) { + return switch (propertyName) { + case "scheme" -> u.getScheme(); + case "path" -> u.getRawPath(); + case "normalizedPath" -> ParseUrl.normalizePath(u.getRawPath()); + case "authority" -> u.getAuthority(); + case "isIp" -> ParseUrl.isIpAddr(u.getHost()); + default -> null; + }; + } + return null; + } + + // Get a value by index from an object. If not an array, returns null. + private Object getIndex(Object target, int index) { + if (target instanceof List l) { + if (index >= 0 && index < l.size()) { + return l.get(index); + } + } + return null; + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java new file mode 100644 index 000000000..bb28dff19 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java @@ -0,0 +1,103 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +final class BytecodeReader { + final byte[] data; + int offset; + + BytecodeReader(byte[] data, int offset) { + this.data = data; + this.offset = offset; + } + + byte readByte() { + return data[offset++]; + } + + short readShort() { + int value = ((data[offset] & 0xFF) << 8) | (data[offset + 1] & 0xFF); + offset += 2; + return (short) value; + } + + int readInt() { + int value = (data[offset] & 0xFF) << 24; + value |= (data[offset + 1] & 0xFF) << 16; + value |= (data[offset + 2] & 0xFF) << 8; + value |= data[offset + 3] & 0xFF; + offset += 4; + return value; + } + + String readUTF() { + int length = readShort() & 0xFFFF; + String value = new String(data, offset, length, StandardCharsets.UTF_8); + offset += length; + return value; + } + + Object readConstant() { + byte type = readByte(); + return switch (type) { + case Bytecode.CONST_NULL -> null; + case Bytecode.CONST_STRING -> readUTF(); + case Bytecode.CONST_INTEGER -> readInt(); + case Bytecode.CONST_BOOLEAN -> readByte() != 0; + case Bytecode.CONST_LIST -> { + int size = readShort() & 0xFFFF; + List list = new ArrayList<>(size); + for (int i = 0; i < size; i++) { + list.add(readConstant()); + } + yield list; + } + case Bytecode.CONST_MAP -> { + int size = readShort() & 0xFFFF; + Map map = new LinkedHashMap<>(size); + for (int i = 0; i < size; i++) { + String key = readUTF(); + Object value = readConstant(); + map.put(key, value); + } + yield map; + } + default -> throw new IllegalArgumentException("Unknown rules engine bytecode constant type: " + type); + }; + } + + RegisterDefinition[] readRegisterDefinitions(int count) { + RegisterDefinition[] registers = new RegisterDefinition[count]; + + for (int i = 0; i < count; i++) { + String name = readUTF(); + boolean required = readByte() != 0; + boolean temp = readByte() != 0; + + // hasDefault + Object defaultValue = null; + if (readByte() != 0) { + defaultValue = readConstant(); + } + + // hasBuiltin + String builtin = null; + if (readByte() != 0) { + builtin = readUTF(); + } + + registers[i] = new RegisterDefinition(name, required, defaultValue, builtin, temp); + } + + return registers; + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java new file mode 100644 index 000000000..303571f92 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java @@ -0,0 +1,295 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Builds up bytecode incrementally. + */ +final class BytecodeWriter { + private final ByteArrayOutputStream bytecodeStream = new ByteArrayOutputStream(); + private final List conditionOffsets = new ArrayList<>(); + private final List resultOffsets = new ArrayList<>(); + private final Map constantIndices = new HashMap<>(); + private final List constants = new ArrayList<>(); + private final List functionNames = new ArrayList<>(); + + void markConditionStart() { + conditionOffsets.add(bytecodeStream.size()); + } + + void markResultStart() { + resultOffsets.add(bytecodeStream.size()); + } + + void writeByte(int value) { + bytecodeStream.write(value); + } + + void writeShort(int value) { + bytecodeStream.write((value >> 8) & 0xFF); + bytecodeStream.write(value & 0xFF); + } + + // Get or allocate constant index + int getConstantIndex(Object value) { + return constantIndices.computeIfAbsent(canonicalizeConstant(value), v -> { + int index = constants.size(); + constants.add(v); + return index; + }); + } + + private Object canonicalizeConstant(Object value) { + if (value instanceof String s) { + return s.intern(); + } else { + return value; + } + } + + // Register function usage + void registerFunction(String functionName) { + if (!functionNames.contains(functionName)) { + functionNames.add(functionName); + } + } + + Bytecode build( + RegisterDefinition[] registerDefinitions, + RulesFunction[] functions, + int[] bddNodes, + int bddRootRef + ) { + ByteArrayOutputStream complete = new ByteArrayOutputStream(); + try { + int bddNodeCount = bddNodes.length / 3; + + // Write header (44 bytes) + writeHeader(complete, registerDefinitions.length, functions.length, bddNodeCount, bddRootRef); + + // Calculate where each section will be + int headerSize = 44; + int conditionTableSize = conditionOffsets.size() * 4; + int resultTableSize = resultOffsets.size() * 4; + int functionTableSize = calculateFunctionTableSize(); + int bddTableSize = bddNodeCount * 12; // Each node is 3 ints = 12 bytes + + // Write offset tables + int resultTableOffset = headerSize + conditionTableSize; + int functionTableOffset = resultTableOffset + resultTableSize; + + // Calculate where bytecode will start (after all tables and register defs) + // We need to know register definition size first + ByteArrayOutputStream regDefTemp = new ByteArrayOutputStream(); + writeRegisterDefinitions(regDefTemp, registerDefinitions); + byte[] regDefBytes = regDefTemp.toByteArray(); + + int bddTableOffset = functionTableOffset + functionTableSize + regDefBytes.length; + int bytecodeOffset = bddTableOffset + bddTableSize; + + // Write condition offsets (adjusted to absolute positions) + DataOutputStream dos = new DataOutputStream(complete); + for (int offset : conditionOffsets) { + dos.writeInt(bytecodeOffset + offset); + } + + // Write result offsets (adjusted to absolute positions) + for (int offset : resultOffsets) { + dos.writeInt(bytecodeOffset + offset); + } + + // Write function table + writeFunctionTable(complete); + + // Write register definitions + complete.write(regDefBytes); + + // Write BDD table + writeBddTable(complete, bddNodes); + + // Write bytecode + byte[] bytecode = bytecodeStream.toByteArray(); + complete.write(bytecode); + + // Write constant pool + int constantPoolOffset = complete.size(); + writeConstantPool(complete); + + // Now patch the header with actual offsets + byte[] data = complete.toByteArray(); + patchInt(data, 24, headerSize); + patchInt(data, 28, resultTableOffset); + patchInt(data, 32, functionTableOffset); + patchInt(data, 36, constantPoolOffset); + patchInt(data, 40, bddTableOffset); + + // Return the complete bytecode array wrapped in Bytecode + return new Bytecode( + bytecode, // Just the bytecode portion + conditionOffsets.stream().mapToInt(Integer::intValue).toArray(), + resultOffsets.stream().mapToInt(Integer::intValue).toArray(), + registerDefinitions, + constants.toArray(), + functions, + bddNodes, + bddRootRef); + + } catch (IOException e) { + throw new RuntimeException("Failed to build bytecode", e); + } + } + + private void writeHeader( + ByteArrayOutputStream out, + int registerCount, + int functionCount, + int bddNodeCount, + int bddRootRef + ) throws IOException { + DataOutputStream dos = new DataOutputStream(out); + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(Bytecode.VERSION); + dos.writeShort(conditionOffsets.size()); + dos.writeShort(resultOffsets.size()); + dos.writeShort(registerCount); + dos.writeShort(constants.size()); + dos.writeShort(functionCount); + dos.writeInt(bddNodeCount); + dos.writeInt(bddRootRef); + + // These will be patched later + dos.writeInt(0); // condition table offset + dos.writeInt(0); // result table offset + dos.writeInt(0); // function table offset + dos.writeInt(0); // constant pool offset + dos.writeInt(0); // BDD table offset + } + + private void writeBddTable(ByteArrayOutputStream out, int[] nodes) throws IOException { + DataOutputStream dos = new DataOutputStream(out); + int nodeCount = nodes.length / 3; + for (int i = 0; i < nodeCount; i++) { + int baseIdx = i * 3; + dos.writeInt(nodes[baseIdx]); // variable index + dos.writeInt(nodes[baseIdx + 1]); // high reference + dos.writeInt(nodes[baseIdx + 2]); // low reference + } + } + + private int calculateFunctionTableSize() { + int size = 0; + for (String name : functionNames) { + size += 2 + name.getBytes(StandardCharsets.UTF_8).length; // length prefix + UTF-8 bytes + } + return size; + } + + private void writeFunctionTable(ByteArrayOutputStream out) throws IOException { + DataOutputStream dos = new DataOutputStream(out); + for (String name : functionNames) { + writeUTF(dos, name); + } + } + + private void writeRegisterDefinitions(ByteArrayOutputStream out, RegisterDefinition[] registers) + throws IOException { + DataOutputStream dos = new DataOutputStream(out); + + for (RegisterDefinition reg : registers) { + // Write name + writeUTF(dos, reg.name()); + + // Write required flag + dos.writeByte(reg.required() ? 1 : 0); + + // Write temp flag + dos.writeByte(reg.temp() ? 1 : 0); + + // Write default value + if (reg.defaultValue() != null) { + dos.writeByte(1); // hasDefault + writeConstantValue(dos, reg.defaultValue()); + } else { + dos.writeByte(0); // no default + } + + // Write builtin + if (reg.builtin() != null) { + dos.writeByte(1); // hasBuiltin + writeUTF(dos, reg.builtin()); + } else { + dos.writeByte(0); // no builtin + } + } + } + + private void writeConstantPool(ByteArrayOutputStream out) throws IOException { + DataOutputStream dos = new DataOutputStream(out); + + // Write each constant + for (Object constant : constants) { + writeConstantValue(dos, constant); + } + } + + // Helper method to write a constant value + private void writeConstantValue(DataOutputStream dos, Object value) throws IOException { + if (value == null) { + dos.writeByte(Bytecode.CONST_NULL); + } else if (value instanceof String s) { + dos.writeByte(Bytecode.CONST_STRING); + writeUTF(dos, s); + } else if (value instanceof Integer i) { + dos.writeByte(Bytecode.CONST_INTEGER); + dos.writeInt(i); + } else if (value instanceof Boolean b) { + dos.writeByte(Bytecode.CONST_BOOLEAN); + dos.writeByte(b ? 1 : 0); + } else if (value instanceof List list) { + dos.writeByte(Bytecode.CONST_LIST); + dos.writeShort(list.size()); + for (Object element : list) { + writeConstantValue(dos, element); + } + } else if (value instanceof Map map) { + dos.writeByte(Bytecode.CONST_MAP); + dos.writeShort(map.size()); + for (Map.Entry entry : map.entrySet()) { + if (!(entry.getKey() instanceof String)) { + throw new IOException("Map keys must be strings, found: " + entry.getKey().getClass()); + } + writeUTF(dos, (String) entry.getKey()); + writeConstantValue(dos, entry.getValue()); + } + } else { + throw new IOException("Unsupported constant type: " + value.getClass()); + } + } + + // Helper to write UTF string (length-prefixed) + private void writeUTF(DataOutputStream dos, String value) throws IOException { + byte[] bytes = value.getBytes(StandardCharsets.UTF_8); + dos.writeShort(bytes.length); + dos.write(bytes); + } + + // Helper to patch an int value in a byte array + private void patchInt(byte[] data, int offset, int value) { + data[offset] = (byte) ((value >> 24) & 0xFF); + data[offset + 1] = (byte) ((value >> 16) & 0xFF); + data[offset + 2] = (byte) ((value >> 8) & 0xFF); + data[offset + 3] = (byte) (value & 0xFF); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java index ccd484aae..530b84878 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java @@ -11,6 +11,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.core.schema.ApiOperation; import software.amazon.smithy.java.core.schema.Schema; import software.amazon.smithy.java.core.schema.SerializableStruct; @@ -169,4 +170,18 @@ public void addContext(ApiOperation operation, SerializableStruct input, M } } } + + static void createEndpointParams( + Map target, + ContextProvider operationContextParams, + Context context, + ApiOperation operation, + SerializableStruct input + ) { + operationContextParams.addContext(operation, input, target); + var additionalParams = context.get(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS); + if (additionalParams != null) { + target.putAll(additionalParams); + } + } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java new file mode 100644 index 000000000..d6938012d --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java @@ -0,0 +1,88 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.logging.InternalLogger; +import software.amazon.smithy.rulesengine.language.EndpointRuleSet; +import software.amazon.smithy.rulesengine.language.evaluation.RuleEvaluator; +import software.amazon.smithy.rulesengine.language.evaluation.value.EndpointValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.Value; +import software.amazon.smithy.rulesengine.language.syntax.Identifier; + +/** + * Resolves endpoints by interpreting the endpoint ruleset decision tree. Slower, but no startup penalty and + * always available. + */ +final class DecisionTreeEndpointResolver implements EndpointResolver { + + private static final InternalLogger LOGGER = InternalLogger.getLogger(BytecodeEndpointResolver.class); + + private final EndpointRuleSet rules; + private final List extensions; + private final ContextProvider operationContextParams = new ContextProvider.OrchestratingProvider(); + private final UriFactory uriFactory; + + DecisionTreeEndpointResolver(EndpointRuleSet rules, List extensions, UriFactory uriFactory) { + this.rules = rules; + this.extensions = extensions; + this.uriFactory = uriFactory; + } + + @Override + public CompletableFuture resolveEndpoint(EndpointResolverParams params) { + try { + var operation = params.operation(); + Map endpointParams = new HashMap<>(); + ContextProvider.createEndpointParams( + endpointParams, + operationContextParams, + params.context(), + operation, + params.inputValue()); + LOGGER.debug("Resolving endpoint of {} using VM with params: {}", operation, endpointParams); + Map input = new HashMap<>(endpointParams.size()); + for (var e : endpointParams.entrySet()) { + input.put(Identifier.of(e.getKey()), EndpointUtils.convertToValue(e.getValue())); + } + var result = RuleEvaluator.evaluate(rules, input); + if (result instanceof EndpointValue ev) { + return CompletableFuture.completedFuture(convertEndpoint(params, ev)); + } else { + throw new IllegalStateException("Expected decision tree to return an endpoint, but found " + result); + } + } catch (RulesEvaluationError e) { + return CompletableFuture.failedFuture(e); + } + } + + private Endpoint convertEndpoint(EndpointResolverParams params, EndpointValue ev) { + var builder = Endpoint.builder(); + builder.uri(uriFactory.createUri(ev.getUrl())); + + Map properties; + if (ev.getProperties().isEmpty()) { + properties = Map.of(); + } else { + properties = new HashMap<>(ev.getProperties().size()); + for (var e : ev.getProperties().entrySet()) { + properties.put(e.getKey(), e.getValue().toObject()); + } + } + + for (var extension : extensions) { + extension.extractEndpointProperties(builder, params.context(), properties, ev.getHeaders()); + } + + return builder.build(); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java index 5de87e877..3ebe0a298 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java @@ -10,16 +10,22 @@ import software.amazon.smithy.java.client.core.ClientConfig; import software.amazon.smithy.java.client.core.ClientContext; import software.amazon.smithy.java.client.core.ClientPlugin; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.core.schema.TraitKey; import software.amazon.smithy.java.logging.InternalLogger; +import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; +import software.amazon.smithy.rulesengine.logic.bdd.NodeReversal; +import software.amazon.smithy.rulesengine.logic.bdd.SiftingOptimization; +import software.amazon.smithy.rulesengine.logic.cfg.Cfg; import software.amazon.smithy.rulesengine.traits.ContextParamTrait; import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; import software.amazon.smithy.rulesengine.traits.OperationContextParamsTrait; import software.amazon.smithy.rulesengine.traits.StaticContextParamsTrait; /** - * Attempts to resolve endpoints using smithy.rules#endpointRuleSet or a {@link RulesProgram} compiled from this trait. + * Attempts to resolve endpoints using smithy.rules#bdd, smithy.rules#endpointRuleSet, or a precompiled + * {@link Bytecode}. */ public final class EndpointRulesPlugin implements ClientPlugin { @@ -39,25 +45,27 @@ public final class EndpointRulesPlugin implements ClientPlugin { public static final TraitKey ENDPOINT_RULESET_TRAIT = TraitKey.get(EndpointRuleSetTrait.class); - private RulesProgram program; - private final RulesEngine engine; + public static final TraitKey BDD_TRAIT = TraitKey.get(BddTrait.class); - private EndpointRulesPlugin(RulesProgram program, RulesEngine engine) { - this.program = program; + private Bytecode bytecode; + private final RulesEngineBuilder engine; + + private EndpointRulesPlugin(Bytecode bytecode, RulesEngineBuilder engine) { + this.bytecode = bytecode; this.engine = engine; } /** - * Create a RulesEnginePlugin from a precompiled {@link RulesProgram}. + * Create a RulesEnginePlugin from a precompiled {@link Bytecode}. * *

This is typically used by code-generated clients. * - * @param program Program used to resolve endpoint. + * @param bytecode Bytecode used to resolve endpoint. * @return the rules engine plugin. */ - public static EndpointRulesPlugin from(RulesProgram program) { - Objects.requireNonNull(program, "RulesProgram must not be null"); - return new EndpointRulesPlugin(program, null); + public static EndpointRulesPlugin from(Bytecode bytecode) { + Objects.requireNonNull(bytecode, "RulesBytecode must not be null"); + return new EndpointRulesPlugin(bytecode, null); } /** @@ -68,7 +76,7 @@ public static EndpointRulesPlugin from(RulesProgram program) { * @return the plugin. */ public static EndpointRulesPlugin create() { - return create(new RulesEngine()); + return create(new RulesEngineBuilder()); } /** @@ -79,17 +87,17 @@ public static EndpointRulesPlugin create() { * @param engine RulesEngine to use when creating programs. * @return the plugin. */ - public static EndpointRulesPlugin create(RulesEngine engine) { + public static EndpointRulesPlugin create(RulesEngineBuilder engine) { return new EndpointRulesPlugin(null, engine); } /** - * Gets the endpoint rules program that was compiled, or null if no rules were found on the service. + * Gets the endpoint rules bytecode that was compiled, or null if no rules were found on the service. * * @return the rules program or null. */ - public RulesProgram getProgram() { - return program; + public Bytecode getBytecode() { + return bytecode; } @Override @@ -106,21 +114,37 @@ public void configureClient(ClientConfig.Builder config) { } if (usePlugin) { - if (program == null && config.service() != null) { - var ruleset = config.service().schema().getTrait(ENDPOINT_RULESET_TRAIT); - if (ruleset != null) { - LOGGER.debug("Found endpoint rules traits on service: {}", config.service()); - program = engine.compile(ruleset.getEndpointRuleSet()); + EndpointResolver resolver = null; + + if (bytecode == null && config.service() != null) { + var bddTrait = config.service().schema().getTrait(BDD_TRAIT); + if (bddTrait != null) { + LOGGER.debug("Found endpoint BDD trait on service: {}", config.service()); + bytecode = engine.compile(bddTrait); + resolver = new BytecodeEndpointResolver( + bytecode, + engine.getExtensions(), + engine.getBuiltinProviders()); + } else { + var ruleset = config.service().schema().getTrait(ENDPOINT_RULESET_TRAIT); + if (ruleset != null) { + LOGGER.debug("Found endpoint rules trait on service: {}", config.service()); + var cfg = Cfg.from(ruleset.getEndpointRuleSet()); + var bdd = BddTrait.from(cfg); + var nodes = SiftingOptimization.builder().cfg(cfg).build().apply(bdd.getBdd()); + nodes = NodeReversal.reverse(nodes); + bdd = bdd.toBuilder().bdd(nodes).build(); + bytecode = engine.compile(bdd); + var providers = engine.getBuiltinProviders(); + resolver = new BytecodeEndpointResolver(bytecode, engine.getExtensions(), providers); + } } } - if (program != null) { - applyResolver(program, config); + + if (resolver != null) { + config.endpointResolver(resolver); + LOGGER.debug("Applying EndpointRulesResolver to client: {}", config.service()); } } } - - private void applyResolver(RulesProgram applyProgram, ClientConfig.Builder config) { - config.endpointResolver(new EndpointRulesResolver(applyProgram)); - LOGGER.debug("Applying EndpointRulesResolver to client: {}", config.service()); - } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java deleted file mode 100644 index eb675eb72..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolver.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import software.amazon.smithy.java.client.core.endpoint.Endpoint; -import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; -import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.java.core.schema.ApiOperation; -import software.amazon.smithy.java.core.schema.SerializableStruct; -import software.amazon.smithy.java.logging.InternalLogger; - -/** - * Endpoint resolver that uses the endpoint rules engine. - */ -final class EndpointRulesResolver implements EndpointResolver { - - private static final InternalLogger LOGGER = InternalLogger.getLogger(EndpointRulesResolver.class); - - private final RulesProgram program; - private final ContextProvider operationContextParams = new ContextProvider.OrchestratingProvider(); - - EndpointRulesResolver(RulesProgram program) { - this.program = program; - } - - @Override - public CompletableFuture resolveEndpoint(EndpointResolverParams params) { - try { - var operation = params.operation(); - var endpointParams = createEndpointParams(params.context(), operation, params.inputValue()); - LOGGER.debug("Resolving endpoint of {} using VM with params: {}", operation, endpointParams); - return CompletableFuture.completedFuture(program.resolveEndpoint(params.context(), endpointParams)); - } catch (RulesEvaluationError e) { - return CompletableFuture.failedFuture(e); - } - } - - private Map createEndpointParams( - Context context, - ApiOperation operation, - SerializableStruct input - ) { - Map params = new HashMap<>(); - operationContextParams.addContext(operation, input, params); - - var additionalParams = context.get(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS); - if (additionalParams != null) { - params.putAll(additionalParams); - } - - return params; - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java index b16df27ca..007d30e10 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java @@ -5,7 +5,6 @@ package software.amazon.smithy.java.client.rulesengine; -import java.net.URI; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -16,14 +15,8 @@ import software.amazon.smithy.model.node.NumberNode; import software.amazon.smithy.model.node.ObjectNode; import software.amazon.smithy.model.node.StringNode; -import software.amazon.smithy.rulesengine.language.evaluation.value.ArrayValue; -import software.amazon.smithy.rulesengine.language.evaluation.value.BooleanValue; -import software.amazon.smithy.rulesengine.language.evaluation.value.EmptyValue; -import software.amazon.smithy.rulesengine.language.evaluation.value.IntegerValue; -import software.amazon.smithy.rulesengine.language.evaluation.value.RecordValue; -import software.amazon.smithy.rulesengine.language.evaluation.value.StringValue; import software.amazon.smithy.rulesengine.language.evaluation.value.Value; -import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.ParseUrl; +import software.amazon.smithy.rulesengine.language.syntax.Identifier; public final class EndpointUtils { @@ -64,93 +57,34 @@ public static Object convertNode(Node value) { return convertNode(value, false); } - static Object convertInputParamValue(Value value) { - if (value instanceof StringValue s) { - return s.getValue(); - } else if (value instanceof IntegerValue i) { - return i.getValue(); - } else if (value instanceof ArrayValue a) { - var result = new ArrayList<>(); - for (var v : a.getValues()) { - result.add(convertInputParamValue(v)); - } - return result; - } else if (value instanceof EmptyValue) { - return null; - } else if (value instanceof BooleanValue b) { - return b.getValue(); - } else if (value instanceof RecordValue r) { - var result = new HashMap<>(); - for (var e : r.getValue().entrySet()) { - result.put(e.getKey().getName().getValue(), convertInputParamValue(e.getValue())); - } - return result; - } else { - throw new RulesEvaluationError("Unsupported value type: " + value); - } - } - - static Object verifyObject(Object value) { - if (value instanceof String - || value instanceof Number - || value instanceof Boolean - || value instanceof StringTemplate - || value instanceof URI) { - return value; - } - - if (value instanceof List l) { - for (var v : l) { - verifyObject(v); + static Value convertToValue(Object o) { + if (o == null) { + return Value.emptyValue(); + } else if (o instanceof String s) { + return Value.stringValue(s); + } else if (o instanceof Number n) { + return Value.integerValue(n.intValue()); + } else if (o instanceof Boolean b) { + return Value.booleanValue(b); + } else if (o instanceof List l) { + List valueList = new ArrayList<>(l.size()); + for (var entry : l) { + valueList.add(convertToValue(entry)); } - return value; - } - - if (value instanceof Map m) { + return Value.arrayValue(valueList); + } else if (o instanceof Map m) { + Map valueMap = new HashMap<>(m.size()); for (var e : m.entrySet()) { - if (!(e.getKey() instanceof String)) { - throw new UnsupportedOperationException("Endpoint parameter maps must use string keys. Found " + e); - } - verifyObject(e.getKey()); - verifyObject(e.getValue()); + valueMap.put(Identifier.of(e.getKey().toString()), convertToValue(e.getValue())); } - return m; + return Value.recordValue(valueMap); + } else { + throw new RulesEvaluationError("Unsupported value type: " + o); } - - throw new UnsupportedOperationException("Unsupported endpoint rules value given: " + value); } - // Read little-endian unsigned short (2 bytes) + // Read big-endian unsigned short (2 bytes) static int bytesToShort(byte[] instructions, int offset) { - return ((instructions[offset + 1] & 0xFF) << 8) | (instructions[offset] & 0xFF); - } - - // Write little-endian unsigned short (2 bytes) - static void shortToTwoBytes(int value, byte[] instructions, int offset) { - instructions[offset] = (byte) (value & 0xFF); - instructions[offset + 1] = (byte) ((value >> 8) & 0xFF); - } - - static Object getUriProperty(URI uri, String key) { - return switch (key) { - case "scheme" -> uri.getScheme(); - case "path" -> uri.getRawPath(); - case "normalizedPath" -> ParseUrl.normalizePath(uri.getRawPath()); - case "authority" -> uri.getAuthority(); - case "isIp" -> ParseUrl.isIpAddr(uri.getHost()); - default -> null; - }; - } - - static T castFnArgument(Object value, Class type, String method, int position) { - try { - return type.cast(value); - } catch (ClassCastException e) { - throw new RulesEvaluationError(String.format("Expected %s argument %d to be %s, but given %s", - method, - position, - type.getName(), - value.getClass().getName())); - } + return ((instructions[offset] & 0xFF) << 8) | (instructions[offset + 1] & 0xFF); } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java new file mode 100644 index 000000000..fe0d0a464 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java @@ -0,0 +1,403 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +public final class Opcodes { + + private Opcodes() {} + + /** + * Push a constant value onto the stack from the constant pool. + * + *

Stack: [...] → [..., value] + * + *

LOAD_CONST [const-index:byte] + */ + static final byte LOAD_CONST = 0; + + /** + * Push a constant value onto the stack from the constant pool using a wide index. + * + *

Stack: [...] → [..., value] + * + *

LOAD_CONST_W [const-index:short] + */ + static final byte LOAD_CONST_W = 1; + + /** + * Store the value at the top of the stack into a register without popping it. + * + *

Stack: [..., value] → [..., value] + * + *

SET_REGISTER [register:byte] + */ + static final byte SET_REGISTER = 2; + + /** + * Load a value from a register and push it onto the stack. + * + *

Stack: [...] → [..., value] + * + *

LOAD_REGISTER [register:byte] + */ + static final byte LOAD_REGISTER = 3; + + /** + * Replace the top stack value with its logical negation. + * + *

Stack: [..., value] → [..., !value] + * + *

NOT + */ + static final byte NOT = 4; + + /** + * Replace the top stack value with true if it's non-null, false otherwise. + * + *

Stack: [..., value] → [..., boolean] + * + *

ISSET + */ + static final byte ISSET = 5; + + /** + * Test if a register contains a non-null value and push the result. + * + *

Stack: [...] → [..., boolean] + * + *

TEST_REGISTER_ISSET [register:byte] + */ + static final byte TEST_REGISTER_ISSET = 6; + + /** + * Test if a register is null or unset and push the result. + * + *

Stack: [...] → [..., boolean] + * + *

TEST_REGISTER_NOT_SET [register:byte] + */ + static final byte TEST_REGISTER_NOT_SET = 7; + + /** + * Push an empty list onto the stack. + * + *

Stack: [...] → [..., []] + * + *

LIST0 + */ + static final byte LIST0 = 8; + + /** + * Pop one value from the stack and push a single-element list. + * + *

Stack: [..., value] → [..., [value]] + * + *

LIST1 + */ + static final byte LIST1 = 9; + + /** + * Pop two values from the stack and push a two-element list. + * + *

Stack: [..., value1, value2] → [..., [value1, value2]] + * + *

LIST2 + */ + static final byte LIST2 = 10; + + /** + * Pop N values from the stack and push a list containing them. + * + *

Stack: [..., value1, ..., valueN] → [..., list] + * + *

LISTN [size:byte] + */ + static final byte LISTN = 11; + + /** + * Push an empty map onto the stack. + * + *

Stack: [...] → [..., {}] + * + *

MAP0 + */ + static final byte MAP0 = 12; + + /** + * Pop a key-value pair from the stack and push a single-entry map. + * + *

Stack: [..., value, key] → [..., {key: value}] + * + *

MAP1 + */ + static final byte MAP1 = 13; + + /** + * Pop two key-value pairs from the stack and push a two-entry map. + * + *

Stack: [..., value1, key1, value2, key2] → [..., {key1: value1, key2: value2}] + * + *

MAP2 + */ + static final byte MAP2 = 14; + + /** + * Pop three key-value pairs from the stack and push a three-entry map. + * + *

Stack: [..., value1, key1, value2, key2, value3, key3] → [..., map] + * + *

MAP3 + */ + static final byte MAP3 = 15; + + /** + * Pop four key-value pairs from the stack and push a four-entry map. + * + *

Stack: [..., value1, key1, value2, key2, value3, key3, value4, key4] → [..., map] + * + *

MAP4 + */ + static final byte MAP4 = 16; + + /** + * Pop N key-value pairs from the stack and push a map containing them. + * + *

Stack: [..., value1, key1, ..., valueN, keyN] → [..., map] + * + *

MAPN [size:byte] + */ + static final byte MAPN = 17; + + /** + * Pop N values from the stack and resolve a string template with them. + * The template is fetched from the constant pool and the N argument count + * is provided as an operand to avoid storing it in the template. + * + *

Stack: [..., arg1, arg2, ..., argN] → [..., string] + * + *

RESOLVE_TEMPLATE [arg-count:byte] [template-index:short] + */ + static final byte RESOLVE_TEMPLATE = 18; + + /** + * Call a function with no arguments and push the result. + * + *

Stack: [...] → [..., result] + * + *

FN0 [function-index:byte] + */ + static final byte FN0 = 19; + + /** + * Call a function with one argument and push the result. + * + *

Stack: [..., arg] → [..., result] + * + *

FN1 [function-index:byte] + */ + static final byte FN1 = 20; + + /** + * Call a function with two arguments and push the result. + * + *

Stack: [..., arg1, arg2] → [..., result] + * + *

FN2 [function-index:byte] + */ + static final byte FN2 = 21; + + /** + * Call a function with three arguments and push the result. + * + *

Stack: [..., arg1, arg2, arg3] → [..., result] + * + *

FN3 [function-index:byte] + */ + static final byte FN3 = 22; + + /** + * Call a function with arguments from the stack and push the result. + * + *

Stack: [..., arg1, arg2, ..., argN] → [..., result] + * + *

FN [function-index:byte] + */ + static final byte FN = 23; + + /** + * Get a property from the value at the top of the stack, replacing it with the property value. + * + *

Stack: [..., object] → [..., object.property] + * + *

GET_PROPERTY [property-name-index:short] + */ + static final byte GET_PROPERTY = 24; + + /** + * Get an indexed element from the value at the top of the stack, replacing it with the element. + * + *

Stack: [..., array] → [..., array[index]] + * + *

GET_INDEX [index:byte] + */ + static final byte GET_INDEX = 25; + + /** + * Load a property from a register and push it onto the stack. + * + *

Stack: [...] → [..., register.property] + * + *

GET_PROPERTY_REG [register:byte] [property-name-index:short] + */ + static final byte GET_PROPERTY_REG = 26; + + /** + * Load an indexed element from a register and push it onto the stack. + * + *

Stack: [...] → [..., register[index]] + * + *

GET_INDEX_REG [register:byte] [index:byte] + */ + static final byte GET_INDEX_REG = 27; + + /** + * Replace the top stack value with true if it equals Boolean.TRUE, false otherwise. + * + *

Stack: [..., value] → [..., boolean] + * + *

IS_TRUE + */ + static final byte IS_TRUE = 28; + + /** + * Test if a register contains Boolean.TRUE and push the result. + * + *

Stack: [...] → [..., boolean] + * + *

TEST_REGISTER_IS_TRUE [register:byte] + */ + static final byte TEST_REGISTER_IS_TRUE = 29; + + /** + * Test if a register contains Boolean.FALSE and push the result. + * + *

Stack: [...] → [..., boolean] + * + *

TEST_REGISTER_IS_FALSE [register:byte] + */ + static final byte TEST_REGISTER_IS_FALSE = 30; + + /** + * Pop two values from the stack and push whether they are equal. + * + *

Stack: [..., value1, value2] → [..., boolean] + * + *

EQUALS + */ + static final byte EQUALS = 31; + + /** + * Pop two strings from the stack and push whether they are equal. + * More efficient than EQUALS for string comparisons. + * + *

Stack: [..., string1, string2] → [..., boolean] + * + *

STRING_EQUALS + */ + static final byte STRING_EQUALS = 32; + + /** + * Pop two booleans from the stack and push whether they are equal. + * More efficient than EQUALS for boolean comparisons. + * + *

Stack: [..., boolean1, boolean2] → [..., boolean] + * + *

BOOLEAN_EQUALS + */ + static final byte BOOLEAN_EQUALS = 33; + + /** + * Pop a string from the stack and push a substring of it. + * + *

Stack: [..., string] → [..., substring] + * + *

SUBSTRING [start:byte] [end:byte] [reverse:byte] + */ + static final byte SUBSTRING = 34; + + /** + * Pop a string and boolean from the stack and push whether it's a valid host label. + * + *

Stack: [..., string, allowDots] → [..., boolean] + * + *

IS_VALID_HOST_LABEL + */ + static final byte IS_VALID_HOST_LABEL = 35; + + /** + * Pop a string URL from the stack, parse it, and push the URI or null if invalid. + * + *

Stack: [..., urlString] → [..., uri|null] + * + *

PARSE_URL + */ + static final byte PARSE_URL = 36; + + /** + * Pop a string from the stack and push its URI-encoded form. + * + *

Stack: [..., string] → [..., encodedString] + * + *

URI_ENCODE + */ + static final byte URI_ENCODE = 37; + + /** + * Pop an error message from the stack and terminate with an error. + * + *

Stack: [..., errorMessage] → (terminates) + * + *

RETURN_ERROR + */ + static final byte RETURN_ERROR = 38; + + /** + * Build and return an endpoint. Pops URL, and optionally properties and headers based on flags. + * + *

Stack varies based on flags: + *

    + *
  • No flags: [..., url] → (returns endpoint)
  • + *
  • Properties flag: [..., properties, url] → (returns endpoint)
  • + *
  • Headers flag: [..., headers, url] → (returns endpoint)
  • + *
  • Both flags: [..., headers, properties, url] → (returns endpoint)
  • + *
+ * + *

RETURN_ENDPOINT [flags:byte] + */ + static final byte RETURN_ENDPOINT = 39; + + /** + * Pop a value from the stack and return it as the result. + * + *

Stack: [..., value] → (returns value) + * + *

RETURN_VALUE + */ + static final byte RETURN_VALUE = 40; + + /** + * Jump forward if the value at the top of the stack is truthy (not null and not Boolean.FALSE). + * If jumping, leave the value on the stack. If not jumping, pop the value. + * + *

The offset is an unsigned 16-bit value (0-65535) relative to the instruction + * following this one (after the 2-byte offset). Backward jumps are not allowed. + * + *

Stack: [..., value] → [..., value] (if jumping) or [...] (if not jumping) + * + *

JT_OR_POP [offset:ushort] + */ + static final byte JT_OR_POP = 41; +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocator.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocator.java new file mode 100644 index 000000000..70c0cf5a4 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocator.java @@ -0,0 +1,74 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +abstract class RegisterAllocator { + + // Allocate an input parameter register. + abstract byte allocate(String name, boolean required, Object defaultValue, String builtin, boolean temp); + + // Allocate a temp register for a variable by name. + abstract byte shadow(String name); + + // Gets a register that _has_ to exist by name. + abstract byte getRegister(String name); + + // Get the number of temp registers required by the program. + abstract int getTempRegisterCount(); + + abstract List getRegistry(); + + static final class FlatAllocator extends RegisterAllocator { + private final List registry = new ArrayList<>(); + private final Map registryIndex = new HashMap<>(); + private int tempRegisters = 0; + + @Override + public byte allocate(String name, boolean required, Object defaultValue, String builtin, boolean temp) { + if (registryIndex.containsKey(name)) { + throw new RulesEvaluationError("Duplicate variable name found in rules: " + name); + } + var register = new RegisterDefinition(name, required, defaultValue, builtin, temp); + registryIndex.put(name, (byte) registry.size()); + registry.add(register); + return (byte) (registry.size() - 1); + } + + @Override + public byte shadow(String name) { + Byte current = registryIndex.get(name); + if (current != null) { + return current; + } + tempRegisters++; + return allocate(name, false, null, null, true); + } + + @Override + public byte getRegister(String name) { + var result = registryIndex.get(name); + if (result == null) { + return allocate(name, false, null, null, true); + } + return result; + } + + @Override + List getRegistry() { + return registry; + } + + @Override + int getTempRegisterCount() { + return tempRegisters; + } + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ParamDefinition.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterDefinition.java similarity index 65% rename from client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ParamDefinition.java rename to client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterDefinition.java index 6e66f1a30..2ab8df12a 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ParamDefinition.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterDefinition.java @@ -6,15 +6,12 @@ package software.amazon.smithy.java.client.rulesengine; /** - * Defines a parameter used in {@link RulesProgram}. + * Defines a parameter used in {@link Bytecode}. * * @param name Name of the parameter. * @param required True if the parameter is required. * @param defaultValue An object value that contains a default value for input parameters. * @param builtin A string that defines the builtin that provides a default value for input parameters. + * @param temp True if this is a temporary register that does not take initial values. */ -public record ParamDefinition(String name, boolean required, Object defaultValue, String builtin) { - public ParamDefinition(String name) { - this(name, false, null, null); - } -} +public record RegisterDefinition(String name, boolean required, Object defaultValue, String builtin, boolean temp) {} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java new file mode 100644 index 000000000..9ca13b2ac --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java @@ -0,0 +1,216 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.Map; +import java.util.function.Function; +import software.amazon.smithy.java.context.Context; + +/** + * Fills register arrays with parameter values, builtin providers, and validates required parameters. + */ +abstract class RegisterFiller { + protected final Function[] providersByRegister; + protected final Map inputRegisterMap; + protected final RegisterDefinition[] registerDefinitions; + protected final Object[] registerTemplate; + + @SuppressWarnings("unchecked") + protected RegisterFiller( + RegisterDefinition[] registerDefinitions, + Map inputRegisterMap, + Map> builtinProviders, + int[] builtinIndices, + Object[] registerTemplate + ) { + this.registerDefinitions = registerDefinitions; + this.inputRegisterMap = inputRegisterMap; + this.registerTemplate = registerTemplate; + + if (registerTemplate.length != registerDefinitions.length) { + throw new IllegalArgumentException(String.format( + "Template length (%d) must match register definitions length (%d)", + registerTemplate.length, + registerDefinitions.length)); + } + + // Align providers by register index for O(1) access + this.providersByRegister = new Function[registerDefinitions.length]; + for (int regIndex : builtinIndices) { + String builtinName = registerDefinitions[regIndex].builtin(); + Function provider = builtinProviders.get(builtinName); + if (provider == null) { + throw new IllegalStateException("Missing builtin provider: " + builtinName); + } + this.providersByRegister[regIndex] = provider; + } + } + + /** + * Fill the register array with parameter values, builtin providers, and validate required parameters. + * + *

First copies the register template to set up defaults and clear old state, then fills + * parameters and builtins, and finally validates required parameters. + * + * @param sink the register array to fill + * @param context the context for builtin providers + * @param parameters the input parameters + * @return the filled register array + * @throws RulesEvaluationError if a required parameter is missing + */ + abstract Object[] fillRegisters(Object[] sink, Context context, Map parameters); + + /** + * Factory method to create the appropriate RegisterFiller implementation. + * + * @param bytecode the bytecode containing register definitions and indices + * @param builtinProviders map from builtin names to provider functions + * @return the appropriate RegisterFiller implementation + */ + static RegisterFiller of(Bytecode bytecode, Map> builtinProviders) { + RegisterDefinition[] registerDefinitions = bytecode.getRegisterDefinitions(); + int[] builtinIndices = bytecode.getBuiltinIndices(); + int[] hardRequiredIndices = bytecode.getHardRequiredIndices(); + Map inputRegisterMap = bytecode.getInputRegisterMap(); + Object[] registerTemplate = bytecode.getRegisterTemplate(); + + if (registerDefinitions.length - 1 < 64) { + return new FastRegisterFiller(registerDefinitions, + builtinIndices, + hardRequiredIndices, + inputRegisterMap, + builtinProviders, + registerTemplate); + } else { + return new LargeRegisterFiller(registerDefinitions, + builtinIndices, + hardRequiredIndices, + inputRegisterMap, + builtinProviders, + registerTemplate); + } + } + + // Fast implementation for <= 64 registers using single long bitmasks. + private static final class FastRegisterFiller extends RegisterFiller { + private final long builtinMask; + private final long requiredMask; + + FastRegisterFiller( + RegisterDefinition[] registerDefinitions, + int[] builtinIndices, + int[] hardRequiredIndices, + Map inputRegisterMap, + Map> builtinProviders, + Object[] registerTemplate + ) { + super(registerDefinitions, inputRegisterMap, builtinProviders, builtinIndices, registerTemplate); + this.builtinMask = makeMask(builtinIndices); + this.requiredMask = makeMask(hardRequiredIndices); + } + + private static long makeMask(int[] indices) { + long mask = 0L; + for (int i : indices) { + mask |= 1L << i; + } + return mask; + } + + @Override + Object[] fillRegisters(Object[] sink, Context context, Map parameters) { + // Copy template to set up defaults and clear old state + System.arraycopy(registerTemplate, 0, sink, 0, registerTemplate.length); + + long filled = 0L; + + // Fill parameters + for (var e : parameters.entrySet()) { + Integer i = inputRegisterMap.get(e.getKey()); + if (i != null) { + sink[i] = e.getValue(); + filled |= 1L << i; + } + } + + // Fill builtins, and early exit if all filled + if ((filled & builtinMask) != builtinMask) { + long unfilled = builtinMask & ~filled; + while (unfilled != 0) { + int i = Long.numberOfTrailingZeros(unfilled); + unfilled &= unfilled - 1; // Clear lowest set bit + var result = providersByRegister[i].apply(context); + if (result != null) { + sink[i] = result; + filled |= 1L << i; + } + } + } + + // Validate required parameters + long missingRequired = requiredMask & ~filled; + if (missingRequired != 0) { + int i = Long.numberOfTrailingZeros(missingRequired); + throw new RulesEvaluationError("Required parameter missing: " + registerDefinitions[i].name()); + } + + return sink; + } + } + + // Fallback implementation for > 64 registers using simple array-based approach. + private static final class LargeRegisterFiller extends RegisterFiller { + private final int[] builtinIndices; + private final int[] hardRequiredIndices; + + LargeRegisterFiller( + RegisterDefinition[] registerDefinitions, + int[] builtinIndices, + int[] hardRequiredIndices, + Map inputRegisterMap, + Map> builtinProviders, + Object[] registerTemplate + ) { + super(registerDefinitions, inputRegisterMap, builtinProviders, builtinIndices, registerTemplate); + this.builtinIndices = builtinIndices; + this.hardRequiredIndices = hardRequiredIndices; + } + + @Override + Object[] fillRegisters(Object[] sink, Context context, Map parameters) { + // Copy template to set up defaults and clear old state + System.arraycopy(registerTemplate, 0, sink, 0, registerTemplate.length); + + // Fill parameters + for (var e : parameters.entrySet()) { + Integer i = inputRegisterMap.get(e.getKey()); + if (i != null) { + sink[i] = e.getValue(); + } + } + + // Fill builtins (simple null check) + for (int regIndex : builtinIndices) { + if (sink[regIndex] == null) { + var provider = providersByRegister[regIndex]; + if (provider != null) { + sink[regIndex] = provider.apply(context); + } + } + } + + // Validate required parameters + for (int regIndex : hardRequiredIndices) { + if (sink[regIndex] == null) { + throw new RulesEvaluationError( + "Required parameter missing: " + registerDefinitions[regIndex].name()); + } + } + + return sink; + } + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java deleted file mode 100644 index 15b7e5875..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesCompiler.java +++ /dev/null @@ -1,581 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Deque; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.function.BiFunction; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.rulesengine.language.EndpointRuleSet; -import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; -import software.amazon.smithy.rulesengine.language.syntax.expressions.ExpressionVisitor; -import software.amazon.smithy.rulesengine.language.syntax.expressions.Reference; -import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.FunctionDefinition; -import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.GetAttr; -import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsSet; -import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.BooleanLiteral; -import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.IntegerLiteral; -import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal; -import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.RecordLiteral; -import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.StringLiteral; -import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.TupleLiteral; -import software.amazon.smithy.rulesengine.language.syntax.rule.Condition; -import software.amazon.smithy.rulesengine.language.syntax.rule.EndpointRule; -import software.amazon.smithy.rulesengine.language.syntax.rule.ErrorRule; -import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; -import software.amazon.smithy.rulesengine.language.syntax.rule.TreeRule; - -final class RulesCompiler { - - private final List extensions; - private final EndpointRuleSet rules; - - private final Map constantPool = new LinkedHashMap<>(); - private final BiFunction builtinProvider; - - // The parsed opcodes and operands. - private byte[] instructions = new byte[64]; - private int instructionSize; - - // Parameters and captured variables. - private final List registry = new ArrayList<>(); - - // A map of variable name to stack index. - private final Map> registryIndex = new HashMap<>(); - - // An array of actually used functions. - private final List usedFunctions = new ArrayList<>(); - - // Index of function name to the index in usedFunctions. - private final Map usedFunctionIndex = new HashMap<>(); - - // The resolved VM functions (stdLib + given functions). - private final Map functions; - - // Stack of available and reusable registers. - private final ArrayList> scopedRegisterStack = new ArrayList<>(); - private final Deque availableRegisters = new ArrayDeque<>(); - private int temporaryRegisters = 0; - - RulesCompiler( - List extensions, - EndpointRuleSet rules, - Map functions, - BiFunction builtinProvider, - boolean performOptimizations - ) { - this.extensions = extensions; - this.rules = rules; - this.builtinProvider = builtinProvider; - this.functions = functions; - - // Byte 1 is the version byte. - instructions[0] = RulesProgram.VERSION; - // Byte 2 the number of parameters. Byte 3 is the number of temporary registers. Both filled in at the end. - instructionSize = 3; // start from here - - // Add parameters as registry values. - for (var param : rules.getParameters()) { - var defaultValue = param.getDefault().map(EndpointUtils::convertInputParamValue).orElse(null); - var builtinValue = param.getBuiltIn().orElse(null); - addRegister(param.getName().toString(), param.isRequired(), defaultValue, builtinValue); - } - } - - private byte addRegister(String name, boolean required, Object defaultValue, String builtin) { - var register = new ParamDefinition(name, required, defaultValue, builtin); - if (registryIndex.containsKey(name)) { - throw new RulesEvaluationError("Duplicate variable name found in rules: " + name); - } - Deque stack = new ArrayDeque<>(); - stack.push((byte) registry.size()); - registryIndex.put(name, stack); - registry.add(register); - - // Register scopes are tracking by flipping bits of a long. That means a max of 64 registers. - // No real rules definition would have more than 64 registers. - if (registry.size() > 255) { - throw new RulesEvaluationError("Too many registers added to rules engine"); - } - - return (byte) (registry.size() - 1); - } - - private int getConstant(Object value) { - Integer index = constantPool.get(value); - if (index == null) { - index = constantPool.size(); - constantPool.put(value, index); - } - return index; - } - - // Gets a register that _has_ to exist by name. - private byte getRegister(String name) { - return registryIndex.get(name).peek(); - } - - // Used to assign registers in a stack-like manner. Not used to initialize registers. - private byte assignRegister(String name) { - var indices = registryIndex.get(name); - var index = getTempRegister(); - if (indices == null) { - indices = new ArrayDeque<>(); - registryIndex.put(name, indices); - } - indices.add(index); - return index; - } - - // Gets the next available temporary register or creates one. - private byte getTempRegister() { - return !availableRegisters.isEmpty() - ? availableRegisters.pop() - : addRegister("r" + temporaryRegisters++, false, null, null); - } - - private byte getFunctionIndex(String name) { - Byte index = usedFunctionIndex.get(name); - if (index == null) { - var fn = functions.get(name); - if (fn == null) { - throw new RulesEvaluationError("Rules engine referenced unknown function: " + name); - } - index = (byte) usedFunctionIndex.size(); - usedFunctionIndex.put(name, index); - usedFunctions.add(fn); - } - return index; - } - - RulesProgram compile() { - for (var rule : rules.getRules()) { - compileRule(rule); - } - - return buildProgram(); - } - - private void compileRule(Rule rule) { - enterScope(); - if (rule instanceof TreeRule t) { - compileTreeRule(t); - } else if (rule instanceof EndpointRule e) { - compileEndpointRule(e); - } else if (rule instanceof ErrorRule e) { - compileErrorRule(e); - } - exitScope(); - } - - private void enterScope() { - scopedRegisterStack.add(new HashMap<>()); - } - - private void exitScope() { - var value = scopedRegisterStack.remove(scopedRegisterStack.size() - 1); - // Free up assigned temp registers. - for (var entry : value.entrySet()) { - var indices = registryIndex.get(entry.getValue()); - indices.pop(); - availableRegisters.add(entry.getKey()); - } - } - - private void compileTreeRule(TreeRule tree) { - var jump = compileConditions(tree); - // Compile nested rules. - for (var rule : tree.getRules()) { - compileRule(rule); - } - // Patch in the actual jump target for each condition so it skips over the rules. - jump.patchTarget(instructions, instructionSize); - } - - private JumpIfFalsey compileConditions(Rule rule) { - var jump = new JumpIfFalsey(); - for (var condition : rule.getConditions()) { - compileCondition(condition, jump); - } - return jump; - } - - private void compileCondition(Condition condition, JumpIfFalsey jump) { - compileExpression(condition.getFunction()); - // Add an instruction to store the result as a register if the condition requests it. - condition.getResult().ifPresent(result -> { - var varName = result.toString(); - var register = assignRegister(varName); - var position = scopedRegisterStack.size() - 1; - scopedRegisterStack.get(position).put(register, varName); - add_SET_REGISTER(register); - }); - // Add the jump instruction after each condition to skip over more conditions or skip over the rule. - add_JUMP_IF_FALSEY(0); - jump.addPatch(instructionSize - 2); - } - - private void addLiteralOpcodes(Literal literal) { - if (literal instanceof StringLiteral s) { - var st = StringTemplate.from(s.value()); - if (st.expressionCount() == 0) { - add_LOAD_CONST(st.resolve(0, null)); - } else if (st.singularExpression() != null) { - // No need to resolve a template if it's just plucking a single value. - compileExpression(st.singularExpression()); - } else { - // String templates need to push their template placeholders in reverse order. - st.forEachExpression(this::compileExpression); - add_RESOLVE_TEMPLATE(st); - } - } else if (literal instanceof TupleLiteral t) { - for (var e : t.members()) { - addLiteralOpcodes(e); - } - add_CREATE_LIST((short) t.members().size()); - } else if (literal instanceof RecordLiteral r) { - for (var e : r.members().entrySet()) { - addLiteralOpcodes(e.getValue()); // value then key to make popping ordered - add_LOAD_CONST(e.getKey().toString()); - } - add_CREATE_MAP((short) r.members().size()); - } else if (literal instanceof BooleanLiteral b) { - add_LOAD_CONST(b.value().getValue()); - } else if (literal instanceof IntegerLiteral i) { - add_LOAD_CONST(i.toNode().expectNumberNode().getValue()); - } else { - throw new UnsupportedOperationException("Unexpected rules engine Literal type: " + literal); - } - } - - private void compileExpression(Expression expression) { - alwaysCompileExpression(expression); - } - - private void alwaysCompileExpression(Expression expression) { - expression.accept(new ExpressionVisitor() { - @Override - public Void visitLiteral(Literal literal) { - addLiteralOpcodes(literal); - return null; - } - - @Override - public Void visitRef(Reference reference) { - var index = getRegister(reference.getName().toString()); - add_LOAD_REGISTER(index); - return null; - } - - @Override - public Void visitGetAttr(GetAttr getAttr) { - compileExpression(getAttr.getTarget()); - add_GET_ATTR(AttrExpression.from(getAttr)); - return null; - } - - @Override - public Void visitIsSet(Expression fn) { - if (fn instanceof Reference ref) { - add_TEST_REGISTER_ISSET(ref.getName().toString()); - } else { - compileExpression(fn); - add_ISSET(); - } - return null; - } - - @Override - public Void visitNot(Expression not) { - if (not instanceof IsSet isset && isset.getArguments().get(0) instanceof Reference ref) { - add_TEST_REGISTER_NOT_SET(ref.getName().toString()); - return null; - } else { - compileExpression(not); - add_NOT(); - } - return null; - } - - @Override - public Void visitBoolEquals(Expression left, Expression right) { - if (left instanceof BooleanLiteral b) { - pushBooleanOptimization(b, right); - } else if (right instanceof BooleanLiteral b) { - pushBooleanOptimization(b, left); - } else { - compileExpression(left); - compileExpression(right); - add_FN(getFunctionIndex("booleanEquals")); - } - return null; - } - - private void pushBooleanOptimization(BooleanLiteral b, Expression other) { - var value = b.value().getValue(); - if (other instanceof Reference ref) { - if (value) { - add_TEST_REGISTER_IS_TRUE(ref.getName().toString()); - } else { - add_TEST_REGISTER_IS_FALSE(ref.getName().toString()); - } - } else { - compileExpression(other); - add_IS_TRUE(); - if (!value) { - add_NOT(); - } - } - } - - @Override - public Void visitStringEquals(Expression left, Expression right) { - compileExpression(left); - compileExpression(right); - add_EQUALS(); - return null; - } - - @Override - public Void visitLibraryFunction(FunctionDefinition fn, List args) { - if (fn.getId().equals("substring")) { - compileExpression(args.get(0)); // string - add_SUBSTRING(args); - return null; - } - - var index = getFunctionIndex(fn.getId()); - var f = usedFunctions.get(index); - - // Detect if the runtime function differs from the defined trait function. - if (f.getOperandCount() != fn.getArguments().size()) { - throw new RulesEvaluationError("Rules engine function `" + fn.getId() + "` accepts " - + fn.getArguments().size() + " arguments in Smithy traits, but " - + f.getOperandCount() + " in the registered VM function."); - } - // Should never happen, but just in case. - if (fn.getArguments().size() != args.size()) { - throw new RulesEvaluationError("Required arguments not given for " + fn); - } - for (var arg : args) { - compileExpression(arg); - } - add_FN(index); - return null; - } - }); - } - - private void compileEndpointRule(EndpointRule rule) { - // Adds to stack: headers map, auth schemes map, URL. - var jump = compileConditions(rule); - var e = rule.getEndpoint(); - - // Add endpoint header instructions. - if (!e.getHeaders().isEmpty()) { - for (var entry : e.getHeaders().entrySet()) { - // Header values. Then header name. - for (var h : entry.getValue()) { - compileExpression(h); - } - // Process the N header values that are on the stack. - add_CREATE_LIST((short) entry.getValue().size()); - // Now the header name. - add_LOAD_CONST(entry.getKey()); - } - // Combine the N headers that are on the stack in the form of String followed by List. - add_CREATE_MAP((short) e.getHeaders().size()); - } - - // Add property instructions. - if (!e.getProperties().isEmpty()) { - for (var entry : e.getProperties().entrySet()) { - compileExpression(entry.getValue()); - add_LOAD_CONST(entry.getKey().toString()); - } - add_CREATE_MAP((short) e.getProperties().size()); - } - - // Compile the URL expression (could be a reference, template, etc). This must be the closest on the stack. - compileExpression(e.getUrl()); - // Add the set endpoint instruction. - add_RETURN_ENDPOINT(!e.getHeaders().isEmpty(), !e.getProperties().isEmpty()); - // Patch in the actual jump target for each condition so it skips over the endpoint rule. - jump.patchTarget(instructions, instructionSize); - } - - private void compileErrorRule(ErrorRule rule) { - var jump = compileConditions(rule); - compileExpression(rule.getError()); // error message - add_RETURN_ERROR(); - // Patch in the actual jump target for each condition so it skips over the error rule. - jump.patchTarget(instructions, instructionSize); - } - - RulesProgram buildProgram() { - // Fill in the register and temporary register sizes. - instructions[1] = (byte) (this.registry.size() - temporaryRegisters); - instructions[2] = (byte) temporaryRegisters; - var fns = new RulesFunction[usedFunctions.size()]; - usedFunctions.toArray(fns); - var constPool = new Object[this.constantPool.size()]; - constantPool.keySet().toArray(constPool); - return new RulesProgram( - extensions, - this.instructions, - 0, - instructionSize, - registry, - fns, - builtinProvider, - constPool); - } - - private static final class JumpIfFalsey { - final List instructionPointers = new ArrayList<>(); - - void addPatch(int position) { - instructionPointers.add(position); - } - - void patchTarget(byte[] instructions, int instructionSize) { - byte low = (byte) (instructionSize & 0xFF); - byte high = (byte) ((instructionSize >> 8) & 0xFF); - for (var position : instructionPointers) { - instructions[position] = low; - instructions[position + 1] = high; - } - } - } - - private void add_LOAD_CONST(Object value) { - var constant = getConstant(value); - if (constant < 256) { - addInstruction(RulesProgram.LOAD_CONST); - addInstruction((byte) constant); - } else { - addInstruction(RulesProgram.LOAD_CONST, constant); - } - } - - private void add_SET_REGISTER(byte register) { - addInstruction(RulesProgram.SET_REGISTER); - addInstruction(register); - } - - private void add_LOAD_REGISTER(byte register) { - addInstruction(RulesProgram.LOAD_REGISTER); - addInstruction(register); - } - - private void add_JUMP_IF_FALSEY(int target) { - addInstruction(RulesProgram.JUMP_IF_FALSEY, target); - } - - private void add_NOT() { - addInstruction(RulesProgram.NOT); - } - - private void add_ISSET() { - addInstruction(RulesProgram.ISSET); - } - - private void add_TEST_REGISTER_ISSET(String register) { - addInstruction(RulesProgram.TEST_REGISTER_ISSET); - addInstruction(getRegister(register)); - } - - private void add_TEST_REGISTER_NOT_SET(String register) { - addInstruction(RulesProgram.TEST_REGISTER_NOT_SET); - addInstruction(getRegister(register)); - } - - private void add_RETURN_ERROR() { - addInstruction(RulesProgram.RETURN_ERROR); - } - - private void add_RETURN_ENDPOINT(boolean hasHeaders, boolean hasProperties) { - addInstruction(RulesProgram.RETURN_ENDPOINT); - byte packed = 0; - if (hasHeaders) { - packed |= 1; - } - if (hasProperties) { - packed |= 2; - } - addInstruction(packed); - } - - private void add_CREATE_LIST(int length) { - addInstruction(RulesProgram.CREATE_LIST); - addInstruction((byte) length); - } - - private void add_CREATE_MAP(int length) { - addInstruction(RulesProgram.CREATE_MAP); - addInstruction((byte) length); - } - - private void add_RESOLVE_TEMPLATE(StringTemplate template) { - addInstruction(RulesProgram.RESOLVE_TEMPLATE, getConstant(template)); - } - - private void add_FN(byte functionIndex) { - addInstruction(RulesProgram.FN); - addInstruction(functionIndex); - } - - private void add_GET_ATTR(AttrExpression expression) { - addInstruction(RulesProgram.GET_ATTR, getConstant(expression)); - } - - private void add_IS_TRUE() { - addInstruction(RulesProgram.IS_TRUE); - } - - private void add_TEST_REGISTER_IS_TRUE(String register) { - addInstruction(RulesProgram.TEST_REGISTER_IS_TRUE); - addInstruction(getRegister(register)); - } - - private void add_TEST_REGISTER_IS_FALSE(String register) { - addInstruction(RulesProgram.TEST_REGISTER_IS_FALSE); - addInstruction(getRegister(register)); - } - - private void add_EQUALS() { - addInstruction(RulesProgram.EQUALS); - } - - private void add_SUBSTRING(List args) { - addInstruction(RulesProgram.SUBSTRING); - addInstruction(args.get(1).toNode().expectNumberNode().getValue().byteValue()); - addInstruction(args.get(2).toNode().expectNumberNode().getValue().byteValue()); - addInstruction(args.get(3).toNode().expectBooleanNode().getValue() ? (byte) 1 : (byte) 0); - } - - private void addInstruction(byte value) { - if (instructionSize >= instructions.length) { - // Double the size when needed. - byte[] newInstructions = new byte[instructions.length * 2]; - System.arraycopy(instructions, 0, newInstructions, 0, instructions.length); - instructions = newInstructions; - } - instructions[instructionSize++] = value; - } - - private void addInstruction(byte opcode, int value) { - addInstruction(opcode); - addInstruction((byte) 0); - addInstruction((byte) 0); - EndpointUtils.shortToTwoBytes(value, instructions, instructionSize - 2); - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngine.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngine.java deleted file mode 100644 index 6c6d55614..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngine.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.ServiceLoader; -import java.util.function.BiFunction; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.rulesengine.language.EndpointRuleSet; -import software.amazon.smithy.utils.SmithyUnstableApi; - -/** - * Compiles and loads a rules engine used to resolve endpoints based on Smithy's rules engine traits. - */ -public final class RulesEngine { - - static final List EXTENSIONS = new ArrayList<>(); - static { - for (var ext : ServiceLoader.load(RulesExtension.class)) { - EXTENSIONS.add(ext); - } - } - - private final List extensions = new ArrayList<>(); - private final Map functions = new LinkedHashMap<>(); - private final List> builtinProviders = new ArrayList<>(); - private boolean performOptimizations = true; - - public RulesEngine() { - // Always include the standard builtins, but after any explicitly given builtins. - builtinProviders.add(Stdlib::standardBuiltins); - - // Always include standard library functions. - for (var fn : Stdlib.values()) { - this.functions.put(fn.getFunctionName(), fn); - } - - for (var ext : EXTENSIONS) { - addExtension(ext); - } - } - - /** - * Register a function with the rules engine. - * - * @param fn Function to register. - * @return the RulesEngine. - */ - public RulesEngine addFunction(RulesFunction fn) { - functions.put(fn.getFunctionName(), fn); - return this; - } - - /** - * Register a builtin provider with the rules engine. - * - *

Providers that do not implement support for a builtin by name must return null, to allow for composing - * multiple providers and calling them one after the other. - * - * @param builtinProvider Provider to register. - * @return the RulesEngine. - */ - public RulesEngine addBuiltinProvider(BiFunction builtinProvider) { - if (builtinProvider != null) { - this.builtinProviders.add(builtinProvider); - } - return this; - } - - /** - * Manually add a RulesEngineExtension to the engine that injects functions and builtins. - * - * @param extension Extension to register. - * @return the RulesEngine. - */ - public RulesEngine addExtension(RulesExtension extension) { - extensions.add(extension); - addBuiltinProvider(extension.getBuiltinProvider()); - for (var f : extension.getFunctions()) { - addFunction(f); - } - return this; - } - - /** - * Call this method to disable optional optimizations, like eliminating common subexpressions. - * - *

This might be useful if the client will only make a single call on a simple ruleset. - * - * @return the RulesEngine. - */ - public RulesEngine disableOptimizations() { - performOptimizations = false; - return this; - } - - private BiFunction createBuiltinProvider() { - return (name, ctx) -> { - for (var provider : builtinProviders) { - var result = provider.apply(name, ctx); - if (result != null) { - return result; - } - } - return null; - }; - } - - /** - * Compile rules into a {@link RulesProgram}. - * - * @param rules Rules to compile. - * @return the compiled program. - */ - public RulesProgram compile(EndpointRuleSet rules) { - return new RulesCompiler(extensions, rules, functions, createBuiltinProvider(), performOptimizations).compile(); - } - - /** - * Creates a builder used to create a pre-compiled {@link RulesProgram}. - * - *

Warning: this method does little to no validation of the given program, the constant pool, or registers. - * It is up to you to ensure that these values are all correctly provided or else the rule evaluator will fail - * during evaluation, or provide unpredictable results. - * - * @return the builder. - */ - @SmithyUnstableApi - public PrecompiledBuilder precompiledBuilder() { - return new PrecompiledBuilder(); - } - - @SmithyUnstableApi - public final class PrecompiledBuilder { - private ByteBuffer bytecode; - private Object[] constantPool; - private List parameters = List.of(); - private String[] functionNames; - - public PrecompiledBuilder bytecode(ByteBuffer bytecode) { - this.bytecode = bytecode; - return this; - } - - public PrecompiledBuilder bytecode(byte... bytes) { - return bytecode(ByteBuffer.wrap(bytes)); - } - - public PrecompiledBuilder constantPool(Object... constantPool) { - this.constantPool = constantPool; - return this; - } - - public PrecompiledBuilder parameters(ParamDefinition... paramDefinitions) { - this.parameters = Arrays.asList(paramDefinitions); - return this; - } - - public PrecompiledBuilder functionNames(String... functionNames) { - this.functionNames = functionNames; - return this; - } - - public RulesProgram build() { - Objects.requireNonNull(bytecode, "Missing bytecode for program"); - if (constantPool == null) { - constantPool = new Object[0]; - } - - RulesFunction[] indexedFunctions; - if (functionNames == null) { - indexedFunctions = new RulesFunction[0]; - } else { - // Load the ordered list of functions and fail if any are missing. - indexedFunctions = new RulesFunction[functionNames.length]; - int i = 0; - for (var f : functionNames) { - var func = functions.get(f); - if (func == null) { - throw new UnsupportedOperationException("Rules engine program requires missing function: " + f); - } - indexedFunctions[i++] = func; - } - } - - return new RulesProgram( - extensions, - bytecode.array(), - bytecode.arrayOffset() + bytecode.position(), - bytecode.remaining(), - parameters, - indexedFunctions, - createBuiltinProvider(), - constantPool); - } - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java new file mode 100644 index 000000000..26da1cd67 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java @@ -0,0 +1,243 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.ServiceLoader; +import java.util.function.Function; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; + +/** + * Compiles and loads a rules engine used to resolve endpoints based on Smithy's rules engine traits. + */ +public final class RulesEngineBuilder { + + static final List EXTENSIONS = new ArrayList<>(); + static { + // Always include the standard builtins. + EXTENSIONS.add(new StdExtension()); + + for (var ext : ServiceLoader.load(RulesExtension.class)) { + EXTENSIONS.add(ext); + } + } + + private final List extensions = new ArrayList<>(); + private final Map functions = new LinkedHashMap<>(); + private final Map> builtinProviders = new HashMap<>(); + + public RulesEngineBuilder() { + for (var ext : EXTENSIONS) { + addExtension(ext); + } + } + + /** + * Get the registered extensions. + * + * @return the extensions on the builder. + */ + public List getExtensions() { + return extensions; + } + + /** + * Get the collected builtin providers. + * + * @return builtin-providers. + */ + public Map> getBuiltinProviders() { + return builtinProviders; + } + + /** + * Register a function with the rules engine. + * + * @param fn Function to register. + * @return the RulesEngine. + */ + public RulesEngineBuilder addFunction(RulesFunction fn) { + functions.put(fn.getFunctionName(), fn); + return this; + } + + /** + * Manually add a RulesEngineExtension to the engine that injects functions and builtins. + * + * @param extension Extension to register. + * @return the RulesEngine. + */ + public RulesEngineBuilder addExtension(RulesExtension extension) { + extensions.add(extension); + extension.putBuiltinProviders(builtinProviders); + for (var f : extension.getFunctions()) { + addFunction(f); + } + return this; + } + + /** + * Compile BDD rules into a {@link Bytecode}. + * + * @param bdd BDD Rules to compile. + * @return the compiled program. + */ + public Bytecode compile(BddTrait bdd) { + return new BytecodeCompiler(extensions, bdd, functions, builtinProviders).compile(); + } + + /** + * Load bytecode from a file path. + * + * @param path Path to the bytecode file. + * @return the loaded bytecode program. + * @throws UncheckedIOException if there's an error reading the file. + */ + public Bytecode load(Path path) { + try { + return load(Files.readAllBytes(path)); + } catch (IOException e) { + throw new UncheckedIOException("Failed to load bytecode from " + path, e); + } + } + + /** + * Load bytecode from a byte array. + * + * @param data Data to load. + * @return the loaded bytecode program. + */ + public Bytecode load(byte[] data) { + BytecodeReader reader = new BytecodeReader(data, 0); + + // Read and validate header + int magic = reader.readInt(); + if (magic != Bytecode.MAGIC) { + throw new IllegalArgumentException("Invalid magic number: " + Integer.toHexString(magic)); + } + + short version = reader.readShort(); + if (version != Bytecode.VERSION) { + throw new IllegalArgumentException("Unsupported version: " + (version >> 8) + "." + (version & 0xFF)); + } + + // Read counts + int conditionCount = reader.readShort() & 0xFFFF; + int resultCount = reader.readShort() & 0xFFFF; + int registerCount = reader.readShort() & 0xFFFF; + int constantCount = reader.readShort() & 0xFFFF; + int functionCount = reader.readShort() & 0xFFFF; + int bddNodeCount = reader.readInt(); + int bddRootRef = reader.readInt(); + + // Read offset tables + int conditionTableOffset = reader.readInt(); + int resultTableOffset = reader.readInt(); + int functionTableOffset = reader.readInt(); + int constantPoolOffset = reader.readInt(); + int bddTableOffset = reader.readInt(); + + // Load condition offsets + reader.offset = conditionTableOffset; + int[] conditionOffsets = new int[conditionCount]; + for (int i = 0; i < conditionCount; i++) { + conditionOffsets[i] = reader.readInt(); + } + + // Load result offsets + reader.offset = resultTableOffset; + int[] resultOffsets = new int[resultCount]; + for (int i = 0; i < resultCount; i++) { + resultOffsets[i] = reader.readInt(); + } + + // Load function names and resolve them using this builder's functions + reader.offset = functionTableOffset; + RulesFunction[] resolvedFunctions = loadFunctions(reader, functionCount); + + // Load register definitions (after result table) + reader.offset = resultTableOffset + (resultCount * 4); + RegisterDefinition[] registers = reader.readRegisterDefinitions(registerCount); + + // Load BDD nodes as flat array + reader.offset = bddTableOffset; + int[] bddNodes = new int[bddNodeCount * 3]; + for (int i = 0; i < bddNodeCount; i++) { + int baseIdx = i * 3; + bddNodes[baseIdx] = reader.readInt(); // varIdx + bddNodes[baseIdx + 1] = reader.readInt(); // high + bddNodes[baseIdx + 2] = reader.readInt(); // low + } + + // Find bytecode start and length + int bytecodeStart = bddTableOffset + (bddNodeCount * 12); + int bytecodeLength = constantPoolOffset - bytecodeStart; + + // Extract bytecode section (with relative offsets) + byte[] bytecode = new byte[bytecodeLength]; + System.arraycopy(data, bytecodeStart, bytecode, 0, bytecodeLength); + + // Adjust offsets to be relative to bytecode start + for (int i = 0; i < conditionCount; i++) { + conditionOffsets[i] -= bytecodeStart; + } + for (int i = 0; i < resultCount; i++) { + resultOffsets[i] -= bytecodeStart; + } + + Object[] constantPool = loadConstantPool(data, constantPoolOffset, constantCount); + + return new Bytecode( + bytecode, + conditionOffsets, + resultOffsets, + registers, + constantPool, + resolvedFunctions, + bddNodes, + bddRootRef); + } + + private RulesFunction[] loadFunctions(BytecodeReader reader, int count) { + // First, read all function names + String[] functionNames = new String[count]; + for (int i = 0; i < count; i++) { + functionNames[i] = reader.readUTF(); + } + + // Now resolve the functions in the correct order using this builder's registered functions + RulesFunction[] resolvedFunctions = new RulesFunction[count]; + for (int i = 0; i < count; i++) { + String name = functionNames[i]; + RulesFunction fn = functions.get(name); + if (fn == null) { + throw new RulesEvaluationError("Unknown function in bytecode: " + name + + ". Make sure the function is registered before loading bytecode."); + } + resolvedFunctions[i] = fn; + } + + return resolvedFunctions; + } + + private static Object[] loadConstantPool(byte[] data, int offset, int count) { + Object[] pool = new Object[count]; + BytecodeReader reader = new BytecodeReader(data, offset); + for (int i = 0; i < count; i++) { + pool[i] = reader.readConstant(); + } + return pool; + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesExtension.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesExtension.java index 22d35c66d..ca4459efe 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesExtension.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesExtension.java @@ -7,7 +7,7 @@ import java.util.List; import java.util.Map; -import java.util.function.BiFunction; +import java.util.function.Function; import software.amazon.smithy.java.client.core.endpoint.Endpoint; import software.amazon.smithy.java.context.Context; @@ -16,20 +16,18 @@ */ public interface RulesExtension { /** - * Provides custom builtin values that are used to initialize parameters. + * Mutates the given map to add name-based context-providers to the rules engine. * - * @return the builtin provider or null if there is no custom provider in this extension. + * @param providers Provides to add context providers to. */ - default BiFunction getBuiltinProvider() { - return null; - } + default void putBuiltinProviders(Map> providers) {} /** - * Gets a list of the custom functions to register with the VM. + * Gets the custom functions to register with the rules engine. * - * @return the list of functions to register. + * @return the functions to register. */ - default List getFunctions() { + default Iterable getFunctions() { return List.of(); } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesFunction.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesFunction.java index b3bc2b0a0..b40eff57f 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesFunction.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesFunction.java @@ -10,13 +10,13 @@ */ public interface RulesFunction { /** - * Get the number of operands the function requires. + * Get the number of arguments the function requires. * *

The function will be called with this many values. * - * @return the number of operands. + * @return the number of arguments. */ - int getOperandCount(); + int getArgumentCount(); /** * Get the name of the function. @@ -26,19 +26,19 @@ public interface RulesFunction { String getFunctionName(); /** - * Apply the function to the given N operands and returns the result or null. + * Apply the function to the given N arguments and returns the result or null. * - *

This is called when an operation has more than two operands. + *

This is called when an operation has more than two arguments. * - * @param operands Operands to process. + * @param arguments Arguments to process. * @return the result of the function or null. */ - default Object apply(Object... operands) { - throw new IllegalArgumentException("Invalid number of arguments: " + operands.length); + default Object apply(Object... arguments) { + throw new IllegalArgumentException("Invalid number of arguments: " + arguments.length); } /** - * Calls a function that has zero operands. + * Calls a function that has zero arguments. * * @return the result of the function or null. */ @@ -47,9 +47,9 @@ default Object apply0() { } /** - * Calls a function that has one operand. + * Calls a function that has one argument. * - * @param arg1 Operand to process. + * @param arg1 Argument to process. * @return the result of the function or null. */ default Object apply1(Object arg1) { @@ -57,10 +57,10 @@ default Object apply1(Object arg1) { } /** - * Calls a function that has two operands. + * Calls a function that has two arguments. * - * @param arg1 Operand to process. - * @param arg2 Operand to process. + * @param arg1 Argument to process. + * @param arg2 Argument to process. * @return the result of the function or null. */ default Object apply2(Object arg1, Object arg2) { diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java deleted file mode 100644 index 3d411f079..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesProgram.java +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.function.BiFunction; -import software.amazon.smithy.java.client.core.endpoint.Endpoint; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.utils.SmithyUnstableApi; - -/** - * A compiled and ready to run rules engine program. - * - *

A RulesProgram can be run any number of times and is thread-safe. A program can be serialized and later restored - * using {@code ToString}. A RulesProgram is created using a {@link RulesEngine}. - */ -public final class RulesProgram { - /** - * The version that a rules engine program was compiled with. The version of a program must be less than or equal - * to this version number. That is, older code can be run, but newer code cannot. The version is only incremented - * when things like new opcodes are added. This is a single byte that appears as the first byte in the rules - * engine bytecode. The version is a negative number to prevent accidentally treating another opcode as the version. - */ - public static final byte VERSION = -1; - - /** - * Push a value onto the stack. Must be followed by one unsigned byte representing the constant pool index. - */ - static final byte LOAD_CONST = 0; - - /** - * Push a value onto the stack. Must be followed by two bytes representing the (short) constant pool index. - */ - static final byte LOAD_CONST_W = 1; - - /** - * Peeks the value at the top of the stack and pushes it onto the register stack of a register. Must be followed - * by the one byte register index. - */ - static final byte SET_REGISTER = 2; - - /** - * Get the value of a register and push it onto the stack. Must be followed by the one byte register index. - */ - static final byte LOAD_REGISTER = 3; - - /** - * Jumps to an opcode index if the top of the stack is null or false. Must be followed by two bytes representing - * a short index position of the bytecode address. - */ - static final byte JUMP_IF_FALSEY = 4; - - /** - * Pops a value off the stack and pushes true if it is falsey (null or false), or false if not. - * - *

This implements the "not" function as an opcode. - */ - static final byte NOT = 5; - - /** - * Pops a value off the stack and pushes true if it is set (that is, not null). - * - *

This implements the "isset" function as an opcode. - */ - static final byte ISSET = 6; - - /** - * Checks if a register is set to a non-null value. - * - *

Must be followed by an unsigned byte that represents the register to check. - */ - static final byte TEST_REGISTER_ISSET = 7; - - /** - * Checks if a register is not set or set to a null value. - * - *

Must be followed by an unsigned byte that represents the register to check. - */ - static final byte TEST_REGISTER_NOT_SET = 8; - - /** - * Sets an error on the VM and exits. - * - *

Pops a single value that provides the error string to set. - */ - static final byte RETURN_ERROR = 9; - - /** - * Sets the endpoint result of the VM and exits. Pops the top of the stack, expecting a string value. The opcode - * must be followed by a byte where the first bit of the byte is on if the endpoint has headers, and the second - * bit is on if the endpoint has properties. - */ - static final byte RETURN_ENDPOINT = 10; - - /** - * Pops N values off the stack and pushes a list of those values onto the stack. Must be followed by an unsigned - * byte that defines the number of elements in the list. - */ - static final byte CREATE_LIST = 11; - - /** - * Pops N*2 values off the stack (key then value), creates a map of those values, and pushes the map onto the - * stack. Each popped key must be a string. Must be followed by an unsigned byte that defines the - * number of entries in the map. - */ - static final byte CREATE_MAP = 12; - - /** - * Resolves a template string. Must be followed by two bytes, a short, that represents the constant pool index - * that stores the StringTemplate. - * - *

The corresponding instruction has a StringTemplate that tells the VM how many values to pop off the stack. - * The popped values fill in values into the template. The resolved template value as a string is then pushed onto - * the stack. - */ - static final byte RESOLVE_TEMPLATE = 13; - - /** - * Calls a function. Must be followed by a byte to provide the function index to call. - * - *

The function pops zero or more values off the stack based on the RulesFunction registered for the index, - * and then pushes the Object result onto the stack. - */ - static final byte FN = 14; - - /** - * Pops the top level value and applies a getAttr expression on it, pushing the result onto the stack. - * - *

Must be followed by two bytes, a short, that represents the constant pool index that stores the - * AttrExpression. - */ - static final byte GET_ATTR = 15; - - /** - * Pops a value and pushes true if the value is boolean true, false if not. - */ - static final byte IS_TRUE = 16; - - /** - * Checks if a register is boolean true and pushes the result onto the stack. - * - *

Must be followed by a byte that represents the register to check. - */ - static final byte TEST_REGISTER_IS_TRUE = 17; - - /** - * Checks if a register is boolean false and pushes the result onto the stack. - * - *

Must be followed by a byte that represents the register to check. - */ - static final byte TEST_REGISTER_IS_FALSE = 18; - - /** - * Pops the value at the top of the stack and returns it from the VM. This can be used for testing purposes or - * for returning things other than endpoint values. - */ - static final byte RETURN_VALUE = 19; - - /** - * Pops the top two values off the stack and performs Objects.equals on them, pushing the result onto the stack. - */ - static final byte EQUALS = 20; - - /** - * Pops the top value off the stack, expecting a string, and extracts a substring of it, pushing the result onto - * the stack. - * - *

Must be followed by three bytes: the start position in the string, the end position in the string, and - * a byte set to 1 if the substring is "reversed" (from the end) or not. - */ - static final byte SUBSTRING = 21; - - final List extensions; - final Object[] constantPool; - final byte[] instructions; - final int instructionOffset; - final int instructionSize; - final ParamDefinition[] registerDefinitions; - final RulesFunction[] functions; - private final BiFunction builtinProvider; - private final int paramCount; // number of provided params. - - RulesProgram( - List extensions, - byte[] instructions, - int instructionOffset, - int instructionSize, - List params, - RulesFunction[] functions, - BiFunction builtinProvider, - Object[] constantPool - ) { - this.extensions = extensions; - this.instructions = instructions; - this.instructionOffset = instructionOffset; - this.instructionSize = instructionSize; - this.functions = functions; - this.builtinProvider = builtinProvider; - this.constantPool = constantPool; - - if (instructionSize < 3) { - throw new IllegalArgumentException("Invalid rules engine bytecode: too short"); - } - - var versionByte = instructions[instructionOffset]; - if (versionByte >= 0) { - throw new IllegalArgumentException("Invalid rules engine bytecode: missing version byte."); - } - - if (versionByte < VERSION) { - throw new IllegalArgumentException(String.format( - "Invalid rules engine bytecode: unsupported bytecode version %d. Up to version %d is supported." - + "Perhaps you need to update the client-rulesengine package.", - -versionByte, - -VERSION)); - } - - paramCount = instructions[instructionOffset + 1] & 0xFF; - var syntheticParamCount = instructions[instructionOffset + 2] & 0xFF; - var totalParams = paramCount + syntheticParamCount; - registerDefinitions = new ParamDefinition[totalParams]; - - if (params.size() == paramCount) { - // Given just params and not registers too. - params.toArray(registerDefinitions); - for (var i = 0; i < syntheticParamCount; i++) { - registerDefinitions[paramCount + i] = new ParamDefinition("r" + i); - } - } else if (params.size() == totalParams) { - // Given exactly the required number of parameters. Assume it was given the params and registers. - params.toArray(registerDefinitions); - } else { - throw new IllegalArgumentException("Invalid rules engine bytecode: bytecode requires " + paramCount - + " parameters, but provided " + params.size()); - } - } - - /** - * Runs the rules engine program and resolves an endpoint. - * - * @param context Context used during evaluation. - * @param parameters Rules engine parameters. - * @return the resolved Endpoint. - * @throws RulesEvaluationError if the program fails during evaluation. - */ - public Endpoint resolveEndpoint(Context context, Map parameters) { - return run(context, parameters); - } - - /** - * Runs the rules engine program. - * - * @param context Context used during evaluation. - * @param parameters Rules engine parameters. - * @return the rules engine result. - * @throws RulesEvaluationError if the program fails during evaluation. - */ - public T run(Context context, Map parameters) { - for (var e : parameters.entrySet()) { - EndpointUtils.verifyObject(e.getValue()); - } - var vm = new RulesVm(context, this, parameters, builtinProvider); - return vm.evaluate(); - } - - /** - * Get the program's content pool. - * - * @return the constant pool. Do not modify. - */ - @SmithyUnstableApi - public Object[] getConstantPool() { - return constantPool; - } - - /** - * Get the program's parameters. - * - * @return the parameters. - */ - @SmithyUnstableApi - public List getParamDefinitions() { - List result = new ArrayList<>(); - for (var i = 0; i < paramCount; i++) { - result.add(registerDefinitions[i]); - } - return result; - } - - private enum Show { - CONST, FN, REGISTER - } - - @Override - public String toString() { - StringBuilder s = new StringBuilder(); - - // Write the registry values in index order. - if (registerDefinitions.length > 0) { - s.append("Registers:\n"); - int i = 0; - for (var r : registerDefinitions) { - s.append(" ").append(i++).append(": "); - s.append(r); - s.append("\n"); - } - s.append("\n"); - } - - if (constantPool.length > 0) { - s.append("Constants:\n"); - var i = 0; - for (var c : constantPool) { - s.append(" ").append(i++).append(": "); - if (c instanceof StringTemplate) { - s.append("Template"); - } else if (c instanceof AttrExpression) { - s.append("AttrExpression"); - } else { - s.append(c.getClass().getSimpleName()); - } - s.append(": ").append(c).append("\n"); - } - s.append("\n"); - } - - // Write the required function names, in index order. - if (functions.length > 0) { - var i = 0; - s.append("Functions:\n"); - for (var f : functions) { - s.append(" ").append(i++).append(": ").append(f.getFunctionName()).append("\n"); - } - s.append("\n"); - } - - // Write the instructions. - s.append("Instructions: (version=").append(-instructions[instructionOffset]).append(")\n"); - - // Skip version, param count, synthetic param count bytes. - for (var i = instructionOffset + 3; i < instructionSize; i++) { - i = writeInstruction(s, i); - } - - return s.toString(); - } - - /** - * Allows dumping out a specific instruction at the given bytecode position. - * - * @param pc Bytecode instruction position. - * @return the instruction as a debug string. - */ - public String writeInstruction(int pc) { - StringBuilder s = new StringBuilder(); - writeInstruction(s, pc); - return s.toString(); - } - - private int writeInstruction(StringBuilder s, int pc) { - s.append(" "); - s.append(String.format("%03d", pc)); - s.append(": "); - - var skip = 0; - Show show = null; - var name = switch (instructions[pc]) { - case LOAD_CONST -> { - skip = 1; - show = Show.CONST; - yield "LOAD_CONST"; - } - case LOAD_CONST_W -> { - skip = 2; - show = Show.CONST; - yield "LOAD_CONST_W"; - } - case SET_REGISTER -> { - skip = 1; - show = Show.REGISTER; - yield "SET_REGISTER"; - } - case LOAD_REGISTER -> { - skip = 1; - show = Show.REGISTER; - yield "LOAD_REGISTER"; - } - case JUMP_IF_FALSEY -> { - skip = 2; - yield "JUMP_IF_FALSEY"; - } - case NOT -> "NOT"; - case ISSET -> "ISSET"; - case TEST_REGISTER_ISSET -> { - skip = 1; - show = Show.REGISTER; - yield "TEST_REGISTER_ISSET"; - } - case TEST_REGISTER_NOT_SET -> { - skip = 1; - show = Show.REGISTER; - yield "TEST_REGISTER_NOT_SET"; - } - case RETURN_ERROR -> "RETURN_ERROR"; - case RETURN_ENDPOINT -> { - skip = 1; - yield "RETURN_ENDPOINT"; - } - case CREATE_LIST -> { - skip = 1; - yield "CREATE_LIST"; - } - case CREATE_MAP -> { - skip = 1; - yield "CREATE_MAP"; - } - case RESOLVE_TEMPLATE -> { - skip = 2; - show = Show.CONST; - yield "RESOLVE_TEMPLATE"; - } - case FN -> { - skip = 1; - show = Show.FN; - yield "FN"; - } - case GET_ATTR -> { - skip = 2; - show = Show.CONST; - yield "GET_ATTR"; - } - case IS_TRUE -> "IS_TRUE"; - case TEST_REGISTER_IS_TRUE -> { - skip = 1; - show = Show.REGISTER; - yield "TEST_REGISTER_IS_TRUE"; - } - case TEST_REGISTER_IS_FALSE -> { - skip = 1; - show = Show.REGISTER; - yield "TEST_REGISTER_IS_FALSE"; - } - case RETURN_VALUE -> "RETURN_VALUE"; - case EQUALS -> "EQUALS"; - case SUBSTRING -> { - skip = 3; - yield "SUBSTRING"; - } - default -> "?" + instructions[pc]; - }; - - appendName(s, name); - - int positionToShow = -1; - if (skip == 1) { - positionToShow = appendByte(s, pc); - pc++; - } else if (skip == 2) { - positionToShow = appendShort(s, pc); - pc += 2; - } else if (skip == 3) { - appendByte(s, pc); - appendByte(s, pc + 1); - appendByte(s, pc + 2); - pc += 3; - } - - if (positionToShow > -1 && show != null) { - switch (show) { - case CONST -> { - s.append(" "); - s.append(constantPool[positionToShow]); - } - case FN -> { - s.append(" "); - s.append(functions[positionToShow].getFunctionName()); - } - case REGISTER -> { - s.append(" "); - s.append(registerDefinitions[positionToShow].name()); - } - } - } - - s.append("\n"); - return pc; - } - - private void appendName(StringBuilder s, String name) { - s.append(String.format("%-22s ", name)); - } - - private int appendByte(StringBuilder s, int i) { - int result = -1; - if (instructions.length > i + 1) { - result = instructions[i + 1] & 0xFF; - s.append(String.format("%-8d ", result)); - } else { - s.append(" ??"); - } - return result; - } - - private int appendShort(StringBuilder s, int i) { - var result = -1; - // it's a two-byte unsigned short. - if (instructions.length > i + 2) { - result = EndpointUtils.bytesToShort(instructions, i + 1); - s.append(String.format("%-8d ", result)); - } else { - s.append(" ??"); - } - return result; - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java deleted file mode 100644 index 07eb9f6c7..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesVm.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.BiFunction; -import software.amazon.smithy.java.client.core.endpoint.Endpoint; -import software.amazon.smithy.java.client.core.endpoint.EndpointContext; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.java.logging.InternalLogger; -import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring; - -final class RulesVm { - - private static final InternalLogger LOGGER = InternalLogger.getLogger(RulesVm.class); - - // Make number of URIs to cache in the thread-local cache. - private static final int MAX_CACHE_SIZE = 32; - - // Caches up to 32 previously parsed URIs in a thread-local LRU cache. - private static final ThreadLocal> URI_LRU_CACHE = ThreadLocal.withInitial(() -> { - return new LinkedHashMap<>(16, 0.75f, true) { - @Override - protected boolean removeEldestEntry(Map.Entry eldest) { - return size() > MAX_CACHE_SIZE; - } - }; - }); - - // Minimum size for temp arrays when it's lazily allocated. - private static final int MIN_TEMP_ARRAY_SIZE = 8; - - // Temp array used during evaluation. - private Object[] tempArray = new Object[8]; - private int tempArraySize = 8; - - private final Context context; - private final RulesProgram program; - private final Object[] registers; - private final BiFunction builtinProvider; - private final byte[] instructions; - private Object[] stack = new Object[8]; - private int stackPosition = 0; - private int pc; - private final boolean debugLoggingEnabled = LOGGER.isDebugEnabled(); - - RulesVm( - Context context, - RulesProgram program, - Map parameters, - BiFunction builtinProvider - ) { - this.context = context; - this.program = program; - this.instructions = program.instructions; - this.builtinProvider = builtinProvider; - - // Copy the registers to not continuously push to their stack. - registers = new Object[program.registerDefinitions.length]; - for (var i = 0; i < program.registerDefinitions.length; i++) { - var definition = program.registerDefinitions[i]; - var provided = parameters.get(definition.name()); - if (provided != null) { - registers[i] = provided; - } else { - initializeRegister(context, i, definition); - } - } - } - - @SuppressWarnings("unchecked") - T evaluate() { - try { - return (T) run(); - } catch (ClassCastException e) { - throw createError("Unexpected value type encountered while evaluating rules engine", e); - } catch (ArrayIndexOutOfBoundsException e) { - throw createError("Malformed bytecode encountered while evaluating rules engine", e); - } catch (NullPointerException e) { - throw createError("Rules engine encountered an unexpected null value", e); - } - } - - private RulesEvaluationError createError(String message, RuntimeException e) { - var report = message + ". Encountered at address " + pc + " of program"; - throw new RulesEvaluationError(report, e); - } - - void initializeRegister(Context context, int index, ParamDefinition definition) { - if (definition.defaultValue() != null) { - registers[index] = definition.defaultValue(); - return; - } - - if (definition.builtin() != null) { - var builtinValue = builtinProvider.apply(definition.builtin(), context); - if (builtinValue != null) { - registers[index] = builtinValue; - return; - } - } - - if (definition.required()) { - throw new RulesEvaluationError("Required rules engine parameter missing: " + definition.name()); - } - } - - private void push(Object value) { - if (stackPosition == stack.length) { - resizeStack(); - } - stack[stackPosition++] = value; - } - - private void resizeStack() { - int newCapacity = stack.length + (stack.length >> 1); - Object[] newStack = new Object[newCapacity]; - System.arraycopy(stack, 0, newStack, 0, stack.length); - stack = newStack; - } - - /* - * Implementation notes: - * 1. Read an unsigned short into an int from two bytes: - * ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF) - * 2. Read an unsigned byte into an int from a byte: - * X & 0xFF. For example instructions[++pc] & 0xFF. - * 3. The program counter, pc, is often incremented using "++" while reading it. - * 4. Avoid auto-boxing booleans and instead use `b ? Boolean.TRUE : Boolean.FALSE`. This eliminates the implicit - * call to Boolean.valueOf. - */ - @SuppressWarnings("unchecked") - private Object run() { - final var instructionSize = program.instructionSize; - final var constantPool = program.constantPool; - final var instructions = this.instructions; - final var registers = this.registers; - - // Skip version, params, and register bytes. - for (pc = program.instructionOffset + 3; pc < instructionSize; pc++) { - switch (instructions[pc]) { - case RulesProgram.LOAD_CONST -> { - push(constantPool[instructions[++pc] & 0xFF]); // read unsigned byte - } - case RulesProgram.LOAD_CONST_W -> { - // Read a two-byte unsigned short. - final int constIdx = ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); - push(constantPool[constIdx]); - pc += 2; - } - case RulesProgram.SET_REGISTER -> { - registers[instructions[++pc] & 0xFF] = stack[stackPosition - 1]; - } - case RulesProgram.LOAD_REGISTER -> { - push(registers[instructions[++pc] & 0xFF]); // read unsigned byte - } - case RulesProgram.JUMP_IF_FALSEY -> { - final Object value = stack[--stackPosition]; - if (value == null || value == Boolean.FALSE) { - // Read a two-byte unsigned short. - final int jumpTarget = ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); - pc = jumpTarget - 1; - if (debugLoggingEnabled) { - logDebugJump(jumpTarget); - } - } else { - pc += 2; - } - } - case RulesProgram.NOT -> { - push(stack[--stackPosition] == Boolean.FALSE ? Boolean.TRUE : Boolean.FALSE); - } - case RulesProgram.ISSET -> { - push(stack[--stackPosition] != null ? Boolean.TRUE : Boolean.FALSE); - } - case RulesProgram.TEST_REGISTER_ISSET -> { - push(registers[instructions[++pc] & 0xFF] != null ? Boolean.TRUE : Boolean.FALSE); - } - case RulesProgram.TEST_REGISTER_NOT_SET -> { - push(registers[instructions[++pc] & 0xFF] == null ? Boolean.TRUE : Boolean.FALSE); - } - case RulesProgram.RETURN_ERROR -> { - throw new RulesEvaluationError((String) stack[--stackPosition], pc); - } - case RulesProgram.RETURN_ENDPOINT -> { - final var packed = instructions[++pc]; - final boolean hasHeaders = (packed & 1) != 0; - final boolean hasProperties = (packed & 2) != 0; - final var urlString = (String) stack[--stackPosition]; - final var properties = (Map) (hasProperties ? stack[--stackPosition] : Map.of()); - final var headers = (Map>) (hasHeaders ? stack[--stackPosition] : Map.of()); - final var builder = Endpoint.builder().uri(createUri(urlString)); - if (!headers.isEmpty()) { - builder.putProperty(EndpointContext.HEADERS, headers); - } - for (var extension : program.extensions) { - extension.extractEndpointProperties(builder, context, properties, headers); - } - return builder.build(); - } - case RulesProgram.CREATE_LIST -> { - final var size = instructions[++pc] & 0xFF; - push(switch (size) { - case 0 -> List.of(); - case 1 -> Collections.singletonList(stack[--stackPosition]); - default -> { - var values = new Object[size]; - for (var i = size - 1; i >= 0; i--) { - values[i] = stack[--stackPosition]; - } - yield Arrays.asList(values); - } - }); - } - case RulesProgram.CREATE_MAP -> { - final var size = instructions[++pc] & 0xFF; - push(switch (size) { - case 0 -> Map.of(); - case 1 -> Map.of((String) stack[--stackPosition], stack[--stackPosition]); - default -> { - Map map = new HashMap<>((int) (size / 0.75f) + 1); // Avoid rehashing - for (var i = 0; i < size; i++) { - map.put((String) stack[--stackPosition], stack[--stackPosition]); - } - yield map; - } - }); - } - case RulesProgram.RESOLVE_TEMPLATE -> { - // Read a two-byte unsigned short. - final int constIdx = ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); - final var template = (StringTemplate) constantPool[constIdx]; - final var expressionCount = template.expressionCount(); - final var temp = getTempArray(expressionCount); - for (var i = 0; i < expressionCount; i++) { - temp[i] = stack[--stackPosition]; - } - push(template.resolve(expressionCount, temp)); - pc += 2; - } - case RulesProgram.FN -> { - final var fn = program.functions[instructions[++pc] & 0xFF]; // read unsigned byte - push(switch (fn.getOperandCount()) { - case 0 -> fn.apply0(); - case 1 -> fn.apply1(stack[--stackPosition]); - case 2 -> { - Object b = stack[--stackPosition]; - Object a = stack[--stackPosition]; - yield fn.apply2(a, b); - } - default -> { - // Pop arguments from stack in reverse order. - var temp = getTempArray(fn.getOperandCount()); - for (int i = fn.getOperandCount() - 1; i >= 0; i--) { - temp[i] = stack[--stackPosition]; - } - yield fn.apply(temp); - } - }); - } - case RulesProgram.GET_ATTR -> { - // Read a two-byte unsigned short. - final int constIdx = ((instructions[pc + 2] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); - AttrExpression getAttr = (AttrExpression) program.constantPool[constIdx]; - final var target = stack[--stackPosition]; - push(getAttr.apply(target)); - pc += 2; - } - case RulesProgram.IS_TRUE -> { - push(stack[--stackPosition] == Boolean.TRUE ? Boolean.TRUE : Boolean.FALSE); - } - case RulesProgram.TEST_REGISTER_IS_TRUE -> { - push(registers[instructions[++pc] & 0xFF] == Boolean.TRUE ? Boolean.TRUE : Boolean.FALSE); - } - case RulesProgram.TEST_REGISTER_IS_FALSE -> { - push(registers[instructions[++pc] & 0xFF] == Boolean.FALSE ? Boolean.TRUE : Boolean.FALSE); - } - case RulesProgram.RETURN_VALUE -> { - return stack[--stackPosition]; - } - case RulesProgram.EQUALS -> { - push(Objects.equals(stack[--stackPosition], stack[--stackPosition])); - } - case RulesProgram.SUBSTRING -> { - final var string = (String) stack[--stackPosition]; - final var start = instructions[++pc] & 0xFF; - final var end = instructions[++pc] & 0xFF; - final var reverse = (instructions[++pc] & 0xFF) != 0 ? Boolean.TRUE : Boolean.FALSE; - push(Substring.getSubstring(string, start, end, reverse)); - } - default -> { - throw new RulesEvaluationError("Unknown rules engine instruction: " + instructions[pc]); - } - } - } - - throw new RulesEvaluationError("No value returned from rules engine"); - } - - private void logDebugJump(int jumpTarget) { - LOGGER.debug("VM jumping from {} to {}", pc, jumpTarget); - LOGGER.debug(" - Stack ({}): {}", stackPosition, Arrays.toString(stack)); - LOGGER.debug(" - Registers: {}", Arrays.toString(registers)); - } - - public static URI createUri(String uriStr) { - var cache = URI_LRU_CACHE.get(); - var uri = cache.get(uriStr); - if (uri == null) { - try { - uri = new URI(uriStr); - } catch (URISyntaxException e) { - throw new RulesEvaluationError("Error creating URI: " + e.getMessage(), e); - } - cache.put(uriStr, uri); - } - return uri; - } - - private Object[] getTempArray(int requiredSize) { - if (tempArraySize < requiredSize) { - resizeTempArray(requiredSize); - } - return tempArray; - } - - private void resizeTempArray(int requiredSize) { - // Resize to a power of two. - int newSize = MIN_TEMP_ARRAY_SIZE; - while (newSize < requiredSize) { - newSize <<= 1; - } - - tempArray = new Object[newSize]; - tempArraySize = newSize; - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StdExtension.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StdExtension.java new file mode 100644 index 000000000..14ba4f5a2 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StdExtension.java @@ -0,0 +1,21 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.util.Map; +import java.util.function.Function; +import software.amazon.smithy.java.client.core.ClientContext; +import software.amazon.smithy.java.context.Context; + +final class StdExtension implements RulesExtension { + @Override + public void putBuiltinProviders(Map> providers) { + providers.put("SDK::Endpoint", ctx -> { + var result = ctx.get(ClientContext.CUSTOM_ENDPOINT); + return result == null ? null : result.uri().toString(); + }); + } +} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java deleted file mode 100644 index bcd731355..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Stdlib.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Objects; -import software.amazon.smithy.java.client.core.ClientContext; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.java.io.uri.URLEncoding; -import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsValidHostLabel; - -/** - * Implements stdlib functions of the rules engine that weren't promoted to opcodes (GetAttr, isset, not, substring). - */ -enum Stdlib implements RulesFunction { - // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#stringequals-function - STRING_EQUALS("stringEquals", 2) { - @Override - public Object apply2(Object a, Object b) { - return Objects.equals(EndpointUtils.castFnArgument(a, String.class, "stringEquals", 1), - EndpointUtils.castFnArgument(b, String.class, "stringEquals", 2)); - } - }, - - // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#booleanequals-function - BOOLEAN_EQUALS("booleanEquals", 2) { - @Override - public Object apply2(Object a, Object b) { - return Objects.equals(EndpointUtils.castFnArgument(a, Boolean.class, "booleanEquals", 1), - EndpointUtils.castFnArgument(b, Boolean.class, "booleanEquals", 2)); - } - }, - - // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#isvalidhostlabel-function - IS_VALID_HOST_LABEL("isValidHostLabel", 2) { - @Override - public Object apply2(Object arg1, Object arg2) { - var hostLabel = EndpointUtils.castFnArgument(arg1, String.class, "isValidHostLabel", 1); - var allowDots = EndpointUtils.castFnArgument(arg2, Boolean.class, "isValidHostLabel", 2); - return IsValidHostLabel.isValidHostLabel(hostLabel, Boolean.TRUE.equals(allowDots)); - } - }, - - // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#parseurl-function - PARSE_URL("parseURL", 1) { - @Override - public Object apply1(Object arg) { - if (arg == null) { - return null; - } - - try { - var result = new URI(EndpointUtils.castFnArgument(arg, String.class, "parseURL", 1)); - if (null != result.getRawQuery()) { - // "If the URL given contains a query portion, the URL MUST be rejected and the function MUST - // return an empty optional." - return null; - } - return result; - } catch (URISyntaxException e) { - throw new RulesEvaluationError("Error parsing URI in endpoint rule parseURL method", e); - } - } - }, - - // https://smithy.io/2.0/additional-specs/rules-engine/standard-library.html#uriencode-function - URI_ENCODE("uriEncode", 1) { - @Override - public Object apply1(Object arg) { - var str = EndpointUtils.castFnArgument(arg, String.class, "uriEncode", 1); - return URLEncoding.encodeUnreserved(str, false); - } - }; - - private final String name; - private final int operands; - - Stdlib(String name, int operands) { - this.name = name; - this.operands = operands; - } - - @Override - public int getOperandCount() { - return operands; - } - - @Override - public String getFunctionName() { - return name; - } - - static Object standardBuiltins(String name, Context context) { - if (name.equals("SDK::Endpoint")) { - var result = context.get(ClientContext.CUSTOM_ENDPOINT); - if (result != null) { - return result.uri().toString(); - } - } - return null; - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StringTemplate.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StringTemplate.java deleted file mode 100644 index f5844d314..000000000 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/StringTemplate.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import java.util.Arrays; -import java.util.Objects; -import java.util.function.Consumer; -import software.amazon.smithy.rulesengine.language.evaluation.value.Value; -import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; -import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; - -/** - * Similar to {@link Template}, but built around Object instead of {@link Value}. - */ -final class StringTemplate { - - private static final ThreadLocal STRING_BUILDER = ThreadLocal.withInitial( - () -> new StringBuilder(64)); - - private final String template; - private final Object[] parts; - private final int expressionCount; - private final Expression singularExpression; - - StringTemplate(String template, Object[] parts, int expressionCount, Expression singularExpression) { - this.template = template; - this.parts = parts; - this.expressionCount = expressionCount; - this.singularExpression = singularExpression; - } - - int expressionCount() { - return expressionCount; - } - - Expression singularExpression() { - return singularExpression; - } - - /** - * Calls a consumer for every expression in the template. - * - * @param consumer consumer that accepts each expression. - */ - void forEachExpression(Consumer consumer) { - for (int i = parts.length - 1; i >= 0; i--) { - var part = parts[i]; - if (part instanceof Expression e) { - consumer.accept(e); - } - } - } - - String resolve(int arraySize, Object[] strings) { - if (arraySize != expressionCount) { - throw new RulesEvaluationError("Missing template parameters for a string template `" - + template + "`. Given: [" + Arrays.asList(strings) + ']'); - } - - var result = STRING_BUILDER.get(); - result.setLength(0); - int paramIndex = 0; - for (var part : parts) { - if (part == null) { - throw new RulesEvaluationError("Missing part of template " + template + " at part " + paramIndex); - } else if (part.getClass() == String.class) { - result.append((String) part); // we know parts are either strings or Expressions. - } else { - result.append(strings[paramIndex++]); - } - } - - return result.toString(); - } - - static StringTemplate from(Template template) { - var templateParts = template.getParts(); - Object[] parts = new Object[templateParts.size()]; - int expressionCount = 0; - for (var i = 0; i < templateParts.size(); i++) { - var part = templateParts.get(i); - if (part instanceof Template.Dynamic d) { - expressionCount++; - parts[i] = d.toExpression(); - } else { - parts[i] = part.toString(); - } - } - var singularExpression = (expressionCount == 1 && parts.length == 1) ? (Expression) parts[0] : null; - return new StringTemplate(template.toString(), parts, expressionCount, singularExpression); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } else if (o == null || getClass() != o.getClass()) { - return false; - } else { - StringTemplate that = (StringTemplate) o; - return expressionCount == that.expressionCount - && Objects.equals(template, that.template) - && Objects.deepEquals(parts, that.parts); - } - } - - @Override - public int hashCode() { - return Objects.hash(template, Arrays.hashCode(parts)); - } - - @Override - public String toString() { - return "StringTemplate[template=\"" + template + "\"]"; - } -} diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/UriFactory.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/UriFactory.java new file mode 100644 index 000000000..3f6fffdc3 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/UriFactory.java @@ -0,0 +1,66 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import java.net.URI; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * LRU cache for URI parsing. + * + *

Maintains a hot slot for the most recently accessed URI to avoid hash computation and LinkedHashMap traversal. + */ +final class UriFactory extends LinkedHashMap { + + private static final int DEFAULT_MAX_SIZE = 32; + private final int maxSize; + + private String hotKey; + private URI hotValue; + + UriFactory() { + this(DEFAULT_MAX_SIZE); + } + + UriFactory(int maxSize) { + super(16, 0.75f, true); + this.maxSize = maxSize; + } + + @Override + protected boolean removeEldestEntry(Map.Entry eldest) { + return size() > maxSize; + } + + URI createUri(String uri) { + if (uri == null) { + return null; + } + + if (uri.equals(hotKey)) { + return hotValue; + } + + // Fall back to full LRU cache + URI result = get(uri); + if (result == null) { + try { + result = URI.create(uri); + put(uri, result); + } catch (IllegalArgumentException ignored) { + // Don't cache invalid URIs in hot slot + return null; + } + } + + // Update hot-key cache + hotKey = uri; + hotValue = result; + + return result; + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/AttrExpressionTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/AttrExpressionTest.java deleted file mode 100644 index 52a058578..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/AttrExpressionTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; - -import java.net.URI; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; - -public class AttrExpressionTest { - @ParameterizedTest - @MethodSource("getAttrProvider") - public void getsAttr(String template, Object value, Object expected) { - var getAttr = AttrExpression.parse(template); - var result = getAttr.apply(value); - - assertThat(template, result, equalTo(expected)); - assertThat(template, equalTo(getAttr.toString())); - } - - public static List getAttrProvider() throws Exception { - Map mapWithNull = new HashMap<>(); - mapWithNull.put("foo", null); - - return List.of( - Arguments.of("foo", Map.of("foo", "bar"), "bar"), - Arguments.of("foo.bar", Map.of("foo", Map.of("bar", "baz")), "baz"), - Arguments.of("foo.bar.baz", Map.of("foo", Map.of("bar", Map.of("baz", "qux"))), "qux"), - Arguments.of("foo.bar[0]", Map.of("foo", Map.of("bar", List.of("baz"))), "baz"), - Arguments.of("foo[0]", Map.of("foo", List.of("bar")), "bar"), - Arguments.of("foo", Map.of("foo", "bar"), "bar"), - Arguments.of("isIp", new URI("https://localhost:8080"), false), - Arguments.of("scheme", new URI("https://localhost:8080"), "https"), - Arguments.of("foo[2]", Map.of("foo", List.of("bar")), null), - Arguments.of("foo", null, null), - Arguments.of("foo[0]", mapWithNull, null), - Arguments.of("foo[0]", Map.of("foo", Map.of("bar", "baz")), null)); - } -} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java index b26f84b1f..c66467f37 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java @@ -22,42 +22,50 @@ import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.model.traits.Trait; import software.amazon.smithy.rulesengine.language.EndpointRuleSet; +import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; +import software.amazon.smithy.rulesengine.logic.cfg.Cfg; import software.amazon.smithy.utils.IoUtils; public class EndpointRulesPluginTest { @Test public void addsEndpointResolver() { var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); - var program = new RulesEngine().compile(EndpointRuleSet.fromNode(Node.parse(contents))); + Cfg cfg = Cfg.from(EndpointRuleSet.fromNode(Node.parse(contents))); + BddTrait bdd = BddTrait.from(cfg); + var program = new RulesEngineBuilder().compile(bdd); var plugin = EndpointRulesPlugin.from(program); var builder = ClientConfig.builder(); plugin.configureClient(builder); - assertThat(builder.endpointResolver(), instanceOf(EndpointRulesResolver.class)); + assertThat(builder.endpointResolver(), instanceOf(BytecodeEndpointResolver.class)); } @Test public void doesNotModifyExistingResolver() { var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); - var program = new RulesEngine().compile(EndpointRuleSet.fromNode(Node.parse(contents))); + Cfg cfg = Cfg.from(EndpointRuleSet.fromNode(Node.parse(contents))); + BddTrait bdd = BddTrait.from(cfg); + var program = new RulesEngineBuilder().compile(bdd); var plugin = EndpointRulesPlugin.from(program); var builder = ClientConfig.builder().endpointResolver(EndpointResolver.staticHost("foo.com")); plugin.configureClient(builder); - assertThat(builder.endpointResolver(), not(instanceOf(EndpointRulesResolver.class))); + assertThat(builder.endpointResolver(), not(instanceOf(BytecodeEndpointResolver.class))); } @Test public void modifiesResolverIfCustomEndpointSet() { var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); - var program = new RulesEngine().compile(EndpointRuleSet.fromNode(Node.parse(contents))); + Cfg cfg = Cfg.from(EndpointRuleSet.fromNode(Node.parse(contents))); + BddTrait bdd = BddTrait.from(cfg); + var program = new RulesEngineBuilder().compile(bdd); var plugin = EndpointRulesPlugin.from(program); var builder = ClientConfig.builder() .endpointResolver(EndpointResolver.staticHost("foo.com")) .putConfig(ClientContext.CUSTOM_ENDPOINT, Endpoint.builder().uri("https://example.com").build()); plugin.configureClient(builder); - assertThat(builder.endpointResolver(), instanceOf(EndpointRulesResolver.class)); + assertThat(builder.endpointResolver(), instanceOf(BytecodeEndpointResolver.class)); } @Test @@ -83,6 +91,6 @@ public void loadsRulesFromServiceSchemaTraits() { var builder = ClientConfig.builder().service(api); builder.applyPlugin(plugin); - assertThat(builder.endpointResolver(), instanceOf(EndpointRulesResolver.class)); + assertThat(builder.endpointResolver(), instanceOf(BytecodeEndpointResolver.class)); } } diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java deleted file mode 100644 index 42c8277b3..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesResolverTest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.instanceOf; - -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletionException; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; -import software.amazon.smithy.java.core.schema.ApiOperation; -import software.amazon.smithy.java.core.schema.ApiService; -import software.amazon.smithy.java.core.schema.Schema; -import software.amazon.smithy.java.core.schema.SerializableStruct; -import software.amazon.smithy.java.core.schema.ShapeBuilder; -import software.amazon.smithy.java.core.serde.ShapeSerializer; -import software.amazon.smithy.java.core.serde.TypeRegistry; -import software.amazon.smithy.model.node.Node; -import software.amazon.smithy.model.shapes.ShapeId; -import software.amazon.smithy.model.traits.Trait; -import software.amazon.smithy.rulesengine.traits.StaticContextParamDefinition; -import software.amazon.smithy.rulesengine.traits.StaticContextParamsTrait; - -public class EndpointRulesResolverTest { - @Test - public void resolvesEndpointWithoutStaticParams() { - EndpointResolverParams params = EndpointResolverParams.builder() - .inputValue(getInput()) - .operation(getOperation(Map.of())) - .build(); - - var program = new RulesEngine().precompiledBuilder() - .bytecode( - RulesProgram.VERSION, - (byte) 0, - (byte) 0, - RulesProgram.LOAD_CONST, - (byte) 0, - RulesProgram.RETURN_ENDPOINT, - (byte) 0) - .constantPool("https://example.com") - .build(); - var resolver = new EndpointRulesResolver(program); - var result = resolver.resolveEndpoint(params).join(); - - assertThat(result.uri().toString(), equalTo("https://example.com")); - } - - private SerializableStruct getInput() { - return new SerializableStruct() { - @Override - public Schema schema() { - return null; - } - - @Override - public void serializeMembers(ShapeSerializer serializer) {} - - @Override - public T getMemberValue(Schema member) { - return null; - } - }; - } - - private ApiOperation getOperation( - Map staticParams - ) { - return new ApiOperation<>() { - @Override - public ShapeBuilder inputBuilder() { - return null; - } - - @Override - public ShapeBuilder outputBuilder() { - return null; - } - - @Override - public Schema schema() { - Trait[] traits = null; - if (staticParams != null) { - traits = new Trait[] { - StaticContextParamsTrait - .builder() - .parameters(staticParams) - .build() - }; - } else { - traits = new Trait[0]; - } - return Schema.createOperation(ShapeId.from("smithy.example#Foo"), traits); - } - - @Override - public Schema inputSchema() { - return Schema.structureBuilder(ShapeId.from("smithy.example#FooInput")).build(); - } - - @Override - public Schema outputSchema() { - return Schema.structureBuilder(ShapeId.from("smithy.example#FooOutput")).build(); - } - - @Override - public TypeRegistry errorRegistry() { - return null; - } - - @Override - public List effectiveAuthSchemes() { - return List.of(); - } - - @Override - public ApiService service() { - return null; - } - }; - } - - @Test - public void resolvesEndpointWithStaticParams() { - var op = getOperation(Map.of("foo", - StaticContextParamDefinition.builder() - .value(Node.from("https://foo.com")) - .build())); - EndpointResolverParams params = EndpointResolverParams.builder() - .inputValue(getInput()) - .operation(op) - .build(); - - var program = new RulesEngine().precompiledBuilder() - .bytecode( - RulesProgram.VERSION, - (byte) 1, - (byte) 0, - RulesProgram.LOAD_REGISTER, // load foo - (byte) 0, - RulesProgram.RETURN_ENDPOINT, - (byte) 0) - .constantPool("https://example.com") - .parameters(new ParamDefinition("foo", false, null, null)) - .build(); - var resolver = new EndpointRulesResolver(program); - var result = resolver.resolveEndpoint(params).join(); - - assertThat(result.uri().toString(), equalTo("https://foo.com")); - } - - @Test - public void returnsCfInsteadOfThrowingOnError() { - EndpointResolverParams params = EndpointResolverParams.builder() - .inputValue(getInput()) - .operation(getOperation(Map.of())) - .build(); - - var program = new RulesEngine().precompiledBuilder() - .bytecode( - RulesProgram.VERSION, - (byte) 1, - (byte) 0) - .constantPool("https://example.com") - .parameters(new ParamDefinition("foo", false, null, null)) - .build(); - var resolver = new EndpointRulesResolver(program); - var result = resolver.resolveEndpoint(params); - - try { - result.join(); - Assertions.fail("Expected to throw"); - } catch (CompletionException e) { - assertThat(e.getCause(), instanceOf(RulesEvaluationError.class)); - } - } -} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java deleted file mode 100644 index e392f61f1..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; - -import java.net.URI; -import java.util.List; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.CsvSource; -import org.junit.jupiter.params.provider.MethodSource; -import software.amazon.smithy.model.node.Node; -import software.amazon.smithy.rulesengine.language.evaluation.value.EndpointValue; -import software.amazon.smithy.rulesengine.language.evaluation.value.Value; -import software.amazon.smithy.rulesengine.language.syntax.Identifier; -import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; -import software.amazon.smithy.utils.Pair; - -public class EndpointUtilsTest { - @ParameterizedTest - @MethodSource("verifyObjectProvider") - public void verifiesObjects(Object value, boolean isValid) { - try { - EndpointUtils.verifyObject(value); - if (!isValid) { - Assertions.fail("Expected " + value + " to fail"); - } - } catch (UnsupportedOperationException e) { - if (isValid) { - throw e; - } - } - } - - public static List verifyObjectProvider() throws Exception { - return List.of( - Arguments.of("hi", true), - Arguments.of(1, true), - Arguments.of(true, true), - Arguments.of(false, true), - Arguments.of(StringTemplate.from(Template.fromString("https://foo.com")), true), - Arguments.of(new URI("/"), true), - Arguments.of(List.of(true, 1), true), - Arguments.of(Map.of("hi", List.of(true, List.of("a"))), true), - // Invalid - Arguments.of(Pair.of("a", "b"), false), - Arguments.of(List.of(Pair.of("a", "b")), false), - Arguments.of(Map.of(1, 1), false), - Arguments.of(Map.of("a", Pair.of("a", "b")), false)); - } - - @ParameterizedTest - @CsvSource({ - // Test cases for valid IP addresses - "'http://192.168.1.1/index.html', true", - "'https://192.168.1.1:8080/path', true", - "'http://127.0.0.1/', true", - "'https://255.255.255.255/', true", - "'http://0.0.0.0/', true", - "'https://1.2.3.4:8443/path?query=value', true", - "'http://10.0.0.1', true", - "'https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/', true", - "'http://[::1]/', true", - "'https://[fe80::1ff:fe23:4567:890a]:8443/', true", - "'https://[2001:db8::1]', true", - // Test cases for non-IP hostnames - "'http://example.com/', false", - "'https://www.google.com/search?q=test', false", - "'http://subdomain.example.org:8080/path', false", - "'https://localhost/test', false", - // Test cases for invalid IP formats - "'http://192.168.1/incomplete', false", - "'https://256.1.1.1/invalid', false", - "'http://1.2.3.4.5/toomanyparts', false", - "'https://192.168.1.a/invalid', false", - "'http://a.b.c.d/notdigits', false", - "'https://192.168.1.256/outofrange', false", - // Additional domain test cases - "'https://domain-with-hyphens.com/', false", - "'http://underscore_domain.org/', false", - "'https://a.very.long.domain.name.example.com/path', false" - }) - void testGetUriIsIp(String uriString, boolean expected) throws Exception { - URI uri = new URI(uriString); - boolean actual = (boolean) EndpointUtils.getUriProperty(uri, "isIp"); - - assertThat(expected, equalTo(actual)); - } - - @ParameterizedTest - @MethodSource("testConvertsValuesToObjectsProvider") - void testConvertsValuesToObjects(Value value, Object object) { - var converted = EndpointUtils.convertInputParamValue(value); - - assertThat(converted, equalTo(object)); - } - - public static List testConvertsValuesToObjectsProvider() { - return List.of( - Arguments.of(Value.emptyValue(), null), - Arguments.of(Value.stringValue("hi"), "hi"), - Arguments.of(Value.booleanValue(true), true), - Arguments.of(Value.booleanValue(false), false), - Arguments.of(Value.integerValue(1), 1), - Arguments.of(Value.arrayValue(List.of(Value.integerValue(1))), List.of(1)), - Arguments.of(Value.recordValue(Map.of(Identifier.of("hi"), Value.integerValue(1))), - Map.of("hi", 1)) - - ); - } - - @Test - public void throwsWhenValueUnsupported() { - Assertions.assertThrows(RulesEvaluationError.class, - () -> EndpointUtils.convertInputParamValue(EndpointValue.builder().url("https://foo").build())); - } - - @Test - public void getsUriParts() throws Exception { - var uri = new URI("http://localhost/foo/bar"); - - assertThat(EndpointUtils.getUriProperty(uri, "authority"), equalTo(uri.getAuthority())); - assertThat(EndpointUtils.getUriProperty(uri, "scheme"), equalTo(uri.getScheme())); - assertThat(EndpointUtils.getUriProperty(uri, "path"), equalTo("/foo/bar")); - assertThat(EndpointUtils.getUriProperty(uri, "normalizedPath"), equalTo("/foo/bar/")); - } - - @ParameterizedTest - @MethodSource("convertsNodeInputsProvider") - void convertsNodeInputs(Node value, Object object) { - var converted = EndpointUtils.convertNode(value); - - assertThat(converted, equalTo(object)); - } - - public static List convertsNodeInputsProvider() { - return List.of( - Arguments.of(Node.from("hi"), "hi"), - Arguments.of(Node.from("hi"), "hi"), - Arguments.of(Node.from(true), true), - Arguments.of(Node.from(false), false), - Arguments.of(Node.fromNodes(Node.from("aa")), List.of("aa"))); - } - - @Test - public void throwsOnUnsupportNodeInput() { - Assertions.assertThrows(RulesEvaluationError.class, () -> EndpointUtils.convertNode(Node.from(1))); - } -} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java deleted file mode 100644 index 536000c19..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesCompilerTest.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.nullValue; - -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; -import software.amazon.smithy.java.aws.client.awsjson.AwsJson1Protocol; -import software.amazon.smithy.java.client.core.CallContext; -import software.amazon.smithy.java.client.core.RequestOverrideConfig; -import software.amazon.smithy.java.client.core.auth.scheme.AuthSchemeResolver; -import software.amazon.smithy.java.client.core.endpoint.Endpoint; -import software.amazon.smithy.java.client.core.endpoint.EndpointContext; -import software.amazon.smithy.java.client.core.interceptors.ClientInterceptor; -import software.amazon.smithy.java.client.core.interceptors.RequestHook; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.java.core.serde.document.Document; -import software.amazon.smithy.java.dynamicclient.DynamicClient; -import software.amazon.smithy.model.Model; -import software.amazon.smithy.model.shapes.ServiceShape; -import software.amazon.smithy.model.shapes.ShapeId; -import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; -import software.amazon.smithy.rulesengine.traits.EndpointTestCase; -import software.amazon.smithy.rulesengine.traits.EndpointTestsTrait; - -public class RulesCompilerTest { - @ParameterizedTest - @MethodSource("testCaseProvider") - public void testRunner(Path modelFile) { - var model = Model.assembler() - .discoverModels() - .addImport(modelFile) - .assemble() - .unwrap(); - var service = model.expectShape(ShapeId.from("example#FizzBuzz"), ServiceShape.class); - var engine = new RulesEngine(); - var program = engine.compile(service.expectTrait(EndpointRuleSetTrait.class).getEndpointRuleSet()); - var plugin = EndpointRulesPlugin.from(program); - var testCases = service.expectTrait(EndpointTestsTrait.class); - - var client = DynamicClient.builder() - .model(model) - .service(service.getId()) - .protocol(new AwsJson1Protocol(service.getId())) - .authSchemeResolver(AuthSchemeResolver.NO_AUTH) - .addPlugin(plugin) - .build(); - - for (var test : testCases.getTestCases()) { - var testParams = test.getParams(); - var ctx = Context.create(); - Map input = new HashMap<>(); - for (var entry : testParams.getStringMap().entrySet()) { - input.put(entry.getKey(), EndpointUtils.convertNode(entry.getValue())); - } - var expected = test.getExpect(); - expected.getEndpoint().ifPresent(expectedEndpoint -> { - try { - var result = resolveEndpoint(test, client, plugin, ctx, input); - assertThat(result.uri().toString(), equalTo(expectedEndpoint.getUrl())); - var actualHeaders = result.property(EndpointContext.HEADERS); - if (expectedEndpoint.getHeaders().isEmpty()) { - assertThat(actualHeaders, nullValue()); - } else { - assertThat(actualHeaders, equalTo(expectedEndpoint.getHeaders())); - } - // TODO: validate properties too. - } catch (RulesEvaluationError e) { - Assertions.fail("Expected ruleset to succeed: " - + modelFile + " : " - + test.getDocumentation() - + " : " + e, e); - } - }); - expected.getError().ifPresent(expectedError -> { - try { - var result = resolveEndpoint(test, client, plugin, ctx, input); - Assertions.fail("Expected ruleset to fail: " + modelFile + " : " + test.getDocumentation() - + ", but resolved " + result); - } catch (RulesEvaluationError e) { - // pass - } - }); - } - } - - private Endpoint resolveEndpoint( - EndpointTestCase test, - DynamicClient client, - EndpointRulesPlugin plugin, - Context ctx, - Map input - ) { - // Supports a single operations inputs - if (test.getOperationInputs().isEmpty()) { - return plugin.getProgram().resolveEndpoint(ctx, input); - } - - // The rules have operation input params, so simulate sending an operation. - var inputs = test.getOperationInputs().get(0); - var name = inputs.getOperationName(); - var inputParams = EndpointUtils.convertNode(inputs.getOperationParams(), true); - var resolvedEndpoint = new Endpoint[1]; - var override = RequestOverrideConfig.builder() - .addInterceptor(new ClientInterceptor() { - @Override - public void readBeforeTransmit(RequestHook hook) { - resolvedEndpoint[0] = hook.context().get(CallContext.ENDPOINT); - throw new RulesEvaluationError("foo"); - } - }); - - if (!inputs.getBuiltInParams().isEmpty()) { - inputs.getBuiltInParams().getStringMember("SDK::Endpoint").ifPresent(value -> { - override.putConfig(CallContext.ENDPOINT, Endpoint.builder().uri(value.getValue()).build()); - }); - } - - try { - var document = Document.ofObject(inputParams); - client.call(name, document, override.build()); - throw new RuntimeException("Expected exception"); - } catch (RulesEvaluationError e) { - if (e.getMessage().equals("foo")) { - return resolvedEndpoint[0]; - } else { - throw e; - } - } - } - - public static List testCaseProvider() throws Exception { - List result = new ArrayList<>(); - var baseUri = RulesCompilerTest.class.getResource("runner").toURI(); - var basePath = Paths.get(baseUri); - for (var file : Objects.requireNonNull(basePath.toFile().listFiles())) { - if (!file.isDirectory()) { - result.add(file.toPath()); - } - } - return result; - } -} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineTest.java deleted file mode 100644 index 035ebf288..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsString; - -import java.nio.ByteBuffer; -import java.util.List; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import software.amazon.smithy.java.context.Context; - -public class RulesEngineTest { - @Test - public void canProvideFunctionsWhenLoadingRules() { - var helloReturnValue = "hi!"; - var engine = new RulesEngine(); - - engine.addExtension(new RulesExtension() { - @Override - public List getFunctions() { - return List.of( - new RulesFunction() { - @Override - public int getOperandCount() { - return 1; - } - - @Override - public String getFunctionName() { - return "hello"; - } - - @Override - public Object apply1(Object value) { - return value; - } - }); - } - }); - - var bytecode = new byte[] { - RulesProgram.VERSION, - 0, // params - 0, // registers - RulesProgram.LOAD_CONST, - 0, - RulesProgram.FN, - 0, - RulesProgram.RETURN_ERROR - }; - - var program = engine.precompiledBuilder() - .bytecode(ByteBuffer.wrap(bytecode)) - .constantPool(helloReturnValue) - .functionNames("hello") - .build(); - - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of())); - - assertThat(e.getMessage(), containsString(helloReturnValue)); - } - - @Test - public void failsEarlyWhenFunctionIsMissing() { - var helloReturnValue = "hi!"; - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - 0, // params - 0, // registers - RulesProgram.LOAD_CONST, - 0, - RulesProgram.FN, - 0, - RulesProgram.RETURN_ERROR - }; - - Assertions.assertThrows(UnsupportedOperationException.class, - () -> engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(helloReturnValue) - .functionNames("hello") - .build()); - } - - @Test - public void failsEarlyWhenTooManyRegisters() { - var engine = new RulesEngine(); - var params = new ParamDefinition[257]; - for (var i = 0; i < 257; i++) { - params[i] = new ParamDefinition("r" + i); - } - - Assertions.assertThrows(IllegalArgumentException.class, - () -> engine.precompiledBuilder() - .bytecode(RulesProgram.VERSION, (byte) 255, (byte) 0) - .parameters(params) - .build()); - } - - @Test - public void callsCustomBuiltins() { - var helloReturnValue = "hi!"; - var engine = new RulesEngine(); - var constantPool = new Object[] {helloReturnValue}; - - // Add a built-in provider that just gets ignored. - engine.addBuiltinProvider((name, ctx) -> null); - - engine.addBuiltinProvider((name, ctx) -> { - if (name.equals("customTest")) { - return helloReturnValue; - } - return null; - }); - - var bytecode = new byte[] { - RulesProgram.VERSION, - 2, // params - 0, // registers - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.RETURN_ERROR - }; - - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(constantPool) - .parameters( - new ParamDefinition("foo", false, null, "customTest"), - // This register will try to fill in a default from a builtin named "unknown", but one doesn't - // exist so it is initialized to null. It's not required, so this is allowed to be null. It's - // like if a built-in is unable to optionally find your AWS::Auth::AccountId ID. - new ParamDefinition("bar", false, null, "unknown")) - .build(); - - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of())); - - assertThat(e.getMessage(), containsString(helloReturnValue)); - } -} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesProgramTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesProgramTest.java deleted file mode 100644 index f223423bf..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesProgramTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.is; - -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import software.amazon.smithy.java.context.Context; - -public class RulesProgramTest { - @Test - public void failsWhenMissingVersion() { - var engine = new RulesEngine(); - Assertions.assertThrows( - IllegalArgumentException.class, - () -> engine.precompiledBuilder() - .bytecode(RulesProgram.RETURN_ERROR, (byte) 0, (byte) 0) - .build()); - } - - @Test - public void failsWhenVersionIsTooBig() { - var engine = new RulesEngine(); - - Assertions.assertThrows( - IllegalArgumentException.class, - () -> engine.precompiledBuilder() - .bytecode((byte) -127, (byte) 0, (byte) 0) - .build()); - } - - @Test - public void failsWhenNotEnoughBytes() { - var engine = new RulesEngine(); - - Assertions.assertThrows( - IllegalArgumentException.class, - () -> engine.precompiledBuilder().bytecode((byte) -1).build()); - } - - @Test - public void failsWhenMissingParams() { - var engine = new RulesEngine(); - - Assertions.assertThrows( - IllegalArgumentException.class, - () -> engine.precompiledBuilder() - .bytecode(RulesProgram.VERSION, (byte) 1, (byte) 0) - .build()); - } - - @Test - public void convertsProgramsToStrings() { - var program = getErrorProgram(); - var str = program.toString(); - - assertThat(str, containsString("Constants:")); - assertThat(str, containsString("Registers:")); - assertThat(str, containsString("Instructions:")); - assertThat(str, containsString("0: String: Error!")); - assertThat(str, containsString("0: ParamDefinition[name=a")); - assertThat(str, containsString("003: LOAD_CONST")); - assertThat(str, containsString("005: RETURN_ERROR")); - } - - private RulesProgram getErrorProgram() { - var engine = new RulesEngine(); - - return engine.precompiledBuilder() - .bytecode( - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.LOAD_CONST, - (byte) 0, - RulesProgram.RETURN_ERROR) - .constantPool("Error!") - .parameters(new ParamDefinition("a")) - .build(); - } - - @Test - public void exposesConstantsAndRegisters() { - var program = getErrorProgram(); - - assertThat(program.getConstantPool().length, is(1)); - assertThat(program.getParamDefinitions().size(), is(1)); - } - - @Test - public void runsPrograms() { - var program = getErrorProgram(); - - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of("a", "foo"))); - - assertThat(e.getMessage(), containsString("Error!")); - } -} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java deleted file mode 100644 index c35b7cf9e..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesVmTest.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.equalTo; - -import java.util.List; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import software.amazon.smithy.java.client.core.endpoint.EndpointContext; -import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; - -public class RulesVmTest { - @Test - public void throwsWhenUnableToResolveEndpoint() { - var engine = new RulesEngine(); - var program = engine.precompiledBuilder() - .bytecode(RulesProgram.VERSION, (byte) 0, (byte) 0) - .constantPool(1) - .build(); - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of())); - - assertThat(e.getMessage(), containsString("No value returned from rules engine")); - } - - @Test - public void throwsForInvalidOpcode() { - var engine = new RulesEngine(); - var bytecode = new byte[] {RulesProgram.VERSION, (byte) 0, (byte) 0, 120}; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(1) - .build(); - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of())); - - assertThat(e.getMessage(), containsString("Unknown rules engine instruction: 120")); - } - - @Test - public void throwsWithContextWhenTypeIsInvalid() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 0, // params - (byte) 0, // registers - RulesProgram.LOAD_CONST, - 0, - RulesProgram.RESOLVE_TEMPLATE, - 0, // Refers to invalid type. Expects string, given integer. - 0 - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(1) - .build(); - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of())); - - assertThat(e.getMessage(), containsString("Unexpected value type")); - assertThat(e.getMessage(), containsString("at address 5")); - } - - @Test - public void throwsWithContextWhenBytecodeIsMalformed() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 0, // params - (byte) 0, // registers - RulesProgram.LOAD_CONST, - 0, - RulesProgram.RESOLVE_TEMPLATE // missing following byte - }; - - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(1) - .build(); - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of())); - - assertThat(e.getMessage(), containsString("Malformed bytecode encountered while evaluating rules engine")); - } - - @Test - public void failsIfRequiredRegisterMissing() { - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - }; - var program = new RulesEngine().precompiledBuilder() - .bytecode(bytecode) - .constantPool(1) - .parameters(new ParamDefinition("foo", true, null, null)) - .build(); - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of())); - - assertThat(e.getMessage(), containsString("Required rules engine parameter missing: foo")); - } - - @Test - public void setsDefaultRegisterValues() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.RETURN_ENDPOINT, - 0 - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(1) - .parameters(new ParamDefinition("foo", true, "https://foo.com", null)) - .build(); - var endpoint = program.resolveEndpoint(Context.create(), Map.of()); - - assertThat(endpoint.toString(), containsString("https://foo.com")); - } - - @Test - public void resizesTheStackWhenNeeded() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.RETURN_ENDPOINT, - 0 - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(1) - .parameters(new ParamDefinition("foo", false, null, null)) - .build(); - var endpoint = program.resolveEndpoint(Context.create(), Map.of("foo", "https://foo.com")); - - assertThat(endpoint.toString(), containsString("https://foo.com")); - } - - @Test - public void resolvesTemplates() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.LOAD_REGISTER, // 1 byte register - 0, - RulesProgram.RESOLVE_TEMPLATE, // 2 byte constant - 0, - 0, - RulesProgram.RETURN_ENDPOINT, // 1 byte, no headers or properties - 0 - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(StringTemplate.from(Template.fromString("https://{foo}.bar"))) - .parameters(new ParamDefinition("foo", false, "hi", null)) - .build(); - var endpoint = program.resolveEndpoint(Context.create(), Map.of()); - - assertThat(endpoint.toString(), containsString("https://hi.bar")); - } - - @Test - public void resolvesNoExpressionTemplates() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 0, // params - (byte) 0, // registers - RulesProgram.RESOLVE_TEMPLATE, // 2 byte constant - 0, - 0, - RulesProgram.RETURN_ENDPOINT, // 1 byte, no headers or properties - 0 - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(StringTemplate.from(Template.fromString("https://hi.bar"))) - .build(); - var endpoint = program.resolveEndpoint(Context.create(), Map.of()); - - assertThat(endpoint.toString(), containsString("https://hi.bar")); - } - - @Test - public void wrapsInvalidURIs() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 0, // params - (byte) 0, // registers - RulesProgram.RESOLVE_TEMPLATE, // 2 byte constant - 0, - 0, - RulesProgram.RETURN_ENDPOINT, // 1 byte, no headers or properties - 0 - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(StringTemplate.from(Template.fromString("!??!!\\"))) - .build(); - var e = Assertions.assertThrows(RulesEvaluationError.class, - () -> program.resolveEndpoint(Context.create(), Map.of())); - - assertThat(e.getMessage(), containsString("Error creating URI")); - } - - @Test - public void createsMapForEndpointHeaders() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 0, // params - (byte) 0, // registers - RulesProgram.LOAD_CONST, // push list value 0, "def" - 2, - RulesProgram.CREATE_LIST, // push list with one value, ["def"]. - 1, - RulesProgram.LOAD_CONST, // push map key "abc" - 1, - RulesProgram.CREATE_MAP, // push with one KVP: {"abc": ["def"]} (the endpoint headers) - 1, - RulesProgram.RESOLVE_TEMPLATE, // push resolved string template at constant 0 (2 byte constant) - 0, - 0, - RulesProgram.RETURN_ENDPOINT, // Return an endpoint that does have headers. - 1 - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(StringTemplate.from(Template.fromString("https://hi.bar")), "abc", "def") - .build(); - var endpoint = program.resolveEndpoint(Context.create(), Map.of()); - - assertThat(endpoint.toString(), containsString("https://hi.bar")); - assertThat(endpoint.property(EndpointContext.HEADERS), equalTo(Map.of("abc", List.of("def")))); - } - - @Test - public void testsIfRegisterSet() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.TEST_REGISTER_ISSET, - 0, - RulesProgram.RETURN_VALUE - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .parameters(new ParamDefinition("hi", false, "abc", null)) - .build(); - var result = program.run(Context.create(), Map.of()); - - assertThat(result, equalTo(true)); - } - - @Test - public void testsIfValueRegisterSet() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.ISSET, - RulesProgram.RETURN_VALUE - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .parameters(new ParamDefinition("hi", false, "abc", null)) - .build(); - - var result = program.run(Context.create(), Map.of()); - - assertThat(result, equalTo(true)); - } - - @Test - public void testNotOpcode() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.NOT, - RulesProgram.RETURN_VALUE - }; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .parameters(new ParamDefinition("hi", false, false, null)) - .build(); - var result = program.run(Context.create(), Map.of()); - - assertThat(result, equalTo(true)); - } - - @Test - public void testTrueOpcodes() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 3, // params - (byte) 0, // registers - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.IS_TRUE, - RulesProgram.LOAD_REGISTER, - 1, - RulesProgram.IS_TRUE, - RulesProgram.LOAD_REGISTER, - 2, - RulesProgram.IS_TRUE, - RulesProgram.TEST_REGISTER_IS_TRUE, - 0, - RulesProgram.TEST_REGISTER_IS_TRUE, - 1, - RulesProgram.TEST_REGISTER_IS_TRUE, - 2, - RulesProgram.CREATE_LIST, - 6, - RulesProgram.RETURN_VALUE}; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .parameters( - new ParamDefinition("a", false, false, null), - new ParamDefinition("b", false, true, null), - new ParamDefinition("c", false, "foo", null)) - .build(); - var result = program.run(Context.create(), Map.of()); - - assertThat(result, equalTo(List.of(false, true, false, false, true, false))); - } - - @Test - public void callsFunctions() { - var engine = new RulesEngine(); - engine.addFunction(new RulesFunction() { - @Override - public int getOperandCount() { - return 0; - } - - @Override - public String getFunctionName() { - return "gimme"; - } - - @Override - public Object apply0() { - return "gimme"; - } - }); - - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.FN, - 0, // "hi there" == "hi there" : true - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.FN, - 1, // uriEncode "hi there" : "hi%20there" - RulesProgram.FN, - 2, // call gimme() - RulesProgram.CREATE_LIST, - 3, // ["gimme", "hi%20there", true] - RulesProgram.RETURN_VALUE}; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(3, 8, false) - .parameters(new ParamDefinition("a", false, "hi there", null)) - .functionNames("stringEquals", "uriEncode", "gimme") - .build(); - var result = program.run(Context.create(), Map.of()); - - assertThat(result, equalTo(List.of(true, "hi%20there", "gimme"))); - } - - @Test - public void appliesGetAttrOpcode() { - var engine = new RulesEngine(); - var bytecode = new byte[] { - RulesProgram.VERSION, - (byte) 1, // params - (byte) 0, // registers - RulesProgram.LOAD_REGISTER, - 0, - RulesProgram.GET_ATTR, - 0, - 0, - RulesProgram.RETURN_VALUE}; - var program = engine.precompiledBuilder() - .bytecode(bytecode) - .constantPool(AttrExpression.parse("foo")) - .parameters(new ParamDefinition("a", false, null, null)) - .build(); - var result = program.run(Context.create(), Map.of("a", Map.of("foo", "hi"))); - - assertThat(result, equalTo("hi")); - } -} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java deleted file mode 100644 index 27390a843..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdlibTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.is; - -import java.net.URI; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.CsvSource; -import software.amazon.smithy.java.client.core.ClientContext; -import software.amazon.smithy.java.client.core.endpoint.Endpoint; -import software.amazon.smithy.java.context.Context; - -public class StdlibTest { - @Test - public void comparesStrings() { - assertThat(Stdlib.STRING_EQUALS.apply2("a", "a"), is(true)); - assertThat(Stdlib.STRING_EQUALS.apply2("a", "b"), is(false)); - assertThat(Stdlib.STRING_EQUALS.apply2(null, "b"), is(false)); - - Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.STRING_EQUALS.apply2("a", false)); - } - - @Test - public void comparesBooleans() { - assertThat(Stdlib.BOOLEAN_EQUALS.apply2(true, true), is(true)); - assertThat(Stdlib.BOOLEAN_EQUALS.apply2(true, Boolean.TRUE), is(true)); - assertThat(Stdlib.BOOLEAN_EQUALS.apply2(false, Boolean.FALSE), is(true)); - assertThat(Stdlib.BOOLEAN_EQUALS.apply2(false, false), is(true)); - - Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.BOOLEAN_EQUALS.apply2("a", false)); - } - - @Test - public void parseUrl() throws Exception { - assertThat(Stdlib.PARSE_URL.apply1("http://foo.com"), equalTo(new URI("http://foo.com"))); - Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.PARSE_URL.apply1(false)); - Assertions.assertThrows(RulesEvaluationError.class, () -> Stdlib.PARSE_URL.apply1("\\")); - } - - @ParameterizedTest - @CsvSource({ - // Valid simple host labels (no dots) - "'example',false,true", - "'a',false,true", - "'server1',false,true", - "'my-host',false,true", - // Invalid simple host labels (no dots) - "'-example',false,false", - "'host_name',false,false", - "'a-very-long-host-name-that-is-exactly-64-characters-in-length-1234567',false,false", - "'',false,false", - // Valid host labels with dots - "'example.com',true,true", - "'a.b.c',true,true", - "'sub.domain.example.com',true,true", - "'192.168.1.1',true,true", - // Invalid host labels with dots - "'.example.com',true,false", // Starts with dot - "'example.com.',true,false", // Ends with dot - "'example..com',true,false", // Double dots - "'exam@ple.com',true,false", // Invalid character - "'-.example.com',true,false", // Segment starts with hyphen - "'example.c*m',true,false", // Invalid character in segment - "'a-very-long-segment-that-is-exactly-64-characters-in-length-1234567.com',true,false" // Segment too long - }) - public void testsForValidHostLabels(String input, boolean allowDots, boolean isValid) { - assertThat(input, Stdlib.IS_VALID_HOST_LABEL.apply2(input, allowDots), is(isValid)); - } - - @Test - public void resolvesSdkEndpointBuiltins() { - var ctx = Context.create(); - var endpoint = Endpoint.builder().uri("https://foo.com").build(); - ctx.put(ClientContext.CUSTOM_ENDPOINT, endpoint); - var result = Stdlib.standardBuiltins("SDK::Endpoint", ctx); - - assertThat(result, instanceOf(String.class)); - assertThat(result, equalTo(endpoint.uri().toString())); - } -} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StringTemplateTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StringTemplateTest.java deleted file mode 100644 index f8abfd436..000000000 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StringTemplateTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.java.client.rulesengine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.nullValue; - -import java.util.ArrayList; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; - -public class StringTemplateTest { - @Test - public void createsFromSingularExpression() { - var template = Template.fromString("{Region}"); - var st = StringTemplate.from(template); - List calls = new ArrayList<>(); - - assertThat(st.expressionCount(), is(1)); - assertThat(st.singularExpression(), notNullValue()); - assertThat(st.resolve(1, new Object[] {"test"}), equalTo("test")); - - st.forEachExpression(calls::add); - assertThat(calls, hasSize(1)); - } - - @Test - public void stEquality() { - var template = Template.fromString("foo/{Region}"); - var st1 = StringTemplate.from(template); - var st2 = StringTemplate.from(template); - var st3 = StringTemplate.from(Template.fromString("bar/{Region}")); - - assertThat(st1, equalTo(st1)); - assertThat(st2, equalTo(st1)); - assertThat(st3, not(equalTo(st1))); - } - - @Test - public void loadsTemplatesWithMixedParts() { - var template = Template.fromString("https://foo.{Region}.{Other}.com"); - var st = StringTemplate.from(template); - List calls = new ArrayList<>(); - - assertThat(st.expressionCount(), is(2)); - assertThat(st.singularExpression(), nullValue()); - assertThat(st.resolve(2, new Object[] {"abc", "def"}), equalTo("https://foo.abc.def.com")); - - st.forEachExpression(calls::add); - assertThat(calls, hasSize(2)); - } - - @Test - public void ensuresTemplatesAreNotMissing() { - var template = Template.fromString("https://foo.{Region}.{Other}.com"); - var st = StringTemplate.from(template); - - Assertions.assertThrows(RulesEvaluationError.class, () -> st.resolve(1, new Object[] {"foo"})); - } -} diff --git a/core/src/main/java/software/amazon/smithy/java/core/serde/document/DocumentUtils.java b/core/src/main/java/software/amazon/smithy/java/core/serde/document/DocumentUtils.java index 2224e72ef..1ae5a406a 100644 --- a/core/src/main/java/software/amazon/smithy/java/core/serde/document/DocumentUtils.java +++ b/core/src/main/java/software/amazon/smithy/java/core/serde/document/DocumentUtils.java @@ -157,16 +157,17 @@ private static boolean isBig(Number a, Number b) { @SuppressWarnings("unchecked") @SmithyInternalApi public static T getMemberValue(Document container, Schema containerSchema, Schema member) { + // Make sure it's part of the schema. + var value = SchemaUtils.validateMemberInSchema(containerSchema, member, + container.getMember(member.memberName())); + if (value == null) { + return null; + } + try { - // Make sure it's part of the schema. - var value = SchemaUtils.validateMemberInSchema( - containerSchema, - member, - container.getMember(member.memberName())); - // If it's a document, unwrap it. // This should work for most use cases of DynamicClient, but this won't perfectly interoperate with all // use-cases or be a stand-in when an actual type is expected. - return (T) (value != null ? value.asObject() : null); + return (T) value.asObject(); } catch (ClassCastException e) { throw new ClassCastException( "Unable to cast document member `" + member.id() + "` from document with schema `" + containerSchema From e52a017a4987dd2f833dbdad11e8a574bbc7ed63 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Tue, 29 Jul 2025 16:37:20 -0500 Subject: [PATCH 09/13] Make various improvements to the VM --- .../java/aws/client/rulesengine/Bench.java | 31 ++++- .../java/client/rulesengine/Bytecode.java | 50 ++++++-- .../client/rulesengine/BytecodeCompiler.java | 7 +- .../rulesengine/BytecodeDisassembler.java | 120 ++++++++++++------ .../rulesengine/BytecodeEndpointResolver.java | 4 +- .../client/rulesengine/BytecodeReader.java | 24 +++- .../client/rulesengine/BytecodeWriter.java | 69 ++++------ .../client/rulesengine/ContextProvider.java | 49 ++----- .../DecisionTreeEndpointResolver.java | 86 +++++++++++-- .../rulesengine/EndpointRulesPlugin.java | 22 +--- .../client/rulesengine/EndpointUtils.java | 2 - .../java/client/rulesengine/Opcodes.java | 28 +++- .../client/rulesengine/RegisterAllocator.java | 82 +++++------- .../client/rulesengine/RegisterFiller.java | 55 ++++++-- .../rulesengine/RulesEngineBuilder.java | 63 ++++++++- config/spotbugs/filter.xml | 5 +- 16 files changed, 447 insertions(+), 250 deletions(-) diff --git a/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java b/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java index c1580c480..967e2b15e 100644 --- a/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java +++ b/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java @@ -40,18 +40,21 @@ public class Bench { private EndpointResolver endpointResolver; private EndpointResolverParams endpointParams; + private Model model; + private ServiceShape service; + private final RulesEngineBuilder engine = new RulesEngineBuilder(); + @Setup public void setup() { - var model = Model.assembler() + model = Model.assembler() .discoverModels() .addImport(ResolverTest.class.getResource("s3.json")) .putProperty(ModelAssembler.ALLOW_UNKNOWN_TRAITS, true) .assemble() .unwrap(); model = customizeS3Model(model); - var service = model.expectShape(ShapeId.from("com.amazonaws.s3#AmazonS3"), ServiceShape.class); + service = model.expectShape(ShapeId.from("com.amazonaws.s3#AmazonS3"), ServiceShape.class); - var engine = new RulesEngineBuilder(); var plugin = EndpointRulesPlugin.create(engine); client = DynamicClient.builder() @@ -61,17 +64,18 @@ public void setup() { .addPlugin(plugin) .build(); endpointResolver = client.config().endpointResolver(); - var ctx = Context.create(); - ctx.put(EndpointSettings.REGION, "us-east-1"); -// ctx.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, Map.of("ForcePathStyle", true)); var inputValue = client.createStruct(ShapeId.from("com.amazonaws.s3#GetObjectRequest"), Document.of(Map.of( "Bucket", Document.of("miked"), - //, Document.of("foo"), "Key", Document.of("bar")))); + + var ctx = Context.create(); + ctx.put(EndpointSettings.REGION, "us-east-1"); + // ctx.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, Map.of("UseFIPS", true, "UseDualStack", true)); + endpointParams = EndpointResolverParams.builder() .context(ctx) .inputValue(inputValue) @@ -101,4 +105,17 @@ private static Model customizeS3Model(Model m) { public Object evaluate() throws Exception { return endpointResolver.resolveEndpoint(endpointParams).get(); } + + // public static final TraitKey ENDPOINT_RULESET_TRAIT = + // TraitKey.get(EndpointRuleSetTrait.class); + // + // @Benchmark + // public Object compileBdd() { + // var ruleset = client.config().service().schema().getTrait(ENDPOINT_RULESET_TRAIT); + // var cfg = Cfg.from(ruleset.getEndpointRuleSet()); + // var bdd = BddTrait.from(cfg).transform(SiftingOptimization.builder().cfg(cfg).build()).transform(new NodeReversal()); + // var bytecode = engine.compile(bdd); + // var providers = engine.getBuiltinProviders(); + // return new BytecodeEndpointResolver(bytecode, engine.getExtensions(), providers); + // } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java index 2e0bcc413..5e6339135 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java @@ -51,29 +51,25 @@ *
    *
  1. Condition Table - Array of 4-byte offsets pointing to each condition's bytecode
  2. *
  3. Result Table - Array of 4-byte offsets pointing to each result's bytecode
  4. + *
  5. Register Definitions - Array of parameter/register metadata (immediately after result table)
  6. *
  7. Function Table - Array of function names
  8. - *
  9. Register Definitions - Array of parameter/register metadata
  10. - *
  11. BDD Table - Array of BDD nodes
  12. + *
  13. BDD Table - Array of BDD nodes (3 ints per node)
  14. *
  15. Bytecode Section - Compiled instructions for conditions and results
  16. *
  17. Constant Pool - All constants referenced by the bytecode
  18. *
* *

Condition Table

*

Array of 4-byte offsets pointing to the start of each condition's bytecode. - * Each offset is absolute from the start of the file. + * Each offset is absolute from the start of the file. When loaded, these are + * adjusted to be relative to the bytecode section start for efficient access. * *

Result Table

*

Array of 4-byte offsets pointing to the start of each result's bytecode. - * Each offset is absolute from the start of the file. - * - *

Function Table

- *

Array of function names used in the bytecode. Each function name is encoded as: - *

- * [length:2][UTF-8 bytes]
- * 
+ * Each offset is absolute from the start of the file. When loaded, these are + * adjusted to be relative to the bytecode section start for efficient access. * *

Register Definitions

- *

Immediately follows the function table. Each register is encoded as: + *

Immediately follows the result table. Each register is encoded as: *

  * [nameLen:2][name:UTF-8][required:1][temp:1][hasDefault:1][default:?][hasBuiltin:1][builtin:?]
  * 
@@ -89,16 +85,38 @@ *
  • builtin: UTF-8 encoded builtin name (only present if hasBuiltin=1)
  • * * + *

    Function Table

    + *

    Array of function names used in the bytecode. Each function name is encoded as: + *

    + * [length:2][UTF-8 bytes]
    + * 
    + * *

    BDD Table

    *

    Array of BDD nodes for efficient condition evaluation. Each node is encoded as 12 bytes: *

      * [varIdx:4][highRef:4][lowRef:4]
      * 
    + * Where: + *
      + *
    • varIdx: Index of the condition to test (0-based)
    • + *
    • highRef: Reference to follow if condition is true
    • + *
    • lowRef: Reference to follow if condition is false
    • + *
    + * + *

    Reference encoding follows the BDD conventions: + *

      + *
    • 1: TRUE terminal
    • + *
    • -1: FALSE terminal
    • + *
    • 2, 3, ...: Node references (node at index ref-1)
    • + *
    • -2, -3, ...: Complement node references (logical NOT)
    • + *
    • 100_000_000+: Result terminals (100_000_000 + resultIndex)
    • + *
    * *

    Bytecode Section

    *

    Contains the compiled bytecode instructions for all conditions and results. - * The condition/result tables point to offsets within this section. Instructions - * use a stack-based virtual machine with opcodes defined in {@link Opcodes}. + * The condition/result tables contain absolute offsets from the start of the file that point into this section. + * Instructions use a stack-based virtual machine with opcodes defined in {@link Opcodes}. This section may include + * control flow instructions like JT_OR_POP for short-circuit evaluation. * *

    Constant Pool

    *

    Contains all constants referenced by the bytecode. Each constant is prefixed @@ -115,7 +133,7 @@ * 5 MAP [count:2]([keyLen:2][key:UTF-8][value:?])... * * - *

    Lists and maps can contain nested values of any supported type. + *

    Lists and maps can contain nested values of any supported type, up to a maximum nesting depth of 100 levels. * *

    Usage

    * @@ -171,6 +189,10 @@ public final class Bytecode { int[] bddNodes, int bddRootRef ) { + if (bddNodes.length % 3 != 0) { + throw new IllegalArgumentException("BDD nodes length must be multiple of 3, got: " + bddNodes.length); + } + this.bytecode = Objects.requireNonNull(bytecode); this.conditionOffsets = Objects.requireNonNull(conditionOffsets); this.resultOffsets = Objects.requireNonNull(resultOffsets); diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java index 2ed2f2f8c..992698180 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java @@ -55,7 +55,7 @@ final class BytecodeCompiler { this.builtinProviders = builtinProviders; this.availableFunctions = functions; this.bdd = bdd; - this.registerAllocator = new RegisterAllocator.FlatAllocator(); + this.registerAllocator = new RegisterAllocator(); // Add parameters as registry values for (var param : bdd.getParameters()) { @@ -110,7 +110,7 @@ Bytecode compile() { private void compileCondition(Condition condition) { compileExpression(condition.getFunction()); condition.getResult().ifPresent(result -> { - byte register = registerAllocator.shadow(result.toString()); + byte register = registerAllocator.getOrAllocateRegister(result.toString()); writer.writeByte(Opcodes.SET_REGISTER); writer.writeByte(register); }); @@ -370,7 +370,7 @@ private void compileLiteral(Literal literal) { // Simple string with no interpolation addLoadConst(parts.get(0).toString()); } else if (parts.size() == 1 && parts.get(0) instanceof Template.Dynamic dynamic) { - // Single dynamic expression - just evaluate it + // Single dynamic expression, so just evaluate it compileExpression(dynamic.toExpression()); } else { // Multiple parts - need to concatenate @@ -447,7 +447,6 @@ private Bytecode buildProgram() { var registerDefs = registerAllocator.getRegistry().toArray(new RegisterDefinition[0]); var fns = usedFunctions.toArray(new RulesFunction[0]); - // Extract BDD nodes to an array using the consumer approach Bdd bddData = bdd.getBdd(); int nodeCount = bddData.getNodeCount(); int[] bddNodes = new int[nodeCount * 3]; diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java index 99d9d8dbe..4c9176ae0 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java @@ -6,6 +6,8 @@ package software.amazon.smithy.java.client.rulesengine; import java.io.StringWriter; +import java.util.HashMap; +import java.util.List; import java.util.Map; import software.amazon.smithy.rulesengine.logic.bdd.BddFormatter; @@ -15,13 +17,13 @@ final class BytecodeDisassembler { private static final Map INSTRUCTION_DEFS = Map.ofEntries( - // Basic stack operations (0-3) + // Basic stack operations Map.entry(Opcodes.LOAD_CONST, new InstructionDef("LOAD_CONST", OperandType.BYTE, Show.CONST)), Map.entry(Opcodes.LOAD_CONST_W, new InstructionDef("LOAD_CONST_W", OperandType.SHORT, Show.CONST)), Map.entry(Opcodes.SET_REGISTER, new InstructionDef("SET_REGISTER", OperandType.BYTE, Show.REGISTER)), Map.entry(Opcodes.LOAD_REGISTER, new InstructionDef("LOAD_REGISTER", OperandType.BYTE, Show.REGISTER)), - // Boolean operations (4-7) + // Boolean operations Map.entry(Opcodes.NOT, new InstructionDef("NOT", OperandType.NONE)), Map.entry(Opcodes.ISSET, new InstructionDef("ISSET", OperandType.NONE)), Map.entry(Opcodes.TEST_REGISTER_ISSET, @@ -29,13 +31,13 @@ final class BytecodeDisassembler { Map.entry(Opcodes.TEST_REGISTER_NOT_SET, new InstructionDef("TEST_REGISTER_NOT_SET", OperandType.BYTE, Show.REGISTER)), - // List operations (8-11) + // List operations Map.entry(Opcodes.LIST0, new InstructionDef("LIST0", OperandType.NONE)), Map.entry(Opcodes.LIST1, new InstructionDef("LIST1", OperandType.NONE)), Map.entry(Opcodes.LIST2, new InstructionDef("LIST2", OperandType.NONE)), Map.entry(Opcodes.LISTN, new InstructionDef("LISTN", OperandType.BYTE, Show.NUMBER)), - // Map operations (12-17) + // Map operations Map.entry(Opcodes.MAP0, new InstructionDef("MAP0", OperandType.NONE)), Map.entry(Opcodes.MAP1, new InstructionDef("MAP1", OperandType.NONE)), Map.entry(Opcodes.MAP2, new InstructionDef("MAP2", OperandType.NONE)), @@ -43,9 +45,8 @@ final class BytecodeDisassembler { Map.entry(Opcodes.MAP4, new InstructionDef("MAP4", OperandType.NONE)), Map.entry(Opcodes.MAPN, new InstructionDef("MAPN", OperandType.BYTE, Show.NUMBER)), - // Template operation (18) - Map.entry(Opcodes.RESOLVE_TEMPLATE, - new InstructionDef("RESOLVE_TEMPLATE", OperandType.BYTE, Show.NUMBER)), + // Template operation + Map.entry(Opcodes.RESOLVE_TEMPLATE, new InstructionDef("RESOLVE_TEMPLATE", OperandType.BYTE, Show.NUMBER)), // Function operations (19-23) Map.entry(Opcodes.FN0, new InstructionDef("FN0", OperandType.BYTE, Show.FN)), @@ -54,7 +55,7 @@ final class BytecodeDisassembler { Map.entry(Opcodes.FN3, new InstructionDef("FN3", OperandType.BYTE, Show.FN)), Map.entry(Opcodes.FN, new InstructionDef("FN", OperandType.BYTE, Show.FN)), - // Property access operations (24-27) + // Property access operations Map.entry(Opcodes.GET_PROPERTY, new InstructionDef("GET_PROPERTY", OperandType.SHORT, Show.CONST)), Map.entry(Opcodes.GET_INDEX, new InstructionDef("GET_INDEX", OperandType.BYTE, Show.NUMBER)), Map.entry(Opcodes.GET_PROPERTY_REG, @@ -62,29 +63,32 @@ final class BytecodeDisassembler { Map.entry(Opcodes.GET_INDEX_REG, new InstructionDef("GET_INDEX_REG", OperandType.TWO_BYTES, Show.REG_INDEX)), - // Boolean test operations (28-30) + // Boolean test operations Map.entry(Opcodes.IS_TRUE, new InstructionDef("IS_TRUE", OperandType.NONE)), Map.entry(Opcodes.TEST_REGISTER_IS_TRUE, new InstructionDef("TEST_REGISTER_IS_TRUE", OperandType.BYTE, Show.REGISTER)), Map.entry(Opcodes.TEST_REGISTER_IS_FALSE, new InstructionDef("TEST_REGISTER_IS_FALSE", OperandType.BYTE, Show.REGISTER)), - // Comparison operations (31-33) + // Comparison operations Map.entry(Opcodes.EQUALS, new InstructionDef("EQUALS", OperandType.NONE)), Map.entry(Opcodes.STRING_EQUALS, new InstructionDef("STRING_EQUALS", OperandType.NONE)), Map.entry(Opcodes.BOOLEAN_EQUALS, new InstructionDef("BOOLEAN_EQUALS", OperandType.NONE)), - // String operations (34-37) + // String operations Map.entry(Opcodes.SUBSTRING, new InstructionDef("SUBSTRING", OperandType.THREE_BYTES, Show.SUBSTRING)), Map.entry(Opcodes.IS_VALID_HOST_LABEL, new InstructionDef("IS_VALID_HOST_LABEL", OperandType.NONE)), Map.entry(Opcodes.PARSE_URL, new InstructionDef("PARSE_URL", OperandType.NONE)), Map.entry(Opcodes.URI_ENCODE, new InstructionDef("URI_ENCODE", OperandType.NONE)), - // Return operations (38-40) + // Return operations Map.entry(Opcodes.RETURN_ERROR, new InstructionDef("RETURN_ERROR", OperandType.NONE)), Map.entry(Opcodes.RETURN_ENDPOINT, new InstructionDef("RETURN_ENDPOINT", OperandType.BYTE, Show.ENDPOINT_FLAGS)), - Map.entry(Opcodes.RETURN_VALUE, new InstructionDef("RETURN_VALUE", OperandType.NONE))); + Map.entry(Opcodes.RETURN_VALUE, new InstructionDef("RETURN_VALUE", OperandType.NONE)), + + // Control flow + Map.entry(Opcodes.JT_OR_POP, new InstructionDef("JT_OR_POP", OperandType.SHORT, Show.JUMP_OFFSET))); // Enum to define operand types private enum OperandType { @@ -103,7 +107,7 @@ private enum OperandType { } private enum Show { - CONST, FN, REGISTER, NUMBER, ENDPOINT_FLAGS, SUBSTRING, REG_PROPERTY, REG_INDEX + CONST, FN, REGISTER, NUMBER, ENDPOINT_FLAGS, SUBSTRING, REG_PROPERTY, REG_INDEX, JUMP_OFFSET } // Instruction definition class @@ -114,9 +118,13 @@ private record InstructionDef(String name, OperandType operandType, Show show) { } // Result class for operand parsing - private record OperandResult(int value, int nextPc, int secondValue) { + private record OperandResult(int value, int nextPc, int secondValue, int thirdValue) { OperandResult(int value, int nextPc) { - this(value, nextPc, -1); + this(value, nextPc, -1, -1); + } + + OperandResult(int value, int nextPc, int secondValue) { + this(value, nextPc, secondValue, -1); } } @@ -129,7 +137,6 @@ private record OperandResult(int value, int nextPc, int secondValue) { String disassemble() { StringBuilder s = new StringBuilder(); - // Header s.append("=== Bytecode Program ===\n"); s.append("Conditions: ").append(bytecode.getConditionCount()).append("\n"); s.append("Results: ").append(bytecode.getResultCount()).append("\n"); @@ -138,6 +145,17 @@ String disassemble() { s.append("Constants: ").append(bytecode.getConstantPoolCount()).append("\n"); s.append("BDD Nodes: ").append(bytecode.getBddNodes().length / 3).append("\n"); s.append("BDD Root: ").append(BddFormatter.formatReference(bytecode.getBddRootRef())).append("\n"); + + Map instructionCounts = countInstructions(); + if (!instructionCounts.isEmpty()) { + s.append("\nInstruction counts: "); + instructionCounts.entrySet() + .stream() + .sorted(Map.Entry.comparingByValue().reversed()) + .limit(10) // Top 10 most common + .forEach(e -> s.append(e.getKey()).append("(").append(e.getValue()).append(") ")); + s.append("\n"); + } s.append("\n"); // Functions @@ -145,7 +163,7 @@ String disassemble() { s.append("=== Functions ===\n"); int i = 0; for (var fn : bytecode.getFunctions()) { - s.append(String.format(" %2d: %-20s [%d args]\n", + s.append(String.format(" %2d: %-20s [%d args]%n", i++, fn.getFunctionName(), fn.getArgumentCount())); @@ -205,7 +223,7 @@ String disassemble() { if (bytecode.getConditionCount() > 0) { s.append("=== Conditions ===\n"); for (int i = 0; i < bytecode.getConditionCount(); i++) { - s.append(String.format("Condition %d:\n", i)); + s.append(String.format("Condition %d:%n", i)); int startOffset = bytecode.getConditionStartOffset(i); disassembleSection(s, startOffset, Integer.MAX_VALUE, " "); s.append("\n"); @@ -216,7 +234,7 @@ String disassemble() { if (bytecode.getResultCount() > 0) { s.append("=== Results ===\n"); for (int i = 0; i < bytecode.getResultCount(); i++) { - s.append(String.format("Result %d:\n", i)); + s.append(String.format("Result %d:%n", i)); int startOffset = bytecode.getResultOffset(i); disassembleSection(s, startOffset, Integer.MAX_VALUE, " "); s.append("\n"); @@ -226,9 +244,35 @@ String disassemble() { return s.toString(); } + private Map countInstructions() { + Map counts = new HashMap<>(); + byte[] instructions = bytecode.getBytecode(); + + int pc = 0; + while (pc < instructions.length) { + byte opcode = instructions[pc]; + InstructionDef def = INSTRUCTION_DEFS.get(opcode); + if (def == null) { + break; // Unknown instruction + } + + counts.merge(def.name(), 1, Integer::sum); + + // Skip operands + pc += 1 + def.operandType().byteCount; + } + + return counts; + } + private void disassembleSection(StringBuilder s, int startOffset, int endOffset, String indent) { byte[] instructions = bytecode.getBytecode(); + if (startOffset >= instructions.length) { + s.append(indent).append("(section starts beyond bytecode end)\n"); + return; + } + for (int pc = startOffset; pc < endOffset && pc < instructions.length;) { // Check if this is a return opcode byte opcode = instructions[pc]; @@ -258,7 +302,7 @@ private int writeInstruction(StringBuilder s, int pc, String indent) { // Handle unknown instruction if (def == null) { - s.append(String.format("UNKNOWN_OPCODE(0x%02X)\n", opcode)); + s.append(String.format("UNKNOWN_OPCODE(0x%02X)%n", opcode)); return -1; } @@ -269,11 +313,12 @@ private int writeInstruction(StringBuilder s, int pc, String indent) { int nextPc = operandResult.nextPc(); int displayValue = operandResult.value(); int secondValue = operandResult.secondValue(); + int thirdValue = operandResult.thirdValue(); // Add symbolic information if available if (def.show() != null) { s.append(" ; "); - appendSymbolicInfo(s, pc, displayValue, secondValue, def.show, instructions); + appendSymbolicInfo(s, pc, displayValue, secondValue, thirdValue, def.show, instructions); } s.append("\n"); @@ -302,7 +347,7 @@ private OperandResult parseOperands(StringBuilder s, int pc, OperandType type, b int b1 = appendByte(s, pc, instructions); int b2 = appendByte(s, pc + 1, instructions); int b3 = appendByte(s, pc + 2, instructions); - yield new OperandResult(b1, pc + 4, b2); + yield new OperandResult(b1, pc + 4, b2, b3); } }; } @@ -312,6 +357,7 @@ private void appendSymbolicInfo( int pc, int value, int secondValue, + int thirdValue, Show show, byte[] instructions ) { @@ -339,17 +385,12 @@ private void appendSymbolicInfo( s.append("headers=").append(hasHeaders).append(", properties=").append(hasProperties); } case SUBSTRING -> { - if (pc + 3 < instructions.length) { - int start = instructions[pc + 1] & 0xFF; - int end = instructions[pc + 2] & 0xFF; - boolean reverse = (instructions[pc + 3] & 0xFF) != 0; - s.append("start=") - .append(start) - .append(", end=") - .append(end) - .append(", reverse=") - .append(reverse); - } + s.append("start=") + .append(value) + .append(", end=") + .append(secondValue) + .append(", reverse=") + .append(thirdValue != 0); } case REG_PROPERTY -> { if (value >= 0 && value < bytecode.getRegisterDefinitions().length) { @@ -369,12 +410,15 @@ private void appendSymbolicInfo( s.append("[").append(secondValue).append("]"); } } + case JUMP_OFFSET -> { + s.append("-> ").append(pc + 3 + value); // pc + 3 because offset is relative to after instruction + } } } private int appendByte(StringBuilder s, int pc, byte[] instructions) { if (instructions.length <= pc + 1) { - s.append("??"); + s.append("?? (out of bounds at ").append(pc + 1).append(")"); return -1; } else { int result = instructions[pc + 1] & 0xFF; @@ -385,7 +429,7 @@ private int appendByte(StringBuilder s, int pc, byte[] instructions) { private int appendShort(StringBuilder s, int pc, byte[] instructions) { if (instructions.length <= pc + 2) { - s.append("??"); + s.append("?? (out of bounds at ").append(pc + 1).append(")"); return -1; } else { int result = EndpointUtils.bytesToShort(instructions, pc + 1); @@ -399,6 +443,10 @@ private String formatConstant(Object value) { return "null"; } else if (value instanceof String) { return "\"" + escapeString((String) value) + "\""; + } else if (value instanceof List list) { + return "List[" + list.size() + " items]"; + } else if (value instanceof Map map) { + return "Map[" + map.size() + " entries]"; } else { return value.getClass().getSimpleName() + "[" + value + "]"; } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java index 070b5a6c1..fc058639c 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java @@ -19,7 +19,7 @@ /** * Endpoint resolver that uses a compiled endpoint rules program from a BDD. */ -final class BytecodeEndpointResolver implements EndpointResolver { +public final class BytecodeEndpointResolver implements EndpointResolver { private static final InternalLogger LOGGER = InternalLogger.getLogger(BytecodeEndpointResolver.class); private static final CompletableFuture NULL_RESULT = CompletableFuture.completedFuture(null); @@ -31,7 +31,7 @@ final class BytecodeEndpointResolver implements EndpointResolver { private final ContextProvider ctxProvider = new ContextProvider.OrchestratingProvider(); private final ThreadLocal threadLocalEvaluator; - BytecodeEndpointResolver( + public BytecodeEndpointResolver( Bytecode bytecode, List extensions, Map> builtinProviders diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java index bb28dff19..33e3e23eb 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java @@ -12,6 +12,8 @@ import java.util.Map; final class BytecodeReader { + private static final int MAX_NESTING_DEPTH = 100; + final byte[] data; int offset; @@ -20,17 +22,26 @@ final class BytecodeReader { this.offset = offset; } + private void checkBounds(int bytesNeeded) { + if (offset + bytesNeeded > data.length) { + throw new IllegalArgumentException("Unexpected end of bytecode data at " + offset); + } + } + byte readByte() { + checkBounds(1); return data[offset++]; } short readShort() { + checkBounds(2); int value = ((data[offset] & 0xFF) << 8) | (data[offset + 1] & 0xFF); offset += 2; return (short) value; } int readInt() { + checkBounds(4); int value = (data[offset] & 0xFF) << 24; value |= (data[offset + 1] & 0xFF) << 16; value |= (data[offset + 2] & 0xFF) << 8; @@ -41,12 +52,21 @@ int readInt() { String readUTF() { int length = readShort() & 0xFFFF; + checkBounds(length); String value = new String(data, offset, length, StandardCharsets.UTF_8); offset += length; return value; } Object readConstant() { + return readConstant(0); + } + + private Object readConstant(int depth) { + if (depth > MAX_NESTING_DEPTH) { + throw new IllegalArgumentException("Constant nesting depth exceeded maximum of " + MAX_NESTING_DEPTH); + } + byte type = readByte(); return switch (type) { case Bytecode.CONST_NULL -> null; @@ -57,7 +77,7 @@ Object readConstant() { int size = readShort() & 0xFFFF; List list = new ArrayList<>(size); for (int i = 0; i < size; i++) { - list.add(readConstant()); + list.add(readConstant(depth + 1)); } yield list; } @@ -66,7 +86,7 @@ Object readConstant() { Map map = new LinkedHashMap<>(size); for (int i = 0; i < size; i++) { String key = readUTF(); - Object value = readConstant(); + Object value = readConstant(depth + 1); map.put(key, value); } yield map; diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java index 303571f92..04de74027 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java @@ -18,6 +18,8 @@ * Builds up bytecode incrementally. */ final class BytecodeWriter { + private static final int MAX_CONSTANTS = 65536; + private final ByteArrayOutputStream bytecodeStream = new ByteArrayOutputStream(); private final List conditionOffsets = new ArrayList<>(); private final List resultOffsets = new ArrayList<>(); @@ -38,6 +40,9 @@ void writeByte(int value) { } void writeShort(int value) { + if (value < 0 || value > 65535) { + throw new IllegalArgumentException("Value out of range for unsigned short: " + value); + } bytecodeStream.write((value >> 8) & 0xFF); bytecodeStream.write(value & 0xFF); } @@ -46,6 +51,9 @@ void writeShort(int value) { int getConstantIndex(Object value) { return constantIndices.computeIfAbsent(canonicalizeConstant(value), v -> { int index = constants.size(); + if (index >= MAX_CONSTANTS) { + throw new IllegalStateException("Too many constants: " + index); + } constants.add(v); return index; }); @@ -73,11 +81,10 @@ Bytecode build( int bddRootRef ) { ByteArrayOutputStream complete = new ByteArrayOutputStream(); - try { + try (DataOutputStream dos = new DataOutputStream(complete)) { int bddNodeCount = bddNodes.length / 3; - // Write header (44 bytes) - writeHeader(complete, registerDefinitions.length, functions.length, bddNodeCount, bddRootRef); + writeHeader(dos, registerDefinitions.length, functions.length, bddNodeCount, bddRootRef); // Calculate where each section will be int headerSize = 44; @@ -100,7 +107,6 @@ Bytecode build( int bytecodeOffset = bddTableOffset + bddTableSize; // Write condition offsets (adjusted to absolute positions) - DataOutputStream dos = new DataOutputStream(complete); for (int offset : conditionOffsets) { dos.writeInt(bytecodeOffset + offset); } @@ -110,24 +116,17 @@ Bytecode build( dos.writeInt(bytecodeOffset + offset); } - // Write function table - writeFunctionTable(complete); - - // Write register definitions - complete.write(regDefBytes); + writeFunctionTable(dos); + dos.write(regDefBytes); + writeBddTable(dos, bddNodes); - // Write BDD table - writeBddTable(complete, bddNodes); - - // Write bytecode byte[] bytecode = bytecodeStream.toByteArray(); - complete.write(bytecode); + dos.write(bytecode); - // Write constant pool int constantPoolOffset = complete.size(); - writeConstantPool(complete); + writeConstantPool(dos); - // Now patch the header with actual offsets + // patch the header with actual offsets byte[] data = complete.toByteArray(); patchInt(data, 24, headerSize); patchInt(data, 28, resultTableOffset); @@ -135,9 +134,8 @@ Bytecode build( patchInt(data, 36, constantPoolOffset); patchInt(data, 40, bddTableOffset); - // Return the complete bytecode array wrapped in Bytecode return new Bytecode( - bytecode, // Just the bytecode portion + bytecode, conditionOffsets.stream().mapToInt(Integer::intValue).toArray(), resultOffsets.stream().mapToInt(Integer::intValue).toArray(), registerDefinitions, @@ -152,13 +150,12 @@ Bytecode build( } private void writeHeader( - ByteArrayOutputStream out, + DataOutputStream dos, int registerCount, int functionCount, int bddNodeCount, int bddRootRef ) throws IOException { - DataOutputStream dos = new DataOutputStream(out); dos.writeInt(Bytecode.MAGIC); dos.writeShort(Bytecode.VERSION); dos.writeShort(conditionOffsets.size()); @@ -177,8 +174,7 @@ private void writeHeader( dos.writeInt(0); // BDD table offset } - private void writeBddTable(ByteArrayOutputStream out, int[] nodes) throws IOException { - DataOutputStream dos = new DataOutputStream(out); + private void writeBddTable(DataOutputStream dos, int[] nodes) throws IOException { int nodeCount = nodes.length / 3; for (int i = 0; i < nodeCount; i++) { int baseIdx = i * 3; @@ -196,8 +192,7 @@ private int calculateFunctionTableSize() { return size; } - private void writeFunctionTable(ByteArrayOutputStream out) throws IOException { - DataOutputStream dos = new DataOutputStream(out); + private void writeFunctionTable(DataOutputStream dos) throws IOException { for (String name : functionNames) { writeUTF(dos, name); } @@ -208,43 +203,34 @@ private void writeRegisterDefinitions(ByteArrayOutputStream out, RegisterDefinit DataOutputStream dos = new DataOutputStream(out); for (RegisterDefinition reg : registers) { - // Write name writeUTF(dos, reg.name()); - - // Write required flag dos.writeByte(reg.required() ? 1 : 0); - - // Write temp flag dos.writeByte(reg.temp() ? 1 : 0); - // Write default value if (reg.defaultValue() != null) { dos.writeByte(1); // hasDefault writeConstantValue(dos, reg.defaultValue()); } else { - dos.writeByte(0); // no default + dos.writeByte(0); } - // Write builtin if (reg.builtin() != null) { dos.writeByte(1); // hasBuiltin writeUTF(dos, reg.builtin()); } else { - dos.writeByte(0); // no builtin + dos.writeByte(0); } } - } - private void writeConstantPool(ByteArrayOutputStream out) throws IOException { - DataOutputStream dos = new DataOutputStream(out); + dos.flush(); + } - // Write each constant + private void writeConstantPool(DataOutputStream dos) throws IOException { for (Object constant : constants) { writeConstantValue(dos, constant); } } - // Helper method to write a constant value private void writeConstantValue(DataOutputStream dos, Object value) throws IOException { if (value == null) { dos.writeByte(Bytecode.CONST_NULL); @@ -278,14 +264,15 @@ private void writeConstantValue(DataOutputStream dos, Object value) throws IOExc } } - // Helper to write UTF string (length-prefixed) private void writeUTF(DataOutputStream dos, String value) throws IOException { byte[] bytes = value.getBytes(StandardCharsets.UTF_8); + if (bytes.length > 65535) { + throw new IOException("String too long for UTF encoding: " + bytes.length + " bytes"); + } dos.writeShort(bytes.length); dos.write(bytes); } - // Helper to patch an int value in a byte array private void patchInt(byte[] data, int offset, int value) { data[offset] = (byte) ((value >> 24) & 0xFF); data[offset + 1] = (byte) ((value >> 16) & 0xFF); diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java index 530b84878..fe10f08f2 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/ContextProvider.java @@ -32,14 +32,14 @@ sealed interface ContextProvider { void addContext(ApiOperation operation, SerializableStruct input, Map params); final class OrchestratingProvider implements ContextProvider { - private final ConcurrentMap PROVIDERS = new ConcurrentHashMap<>(); + private final ConcurrentMap providers = new ConcurrentHashMap<>(); @Override public void addContext(ApiOperation operation, SerializableStruct input, Map params) { - var provider = PROVIDERS.get(operation.schema().id()); + var provider = providers.get(operation.schema().id()); if (provider == null) { provider = createProvider(operation); - var fresh = PROVIDERS.putIfAbsent(operation.schema().id(), provider); + var fresh = providers.putIfAbsent(operation.schema().id(), provider); if (fresh != null) { provider = fresh; } @@ -48,7 +48,7 @@ public void addContext(ApiOperation operation, SerializableStruct input, M } private ContextProvider createProvider(ApiOperation operation) { - List providers = new ArrayList<>(); + List providers = new ArrayList<>(3); var operationSchema = operation.schema(); var inputSchema = operation.inputSchema(); ContextParamProvider.compute(providers, inputSchema); @@ -59,13 +59,7 @@ private ContextProvider createProvider(ApiOperation operation) { } // Find the smithy.rules#staticContextParams on the operation. - final class StaticParamsProvider implements ContextProvider { - private final Map params; - - StaticParamsProvider(Map params) { - this.params = params; - } - + record StaticParamsProvider(Map params) implements ContextProvider { @Override public void addContext(ApiOperation operation, SerializableStruct input, Map params) { params.putAll(this.params); @@ -87,15 +81,7 @@ static void compute(List providers, Schema operation) { } // Find smithy.rules#contextParam trait on operation input members. - final class ContextParamProvider implements ContextProvider { - private final Schema member; - private final String name; - - ContextParamProvider(Schema member, String name) { - this.member = member; - this.name = name; - } - + record ContextParamProvider(Schema member, String name) implements ContextProvider { @Override public void addContext(ApiOperation operation, SerializableStruct input, Map params) { var value = input.getMemberValue(member); @@ -115,18 +101,9 @@ static void compute(List providers, Schema inputSchema) { } // Find the smithy.rules#operationContextParams trait on the operation and each JMESPath to extract. - // TODO: I wish we didn't have to convert input to a document and could use the struct directly. - // We'd need to add a new code path to the jmespath module, something like JMESPathStructQuery. - final class ContextPathProvider implements ContextProvider { - - private final String name; - private final JmespathExpression jp; - - ContextPathProvider(String name, JmespathExpression jp) { - this.name = name; - this.jp = jp; - } - + // TODO: Converting input to Document for JMESPath is expensive. Implementing something like JMESPathStructQuery + // that operates directly on SerializableStruct to avoid intermediate Document conversion could help. + record ContextPathProvider(String name, JmespathExpression jp) implements ContextProvider { @Override public void addContext(ApiOperation operation, SerializableStruct input, Map params) { var doc = Document.of(input); @@ -152,13 +129,7 @@ static void compute(List providers, Schema operation) { } // Applies multiple context providers. - final class MultiContextParamProvider implements ContextProvider { - private final List providers; - - MultiContextParamProvider(List providers) { - this.providers = providers; - } - + record MultiContextParamProvider(List providers) implements ContextProvider { static ContextProvider from(List providers) { return providers.size() == 1 ? providers.get(0) : new MultiContextParamProvider(providers); } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java index d6938012d..a33817245 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java @@ -9,9 +9,11 @@ import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; +import java.util.function.Function; import software.amazon.smithy.java.client.core.endpoint.Endpoint; import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.logging.InternalLogger; import software.amazon.smithy.rulesengine.language.EndpointRuleSet; import software.amazon.smithy.rulesengine.language.evaluation.RuleEvaluator; @@ -20,28 +22,70 @@ import software.amazon.smithy.rulesengine.language.syntax.Identifier; /** - * Resolves endpoints by interpreting the endpoint ruleset decision tree. Slower, but no startup penalty and - * always available. + * Resolves endpoints by interpreting the endpoint ruleset decision tree. This is significantly slower that using the + * bytecode interpreter, but it's not practical for a dynamic client to compile a BDD then bytecode + * (that's easily 150 ms+). */ final class DecisionTreeEndpointResolver implements EndpointResolver { - private static final InternalLogger LOGGER = InternalLogger.getLogger(BytecodeEndpointResolver.class); + private static final InternalLogger LOGGER = InternalLogger.getLogger(DecisionTreeEndpointResolver.class); + private static final ThreadLocal THREAD_LOCAL_URI_FACTORY = ThreadLocal.withInitial(UriFactory::new); private final EndpointRuleSet rules; private final List extensions; private final ContextProvider operationContextParams = new ContextProvider.OrchestratingProvider(); - private final UriFactory uriFactory; + private final UriFactory uriFactory = THREAD_LOCAL_URI_FACTORY.get(); - DecisionTreeEndpointResolver(EndpointRuleSet rules, List extensions, UriFactory uriFactory) { + // Pre-computed parameter metadata + private final Map defaultValues; + private final Map paramNameToIdentifier; + private final Map> builtinById; + + DecisionTreeEndpointResolver( + EndpointRuleSet rules, + List extensions, + Map> builtinProviders + ) { this.rules = rules; this.extensions = extensions; - this.uriFactory = uriFactory; + + // Pre-process parameters at construction time + var params = rules.getParameters().toList(); + int paramCount = params.size(); + this.defaultValues = new HashMap<>(paramCount); + this.paramNameToIdentifier = new HashMap<>(paramCount); + this.builtinById = new HashMap<>(); + + for (var param : params) { + Identifier id = param.getName(); + String name = id.toString(); + paramNameToIdentifier.put(name, id); + + // Pre-convert default values to Value objects + if (param.getDefault().isPresent()) { + defaultValues.put(id, param.getDefault().get()); + } + + // Map builtins by identifier + if (param.getBuiltIn().isPresent()) { + String builtinName = param.getBuiltIn().get(); + Function provider = builtinProviders.get(builtinName); + if (provider != null) { + builtinById.put(id, provider); + } + } + } } @Override public CompletableFuture resolveEndpoint(EndpointResolverParams params) { try { var operation = params.operation(); + + // Start with defaults + Map input = new HashMap<>(defaultValues); + + // Collect and apply supplied parameters (typically just a few) Map endpointParams = new HashMap<>(); ContextProvider.createEndpointParams( endpointParams, @@ -49,17 +93,37 @@ public CompletableFuture resolveEndpoint(EndpointResolverParams params params.context(), operation, params.inputValue()); - LOGGER.debug("Resolving endpoint of {} using VM with params: {}", operation, endpointParams); - Map input = new HashMap<>(endpointParams.size()); + + // Convert supplied values and override defaults for (var e : endpointParams.entrySet()) { - input.put(Identifier.of(e.getKey()), EndpointUtils.convertToValue(e.getValue())); + Identifier id = paramNameToIdentifier.get(e.getKey()); + if (id != null) { + input.put(id, EndpointUtils.convertToValue(e.getValue())); + } + } + + // Apply builtins only for parameters that need them + var context = params.context(); + for (var entry : builtinById.entrySet()) { + Identifier id = entry.getKey(); + if (!input.containsKey(id)) { + Object value = entry.getValue().apply(context); + if (value != null) { + input.put(id, EndpointUtils.convertToValue(value)); + } + } } + + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("Resolving endpoint of {} using VM with params: {}", operation, input); + } + var result = RuleEvaluator.evaluate(rules, input); if (result instanceof EndpointValue ev) { return CompletableFuture.completedFuture(convertEndpoint(params, ev)); - } else { - throw new IllegalStateException("Expected decision tree to return an endpoint, but found " + result); } + + throw new IllegalStateException("Expected decision tree to return an endpoint, but found " + result); } catch (RulesEvaluationError e) { return CompletableFuture.failedFuture(e); } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java index 3ebe0a298..9dad329fb 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java @@ -15,9 +15,6 @@ import software.amazon.smithy.java.core.schema.TraitKey; import software.amazon.smithy.java.logging.InternalLogger; import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; -import software.amazon.smithy.rulesengine.logic.bdd.NodeReversal; -import software.amazon.smithy.rulesengine.logic.bdd.SiftingOptimization; -import software.amazon.smithy.rulesengine.logic.cfg.Cfg; import software.amazon.smithy.rulesengine.traits.ContextParamTrait; import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; import software.amazon.smithy.rulesengine.traits.OperationContextParamsTrait; @@ -47,7 +44,7 @@ public final class EndpointRulesPlugin implements ClientPlugin { public static final TraitKey BDD_TRAIT = TraitKey.get(BddTrait.class); - private Bytecode bytecode; + private final Bytecode bytecode; private final RulesEngineBuilder engine; private EndpointRulesPlugin(Bytecode bytecode, RulesEngineBuilder engine) { @@ -120,23 +117,18 @@ public void configureClient(ClientConfig.Builder config) { var bddTrait = config.service().schema().getTrait(BDD_TRAIT); if (bddTrait != null) { LOGGER.debug("Found endpoint BDD trait on service: {}", config.service()); - bytecode = engine.compile(bddTrait); resolver = new BytecodeEndpointResolver( - bytecode, + engine.compile(bddTrait), engine.getExtensions(), engine.getBuiltinProviders()); } else { var ruleset = config.service().schema().getTrait(ENDPOINT_RULESET_TRAIT); if (ruleset != null) { - LOGGER.debug("Found endpoint rules trait on service: {}", config.service()); - var cfg = Cfg.from(ruleset.getEndpointRuleSet()); - var bdd = BddTrait.from(cfg); - var nodes = SiftingOptimization.builder().cfg(cfg).build().apply(bdd.getBdd()); - nodes = NodeReversal.reverse(nodes); - bdd = bdd.toBuilder().bdd(nodes).build(); - bytecode = engine.compile(bdd); - var providers = engine.getBuiltinProviders(); - resolver = new BytecodeEndpointResolver(bytecode, engine.getExtensions(), providers); + LOGGER.debug("Using decision tree based endpoint resolver for service: {}", config.service()); + resolver = new DecisionTreeEndpointResolver( + ruleset.getEndpointRuleSet(), + engine.getExtensions(), + engine.getBuiltinProviders()); } } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java index 007d30e10..1bb39147f 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointUtils.java @@ -45,8 +45,6 @@ public static Object convertNode(Node value, boolean allowAllTypes) { return result; } else if (value.isNullNode()) { return null; - } else { - throw new RulesEvaluationError("Unsupported endpoint ruleset parameter type: " + value); } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java index fe0d0a464..2aa34c19a 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java @@ -325,6 +325,13 @@ private Opcodes() {} *

    Stack: [..., string] → [..., substring] * *

    SUBSTRING [start:byte] [end:byte] [reverse:byte] + * + *

    Operands: + *

      + *
    • start: Starting position (0-based index)
    • + *
    • end: Ending position (exclusive)
    • + *
    • reverse: If non-zero, count positions from the end of the string
    • + *
    */ static final byte SUBSTRING = 34; @@ -365,17 +372,23 @@ private Opcodes() {} static final byte RETURN_ERROR = 38; /** - * Build and return an endpoint. Pops URL, and optionally properties and headers based on flags. + * Build and return an endpoint. Pops URL, and optionally headers and properties based on flags. * *

    Stack varies based on flags: *

      *
    • No flags: [..., url] → (returns endpoint)
    • - *
    • Properties flag: [..., properties, url] → (returns endpoint)
    • - *
    • Headers flag: [..., headers, url] → (returns endpoint)
    • - *
    • Both flags: [..., headers, properties, url] → (returns endpoint)
    • + *
    • Headers flag (bit 0): [..., headers, url] → (returns endpoint)
    • + *
    • Properties flag (bit 1): [..., properties, url] → (returns endpoint)
    • + *
    • Both flags: [..., properties, headers, url] → (returns endpoint)
    • *
    * *

    RETURN_ENDPOINT [flags:byte] + * + *

    Flag bits: + *

      + *
    • Bit 0 (0x01): Has headers
    • + *
    • Bit 1 (0x02): Has properties
    • + *
    */ static final byte RETURN_ENDPOINT = 39; @@ -392,12 +405,15 @@ private Opcodes() {} * Jump forward if the value at the top of the stack is truthy (not null and not Boolean.FALSE). * If jumping, leave the value on the stack. If not jumping, pop the value. * - *

    The offset is an unsigned 16-bit value (0-65535) relative to the instruction - * following this one (after the 2-byte offset). Backward jumps are not allowed. + *

    The offset is an unsigned 16-bit value (0-65535) representing the number of bytes to jump + * forward, relative to the instruction following this one (after the 2-byte offset). Backward + * jumps are not allowed. * *

    Stack: [..., value] → [..., value] (if jumping) or [...] (if not jumping) * *

    JT_OR_POP [offset:ushort] + * + *

    Example: At position 100, JT_OR_POP 50 would jump to position 153 (100 + 3 + 50) */ static final byte JT_OR_POP = 41; } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocator.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocator.java index 70c0cf5a4..40f5581c2 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocator.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocator.java @@ -10,65 +10,43 @@ import java.util.List; import java.util.Map; -abstract class RegisterAllocator { +final class RegisterAllocator { + private final List registry = new ArrayList<>(); + private final Map registryIndex = new HashMap<>(); // Allocate an input parameter register. - abstract byte allocate(String name, boolean required, Object defaultValue, String builtin, boolean temp); - - // Allocate a temp register for a variable by name. - abstract byte shadow(String name); - - // Gets a register that _has_ to exist by name. - abstract byte getRegister(String name); - - // Get the number of temp registers required by the program. - abstract int getTempRegisterCount(); - - abstract List getRegistry(); - - static final class FlatAllocator extends RegisterAllocator { - private final List registry = new ArrayList<>(); - private final Map registryIndex = new HashMap<>(); - private int tempRegisters = 0; - - @Override - public byte allocate(String name, boolean required, Object defaultValue, String builtin, boolean temp) { - if (registryIndex.containsKey(name)) { - throw new RulesEvaluationError("Duplicate variable name found in rules: " + name); - } - var register = new RegisterDefinition(name, required, defaultValue, builtin, temp); - registryIndex.put(name, (byte) registry.size()); - registry.add(register); - return (byte) (registry.size() - 1); - } - - @Override - public byte shadow(String name) { - Byte current = registryIndex.get(name); - if (current != null) { - return current; - } - tempRegisters++; - return allocate(name, false, null, null, true); + byte allocate(String name, boolean required, Object defaultValue, String builtin, boolean temp) { + if (registryIndex.containsKey(name)) { + throw new RulesEvaluationError("Duplicate variable name found in rules: " + name); + } else if (registry.size() >= 256) { + throw new IllegalStateException("Too many registers: " + registry.size()); } + var register = new RegisterDefinition(name, required, defaultValue, builtin, temp); + byte index = (byte) registry.size(); + registryIndex.put(name, index); + registry.add(register); + return index; + } - @Override - public byte getRegister(String name) { - var result = registryIndex.get(name); - if (result == null) { - return allocate(name, false, null, null, true); - } - return result; + // Get or allocate a temp register for a variable by name. + byte getOrAllocateRegister(String name) { + Byte existing = registryIndex.get(name); + if (existing != null) { + return existing; } + return allocate(name, false, null, null, true); + } - @Override - List getRegistry() { - return registry; + // Gets a register by name, throwing if it doesn't exist. + byte getRegister(String name) { + Byte result = registryIndex.get(name); + if (result == null) { + throw new IllegalStateException("Variable '" + name + "' is referenced but never defined"); } + return result; + } - @Override - int getTempRegisterCount() { - return tempRegisters; - } + List getRegistry() { + return registry; } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java index 9ca13b2ac..9278a6dec 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java @@ -5,12 +5,20 @@ package software.amazon.smithy.java.client.rulesengine; +import java.util.Arrays; import java.util.Map; import java.util.function.Function; import software.amazon.smithy.java.context.Context; /** * Fills register arrays with parameter values, builtin providers, and validates required parameters. + * + *

    This class optimizes for the common case where endpoint rules have fewer than 64 registers (parameters + temp + * variables). For small register counts, we use bitmask operations in {@link FastRegisterFiller} which provides O(1) + * checks for which registers need filling and validation. + * + *

    For the rare case of 64+ registers, we fall back to {@link LargeRegisterFiller} which uses simple array + * iteration. The selection is made at construction time based on the register count. */ abstract class RegisterFiller { protected final Function[] providersByRegister; @@ -77,7 +85,7 @@ static RegisterFiller of(Bytecode bytecode, Map inputRegisterMap = bytecode.getInputRegisterMap(); Object[] registerTemplate = bytecode.getRegisterTemplate(); - if (registerDefinitions.length - 1 < 64) { + if (registerDefinitions.length < 64) { return new FastRegisterFiller(registerDefinitions, builtinIndices, hardRequiredIndices, @@ -98,6 +106,7 @@ static RegisterFiller of(Bytecode bytecode, Map parameters) { // Copy template to set up defaults and clear old state System.arraycopy(registerTemplate, 0, sink, 0, registerTemplate.length); - long filled = 0L; + // Start with defaults already marked as filled + long filled = defaultMask; // Fill parameters for (var e : parameters.entrySet()) { @@ -154,7 +175,7 @@ Object[] fillRegisters(Object[] sink, Context context, Map param long missingRequired = requiredMask & ~filled; if (missingRequired != 0) { int i = Long.numberOfTrailingZeros(missingRequired); - throw new RulesEvaluationError("Required parameter missing: " + registerDefinitions[i].name()); + throw new RulesEvaluationError("Missing required parameter: " + registerDefinitions[i].name()); } return sink; @@ -165,6 +186,7 @@ Object[] fillRegisters(Object[] sink, Context context, Map param private static final class LargeRegisterFiller extends RegisterFiller { private final int[] builtinIndices; private final int[] hardRequiredIndices; + private final boolean[] hasDefault; LargeRegisterFiller( RegisterDefinition[] registerDefinitions, @@ -177,6 +199,12 @@ private static final class LargeRegisterFiller extends RegisterFiller { super(registerDefinitions, inputRegisterMap, builtinProviders, builtinIndices, registerTemplate); this.builtinIndices = builtinIndices; this.hardRequiredIndices = hardRequiredIndices; + + // Precompute what registers have defaults + this.hasDefault = new boolean[registerTemplate.length]; + for (int i = 0; i < registerTemplate.length; i++) { + hasDefault[i] = registerTemplate[i] != null; + } } @Override @@ -184,29 +212,34 @@ Object[] fillRegisters(Object[] sink, Context context, Map param // Copy template to set up defaults and clear old state System.arraycopy(registerTemplate, 0, sink, 0, registerTemplate.length); + // Track what registers have been filled (defaults are already in sink) + boolean[] filled = Arrays.copyOf(hasDefault, hasDefault.length); + // Fill parameters for (var e : parameters.entrySet()) { Integer i = inputRegisterMap.get(e.getKey()); if (i != null) { sink[i] = e.getValue(); + filled[i] = true; } } - // Fill builtins (simple null check) + // Fill builtins (only if not already filled) for (int regIndex : builtinIndices) { - if (sink[regIndex] == null) { - var provider = providersByRegister[regIndex]; - if (provider != null) { - sink[regIndex] = provider.apply(context); + if (!filled[regIndex]) { + Object result = providersByRegister[regIndex].apply(context); + if (result != null) { + sink[regIndex] = result; + filled[regIndex] = true; } } } // Validate required parameters for (int regIndex : hardRequiredIndices) { - if (sink[regIndex] == null) { - throw new RulesEvaluationError( - "Required parameter missing: " + registerDefinitions[regIndex].name()); + if (!filled[regIndex]) { + var name = registerDefinitions[regIndex].name(); + throw new RulesEvaluationError("Missing required parameter: " + name); } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java index 26da1cd67..4f0fb6f01 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java @@ -80,6 +80,10 @@ public RulesEngineBuilder addFunction(RulesFunction fn) { * @return the RulesEngine. */ public RulesEngineBuilder addExtension(RulesExtension extension) { + if (extensions.contains(extension)) { + return this; + } + extensions.add(extension); extension.putBuiltinProviders(builtinProviders); for (var f : extension.getFunctions()) { @@ -120,17 +124,31 @@ public Bytecode load(Path path) { * @return the loaded bytecode program. */ public Bytecode load(byte[] data) { + if (data.length < 44) { + throw new IllegalArgumentException("Invalid bytecode: too short"); + } + BytecodeReader reader = new BytecodeReader(data, 0); // Read and validate header int magic = reader.readInt(); if (magic != Bytecode.MAGIC) { - throw new IllegalArgumentException("Invalid magic number: " + Integer.toHexString(magic)); + throw new IllegalArgumentException("Invalid magic number: 0x" + Integer.toHexString(magic) + + " (expected 0x" + Integer.toHexString(Bytecode.MAGIC) + ")"); } short version = reader.readShort(); if (version != Bytecode.VERSION) { - throw new IllegalArgumentException("Unsupported version: " + (version >> 8) + "." + (version & 0xFF)); + int major = (version >> 8) & 0xFF; + int minor = version & 0xFF; + int expectedMajor = (Bytecode.VERSION >> 8) & 0xFF; + int expectedMinor = Bytecode.VERSION & 0xFF; + throw new IllegalArgumentException(String.format( + "Unsupported bytecode version: %d.%d (expected %d.%d)", + major, + minor, + expectedMajor, + expectedMinor)); } // Read counts @@ -142,6 +160,10 @@ public Bytecode load(byte[] data) { int bddNodeCount = reader.readInt(); int bddRootRef = reader.readInt(); + if (bddNodeCount < 0) { + throw new IllegalArgumentException("Invalid counts in bytecode header"); + } + // Read offset tables int conditionTableOffset = reader.readInt(); int resultTableOffset = reader.readInt(); @@ -149,6 +171,20 @@ public Bytecode load(byte[] data) { int constantPoolOffset = reader.readInt(); int bddTableOffset = reader.readInt(); + // Validate offsets are within bounds and in expected order + if (conditionTableOffset < 44 + || conditionTableOffset > data.length + || resultTableOffset < conditionTableOffset + || resultTableOffset > data.length + || functionTableOffset < resultTableOffset + || functionTableOffset > data.length + || bddTableOffset < functionTableOffset + || bddTableOffset > data.length + || constantPoolOffset < bddTableOffset + || constantPoolOffset > data.length) { + throw new IllegalArgumentException("Invalid offsets in bytecode header"); + } + // Load condition offsets reader.offset = conditionTableOffset; int[] conditionOffsets = new int[conditionCount]; @@ -185,6 +221,10 @@ public Bytecode load(byte[] data) { int bytecodeStart = bddTableOffset + (bddNodeCount * 12); int bytecodeLength = constantPoolOffset - bytecodeStart; + if (bytecodeLength < 0) { + throw new IllegalArgumentException("Invalid bytecode section length"); + } + // Extract bytecode section (with relative offsets) byte[] bytecode = new byte[bytecodeLength]; System.arraycopy(data, bytecodeStart, bytecode, 0, bytecodeLength); @@ -192,13 +232,19 @@ public Bytecode load(byte[] data) { // Adjust offsets to be relative to bytecode start for (int i = 0; i < conditionCount; i++) { conditionOffsets[i] -= bytecodeStart; + if (conditionOffsets[i] < 0 || conditionOffsets[i] >= bytecodeLength) { + throw new IllegalArgumentException("Invalid condition offset at index " + i); + } } + for (int i = 0; i < resultCount; i++) { resultOffsets[i] -= bytecodeStart; + if (resultOffsets[i] < 0 || resultOffsets[i] >= bytecodeLength) { + throw new IllegalArgumentException("Invalid result offset at index " + i); + } } Object[] constantPool = loadConstantPool(data, constantPoolOffset, constantCount); - return new Bytecode( bytecode, conditionOffsets, @@ -219,16 +265,23 @@ private RulesFunction[] loadFunctions(BytecodeReader reader, int count) { // Now resolve the functions in the correct order using this builder's registered functions RulesFunction[] resolvedFunctions = new RulesFunction[count]; + List missingFunctions = new ArrayList<>(); + for (int i = 0; i < count; i++) { String name = functionNames[i]; RulesFunction fn = functions.get(name); if (fn == null) { - throw new RulesEvaluationError("Unknown function in bytecode: " + name + - ". Make sure the function is registered before loading bytecode."); + missingFunctions.add(name); } resolvedFunctions[i] = fn; } + // Report all missing functions + if (!missingFunctions.isEmpty()) { + throw new RulesEvaluationError("Missing bytecode functions: " + missingFunctions + + ". Available functions: " + functions.keySet()); + } + return resolvedFunctions; } diff --git a/config/spotbugs/filter.xml b/config/spotbugs/filter.xml index 28156bf4c..d7de39b8d 100644 --- a/config/spotbugs/filter.xml +++ b/config/spotbugs/filter.xml @@ -77,13 +77,12 @@ - + - - + From 009ff13c20013ef7988d77cf18d0d88bae13d255 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Thu, 28 Aug 2025 14:24:07 -0500 Subject: [PATCH 10/13] Add missing tests, cleanup, fix tests --- .../java/aws/client/rulesengine/Bench.java | 15 +- .../java/aws/client/rulesengine/s3.json | 1478 ++++++++--------- .../smithy/java/client/core/ClientTest.java | 2 +- .../java/client/rulesengine/Bytecode.java | 15 +- .../client/rulesengine/BytecodeCompiler.java | 69 +- .../rulesengine/BytecodeDisassembler.java | 2 +- .../rulesengine/BytecodeEndpointResolver.java | 13 +- .../client/rulesengine/BytecodeEvaluator.java | 31 +- .../client/rulesengine/BytecodeWriter.java | 67 +- .../DecisionTreeEndpointResolver.java | 10 +- .../rulesengine/EndpointRulesPlugin.java | 66 +- .../java/client/rulesengine/Opcodes.java | 187 +-- .../client/rulesengine/RegisterFiller.java | 46 +- .../rulesengine/RulesEngineBuilder.java | 4 +- .../rulesengine/BytecodeCompilerTest.java | 656 ++++++++ .../rulesengine/BytecodeDisassemblerTest.java | 248 +++ .../BytecodeEndpointResolverTest.java | 468 ++++++ .../rulesengine/BytecodeEvaluatorTest.java | 783 +++++++++ .../rulesengine/BytecodeReaderTest.java | 301 ++++ .../java/client/rulesengine/BytecodeTest.java | 232 +++ .../rulesengine/BytecodeWriterTest.java | 343 ++++ .../DecisionTreeEndpointResolverTest.java | 422 +++++ .../rulesengine/EndpointRulesPluginTest.java | 71 +- .../client/rulesengine/EndpointUtilsTest.java | 156 ++ .../rulesengine/RegisterAllocatorTest.java | 153 ++ .../rulesengine/RegisterFillerTest.java | 330 ++++ .../rulesengine/RulesEngineBuilderTest.java | 466 ++++++ .../client/rulesengine/StdExtensionTest.java | 57 + .../client/rulesengine/UriFactoryTest.java | 56 + .../rulesengine/example-complex-ruleset.json | 2 +- .../client/rulesengine/minimal-ruleset.json | 2 +- .../client/rulesengine/minimal-ruleset.smithy | 2 +- .../rulesengine/runner/default-values.smithy | 136 -- .../client/rulesengine/runner/headers.smithy | 80 - .../rulesengine/runner/parse-url.smithy | 246 --- .../runner/ruleset-with-params.smithy | 193 --- .../rulesengine/runner/substring.smithy | 293 ---- .../rulesengine/runner/uri-encode.smithy | 132 -- .../rulesengine/runner/valid-hostlabel.smithy | 149 -- .../java/client/rulesengine/substring.json | 4 +- .../java/dynamicclient/DynamicOperation.java | 4 +- .../core/serde/document/DocumentUtils.java | 5 +- .../smithy/java/server/ProxyService.java | 4 +- 43 files changed, 5744 insertions(+), 2255 deletions(-) create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassemblerTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolverTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluatorTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeReaderTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriterTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolverTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocatorTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RegisterFillerTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilderTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdExtensionTest.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/UriFactoryTest.java delete mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy delete mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/headers.smithy delete mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/parse-url.smithy delete mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/ruleset-with-params.smithy delete mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/substring.smithy delete mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/uri-encode.smithy delete mode 100644 client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/valid-hostlabel.smithy diff --git a/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java b/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java index 967e2b15e..260c8be17 100644 --- a/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java +++ b/aws/client/aws-client-rulesengine/src/jmh/java/software/amazon/smithy/java/aws/client/rulesengine/Bench.java @@ -74,7 +74,7 @@ public void setup() { var ctx = Context.create(); ctx.put(EndpointSettings.REGION, "us-east-1"); - // ctx.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, Map.of("UseFIPS", true, "UseDualStack", true)); + //ctx.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, Map.of("UseFIPS", true, "UseDualStack", true)); endpointParams = EndpointResolverParams.builder() .context(ctx) @@ -105,17 +105,4 @@ private static Model customizeS3Model(Model m) { public Object evaluate() throws Exception { return endpointResolver.resolveEndpoint(endpointParams).get(); } - - // public static final TraitKey ENDPOINT_RULESET_TRAIT = - // TraitKey.get(EndpointRuleSetTrait.class); - // - // @Benchmark - // public Object compileBdd() { - // var ruleset = client.config().service().schema().getTrait(ENDPOINT_RULESET_TRAIT); - // var cfg = Cfg.from(ruleset.getEndpointRuleSet()); - // var bdd = BddTrait.from(cfg).transform(SiftingOptimization.builder().cfg(cfg).build()).transform(new NodeReversal()); - // var bytecode = engine.compile(bdd); - // var providers = engine.getBuiltinProviders(); - // return new BytecodeEndpointResolver(bytecode, engine.getExtensions(), providers); - // } } diff --git a/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json b/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json index d9bd3f8f8..1db06fe6a 100644 --- a/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json +++ b/aws/client/aws-client-rulesengine/src/shared-resources/software/amazon/smithy/java/aws/client/rulesengine/s3.json @@ -536,9 +536,6 @@ { "target": "com.amazonaws.s3#RestoreObject" }, - { - "target": "com.amazonaws.s3#SelectObjectContent" - }, { "target": "com.amazonaws.s3#UploadPart" }, @@ -593,7 +590,8 @@ "type": "boolean" } }, - "smithy.rules#bdd": { + "smithy.rules#endpointBdd": { + "version": "1.1", "parameters": { "Bucket": { "required": false, @@ -705,36 +703,20 @@ } ] }, - { - "fn": "isSet", - "argv": [ - { - "ref": "Bucket" - } - ] - }, { "fn": "booleanEquals", "argv": [ { - "ref": "ForcePathStyle" + "ref": "Accelerate" }, true ] }, - { - "fn": "isSet", - "argv": [ - { - "ref": "DisableAccessPoints" - } - ] - }, { "fn": "booleanEquals", "argv": [ { - "ref": "DisableAccessPoints" + "ref": "UseFIPS" }, true ] @@ -743,17 +725,16 @@ "fn": "isSet", "argv": [ { - "ref": "UseArnRegion" + "ref": "Endpoint" } ] }, { - "fn": "booleanEquals", + "fn": "isSet", "argv": [ { - "ref": "UseArnRegion" - }, - false + "ref": "Bucket" + } ] }, { @@ -770,104 +751,144 @@ ] }, { - "fn": "aws.parseArn", + "fn": "stringEquals", "argv": [ + "arn:", { - "ref": "Bucket" + "fn": "coalesce", + "argv": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 4, + false + ] + }, + "" + ] } - ], - "assign": "bucketArn" + ] }, { - "fn": "isSet", + "fn": "stringEquals", "argv": [ + "--x-s3", { - "fn": "getAttr", + "fn": "coalesce", "argv": [ { - "ref": "bucketArn" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 6, + true + ] }, - "resourceId[2]" + "" ] } ] }, { - "fn": "isSet", + "fn": "stringEquals", "argv": [ + "--xa-s3", { - "fn": "getAttr", + "fn": "coalesce", "argv": [ { - "ref": "bucketArn" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 0, + 7, + true + ] }, - "resourceId[4]" + "" ] } ] }, { - "fn": "getAttr", + "fn": "isSet", "argv": [ { - "ref": "bucketArn" - }, - "resourceId[0]" + "fn": "parseURL", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ] + }, + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } ], - "assign": "arnType" + "assign": "partitionResult" }, { - "fn": "stringEquals", + "fn": "isSet", "argv": [ { - "ref": "arnType" - }, - "accesspoint" + "ref": "UseS3ExpressControlEndpoint" + } ] }, { - "fn": "stringEquals", + "fn": "booleanEquals", "argv": [ { - "ref": "arnType" + "ref": "UseS3ExpressControlEndpoint" }, - "" + true ] }, { - "fn": "stringEquals", + "fn": "parseURL", "argv": [ { - "ref": "Region" - }, + "ref": "Endpoint" + } + ], + "assign": "url" + }, + { + "fn": "stringEquals", + "argv": [ + "http", { "fn": "getAttr", "argv": [ { - "ref": "bucketArn" + "ref": "url" }, - "region" + "scheme" ] } ] }, { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[1]" - ], - "assign": "accessPointName" - }, - { - "fn": "stringEquals", + "fn": "aws.isVirtualHostableS3Bucket", "argv": [ { - "ref": "accessPointName" + "ref": "Bucket" }, - "" + true ] }, { @@ -876,20 +897,23 @@ { "ref": "Bucket" }, - 0, - 4, - false + 8, + 12, + true ], - "assign": "arnPrefix" + "assign": "regionPrefix" }, { - "fn": "stringEquals", + "fn": "substring", "argv": [ { - "ref": "arnPrefix" + "ref": "Bucket" }, - "arn:" - ] + 32, + 49, + true + ], + "assign": "outpostId_ssa_2" }, { "fn": "substring", @@ -909,7 +933,7 @@ { "ref": "accessPointSuffix" }, - "--xa-s3" + "--op-s3" ] }, { @@ -918,335 +942,334 @@ { "ref": "Bucket" }, - 0, - 6, + 49, + 50, true ], - "assign": "bucketSuffix" + "assign": "hardwareType" }, { "fn": "stringEquals", "argv": [ + "aws-cn", { - "ref": "bucketSuffix" - }, - "--x-s3" + "fn": "getAttr", + "argv": [ + { + "ref": "partitionResult" + }, + "name" + ] + } ] }, { - "fn": "isSet", + "fn": "stringEquals", "argv": [ { - "ref": "UseS3ExpressControlEndpoint" - } + "ref": "regionPrefix" + }, + "beta" ] }, { "fn": "booleanEquals", "argv": [ { - "ref": "UseS3ExpressControlEndpoint" + "ref": "ForcePathStyle" }, true ] }, { - "fn": "isSet", + "fn": "aws.parseArn", "argv": [ { - "ref": "DisableS3ExpressSessionAuth" + "ref": "Bucket" } ] }, { - "fn": "booleanEquals", + "fn": "aws.isVirtualHostableS3Bucket", "argv": [ { - "ref": "DisableS3ExpressSessionAuth" + "ref": "Bucket" }, - true + false ] }, { - "fn": "substring", + "fn": "isValidHostLabel", "argv": [ { - "ref": "Bucket" + "ref": "Region" }, - 0, - 7, - true - ], - "assign": "bucketAliasSuffix" + false + ] }, { - "fn": "substring", + "fn": "aws.parseArn", "argv": [ { "ref": "Bucket" - }, - 32, - 49, - true + } ], - "assign": "outpostId_1" + "assign": "bucketArn" }, { - "fn": "stringEquals", + "fn": "uriEncode", "argv": [ { - "ref": "bucketAliasSuffix" - }, - "--op-s3" - ] + "ref": "Bucket" + } + ], + "assign": "uri_encoded_bucket" }, { - "fn": "substring", + "fn": "booleanEquals", "argv": [ + true, { - "ref": "Bucket" - }, - 49, - 50, - true - ], - "assign": "hardwareType" + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + } + ] }, { - "fn": "aws.partition", + "fn": "isSet", "argv": [ { - "ref": "Region" + "ref": "UseObjectLambdaEndpoint" } - ], - "assign": "regionPartition" + ] }, { - "fn": "substring", + "fn": "booleanEquals", "argv": [ { - "ref": "Bucket" + "ref": "UseObjectLambdaEndpoint" }, - 8, - 12, true - ], - "assign": "regionPrefix" + ] }, { - "fn": "booleanEquals", + "fn": "isValidHostLabel", "argv": [ { - "ref": "Accelerate" + "ref": "Region" }, true ] }, { - "fn": "isSet", + "fn": "booleanEquals", "argv": [ { - "ref": "Endpoint" - } + "ref": "UseDualStack" + }, + true ] }, { - "fn": "isSet", + "fn": "booleanEquals", "argv": [ + false, { - "fn": "parseURL", + "fn": "getAttr", "argv": [ { - "ref": "Endpoint" - } + "ref": "url" + }, + "isIp" ] } ] }, { - "fn": "aws.parseArn", + "fn": "isSet", "argv": [ { - "ref": "Bucket" + "ref": "DisableS3ExpressSessionAuth" } ] }, { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { "ref": "Region" - } - ], - "assign": "partitionResult" + }, + "aws-global" + ] }, { - "fn": "aws.isVirtualHostableS3Bucket", + "fn": "booleanEquals", "argv": [ { - "ref": "Bucket" + "ref": "DisableS3ExpressSessionAuth" }, - false + true ] }, { - "fn": "parseURL", + "fn": "substring", "argv": [ { - "ref": "Endpoint" - } + "ref": "Bucket" + }, + 7, + 15, + true ], - "assign": "url" - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - } - ] + "assign": "s3expressAvailabilityZoneId_ssa_6" }, { - "fn": "aws.isVirtualHostableS3Bucket", + "fn": "substring", "argv": [ { "ref": "Bucket" }, + 6, + 14, true - ] + ], + "assign": "s3expressAvailabilityZoneId_ssa_1" }, { "fn": "stringEquals", "argv": [ - "http", + "--", { - "fn": "getAttr", + "fn": "coalesce", "argv": [ { - "ref": "url" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 14, + 16, + true + ] }, - "scheme" + "" ] } ] }, { - "fn": "uriEncode", + "fn": "stringEquals", "argv": [ { - "ref": "Bucket" - } - ], - "assign": "uri_encoded_bucket" + "ref": "Region" + }, + "us-east-1" + ] }, { "fn": "booleanEquals", "argv": [ { - "ref": "UseFIPS" + "ref": "UseGlobalEndpoint" }, true ] }, { - "fn": "aws.partition", + "fn": "isSet", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "region" - ] + "ref": "DisableAccessPoints" } - ], - "assign": "bucketPartition" + ] }, { - "fn": "isValidHostLabel", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" + "ref": "DisableAccessPoints" }, - false + true ] }, { - "fn": "stringEquals", + "fn": "isSet", "argv": [ - "aws-cn", { "fn": "getAttr", "argv": [ { - "ref": "partitionResult" + "ref": "bucketArn" }, - "name" + "resourceId[2]" ] } ] }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - }, { "fn": "substring", "argv": [ { "ref": "Bucket" }, - 7, + 6, 15, true ], - "assign": "s3expressAvailabilityZoneId_5" + "assign": "s3expressAvailabilityZoneId_ssa_2" }, { - "fn": "substring", + "fn": "stringEquals", "argv": [ + "--", { - "ref": "Bucket" - }, - 6, - 14, - true - ], - "assign": "s3expressAvailabilityZoneId" + "fn": "coalesce", + "argv": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 15, + 17, + true + ] + }, + "" + ] + } + ] }, { - "fn": "substring", + "fn": "isSet", "argv": [ { - "ref": "Bucket" - }, - 14, - 16, - true - ], - "assign": "s3expressAvailabilityZoneDelim" + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[4]" + ] + } + ] }, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "s3expressAvailabilityZoneDelim" + "ref": "bucketArn" }, - "--" - ] + "resourceId[0]" + ], + "assign": "arnType" }, { "fn": "substring", @@ -1254,32 +1277,43 @@ { "ref": "Bucket" }, - 15, - 17, + 7, + 16, true ], - "assign": "s3expressAvailabilityZoneDelim_1" + "assign": "s3expressAvailabilityZoneId_ssa_7" }, { "fn": "stringEquals", "argv": [ + "--", { - "ref": "s3expressAvailabilityZoneDelim_1" - }, - "--" + "fn": "coalesce", + "argv": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 16, + 18, + true + ] + }, + "" + ] + } ] }, { - "fn": "substring", + "fn": "stringEquals", "argv": [ { - "ref": "Bucket" + "ref": "arnType" }, - 6, - 15, - true - ], - "assign": "s3expressAvailabilityZoneId_1" + "accesspoint" + ] }, { "fn": "substring", @@ -1288,22 +1322,19 @@ "ref": "Bucket" }, 6, - 19, + 20, true ], - "assign": "s3expressAvailabilityZoneId_2" + "assign": "s3expressAvailabilityZoneId_ssa_4" }, { - "fn": "substring", + "fn": "stringEquals", "argv": [ { - "ref": "Bucket" + "ref": "arnType" }, - 16, - 18, - true - ], - "assign": "s3expressAvailabilityZoneDelim_2" + "" + ] }, { "fn": "substring", @@ -1312,85 +1343,101 @@ "ref": "Bucket" }, 7, - 16, + 20, true ], - "assign": "s3expressAvailabilityZoneId_6" + "assign": "s3expressAvailabilityZoneId_ssa_8" }, { "fn": "stringEquals", "argv": [ + "--", { - "ref": "s3expressAvailabilityZoneDelim_2" - }, - "--" + "fn": "coalesce", + "argv": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 20, + 22, + true + ] + }, + "" + ] + } ] }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 19, - 21, - true - ], - "assign": "s3expressAvailabilityZoneDelim_3" - }, { "fn": "stringEquals", "argv": [ + "", { - "ref": "s3expressAvailabilityZoneDelim_3" - }, - "--" + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + } ] }, { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 20, - true - ], - "assign": "s3expressAvailabilityZoneId_7" - }, - { - "fn": "substring", + "fn": "aws.partition", "argv": [ { - "ref": "Bucket" - }, - 20, - 22, - true + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "region" + ] + } ], - "assign": "s3expressAvailabilityZoneDelim_4" + "assign": "bucketPartition" }, { "fn": "stringEquals", "argv": [ + "s3-object-lambda", { - "ref": "s3expressAvailabilityZoneDelim_4" - }, - "--" + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "service" + ] + } ] }, { - "fn": "substring", + "fn": "stringEquals", "argv": [ + "--", { - "ref": "Bucket" - }, - 21, - 23, - true - ], - "assign": "s3expressAvailabilityZoneDelim_5" + "fn": "coalesce", + "argv": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 21, + 23, + true + ] + }, + "" + ] + } + ] }, { "fn": "substring", @@ -1402,15 +1449,21 @@ 21, true ], - "assign": "s3expressAvailabilityZoneId_8" + "assign": "s3expressAvailabilityZoneId_ssa_9" }, { "fn": "stringEquals", "argv": [ + "s3-outposts", { - "ref": "s3expressAvailabilityZoneDelim_5" - }, - "--" + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "service" + ] + } ] }, { @@ -1420,22 +1473,30 @@ "ref": "Bucket" }, 6, - 20, + 19, true ], - "assign": "s3expressAvailabilityZoneId_3" + "assign": "s3expressAvailabilityZoneId_ssa_3" }, { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - false, + "--", { - "fn": "getAttr", + "fn": "coalesce", "argv": [ { - "ref": "url" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 19, + 21, + true + ] }, - "isIp" + "" ] } ] @@ -1443,51 +1504,88 @@ { "fn": "stringEquals", "argv": [ - "", + "--", { - "fn": "getAttr", + "fn": "coalesce", "argv": [ { - "ref": "bucketArn" + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 27, + 29, + true + ] }, - "region" + "" ] } ] }, { - "fn": "isSet", + "fn": "substring", "argv": [ { - "ref": "UseObjectLambdaEndpoint" - } - ] + "ref": "Bucket" + }, + 7, + 27, + true + ], + "assign": "s3expressAvailabilityZoneId_ssa_10" }, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "regionPrefix" + "ref": "bucketArn" }, - "beta" - ] + "resourceId[1]" + ], + "assign": "outpostId_ssa_1" }, { - "fn": "booleanEquals", + "fn": "isValidHostLabel", "argv": [ { - "ref": "UseObjectLambdaEndpoint" + "ref": "outpostId_ssa_1" }, - true + false ] }, { - "fn": "isValidHostLabel", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "bucketArn" }, - true + "resourceId[1]" + ], + "assign": "accessPointName_ssa_1" + }, + { + "fn": "stringEquals", + "argv": [ + "--", + { + "fn": "coalesce", + "argv": [ + { + "fn": "substring", + "argv": [ + { + "ref": "Bucket" + }, + 26, + 28, + true + ] + }, + "" + ] + } ] }, { @@ -1496,102 +1594,92 @@ { "ref": "Bucket" }, + 6, 26, - 28, true ], - "assign": "s3expressAvailabilityZoneDelim_6" + "assign": "s3expressAvailabilityZoneId_ssa_5" }, { "fn": "stringEquals", "argv": [ { - "ref": "Region" + "ref": "accessPointName_ssa_1" }, - "aws-global" + "" ] }, { - "fn": "isValidHostLabel", + "fn": "booleanEquals", "argv": [ { - "ref": "outpostId_1" + "ref": "DisableMultiRegionAccessPoints" }, - false + true ] }, { "fn": "stringEquals", "argv": [ - "s3-object-lambda", + { + "ref": "Region" + }, { "fn": "getAttr", "argv": [ { "ref": "bucketArn" }, - "service" + "region" ] } ] }, { - "fn": "stringEquals", + "fn": "isValidHostLabel", "argv": [ { - "ref": "s3expressAvailabilityZoneDelim_6" + "ref": "accessPointName_ssa_1" }, - "--" + true ] }, { "fn": "stringEquals", "argv": [ { - "ref": "hardwareType" + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "partition" + ] }, - "e" - ] - }, - { - "fn": "stringEquals", - "argv": [ - "s3-outposts", { "fn": "getAttr", "argv": [ { - "ref": "bucketArn" + "ref": "partitionResult" }, - "service" + "name" ] } ] }, { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "resourceId[1]" - ], - "assign": "outpostId" - }, - { - "fn": "isValidHostLabel", + "fn": "isSet", "argv": [ { - "ref": "accessPointName" - }, - true + "ref": "UseArnRegion" + } ] }, { - "fn": "isValidHostLabel", + "fn": "booleanEquals", "argv": [ { - "ref": "outpostId" + "ref": "UseArnRegion" }, false ] @@ -1611,34 +1699,13 @@ { "fn": "getAttr", "argv": [ - { - "ref": "partitionResult" - }, - "name" - ] - } - ] - }, - { - "fn": "stringEquals", - "argv": [ - { - "ref": "hardwareType" - }, - "o" - ] - }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 6, - 26, - true - ], - "assign": "s3expressAvailabilityZoneId_4" + { + "ref": "partitionResult" + }, + "name" + ] + } + ] }, { "fn": "isValidHostLabel", @@ -1655,53 +1722,32 @@ true ] }, - { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 7, - 27, - true - ], - "assign": "s3expressAvailabilityZoneId_9" - }, { "fn": "stringEquals", "argv": [ - "s3", + "", { "fn": "getAttr", "argv": [ { "ref": "bucketArn" }, - "service" + "accountId" ] } ] }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "DisableMultiRegionAccessPoints" - }, - true - ] - }, { "fn": "stringEquals", "argv": [ - "", + "s3", { "fn": "getAttr", "argv": [ { "ref": "bucketArn" }, - "accountId" + "service" ] } ] @@ -1722,23 +1768,14 @@ ] }, { - "fn": "stringEquals", + "fn": "isValidHostLabel", "argv": [ { - "ref": "Region" + "ref": "accessPointName_ssa_1" }, - "us-east-1" + false ] }, - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "mrapPartition" - }, { "fn": "getAttr", "argv": [ @@ -1757,7 +1794,7 @@ }, "resourceId[3]" ], - "assign": "accessPointName_1" + "assign": "accessPointName_ssa_2" }, { "fn": "stringEquals", @@ -1769,98 +1806,71 @@ ] }, { - "fn": "substring", - "argv": [ - { - "ref": "Bucket" - }, - 27, - 29, - true - ], - "assign": "s3expressAvailabilityZoneDelim_7" - }, - { - "fn": "booleanEquals", + "fn": "isValidHostLabel", "argv": [ { - "ref": "UseGlobalEndpoint" + "ref": "outpostId_ssa_2" }, - true + false ] }, { "fn": "stringEquals", "argv": [ { - "ref": "s3expressAvailabilityZoneDelim_7" - }, - "--" - ] - }, - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "accessPointName" + "ref": "hardwareType" }, - false + "e" ] }, { "fn": "stringEquals", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "bucketArn" - }, - "partition" - ] + "ref": "hardwareType" }, - { - "fn": "getAttr", - "argv": [ - { - "ref": "mrapPartition" - }, - "name" - ] - } + "o" ] } ], "results": [ { + "conditions": [], "error": "Accelerate cannot be used with FIPS", "type": "error" }, { + "conditions": [], "error": "Cannot set dual-stack in combination with a custom endpoint.", "type": "error" }, { + "conditions": [], "error": "A custom endpoint cannot be combined with FIPS", "type": "error" }, { + "conditions": [], "error": "A custom endpoint cannot be combined with S3 Accelerate", "type": "error" }, { + "conditions": [], "error": "Partition does not support FIPS", "type": "error" }, { + "conditions": [], "error": "S3Express does not support Dual-stack.", "type": "error" }, { + "conditions": [], "error": "S3Express does not support S3 Accelerate.", "type": "error" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", "properties": { @@ -1879,6 +1889,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", "properties": { @@ -1897,10 +1908,12 @@ "type": "endpoint" }, { + "conditions": [], "error": "S3Express bucket name is not a valid virtual hostable name.", "type": "error" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", "properties": { @@ -1919,6 +1932,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", "properties": { @@ -1937,6 +1951,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -1955,6 +1970,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -1973,8 +1989,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_1}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -1991,8 +2008,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_1}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2009,8 +2027,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_1}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_2}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2027,8 +2046,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_1}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_2}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2045,8 +2065,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_2}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_3}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2063,8 +2084,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_2}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_3}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2081,8 +2103,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_3}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_4}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2099,8 +2122,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_3}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_4}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2117,8 +2141,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_4}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_5}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2135,8 +2160,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_4}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_5}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2153,12 +2179,14 @@ "type": "endpoint" }, { + "conditions": [], "error": "Unrecognized S3Express bucket name format.", "type": "error" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_1}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2175,8 +2203,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_1}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2193,8 +2222,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_1}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_2}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2211,8 +2241,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_1}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_2}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2229,8 +2260,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_2}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_3}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2247,8 +2279,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_2}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_3}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2265,8 +2298,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_3}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_4}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2283,8 +2317,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_3}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_4}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2301,8 +2336,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_4}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_5}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2319,8 +2355,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_4}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_5}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2337,8 +2374,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_5}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_6}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2355,8 +2393,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_5}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_6}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2373,8 +2412,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_6}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_7}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2391,8 +2431,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_6}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_7}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2409,8 +2450,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_7}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_8}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2427,8 +2469,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_7}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_8}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2445,8 +2488,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_8}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_9}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2463,8 +2507,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_8}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_9}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2481,8 +2526,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_9}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_10}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2499,8 +2545,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_9}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_10}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2517,8 +2564,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_5}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_6}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2535,8 +2583,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_5}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_6}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2553,8 +2602,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_6}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_7}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2571,8 +2621,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_6}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_7}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2589,8 +2640,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_7}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_8}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2607,8 +2659,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_7}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_8}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2625,8 +2678,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_8}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_9}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2643,8 +2697,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_8}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_9}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2661,8 +2716,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_9}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId_ssa_10}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2679,8 +2735,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_9}.{Region}.{partitionResult#dnsSuffix}", + "url": "https://{Bucket}.s3express-{s3expressAvailabilityZoneId_ssa_10}.{Region}.{partitionResult#dnsSuffix}", "properties": { "backend": "S3Express", "authSchemes": [ @@ -2697,6 +2754,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}{url#path}", "properties": { @@ -2715,6 +2773,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -2733,6 +2792,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -2751,10 +2811,12 @@ "type": "endpoint" }, { + "conditions": [], "error": "Expected a endpoint to be specified but no endpoint was found", "type": "error" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.ec2.{url#authority}", "properties": { @@ -2780,8 +2842,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "url": "https://{Bucket}.ec2.s3-outposts.{Region}.{partitionResult#dnsSuffix}", "properties": { "authSchemes": [ { @@ -2805,8 +2868,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.op-{outpostId_1}.{url#authority}", + "url": "https://{Bucket}.op-{outpostId_ssa_2}.{url#authority}", "properties": { "authSchemes": [ { @@ -2830,8 +2894,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{Bucket}.op-{outpostId_1}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", + "url": "https://{Bucket}.op-{outpostId_ssa_2}.s3-outposts.{Region}.{partitionResult#dnsSuffix}", "properties": { "authSchemes": [ { @@ -2855,22 +2920,27 @@ "type": "endpoint" }, { + "conditions": [], "error": "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", "type": "error" }, { + "conditions": [], "error": "Custom endpoint `{Endpoint}` was not a valid URI", "type": "error" }, { + "conditions": [], "error": "S3 Accelerate cannot be used in this region", "type": "error" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", "properties": { @@ -2888,6 +2958,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -2905,6 +2976,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", "properties": { @@ -2922,6 +2994,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -2939,6 +3012,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", "properties": { @@ -2956,6 +3030,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", "properties": { @@ -2973,6 +3048,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", "properties": { @@ -2990,6 +3066,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -3007,6 +3084,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", "properties": { @@ -3024,6 +3102,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", "properties": { @@ -3041,6 +3120,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", "properties": { @@ -3058,6 +3138,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{Bucket}.{url#authority}{url#path}", "properties": { @@ -3075,6 +3156,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", "properties": { @@ -3092,6 +3174,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", "properties": { @@ -3109,6 +3192,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3.{partitionResult#dnsSuffix}", "properties": { @@ -3126,6 +3210,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3.{partitionResult#dnsSuffix}", "properties": { @@ -3143,6 +3228,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -3160,32 +3246,39 @@ "type": "endpoint" }, { + "conditions": [], "error": "Invalid region: region was not a valid DNS name.", "type": "error" }, { + "conditions": [], "error": "S3 Object Lambda does not support Dual-stack", "type": "error" }, { + "conditions": [], "error": "S3 Object Lambda does not support S3 Accelerate", "type": "error" }, { + "conditions": [], "error": "Access points are not supported for this operation", "type": "error" }, { + "conditions": [], "error": "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: Missing account id", "type": "error" }, { + "conditions": [], "endpoint": { - "url": "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", + "url": "{url#scheme}://{accessPointName_ssa_1}-{bucketArn#accountId}.{url#authority}{url#path}", "properties": { "authSchemes": [ { @@ -3201,8 +3294,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "url": "https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", "properties": { "authSchemes": [ { @@ -3218,8 +3312,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "url": "https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", "properties": { "authSchemes": [ { @@ -3235,44 +3330,54 @@ "type": "endpoint" }, { - "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", + "conditions": [], + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName_ssa_1}`", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", "type": "error" }, { + "conditions": [], "error": "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", "type": "error" }, { + "conditions": [], "error": "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: bucket ARN is missing a region", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", "type": "error" }, { + "conditions": [], "error": "Access Points do not support S3 Accelerate", "type": "error" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "url": "https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", "properties": { "authSchemes": [ { @@ -3288,8 +3393,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "url": "https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", "properties": { "authSchemes": [ { @@ -3305,8 +3411,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "url": "https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", "properties": { "authSchemes": [ { @@ -3322,8 +3429,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", + "url": "{url#scheme}://{accessPointName_ssa_1}-{bucketArn#accountId}.{url#authority}{url#path}", "properties": { "authSchemes": [ { @@ -3339,8 +3447,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "url": "https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", "properties": { "authSchemes": [ { @@ -3356,28 +3465,34 @@ "type": "endpoint" }, { + "conditions": [], "error": "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", "type": "error" }, { + "conditions": [], "error": "S3 MRAP does not support dual-stack", "type": "error" }, { + "conditions": [], "error": "S3 MRAP does not support FIPS", "type": "error" }, { + "conditions": [], "error": "S3 MRAP does not support S3 Accelerate", "type": "error" }, { + "conditions": [], "error": "Invalid configuration: Multi-Region Access Point ARNs are disabled.", "type": "error" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", + "url": "https://{accessPointName_ssa_1}.accesspoint.s3-global.{partitionResult#dnsSuffix}", "properties": { "authSchemes": [ { @@ -3395,32 +3510,39 @@ "type": "endpoint" }, { - "error": "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", + "conditions": [], + "error": "Client was configured for partition `{partitionResult#name}` but bucket referred to partition `{bucketArn#partition}`", "type": "error" }, { + "conditions": [], "error": "Invalid Access Point Name", "type": "error" }, { + "conditions": [], "error": "S3 Outposts does not support Dual-stack", "type": "error" }, { + "conditions": [], "error": "S3 Outposts does not support FIPS", "type": "error" }, { + "conditions": [], "error": "S3 Outposts does not support S3 Accelerate", "type": "error" }, { + "conditions": [], "error": "Invalid Arn: Outpost Access Point ARN contains sub resources", "type": "error" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName_1}-{bucketArn#accountId}.{outpostId}.{url#authority}", + "url": "https://{accessPointName_ssa_2}-{bucketArn#accountId}.{outpostId_ssa_1}.{url#authority}", "properties": { "authSchemes": [ { @@ -3444,8 +3566,9 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { - "url": "https://{accessPointName_1}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", + "url": "https://{accessPointName_ssa_2}-{bucketArn#accountId}.{outpostId_ssa_1}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", "properties": { "authSchemes": [ { @@ -3469,42 +3592,52 @@ "type": "endpoint" }, { + "conditions": [], "error": "Expected an outpost type `accesspoint`, found {outpostType}", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: expected an access point name", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: Expected a 4-component resource", "type": "error" }, { - "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", + "conditions": [], + "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId_ssa_1}`", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: The Outpost Id was not set", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: No ARN type specified", "type": "error" }, { + "conditions": [], "error": "Invalid ARN: `{Bucket}` was not a valid ARN", "type": "error" }, { + "conditions": [], "error": "Path-style addressing cannot be used with ARN buckets", "type": "error" }, { + "conditions": [], "endpoint": { "url": "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3522,6 +3655,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3539,6 +3673,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3556,6 +3691,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3573,6 +3709,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3590,6 +3727,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3607,6 +3745,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", "properties": { @@ -3624,6 +3763,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", "properties": { @@ -3641,6 +3781,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3658,6 +3799,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3675,6 +3817,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", "properties": { @@ -3692,10 +3835,12 @@ "type": "endpoint" }, { + "conditions": [], "error": "Path-style addressing cannot be used with S3 Accelerate", "type": "error" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}{url#path}", "properties": { @@ -3713,6 +3858,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -3730,6 +3876,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -3747,6 +3894,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", "properties": { @@ -3764,6 +3912,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -3781,6 +3930,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", "properties": { @@ -3798,6 +3948,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -3815,6 +3966,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", "properties": { @@ -3832,6 +3984,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -3849,6 +4002,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}{url#path}", "properties": { @@ -3866,6 +4020,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "{url#scheme}://{url#authority}{url#path}", "properties": { @@ -3883,6 +4038,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.{partitionResult#dnsSuffix}", "properties": { @@ -3900,6 +4056,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.{partitionResult#dnsSuffix}", "properties": { @@ -3917,6 +4074,7 @@ "type": "endpoint" }, { + "conditions": [], "endpoint": { "url": "https://s3.{Region}.{partitionResult#dnsSuffix}", "properties": { @@ -3934,13 +4092,14 @@ "type": "endpoint" }, { + "conditions": [], "error": "A region must be set when sending requests to S3.", "type": "error" } ], "root": 2, - "nodes": "AQIBAAa6hq9fAn4ILgoMMGIMQkYORC4QShK6hq9fWBoUYFoWjgEYUpIB2ApSXoqEr18cYCYejgEgIpIBogoilAEkqoWvX5gBqIavX6qGr1+OASgqkgGMCyqUASyqha9fmAGkhq9fpoavX0owyApOOjJYgA80YISEr182jgE4qoWvX5IB2Aqqha9fWIAPPGCEhK9fPo4BQEKSAegKQpQBRKqFr1+YAbCGr1+yhq9fRIgPSEpK+gpYgoSvX0xgWk6OAVBSkgGGC1KUAVSqha9fmAG0hq9fVrwBWLiGr1/IAbaGr1+4hq9fjgFcXpIBjAtelAFgqoWvX5gBrIavX66Gr19CeGREbGZKaLqGr19YavSEr19eioSvX/KEr19KbsgKTnRwWIAPcmCEhK9f9ISvX1iAD3ZghISvX/CEr19EiA96Snz6CliChK9f9ISvXwTKCYABBoIBhAEIqgSEAQqGAYgBDKIBiAEOjAGKARCOAcAEEI4B9AQSnAGQARSWAZIBFpQBzAgYmgG6BBaYAcwIGJoB2gYazAiIAhTUA54BFqABzAgY2AO6BA6mAaQBEKgBwAQQqAH0BBLOA6oBFLABrAEWrgHMCBi0AagFFrIBzAgYtAHaBhrMCLYBHIgCuAEeugGUCCCUCLwBJr4BwAEowAvAASrCAcQBLPQMxAE2xgHQATjIAdABOsoB0AE8zAHQAT7OAdABQJIL0AFC9gHSAUTkAdQBStgB1gFY4AHcAUzsCNoBWN4B3AFghAL0AV6KhK9f4AFghALiAYwB2geyha9fRuYBwApK6AHwAUycCeoBTuwB8AFS7gHwAVSWCfABWIAP8gFghISvX/QBjAHwB7KFr19EiA/4AUr6AfwBTL4J/AFYgoSvX/4BYIQCgAKMAYgIggKcAa6Fr1+yha9fjAGQCIYCnAGsha9fsoWvXx6KApQIIJQIjAImjgKQAijAC5ACKpIClAIs9AyUAjaWAqACOJgCoAI6mgKgAjycAqACPp4CoAJAkgugAkKwA6ICROgCpAJKpgL4A0zsCKgCWLwCqgJarAL+A2CuAvYCjAGQCLACnAGsha9fsgKqAbQCwoWvX7ABtgLAha9ftAG4AtiFr1+6AboCvoWvX8wB0oWvX7yFr19avgKABF6KhK9fwAJg2gLCAowB2gfEApwB0ALGAqoByALCha9fsAHKAsCFr1+0AcwC2IWvX7oBzgK+ha9fzAHQha9fvIWvX6oB0gLCha9fsAHUAsCFr1+4AbSFr1/WAroB2AK+ha9fzAG4ha9fvIWvX4wBkAjcApwBrIWvX94CqgHgAsKFr1+wAeICwIWvX7QB5ALYha9fugHmAr6Fr1/MAc6Fr1+8ha9fRuoCwApK7AKSBEycCe4CTo4D8AJYgA/yAlr0ApQEYISEr1/2AowB8Af4ApwBhAP6AqoB/ALCha9fsAH+AsCFr1+0AYAD2IWvX7oBggO+ha9fzAHWha9fvIWvX6oBhgPCha9fsAGIA8CFr1+4AbSFr1+KA7oBjAO+ha9fzAG6ha9fvIWvX1KQA5IDVJYJkgNYgA+UA1qWA5QEYISEr1+YA4wB8AeaA5wBpgOcA6oBngPCha9fsAGgA8CFr1+0AaID2IWvX7oBpAO+ha9fzAHUha9fvIWvX6oBqAPCha9fsAGqA8CFr1+4AbSFr1+sA7oBrgO+ha9fzAG2ha9fvIWvX0SID7IDSrQDngRMvgm2A1iChK9fuANaugOgBGDAA7wDjAGICL4DnAGuha9fxAOMAZAIwgOcAayFr1/EA6oBxgPCha9fsAHIA8CFr1+0AcoD2IWvX7oBzAO+ha9fzAHMha9fvIWvXxTUA9ADFtIDzAgY2AOoBRbWA8wIGNgD2gYazAjaAx7cA5QIIJQI3gMm4APiAyjAC+IDKuQD5gMs9AzmAzboA/IDOOoD8gM67APyAzzuA/IDPvAD8gNAkgvyA0KYBPQDRIYE9gNK+gP4A1iCBP4DTOwI/ANYgAT+A2CmBJYEXoqEr1+CBGCmBIQEjAHaB8SFr19GiATACkqKBJIETJwJjAROjgSSBFKQBJIEVJYJkgRYgA+UBGCEhK9flgSMAfAHxIWvX0SID5oESpwEngRMvgmeBFiChK9foARgpgSiBIwBiAikBJwBroWvX8SFr1+MAZAIqAScAayFr1/Eha9fCqwErgQMvASuBA6yBLAEELQEwAQQtAT0BBTWBrYEFrgEzAgYrAe6BBrMCOYFDvIEvgQQogXABCLCBPQEJMQE9AQmxgTIBCjAC8gEKsoEzAQs9AzMBDbOBNgEONAE2AQ60gTYBDzUBNgEPtYE2ARAkgvYBELsBNoEROAE3ARK3gSChq9fTOwI6glG4gTACkrkBPAJTJwJ5gRO6ATwCVLqBPAJVJYJ8AlEiA/uBErwBPYJTL4J9gkQogX0BCb2BPgEKMAL+AQq+gT8BCz0DPwENv4EiAU4gAWIBTqCBYgFPIQFiAU+hgWIBUCSC4gFQpwFigVEkAWMBUqOBbqGr19M7AiUCkaSBcAKSpQFyApMnAmWBU6YBc4KUpoF3gpUlgneCkSID54FSqAF+gpMvgn8ChTWBqQFFqYFzAgYrAeoBRrMCKoFHOYFrAUmrgWwBSjAC7AFKrIFtAUs9Ay0BTa2BcAFOLgFwAU6ugXABTy8BcAFPr4FwAVAkgvABUKaB8IFRM4FxAVKyAXGBViAB8wFTOwIygVY/gbMBWCoB94FRtAFwApK0gXaBUycCdQFTtYF2gVS2AXaBVSWCdoFWIAP3AVghISvX94FnAHKha9f4AWiAeIF/oWvX6QB5AX8ha9fqAGyha9f+oWvXyboBeoFKMAL6gUq7AXuBSz0DO4FNvAF+gU48gX6BTr0BfoFPPYF+gU++AX6BUCSC/oFQpoH/AVEjAb+BUqCBoAGWIAHiAZM7AiEBlj+BoYGWooGiAZgqAe6BmCoB5wGRo4GwApKkgaQBliAD7gGTJwJlAZOsAaWBliAD5gGWpoGuAZghISvX5wGnAHKha9fngaiAaAG/oWvX6QBogb8ha9fqAGkBvqFr1+qAaYGwoWvX7ABqAbAha9fugGqBr6Fr1/AAawG+IWvX8IBrgb2ha9fxAHyha9f9IWvX1KyBrQGVJYJtAZYgA+2BlrABrgGYISEr1+6BpwByoWvX7wGogG+Bv6Fr1+kAfqFr1/8ha9fYISEr1/CBpwByoWvX8QGogHGBv6Fr1+kAcgG/IWvX6gBygb6ha9fqgHMBsKFr1+wAc4GwIWvX7oB0Aa+ha9fwAHSBviFr1/CAdQG9oWvX8QB8IWvX/SFr18W2AbMCBisB9oGGswI3AYm3gbgBijAC+AGKuIG5AYs9AzkBjbmBvAGOOgG8AY66gbwBjzsBvAGPu4G8AZAkgvwBkKaB/IGRIYH9AZK+Ab2BliAB/wGTOwI+gZY/gb8BmCoB5YHXoqEr1+AB2CoB4IHnAHKha9fhAeiAeqFr1/+ha9fRogHwApKigeSB0ycCYwHTo4HkgdSkAeSB1SWCZIHWIAPlAdghISvX5YHnAHKha9fmAeiAe6Fr1/+ha9fRIgPnAdKngegB0y+CaAHWIKEr1+iB2CoB6QHnAHKha9fpgeiAeyFr1/+ha9fnAHKha9fqgeiAeiFr1/+ha9fGswIrgcesAeUCCCUCLIHJrQHtgcowAu2Byq4B7oHLPQMugc2vAfGBzi+B8YHOsAHxgc8wgfGBz7EB8YHQJILxgdC+gfIB0TeB8oHSs4HzAdY1gfSB0zsCNAHWNQH0gdgjAjuB16KhK9f1gdgjAjYB4wB2gewha9fnAHGha9f3AemAdyFr1/mha9fRuAHwApK4gfqB0ycCeQHTuYH6gdS6AfqB1SWCeoHWIAP7AdghISvX+4HjAHwB7CFr1+cAcaFr1/yB6YB9Afmha9ftgHgha9f9ge+AfgH5oWvX84B4oWvX+SFr19EiA/8B0r+B4AITL4JgAhYgoSvX4IIYIwIhAiMAYgIhgicAa6Fr1+wha9fnAGuha9figimAd6Fr1/mha9fjAGQCI4InAGsha9fsIWvX5wBrIWvX5IIpgHaha9f5oWvXyaWCJgIKMALmAgqmgicCCz0DJwINp4IqAg4oAioCDqiCKgIPKQIqAg+pgioCECSC6gIQsQIqghEtAisCEquCMiFr19M7AiwCFiyCMiFr19eioSvX8iFr19GtgjACkq4CMAITJwJughOvAjACFK+CMAIVJYJwAhYgA/CCGCEhK9fyIWvX0SID8YISsgIyghMvgnKCFiChK9fyIWvXybOCNAIKMAL0Agq0gjUCCz0DNQINtYI4Ag42AjgCDraCOAIPNwI4Ag+3gjgCECSC+AIQrYJ4ghEhgnkCErmCICGr19M7AjoCFjqCICGr19eioSvX4CGr19Y+gjuCFzwCKqFr19g+AjyCJgBpIWvX/QIvAH2CKiFr1/IAaaFr1+oha9fmAGUha9floWvX1z+CPwIXoqEr1+qha9fXoqEr1+ACWCECYIJmAGMha9fjoWvX5gBiIWvX4qFr19GiAnACkqKCZIJTJwJjAlOjgmSCVKQCZIJVJYJkglYgA+UCWCEhK9fgIavX1iAD5gJXJoJsAlghISvX56Fr19OoAmeCViAD7AJUKwJoglYgA+kCVymCbAJYISEr1+oCYoBqgmqha9fmAGaha9fnoWvX1iAD64JXLIJsAlghISvX6qFr19ghISvX7QJmAGYha9fnIWvX0SID7gJSroJvAlMvgm8CViChK9fgIavX1iChK9fwAlcwgmqha9fXoaFr1/ECWDICcYJmAGgha9fooWvX5gBkIWvX5KFr18O+AnMCSLOCfgJJNAJ+Akm0gnUCSjAC9QJKtYJ2Aks9AzYCTbaCeQJONwJ5Ak63gnkCTzgCeQJPuIJ5AlAkgvkCUL0CeYJRO4J6AlK6gmChq9fWOwJgoavX16KhK9fgoavX0bwCcAKWIAP8glghISvX4KGr19EiA/2CViChK9fgoavXyb6CfwJKMAL/Akq/gmACiz0DIAKNoIKjAo4hAqMCjqGCowKPIgKjAo+igqMCkCSC4wKQvQKjgpEvgqQCki4CpIKSpQKuoavX1akCpYKWJoKmApgiAvUCl6KhK9fnApgiAueCo4BoAq6hq9fkgGiCrqGr1+UAaCGr1+qha9fWLAKpgpgrgqoCpgBloavX6oKvAGsCpqGr1/IAZiGr1+ahq9fmAGOhq9fkIavX16KhK9fsgpgtgq0CpgBioavX4yGr1+YAYaGr1+Ihq9fSroKhIavX1i8CoSGr19eioSvX4SGr19GxArACliAD8IKYISEr1+Eha9fSPAKxgpKzArICliAD8oKYISEr1+6hq9fTt4KzgpW2grQCliAD9IKYISEr1/UCo4B1gq6hq9fkgHYCrqGr1+UAaKGr1+qha9fWIAP3ApghISvX5yGr19W6grgCliAD+IKYISEr1/kCo4B5gq6hq9fkgHoCrqGr1+UAZ6Gr1+qha9fWIAP7ApghISvX+4KmAGShq9flIavX1iAD/IKYISEr1+Ehq9fRIgP9gpIkAv4Ckr8CvoKWIKEr1+6hq9fVo4L/gpYgoSvX4ALYIgLgguOAYQLuoavX5IBhgu6hq9flAGuha9fqoWvX44Bigu6hq9fkgGMC7qGr1+UAayFr1+qha9fWIKEr1+chq9fWIKEr1+Ehq9fQq4LlAtEnAuWC0qYC7ILWJoLsgteioSvX7ILTqILngtYgA+gC2CEhK9ftAtYgA+kC2CEhK9fpguQAagLtAuaAaoLgoWvX6AB+ISvX6wLrAH8hK9fgIWvX0SID7ALWIKEr1+yC5ABugu0C5oBtguCha9foAH6hK9fuAusAf6Er1+Aha9fmgG8C4KFr1+gAfaEr1++C6wB9oSvX4CFr18qwgvECyz0DMQLMsYLyAs0ngzIC0KCD8oLRPYLzAtKzguMDkzQC4gOWNQL0gtgjISvX4AMXoqEr1/WC2CMhK9f2Ati2gveC2rcC94LbNyEr1/eC3LgC+QLdOIL5At24ISvX+QLfOYL6gt+6AvqC4AB5ISvX+oLggHsC/ALhAHuC/ALhgHohK9f8AuyAfILsoSvX8YB9AuyhK9fygHshK9fsoSvX0r4C8INTPoLyA1O8g38C1iAD/4LYISEr1+ADGKCDIYMaoQMhgxs3oSvX4YMcogMjAx0igyMDHbihK9fjAx8jgySDH6QDJIMgAHmhK9fkgyCAZQMmAyEAZYMmAyGAeqEr1+YDLIBmgyyhK9fxgGcDLKEr1/KAe6Er1+yhK9fQoIPoAxEzAyiDEqkDIwOTKYMiA5YqgyoDGCMhK9f1gxeioSvX6wMYIyEr1+uDGKwDLQMarIMtAxsyISvX7QMcrYMugx0uAy6DHbMhK9fugx8vAzADH6+DMAMgAHQhK9fwAyCAcIMxgyEAcQMxgyGAdSEr1/GDLIByAyyhK9fxgHKDLKEr1/KAdiEr1+yhK9fSs4MwA5M0AzGDk70DtIMWIAP1AxghISvX9YMYtgM3Axq2gzcDGzKhK9f3Axy3gziDHTgDOIMds6Er1/iDHzkDOgMfuYM6AyAAdKEr1/oDIIB6gzuDIQB7AzuDIYB1oSvX+4MsgHwDLKEr1/GAfIMsoSvX8oB2oSvX7KEr18u9gz4DDCMDfgMMvoM/Aw0hA38DEKCD/4MRMANgA1Kgg2MDkyaDYgOQoIPhg1Evg6IDUqKDYwOTJAOiA4yjg2QDTT+DZANQoIPkg1EwA2UDUqWDYwOTJgNhg5Wtg6aDVieDZwNYIyEr1/UDV6KhK9foA1gjISvX6INZKQNqA1mpg2oDWi0hK9fqA1qqg2uDWysDa4NbriEr1+uDXCwDbQNeLINtA16vISvX7QNfrYNug2AAbgNug2IAcCEr1+6DZYBvA2yhK9fngG+DbKEr1+uAcSEr1+yhK9fSsYNwg1MxA3IDU7yDcwOTM4NyA1Oyg3MDlDMDcwOVvoNzA5O8g3QDViAD9INYISEr1/UDWTWDdoNZtgN2g1otoSvX9oNatwN4A1s3g3gDW66hK9f4A1w4g3mDXjkDeYNer6Er1/mDX7oDewNgAHqDewNiAHChK9f7A2WAe4NsoSvX54B8A2yhK9frgHGhK9fsoSvX1D0DfYNVvoN9g1YgA/4DWCEhK9fmISvX1iAD/wNYISEr1+WhK9fQoIPgA5Evg6CDkqEDowOTI4Ohg5Wtg6IDliKDowOXoqEr1+MDmCMhK9flISvX1a2DpAOWJQOkg5gjISvX9YOXoqEr1+WDmCMhK9fmA5kmg6eDmacDp4OaJ6Er1+eDmqgDqQObKIOpA5uooSvX6QOcKYOqg54qA6qDnqmhK9fqg5+rA6wDoABrg6wDogBqoSvX7AOlgGyDrKEr1+eAbQOsoSvX64BroSvX7KEr19Yug64DmCMhK9fnISvX16KhK9fvA5gjISvX5qEr19KxA7ADkzCDsYOTvQOzA5M0A7GDk7IDswOUMoOzA5W/A7MDliAD84OYISEr1+UhK9fTvQO0g5YgA/UDmCEhK9f1g5k2A7cDmbaDtwOaKCEr1/cDmreDuIObOAO4g5upISvX+IOcOQO6A545g7oDnqohK9f6A5+6g7uDoAB7A7uDogBrISvX+4OlgHwDrKEr1+eAfIOsoSvX64BsISvX7KEr19Q9g74Dlb8DvgOWIAP+g5ghISvX5KEr19YgA/+DmCEhK9fkISvX2CEhK9fhoSvX0SID4QPWIKEr1+GD2CMhK9fjoSvX1iChK9fig9ghISvX4iEr18=", - "nodeCount": 965 + "nodeCount": 807, + "nodes": "/////wAAAAH/////AAAAAAAAAAMF9eGdAAAAAQAAAoYAAAAEAAAAAgAAAcIAAAAFAAAAAwAAAFoAAAAGAAAABAAAAAwAAAAHAAAACgAAAAgF9eGdAAAACwAAAAkAAAAKAAAADAX14ToAAAAKAAAAHgAAAAsAAAKOAAAAHwAAAEcAAAKOAAAABQAAABsAAAANAAAABgAAAA4AAAAbAAAABwAAAFEAAAAPAAAACAAAAE4AAAAQAAAACgAAABMAAAARAAAAFwX14YEAAAASAAAAGwAAACAF9eGBAAAAEAAAABQAAAAYAAAAEQAAABUAAAAYAAAAEgAAABYAAAAYAAAAEwAAABcAAAAYAAAAFAAAAx8AAAAYAAAAFwX14YEAAAAZAAAAGQAAAD0AAAAaAAAAGwAAACkF9eGBAAAABwAAAFEAAAAcAAAACAAAAE4AAAAdAAAACgAAACEAAAAeAAAAFwAAAroAAAAfAAAAGwAAACAF9eGdAAAAIQAAArMAAACfAAAAEAAAACIAAAAmAAAAEQAAACMAAAAmAAAAEgAAACQAAAAmAAAAEwAAACUAAAAmAAAAFAAAAx8AAAAmAAAAFwAAAEMAAAAnAAAAGQAAAD0AAAAoAAAAGwAAACkAAABEAAAAIQAAACoAAADHAAAAKwAAACsAAAAsAAAALAAAAwgAAAAsAAAALQAAAwEAAAAtAAAAMQAAAC4F9eGAAAAANAAAAC8AAAMKAAAANgX14YAAAAAwAAAAOQAAAxIAAAAxAAAAOgAAADIAAALwAAAAOwAAAxYAAAAzAAAARQAAADQF9eFkAAAASAX14WQAAAA1AAAASgAAADgAAAA2AAAATQAAADcAAAA4AAAATgX14VkAAAA4AAAATwAAADkF9eFhAAAAUAAAADoF9eFgAAAAUgAAADsF9eFsAAAAUwAAADwF9eFfAAAAVAX14WkF9eFeAAAAGgAAAD4F9eFVAAAAIQAAAEIAAAA/AAAAJAX14VIAAABAAAAAKQAAAEEF9eFUAAAAKgX14VMF9eFUAAAAJAX14UoF9eFLAAAAGAX14YIAAABEAAAAHAAAAEkAAABFAAAAHgAAAEYF9eGdAAAAHwAAAEcF9eGdAAAAIAAAAEgF9eFVAAAAIQX14VYF9eGRAAAAIQAAAE0AAABKAAAAJAX14YsAAABLAAAAKQAAAEwF9eGNAAAAKgX14YwF9eGNAAAAJAX14YcF9eGIAAAACgAAAE8AAAJnAAAAGQAAAFAAAAJnAAAAIQX14QYAAAGBAAAACgAAAFIAAAJnAAAACwAAAFMAAABUAAAADAAAAFUAAABUAAAAGQAAAFgAAAJnAAAAGQAAAFcAAABWAAAAHAAAAFkAAAJnAAAAHAAAAFkAAABYAAAAIQX14QYAAAGcAAAAIQX14QYF9eEOAAAABAAAAGkAAABbAAAACgAAAFwAAAFwAAAACwAAAF0AAABeAAAADAAAAGYAAABeAAAADQAAAGEAAABfAAAAHgAAAGAAAAFyAAAAHwAAAQAAAAFyAAAAHgAAAGIAAABjAAAAHwAAAXEAAABjAAAAIAAAAGQAAAFyAAAAIQX14QIAAABlAAAAJAX14ZgF9eGZAAAADQAAAGgAAABnAAAAIQX14QIF9eE6AAAAIQX14QIF9eE4AAAABQAAAIsAAABqAAAABgAAAGsAAACLAAAABwAAAZcAAABsAAAACAAAAX0AAABtAAAACQAAAG4AAACOAAAACgAAAHEAAABvAAAAFwAAAIoAAABwAAAAGwAAAJ4AAACKAAAADQAAAHoAAAByAAAAEAAAAHMAAAB3AAAAEQAAAHQAAAB3AAAAEgAAAHUAAAB3AAAAEwAAAHYAAAB3AAAAFAAAAXgAAAB3AAAAFwAAAIoAAAB4AAAAGQAAAXIAAAB5AAAAGwAAAMYAAACKAAAADgAAAHsAAAB8AAAADwAAAIQAAAB8AAAAEAAAAH0AAACBAAAAEQAAAH4AAACBAAAAEgAAAH8AAACBAAAAEwAAAIAAAACBAAAAFAAAAXcAAACBAAAAFwAAAIoAAACCAAAAGQAAAWUAAACDAAAAGwAAAQ0AAACKAAAAEAAAAIUAAACJAAAAEQAAAIYAAACJAAAAEgAAAIcAAACJAAAAEwAAAIgAAACJAAAAFAAAAXcAAACJAAAAFwAAAIoAAAFiAAAAIQX14QIF9eGBAAAABwAAAZcAAACMAAAACAAAAX0AAACNAAAACQAAAJsAAACOAAAACgAAAI8AAACaAAAADQAAAJUAAACQAAAAEAAAAJEAAACaAAAAEQAAAJIAAACaAAAAEgAAAJMAAACaAAAAEwAAAJQAAACaAAAAFAAAAXgAAACaAAAAEAAAAJYAAACaAAAAEQAAAJcAAACaAAAAEgAAAJgAAACaAAAAEwAAAJkAAACaAAAAFAAAAXcAAACaAAAAIQX14QIF9eFCAAAACgAAAL0AAACcAAAAFwAAALwAAACdAAAAGwAAAJ4AAAFwAAAAIQX14QIAAACfAAAAKwAAAKAAAAChAAAALAAAALAAAAChAAAALQAAAKkAAACiAAAAMAAAAKUAAACjAAAAMQAAAKQF9eGAAAAANAAAAKcAAACzAAAAMQAAAKYF9eGAAAAANAAAAKcAAAFQAAAANgX14YAAAACoAAAAOQAAALgAAALxAAAAMAAAAKwAAACqAAAAMQAAAKsF9eGAAAAANAAAAK4AAACzAAAAMQAAAK0F9eGAAAAANAAAAK4AAAFQAAAANgX14YAAAACvAAAAOQAAALgAAAMGAAAAMAAAALQAAACxAAAAMQAAALIF9eGAAAAANAAAALYAAACzAAAANgX14YAAAAE6AAAAMQAAALUF9eGAAAAANAAAALYAAAFQAAAANgX14YAAAAC3AAAAOQAAALgAAAMQAAAAOwAAAiIAAAC5AAAARQAAALoF9eFkAAAASAX14WQAAAC7AAAASQAAAVsF9eFzAAAAGAAAAXYAAAFwAAAADQAAAQMAAAC+AAAAEAAAAL8AAADDAAAAEQAAAMAAAADDAAAAEgAAAMEAAADDAAAAEwAAAMIAAADDAAAAFAAAAXgAAADDAAAAFwAAAPwAAADEAAAAGQAAAXIAAADFAAAAGwAAAMYAAAD9AAAAIQX14QIAAADHAAAAKwAAAMgAAADJAAAALAAAAOoAAADJAAAALQAAAOcAAADKAAAAMAAAAM0AAADLAAAAMQAAAMwF9eGAAAAANAAAAM8AAADtAAAAMQAAAM4F9eGAAAAANAAAAM8AAAFQAAAANgX14YAAAADQAAAAOQAAAVUAAADRAAAAOgAAANIAAALxAAAAOwAAAN0AAADTAAAARQAAANQF9eFkAAAASAX14WQAAADVAAAASgAAANgAAADWAAAATQAAANcAAADYAAAATgX14VkAAADYAAAATwAAANkF9eFhAAAAUAAAANoF9eFgAAAAUgAAANsF9eFsAAAAUwAAANwF9eFfAAAAVAX14WsF9eFeAAAARQAAAN4F9eFkAAAASAX14WQAAADfAAAASgAAAOIAAADgAAAATQAAAOEAAADiAAAATgX14VkAAADiAAAATwAAAOMF9eFhAAAAUAAAAOQF9eFgAAAAUQX14VoAAADlAAAAUwAAAOYF9eFfAAAAVAX14V0F9eFeAAAAMAAAATEAAADoAAAAMQAAAOkF9eGAAAAANAAAATMAAADtAAAAMAAAAU4AAADrAAAAMQAAAOwF9eGAAAAANAAAAVMAAADtAAAANgX14YAAAADuAAAAOgAAAO8AAAE6AAAAOwX14WUAAADwAAAAPgAAAPEF9eF/AAAAQwAAAPIF9eF+AAAARAAAAPMF9eF9AAAASgAAAPYAAAD0AAAATQAAAPUAAAD2AAAATgX14VkAAAD2AAAATwAAAPcF9eFhAAAAUAAAAPgF9eFgAAAAUwAAAPkF9eFfAAAAVQAAAPoF9eF8AAAAVgAAAPsF9eF7AAAAVwX14XkF9eF6AAAAGAAAAXYAAAD9AAAAHAAAAQIAAAD+AAAAHgAAAP8AAAFwAAAAHwAAAQAAAAFwAAAAIAAAAQEAAAFyAAAAIQX14QIF9eGRAAAAIQX14QIF9eGOAAAADgAAAQQAAAEFAAAADwAAAVwAAAEFAAAAEAAAAQYAAAEKAAAAEQAAAQcAAAEKAAAAEgAAAQgAAAEKAAAAEwAAAQkAAAEKAAAAFAAAAXcAAAEKAAAAFwAAAWwAAAELAAAAGQAAAWUAAAEMAAAAGwAAAQ0AAAFtAAAAIQX14QIAAAEOAAAAKwAAAQ8AAAEQAAAALAAAATUAAAEQAAAALQAAAS4AAAERAAAAMAAAARQAAAESAAAAMQAAARMF9eGAAAAANAAAARYAAAE4AAAAMQAAARUF9eGAAAAANAAAARYAAAFQAAAANgX14YAAAAEXAAAAOQAAAVUAAAEYAAAAOgAAARkAAALxAAAAOwAAASQAAAEaAAAARQAAARsF9eFkAAAASAX14WQAAAEcAAAASgAAAR8AAAEdAAAATQAAAR4AAAEfAAAATgX14VkAAAEfAAAATwAAASAF9eFhAAAAUAAAASEF9eFgAAAAUgAAASIF9eFsAAAAUwAAASMF9eFfAAAAVAX14WoF9eFeAAAARQAAASUF9eFkAAAASAX14WQAAAEmAAAASgAAASkAAAEnAAAATQAAASgAAAEpAAAATgX14VkAAAEpAAAATwAAASoF9eFhAAAAUAAAASsF9eFgAAAAUQX14VoAAAEsAAAAUwAAAS0F9eFfAAAAVAX14VsF9eFeAAAAMAAAATEAAAEvAAAAMQAAATAF9eGAAAAANAAAATMAAAE4AAAAMQAAATIF9eGAAAAANAAAATMAAAFQAAAANgX14YAAAAE0AAAAOQAAAVUAAAMGAAAAMAAAAU4AAAE2AAAAMQAAATcF9eGAAAAANAAAAVMAAAE4AAAANgX14YAAAAE5AAAAOgAAAUEAAAE6AAAAOwX14WUAAAE7AAAAPgAAATwF9eF/AAAAQwAAAT0F9eF+AAAARAAAAT4F9eF9AAAASgX14X0AAAE/AAAATQAAAUAF9eF9AAAATgX14VkF9eF9AAAAOwX14WUAAAFCAAAAPgAAAUMF9eF/AAAAQwAAAUQF9eF+AAAARAAAAUUF9eF9AAAASgAAAUgAAAFGAAAATQAAAUcAAAFIAAAATgX14VkAAAFIAAAATwAAAUkF9eFhAAAAUAAAAUoF9eFgAAAAUwAAAUsF9eFfAAAAVQAAAUwF9eF8AAAAVgAAAU0F9eF7AAAAVwX14XgF9eF6AAAAMQAAAU8F9eGAAAAANAAAAVMAAAFQAAAANgX14YAAAAFRAAAAOwX14WUAAAFSAAAAPgX14XcF9eF/AAAANgX14YAAAAFUAAAAOQAAAVUAAAMQAAAAOwAAAiIAAAFWAAAARQAAAVcF9eFkAAAASAX14WQAAAFYAAAASQAAAVsAAAFZAAAASwAAAVoF9eFzAAAATAX14XEF9eFyAAAASwX14XAF9eFzAAAAEAAAAV0AAAFhAAAAEQAAAV4AAAFhAAAAEgAAAV8AAAFhAAAAEwAAAWAAAAFhAAAAFAAAAXcAAAFhAAAAFwAAAWwAAAFiAAAAGQAAAWUAAAFjAAAAGgAAAWQAAAFyAAAAIQX14QIF9eFPAAAAGgAAAWYAAAFyAAAAHQAAAWoAAAFnAAAAIQX14QIAAAFoAAAAIgAAAWkF9eFVAAAAJAX14U0F9eFPAAAAIQX14QIAAAFrAAAAJAX14UwF9eFOAAAAGAAAAXYAAAFtAAAAHAAAAXQAAAFuAAAAHgAAAW8AAAFwAAAAHwAAAXEAAAFwAAAAIQX14QIF9eGdAAAAIAAAAXMAAAFyAAAAIQX14QIF9eFVAAAAIQX14QIF9eGPAAAAIQX14QIAAAF1AAAAJAX14YkF9eGKAAAAIQX14QIF9eGCAAAAFgAAAXkAAAF4AAAAIQX14QIAAAMgAAAAIQX14QIAAAF6AAAAWAAAAXsF9eFBAAAAWQX14TwAAAF8AAAAWgX14T4F9eFAAAAACgAAAX4AAAGYAAAADQAAAbYAAAF/AAAAGQAAAYAAAAG5AAAAIQX14QIAAAGBAAAAIwAAAYIAAAGDAAAAJQAAAY0AAAGDAAAAJgAAAYQAAAGFAAAALwX14S8AAAGFAAAAMgAAAYYAAAGHAAAAMwX14TEAAAGHAAAANwAAAYgAAAGJAAAAOAX14TMAAAGJAAAAPAAAAYoAAAGLAAAAPQX14TUAAAGLAAAAQQAAAYwF9eEZAAAAQgX14TcF9eEZAAAAJgAAAY4AAAGPAAAALwX14SUAAAGPAAAAMgAAAZAAAAGRAAAAMwX14ScAAAGRAAAANwAAAZIAAAGTAAAAOAX14SkAAAGTAAAAPAAAAZQAAAGVAAAAPQX14SsAAAGVAAAAQQAAAZYF9eEZAAAAQgX14S0F9eEZAAAACgAAAZkAAAGYAAAADQAAAbYAAAG5AAAADQAAAbYAAAGaAAAAGQAAAZsAAAG5AAAAIQX14QIAAAGcAAAAIwAAAZ0AAAGeAAAAJQAAAaoAAAGeAAAAJwAAAZ8AAAGgAAAAKAX14RsAAAGgAAAALgAAAaEAAAGiAAAALwX14R0AAAGiAAAANQAAAaMAAAGkAAAAOAAAAagAAAGkAAAAPwAAAaUAAAGmAAAAQAX14R8AAAGmAAAARgAAAacF9eEZAAAARwX14SMF9eEZAAAAPwAAAakF9eEhAAAAQAX14R8F9eEhAAAAJwAAAasAAAGsAAAAKAX14RAAAAGsAAAALgAAAa0AAAGuAAAALwX14RIAAAGuAAAANQAAAa8AAAGwAAAAOAAAAbQAAAGwAAAAPwAAAbEAAAGyAAAAQAX14RQAAAGyAAAARgAAAbMF9eEZAAAARwX14RgF9eEZAAAAPwAAAbUF9eEWAAAAQAX14RQF9eEWAAAAGQAAAboAAAG3AAAAHAAAAbgAAAG5AAAAHQAAAb8AAAG5AAAAIQX14QIF9eEKAAAAHAAAAbsAAAG8AAAAHQAAAb8AAAG8AAAAIQX14QIAAAG9AAAAIwAAAb4F9eEMAAAAJQX14QkF9eEMAAAAIQX14QIAAAHAAAAAIwAAAcEF9eELAAAAJQX14QgF9eELAAAAAwAAAoUAAAHDAAAABAAAAc8AAAHEAAAACgAAAcUF9eGdAAAACwAAAcYAAAHHAAAADAAAAc4AAAHHAAAAFQX14QUAAAHIAAAAHgAAAckAAAHKAAAAHwAAAj8AAAHKAAAAIAAAAcsF9eFVAAAAIQAAAc0AAAHMAAAAJAX14ZQF9eGVAAAAJAX14ZIF9eGTAAAAFQX14QUF9eE5AAAABQAAAd8AAAHQAAAABgAAAdEAAAHfAAAABwAAAl8AAAHSAAAACAAAAkUAAAHTAAAACgAAAdYAAAHUAAAAFwX14YEAAAHVAAAAGwAAAeQF9eGBAAAAEAAAAdcAAAHbAAAAEQAAAdgAAAHbAAAAEgAAAdkAAAHbAAAAEwAAAdoAAAHbAAAAFAAAAkQAAAHbAAAAFQX14QUAAAHcAAAAFwX14YEAAAHdAAAAGQAAAjcAAAHeAAAAGwAAAfUF9eGBAAAABwAAAl8AAAHgAAAACAAAAkUAAAHhAAAACgAAAewAAAHiAAAAFwAAAroAAAHjAAAAGwAAAeQF9eGdAAAAIQAAArMAAAHlAAAAKwAAAeYAAAHnAAAALAAAAhcAAAHnAAAALQAAAhMAAAHoAAAAMQAAAekF9eGAAAAANAAAAeoAAAIZAAAANgX14YAAAAHrAAAAOQAAAh4AAALxAAAAEAAAAe0AAAHxAAAAEQAAAe4AAAHxAAAAEgAAAe8AAAHxAAAAEwAAAfAAAAHxAAAAFAAAAkQAAAHxAAAAFQX14QUAAAHyAAAAFwAAAjsAAAHzAAAAGQAAAjcAAAH0AAAAGwAAAfUAAAI8AAAAIQAAAiQAAAH2AAAAKwAAAfcAAAH4AAAALAAAAhcAAAH4AAAALQAAAhMAAAH5AAAAMQAAAfoF9eGAAAAANAAAAfsAAAIZAAAANgX14YAAAAH8AAAAOQAAAh4AAAH9AAAAOgAAAf4AAALxAAAAOwAAAgkAAAH/AAAARQAAAgAF9eFkAAAASAX14WQAAAIBAAAASgAAAgQAAAICAAAATQAAAgMAAAIEAAAATgX14VkAAAIEAAAATwAAAgUF9eFhAAAAUAAAAgYF9eFgAAAAUgAAAgcF9eFsAAAAUwAAAggF9eFfAAAAVAX14WgF9eFeAAAARQAAAgoF9eFkAAAASAX14WQAAAILAAAASgAAAg4AAAIMAAAATQAAAg0AAAIOAAAATgX14VkAAAIOAAAATwAAAg8F9eFhAAAAUAAAAhAF9eFgAAAAUQX14VoAAAIRAAAAUwAAAhIF9eFfAAAAVAX14VwF9eFeAAAAMQAAAhQF9eGAAAAANAAAAhUAAAIZAAAANgX14YAAAAIWAAAAOQAAAh4AAAMGAAAAMQAAAhgF9eGAAAAANAAAAhwAAAIZAAAANgX14YAAAAIaAAAAOwX14WUAAAIbAAAAPgX14XUF9eF/AAAANgX14YAAAAIdAAAAOQAAAh4AAAMQAAAAOwAAAiIAAAIfAAAARQAAAiAF9eFkAAAASAX14WQAAAIhAAAASwX14W4F9eFzAAAARQAAAiMF9eFkAAAASAX14WQF9eFjAAAAKwAAAiUAAAImAAAALAAAAwgAAAImAAAALQAAAwEAAAInAAAAMQAAAigF9eGAAAAANAAAAikAAAMKAAAANgX14YAAAAIqAAAAOQAAAxIAAAIrAAAAOgAAAiwAAALwAAAAOwAAAxYAAAItAAAARQAAAi4F9eFkAAAASAX14WQAAAIvAAAASgAAAjIAAAIwAAAATQAAAjEAAAIyAAAATgX14VkAAAIyAAAATwAAAjMF9eFhAAAAUAAAAjQF9eFgAAAAUgAAAjUF9eFsAAAAUwAAAjYF9eFfAAAAVAX14WcF9eFeAAAAGgAAAjgF9eFVAAAAIQAAAjoAAAI5AAAAJAX14UYF9eFHAAAAJAX14UQF9eFFAAAAGAX14YIAAAI8AAAAHAAAAkEAAAI9AAAAHgAAAj4F9eGdAAAAHwAAAj8F9eGdAAAAIAAAAkAF9eFVAAAAIQX14VYF9eGQAAAAIQAAAkMAAAJCAAAAJAX14YUF9eGGAAAAJAX14YMF9eGEAAAAFQX14QUAAAMfAAAACgAAAkYAAAJnAAAAFQX14QUAAAJHAAAAGQAAAkgAAAJnAAAAIQX14QYAAAJJAAAAIwAAAkoAAAJLAAAAJQAAAlUAAAJLAAAAJgAAAkwAAAJNAAAALwX14S4AAAJNAAAAMgAAAk4AAAJPAAAAMwX14TAAAAJPAAAANwAAAlAAAAJRAAAAOAX14TIAAAJRAAAAPAAAAlIAAAJTAAAAPQX14TQAAAJTAAAAQQAAAlQF9eEZAAAAQgX14TYF9eEZAAAAJgAAAlYAAAJXAAAALwX14SQAAAJXAAAAMgAAAlgAAAJZAAAAMwX14SYAAAJZAAAANwAAAloAAAJbAAAAOAX14SgAAAJbAAAAPAAAAlwAAAJdAAAAPQX14SoAAAJdAAAAQQAAAl4F9eEZAAAAQgX14SwF9eEZAAAACgAAAmAAAAJnAAAACwAAAmEAAAJiAAAADAAAAmQAAAJiAAAAFQX14QUAAAJjAAAAGQAAAmkAAAJnAAAAFQX14QUAAAJlAAAAGQAAAmgAAAJmAAAAHAAAAoQAAAJnAAAAIQX14QYF9eEKAAAAHAAAAoQAAAJpAAAAIQX14QYAAAJqAAAAIwAAAmsAAAJsAAAAJQAAAngAAAJsAAAAJwAAAm0AAAJuAAAAKAX14RoAAAJuAAAALgAAAm8AAAJwAAAALwX14RwAAAJwAAAANQAAAnEAAAJyAAAAOAAAAnYAAAJyAAAAPwAAAnMAAAJ0AAAAQAX14R4AAAJ0AAAARgAAAnUF9eEZAAAARwX14SIF9eEZAAAAPwAAAncF9eEgAAAAQAX14R4F9eEgAAAAJwAAAnkAAAJ6AAAAKAX14Q8AAAJ6AAAALgAAAnsAAAJ8AAAALwX14REAAAJ8AAAANQAAAn0AAAJ+AAAAOAAAAoIAAAJ+AAAAPwAAAn8AAAKAAAAAQAX14RMAAAKAAAAARgAAAoEF9eEZAAAARwX14RcF9eEZAAAAPwAAAoMF9eEVAAAAQAX14RMF9eEVAAAAIQX14QYF9eENAAAAIQX14QIF9eEDAAAAAgX14QEAAAKHAAAAAwAAAycAAAKIAAAABAAAApQAAAKJAAAACgAAAooF9eGdAAAACwAAAosAAAKMAAAADAX14ToAAAKMAAAAHgAAAo0AAAKOAAAAHwAAAx0AAAKOAAAAIAAAAo8F9eFVAAAAIQAAApMAAAKQAAAAJAX14ZoAAAKRAAAAKQAAApIF9eGcAAAAKgX14ZsF9eGcAAAAJAX14ZYF9eGXAAAABQAAAqYAAAKVAAAABgAAApYAAAKmAAAABwAAAyYAAAKXAAAACAAAAyYAAAKYAAAACgAAApsAAAKZAAAAFwX14YEAAAKaAAAAGwAAAqsF9eGBAAAAEAAAApwAAAKgAAAAEQAAAp0AAAKgAAAAEgAAAp4AAAKgAAAAEwAAAp8AAAKgAAAAFAAAAx8AAAKgAAAAFQAAAqMAAAKhAAAAFwX14YEAAAKiAAAAGQAAAsMAAAKlAAAAFwX14YEAAAKkAAAAGQAAAxgAAAKlAAAAGwAAAsoF9eGBAAAABwAAAyYAAAKnAAAACAAAAyYAAAKoAAAACgAAArsAAAKpAAAAFwAAAroAAAKqAAAAGwAAAqsF9eGdAAAAIQAAArMAAAKsAAAAKwAAAq0AAAKuAAAALAAAAtoAAAKuAAAALQAAAtUAAAKvAAAAMQAAArAF9eGAAAAANAAAArEAAALcAAAANgX14YAAAAKyAAAAOQAAAuIAAALTAAAAKwAAArQAAAK1AAAALAAAAwgAAAK1AAAALQAAAwEAAAK2AAAAMQAAArcF9eGAAAAANAAAArgAAAMKAAAANgX14YAAAAK5AAAAOQAAAxIAAALwAAAAGAX14YIF9eGdAAAAEAAAArwAAALAAAAAEQAAAr0AAALAAAAAEgAAAr4AAALAAAAAEwAAAr8AAALAAAAAFAAAAx8AAALAAAAAFQAAAscAAALBAAAAFwAAAxkAAALCAAAAGQAAAsMAAALJAAAAGgAAAsQF9eFVAAAAIQAAAsYAAALFAAAAJAX14VAF9eFRAAAAJAX14UgF9eFJAAAAFwAAAxkAAALIAAAAGQAAAxgAAALJAAAAGwAAAsoAAAMaAAAAIQAAAugAAALLAAAAKwAAAswAAALNAAAALAAAAtoAAALNAAAALQAAAtUAAALOAAAAMQAAAs8F9eGAAAAANAAAAtAAAALcAAAANgX14YAAAALRAAAAOQAAAuIAAALSAAAAOgAAAtQAAALTAAAAOwAAAuYAAALxAAAAOwAAAuYAAAL3AAAAMQAAAtYF9eGAAAAANAAAAtcAAALcAAAANgX14YAAAALYAAAAOQAAAuIAAALZAAAAOwAAAuYAAAMGAAAAMQAAAtsF9eGAAAAANAAAAt8AAALcAAAANgX14YAAAALdAAAAOwX14WUAAALeAAAAPgX14XYF9eF/AAAANgX14YAAAALgAAAAOQAAAuIAAALhAAAAOwAAAuYAAAMQAAAAOwAAAuYAAALjAAAARQAAAuQF9eFkAAAASAX14WQAAALlAAAASwX14W8F9eFzAAAARQAAAucF9eFkAAAASAX14WQF9eFXAAAAKwAAAukAAALqAAAALAAAAwgAAALqAAAALQAAAwEAAALrAAAAMQAAAuwF9eGAAAAANAAAAu0AAAMKAAAANgX14YAAAALuAAAAOQAAAxIAAALvAAAAOgAAAvYAAALwAAAAOwAAAxYAAALxAAAARQAAAvIF9eFkAAAASAX14WQAAALzAAAASgX14WIAAAL0AAAATQAAAvUF9eFiAAAATgX14VkF9eFiAAAAOwAAAxYAAAL3AAAARQAAAvgF9eFkAAAASAX14WQAAAL5AAAASgAAAvwAAAL6AAAATQAAAvsAAAL8AAAATgX14VkAAAL8AAAATwAAAv0F9eFhAAAAUAAAAv4F9eFgAAAAUgAAAv8F9eFsAAAAUwAAAwAF9eFfAAAAVAX14WYF9eFeAAAAMQAAAwIF9eGAAAAANAAAAwMAAAMKAAAANgX14YAAAAMEAAAAOQAAAxIAAAMFAAAAOwAAAxYAAAMGAAAARQAAAwcF9eFkAAAASAX14WQF9eFiAAAAMQAAAwkF9eGAAAAANAAAAw0AAAMKAAAANgX14YAAAAMLAAAAOwX14WUAAAMMAAAAPgX14XQF9eF/AAAANgX14YAAAAMOAAAAOQAAAxIAAAMPAAAAOwAAAxYAAAMQAAAARQAAAxEF9eFkAAAASAX14WQF9eFYAAAAOwAAAxYAAAMTAAAARQAAAxQF9eFkAAAASAX14WQAAAMVAAAASwX14W0F9eFzAAAARQAAAxcF9eFkAAAASAX14WQF9eFWAAAAGgX14UMF9eFVAAAAGAX14YIAAAMaAAAAHAX14Y4AAAMbAAAAHgAAAxwF9eGdAAAAHwAAAx0F9eGdAAAAIAAAAx4F9eFVAAAAIQX14VYF9eFXAAAAFgAAAyMAAAMgAAAAWAAAAyEF9eFBAAAAWQX14T0AAAMiAAAAWgX14T8F9eFAAAAAWAAAAyQF9eFBAAAAWQX14TsAAAMlAAAAWgX14TsF9eFAAAAAIQX14QYF9eEHAAAAIQX14QIF9eEE" }, "smithy.rules#endpointTests": { "testCases": [ @@ -20989,14 +21148,6 @@ "com.amazonaws.s3#GetObjectOutput": { "type": "structure", "members": { - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

    Object data.

    ", - "smithy.api#httpPayload": {} - } - }, "DeleteMarker": { "target": "com.amazonaws.s3#DeleteMarker", "traits": { @@ -21664,14 +21815,6 @@ "com.amazonaws.s3#GetObjectTorrentOutput": { "type": "structure", "members": { - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

    A Bencoded dictionary as defined by the BitTorrent specification

    ", - "smithy.api#httpPayload": {} - } - }, "RequestCharged": { "target": "com.amazonaws.s3#RequestCharged", "traits": { @@ -29011,14 +29154,6 @@ "smithy.api#httpHeader": "x-amz-acl" } }, - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

    Object data.

    ", - "smithy.api#httpPayload": {} - } - }, "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { @@ -30309,12 +30444,6 @@ "smithy.api#documentation": "

    The optional description for the job.

    " } }, - "SelectParameters": { - "target": "com.amazonaws.s3#SelectParameters", - "traits": { - "smithy.api#documentation": "\n

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

    \n
    \n

    Describes the parameters for Select job types.

    " - } - }, "OutputLocation": { "target": "com.amazonaws.s3#OutputLocation", "traits": { @@ -30598,209 +30727,6 @@ "smithy.api#documentation": "

    Specifies the byte range of the object to get the records from. A record is processed\n when its first byte is contained by the range. This parameter is optional, but when\n specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the\n start and end of the range.

    " } }, - "com.amazonaws.s3#SelectObjectContent": { - "type": "operation", - "input": { - "target": "com.amazonaws.s3#SelectObjectContentRequest" - }, - "output": { - "target": "com.amazonaws.s3#SelectObjectContentOutput" - }, - "traits": { - "smithy.api#documentation": "\n

    This operation is not supported for directory buckets.

    \n
    \n

    This action filters the contents of an Amazon S3 object based on a simple structured query\n language (SQL) statement. In the request, along with the SQL expression, you must also\n specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses\n this format to parse object data into records, and returns only records that match the\n specified SQL expression. You must also specify the data serialization format for the\n response.

    \n

    This functionality is not supported for Amazon S3 on Outposts.

    \n

    For more information about Amazon S3 Select, see Selecting Content from\n Objects and SELECT\n Command in the Amazon S3 User Guide.

    \n

    \n
    \n
    Permissions
    \n
    \n

    You must have the s3:GetObject permission for this operation.\u00a0Amazon S3\n Select does not support anonymous access. For more information about permissions,\n see Specifying Permissions in\n a Policy in the Amazon S3 User Guide.

    \n
    \n
    Object Data Formats
    \n
    \n

    You can use Amazon S3 Select to query objects that have the following format\n properties:

    \n
      \n
    • \n

      \n CSV, JSON, and Parquet - Objects must be in CSV,\n JSON, or Parquet format.

      \n
    • \n
    • \n

      \n UTF-8 - UTF-8 is the only encoding type Amazon S3 Select\n supports.

      \n
    • \n
    • \n

      \n GZIP or BZIP2 - CSV and JSON files can be compressed\n using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that\n Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar\n compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support\n whole-object compression for Parquet objects.

      \n
    • \n
    • \n

      \n Server-side encryption - Amazon S3 Select supports\n querying objects that are protected with server-side encryption.

      \n

      For objects that are encrypted with customer-provided encryption keys\n (SSE-C), you must use HTTPS, and you must use the headers that are\n documented in the GetObject. For more\n information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys)\n in the Amazon S3 User Guide.

      \n

      For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and\n Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently,\n so you don't need to specify anything. For more information about\n server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
    \n
    Working with the Response Body
    \n
    \n

    Given the response size is unknown, Amazon S3 Select streams the response as a\n series of messages and includes a Transfer-Encoding header with\n chunked as its value in the response. For more information, see\n Appendix:\n SelectObjectContent\n Response.

    \n
    \n
    GetObject Support
    \n
    \n

    The SelectObjectContent action does not support the following\n GetObject functionality. For more information, see GetObject.

    \n
      \n
    • \n

      \n Range: Although you can specify a scan range for an Amazon S3 Select\n request (see SelectObjectContentRequest - ScanRange in the request\n parameters), you cannot specify the range of bytes of an object to return.\n

      \n
    • \n
    • \n

      The GLACIER, DEEP_ARCHIVE, and\n REDUCED_REDUNDANCY storage classes, or the\n ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access\n tiers of the INTELLIGENT_TIERING storage class: You cannot\n query objects in the GLACIER, DEEP_ARCHIVE, or\n REDUCED_REDUNDANCY storage classes, nor objects in the\n ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access\n tiers of the INTELLIGENT_TIERING storage class. For more\n information about storage classes, see Using Amazon S3\n storage classes in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
    \n
    Special Errors
    \n
    \n

    For a list of special errors for this operation, see List of SELECT Object Content Error Codes\n

    \n
    \n
    \n

    The following operations are related to SelectObjectContent:

    \n ", - "smithy.api#http": { - "method": "POST", - "uri": "/{Bucket}/{Key+}?select&select-type=2", - "code": 200 - } - } - }, - "com.amazonaws.s3#SelectObjectContentEventStream": { - "type": "union", - "members": { - "Records": { - "target": "com.amazonaws.s3#RecordsEvent", - "traits": { - "smithy.api#documentation": "

    The Records Event.

    " - } - }, - "Stats": { - "target": "com.amazonaws.s3#StatsEvent", - "traits": { - "smithy.api#documentation": "

    The Stats Event.

    " - } - }, - "Progress": { - "target": "com.amazonaws.s3#ProgressEvent", - "traits": { - "smithy.api#documentation": "

    The Progress Event.

    " - } - }, - "Cont": { - "target": "com.amazonaws.s3#ContinuationEvent", - "traits": { - "smithy.api#documentation": "

    The Continuation Event.

    " - } - }, - "End": { - "target": "com.amazonaws.s3#EndEvent", - "traits": { - "smithy.api#documentation": "

    The End Event.

    " - } - } - }, - "traits": { - "smithy.api#documentation": "

    The container for selecting objects from a content event stream.

    ", - "smithy.api#streaming": {} - } - }, - "com.amazonaws.s3#SelectObjectContentOutput": { - "type": "structure", - "members": { - "Payload": { - "target": "com.amazonaws.s3#SelectObjectContentEventStream", - "traits": { - "smithy.api#documentation": "

    The array of results.

    ", - "smithy.api#httpPayload": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.s3#SelectObjectContentRequest": { - "type": "structure", - "members": { - "Bucket": { - "target": "com.amazonaws.s3#BucketName", - "traits": { - "smithy.api#documentation": "

    The S3 bucket.

    ", - "smithy.api#httpLabel": {}, - "smithy.api#required": {}, - "smithy.rules#contextParam": { - "name": "Bucket" - } - } - }, - "Key": { - "target": "com.amazonaws.s3#ObjectKey", - "traits": { - "smithy.api#documentation": "

    The object key.

    ", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "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" - } - }, - "Expression": { - "target": "com.amazonaws.s3#Expression", - "traits": { - "smithy.api#documentation": "

    The expression that is used to query the object.

    ", - "smithy.api#required": {} - } - }, - "ExpressionType": { - "target": "com.amazonaws.s3#ExpressionType", - "traits": { - "smithy.api#documentation": "

    The type of the provided expression (for example, SQL).

    ", - "smithy.api#required": {} - } - }, - "RequestProgress": { - "target": "com.amazonaws.s3#RequestProgress", - "traits": { - "smithy.api#documentation": "

    Specifies if periodic request progress information should be enabled.

    " - } - }, - "InputSerialization": { - "target": "com.amazonaws.s3#InputSerialization", - "traits": { - "smithy.api#documentation": "

    Describes the format of the data in the object that is being queried.

    ", - "smithy.api#required": {} - } - }, - "OutputSerialization": { - "target": "com.amazonaws.s3#OutputSerialization", - "traits": { - "smithy.api#documentation": "

    Describes the format of the data that you want Amazon S3 to return in response.

    ", - "smithy.api#required": {} - } - }, - "ScanRange": { - "target": "com.amazonaws.s3#ScanRange", - "traits": { - "smithy.api#documentation": "

    Specifies the byte range of the object to get the records from. A record is processed\n when its first byte is contained by the range. This parameter is optional, but when\n specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the\n start and end of the range.

    \n

    \n ScanRangemay be used in the following ways:

    \n
      \n
    • \n

      \n 50100\n - process only the records starting between the bytes 50 and 100 (inclusive, counting\n from zero)

      \n
    • \n
    • \n

      \n 50 -\n process only the records starting after the byte 50

      \n
    • \n
    • \n

      \n 50 -\n process only the records within the last 50 bytes of the file.

      \n
    • \n
    " - } - }, - "ExpectedBucketOwner": { - "target": "com.amazonaws.s3#AccountId", - "traits": { - "smithy.api#documentation": "

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    ", - "smithy.api#httpHeader": "x-amz-expected-bucket-owner" - } - } - }, - "traits": { - "smithy.api#documentation": "\n

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

    \n
    \n

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query\n Language (SQL) statement. In the request, along with the SQL expression, you must specify a\n data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data\n into records. It returns only records that match the specified SQL expression. You must\n also specify the data serialization format for the response. For more information, see\n S3Select API Documentation.

    ", - "smithy.api#input": {} - } - }, - "com.amazonaws.s3#SelectParameters": { - "type": "structure", - "members": { - "InputSerialization": { - "target": "com.amazonaws.s3#InputSerialization", - "traits": { - "smithy.api#documentation": "

    Describes the serialization format of the object.

    ", - "smithy.api#required": {} - } - }, - "ExpressionType": { - "target": "com.amazonaws.s3#ExpressionType", - "traits": { - "smithy.api#documentation": "

    The type of the provided expression (for example, SQL).

    ", - "smithy.api#required": {} - } - }, - "Expression": { - "target": "com.amazonaws.s3#Expression", - "traits": { - "smithy.api#documentation": "\n

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

    \n
    \n

    The expression that is used to query the object.

    ", - "smithy.api#required": {} - } - }, - "OutputSerialization": { - "target": "com.amazonaws.s3#OutputSerialization", - "traits": { - "smithy.api#documentation": "

    Describes how the results of the Select job are serialized.

    ", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "\n

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more\n

    \n
    \n

    Describes the parameters for Select job types.

    \n

    Learn How to optimize querying your data in Amazon S3 using\n Amazon Athena, S3 Object Lambda, or client-side filtering.

    " - } - }, "com.amazonaws.s3#ServerSideEncryption": { "type": "enum", "members": { @@ -31188,12 +31114,6 @@ } } }, - "com.amazonaws.s3#StreamingBlob": { - "type": "blob", - "traits": { - "smithy.api#streaming": {} - } - }, "com.amazonaws.s3#Suffix": { "type": "string" }, @@ -31949,14 +31869,6 @@ "com.amazonaws.s3#UploadPartRequest": { "type": "structure", "members": { - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

    Object data.

    ", - "smithy.api#httpPayload": {} - } - }, "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { @@ -32213,14 +32125,6 @@ "smithy.api#required": {} } }, - "Body": { - "target": "com.amazonaws.s3#StreamingBlob", - "traits": { - "smithy.api#default": "", - "smithy.api#documentation": "

    The object data.

    ", - "smithy.api#httpPayload": {} - } - }, "StatusCode": { "target": "com.amazonaws.s3#GetObjectResponseStatusCode", "traits": { diff --git a/client/client-core/src/test/java/software/amazon/smithy/java/client/core/ClientTest.java b/client/client-core/src/test/java/software/amazon/smithy/java/client/core/ClientTest.java index d2d4632a0..a3a1c14cb 100644 --- a/client/client-core/src/test/java/software/amazon/smithy/java/client/core/ClientTest.java +++ b/client/client-core/src/test/java/software/amazon/smithy/java/client/core/ClientTest.java @@ -170,7 +170,7 @@ public void requestOverridesPerCallTakePrecedence() throws URISyntaxException { @Override public ClientConfig modifyBeforeCall(CallHook hook) { //RequestOverrides config should be visible here. - assertThat(hook.config().context().get(CallContext.APPLICATION_ID), equalTo(id)); + assertThat(hook.config().context().get(ClientContext.APPLICATION_ID), equalTo(id)); // Note that the overrides given to the call itself will override interceptors. var override = RequestOverrideConfig.builder() .putConfig(ClientContext.APPLICATION_ID, "foo") diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java index 5e6339135..2b29ca774 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java @@ -171,7 +171,6 @@ public final class Bytecode { private final int[] bddNodes; private final int bddRootRef; - // Register management - pre-computed for efficiency final Object[] registerTemplate; private final int[] builtinIndices; private final int[] hardRequiredIndices; @@ -203,7 +202,7 @@ public final class Bytecode { this.bddRootRef = bddRootRef; this.registerTemplate = createRegisterTemplate(registerDefinitions); - this.builtinIndices = findBuiltinIndicesWithoutDefaults(registerDefinitions); + this.builtinIndices = findBuiltinIndices(registerDefinitions); this.hardRequiredIndices = findRequiredIndicesWithoutDefaultsOrBuiltins(registerDefinitions); this.inputRegisterMap = createInputRegisterMap(registerDefinitions); } @@ -397,17 +396,19 @@ private static Map createInputRegisterMap(RegisterDefinition[] private static Object[] createRegisterTemplate(RegisterDefinition[] definitions) { Object[] template = new Object[definitions.length]; for (int i = 0; i < definitions.length; i++) { - template[i] = definitions[i].defaultValue(); + // Only pre-fill defaults if there's no builtin; if there's a builtin, it's handled as a fallback + if (definitions[i].builtin() == null) { + template[i] = definitions[i].defaultValue(); + } } return template; } - private static int[] findBuiltinIndicesWithoutDefaults(RegisterDefinition[] definitions) { + private static int[] findBuiltinIndices(RegisterDefinition[] definitions) { List indices = new ArrayList<>(); for (int i = 0; i < definitions.length; i++) { - RegisterDefinition def = definitions[i]; - // Only track builtins that don't already have defaults - if (def.builtin() != null && def.defaultValue() == null) { + // Track all registers with builtins, regardless of defaults + if (definitions[i].builtin() != null) { indices.add(i); } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java index 992698180..aeddfdd1f 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java @@ -32,12 +32,12 @@ import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; import software.amazon.smithy.rulesengine.logic.bdd.Bdd; import software.amazon.smithy.rulesengine.logic.bdd.BddNodeConsumer; -import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; +import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; final class BytecodeCompiler { private final List extensions; - private final BddTrait bdd; + private final EndpointBddTrait bdd; private final Map> builtinProviders; private final BytecodeWriter writer = new BytecodeWriter(); private final List usedFunctions = new ArrayList<>(); @@ -47,7 +47,7 @@ final class BytecodeCompiler { BytecodeCompiler( List extensions, - BddTrait bdd, + EndpointBddTrait bdd, Map functions, Map> builtinProviders ) { @@ -120,10 +120,9 @@ private void compileCondition(Condition condition) { private void compileEndpointRule(EndpointRule rule) { var e = rule.getEndpoint(); - // Add endpoint header instructions + // Add endpoint header instructions (Header values. Then header name) if (!e.getHeaders().isEmpty()) { for (var entry : e.getHeaders().entrySet()) { - // Header values. Then header name. for (var h : entry.getValue()) { compileExpression(h); } @@ -147,7 +146,6 @@ private void compileEndpointRule(EndpointRule rule) { compileMapCreation(e.getProperties().size()); } - // Compile the URL expression compileExpression(e.getUrl()); // Add the return endpoint instruction @@ -259,6 +257,29 @@ public Void visitLibraryFunction(FunctionDefinition fn, List args) { // Handle special built-in functions switch (fnId) { + case "coalesce" -> { + if (args.size() < 2) { + throw new RulesEvaluationError( + "Coalesce requires at least 2 arguments, got " + args.size()); + } + + String endLabel = writer.createLabel(); + + // Compile all but the last argument with JNN_OR_POP + for (int i = 0; i < args.size() - 1; i++) { + compileExpression(args.get(i)); + writer.writeByte(Opcodes.JNN_OR_POP); + writer.writeJumpPlaceholder(endLabel); + } + + // Compile the last argument (fallback) + compileExpression(args.get(args.size() - 1)); + + // Mark the end label + writer.markLabel(endLabel); + + return null; + } case "substring" -> { compileExpression(args.get(0)); // string writer.writeByte(Opcodes.SUBSTRING); @@ -285,37 +306,21 @@ public Void visitLibraryFunction(FunctionDefinition fn, List args) { } } - // Regular function call + // A generic function call without a special opcode var index = getFunctionIndex(fnId); - - // Compile arguments for (var arg : args) { compileExpression(arg); } - // Use the appropriate function opcode based on argument count - switch (args.size()) { - case 0 -> { - writer.writeByte(Opcodes.FN0); - writer.writeByte(index); - } - case 1 -> { - writer.writeByte(Opcodes.FN1); - writer.writeByte(index); - } - case 2 -> { - writer.writeByte(Opcodes.FN2); - writer.writeByte(index); - } - case 3 -> { - writer.writeByte(Opcodes.FN3); - writer.writeByte(index); - } - default -> { - writer.writeByte(Opcodes.FN); - writer.writeByte(index); - } - } + writer.writeByte(switch (args.size()) { + case 0 -> Opcodes.FN0; + case 1 -> Opcodes.FN1; + case 2 -> Opcodes.FN2; + case 3 -> Opcodes.FN3; + default -> Opcodes.FN; + }); + + writer.writeByte(index); return null; } }); diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java index 4c9176ae0..cae9b7e1d 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java @@ -88,7 +88,7 @@ final class BytecodeDisassembler { Map.entry(Opcodes.RETURN_VALUE, new InstructionDef("RETURN_VALUE", OperandType.NONE)), // Control flow - Map.entry(Opcodes.JT_OR_POP, new InstructionDef("JT_OR_POP", OperandType.SHORT, Show.JUMP_OFFSET))); + Map.entry(Opcodes.JNN_OR_POP, new InstructionDef("JNN_OR_POP", OperandType.SHORT, Show.JUMP_OFFSET))); // Enum to define operand types private enum OperandType { diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java index fc058639c..0a1353ce1 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolver.java @@ -38,11 +38,12 @@ public BytecodeEndpointResolver( ) { this.bytecode = bytecode; this.extensions = extensions.toArray(new RulesExtension[0]); - this.registerFiller = RegisterFiller.of(bytecode, builtinProviders); this.bdd = bytecode.getBdd(); + // Create and reuse this register filler across thread local evaluators. + this.registerFiller = RegisterFiller.of(bytecode, builtinProviders); this.threadLocalEvaluator = ThreadLocal.withInitial(() -> { - return new BytecodeEvaluator(bytecode, this.extensions); + return new BytecodeEvaluator(bytecode, this.extensions, registerFiller); }); } @@ -52,16 +53,16 @@ public CompletableFuture resolveEndpoint(EndpointResolverParams params var evaluator = threadLocalEvaluator.get(); var operation = params.operation(); var ctx = params.context(); + // Get reusable params array and clear it var inputParams = evaluator.paramsCache; inputParams.clear(); + // Prep the input parameters by grabbing them from the input and from other traits. ContextProvider.createEndpointParams(inputParams, ctxProvider, ctx, operation, params.inputValue()); - // Use RegisterFiller to set up registers - Object[] registers = evaluator.getRegisters(); - registerFiller.fillRegisters(registers, ctx, inputParams); - evaluator.resetWithFilledRegisters(ctx); + // Reset the evaluator and prepare new registers. + evaluator.reset(ctx, inputParams); LOGGER.debug("Resolving endpoint of {} using VM with params: {}", operation, inputParams); diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java index a3e65be1f..999624bc4 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java @@ -38,33 +38,27 @@ final class BytecodeEvaluator implements ConditionEvaluator { private int pc; private final StringBuilder stringBuilder = new StringBuilder(64); private final UriFactory uriFactory = new UriFactory(); + private final RegisterFiller registerFiller; private Context context; - BytecodeEvaluator(Bytecode bytecode, RulesExtension[] extensions) { + BytecodeEvaluator(Bytecode bytecode, RulesExtension[] extensions, RegisterFiller registerFiller) { this.bytecode = bytecode; this.extensions = extensions; this.registers = new Object[bytecode.getRegisterDefinitions().length]; + this.registerFiller = registerFiller; } /** - * Get the registers array for external filling by RegisterFiller. + * Reset the evaluator and registers of the evaluator so it can be reused, using the given context and + * input parameters. * - * @return the registers array + * @param context Context to get context from. + * @param parameters Parameters to get input from. */ - Object[] getRegisters() { - return registers; - } - - /** - * Reset the evaluator with pre-filled registers. - * - *

    This method assumes the registers have already been filled by RegisterFiller. - * It only resets the stack position and sets the context. - */ - BytecodeEvaluator resetWithFilledRegisters(Context context) { + void reset(Context context, Map parameters) { this.context = context; this.stackPosition = 0; - return this; + registerFiller.fillRegisters(registers, context, parameters); } @Override @@ -238,7 +232,6 @@ private Object run(int start) { stackPosition = firstArgPosition + 1; } case Opcodes.FN0 -> { - // Can't optimize: no args to pop var fn = functions[instructions[pc++] & 0xFF]; push(fn.apply0()); } @@ -377,15 +370,15 @@ private Object run(int start) { case Opcodes.RETURN_VALUE -> { return stack[--stackPosition]; } - case Opcodes.JT_OR_POP -> { + case Opcodes.JNN_OR_POP -> { Object value = stack[stackPosition - 1]; // Read as unsigned 16-bit value (0-65535) int offset = ((instructions[pc] & 0xFF) << 8) | (instructions[pc + 1] & 0xFF); pc += 2; - if (value != null && value != Boolean.FALSE) { + if (value != null) { pc += offset; // Jump forward, keeping value on stack } else { - stackPosition--; // Pop the falsey value + stackPosition--; // Pop the null value } } default -> throw new RulesEvaluationError("Unknown rules engine instruction: " + opcode, pc); diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java index 04de74027..76f5a098e 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java @@ -27,6 +27,11 @@ final class BytecodeWriter { private final List constants = new ArrayList<>(); private final List functionNames = new ArrayList<>(); + // Jump patching + private final Map jumpPatches = new HashMap<>(); + private final Map labels = new HashMap<>(); + private int labelCounter = 0; + void markConditionStart() { conditionOffsets.add(bytecodeStream.size()); } @@ -47,6 +52,19 @@ void writeShort(int value) { bytecodeStream.write(value & 0xFF); } + String createLabel() { + return "L" + (labelCounter++); + } + + void markLabel(String label) { + labels.put(label, bytecodeStream.size()); + } + + void writeJumpPlaceholder(String label) { + jumpPatches.put(bytecodeStream.size(), label); + writeShort(0); + } + // Get or allocate constant index int getConstantIndex(Object value) { return constantIndices.computeIfAbsent(canonicalizeConstant(value), v -> { @@ -120,7 +138,16 @@ Bytecode build( dos.write(regDefBytes); writeBddTable(dos, bddNodes); - byte[] bytecode = bytecodeStream.toByteArray(); + // Apply jump patches to get the final bytecode + byte[] originalBytecode = bytecodeStream.toByteArray(); + byte[] bytecode = originalBytecode; + if (!jumpPatches.isEmpty()) { + ByteArrayOutputStream patchedStream = new ByteArrayOutputStream(); + DataOutputStream patchedDos = new DataOutputStream(patchedStream); + writePatchedBytecode(patchedDos, originalBytecode); + patchedDos.flush(); + bytecode = patchedStream.toByteArray(); + } dos.write(bytecode); int constantPoolOffset = complete.size(); @@ -149,6 +176,44 @@ Bytecode build( } } + private void writePatchedBytecode(DataOutputStream dos, byte[] bytecode) throws IOException { + // Sort patches by offset to process them in order + List> sortedPatches = new ArrayList<>(jumpPatches.entrySet()); + sortedPatches.sort(Map.Entry.comparingByKey()); + + // Write bytecode, patching jumps as we go + int lastWritten = 0; + for (Map.Entry patch : sortedPatches) { + int patchOffset = patch.getKey(); + String label = patch.getValue(); + + // Write everything up to the patch point + if (patchOffset > lastWritten) { + dos.write(bytecode, lastWritten, patchOffset - lastWritten); + } + + // Calculate and write the jump offset + Integer targetOffset = labels.get(label); + if (targetOffset == null) { + throw new IllegalStateException("Undefined label: " + label); + } + + int relativeJump = targetOffset - (patchOffset + 2); + if (relativeJump < 0 || relativeJump > 65535) { + throw new IllegalStateException("Jump offset out of range: " + relativeJump + + " (from " + patchOffset + " to " + targetOffset + ")"); + } + + dos.writeShort(relativeJump); + lastWritten = patchOffset + 2; + } + + // Write any remaining bytecode after the last patch + if (lastWritten < bytecode.length) { + dos.write(bytecode, lastWritten, bytecode.length - lastWritten); + } + } + private void writeHeader( DataOutputStream dos, int registerCount, diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java index a33817245..00d8b3da2 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolver.java @@ -18,13 +18,13 @@ import software.amazon.smithy.rulesengine.language.EndpointRuleSet; import software.amazon.smithy.rulesengine.language.evaluation.RuleEvaluator; import software.amazon.smithy.rulesengine.language.evaluation.value.EndpointValue; +import software.amazon.smithy.rulesengine.language.evaluation.value.StringValue; import software.amazon.smithy.rulesengine.language.evaluation.value.Value; import software.amazon.smithy.rulesengine.language.syntax.Identifier; /** * Resolves endpoints by interpreting the endpoint ruleset decision tree. This is significantly slower that using the - * bytecode interpreter, but it's not practical for a dynamic client to compile a BDD then bytecode - * (that's easily 150 ms+). + * bytecode interpreter, but it's not practical for a dynamic client to compile a BDD, then bytecode, or do sifting. */ final class DecisionTreeEndpointResolver implements EndpointResolver { @@ -121,9 +121,11 @@ public CompletableFuture resolveEndpoint(EndpointResolverParams params var result = RuleEvaluator.evaluate(rules, input); if (result instanceof EndpointValue ev) { return CompletableFuture.completedFuture(convertEndpoint(params, ev)); + } else if (result instanceof StringValue sv) { + return CompletableFuture.failedFuture(new RulesEvaluationError(sv.getValue())); + } else { + throw new IllegalStateException("Expected decision tree to return an endpoint, but found " + result); } - - throw new IllegalStateException("Expected decision tree to return an endpoint, but found " + result); } catch (RulesEvaluationError e) { return CompletableFuture.failedFuture(e); } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java index 9dad329fb..fc7135b91 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java @@ -14,7 +14,7 @@ import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.core.schema.TraitKey; import software.amazon.smithy.java.logging.InternalLogger; -import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; +import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; import software.amazon.smithy.rulesengine.traits.ContextParamTrait; import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; import software.amazon.smithy.rulesengine.traits.OperationContextParamsTrait; @@ -42,10 +42,10 @@ public final class EndpointRulesPlugin implements ClientPlugin { public static final TraitKey ENDPOINT_RULESET_TRAIT = TraitKey.get(EndpointRuleSetTrait.class); - public static final TraitKey BDD_TRAIT = TraitKey.get(BddTrait.class); + public static final TraitKey BDD_TRAIT = TraitKey.get(EndpointBddTrait.class); private final Bytecode bytecode; - private final RulesEngineBuilder engine; + private RulesEngineBuilder engine; private EndpointRulesPlugin(Bytecode bytecode, RulesEngineBuilder engine) { this.bytecode = bytecode; @@ -97,6 +97,13 @@ public Bytecode getBytecode() { return bytecode; } + private RulesEngineBuilder getEngine() { + if (engine == null) { + engine = new RulesEngineBuilder(); + } + return engine; + } + @Override public void configureClient(ClientConfig.Builder config) { // Only modify the endpoint resolver if it isn't set already or if CUSTOM_ENDPOINT is set, @@ -110,33 +117,38 @@ public void configureClient(ClientConfig.Builder config) { LOGGER.debug("Trying to use EndpointRulesPlugin resolver because CUSTOM_ENDPOINT is set"); } - if (usePlugin) { - EndpointResolver resolver = null; - - if (bytecode == null && config.service() != null) { - var bddTrait = config.service().schema().getTrait(BDD_TRAIT); - if (bddTrait != null) { - LOGGER.debug("Found endpoint BDD trait on service: {}", config.service()); - resolver = new BytecodeEndpointResolver( - engine.compile(bddTrait), - engine.getExtensions(), - engine.getBuiltinProviders()); - } else { - var ruleset = config.service().schema().getTrait(ENDPOINT_RULESET_TRAIT); - if (ruleset != null) { - LOGGER.debug("Using decision tree based endpoint resolver for service: {}", config.service()); - resolver = new DecisionTreeEndpointResolver( - ruleset.getEndpointRuleSet(), - engine.getExtensions(), - engine.getBuiltinProviders()); - } + if (!usePlugin) { + LOGGER.debug("Not using EndpointRulesPlugin"); + return; + } + + EndpointResolver resolver = null; + RulesEngineBuilder e = getEngine(); + + if (bytecode != null) { + LOGGER.debug("Using explicitly provided bytecode: {}", config.service()); + resolver = new BytecodeEndpointResolver(bytecode, e.getExtensions(), e.getBuiltinProviders()); + } else if (config.service() != null) { + var bddTrait = config.service().schema().getTrait(BDD_TRAIT); + if (bddTrait != null) { + LOGGER.debug("Found endpoint BDD trait on service: {}", config.service()); + var bytecode = e.compile(bddTrait); + resolver = new BytecodeEndpointResolver(bytecode, e.getExtensions(), e.getBuiltinProviders()); + } else { + var rs = config.service().schema().getTrait(ENDPOINT_RULESET_TRAIT); + if (rs != null) { + LOGGER.debug("Using decision tree based endpoint resolver for service: {}", config.service()); + resolver = new DecisionTreeEndpointResolver( + rs.getEndpointRuleSet(), + e.getExtensions(), + e.getBuiltinProviders()); } } + } - if (resolver != null) { - config.endpointResolver(resolver); - LOGGER.debug("Applying EndpointRulesResolver to client: {}", config.service()); - } + if (resolver != null) { + config.endpointResolver(resolver); + LOGGER.info("Applying EndpointRulesResolver to client: {}", config.service()); } } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java index 2aa34c19a..4fe59c92c 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java @@ -12,317 +12,317 @@ private Opcodes() {} /** * Push a constant value onto the stack from the constant pool. * - *

    Stack: [...] → [..., value] + *

    Stack: [...] => [..., value] * *

    LOAD_CONST [const-index:byte] */ - static final byte LOAD_CONST = 0; + public static final byte LOAD_CONST = 0; /** * Push a constant value onto the stack from the constant pool using a wide index. * - *

    Stack: [...] → [..., value] + *

    Stack: [...] => [..., value] * *

    LOAD_CONST_W [const-index:short] */ - static final byte LOAD_CONST_W = 1; + public static final byte LOAD_CONST_W = 1; /** * Store the value at the top of the stack into a register without popping it. * - *

    Stack: [..., value] → [..., value] + *

    Stack: [..., value] => [..., value] * *

    SET_REGISTER [register:byte] */ - static final byte SET_REGISTER = 2; + public static final byte SET_REGISTER = 2; /** * Load a value from a register and push it onto the stack. * - *

    Stack: [...] → [..., value] + *

    Stack: [...] => [..., value] * *

    LOAD_REGISTER [register:byte] */ - static final byte LOAD_REGISTER = 3; + public static final byte LOAD_REGISTER = 3; /** * Replace the top stack value with its logical negation. * - *

    Stack: [..., value] → [..., !value] + *

    Stack: [..., value] => [..., !value] * *

    NOT */ - static final byte NOT = 4; + public static final byte NOT = 4; /** * Replace the top stack value with true if it's non-null, false otherwise. * - *

    Stack: [..., value] → [..., boolean] + *

    Stack: [..., value] => [..., boolean] * *

    ISSET */ - static final byte ISSET = 5; + public static final byte ISSET = 5; /** * Test if a register contains a non-null value and push the result. * - *

    Stack: [...] → [..., boolean] + *

    Stack: [...] => [..., boolean] * *

    TEST_REGISTER_ISSET [register:byte] */ - static final byte TEST_REGISTER_ISSET = 6; + public static final byte TEST_REGISTER_ISSET = 6; /** * Test if a register is null or unset and push the result. * - *

    Stack: [...] → [..., boolean] + *

    Stack: [...] => [..., boolean] * *

    TEST_REGISTER_NOT_SET [register:byte] */ - static final byte TEST_REGISTER_NOT_SET = 7; + public static final byte TEST_REGISTER_NOT_SET = 7; /** * Push an empty list onto the stack. * - *

    Stack: [...] → [..., []] + *

    Stack: [...] => [..., []] * *

    LIST0 */ - static final byte LIST0 = 8; + public static final byte LIST0 = 8; /** * Pop one value from the stack and push a single-element list. * - *

    Stack: [..., value] → [..., [value]] + *

    Stack: [..., value] => [..., [value]] * *

    LIST1 */ - static final byte LIST1 = 9; + public static final byte LIST1 = 9; /** * Pop two values from the stack and push a two-element list. * - *

    Stack: [..., value1, value2] → [..., [value1, value2]] + *

    Stack: [..., value1, value2] => [..., [value1, value2]] * *

    LIST2 */ - static final byte LIST2 = 10; + public static final byte LIST2 = 10; /** * Pop N values from the stack and push a list containing them. * - *

    Stack: [..., value1, ..., valueN] → [..., list] + *

    Stack: [..., value1, ..., valueN] => [..., list] * *

    LISTN [size:byte] */ - static final byte LISTN = 11; + public static final byte LISTN = 11; /** * Push an empty map onto the stack. * - *

    Stack: [...] → [..., {}] + *

    Stack: [...] => [..., {}] * *

    MAP0 */ - static final byte MAP0 = 12; + public static final byte MAP0 = 12; /** * Pop a key-value pair from the stack and push a single-entry map. * - *

    Stack: [..., value, key] → [..., {key: value}] + *

    Stack: [..., value, key] => [..., {key: value}] * *

    MAP1 */ - static final byte MAP1 = 13; + public static final byte MAP1 = 13; /** * Pop two key-value pairs from the stack and push a two-entry map. * - *

    Stack: [..., value1, key1, value2, key2] → [..., {key1: value1, key2: value2}] + *

    Stack: [..., value1, key1, value2, key2] => [..., {key1: value1, key2: value2}] * *

    MAP2 */ - static final byte MAP2 = 14; + public static final byte MAP2 = 14; /** * Pop three key-value pairs from the stack and push a three-entry map. * - *

    Stack: [..., value1, key1, value2, key2, value3, key3] → [..., map] + *

    Stack: [..., value1, key1, value2, key2, value3, key3] => [..., map] * *

    MAP3 */ - static final byte MAP3 = 15; + public static final byte MAP3 = 15; /** * Pop four key-value pairs from the stack and push a four-entry map. * - *

    Stack: [..., value1, key1, value2, key2, value3, key3, value4, key4] → [..., map] + *

    Stack: [..., value1, key1, value2, key2, value3, key3, value4, key4] => [..., map] * *

    MAP4 */ - static final byte MAP4 = 16; + public static final byte MAP4 = 16; /** * Pop N key-value pairs from the stack and push a map containing them. * - *

    Stack: [..., value1, key1, ..., valueN, keyN] → [..., map] + *

    Stack: [..., value1, key1, ..., valueN, keyN] => [..., map] * *

    MAPN [size:byte] */ - static final byte MAPN = 17; + public static final byte MAPN = 17; /** * Pop N values from the stack and resolve a string template with them. * The template is fetched from the constant pool and the N argument count * is provided as an operand to avoid storing it in the template. * - *

    Stack: [..., arg1, arg2, ..., argN] → [..., string] + *

    Stack: [..., arg1, arg2, ..., argN] => [..., string] * *

    RESOLVE_TEMPLATE [arg-count:byte] [template-index:short] */ - static final byte RESOLVE_TEMPLATE = 18; + public static final byte RESOLVE_TEMPLATE = 18; /** * Call a function with no arguments and push the result. * - *

    Stack: [...] → [..., result] + *

    Stack: [...] => [..., result] * *

    FN0 [function-index:byte] */ - static final byte FN0 = 19; + public static final byte FN0 = 19; /** * Call a function with one argument and push the result. * - *

    Stack: [..., arg] → [..., result] + *

    Stack: [..., arg] => [..., result] * *

    FN1 [function-index:byte] */ - static final byte FN1 = 20; + public static final byte FN1 = 20; /** * Call a function with two arguments and push the result. * - *

    Stack: [..., arg1, arg2] → [..., result] + *

    Stack: [..., arg1, arg2] => [..., result] * *

    FN2 [function-index:byte] */ - static final byte FN2 = 21; + public static final byte FN2 = 21; /** * Call a function with three arguments and push the result. * - *

    Stack: [..., arg1, arg2, arg3] → [..., result] + *

    Stack: [..., arg1, arg2, arg3] => [..., result] * *

    FN3 [function-index:byte] */ - static final byte FN3 = 22; + public static final byte FN3 = 22; /** * Call a function with arguments from the stack and push the result. * - *

    Stack: [..., arg1, arg2, ..., argN] → [..., result] + *

    Stack: [..., arg1, arg2, ..., argN] => [..., result] * *

    FN [function-index:byte] */ - static final byte FN = 23; + public static final byte FN = 23; /** * Get a property from the value at the top of the stack, replacing it with the property value. * - *

    Stack: [..., object] → [..., object.property] + *

    Stack: [..., object] => [..., object.property] * *

    GET_PROPERTY [property-name-index:short] */ - static final byte GET_PROPERTY = 24; + public static final byte GET_PROPERTY = 24; /** * Get an indexed element from the value at the top of the stack, replacing it with the element. * - *

    Stack: [..., array] → [..., array[index]] + *

    Stack: [..., array] => [..., array[index]] * *

    GET_INDEX [index:byte] */ - static final byte GET_INDEX = 25; + public static final byte GET_INDEX = 25; /** * Load a property from a register and push it onto the stack. * - *

    Stack: [...] → [..., register.property] + *

    Stack: [...] => [..., register.property] * *

    GET_PROPERTY_REG [register:byte] [property-name-index:short] */ - static final byte GET_PROPERTY_REG = 26; + public static final byte GET_PROPERTY_REG = 26; /** * Load an indexed element from a register and push it onto the stack. * - *

    Stack: [...] → [..., register[index]] + *

    Stack: [...] => [..., register[index]] * *

    GET_INDEX_REG [register:byte] [index:byte] */ - static final byte GET_INDEX_REG = 27; + public static final byte GET_INDEX_REG = 27; /** * Replace the top stack value with true if it equals Boolean.TRUE, false otherwise. * - *

    Stack: [..., value] → [..., boolean] + *

    Stack: [..., value] => [..., boolean] * *

    IS_TRUE */ - static final byte IS_TRUE = 28; + public static final byte IS_TRUE = 28; /** * Test if a register contains Boolean.TRUE and push the result. * - *

    Stack: [...] → [..., boolean] + *

    Stack: [...] => [..., boolean] * *

    TEST_REGISTER_IS_TRUE [register:byte] */ - static final byte TEST_REGISTER_IS_TRUE = 29; + public static final byte TEST_REGISTER_IS_TRUE = 29; /** * Test if a register contains Boolean.FALSE and push the result. * - *

    Stack: [...] → [..., boolean] + *

    Stack: [...] => [..., boolean] * *

    TEST_REGISTER_IS_FALSE [register:byte] */ - static final byte TEST_REGISTER_IS_FALSE = 30; + public static final byte TEST_REGISTER_IS_FALSE = 30; /** * Pop two values from the stack and push whether they are equal. * - *

    Stack: [..., value1, value2] → [..., boolean] + *

    Stack: [..., value1, value2] => [..., boolean] * *

    EQUALS */ - static final byte EQUALS = 31; + public static final byte EQUALS = 31; /** * Pop two strings from the stack and push whether they are equal. * More efficient than EQUALS for string comparisons. * - *

    Stack: [..., string1, string2] → [..., boolean] + *

    Stack: [..., string1, string2] => [..., boolean] * *

    STRING_EQUALS */ - static final byte STRING_EQUALS = 32; + public static final byte STRING_EQUALS = 32; /** * Pop two booleans from the stack and push whether they are equal. * More efficient than EQUALS for boolean comparisons. * - *

    Stack: [..., boolean1, boolean2] → [..., boolean] + *

    Stack: [..., boolean1, boolean2] => [..., boolean] * *

    BOOLEAN_EQUALS */ - static final byte BOOLEAN_EQUALS = 33; + public static final byte BOOLEAN_EQUALS = 33; /** * Pop a string from the stack and push a substring of it. * - *

    Stack: [..., string] → [..., substring] + *

    Stack: [..., string] => [..., substring] * *

    SUBSTRING [start:byte] [end:byte] [reverse:byte] * @@ -333,53 +333,53 @@ private Opcodes() {} *

  • reverse: If non-zero, count positions from the end of the string
  • * */ - static final byte SUBSTRING = 34; + public static final byte SUBSTRING = 34; /** * Pop a string and boolean from the stack and push whether it's a valid host label. * - *

    Stack: [..., string, allowDots] → [..., boolean] + *

    Stack: [..., string, allowDots] => [..., boolean] * *

    IS_VALID_HOST_LABEL */ - static final byte IS_VALID_HOST_LABEL = 35; + public static final byte IS_VALID_HOST_LABEL = 35; /** * Pop a string URL from the stack, parse it, and push the URI or null if invalid. * - *

    Stack: [..., urlString] → [..., uri|null] + *

    Stack: [..., urlString] => [..., uri|null] * *

    PARSE_URL */ - static final byte PARSE_URL = 36; + public static final byte PARSE_URL = 36; /** * Pop a string from the stack and push its URI-encoded form. * - *

    Stack: [..., string] → [..., encodedString] + *

    Stack: [..., string] => [..., encodedString] * *

    URI_ENCODE */ - static final byte URI_ENCODE = 37; + public static final byte URI_ENCODE = 37; /** * Pop an error message from the stack and terminate with an error. * - *

    Stack: [..., errorMessage] → (terminates) + *

    Stack: [..., errorMessage] => (terminates) * *

    RETURN_ERROR */ - static final byte RETURN_ERROR = 38; + public static final byte RETURN_ERROR = 38; /** * Build and return an endpoint. Pops URL, and optionally headers and properties based on flags. * *

    Stack varies based on flags: *

      - *
    • No flags: [..., url] → (returns endpoint)
    • - *
    • Headers flag (bit 0): [..., headers, url] → (returns endpoint)
    • - *
    • Properties flag (bit 1): [..., properties, url] → (returns endpoint)
    • - *
    • Both flags: [..., properties, headers, url] → (returns endpoint)
    • + *
    • No flags: [..., url] => (returns endpoint)
    • + *
    • Headers flag (bit 0): [..., headers, url] => (returns endpoint)
    • + *
    • Properties flag (bit 1): [..., properties, url] => (returns endpoint)
    • + *
    • Both flags: [..., properties, headers, url] => (returns endpoint)
    • *
    * *

    RETURN_ENDPOINT [flags:byte] @@ -390,30 +390,27 @@ private Opcodes() {} *

  • Bit 1 (0x02): Has properties
  • * */ - static final byte RETURN_ENDPOINT = 39; + public static final byte RETURN_ENDPOINT = 39; /** * Pop a value from the stack and return it as the result. * - *

    Stack: [..., value] → (returns value) + *

    Stack: [..., value] => (returns value) * *

    RETURN_VALUE */ - static final byte RETURN_VALUE = 40; + public static final byte RETURN_VALUE = 40; /** - * Jump forward if the value at the top of the stack is truthy (not null and not Boolean.FALSE). - * If jumping, leave the value on the stack. If not jumping, pop the value. + * Jump forward if the value at the top of the stack is non-null. + * If jumping, leave the value on the stack. If not jumping (null), pop the value. * - *

    The offset is an unsigned 16-bit value (0-65535) representing the number of bytes to jump - * forward, relative to the instruction following this one (after the 2-byte offset). Backward - * jumps are not allowed. + *

    This is used for null-coalescing operations where we want to short-circuit + * on the first non-null value. * - *

    Stack: [..., value] → [..., value] (if jumping) or [...] (if not jumping) + *

    Stack: [..., value] => [..., value] (if non-null) or [...] (if null) * - *

    JT_OR_POP [offset:ushort] - * - *

    Example: At position 100, JT_OR_POP 50 would jump to position 153 (100 + 3 + 50) + *

    JNN_OR_POP [offset:ushort] */ - static final byte JT_OR_POP = 41; + public static final byte JNN_OR_POP = 42; } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java index 9278a6dec..4164edba9 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java @@ -22,6 +22,7 @@ */ abstract class RegisterFiller { protected final Function[] providersByRegister; + protected final Object[] defaultsByRegister; // Defaults for registers with builtins protected final Map inputRegisterMap; protected final RegisterDefinition[] registerDefinitions; protected final Object[] registerTemplate; @@ -45,15 +46,20 @@ protected RegisterFiller( registerDefinitions.length)); } - // Align providers by register index for O(1) access + // Set up builtin providers and their fallback defaults this.providersByRegister = new Function[registerDefinitions.length]; + this.defaultsByRegister = new Object[registerDefinitions.length]; + for (int regIndex : builtinIndices) { - String builtinName = registerDefinitions[regIndex].builtin(); + RegisterDefinition def = registerDefinitions[regIndex]; + String builtinName = def.builtin(); Function provider = builtinProviders.get(builtinName); if (provider == null) { throw new IllegalStateException("Missing builtin provider: " + builtinName); } this.providersByRegister[regIndex] = provider; + // Store the default for this builtin (may be null) + this.defaultsByRegister[regIndex] = def.defaultValue(); } } @@ -157,15 +163,21 @@ Object[] fillRegisters(Object[] sink, Context context, Map param } } - // Fill builtins, and early exit if all filled - if ((filled & builtinMask) != builtinMask) { - long unfilled = builtinMask & ~filled; - while (unfilled != 0) { - int i = Long.numberOfTrailingZeros(unfilled); - unfilled &= unfilled - 1; // Clear lowest set bit - var result = providersByRegister[i].apply(context); - if (result != null) { - sink[i] = result; + // Apply builtins for unfilled slots with builtin providers + long unfilledBuiltins = builtinMask & ~filled; + while (unfilledBuiltins != 0) { + int i = Long.numberOfTrailingZeros(unfilledBuiltins); + unfilledBuiltins &= unfilledBuiltins - 1; // Clear lowest set bit + + Object result = providersByRegister[i].apply(context); + if (result != null) { + sink[i] = result; + filled |= 1L << i; + } else { + // Builtin returned null, use default if available + Object defaultValue = defaultsByRegister[i]; + if (defaultValue != null) { + sink[i] = defaultValue; filled |= 1L << i; } } @@ -182,7 +194,6 @@ Object[] fillRegisters(Object[] sink, Context context, Map param } } - // Fallback implementation for > 64 registers using simple array-based approach. private static final class LargeRegisterFiller extends RegisterFiller { private final int[] builtinIndices; private final int[] hardRequiredIndices; @@ -212,10 +223,10 @@ Object[] fillRegisters(Object[] sink, Context context, Map param // Copy template to set up defaults and clear old state System.arraycopy(registerTemplate, 0, sink, 0, registerTemplate.length); - // Track what registers have been filled (defaults are already in sink) + // Track what's been filled boolean[] filled = Arrays.copyOf(hasDefault, hasDefault.length); - // Fill parameters + // Apply parameters (overrides defaults and will override builtins) for (var e : parameters.entrySet()) { Integer i = inputRegisterMap.get(e.getKey()); if (i != null) { @@ -231,6 +242,13 @@ Object[] fillRegisters(Object[] sink, Context context, Map param if (result != null) { sink[regIndex] = result; filled[regIndex] = true; + } else { + // Builtin returned null, use default if available + Object defaultValue = defaultsByRegister[regIndex]; + if (defaultValue != null) { + sink[regIndex] = defaultValue; + filled[regIndex] = true; + } } } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java index 4f0fb6f01..f8936557f 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java @@ -17,7 +17,7 @@ import java.util.ServiceLoader; import java.util.function.Function; import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; +import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; /** * Compiles and loads a rules engine used to resolve endpoints based on Smithy's rules engine traits. @@ -98,7 +98,7 @@ public RulesEngineBuilder addExtension(RulesExtension extension) { * @param bdd BDD Rules to compile. * @return the compiled program. */ - public Bytecode compile(BddTrait bdd) { + public Bytecode compile(EndpointBddTrait bdd) { return new BytecodeCompiler(extensions, bdd, functions, builtinProviders).compile(); } diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java new file mode 100644 index 000000000..b0e272757 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java @@ -0,0 +1,656 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.rulesengine.language.Endpoint; +import software.amazon.smithy.rulesengine.language.evaluation.value.Value; +import software.amazon.smithy.rulesengine.language.syntax.Identifier; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Template; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.BooleanEquals; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.GetAttr; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsSet; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsValidHostLabel; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunction; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Not; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.ParseUrl; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.StringEquals; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal; +import software.amazon.smithy.rulesengine.language.syntax.parameters.Parameter; +import software.amazon.smithy.rulesengine.language.syntax.parameters.ParameterType; +import software.amazon.smithy.rulesengine.language.syntax.parameters.Parameters; +import software.amazon.smithy.rulesengine.language.syntax.rule.Condition; +import software.amazon.smithy.rulesengine.language.syntax.rule.EndpointRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.ErrorRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.NoMatchRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; +import software.amazon.smithy.rulesengine.logic.bdd.Bdd; +import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; + +class BytecodeCompilerTest { + + private Map functions; + private Map> builtinProviders; + private List extensions; + + @BeforeEach + void setUp() { + functions = new HashMap<>(); + builtinProviders = new HashMap<>(); + extensions = new ArrayList<>(); + + functions.put("testFunc", new TestFunction("testFunc", 1)); + functions.put("concat", new TestFunction("concat", 2)); + } + + @Test + void testCompileEmptyBdd() { + EndpointBddTrait bdd = createEmptyBdd(); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertNotNull(bytecode); + assertEquals(0, bytecode.getConditionCount()); + assertEquals(1, bytecode.getResultCount()); // NoMatchRule + } + + @Test + void testCompileSimpleCondition() { + Condition condition = Condition.builder() + .fn(IsSet.ofExpressions(Expression.getReference(Identifier.of("param1")))) + .build(); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("param1") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertEquals(1, bytecode.getConditionCount()); + assertTrue(bytecode.getBytecode().length > 0); + assertOpcodePresent(bytecode, Opcodes.TEST_REGISTER_ISSET); + } + + @Test + void testCompileConditionWithBinding() { + Condition condition = Condition.builder() + .fn(IsSet.ofExpressions(Expression.getReference(Identifier.of("input")))) + .result(Identifier.of("hasInput")) + .build(); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("input") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + // Should have allocated a register for the binding + RegisterDefinition[] registers = bytecode.getRegisterDefinitions(); + boolean foundHasInput = false; + for (RegisterDefinition reg : registers) { + if ("hasInput".equals(reg.name())) { + foundHasInput = true; + break; + } + } + assertTrue(foundHasInput); + + assertOpcodePresent(bytecode, Opcodes.SET_REGISTER); + } + + @Test + void testCompileBooleanEquals() { + Condition condition = Condition.builder() + .fn(BooleanEquals.ofExpressions( + Expression.getReference(Identifier.of("flag")), + Literal.booleanLiteral(true))) + .build(); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("flag") + .type(ParameterType.BOOLEAN) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.TEST_REGISTER_IS_TRUE); + } + + @Test + void testCompileStringEquals() { + Condition condition = Condition.builder() + .fn(StringEquals.ofExpressions( + Expression.getReference(Identifier.of("str1")), + Expression.getReference(Identifier.of("str2")))) + .build(); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("str1") + .type(ParameterType.STRING) + .build()) + .addParameter(Parameter.builder() + .name("str2") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.STRING_EQUALS); + } + + @Test + void testCompileNot() { + Condition condition = Condition.builder() + .fn(Not.ofExpressions( + IsSet.ofExpressions(Expression.getReference(Identifier.of("param"))))) + .build(); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("param") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.TEST_REGISTER_NOT_SET); + } + + @Test + void testCompileEndpointRule() { + EndpointRule rule = EndpointRule.builder() + .endpoint(Endpoint.builder() + .url(Literal.stringLiteral(Template.fromString("https://example.com"))) + .build()); + + List results = List.of(NoMatchRule.INSTANCE, rule); + EndpointBddTrait bdd = createBddWithResults(results); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertEquals(2, bytecode.getResultCount()); + assertOpcodePresent(bytecode, Opcodes.RETURN_ENDPOINT); + } + + @Test + void testCompileEndpointWithHeaders() { + Map> headers = new HashMap<>(); + headers.put("X-Custom", List.of(Literal.stringLiteral(Template.fromString("value")))); + + EndpointRule rule = EndpointRule.builder() + .endpoint(Endpoint.builder() + .url(Literal.stringLiteral(Template.fromString("https://example.com"))) + .headers(headers) + .build()); + + List results = List.of(NoMatchRule.INSTANCE, rule); + EndpointBddTrait bdd = createBddWithResults(results); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + // Should have constants for header name and value + assertConstantPresent(bytecode, "X-Custom"); + } + + @Test + void testCompileEndpointWithProperties() { + Map properties = new HashMap<>(); + properties.put(Identifier.of("authSchemes"), + Literal.tupleLiteral(List.of(Literal.stringLiteral(Template.fromString("sigv4"))))); + + EndpointRule rule = EndpointRule.builder() + .endpoint(Endpoint.builder() + .url(Literal.stringLiteral(Template.fromString("https://example.com"))) + .properties(properties) + .build()); + + List results = List.of(NoMatchRule.INSTANCE, rule); + EndpointBddTrait bdd = createBddWithResults(results); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertConstantPresent(bytecode, "authSchemes"); + } + + @Test + void testCompileErrorRule() { + ErrorRule rule = ErrorRule.builder().error(Literal.stringLiteral(Template.fromString("Invalid input"))); + + List results = List.of(NoMatchRule.INSTANCE, rule); + EndpointBddTrait bdd = createBddWithResults(results); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.RETURN_ERROR); + } + + @Test + void testCompileStringTemplate() { + Template template = Template.fromString("Hello {name}!"); + Condition condition = Condition.builder() + .fn(StringEquals.ofExpressions( + Literal.stringLiteral(template), + Literal.stringLiteral(Template.fromString("test")))) + .build(); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("name") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.RESOLVE_TEMPLATE); + } + + @Test + void testCompileTupleLiteral() { + Condition condition = createConditionWithExpression( + Literal.tupleLiteral(List.of( + Literal.stringLiteral(Template.fromString("a")), + Literal.stringLiteral(Template.fromString("b"))))); + + EndpointBddTrait bdd = createBddWithCondition(condition); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.LIST2); + } + + @Test + void testCompileRecordLiteral() { + Map members = new HashMap<>(); + members.put(Identifier.of("key1"), Literal.stringLiteral(Template.fromString("value1"))); + members.put(Identifier.of("key2"), Literal.stringLiteral(Template.fromString("value2"))); + + Condition condition = createConditionWithExpression(Literal.recordLiteral(members)); + + EndpointBddTrait bdd = createBddWithCondition(condition); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.MAP2); + } + + @Test + void testCompileGetAttrWithPropertyAccess() { + GetAttr getAttr = GetAttr.ofExpressions( + Expression.getReference(Identifier.of("obj")), + Expression.of("prop")); + + Condition condition = createConditionWithExpression(getAttr); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("obj") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.GET_PROPERTY_REG); + } + + @Test + void testCompileGetAttrWithIndex() { + GetAttr getAttr = GetAttr.ofExpressions( + Expression.getReference(Identifier.of("array")), + Expression.of("[0]")); + + Condition condition = createConditionWithExpression(getAttr); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("array") + .type(ParameterType.STRING_ARRAY) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.GET_INDEX_REG); + } + + @Test + void testCompileBuiltinFunctions() { + LibraryFunction substring = Substring.ofExpressions( + Expression.getReference(Identifier.of("str")), + Literal.integerLiteral(0), + Literal.integerLiteral(5), + Literal.booleanLiteral(false)); + + Condition condition = createConditionWithExpression(substring); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("str") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.SUBSTRING); + } + + @Test + void testCompileIsValidHostLabel() { + LibraryFunction isValidHost = IsValidHostLabel.ofExpressions( + Expression.getReference(Identifier.of("host")), + Literal.booleanLiteral(true)); + + Condition condition = createConditionWithExpression(isValidHost); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("host") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.IS_VALID_HOST_LABEL); + } + + @Test + void testCompileParseUrl() { + LibraryFunction parseUrl = ParseUrl.ofExpressions( + Expression.getReference(Identifier.of("url"))); + + Condition condition = createConditionWithExpression(parseUrl); + + Parameters params = Parameters.builder() + .addParameter(Parameter.builder() + .name("url") + .type(ParameterType.STRING) + .build()) + .build(); + + EndpointBddTrait bdd = createBddWithConditionAndParams(condition, params); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.PARSE_URL); + } + + @Test + void testCompileWithParameters() { + Parameter param1 = Parameter.builder() + .name("Region") + .type(ParameterType.STRING) + .required(true) + .build(); + + Parameter param2 = Parameter.builder() + .name("UseDualStack") + .type(ParameterType.BOOLEAN) + .required(true) + .defaultValue(Value.booleanValue(false)) + .build(); + + Parameter param3 = Parameter.builder() + .name("Endpoint") + .type(ParameterType.STRING) + .builtIn("SDK::Endpoint") + .build(); + + Parameters params = Parameters.builder() + .addParameter(param1) + .addParameter(param2) + .addParameter(param3) + .build(); + + EndpointBddTrait bdd = createBddWithParameters(params); + + builtinProviders.put("SDK::Endpoint", ctx -> "https://custom.endpoint"); + + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + RegisterDefinition[] registers = bytecode.getRegisterDefinitions(); + assertEquals(3, registers.length); + + RegisterDefinition reg1 = findRegister(registers, "Region"); + assertNotNull(reg1); + assertTrue(reg1.required()); + + RegisterDefinition reg2 = findRegister(registers, "UseDualStack"); + assertNotNull(reg2); + assertEquals(false, reg2.defaultValue()); + + RegisterDefinition reg3 = findRegister(registers, "Endpoint"); + assertNotNull(reg3); + assertEquals("SDK::Endpoint", reg3.builtin()); + } + + @Test + void testCompileLargeList() { + List elements = new ArrayList<>(); + for (int i = 0; i < 5; i++) { + elements.add(Literal.integerLiteral(i)); + } + + Condition condition = createConditionWithExpression(Literal.tupleLiteral(elements)); + EndpointBddTrait bdd = createBddWithCondition(condition); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + OpcodeWithValue result = findOpcodeWithValue(bytecode, Opcodes.LISTN); + assertTrue(result.found()); + assertEquals(5, result.value()); + } + + @Test + void testCompileLargeMap() { + Map members = new HashMap<>(); + for (int i = 0; i < 6; i++) { + members.put(Identifier.of("key" + i), Literal.integerLiteral(i)); + } + + Condition condition = createConditionWithExpression(Literal.recordLiteral(members)); + EndpointBddTrait bdd = createBddWithCondition(condition); + BytecodeCompiler compiler = new BytecodeCompiler(extensions, bdd, functions, builtinProviders); + + Bytecode bytecode = compiler.compile(); + + assertOpcodePresent(bytecode, Opcodes.MAPN); + } + + private void assertOpcodePresent(Bytecode bytecode, byte opcode) { + boolean found = false; + for (byte b : bytecode.getBytecode()) { + if (b == opcode) { + found = true; + break; + } + } + assertTrue(found, "Expected opcode " + opcode + " to be present in bytecode"); + } + + private void assertConstantPresent(Bytecode bytecode, Object expectedConstant) { + boolean found = false; + for (int i = 0; i < bytecode.getConstantPoolCount(); i++) { + if (expectedConstant.equals(bytecode.getConstant(i))) { + found = true; + break; + } + } + assertTrue(found, "Expected constant " + expectedConstant + " to be present in constant pool"); + } + + private OpcodeWithValue findOpcodeWithValue(Bytecode bytecode, byte opcode) { + byte[] code = bytecode.getBytecode(); + for (int i = 0; i < code.length; i++) { + if (code[i] == opcode && i + 1 < code.length) { + return new OpcodeWithValue(true, code[i + 1] & 0xFF); + } + } + return new OpcodeWithValue(false, 0); + } + + private record OpcodeWithValue(boolean found, int value) {} + + private EndpointBddTrait createEmptyBdd() { + return EndpointBddTrait.builder() + .parameters(Parameters.builder().build()) + .conditions(List.of()) + .results(List.of(NoMatchRule.INSTANCE)) + .bdd(new Bdd(1, 0, 1, 1, nc -> nc.accept(-1, 1, -1))) + .build(); + } + + private EndpointBddTrait createBddWithCondition(Condition condition) { + return createBddWithConditionAndParams(condition, Parameters.builder().build()); + } + + private EndpointBddTrait createBddWithConditionAndParams(Condition condition, Parameters params) { + return EndpointBddTrait.builder() + .parameters(params) + .conditions(List.of(condition)) + .results(List.of(NoMatchRule.INSTANCE)) + .bdd(new Bdd(2, 1, 1, 2, nc -> { + nc.accept(-1, 1, -1); // Terminal node at index 0 + nc.accept(0, 100000000, -1); // Condition node at index 1 + })) + .build(); + } + + private EndpointBddTrait createBddWithResults(List results) { + return EndpointBddTrait.builder() + .parameters(Parameters.builder().build()) + .conditions(List.of()) + .results(results) + .bdd(new Bdd(100000000, 0, results.size(), 1, nc -> nc.accept(-1, 1, -1))) + .build(); + } + + private EndpointBddTrait createBddWithParameters(Parameters params) { + return EndpointBddTrait.builder() + .parameters(params) + .conditions(List.of()) + .results(List.of(NoMatchRule.INSTANCE)) + .bdd(new Bdd(1, 0, 1, 1, nc -> nc.accept(-1, 1, -1))) + .build(); + } + + private Condition createConditionWithExpression(Expression expr) { + return Condition.builder() + .fn(IsSet.ofExpressions(expr)) + .build(); + } + + private RegisterDefinition findRegister(RegisterDefinition[] registers, String name) { + for (RegisterDefinition reg : registers) { + if (name.equals(reg.name())) { + return reg; + } + } + return null; + } + + private static class TestFunction implements RulesFunction { + private final String name; + private final int argCount; + + TestFunction(String name, int argCount) { + this.name = name; + this.argCount = argCount; + } + + @Override + public int getArgumentCount() { + return argCount; + } + + @Override + public String getFunctionName() { + return name; + } + + @Override + public Object apply(Object... arguments) { + return "test-result"; + } + + @Override + public Object apply1(Object arg1) { + return "test-result"; + } + + @Override + public Object apply2(Object arg1, Object arg2) { + return arg1 + "-" + arg2; + } + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassemblerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassemblerTest.java new file mode 100644 index 000000000..92a237e75 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassemblerTest.java @@ -0,0 +1,248 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +class BytecodeDisassemblerTest { + + @Test + void disassemblesBasicProgram() { + // Create a simple bytecode program with a few basic instructions + BytecodeWriter writer = new BytecodeWriter(); + + // Condition 0: load constant and return + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(0); // constant index 0 + writer.writeByte(Opcodes.RETURN_VALUE); + + // Result 0: return error + writer.markResultStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(1); // constant index 1 + writer.writeByte(Opcodes.RETURN_ERROR); + + RegisterDefinition[] registers = { + new RegisterDefinition("testParam", true, "defaultValue", null, false) + }; + + RulesFunction[] functions = { + new TestFunction("testFn", 1) + }; + + int[] bddNodes = { + -1, + 1, + -1 // terminal node + }; + + Bytecode bytecode = writer.build(registers, functions, bddNodes, 1); + + BytecodeDisassembler disassembler = new BytecodeDisassembler(bytecode); + String result = disassembler.disassemble(); + + // Verify header information is present + assertContains(result, "=== Bytecode Program ==="); + assertContains(result, "Conditions: 1"); + assertContains(result, "Results: 1"); + assertContains(result, "Registers: 1"); + assertContains(result, "Functions: 1"); + } + + @Test + void disassemblesInstructionWithOperands() { + BytecodeWriter writer = new BytecodeWriter(); + + // Create a condition with various instruction types + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_REGISTER); + writer.writeByte(0); // register 0 + writer.writeByte(Opcodes.SET_REGISTER); + writer.writeByte(1); // register 1 + writer.writeByte(Opcodes.FN1); + writer.writeByte(0); // function 0 + writer.writeByte(Opcodes.RETURN_VALUE); + + RegisterDefinition[] registers = { + new RegisterDefinition("param1", false, null, null, false), + new RegisterDefinition("temp1", false, null, null, true) + }; + + RulesFunction[] functions = { + new TestFunction("parseUrl", 1) + }; + + int[] bddNodes = {-1, 1, -1}; + Bytecode bytecode = writer.build(registers, functions, bddNodes, 1); + + String result = new BytecodeDisassembler(bytecode).disassemble(); + + // Verify instruction disassembly + assertContains(result, "LOAD_REGISTER"); + assertContains(result, "SET_REGISTER"); + assertContains(result, "FN1"); + assertContains(result, "param1"); + assertContains(result, "temp1"); + assertContains(result, "parseUrl"); + } + + @Test + void disassemblesConstantPool() { + BytecodeWriter writer = new BytecodeWriter(); + + // Add various constant types + int stringConst = writer.getConstantIndex("test string"); + int intConst = writer.getConstantIndex(42); + int boolConst = writer.getConstantIndex(true); + int listConst = writer.getConstantIndex(List.of("a", "b")); + int mapConst = writer.getConstantIndex(Map.of("key", "value")); + + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(stringConst); + writer.writeByte(Opcodes.RETURN_VALUE); + + Bytecode bytecode = writer.build( + new RegisterDefinition[0], + new RulesFunction[0], + new int[] {-1, 1, -1}, + 1); + + String result = new BytecodeDisassembler(bytecode).disassemble(); + + // Verify constant pool section + assertContains(result, "=== Constant Pool ==="); + assertContains(result, "\"test string\""); + assertContains(result, "Integer[42]"); + assertContains(result, "Boolean[true]"); + assertContains(result, "List[2 items]"); + assertContains(result, "Map[1 entries]"); + } + + @Test + void disassemblesRegisters() { + RegisterDefinition[] registers = { + new RegisterDefinition("required", true, null, null, false), + new RegisterDefinition("withDefault", false, "default", null, false), + new RegisterDefinition("withBuiltin", false, null, "SDK::Endpoint", false), + new RegisterDefinition("temp", false, null, null, true) + }; + + BytecodeWriter writer = new BytecodeWriter(); + writer.markConditionStart(); + writer.writeByte(Opcodes.RETURN_VALUE); + + Bytecode bytecode = writer.build(registers, new RulesFunction[0], new int[] {-1, 1, -1}, 1); + String result = new BytecodeDisassembler(bytecode).disassemble(); + + // Verify register information + assertContains(result, "=== Registers ==="); + assertContains(result, "required"); + assertContains(result, "[required]"); + assertContains(result, "withDefault"); + assertContains(result, "default=\"default\""); + assertContains(result, "withBuiltin"); + assertContains(result, "builtin=SDK::Endpoint"); + assertContains(result, "temp"); + assertContains(result, "[temp]"); + } + + @Test + void disassemblesBddStructure() { + int[] bddNodes = { + -1, + 1, + -1, // terminal node + 0, + 2, + 3, // condition 0, high=node1, low=node2 + 1, + 1, + -1 // condition 1, high=TRUE, low=FALSE + }; + + BytecodeWriter writer = new BytecodeWriter(); + writer.markConditionStart(); + writer.writeByte(Opcodes.RETURN_VALUE); + + Bytecode bytecode = writer.build( + new RegisterDefinition[0], + new RulesFunction[0], + bddNodes, + 2); // root = node 1 (0-based) + + String result = new BytecodeDisassembler(bytecode).disassemble(); + + assertContains(result, "=== BDD Structure ==="); + assertContains(result, "Bdd {"); + assertContains(result, "conditions:"); + assertContains(result, "results:"); + assertContains(result, "root:"); + } + + @Test + void handlesEmptyProgram() { + BytecodeWriter writer = new BytecodeWriter(); + Bytecode bytecode = writer.build(new RegisterDefinition[0], new RulesFunction[0], new int[] {-1, 1, -1}, 1); + + String result = new BytecodeDisassembler(bytecode).disassemble(); + + assertContains(result, "=== Bytecode Program ==="); + assertContains(result, "Conditions: 0"); + assertContains(result, "Results: 0"); + assertContains(result, "Registers: 0"); + assertContains(result, "Functions: 0"); + } + + @Test + void countsInstructionFrequency() { + BytecodeWriter writer = new BytecodeWriter(); + + // Create multiple conditions with repeated instructions + for (int i = 0; i < 3; i++) { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(0); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(1); + writer.writeByte(Opcodes.RETURN_VALUE); + } + + Bytecode bytecode = writer.build(new RegisterDefinition[0], new RulesFunction[0], new int[] {-1, 1, -1}, 1); + String result = new BytecodeDisassembler(bytecode).disassemble(); + + // Should show instruction counts + assertContains(result, "Instruction counts:"); + assertContains(result, "LOAD_CONST"); + assertContains(result, "RETURN_VALUE"); + } + + private void assertContains(String actual, String expected) { + assertTrue(actual.contains(expected), "Expected to find '" + expected + "' in:\n" + actual); + } + + private record TestFunction(String name, int argCount) implements RulesFunction { + @Override + public String getFunctionName() { + return name; + } + + @Override + public int getArgumentCount() { + return argCount; + } + + @Override + public Object apply1(Object arg1) { + return "result"; + } + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolverTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolverTest.java new file mode 100644 index 000000000..fab4b0443 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEndpointResolverTest.java @@ -0,0 +1,468 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.client.core.ClientContext; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.core.schema.ApiOperation; +import software.amazon.smithy.java.core.schema.ApiService; +import software.amazon.smithy.java.core.schema.Schema; +import software.amazon.smithy.java.core.schema.SerializableStruct; +import software.amazon.smithy.java.core.schema.ShapeBuilder; +import software.amazon.smithy.java.core.serde.ShapeSerializer; +import software.amazon.smithy.java.core.serde.TypeRegistry; +import software.amazon.smithy.model.shapes.ShapeId; + +class BytecodeEndpointResolverTest { + + @Test + void testSimpleEndpointResolution() throws Exception { + // Create a simple bytecode that returns a fixed endpoint + // BDD: root -> result 0 (always returns result 0) + Bytecode bytecode = new Bytecode( + new byte[] { + Opcodes.LOAD_CONST, + 0, + Opcodes.RETURN_ENDPOINT, + 0 + }, + new int[0], // No conditions + new int[] {0}, // One result at offset 0 + new RegisterDefinition[] { + new RegisterDefinition("region", false, null, null, false), + new RegisterDefinition("bucket", false, null, null, false) + }, + new Object[] {"https://example.com"}, + new RulesFunction[0], + new int[] {-1, 100_000_000, -1}, // Terminal node that returns result 0 + 100_000_000 // Root points to result 0 + ); + + BytecodeEndpointResolver resolver = new BytecodeEndpointResolver( + bytecode, + List.of(), + Map.of()); + + EndpointResolverParams params = createParams("us-east-1", "my-bucket"); + + CompletableFuture future = resolver.resolveEndpoint(params); + Endpoint endpoint = future.get(); + + assertNotNull(endpoint); + assertEquals("https://example.com", endpoint.uri().toString()); + } + + @Test + void testEndpointWithBuiltinProvider() throws Exception { + // Create bytecode that uses a builtin + // The BDD just returns result 0 which uses the builtin value + Bytecode bytecode = new Bytecode( + new byte[] { + Opcodes.LOAD_REGISTER, + 0, // Load the endpoint register + Opcodes.RETURN_ENDPOINT, + 0 + }, + new int[0], // No conditions + new int[] {0}, // One result at offset 0 + new RegisterDefinition[] { + new RegisterDefinition("endpoint", false, null, "SDK::Endpoint", false), + new RegisterDefinition("region", false, null, null, false) + }, + new Object[0], + new RulesFunction[0], + new int[] {-1, 100_000_000, -1}, // Terminal node that returns result 0 + 100_000_000 // Root points to result 0 + ); + + Map> builtinProviders = Map.of( + "SDK::Endpoint", + ctx -> { + Endpoint custom = ctx.get(ClientContext.CUSTOM_ENDPOINT); + return custom != null ? custom.uri().toString() : null; + }); + + BytecodeEndpointResolver resolver = new BytecodeEndpointResolver( + bytecode, + List.of(), + builtinProviders); + + // Test with custom endpoint + Context context = Context.create() + .put( + ClientContext.CUSTOM_ENDPOINT, + Endpoint.builder().uri("https://custom.example.com").build()); + + EndpointResolverParams params = createParams("us-west-2", "bucket", context); + + Endpoint endpoint = resolver.resolveEndpoint(params).get(); + assertEquals("https://custom.example.com", endpoint.uri().toString()); + } + + @Test + void testNoMatchReturnsNull() throws Exception { + // Create bytecode that returns no match (result 0 is NoMatchRule) + Bytecode bytecode = new Bytecode( + new byte[] { + Opcodes.LOAD_CONST, + 0, + Opcodes.RETURN_VALUE + }, + new int[0], // No conditions + new int[] {0}, // One result at offset 0 (NoMatchRule) + new RegisterDefinition[0], + new Object[] {null}, + new RulesFunction[0], + new int[] {-1, -1, -1}, // Terminal node + -1 // Root points to FALSE (no match) + ); + + BytecodeEndpointResolver resolver = new BytecodeEndpointResolver( + bytecode, + List.of(), + Map.of()); + + EndpointResolverParams params = createParams("us-east-1", "bucket"); + + Endpoint endpoint = resolver.resolveEndpoint(params).get(); + assertNull(endpoint); + } + + @Test + void testConditionalEndpoint() throws Exception { + // Create bytecode with a condition that checks if region is set + // Condition 0: isSet(region) + // Result 0: no match (returns null) + // Result 1: return endpoint + + // Condition bytecode + byte[] conditionBytecode = new byte[] { + Opcodes.TEST_REGISTER_ISSET, + 0, // Test if register 0 (region) is set + Opcodes.RETURN_VALUE + }; + + // Result 0 bytecode (no match - returns null) + byte[] noMatchBytecode = new byte[] { + Opcodes.LOAD_CONST, + 0, // Load null + Opcodes.RETURN_VALUE // Return null (not RETURN_ENDPOINT) + }; + + // Result 1 bytecode (endpoint) + byte[] endpointBytecode = new byte[] { + Opcodes.LOAD_CONST, + 1, // Load URL string + Opcodes.RETURN_ENDPOINT, + 0 + }; + + // Combine bytecode + byte[] bytecode = new byte[conditionBytecode.length + noMatchBytecode.length + endpointBytecode.length]; + System.arraycopy(conditionBytecode, 0, bytecode, 0, conditionBytecode.length); + System.arraycopy(noMatchBytecode, 0, bytecode, conditionBytecode.length, noMatchBytecode.length); + System.arraycopy(endpointBytecode, + 0, + bytecode, + conditionBytecode.length + noMatchBytecode.length, + endpointBytecode.length); + + Bytecode bc = new Bytecode( + bytecode, + new int[] {0}, // Condition at offset 0 + new int[] { + conditionBytecode.length, // Result 0 at offset after condition + conditionBytecode.length + noMatchBytecode.length // Result 1 at offset after result 0 + }, + new RegisterDefinition[] { + new RegisterDefinition("region", false, null, null, false), + new RegisterDefinition("bucket", false, null, null, false) + }, + new Object[] {null, "https://example.com"}, // null for no-match, URL for endpoint + new RulesFunction[0], + // BDD nodes: [varIdx, highRef, lowRef] + // Node 0: terminal + // Node 1: condition 0, high=result 1, low=result 0 + new int[] { + -1, + -1, + -1, // Node 0: terminal + 0, + 100_000_001, + 100_000_000 // Node 1: if condition 0, then result 1, else result 0 + }, + 2 // Root points to node 1 (1-based indexing) + ); + + BytecodeEndpointResolver resolver = new BytecodeEndpointResolver( + bc, + List.of(), + Map.of()); + + // Test with region provided + EndpointResolverParams params = createParams("us-east-1", "bucket"); + Endpoint endpoint = resolver.resolveEndpoint(params).get(); + assertNotNull(endpoint); + assertEquals("https://example.com", endpoint.uri().toString()); + + // Test without region + params = createParams(null, "bucket"); + endpoint = resolver.resolveEndpoint(params).get(); + assertNull(endpoint); // Should return no match (result 0) + } + + @Test + void testErrorPropagation() { + // Create bytecode that throws an error + Bytecode bytecode = new Bytecode( + new byte[] { + Opcodes.LOAD_CONST, + 0, + Opcodes.RETURN_ERROR + }, + new int[0], // No conditions + new int[] {0}, // One result at offset 0 + new RegisterDefinition[0], + new Object[] {"Test error"}, + new RulesFunction[0], + new int[] {-1, 100_000_000, -1}, // Terminal node that returns result 0 + 100_000_000 // Root points to result 0 + ); + + BytecodeEndpointResolver resolver = new BytecodeEndpointResolver( + bytecode, + List.of(), + Map.of()); + + EndpointResolverParams params = createParams("us-east-1", "bucket"); + + CompletableFuture future = resolver.resolveEndpoint(params); + + Exception exception = assertThrows(Exception.class, future::get); + assertInstanceOf(RulesEvaluationError.class, exception.getCause()); + assertTrue(exception.getCause().getMessage().contains("Test error")); + } + + @Test + void testWithRulesExtension() throws Exception { + Bytecode bytecode = new Bytecode( + new byte[] { + Opcodes.LOAD_CONST, + 0, + Opcodes.RETURN_ENDPOINT, + 0 + }, + new int[0], + new int[] {0}, + new RegisterDefinition[] { + new RegisterDefinition("region", false, null, null, false) + }, + new Object[] {"https://example.com"}, + new RulesFunction[0], + new int[] {-1, 100_000_000, -1}, + 100_000_000); + + TestRulesExtension extension = new TestRulesExtension(); + + BytecodeEndpointResolver resolver = new BytecodeEndpointResolver( + bytecode, + List.of(extension), + Map.of()); + + EndpointResolverParams params = createParams("us-east-1", "bucket"); + + Endpoint endpoint = resolver.resolveEndpoint(params).get(); + + assertTrue(extension.wasCalled); + assertNotNull(endpoint); + } + + @Test + void testMissingRequiredParameter() { + // Create bytecode with required parameter + RegisterDefinition[] defs = { + new RegisterDefinition("region", true, null, null, false), + new RegisterDefinition("bucket", true, null, null, false) + }; + + Bytecode bytecode = new Bytecode( + new byte[] {Opcodes.LOAD_CONST, 0, Opcodes.RETURN_ENDPOINT, 0}, + new int[0], + new int[] {0}, + defs, + new Object[] {"https://example.com"}, + new RulesFunction[0], + new int[] {-1, 100_000_000, -1}, + 100_000_000); + + BytecodeEndpointResolver resolver = new BytecodeEndpointResolver( + bytecode, + List.of(), + Map.of()); + + // Only provide region, not bucket + EndpointResolverParams params = createParams("us-east-1", null); + + CompletableFuture future = resolver.resolveEndpoint(params); + + Exception exception = assertThrows(Exception.class, future::get); + assertInstanceOf(RulesEvaluationError.class, exception.getCause()); + assertTrue(exception.getCause().getMessage().contains("bucket")); + } + + @Test + void testParameterWithDefaultValue() throws Exception { + // Create bytecode with a parameter that has a default value + RegisterDefinition[] defs = { + new RegisterDefinition("region", true, "us-west-2", null, false), // Has default + new RegisterDefinition("bucket", false, null, null, false) + }; + + Bytecode bytecode = new Bytecode( + new byte[] { + Opcodes.LOAD_REGISTER, + 0, // Load region + Opcodes.LOAD_CONST, + 0, // Load "/" + Opcodes.LOAD_REGISTER, + 1, // Load bucket + Opcodes.RESOLVE_TEMPLATE, + 3, // Concatenate + Opcodes.RETURN_ENDPOINT, + 0 + }, + new int[0], + new int[] {0}, + defs, + new Object[] {"/"}, + new RulesFunction[0], + new int[] {-1, 100_000_000, -1}, + 100_000_000); + + BytecodeEndpointResolver resolver = new BytecodeEndpointResolver( + bytecode, + List.of(), + Map.of()); + + // Don't provide region, should use default + EndpointResolverParams params = createParams(null, "my-bucket"); + + Endpoint endpoint = resolver.resolveEndpoint(params).get(); + assertNotNull(endpoint); + assertEquals("us-west-2/my-bucket", endpoint.uri().toString()); + } + + // Helper methods + + private EndpointResolverParams createParams(String region, String bucket) { + return createParams(region, bucket, Context.create()); + } + + private EndpointResolverParams createParams(String region, String bucket, Context context) { + Map endpointParams = new HashMap<>(); + if (region != null) { + endpointParams.put("region", region); + } + if (bucket != null) { + endpointParams.put("bucket", bucket); + } + + Context fullContext = context.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, endpointParams); + + TestOperation operation = new TestOperation(); + TestInput input = new TestInput(); + + return EndpointResolverParams.builder().operation(operation).inputValue(input).context(fullContext).build(); + } + + private static class TestRulesExtension implements RulesExtension { + boolean wasCalled = false; + + @Override + public void extractEndpointProperties( + Endpoint.Builder builder, + Context context, + Map properties, + Map> headers + ) { + wasCalled = true; + } + } + + private static final Schema INPUT_SCHEMA = Schema.structureBuilder(ShapeId.from("smithy.example#I")).build(); + + private static class TestOperation implements ApiOperation { + @Override + public ShapeBuilder inputBuilder() { + throw new UnsupportedOperationException(); + } + + @Override + public ShapeBuilder outputBuilder() { + throw new UnsupportedOperationException(); + } + + @Override + public Schema schema() { + return Schema.createOperation(ShapeId.from("smithy.example#Foo")); + } + + @Override + public Schema inputSchema() { + return INPUT_SCHEMA; + } + + @Override + public Schema outputSchema() { + return INPUT_SCHEMA; + } + + @Override + public TypeRegistry errorRegistry() { + throw new UnsupportedOperationException(); + } + + @Override + public List effectiveAuthSchemes() { + return List.of(); + } + + @Override + public ApiService service() { + throw new UnsupportedOperationException(); + } + } + + private static class TestInput implements SerializableStruct { + @Override + public Schema schema() { + return INPUT_SCHEMA; + } + + @Override + public void serializeMembers(ShapeSerializer serializer) {} + + @Override + public T getMemberValue(Schema member) { + return null; + } + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluatorTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluatorTest.java new file mode 100644 index 000000000..3b0c9b172 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluatorTest.java @@ -0,0 +1,783 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.net.URI; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.context.Context; + +class BytecodeEvaluatorTest { + + private BytecodeEvaluator evaluator; + private Bytecode bytecode; + private BytecodeWriter writer; + private RulesFunction mockFunction; + + @BeforeEach + void setUp() { + writer = new BytecodeWriter(); + mockFunction = new TestFunction(); + } + + @Test + void testBasicConditionEvaluation() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(Boolean.TRUE)); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testBooleanOperations() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(Boolean.FALSE)); + writer.writeByte(Opcodes.NOT); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testIsSetOperation() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("value")); + writer.writeByte(Opcodes.ISSET); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + + writer = new BytecodeWriter(); + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(null)); + writer.writeByte(Opcodes.ISSET); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertFalse(evaluator.test(0)); + } + + @Test + void testListOperations() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("a")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("b")); + writer.writeByte(Opcodes.LIST2); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testMapOperations() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("value")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("key")); + writer.writeByte(Opcodes.MAP1); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testStringEqualsOperation() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("test")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("test")); + writer.writeByte(Opcodes.STRING_EQUALS); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + + writer = new BytecodeWriter(); + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("test1")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("test2")); + writer.writeByte(Opcodes.STRING_EQUALS); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertFalse(evaluator.test(0)); + } + + @Test + void testGetPropertyOperation() { + Map map = new HashMap<>(); + map.put("prop", "value"); + + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(map)); + writer.writeByte(Opcodes.GET_PROPERTY); + writer.writeShort(writer.getConstantIndex("prop")); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testGetIndexOperation() { + List list = Arrays.asList("a", "b", "c"); + + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(list)); + writer.writeByte(Opcodes.GET_INDEX); + writer.writeByte(1); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testFunctionCall() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("input")); + writer.writeByte(Opcodes.FN1); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + writer.registerFunction("testFn"); + + RulesFunction[] functions = {mockFunction}; + bytecode = buildBytecode(new RegisterDefinition[0], functions); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testResolveTemplate() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("Hello")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(" ")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("World")); + writer.writeByte(Opcodes.RESOLVE_TEMPLATE); + writer.writeByte(3); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testJumpNotNullOrPop() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("value")); + writer.writeByte(Opcodes.JNN_OR_POP); + writer.writeShort(2); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("fallback")); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + public void testDontJumpAndReturnFallback() { + writer = new BytecodeWriter(); + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(null)); + writer.writeByte(Opcodes.JNN_OR_POP); + writer.writeShort(2); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("fallback")); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testReturnEndpoint() { + writer.markResultStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("https://example.com")); + writer.writeByte(Opcodes.RETURN_ENDPOINT); + writer.writeByte(0); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + Endpoint endpoint = evaluator.resolveResult(0); + assertNotNull(endpoint); + assertEquals(URI.create("https://example.com"), endpoint.uri()); + } + + @Test + void testReturnError() { + writer.markResultStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("Error message")); + writer.writeByte(Opcodes.RETURN_ERROR); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertThrows(RulesEvaluationError.class, () -> evaluator.resolveResult(0)); + } + + @Test + void testLoadConstantWide() { + for (int i = 0; i < 300; i++) { + writer.getConstantIndex("const" + i); + } + + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST_W); + writer.writeShort(256); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testStackResizing() { + writer.markConditionStart(); + for (int i = 0; i < 20; i++) { + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(i)); + } + writer.writeByte(Opcodes.LISTN); + writer.writeByte(20); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testSubstringOperation() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("Hello World")); + writer.writeByte(Opcodes.SUBSTRING); + writer.writeByte(0); + writer.writeByte(5); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testParseUrlOperation() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("https://example.com/path")); + writer.writeByte(Opcodes.PARSE_URL); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testUnknownOpcode() { + writer.markConditionStart(); + writer.writeByte((byte) 250); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertThrows(RulesEvaluationError.class, () -> evaluator.test(0)); + } + + @Test + void testTestRegisterNotSet() { + writer.markConditionStart(); + writer.writeByte(Opcodes.TEST_REGISTER_NOT_SET); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + RegisterDefinition[] registers = { + new RegisterDefinition("param1", false, null, null, false) + }; + + bytecode = buildBytecode(registers); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testList0() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LIST0); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testList1() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("item")); + writer.writeByte(Opcodes.LIST1); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testMap0() { + writer.markConditionStart(); + writer.writeByte(Opcodes.MAP0); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testMap2() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("v1")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("k1")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("v2")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("k2")); + writer.writeByte(Opcodes.MAP2); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testMap3() { + writer.markConditionStart(); + for (int i = 1; i <= 3; i++) { + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("v" + i)); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("k" + i)); + } + writer.writeByte(Opcodes.MAP3); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testMap4() { + writer.markConditionStart(); + for (int i = 1; i <= 4; i++) { + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("v" + i)); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("k" + i)); + } + writer.writeByte(Opcodes.MAP4); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testMapN() { + writer.markConditionStart(); + for (int i = 1; i <= 5; i++) { + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("v" + i)); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("k" + i)); + } + writer.writeByte(Opcodes.MAPN); + writer.writeByte(5); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testFn2() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("arg1")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("arg2")); + writer.writeByte(Opcodes.FN2); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + writer.registerFunction("fn2"); + + RulesFunction fn2 = new RulesFunction() { + public int getArgumentCount() { + return 2; + } + + public String getFunctionName() { + return "fn2"; + } + + public Object apply2(Object a, Object b) { + return Boolean.TRUE; + } + }; + + bytecode = buildBytecode(new RegisterDefinition[0], new RulesFunction[] {fn2}); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testFn3() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("a")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("b")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("c")); + writer.writeByte(Opcodes.FN3); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + writer.registerFunction("fn3"); + + RulesFunction fn3 = new RulesFunction() { + public int getArgumentCount() { + return 3; + } + + public String getFunctionName() { + return "fn3"; + } + + public Object apply(Object... args) { + return Boolean.TRUE; + } + }; + + bytecode = buildBytecode(new RegisterDefinition[0], new RulesFunction[] {fn3}); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testFn() { + writer.markConditionStart(); + for (int i = 0; i < 4; i++) { + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("arg" + i)); + } + writer.writeByte(Opcodes.FN); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + writer.registerFunction("fn4"); + + RulesFunction fn4 = new RulesFunction() { + public int getArgumentCount() { + return 4; + } + + public String getFunctionName() { + return "fn4"; + } + + public Object apply(Object... args) { + return Boolean.TRUE; + } + }; + + bytecode = buildBytecode(new RegisterDefinition[0], new RulesFunction[] {fn4}); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testGetPropertyReg() { + Map map = new HashMap<>(); + map.put("key", "value"); + + writer.markConditionStart(); + writer.writeByte(Opcodes.GET_PROPERTY_REG); + writer.writeByte(0); + writer.writeShort(writer.getConstantIndex("key")); + writer.writeByte(Opcodes.RETURN_VALUE); + + RegisterDefinition[] registers = { + new RegisterDefinition("param1", false, map, null, false) + }; + + bytecode = buildBytecode(registers); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testGetIndexReg() { + List list = Arrays.asList("a", "b", "c"); + + writer.markConditionStart(); + writer.writeByte(Opcodes.GET_INDEX_REG); + writer.writeByte(0); + writer.writeByte(1); + writer.writeByte(Opcodes.RETURN_VALUE); + + RegisterDefinition[] registers = { + new RegisterDefinition("param1", false, list, null, false) + }; + + bytecode = buildBytecode(registers); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + @Test + void testIsTrue() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(Boolean.TRUE)); + writer.writeByte(Opcodes.IS_TRUE); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testTestRegisterIsTrue() { + writer.markConditionStart(); + writer.writeByte(Opcodes.TEST_REGISTER_IS_TRUE); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + RegisterDefinition[] registers = { + new RegisterDefinition("param1", false, Boolean.TRUE, null, false) + }; + + bytecode = buildBytecode(registers); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testTestRegisterIsFalse() { + writer.markConditionStart(); + writer.writeByte(Opcodes.TEST_REGISTER_IS_FALSE); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + RegisterDefinition[] registers = { + new RegisterDefinition("param1", false, Boolean.FALSE, null, false) + }; + + bytecode = buildBytecode(registers); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testEquals() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(42)); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(42)); + writer.writeByte(Opcodes.EQUALS); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testBooleanEquals() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(Boolean.TRUE)); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(Boolean.TRUE)); + writer.writeByte(Opcodes.BOOLEAN_EQUALS); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testIsValidHostLabel() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("example")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(Boolean.FALSE)); + writer.writeByte(Opcodes.IS_VALID_HOST_LABEL); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + + @Test + void testUriEncode() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("hello world")); + writer.writeByte(Opcodes.URI_ENCODE); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + evaluator.test(0); + } + + private BytecodeEvaluator createEvaluator(Bytecode bytecode) { + RegisterFiller filler = RegisterFiller.of(bytecode, Collections.emptyMap()); + BytecodeEvaluator eval = new BytecodeEvaluator(bytecode, new RulesExtension[0], filler); + eval.reset(Context.empty(), Collections.emptyMap()); + return eval; + } + + private Bytecode buildBytecode() { + return buildBytecode(new RegisterDefinition[0]); + } + + private Bytecode buildBytecode(RegisterDefinition[] registers) { + return buildBytecode(registers, new RulesFunction[0]); + } + + private Bytecode buildBytecode(RegisterDefinition[] registers, RulesFunction[] functions) { + int[] bddNodes = new int[] {-1, 1, -1}; + return writer.build(registers, functions, bddNodes, 1); + } + + private static class TestFunction implements RulesFunction { + @Override + public int getArgumentCount() { + return 1; + } + + @Override + public String getFunctionName() { + return "testFn"; + } + + @Override + public Object apply1(Object arg) { + return Boolean.TRUE; + } + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeReaderTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeReaderTest.java new file mode 100644 index 000000000..6e72ebb21 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeReaderTest.java @@ -0,0 +1,301 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +class BytecodeReaderTest { + + @Test + void testReadByte() { + byte[] data = {0x42, 0x00, (byte) 0xFF}; + BytecodeReader reader = new BytecodeReader(data, 0); + + assertEquals(0x42, reader.readByte()); + assertEquals(0x00, reader.readByte()); + assertEquals((byte) 0xFF, reader.readByte()); + } + + @Test + void testReadShort() { + // | 1 2 | 1 2 | + byte[] data = {0x12, 0x34, (byte) 0xFF, (byte) 0xFF}; + BytecodeReader reader = new BytecodeReader(data, 0); + + assertEquals(0x1234, reader.readShort() & 0xFFFF); + assertEquals(0xFFFF, reader.readShort() & 0xFFFF); + } + + @Test + void testReadInt() { + // | 1 2 3 4 | 1 2 3 4 | + byte[] data = {0x12, 0x34, 0x56, 0x78, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF}; + BytecodeReader reader = new BytecodeReader(data, 0); + + assertEquals(0x12345678, reader.readInt()); + assertEquals(-1, reader.readInt()); + } + + @Test + void testReadUTF() { + String testString = "Hello, World!"; + byte[] stringBytes = testString.getBytes(StandardCharsets.UTF_8); + byte[] data = new byte[2 + stringBytes.length]; + data[0] = (byte) (stringBytes.length >> 8); + data[1] = (byte) stringBytes.length; + System.arraycopy(stringBytes, 0, data, 2, stringBytes.length); + + BytecodeReader reader = new BytecodeReader(data, 0); + assertEquals(testString, reader.readUTF()); + } + + @Test + void testReadConstantNull() { + byte[] data = {Bytecode.CONST_NULL}; + BytecodeReader reader = new BytecodeReader(data, 0); + + assertNull(reader.readConstant()); + } + + @Test + void testReadConstantString() { + byte[] data = { + Bytecode.CONST_STRING, + 0x00, + 0x05, // length = 5 + 'H', + 'e', + 'l', + 'l', + 'o' + }; + BytecodeReader reader = new BytecodeReader(data, 0); + + assertEquals("Hello", reader.readConstant()); + } + + @Test + void testReadConstantInteger() { + byte[] data = { + Bytecode.CONST_INTEGER, + 0x00, + 0x00, + 0x00, + 0x2A // 42 + }; + BytecodeReader reader = new BytecodeReader(data, 0); + + assertEquals(42, reader.readConstant()); + } + + @Test + void testReadConstantBoolean() { + byte[] data = { + Bytecode.CONST_BOOLEAN, + 0x01, // true + Bytecode.CONST_BOOLEAN, + 0x00 // false + }; + BytecodeReader reader = new BytecodeReader(data, 0); + + assertEquals(true, reader.readConstant()); + assertEquals(false, reader.readConstant()); + } + + @Test + void testReadConstantList() { + byte[] data = { + Bytecode.CONST_LIST, + 0x00, + 0x03, // count = 3 + Bytecode.CONST_STRING, + 0x00, + 0x03, + 'o', + 'n', + 'e', + Bytecode.CONST_INTEGER, + 0x00, + 0x00, + 0x00, + 0x02, + Bytecode.CONST_BOOLEAN, + 0x01 + }; + BytecodeReader reader = new BytecodeReader(data, 0); + + List list = (List) reader.readConstant(); + assertEquals(3, list.size()); + assertEquals("one", list.get(0)); + assertEquals(2, list.get(1)); + assertEquals(true, list.get(2)); + } + + @Test + void testReadConstantMap() { + byte[] data = { + Bytecode.CONST_MAP, + 0x00, + 0x02, // count = 2 + 0x00, + 0x03, + 'k', + 'e', + 'y', // "key" + Bytecode.CONST_STRING, + 0x00, + 0x05, + 'v', + 'a', + 'l', + 'u', + 'e', // "value" + 0x00, + 0x03, + 'n', + 'u', + 'm', // "num" + Bytecode.CONST_INTEGER, + 0x00, + 0x00, + 0x00, + 0x2A // 42 + }; + BytecodeReader reader = new BytecodeReader(data, 0); + + Map map = (Map) reader.readConstant(); + assertEquals(2, map.size()); + assertEquals("value", map.get("key")); + assertEquals(42, map.get("num")); + } + + @Test + void testBoundsChecking() { + byte[] data = {0x01, 0x02}; + BytecodeReader reader = new BytecodeReader(data, 0); + + reader.readByte(); + reader.readByte(); + + // Should throw when trying to read past end + assertThrows(IllegalArgumentException.class, reader::readByte); + } + + @Test + void testOffsetStartsAtGivenPosition() { + byte[] data = {0x00, 0x01, 0x02, 0x03, 0x04}; + BytecodeReader reader = new BytecodeReader(data, 2); + + assertEquals(0x02, reader.readByte()); + assertEquals(0x03, reader.readByte()); + assertEquals(0x04, reader.readByte()); + } + + @Test + void testNestedConstantDepthLimit() { + // Create a deeply nested list that exceeds MAX_NESTING_DEPTH (100) + byte[] data = new byte[102]; + for (int i = 0; i < 101; i++) { + data[i] = Bytecode.CONST_LIST; + // Each list has count = 1 (except we don't write the counts/values properly) + } + + BytecodeReader reader = new BytecodeReader(data, 0); + + // This should throw due to excessive nesting + assertThrows(IllegalArgumentException.class, reader::readConstant); + } + + @Test + void testUnknownConstantType() { + byte[] data = {(byte) 99}; // Invalid constant type + BytecodeReader reader = new BytecodeReader(data, 0); + + assertThrows(IllegalArgumentException.class, reader::readConstant); + } + + @Test + void testReadRegisterDefinitions() { + // Build register definition data + byte[] data = buildRegisterDefinitionData(); + BytecodeReader reader = new BytecodeReader(data, 0); + + RegisterDefinition[] defs = reader.readRegisterDefinitions(3); + + assertEquals(3, defs.length); + + // First register: required, no default, no builtin + assertEquals("region", defs[0].name()); + assertTrue(defs[0].required()); + assertFalse(defs[0].temp()); + assertNull(defs[0].defaultValue()); + assertNull(defs[0].builtin()); + + // Second register: optional with default + assertEquals("useDualStack", defs[1].name()); + assertFalse(defs[1].required()); + assertFalse(defs[1].temp()); + assertEquals(false, defs[1].defaultValue()); + assertNull(defs[1].builtin()); + + // Third register: optional with builtin + assertEquals("endpoint", defs[2].name()); + assertFalse(defs[2].required()); + assertFalse(defs[2].temp()); + assertNull(defs[2].defaultValue()); + assertEquals("SDK::Endpoint", defs[2].builtin()); + } + + // Helper method to build register definition data + private byte[] buildRegisterDefinitionData() { + try { + java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); + java.io.DataOutputStream dos = new java.io.DataOutputStream(baos); + + // Register 1: "region", required=true, temp=false, no default, no builtin + dos.writeShort(6); + dos.write("region".getBytes(StandardCharsets.UTF_8)); + dos.writeByte(1); // required + dos.writeByte(0); // not temp + dos.writeByte(0); // no default + dos.writeByte(0); // no builtin + + // Register 2: "useDualStack", required=false, temp=false, default=false, no builtin + dos.writeShort(12); + dos.write("useDualStack".getBytes(StandardCharsets.UTF_8)); + dos.writeByte(0); // not required + dos.writeByte(0); // not temp + dos.writeByte(1); // has default + dos.writeByte(Bytecode.CONST_BOOLEAN); + dos.writeByte(0); // false + dos.writeByte(0); // no builtin + + // Register 3: "endpoint", required=false, temp=false, no default, builtin="SDK::Endpoint" + dos.writeShort(8); + dos.write("endpoint".getBytes(StandardCharsets.UTF_8)); + dos.writeByte(0); // not required + dos.writeByte(0); // not temp + dos.writeByte(0); // no default + dos.writeByte(1); // has builtin + dos.writeShort(13); + dos.write("SDK::Endpoint".getBytes(StandardCharsets.UTF_8)); + + dos.flush(); + return baos.toByteArray(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeTest.java new file mode 100644 index 000000000..955db75c7 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeTest.java @@ -0,0 +1,232 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.util.Map; +import org.junit.jupiter.api.Test; + +class BytecodeTest { + + @Test + void testConstructorValidation() { + assertDoesNotThrow(() -> new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[0], + new Object[0], + new RulesFunction[0], + new int[0], // Valid: empty BDD nodes + 0)); + + assertThrows(IllegalArgumentException.class, + () -> new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[0], + new Object[0], + new RulesFunction[0], + new int[] {1, 2}, // Invalid: not multiple of 3 + 0)); + } + + @Test + void testRegisterTemplateCreation() { + RegisterDefinition[] defs = { + new RegisterDefinition("noDefault", false, null, null, false), + new RegisterDefinition("withDefault", false, "defaultValue", null, false), + new RegisterDefinition("withBuiltin", false, null, "SDK::Endpoint", false), + new RegisterDefinition("withBoth", false, "defaultValue", "SDK::Endpoint", false) + }; + + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + defs, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + Object[] template = bytecode.getRegisterTemplate(); + + assertNull(template[0]); // No default, no builtin -> null + assertEquals("defaultValue", template[1]); // Default, no builtin -> default in template + // No default, has builtin -> null in template (builtin evaluated at runtime) + assertNull(template[2]); + // Default and builtin -> null in template (builtin takes precedence, default is fallback) + assertNull(template[3]); + } + + @Test + void testInputRegisterMapExcludesTemp() { + RegisterDefinition[] defs = { + new RegisterDefinition("input1", false, null, null, false), + new RegisterDefinition("temp1", false, null, null, true), // temp + new RegisterDefinition("input2", false, null, null, false), + new RegisterDefinition("temp2", false, null, null, true) // temp + }; + + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + defs, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + Map inputMap = bytecode.getInputRegisterMap(); + + assertEquals(2, inputMap.size()); + assertEquals(0, inputMap.get("input1")); + assertEquals(2, inputMap.get("input2")); + assertNull(inputMap.get("temp1")); + assertNull(inputMap.get("temp2")); + } + + @Test + void testBuiltinIndicesTracking() { + RegisterDefinition[] defs = { + new RegisterDefinition("noBuiltin", false, null, null, false), + new RegisterDefinition("withBuiltin1", false, null, "Builtin1", false), + new RegisterDefinition("withDefault", false, "default", null, false), + new RegisterDefinition("withBuiltin2", false, "default", "Builtin2", false) + }; + + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + defs, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + int[] builtinIndices = bytecode.getBuiltinIndices(); + + // Should track ALL registers with builtins (including those with defaults) + assertEquals(2, builtinIndices.length); + assertEquals(1, builtinIndices[0]); // withBuiltin1 at index 1 + assertEquals(3, builtinIndices[1]); // withBuiltin2 at index 3 + } + + @Test + void testHardRequiredIndices() { + RegisterDefinition[] defs = { + new RegisterDefinition("required1", true, null, null, false), // Hard required + new RegisterDefinition("hasDefault", true, "default", null, false), // Not hard required (has default) + new RegisterDefinition("hasBuiltin", true, null, "Builtin", false), // Not hard required (has builtin) + new RegisterDefinition("required2", true, null, null, false), // Hard required + new RegisterDefinition("temp", true, null, null, true), // Not hard required (temp) + new RegisterDefinition("optional", false, null, null, false) // Not required + }; + + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + defs, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + int[] hardRequired = bytecode.getHardRequiredIndices(); + + // Only truly required: no default, no builtin, not temp + assertEquals(2, hardRequired.length); + assertEquals(0, hardRequired[0]); // required1 + assertEquals(3, hardRequired[1]); // required2 + } + + @Test + void testBddNodeCount() { + int[] bddNodes = { + 0, + 1, + -1, + 1, + 100_000_000, + 100_000_001, + 2, + 100_000_002, + -1 + }; + + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[0], + new Object[0], + new RulesFunction[0], + bddNodes, + 1); + + assertEquals(3, bytecode.getBddNodeCount()); + assertEquals(1, bytecode.getBddRootRef()); + assertArrayEquals(bddNodes, bytecode.getBddNodes()); + } + + @Test + void testGettersReturnCorrectValues() { + byte[] bytecodeData = {1, 2, 3}; + int[] condOffsets = {0, 10}; + int[] resOffsets = {20}; + Object[] constants = {"const1", 42}; + RulesFunction[] functions = {new TestFunction("fn1", 1)}; + + Bytecode bytecode = new Bytecode( + bytecodeData, + condOffsets, + resOffsets, + new RegisterDefinition[0], + constants, + functions, + new int[0], + 0); + + assertArrayEquals(bytecodeData, bytecode.getBytecode()); + assertEquals(2, bytecode.getConditionCount()); + assertEquals(1, bytecode.getResultCount()); + assertEquals(2, bytecode.getConstantPoolCount()); + assertEquals("const1", bytecode.getConstant(0)); + assertEquals(42, bytecode.getConstant(1)); + assertEquals(1, bytecode.getFunctions().length); + assertEquals("fn1", bytecode.getFunctions()[0].getFunctionName()); + } + + private static class TestFunction implements RulesFunction { + private final String name; + private final int argCount; + + TestFunction(String name, int argCount) { + this.name = name; + this.argCount = argCount; + } + + @Override + public String getFunctionName() { + return name; + } + + @Override + public int getArgumentCount() { + return argCount; + } + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriterTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriterTest.java new file mode 100644 index 000000000..f1fe52bab --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriterTest.java @@ -0,0 +1,343 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +class BytecodeWriterTest { + + @Test + void testBasicBytecodeWriting() { + BytecodeWriter writer = new BytecodeWriter(); + + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + Bytecode bytecode = writer.build( + new RegisterDefinition[0], + new RulesFunction[0], + new int[0], + 0); + + byte[] bytes = bytecode.getBytecode(); + assertEquals(3, bytes.length); + assertEquals(Opcodes.LOAD_CONST, bytes[0]); + assertEquals(0, bytes[1]); + assertEquals(Opcodes.RETURN_VALUE, bytes[2]); + } + + @Test + void testWriteShort() { + BytecodeWriter writer = new BytecodeWriter(); + + writer.writeByte(Opcodes.LOAD_CONST_W); + writer.writeShort(0x1234); + + Bytecode bytecode = writer.build( + new RegisterDefinition[0], + new RulesFunction[0], + new int[0], + 0); + + byte[] bytes = bytecode.getBytecode(); + assertEquals(3, bytes.length); + assertEquals(Opcodes.LOAD_CONST_W, bytes[0]); + assertEquals(0x12, bytes[1] & 0xFF); + assertEquals(0x34, bytes[2] & 0xFF); + } + + @Test + void testConstantPoolManagement() { + BytecodeWriter writer = new BytecodeWriter(); + + // Add different types of constants + int stringIdx = writer.getConstantIndex("hello"); + int intIdx = writer.getConstantIndex(42); + int boolIdx = writer.getConstantIndex(true); + int nullIdx = writer.getConstantIndex(null); + int listIdx = writer.getConstantIndex(List.of("a", "b")); + int mapIdx = writer.getConstantIndex(Map.of("key", "value")); + + // Same constant should return same index + int stringIdx2 = writer.getConstantIndex("hello"); + assertEquals(stringIdx, stringIdx2); + + // Different constants should have different indices + assertTrue(stringIdx != intIdx); + assertTrue(intIdx != boolIdx); + + Bytecode bytecode = writer.build(new RegisterDefinition[0], new RulesFunction[0], new int[0], 0); + + // Verify constants were stored correctly + assertEquals("hello", bytecode.getConstant(stringIdx)); + assertEquals(42, bytecode.getConstant(intIdx)); + assertEquals(true, bytecode.getConstant(boolIdx)); + assertNull(bytecode.getConstant(nullIdx)); + assertEquals(List.of("a", "b"), bytecode.getConstant(listIdx)); + assertEquals(Map.of("key", "value"), bytecode.getConstant(mapIdx)); + } + + @Test + void testConditionAndResultOffsets() { + BytecodeWriter writer = new BytecodeWriter(); + + // Write first condition + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(0); + writer.writeByte(Opcodes.RETURN_VALUE); + + // Write second condition + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_REGISTER); + writer.writeByte(1); + writer.writeByte(Opcodes.RETURN_VALUE); + + // Write first result + writer.markResultStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(2); + writer.writeByte(Opcodes.RETURN_ENDPOINT); + writer.writeByte(0); + + Bytecode bytecode = writer.build(new RegisterDefinition[0], new RulesFunction[0], new int[0], 0); + + assertEquals(2, bytecode.getConditionCount()); + assertEquals(1, bytecode.getResultCount()); + + assertEquals(0, bytecode.getConditionStartOffset(0)); + assertEquals(3, bytecode.getConditionStartOffset(1)); + assertEquals(6, bytecode.getResultOffset(0)); + } + + @Test + void testFunctionRegistration() { + BytecodeWriter writer = new BytecodeWriter(); + + writer.registerFunction("parseUrl"); + writer.registerFunction("isValidHostLabel"); + writer.registerFunction("parseUrl"); // Duplicate should be ignored + + TestFunction parseUrl = new TestFunction("parseUrl", 1); + TestFunction isValid = new TestFunction("isValidHostLabel", 2); + + Bytecode bytecode = writer.build( + new RegisterDefinition[0], + new RulesFunction[] {parseUrl, isValid}, + new int[0], + 0); + + assertEquals(2, bytecode.getFunctions().length); + assertEquals("parseUrl", bytecode.getFunctions()[0].getFunctionName()); + assertEquals("isValidHostLabel", bytecode.getFunctions()[1].getFunctionName()); + } + + @Test + void testRegisterDefinitions() { + BytecodeWriter writer = new BytecodeWriter(); + + RegisterDefinition[] defs = { + new RegisterDefinition("region", true, null, null, false), + new RegisterDefinition("useDualStack", false, false, null, false), + new RegisterDefinition("endpoint", false, null, "SDK::Endpoint", false) + }; + + Bytecode bytecode = writer.build(defs, new RulesFunction[0], new int[0], 0); + + RegisterDefinition[] loadedDefs = bytecode.getRegisterDefinitions(); + assertEquals(3, loadedDefs.length); + assertEquals("region", loadedDefs[0].name()); + assertEquals("useDualStack", loadedDefs[1].name()); + assertEquals("endpoint", loadedDefs[2].name()); + } + + @Test + void testBddNodes() { + BytecodeWriter writer = new BytecodeWriter(); + + // BDD with 2 nodes + int[] bddNodes = { + 0, + 1, + -1, // Node 0: var=0, high=TRUE, low=FALSE + 1, + 100_000_000, + 100_000_001 // Node 1: var=1, high=Result0, low=Result1 + }; + + Bytecode bytecode = writer.build( + new RegisterDefinition[0], + new RulesFunction[0], + bddNodes, + 2 // root ref = 2 (points to node 1) + ); + + assertEquals(2, bytecode.getBddNodeCount()); + assertEquals(2, bytecode.getBddRootRef()); + + int[] loadedNodes = bytecode.getBddNodes(); + assertArrayEquals(bddNodes, loadedNodes); + } + + @Test + void testJumpLabels() { + BytecodeWriter writer = new BytecodeWriter(); + + // Create a simple jump pattern + String endLabel = writer.createLabel(); + + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(0); + writer.writeByte(Opcodes.JNN_OR_POP); + writer.writeJumpPlaceholder(endLabel); + + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(1); + + writer.markLabel(endLabel); + writer.writeByte(Opcodes.RETURN_VALUE); + + Bytecode bytecode = writer.build(new RegisterDefinition[0], new RulesFunction[0], new int[0], 0); + + byte[] bytes = bytecode.getBytecode(); + + // Verify structure + assertEquals(Opcodes.LOAD_CONST, bytes[0]); + assertEquals(0, bytes[1]); + assertEquals(Opcodes.JNN_OR_POP, bytes[2]); + + // Jump offset should be 2 (from position 5 to position 7) + // The jump is relative to the position AFTER the jump instruction + int jumpOffset = ((bytes[3] & 0xFF) << 8) | (bytes[4] & 0xFF); + assertEquals(2, jumpOffset); + + assertEquals(Opcodes.LOAD_CONST, bytes[5]); + assertEquals(1, bytes[6]); + assertEquals(Opcodes.RETURN_VALUE, bytes[7]); + } + + @Test + void testMultipleLabelsAndJumps() { + BytecodeWriter writer = new BytecodeWriter(); + + String label1 = writer.createLabel(); + String label2 = writer.createLabel(); + + // Position 0: Jump to label1 + writer.writeByte(Opcodes.JNN_OR_POP); + writer.writeJumpPlaceholder(label1); + + // Position 3: Some code + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(0); + + // Position 5: Jump to label2 + writer.writeByte(Opcodes.JNN_OR_POP); + writer.writeJumpPlaceholder(label2); + + // Position 8: Label1 location + writer.markLabel(label1); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(1); + + // Position 10: Label2 location + writer.markLabel(label2); + writer.writeByte(Opcodes.RETURN_VALUE); + + Bytecode bytecode = writer.build(new RegisterDefinition[0], new RulesFunction[0], new int[0], 0); + + byte[] bytes = bytecode.getBytecode(); + + // Layout: + // 0: JNN_OR_POP + // 1-2: jump offset (2 bytes) + // 3: LOAD_CONST + // 4: 0 + // 5: JNN_OR_POP + // 6-7: jump offset (2 bytes) + // 8: LOAD_CONST (label1 is here) + // 9: 1 + // 10: RETURN_VALUE (label2 is here) + + // First jump: from position 3 (after JNN_OR_POP + 2 bytes) to position 8 (label1) + // Offset = 8 - 3 = 5 + int jump1 = ((bytes[1] & 0xFF) << 8) | (bytes[2] & 0xFF); + assertEquals(5, jump1); + + // Second jump: from position 8 (after second JNN_OR_POP + 2 bytes) to position 10 (label2) + // Offset = 10 - 8 = 2 + int jump2 = ((bytes[6] & 0xFF) << 8) | (bytes[7] & 0xFF); + assertEquals(2, jump2); + } + + @Test + void testZeroJump() { + BytecodeWriter writer = new BytecodeWriter(); + + String label = writer.createLabel(); + + writer.writeByte(Opcodes.JNN_OR_POP); + writer.writeJumpPlaceholder(label); + writer.markLabel(label); // Label immediately after jump + writer.writeByte(Opcodes.RETURN_VALUE); + + Bytecode bytecode = writer.build(new RegisterDefinition[0], new RulesFunction[0], new int[0], 0); + + byte[] bytes = bytecode.getBytecode(); + + // Jump offset should be 0 (no bytes to skip) + int jumpOffset = ((bytes[1] & 0xFF) << 8) | (bytes[2] & 0xFF); + assertEquals(0, jumpOffset); + } + + @Test + void testConstantDeduplication() { + BytecodeWriter writer = new BytecodeWriter(); + + // String interning deduplicates + String str1 = new String("test"); + String str2 = new String("test"); + + int idx1 = writer.getConstantIndex(str1); + int idx2 = writer.getConstantIndex(str2); + + assertEquals(idx1, idx2); + + // But different strings should have different indices + int idx3 = writer.getConstantIndex("different"); + assertNotEquals(idx1, idx3); + } + + // Simple test implementation of RulesFunction + private static class TestFunction implements RulesFunction { + private final String name; + private final int argCount; + + TestFunction(String name, int argCount) { + this.name = name; + this.argCount = argCount; + } + + @Override + public String getFunctionName() { + return name; + } + + @Override + public int getArgumentCount() { + return argCount; + } + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolverTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolverTest.java new file mode 100644 index 000000000..9c230cdc2 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/DecisionTreeEndpointResolverTest.java @@ -0,0 +1,422 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.net.URI; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.client.core.endpoint.EndpointResolverParams; +import software.amazon.smithy.java.context.Context; +import software.amazon.smithy.java.core.schema.ApiOperation; +import software.amazon.smithy.java.core.schema.ApiService; +import software.amazon.smithy.java.core.schema.Schema; +import software.amazon.smithy.java.core.schema.SerializableStruct; +import software.amazon.smithy.java.core.schema.ShapeBuilder; +import software.amazon.smithy.java.core.serde.ShapeSerializer; +import software.amazon.smithy.java.core.serde.TypeRegistry; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.rulesengine.language.Endpoint; +import software.amazon.smithy.rulesengine.language.EndpointRuleSet; +import software.amazon.smithy.rulesengine.language.evaluation.value.Value; +import software.amazon.smithy.rulesengine.language.syntax.Identifier; +import software.amazon.smithy.rulesengine.language.syntax.expressions.Expression; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.BooleanEquals; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsSet; +import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal; +import software.amazon.smithy.rulesengine.language.syntax.parameters.Parameter; +import software.amazon.smithy.rulesengine.language.syntax.parameters.ParameterType; +import software.amazon.smithy.rulesengine.language.syntax.parameters.Parameters; +import software.amazon.smithy.rulesengine.language.syntax.rule.Condition; +import software.amazon.smithy.rulesengine.language.syntax.rule.EndpointRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.ErrorRule; +import software.amazon.smithy.rulesengine.language.syntax.rule.TreeRule; + +public class DecisionTreeEndpointResolverTest { + + private Context context; + private Map> builtinProviders; + private TestApiOperation operation; + private TestSerializableStruct input; + + @BeforeEach + void setUp() { + context = Context.create(); + builtinProviders = new HashMap<>(); + operation = new TestApiOperation(); + input = new TestSerializableStruct(); + } + + @Test + void testSimpleEndpointResolution() throws Exception { + var url = "https://example.com"; + var endpointRule = EndpointRule.builder().endpoint(Endpoint.builder().url(Expression.of(url)).build()); + + EndpointRuleSet ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().build()) + .rules(List.of(endpointRule)) + .build(); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertNotNull(endpoint); + assertEquals(URI.create(url), endpoint.uri()); + } + + @Test + void testParameterWithDefault() throws Exception { + Parameter param = Parameter.builder() + .name(Identifier.of("region")) + .type(ParameterType.STRING) + .required(true) + .defaultValue(Value.stringValue("us-east-1")) + .build(); + + EndpointRule endpointRule = EndpointRule.builder() + .endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("region"))).build()); + + EndpointRuleSet ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().addParameter(param).build()) + .rules(List.of(endpointRule)) + .build(); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertEquals(URI.create("us-east-1"), endpoint.uri()); + } + + @Test + void testParameterOverridesDefault() throws Exception { + Parameter param = Parameter.builder() + .name(Identifier.of("region")) + .type(ParameterType.STRING) + .required(true) + .defaultValue(Value.stringValue("us-east-1")) + .build(); + + var endpointRule = EndpointRule.builder() + .endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("region"))).build()); + + EndpointRuleSet ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().addParameter(param).build()) + .rules(List.of(endpointRule)) + .build(); + + Map additionalParams = new HashMap<>(); + additionalParams.put("region", "us-west-2"); + context = context.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, additionalParams); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertEquals(URI.create("us-west-2"), endpoint.uri()); + } + + @Test + void testBuiltinParameter() throws Exception { + Parameter param = Parameter.builder() + .name(Identifier.of("endpoint")) + .type(ParameterType.STRING) + .builtIn("SDK::Endpoint") + .build(); + + // Need to check isSet before using optional parameter + Condition isSetCondition = Condition.builder() + .fn(IsSet.ofExpressions(Expression.getReference(Identifier.of("endpoint")))) + .build(); + + EndpointRule endpointRule = EndpointRule.builder() + .conditions(List.of(isSetCondition)) + .endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("endpoint"))).build()); + + EndpointRuleSet ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().addParameter(param).build()) + .rules(List.of(endpointRule)) + .build(); + + builtinProviders.put("SDK::Endpoint", ctx -> "https://custom.example.com"); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertEquals(URI.create("https://custom.example.com"), endpoint.uri()); + } + + @Test + void testBuiltinReturnsNull() throws Exception { + Parameter param = Parameter.builder() + .name(Identifier.of("endpoint")) + .type(ParameterType.STRING) + .builtIn("SDK::Endpoint") + .required(true) + .defaultValue(Value.stringValue("https://default.com")) + .build(); + + EndpointRule endpointRule = EndpointRule.builder() + .endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("endpoint"))).build()); + + EndpointRuleSet ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().addParameter(param).build()) + .rules(List.of(endpointRule)) + .build(); + + builtinProviders.put("SDK::Endpoint", ctx -> null); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertEquals(URI.create("https://default.com"), endpoint.uri()); + } + + @Test + void testMultipleParameterTypes() throws Exception { + var stringParam = Parameter.builder() + .name(Identifier.of("bucket")) + .type(ParameterType.STRING) + .build(); + + var boolParam = Parameter.builder() + .name(Identifier.of("dualstack")) + .type(ParameterType.BOOLEAN) + .required(true) + .defaultValue(Value.booleanValue(false)) + .build(); + + var intParam = Parameter.builder() + .name(Identifier.of("port")) + .type(ParameterType.STRING) + .required(true) + .defaultValue(Value.stringValue("443")) + .build(); + + var endpointRule = EndpointRule.builder() + .endpoint(Endpoint.builder().url(Expression.of("https://example.com")).build()); + + var ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder() + .addParameter(stringParam) + .addParameter(boolParam) + .addParameter(intParam) + .build()) + .rules(List.of(endpointRule)) + .build(); + + Map additionalParams = new HashMap<>(); + additionalParams.put("bucket", "my-bucket"); + additionalParams.put("dualstack", true); + context = context.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, additionalParams); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertNotNull(endpoint); + assertEquals(URI.create("https://example.com"), endpoint.uri()); + } + + @Test + void testErrorRuleEvaluation() { + ErrorRule errorRule = ErrorRule.builder().error(Expression.of("Invalid configuration")); + + // Add a fallback endpoint rule that won't be reached + EndpointRule fallbackRule = EndpointRule.builder() + .endpoint(Endpoint.builder().url(Expression.of("https://fallback.com")).build()); + + // Use TreeRule to test error within a condition + Condition alwaysTrue = Condition.builder() + .fn(BooleanEquals.ofExpressions(Literal.booleanLiteral(true), Literal.booleanLiteral(true))) + .build(); + + var treeRule = TreeRule.builder().conditions(List.of(alwaysTrue)).treeRule(List.of(errorRule)); + + EndpointRuleSet ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().build()) + .rules(List.of(treeRule, fallbackRule)) + .build(); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + + Exception exception = assertThrows(Exception.class, future::get); + assertInstanceOf(RulesEvaluationError.class, exception.getCause()); + assertTrue(exception.getCause().getMessage().contains("Invalid configuration")); + } + + @Test + void testParameterPriority() throws Exception { + Parameter param = Parameter.builder() + .name(Identifier.of("region")) + .type(ParameterType.STRING) + .required(true) + .defaultValue(Value.stringValue("default-region")) + .builtIn("AWS::Region") + .build(); + + EndpointRule endpointRule = EndpointRule.builder() + .endpoint(Endpoint.builder().url(Expression.getReference(Identifier.of("region"))).build()); + + EndpointRuleSet ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().addParameter(param).build()) + .rules(List.of(endpointRule)) + .build(); + + builtinProviders.put("AWS::Region", ctx -> "builtin-region"); + + Map additionalParams = new HashMap<>(); + additionalParams.put("region", "supplied-region"); + context = context.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, additionalParams); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertEquals(URI.create("supplied-region"), endpoint.uri()); + } + + @Test + void testListParameterConversion() throws Exception { + Parameter param = Parameter.builder() + .name(Identifier.of("regions")) + .type(ParameterType.STRING_ARRAY) + .build(); + + EndpointRule endpointRule = EndpointRule.builder() + .endpoint(Endpoint.builder().url(Expression.of(("https://multi-region.example.com"))).build()); + + EndpointRuleSet ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().addParameter(param).build()) + .rules(List.of(endpointRule)) + .build(); + + Map additionalParams = new HashMap<>(); + additionalParams.put("regions", List.of("us-east-1", "us-west-2")); + context = context.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, additionalParams); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertNotNull(endpoint); + } + + @Test + void testMapParameterConversion() throws Exception { + var endpointRule = EndpointRule.builder() + .endpoint(Endpoint.builder().url(Expression.of(("https://example.com"))).build()); + + var ruleSet = EndpointRuleSet.builder() + .parameters(Parameters.builder().build()) + .rules(List.of(endpointRule)) + .build(); + + Map additionalParams = new HashMap<>(); + Map config = new HashMap<>(); + config.put("timeout", 30); + config.put("retries", 3); + additionalParams.put("config", config); + context = context.put(EndpointRulesPlugin.ADDITIONAL_ENDPOINT_PARAMS, additionalParams); + + var resolver = new DecisionTreeEndpointResolver(ruleSet, List.of(), builtinProviders); + var params = createParams(operation, input, context); + var future = resolver.resolveEndpoint(params); + var endpoint = future.get(); + + assertNotNull(endpoint); + } + + private static EndpointResolverParams createParams( + ApiOperation operation, + SerializableStruct input, + Context context + ) { + return EndpointResolverParams.builder().context(context).inputValue(input).operation(operation).build(); + } + + private static final Schema SCHEMA = Schema.structureBuilder(ShapeId.from("test#TestOperation")).build(); + private static final Schema INPUT = Schema.structureBuilder(ShapeId.from("test#TestInput")).build(); + + private static class TestApiOperation implements ApiOperation { + @Override + public ShapeBuilder inputBuilder() { + return null; + } + + @Override + public ShapeBuilder outputBuilder() { + return null; + } + + @Override + public Schema schema() { + return SCHEMA; + } + + @Override + public Schema inputSchema() { + return INPUT; + } + + @Override + public Schema outputSchema() { + return INPUT; + } + + @Override + public TypeRegistry errorRegistry() { + return null; + } + + @Override + public List effectiveAuthSchemes() { + return List.of(); + } + + @Override + public ApiService service() { + return null; + } + } + + private static class TestSerializableStruct implements SerializableStruct { + @Override + public T getMemberValue(Schema member) { + return null; + } + + @Override + public Schema schema() { + return SCHEMA; + } + + @Override + public void serializeMembers(ShapeSerializer serializer) {} + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java index c66467f37..6531dab49 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java @@ -8,6 +8,9 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; +import static org.hamcrest.Matchers.sameInstance; import org.junit.jupiter.api.Test; import software.amazon.smithy.java.client.core.ClientConfig; @@ -22,7 +25,7 @@ import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.model.traits.Trait; import software.amazon.smithy.rulesengine.language.EndpointRuleSet; -import software.amazon.smithy.rulesengine.logic.bdd.BddTrait; +import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; import software.amazon.smithy.rulesengine.logic.cfg.Cfg; import software.amazon.smithy.utils.IoUtils; @@ -31,33 +34,36 @@ public class EndpointRulesPluginTest { public void addsEndpointResolver() { var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); Cfg cfg = Cfg.from(EndpointRuleSet.fromNode(Node.parse(contents))); - BddTrait bdd = BddTrait.from(cfg); + EndpointBddTrait bdd = EndpointBddTrait.from(cfg); var program = new RulesEngineBuilder().compile(bdd); var plugin = EndpointRulesPlugin.from(program); var builder = ClientConfig.builder(); plugin.configureClient(builder); assertThat(builder.endpointResolver(), instanceOf(BytecodeEndpointResolver.class)); + assertThat(plugin.getBytecode(), notNullValue()); + assertThat(plugin.getBytecode(), sameInstance(program)); } @Test public void doesNotModifyExistingResolver() { var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); Cfg cfg = Cfg.from(EndpointRuleSet.fromNode(Node.parse(contents))); - BddTrait bdd = BddTrait.from(cfg); + EndpointBddTrait bdd = EndpointBddTrait.from(cfg); var program = new RulesEngineBuilder().compile(bdd); var plugin = EndpointRulesPlugin.from(program); var builder = ClientConfig.builder().endpointResolver(EndpointResolver.staticHost("foo.com")); plugin.configureClient(builder); assertThat(builder.endpointResolver(), not(instanceOf(BytecodeEndpointResolver.class))); + assertThat(builder.endpointResolver(), not(instanceOf(DecisionTreeEndpointResolver.class))); } @Test public void modifiesResolverIfCustomEndpointSet() { var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); Cfg cfg = Cfg.from(EndpointRuleSet.fromNode(Node.parse(contents))); - BddTrait bdd = BddTrait.from(cfg); + EndpointBddTrait bdd = EndpointBddTrait.from(cfg); var program = new RulesEngineBuilder().compile(bdd); var plugin = EndpointRulesPlugin.from(program); var builder = ClientConfig.builder() @@ -68,6 +74,60 @@ public void modifiesResolverIfCustomEndpointSet() { assertThat(builder.endpointResolver(), instanceOf(BytecodeEndpointResolver.class)); } + @Test + public void setsResolverWithCustomEndpointAndNullResolver() { + var contents = IoUtils.readUtf8Resource(getClass(), "example-complex-ruleset.json"); + Cfg cfg = Cfg.from(EndpointRuleSet.fromNode(Node.parse(contents))); + EndpointBddTrait bdd = EndpointBddTrait.from(cfg); + var program = new RulesEngineBuilder().compile(bdd); + var plugin = EndpointRulesPlugin.from(program); + var builder = ClientConfig.builder() + .putConfig(ClientContext.CUSTOM_ENDPOINT, Endpoint.builder().uri("https://example.com").build()); + + assertThat(builder.endpointResolver(), nullValue()); + + plugin.configureClient(builder); + + // Should set BytecodeEndpointResolver because CUSTOM_ENDPOINT is set + assertThat(builder.endpointResolver(), instanceOf(BytecodeEndpointResolver.class)); + } + + @Test + public void doesNotSetResolverWhenNoTraitsFound() { + // Create a minimal service with no endpoint-related traits + var model = Model.assembler() + .addUnparsedModel("test.smithy", """ + $version: "2" + namespace example + + service MinimalService { + version: "2020-01-01" + } + """) + .assemble() + .unwrap(); + + var service = model.expectShape(ShapeId.from("example#MinimalService"), ServiceShape.class); + var traits = new Trait[service.getAllTraits().size()]; + int i = 0; + for (var t : service.getAllTraits().values()) { + traits[i++] = t; + } + var schema = Schema.createService(service.getId(), traits); + ApiService api = () -> schema; + + var plugin = EndpointRulesPlugin.create(); + var builder = ClientConfig.builder().service(api); + + assertThat(builder.endpointResolver(), nullValue()); + + builder.applyPlugin(plugin); + + // remains null since no traits were found + assertThat(builder.endpointResolver(), nullValue()); + assertThat(plugin.getBytecode(), nullValue()); + } + @Test public void loadsRulesFromServiceSchemaTraits() { var model = Model.assembler() @@ -91,6 +151,7 @@ public void loadsRulesFromServiceSchemaTraits() { var builder = ClientConfig.builder().service(api); builder.applyPlugin(plugin); - assertThat(builder.endpointResolver(), instanceOf(BytecodeEndpointResolver.class)); + assertThat(builder.endpointResolver(), instanceOf(DecisionTreeEndpointResolver.class)); + assertThat(plugin.getBytecode(), nullValue()); } } diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java new file mode 100644 index 000000000..1c6eddd40 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointUtilsTest.java @@ -0,0 +1,156 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.model.node.ArrayNode; +import software.amazon.smithy.model.node.BooleanNode; +import software.amazon.smithy.model.node.NullNode; +import software.amazon.smithy.model.node.NumberNode; +import software.amazon.smithy.model.node.ObjectNode; +import software.amazon.smithy.model.node.StringNode; +import software.amazon.smithy.rulesengine.language.evaluation.value.Value; +import software.amazon.smithy.rulesengine.language.syntax.Identifier; + +class EndpointUtilsTest { + + @Test + void testConvertStringNode() { + assertEquals("test-value", EndpointUtils.convertNode(StringNode.from("test-value"))); + } + + @Test + void testConvertBooleanNode() { + assertEquals(true, EndpointUtils.convertNode(BooleanNode.from(true))); + assertEquals(false, EndpointUtils.convertNode(BooleanNode.from(false))); + } + + @Test + void testConvertArrayNode() { + Object result = EndpointUtils.convertNode(ArrayNode.fromStrings("item1", "item2", "item3")); + + assertInstanceOf(List.class, result); + List list = (List) result; + assertEquals(3, list.size()); + assertEquals("item1", list.get(0)); + assertEquals("item2", list.get(1)); + assertEquals("item3", list.get(2)); + } + + @Test + void testConvertNestedArrayNode() { + var arr = ArrayNode.fromNodes(StringNode.from("first"), ArrayNode.fromStrings("nested1", "nested2")); + var result = EndpointUtils.convertNode(arr); + + assertInstanceOf(List.class, result); + List list = (List) result; + assertEquals(2, list.size()); + assertEquals("first", list.get(0)); + + assertInstanceOf(List.class, list.get(1)); + List nestedList = (List) list.get(1); + assertEquals(2, nestedList.size()); + assertEquals("nested1", nestedList.get(0)); + assertEquals("nested2", nestedList.get(1)); + } + + @Test + void testConvertNumberNodeWithAllowAll() { + assertEquals(42, EndpointUtils.convertNode(NumberNode.from(42), true)); + } + + @Test + void testConvertObjectNodeWithAllowAll() { + ObjectNode node = ObjectNode.builder() + .withMember("key1", StringNode.from("value1")) + .withMember("key2", NumberNode.from(123)) + .build(); + Object result = EndpointUtils.convertNode(node, true); + + assertInstanceOf(Map.class, result); + Map map = (Map) result; + assertEquals("value1", map.get("key1")); + assertEquals(123, map.get("key2")); + } + + @Test + void testConvertNullNodeWithAllowAll() { + assertNull(EndpointUtils.convertNode(NullNode.nullNode(), true)); + } + + @Test + void testConvertUnsupportedNodeThrows() { + NumberNode node = NumberNode.from(42); + + assertThrows(RulesEvaluationError.class, () -> EndpointUtils.convertNode(node, false)); + } + + @Test + void testConvertToValueString() { + assertEquals("test", EndpointUtils.convertToValue("test").expectStringValue().getValue()); + } + + @Test + void testConvertToValueNumber() { + assertEquals(42, EndpointUtils.convertToValue(42).expectIntegerValue().getValue()); + } + + @Test + void testConvertToValueBoolean() { + assertTrue(EndpointUtils.convertToValue(true).expectBooleanValue().getValue()); + assertFalse(EndpointUtils.convertToValue(false).expectBooleanValue().getValue()); + } + + @Test + void testConvertToValueNull() { + assertTrue(EndpointUtils.convertToValue(null).isEmpty()); + } + + @Test + void testConvertToValueList() { + List list = List.of("item1", 42, true); + Value value = EndpointUtils.convertToValue(list); + List arrayValues = value.expectArrayValue().getValues(); + + assertEquals(3, arrayValues.size()); + assertEquals("item1", arrayValues.get(0).expectStringValue().getValue()); + assertEquals(42, arrayValues.get(1).expectIntegerValue().getValue()); + assertTrue(arrayValues.get(2).expectBooleanValue().getValue()); + } + + @Test + void testConvertToValueMap() { + Map map = Map.of("key1", "value1", "key2", 123); + Value value = EndpointUtils.convertToValue(map); + Map recordMap = value.expectRecordValue().getValue(); + + assertEquals("value1", recordMap.get(Identifier.of("key1")).expectStringValue().getValue()); + assertEquals(123, recordMap.get(Identifier.of("key2")).expectIntegerValue().getValue()); + } + + @Test + void testBytesToShort() { + int result = EndpointUtils.bytesToShort(new byte[] {0, 0, 0x12, 0x34, 0, 0}, 2); + + assertEquals(0x1234, result); + } + + @Test + void testBytesToShortMaxValue() { + int result = EndpointUtils.bytesToShort(new byte[] {(byte) 0xFF, (byte) 0xFF}, 0); + + assertEquals(0xFFFF, result); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocatorTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocatorTest.java new file mode 100644 index 000000000..9ff2755c4 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RegisterAllocatorTest.java @@ -0,0 +1,153 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; + +class RegisterAllocatorTest { + + @Test + void testAllocateInputParameter() { + RegisterAllocator allocator = new RegisterAllocator(); + + byte index = allocator.allocate("region", true, null, null, false); + + assertEquals(0, index); + assertEquals(1, allocator.getRegistry().size()); + + RegisterDefinition def = allocator.getRegistry().get(0); + assertEquals("region", def.name()); + assertTrue(def.required()); + assertNull(def.defaultValue()); + assertNull(def.builtin()); + assertFalse(def.temp()); + } + + @Test + void testAllocateWithDefault() { + RegisterAllocator allocator = new RegisterAllocator(); + + byte index = allocator.allocate("useDualStack", false, false, null, false); + + assertEquals(0, index); + RegisterDefinition def = allocator.getRegistry().get(0); + assertEquals("useDualStack", def.name()); + assertFalse(def.required()); + assertEquals(false, def.defaultValue()); + } + + @Test + void testAllocateWithBuiltin() { + RegisterAllocator allocator = new RegisterAllocator(); + + byte index = allocator.allocate("endpoint", false, null, "SDK::Endpoint", false); + + assertEquals(0, index); + RegisterDefinition def = allocator.getRegistry().get(0); + assertEquals("endpoint", def.name()); + assertEquals("SDK::Endpoint", def.builtin()); + } + + @Test + void testAllocateTempRegister() { + RegisterAllocator allocator = new RegisterAllocator(); + + byte index = allocator.allocate("temp_var", false, null, null, true); + + assertEquals(0, index); + RegisterDefinition def = allocator.getRegistry().get(0); + assertTrue(def.temp()); + } + + @Test + void testMultipleAllocations() { + RegisterAllocator allocator = new RegisterAllocator(); + + byte idx1 = allocator.allocate("var1", true, null, null, false); + byte idx2 = allocator.allocate("var2", false, "default", null, false); + byte idx3 = allocator.allocate("var3", false, null, "builtin", false); + + assertEquals(0, idx1); + assertEquals(1, idx2); + assertEquals(2, idx3); + assertEquals(3, allocator.getRegistry().size()); + } + + @Test + void testDuplicateNameThrows() { + RegisterAllocator allocator = new RegisterAllocator(); + + allocator.allocate("duplicate", true, null, null, false); + + assertThrows(RulesEvaluationError.class, () -> allocator.allocate("duplicate", false, null, null, false)); + } + + @Test + void testGetOrAllocateRegisterExisting() { + RegisterAllocator allocator = new RegisterAllocator(); + + byte first = allocator.allocate("existing", true, null, null, false); + byte second = allocator.getOrAllocateRegister("existing"); + + assertEquals(first, second); + assertEquals(1, allocator.getRegistry().size()); + } + + @Test + void testGetOrAllocateRegisterNew() { + RegisterAllocator allocator = new RegisterAllocator(); + + byte index = allocator.getOrAllocateRegister("new_temp"); + + assertEquals(0, index); + assertEquals(1, allocator.getRegistry().size()); + + RegisterDefinition def = allocator.getRegistry().get(0); + assertEquals("new_temp", def.name()); + assertFalse(def.required()); + assertNull(def.defaultValue()); + assertNull(def.builtin()); + assertTrue(def.temp()); + } + + @Test + void testGetRegisterExisting() { + RegisterAllocator allocator = new RegisterAllocator(); + + allocator.allocate("test", true, null, null, false); + byte index = allocator.getRegister("test"); + + assertEquals(0, index); + } + + @Test + void testGetRegisterNonExistentThrows() { + RegisterAllocator allocator = new RegisterAllocator(); + + assertThrows(IllegalStateException.class, () -> allocator.getRegister("nonexistent")); + } + + @Test + void testMaxRegisters() { + RegisterAllocator allocator = new RegisterAllocator(); + + // Allocate 255 registers (max for byte indexing) + for (int i = 0; i < 256; i++) { + allocator.allocate("var" + i, false, null, null, false); + } + + assertEquals(256, allocator.getRegistry().size()); + + // 256th should fail + assertThrows(IllegalStateException.class, () -> allocator.allocate("var256", false, null, null, false)); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RegisterFillerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RegisterFillerTest.java new file mode 100644 index 000000000..c65a8638a --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RegisterFillerTest.java @@ -0,0 +1,330 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.context.Context; + +class RegisterFillerTest { + + @Test + void testDefaultValues() { + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[] { + new RegisterDefinition("region", true, null, null, false), + new RegisterDefinition("useDualStack", false, false, null, false), + new RegisterDefinition("useFips", false, true, null, false) + }, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + RegisterFiller filler = RegisterFiller.of(bytecode, Map.of()); + + Map params = Map.of("region", "us-west-2"); + + Object[] registers = new Object[3]; + filler.fillRegisters(registers, Context.empty(), params); + + assertEquals("us-west-2", registers[0]); + assertEquals(false, registers[1]); + assertEquals(true, registers[2]); + } + + @Test + void testBuiltinProvider() { + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[] {new RegisterDefinition("endpoint", false, null, "SDK::Endpoint", false)}, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + Map> builtinProviders = Map.of( + "SDK::Endpoint", + ctx -> "https://custom.example.com"); + + RegisterFiller filler = RegisterFiller.of(bytecode, builtinProviders); + + Object[] registers = new Object[1]; + filler.fillRegisters(registers, Context.empty(), Map.of()); + + assertEquals("https://custom.example.com", registers[0]); + } + + @Test + void testParameterOverridesDefault() { + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[] {new RegisterDefinition("useDualStack", false, false, null, false)}, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + RegisterFiller filler = RegisterFiller.of(bytecode, Map.of()); + + Map params = Map.of("useDualStack", true); + + Object[] registers = new Object[1]; + filler.fillRegisters(registers, Context.empty(), params); + + assertEquals(true, registers[0]); + } + + @Test + void testParameterOverridesBuiltin() { + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[] {new RegisterDefinition("endpoint", false, null, "SDK::Endpoint", false)}, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + Map> builtinProviders = Map.of( + "SDK::Endpoint", + ctx -> "https://builtin.example.com"); + + RegisterFiller filler = RegisterFiller.of(bytecode, builtinProviders); + + Map params = Map.of("endpoint", "https://override.example.com"); + + Object[] registers = new Object[1]; + filler.fillRegisters(registers, Context.empty(), params); + + assertEquals("https://override.example.com", registers[0]); + } + + @Test + void testMissingRequiredParameterThrows() { + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[] {new RegisterDefinition("region", true, null, null, false)}, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + RegisterFiller filler = RegisterFiller.of(bytecode, Map.of()); + + Object[] registers = new Object[1]; + + RulesEvaluationError error = assertThrows(RulesEvaluationError.class, + () -> filler.fillRegisters(registers, Context.empty(), Map.of())); + + assertTrue(error.getMessage().contains("region")); + } + + @Test + void testLargeRegisterCount() { + // Test with 100 registers to trigger LargeRegisterFiller + RegisterDefinition[] definitions = new RegisterDefinition[100]; + + for (int i = 0; i < 100; i++) { + definitions[i] = new RegisterDefinition("param" + i, false, "default" + i, null, false); + } + + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + definitions, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + RegisterFiller filler = RegisterFiller.of(bytecode, Map.of()); + + Map params = Map.of( + "param0", + "override0", + "param50", + "override50", + "param99", + "override99"); + + Object[] registers = new Object[100]; + filler.fillRegisters(registers, Context.empty(), params); + + assertEquals("override0", registers[0]); + assertEquals("default25", registers[25]); + assertEquals("override50", registers[50]); + assertEquals("default75", registers[75]); + assertEquals("override99", registers[99]); + } + + @Test + void testTempRegistersIgnored() { + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[] { + new RegisterDefinition("input", false, "default", null, false), + new RegisterDefinition("temp1", false, null, null, true), + new RegisterDefinition("temp2", false, null, null, true) + }, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + RegisterFiller filler = RegisterFiller.of(bytecode, Map.of()); + + // Try to set temp registers via params, but will be ignored + Map params = Map.of( + "input", + "value", + "temp1", + "should_be_ignored", + "temp2", + "also_ignored"); + + Object[] registers = new Object[3]; + filler.fillRegisters(registers, Context.empty(), params); + + assertEquals("value", registers[0]); + assertNull(registers[1]); + assertNull(registers[2]); + } + + @Test + void testBuiltinReturnsNull() { + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[] {new RegisterDefinition("endpoint", false, null, "SDK::Endpoint", false)}, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + Map> builtinProviders = Map.of( + "SDK::Endpoint", + ctx -> null); + + RegisterFiller filler = RegisterFiller.of(bytecode, builtinProviders); + + Object[] registers = new Object[1]; + filler.fillRegisters(registers, Context.empty(), Map.of()); + + assertNull(registers[0]); + } + + @Test + void testMixedRequiredOptionalAndBuiltin() { + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + new RegisterDefinition[] { + new RegisterDefinition("required1", true, null, null, false), + new RegisterDefinition("optional1", false, "defaultOpt", null, false), + new RegisterDefinition("builtin1", false, null, "TestBuiltin", false), + new RegisterDefinition("required2", true, null, null, false), + new RegisterDefinition("optionalWithBuiltin", false, "defaultVal", "TestBuiltin2", false) + }, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + Map> builtinProviders = Map.of( + "TestBuiltin", + ctx -> "builtinValue", + "TestBuiltin2", + ctx -> "builtinValue2"); + + RegisterFiller filler = RegisterFiller.of(bytecode, builtinProviders); + + Map params = Map.of("required1", "req1", "required2", "req2"); + + Object[] registers = new Object[5]; + filler.fillRegisters(registers, Context.empty(), params); + + assertEquals("req1", registers[0]); + assertEquals("defaultOpt", registers[1]); + assertEquals("builtinValue", registers[2]); + assertEquals("req2", registers[3]); + assertEquals("builtinValue2", registers[4]); + } + + @Test + void testSmallRegisterCountUsesFastFiller() { + RegisterDefinition[] definitions = new RegisterDefinition[30]; + for (int i = 0; i < 30; i++) { + definitions[i] = new RegisterDefinition( + "param" + i, + i < 5, // first 5 are required + i >= 10 ? "default" + i : null, // 10+ have defaults + null, + false); + } + + Bytecode bytecode = new Bytecode( + new byte[0], + new int[0], + new int[0], + definitions, + new Object[0], + new RulesFunction[0], + new int[0], + 0); + + RegisterFiller filler = RegisterFiller.of(bytecode, Map.of()); + + Map params = new HashMap<>(); + // Fill required params + for (int i = 0; i < 5; i++) { + params.put("param" + i, "value" + i); + } + // Override some defaults + params.put("param15", "override15"); + + Object[] registers = new Object[30]; + filler.fillRegisters(registers, Context.empty(), params); + + // Check required params filled + for (int i = 0; i < 5; i++) { + assertEquals("value" + i, registers[i]); + } + + // Check overridden default + assertEquals("override15", registers[15]); // should be overridden value, not default + + // Check non-overridden defaults + assertEquals("default20", registers[20]); // should use default + assertEquals("default25", registers[25]); // should use default + + // Check unfilled (no default, not required, not provided) + assertNull(registers[7]); + assertNull(registers[8]); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilderTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilderTest.java new file mode 100644 index 000000000..6032da891 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilderTest.java @@ -0,0 +1,466 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +class RulesEngineBuilderTest { + + private RulesEngineBuilder builder; + + @BeforeEach + void setUp() { + builder = new RulesEngineBuilder(); + } + + @Test + void testLoadMinimalValidBytecode() throws IOException { + byte[] bytecode = createMinimalBytecode(); + Bytecode loaded = builder.load(bytecode); + + assertNotNull(loaded); + assertEquals(0, loaded.getConditionCount()); + assertEquals(0, loaded.getResultCount()); + assertEquals(0, loaded.getConstantPoolCount()); + assertEquals(0, loaded.getBddNodeCount()); + } + + @Test + void testLoadBytecodeFromPath(@TempDir Path tempDir) throws IOException { + Path bytecodeFile = tempDir.resolve("test.bytecode"); + byte[] bytecode = createMinimalBytecode(); + Files.write(bytecodeFile, bytecode); + + Bytecode loaded = builder.load(bytecodeFile); + + assertNotNull(loaded); + assertEquals(0, loaded.getConditionCount()); + assertEquals(0, loaded.getResultCount()); + } + + @Test + void testLoadBytecodeWithConditionsAndResults() throws IOException { + byte[] bytecode = createBytecodeWithConditionsAndResults(); + Bytecode loaded = builder.load(bytecode); + + assertEquals(2, loaded.getConditionCount()); + assertEquals(1, loaded.getResultCount()); + assertEquals(1, loaded.getConstantPoolCount()); + assertEquals(1, loaded.getBddNodeCount()); + } + + @Test + void testLoadBytecodeWithRegisters() throws IOException { + byte[] bytecode = createBytecodeWithRegisters(); + Bytecode loaded = builder.load(bytecode); + + RegisterDefinition[] registers = loaded.getRegisterDefinitions(); + assertEquals(2, registers.length); + assertEquals("param1", registers[0].name()); + assertTrue(registers[0].required()); + assertEquals("param2", registers[1].name()); + assertEquals(Boolean.TRUE, registers[1].defaultValue()); + } + + @Test + void testLoadBytecodeWithFunctions() throws IOException { + // Add a test function to the builder + builder.addFunction(new RulesFunction() { + @Override + public int getArgumentCount() { + return 1; + } + + @Override + public String getFunctionName() { + return "testFunc"; + } + + @Override + public Object apply1(Object arg) { + return arg; + } + }); + + byte[] bytecode = createBytecodeWithFunction("testFunc"); + Bytecode loaded = builder.load(bytecode); + + assertEquals(1, loaded.getFunctions().length); + assertEquals("testFunc", loaded.getFunctions()[0].getFunctionName()); + } + + @Test + void testLoadBytecodeWithConstants() throws IOException { + byte[] bytecode = createBytecodeWithConstants(); + Bytecode loaded = builder.load(bytecode); + + assertEquals(4, loaded.getConstantPoolCount()); + assertEquals("test", loaded.getConstant(0)); + assertEquals(42, loaded.getConstant(1)); + assertEquals(true, loaded.getConstant(2)); + assertNull(loaded.getConstant(3)); + } + + @Test + void testLoadInvalidMagicNumber() { + byte[] bytecode = new byte[44]; + // Wrong magic number + bytecode[0] = 0x12; + bytecode[1] = 0x34; + bytecode[2] = 0x56; + bytecode[3] = 0x78; + + Exception ex = assertThrows(IllegalArgumentException.class, () -> builder.load(bytecode)); + assertTrue(ex.getMessage().contains("Invalid magic number")); + } + + @Test + void testLoadInvalidVersion() throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(0x0202); // Wrong version + + byte[] bytecode = baos.toByteArray(); + byte[] fullBytecode = new byte[44]; + System.arraycopy(bytecode, 0, fullBytecode, 0, bytecode.length); + + Exception ex = assertThrows(IllegalArgumentException.class, () -> builder.load(fullBytecode)); + assertTrue(ex.getMessage().contains("Unsupported bytecode version")); + } + + @Test + void testLoadTooShortBytecode() { + byte[] bytecode = new byte[43]; // One byte too short + + Exception ex = assertThrows(IllegalArgumentException.class, () -> builder.load(bytecode)); + assertTrue(ex.getMessage().contains("too short")); + } + + @Test + void testLoadNonExistentPath(@TempDir Path tempDir) { + Path nonExistent = tempDir.resolve("does-not-exist.bytecode"); + + assertThrows(UncheckedIOException.class, () -> builder.load(nonExistent)); + } + + @Test + void testLoadMissingFunction() throws IOException { + // Don't register the function that the bytecode expects + byte[] bytecode = createBytecodeWithFunction("missingFunc"); + + Exception ex = assertThrows(RulesEvaluationError.class, () -> builder.load(bytecode)); + assertTrue(ex.getMessage().contains("Missing bytecode functions")); + assertTrue(ex.getMessage().contains("missingFunc")); + } + + @Test + void testLoadBytecodeWithBddNodes() throws IOException { + byte[] bytecode = createBytecodeWithBddNodes(); + Bytecode loaded = builder.load(bytecode); + + assertEquals(2, loaded.getBddNodeCount()); + int[] nodes = loaded.getBddNodes(); + assertEquals(6, nodes.length); // 2 nodes * 3 ints each + + // First node: [0, 1, -1] + assertEquals(0, nodes[0]); + assertEquals(1, nodes[1]); + assertEquals(-1, nodes[2]); + + // Second node: [1, 2, 3] + assertEquals(1, nodes[3]); + assertEquals(2, nodes[4]); + assertEquals(3, nodes[5]); + } + + @Test + void testLoadInvalidOffsets() throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + // Write header with invalid offsets + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(Bytecode.VERSION); + dos.writeShort(0); // conditions + dos.writeShort(0); // results + dos.writeShort(0); // registers + dos.writeShort(0); // constants + dos.writeShort(0); // functions + dos.writeInt(0); // BDD nodes + dos.writeInt(1); // BDD root + dos.writeInt(1000); // Invalid condition offset + dos.writeInt(2000); // Invalid result offset + dos.writeInt(3000); // Invalid function offset + dos.writeInt(4000); // Invalid constant offset + dos.writeInt(5000); // Invalid BDD offset + + byte[] bytecode = baos.toByteArray(); + + Exception ex = assertThrows(IllegalArgumentException.class, () -> builder.load(bytecode)); + assertTrue(ex.getMessage().contains("Invalid offsets")); + } + + // Helper methods to create test bytecode + + private byte[] createMinimalBytecode() throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + // Header + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(Bytecode.VERSION); + dos.writeShort(0); // conditions + dos.writeShort(0); // results + dos.writeShort(0); // registers + dos.writeShort(0); // constants + dos.writeShort(0); // functions + dos.writeInt(0); // BDD nodes + dos.writeInt(1); // BDD root (TRUE) + + // Offsets + int headerSize = 44; + dos.writeInt(headerSize); // condition table + dos.writeInt(headerSize); // result table + dos.writeInt(headerSize); // function table + dos.writeInt(headerSize); // constant pool + dos.writeInt(headerSize); // BDD table + + return baos.toByteArray(); + } + + private byte[] createBytecodeWithConditionsAndResults() throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + // Header + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(Bytecode.VERSION); + dos.writeShort(2); // conditions + dos.writeShort(1); // results + dos.writeShort(0); // registers + dos.writeShort(1); // constants + dos.writeShort(0); // functions + dos.writeInt(1); // BDD nodes + dos.writeInt(2); // BDD root + + int headerSize = 44; + int condTableSize = 2 * 4; // 2 conditions + int resultTableSize = 4; // 1 result + int bddTableSize = 12; // 1 node + + dos.writeInt(headerSize); // condition table offset + dos.writeInt(headerSize + condTableSize); // result table offset + dos.writeInt(headerSize + condTableSize + resultTableSize); // function table offset + dos.writeInt(headerSize + condTableSize + resultTableSize + bddTableSize + 10); // constant pool offset + dos.writeInt(headerSize + condTableSize + resultTableSize); // BDD table offset + + // Condition offsets + dos.writeInt(headerSize + condTableSize + resultTableSize + bddTableSize); // condition 0 + dos.writeInt(headerSize + condTableSize + resultTableSize + bddTableSize + 3); // condition 1 + + // Result offset + dos.writeInt(headerSize + condTableSize + resultTableSize + bddTableSize + 6); // result 0 + + // BDD nodes + dos.writeInt(0); // var + dos.writeInt(1); // high + dos.writeInt(-1); // low + + // Bytecode section (minimal) + dos.writeByte(Opcodes.LOAD_CONST); + dos.writeByte(0); + dos.writeByte(Opcodes.RETURN_VALUE); + dos.writeByte(Opcodes.LOAD_CONST); + dos.writeByte(0); + dos.writeByte(Opcodes.RETURN_VALUE); + dos.writeByte(Opcodes.LOAD_CONST); + dos.writeByte(0); + dos.writeByte(Opcodes.RETURN_VALUE); + dos.writeByte(0); // padding + + // Constant pool + dos.writeByte(Bytecode.CONST_NULL); + + return baos.toByteArray(); + } + + private byte[] createBytecodeWithRegisters() throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + // Header + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(Bytecode.VERSION); + dos.writeShort(0); // conditions + dos.writeShort(0); // results + dos.writeShort(2); // registers + dos.writeShort(0); // constants + dos.writeShort(0); // functions + dos.writeInt(0); // BDD nodes + dos.writeInt(1); // BDD root + + int headerSize = 44; + dos.writeInt(headerSize); // condition table + dos.writeInt(headerSize); // result table + dos.writeInt(headerSize); // function table + + // Calculate register section size + ByteArrayOutputStream regBaos = new ByteArrayOutputStream(); + DataOutputStream regDos = new DataOutputStream(regBaos); + + // Register 1: required, no default + writeUTF(regDos, "param1"); + regDos.writeByte(1); // required + regDos.writeByte(0); // not temp + regDos.writeByte(0); // no default + regDos.writeByte(0); // no builtin + + // Register 2: optional with default + writeUTF(regDos, "param2"); + regDos.writeByte(0); // not required + regDos.writeByte(0); // not temp + regDos.writeByte(1); // has default + regDos.writeByte(Bytecode.CONST_BOOLEAN); + regDos.writeByte(1); // true + regDos.writeByte(0); // no builtin + + byte[] regBytes = regBaos.toByteArray(); + + dos.writeInt(headerSize + regBytes.length); // constant pool + dos.writeInt(headerSize); // BDD table + + // Write register definitions + dos.write(regBytes); + + return baos.toByteArray(); + } + + private byte[] createBytecodeWithFunction(String functionName) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + // Header + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(Bytecode.VERSION); + dos.writeShort(0); // conditions + dos.writeShort(0); // results + dos.writeShort(0); // registers + dos.writeShort(0); // constants + dos.writeShort(1); // functions + dos.writeInt(0); // BDD nodes + dos.writeInt(1); // BDD root + + int headerSize = 44; + int funcTableSize = 2 + functionName.length(); + + dos.writeInt(headerSize); // condition table + dos.writeInt(headerSize); // result table + dos.writeInt(headerSize); // function table + dos.writeInt(headerSize + funcTableSize); // constant pool + dos.writeInt(headerSize + funcTableSize); // BDD table + + // Function table + writeUTF(dos, functionName); + + return baos.toByteArray(); + } + + private byte[] createBytecodeWithConstants() throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + // Header + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(Bytecode.VERSION); + dos.writeShort(0); // conditions + dos.writeShort(0); // results + dos.writeShort(0); // registers + dos.writeShort(4); // constants + dos.writeShort(0); // functions + dos.writeInt(0); // BDD nodes + dos.writeInt(1); // BDD root + + int headerSize = 44; + dos.writeInt(headerSize); // condition table + dos.writeInt(headerSize); // result table + dos.writeInt(headerSize); // function table + dos.writeInt(headerSize); // constant pool + dos.writeInt(headerSize); // BDD table + + // Constant pool + dos.writeByte(Bytecode.CONST_STRING); + writeUTF(dos, "test"); + + dos.writeByte(Bytecode.CONST_INTEGER); + dos.writeInt(42); + + dos.writeByte(Bytecode.CONST_BOOLEAN); + dos.writeByte(1); + + dos.writeByte(Bytecode.CONST_NULL); + + return baos.toByteArray(); + } + + private byte[] createBytecodeWithBddNodes() throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + // Header + dos.writeInt(Bytecode.MAGIC); + dos.writeShort(Bytecode.VERSION); + dos.writeShort(0); // conditions + dos.writeShort(0); // results + dos.writeShort(0); // registers + dos.writeShort(0); // constants + dos.writeShort(0); // functions + dos.writeInt(2); // BDD nodes + dos.writeInt(2); // BDD root + + int headerSize = 44; + int bddTableSize = 2 * 12; // 2 nodes + + dos.writeInt(headerSize); // condition table + dos.writeInt(headerSize); // result table + dos.writeInt(headerSize); // function table + dos.writeInt(headerSize + bddTableSize); // constant pool + dos.writeInt(headerSize); // BDD table + + // BDD nodes + dos.writeInt(0); // var + dos.writeInt(1); // high + dos.writeInt(-1); // low + + dos.writeInt(1); // var + dos.writeInt(2); // high + dos.writeInt(3); // low + + return baos.toByteArray(); + } + + private void writeUTF(DataOutputStream dos, String value) throws IOException { + byte[] bytes = value.getBytes(StandardCharsets.UTF_8); + dos.writeShort(bytes.length); + dos.write(bytes); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdExtensionTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdExtensionTest.java new file mode 100644 index 000000000..4666d239f --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/StdExtensionTest.java @@ -0,0 +1,57 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; +import org.junit.jupiter.api.Test; +import software.amazon.smithy.java.client.core.ClientContext; +import software.amazon.smithy.java.client.core.endpoint.Endpoint; +import software.amazon.smithy.java.context.Context; + +class StdExtensionTest { + + @Test + void testProvidesEndpointBuiltin() { + StdExtension extension = new StdExtension(); + Map> providers = new HashMap<>(); + + extension.putBuiltinProviders(providers); + + assertTrue(providers.containsKey("SDK::Endpoint")); + } + + @Test + void testEndpointProviderReturnsNull() { + StdExtension extension = new StdExtension(); + Map> providers = new HashMap<>(); + extension.putBuiltinProviders(providers); + + Function endpointProvider = providers.get("SDK::Endpoint"); + Context context = Context.empty(); + + assertNull(endpointProvider.apply(context)); + } + + @Test + void testEndpointProviderReturnsCustomEndpoint() { + StdExtension extension = new StdExtension(); + Map> providers = new HashMap<>(); + extension.putBuiltinProviders(providers); + + Function endpointProvider = providers.get("SDK::Endpoint"); + + Endpoint testEndpoint = Endpoint.builder().uri("https://foo.com").build(); + Context context = Context.create().put(ClientContext.CUSTOM_ENDPOINT, testEndpoint); + + assertEquals(testEndpoint.uri().toString(), endpointProvider.apply(context)); + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/UriFactoryTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/UriFactoryTest.java new file mode 100644 index 000000000..8e99fe682 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/UriFactoryTest.java @@ -0,0 +1,56 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; + +import java.net.URI; +import org.junit.jupiter.api.Test; + +class UriFactoryTest { + + @Test + void testBasicUriCreation() { + UriFactory factory = new UriFactory(); + URI uri = factory.createUri("https://example.com"); + assertEquals("https://example.com", uri.toString()); + } + + @Test + void testNullUri() { + UriFactory factory = new UriFactory(); + assertNull(factory.createUri(null)); + } + + @Test + void testInvalidUri() { + UriFactory factory = new UriFactory(); + assertNull(factory.createUri("not a valid uri with spaces")); + } + + @Test + void testCaching() { + UriFactory factory = new UriFactory(3); + + URI uri1 = factory.createUri("https://example1.com"); + URI uri2 = factory.createUri("https://example2.com"); + URI uri3 = factory.createUri("https://example3.com"); + + // Access uri1 again to make it recently used + URI uri1Again = factory.createUri("https://example1.com"); + assertSame(uri1, uri1Again); + + // Add a fourth URI, which should evict uri2 (least recently used) + URI uri4 = factory.createUri("https://example4.com"); + + // uri1 and uri3 should still be cached + assertSame(uri1, factory.createUri("https://example1.com")); + assertSame(uri3, factory.createUri("https://example3.com")); + assertSame(uri4, factory.createUri("https://example4.com")); + } +} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/example-complex-ruleset.json b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/example-complex-ruleset.json index aac476a6c..162537661 100644 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/example-complex-ruleset.json +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/example-complex-ruleset.json @@ -1,5 +1,5 @@ { - "version": "1.0", + "version": "1.1", "parameters": { "Region": { "required": false, diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.json b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.json index 27fa326b5..9ce41e47d 100644 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.json +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.json @@ -1,5 +1,5 @@ { - "version": "1.3", + "version": "1.1", "parameters": { "Region": { "builtIn": "AWS::Region", diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.smithy index b56e49a5a..4b864aa6d 100644 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.smithy +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/minimal-ruleset.smithy @@ -6,7 +6,7 @@ use smithy.rules#clientContextParams use smithy.rules#endpointRuleSet @endpointRuleSet({ - "version": "1.3", + "version": "1.1", "parameters": { "Region": { "required": true, diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy deleted file mode 100644 index 6a30afbd7..000000000 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/default-values.smithy +++ /dev/null @@ -1,136 +0,0 @@ -$version: "2.0" - -namespace example - -use smithy.rules#clientContextParams -use smithy.rules#endpointRuleSet -use smithy.rules#endpointTests -use smithy.rules#staticContextParams - -@clientContextParams( - bar: {type: "string", documentation: "a client string parameter"} - baz: {type: "string", documentation: "another client string parameter"} -) -@endpointRuleSet({ - version: "1.0", - parameters: { - bar: { - type: "string", - documentation: "docs" - } - baz: { - type: "string", - documentation: "docs" - required: true - default: "baz" - }, - stringArrayParam: { - type: "stringArray", - required: true, - default: ["a", "b", "c"], - documentation: "docs" - } - }, - rules: [ - { - "documentation": "Template baz into URI when bar is set", - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "bar" - } - ] - } - ], - "endpoint": { - "url": "https://example.com/{baz}" - }, - "type": "endpoint" - }, - { - "documentation": "Template first array value into URI", - "conditions": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "stringArrayParam" - }, - "[0]" - ], - "assign": "arrayValue" - } - ], - "endpoint": { - "url": "https://example.com/{arrayValue}" - }, - "type": "endpoint" - }, - { - "conditions": [], - "documentation": "error fallthrough", - "error": "endpoint error", - "type": "error" - } - ] -}) -@endpointTests({ - "version": "1.0", - "testCases": [ - { - "documentation": "a b" - "params": { - "bar": "a b", - } - "expect": { - "endpoint": { - "url": "https://example.com/baz" - } - } - }, - { - "documentation": "BIG" - "params": { - "bar": "a b", - "baz": "BIG" - } - "expect": { - "endpoint": { - "url": "https://example.com/BIG" - } - } - }, - { - "documentation": "Default array values used" - "params": { - } - "expect": { - "endpoint": { - "url": "https://example.com/a" - } - } - }, - { - "params": { - "stringArrayParam": [] - } - "documentation": "a documentation string", - "expect": { - "error": "endpoint error" - } - } - ] -}) -service FizzBuzz { - version: "2022-01-01", - operations: [GetThing] -} - -@staticContextParams( - "stringArrayParam": {value: []} -) -operation GetThing { - input := {} -} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/headers.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/headers.smithy deleted file mode 100644 index 5587c8be3..000000000 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/headers.smithy +++ /dev/null @@ -1,80 +0,0 @@ -$version: "2.0" - -namespace example - -use smithy.rules#clientContextParams -use smithy.rules#endpointRuleSet -use smithy.rules#endpointTests - -@endpointRuleSet({ - "parameters": { - "Region": { - "type": "string", - "documentation": "The region to dispatch this request, eg. `us-east-1`." - } - }, - "rules": [ - { - "documentation": "Template the region into the URI when region is set", - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } - ], - "endpoint": { - "url": "https://{Region}.amazonaws.com", - "headers": { - "x-amz-region": [ - "{Region}" - ], - "x-amz-multi": [ - "*", - "{Region}" - ] - } - }, - "type": "endpoint" - }, - { - "documentation": "fallback when region is unset", - "conditions": [], - "error": "Region must be set to resolve a valid endpoint", - "type": "error" - } - ], - "version": "1.3" -}) -@endpointTests( - "version": "1.0", - "testCases": [ - { - "documentation": "header set to region", - "params": { - "Region": "us-east-1" - }, - "expect": { - "endpoint": { - "url": "https://us-east-1.amazonaws.com", - "headers": { - "x-amz-region": [ - "us-east-1" - ], - "x-amz-multi": [ - "*", - "us-east-1" - ] - } - } - } - } - ] -) -@clientContextParams( - Region: {type: "string", documentation: "docs"} -) -service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/parse-url.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/parse-url.smithy deleted file mode 100644 index 00e8b371f..000000000 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/parse-url.smithy +++ /dev/null @@ -1,246 +0,0 @@ -$version: "2.0" - -namespace example - -use smithy.rules#clientContextParams -use smithy.rules#endpointRuleSet -use smithy.rules#endpointTests - -@endpointRuleSet({ - "version": "1.3", - "parameters": { - "Endpoint": { - "type": "string", - "documentation": "docs" - } - }, - "rules": [ - { - "documentation": "endpoint is set and is a valid URL", - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - }, - { - "fn": "parseURL", - "argv": [ - "{Endpoint}" - ], - "assign": "url" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "url" - }, - "isIp" - ] - }, - true - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}{url#normalizedPath}is-ip-addr" - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "{url#path}", - "/port" - ] - } - ], - "endpoint": { - "url": "{url#scheme}://{url#authority}/uri-with-port" - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "{url#normalizedPath}", - "/" - ] - } - ], - "endpoint": { - "url": "https://{url#scheme}-{url#authority}-nopath.example.com" - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://{url#scheme}-{url#authority}.example.com/path-is{url#path}" - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "error": "endpoint was invalid", - "conditions": [], - "type": "error" - } - ] -}) -@endpointTests( - version: "1.0", - testCases: [ - { - "documentation": "simple URL parsing", - "params": { - "Endpoint": "https://authority.com/custom-path" - }, - "expect": { - "endpoint": { - "url": "https://https-authority.com.example.com/path-is/custom-path" - } - } - }, - { - "documentation": "empty path no slash", - "params": { - "Endpoint": "https://authority.com" - }, - "expect": { - "endpoint": { - "url": "https://https-authority.com-nopath.example.com" - } - } - }, - { - "documentation": "empty path with slash", - "params": { - "Endpoint": "https://authority.com/" - }, - "expect": { - "endpoint": { - "url": "https://https-authority.com-nopath.example.com" - } - } - }, - { - "documentation": "authority with port", - "params": { - "Endpoint": "https://authority.com:8000/port" - }, - "expect": { - "endpoint": { - "url": "https://authority.com:8000/uri-with-port" - } - } - }, - { - "documentation": "http schemes", - "params": { - "Endpoint": "http://authority.com:8000/port" - }, - "expect": { - "endpoint": { - "url": "http://authority.com:8000/uri-with-port" - } - } - }, - { - "documentation": "host labels are not validated", - "params": { - "Endpoint": "http://99_ab.com" - }, - "expect": { - "endpoint": { - "url": "https://http-99_ab.com-nopath.example.com" - } - } - }, - { - "documentation": "host labels are not validated", - "params": { - "Endpoint": "http://99_ab-.com" - }, - "expect": { - "endpoint": { - "url": "https://http-99_ab-.com-nopath.example.com" - } - } - }, - { - "documentation": "IP Address", - "params": { - "Endpoint": "http://192.168.1.1/foo/" - }, - "expect": { - "endpoint": { - "url": "http://192.168.1.1/foo/is-ip-addr" - } - } - }, - { - "documentation": "IP Address with port", - "params": { - "Endpoint": "http://192.168.1.1:1234/foo/" - }, - "expect": { - "endpoint": { - "url": "http://192.168.1.1:1234/foo/is-ip-addr" - } - } - }, - { - "documentation": "IPv6 Address", - "params": { - "Endpoint": "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443" - }, - "expect": { - "endpoint": { - "url": "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/is-ip-addr" - } - } - }, - { - "documentation": "weird DNS name", - "params": { - "Endpoint": "https://999.999.abc.blah" - }, - "expect": { - "endpoint": { - "url": "https://https-999.999.abc.blah-nopath.example.com" - } - } - }, - { - "documentation": "query in resolved endpoint is not supported", - "params": { - "Endpoint": "https://example.com/path?query1=foo" - }, - "expect": { - "error": "endpoint was invalid" - } - } - ] -) -@clientContextParams( - Endpoint: {type: "string", documentation: "docs"} -) -service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/ruleset-with-params.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/ruleset-with-params.smithy deleted file mode 100644 index 8fb8a0f26..000000000 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/ruleset-with-params.smithy +++ /dev/null @@ -1,193 +0,0 @@ -$version: "1.0" - -namespace example - -use smithy.rules#contextParam -use smithy.rules#endpointRuleSet -use smithy.rules#staticContextParams -use smithy.rules#endpointTests -use smithy.rules#operationContextParams - -@endpointRuleSet({ - "version": "1.3", - "parameters": { - "ParameterFoo": { - "type": "string", - "documentation": "docs" - }, - "ParameterBar": { - "type": "string", - "documentation": "docs" - } - "ParameterBaz": { - "type": "string", - "documentation": "docs" - } - }, - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "ParameterFoo" - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "ParameterBaz" // provided via jmespath - } - ] - } - ], - "endpoint": { - "url": "https://{ParameterBaz}.baz.amazonaws.com" - }, - "type": "endpoint" - } - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "ParameterBar" - } - ] - } - ], - "endpoint": { - "url": "https://{ParameterBar}.amazonaws.com" - }, - "type": "endpoint" - }, - { - "conditions": [] - "endpoint": { - "url": "https://{ParameterFoo}.amazonaws.com" - }, - "type": "endpoint" - } - ] - } - { - "type": "error", - "conditions": [], - "error": "No rule matched" - } - ] -}) -@endpointTests( - version: "1.0", - testCases: [ - { - "documentation": "context param" - "params": { - "ParameterFoo": "foo" - }, - "expect": { - "endpoint": { - "url": "https://foo.amazonaws.com" - } - } - "operationInputs": [ - { - "operationName": "GetResource" - "operationParams": {} - } - ] - } - { - "documentation": "grabs operation context param" - "params": { - "ParameterFoo": "foo" - "ParameterBar": "hello" - }, - "expect": { - "endpoint": { - "url": "https://hello.amazonaws.com" - } - } - "operationInputs": [ - { - "operationName": "GetResource" - "operationParams": { - "bar": "hello" - } - } - ] - } - { - "documentation": "falls back to last condition when no params were set" - "params": { - "ParameterFoo": "foo" - }, - "expect": { - "endpoint": { - "url": "https://foo.amazonaws.com" - } - } - "operationInputs": [ - { - "operationName": "GetResource" - "operationParams": {} - } - ] - } - { - "documentation": "uses jmespath context params" - "params": { - "ParameterFoo": "foo" // static context param - "ParameterBaz": "bbaz" // jmespath extraction - }, - "expect": { - "endpoint": { - "url": "https://bbaz.baz.amazonaws.com" - } - } - "operationInputs": [ - { - "operationName": "GetResource" - "operationParams": { - baz: { - bar: "bbaz" - } - } - } - ] - } - ] -) -service FizzBuzz { - operations: [GetResource] -} - -@staticContextParams("ParameterFoo": {value: "foo"}) -@operationContextParams( - ParameterBaz: { - path: "baz.bar" - } -) -operation GetResource { - input: GetResourceInput -} - -structure GetResourceInput { - @contextParam(name: "ParameterBar") - bar: String - - baz: Baz -} - -structure Baz { - bar: String -} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/substring.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/substring.smithy deleted file mode 100644 index 42d93b922..000000000 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/substring.smithy +++ /dev/null @@ -1,293 +0,0 @@ -$version: "2.0" - -namespace example - -use smithy.rules#clientContextParams -use smithy.rules#endpointRuleSet -use smithy.rules#endpointTests - -@endpointRuleSet({ - "parameters": { - "TestCaseId": { - "type": "string", - "required": true, - "documentation": "Test case id used to select the test case to use" - }, - "Input": { - "type": "string", - "required": true, - "documentation": "the input used to test substring" - } - }, - "rules": [ - { - "documentation": "Substring from beginning of input", - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "{TestCaseId}", - "1" - ] - }, - { - "fn": "substring", - "argv": [ - "{Input}", - 0, - 4, - false - ], - "assign": "output" - } - ], - "error": "The value is: `{output}`", - "type": "error" - }, - { - "documentation": "Substring from end of input", - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "{TestCaseId}", - "2" - ] - }, - { - "fn": "substring", - "argv": [ - "{Input}", - 0, - 4, - true - ], - "assign": "output" - } - ], - "error": "The value is: `{output}`", - "type": "error" - }, - { - "documentation": "Substring the middle of the string", - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "{TestCaseId}", - "3" - ] - }, - { - "fn": "substring", - "argv": [ - "{Input}", - 1, - 3, - false - ], - "assign": "output" - } - ], - "error": "The value is: `{output}`", - "type": "error" - }, - { - "documentation": "fallback when no tests match", - "conditions": [], - "error": "No tests matched", - "type": "error" - } - ], - "version": "1.3" -}) -@endpointTests( - version: "1.0", - testCases: [ - { - "documentation": "substring when string is long enough", - "params": { - "TestCaseId": "1", - "Input": "abcdefg" - }, - "expect": { - "error": "The value is: `abcd`" - } - }, - { - "documentation": "substring when string is exactly the right length", - "params": { - "TestCaseId": "1", - "Input": "abcd" - }, - "expect": { - "error": "The value is: `abcd`" - } - }, - { - "documentation": "substring when string is too short", - "params": { - "TestCaseId": "1", - "Input": "abc" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "substring when string is too short", - "params": { - "TestCaseId": "1", - "Input": "" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", - "params": { - "TestCaseId": "1", - "Input": "\ufdfd" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "unicode characters always return `None`", - "params": { - "TestCaseId": "1", - "Input": "abcdef\uD83D\uDC31" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "non-ascii cause substring to always return `None`", - "params": { - "TestCaseId": "1", - "Input": "abcdef\u0080" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "the full set of ascii is supported, including non-printable characters", - "params": { - "TestCaseId": "1", - "Input": "\u007Fabcdef" - }, - "expect": { - "error": "The value is: `\u007Fabc`" - } - }, - { - "documentation": "substring when string is long enough", - "params": { - "TestCaseId": "2", - "Input": "abcdefg" - }, - "expect": { - "error": "The value is: `defg`" - } - }, - { - "documentation": "substring when string is exactly the right length", - "params": { - "TestCaseId": "2", - "Input": "defg" - }, - "expect": { - "error": "The value is: `defg`" - } - }, - { - "documentation": "substring when string is too short", - "params": { - "TestCaseId": "2", - "Input": "abc" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "substring when string is too short", - "params": { - "TestCaseId": "2", - "Input": "" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", - "params": { - "TestCaseId": "2", - "Input": "\ufdfd" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "substring when string is longer", - "params": { - "TestCaseId": "3", - "Input": "defg" - }, - "expect": { - "error": "The value is: `ef`" - } - }, - { - "documentation": "substring when string is exact length", - "params": { - "TestCaseId": "3", - "Input": "def" - }, - "expect": { - "error": "The value is: `ef`" - } - }, - { - "documentation": "substring when string is too short", - "params": { - "TestCaseId": "3", - "Input": "ab" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "substring when string is too short", - "params": { - "TestCaseId": "3", - "Input": "" - }, - "expect": { - "error": "No tests matched" - } - }, - { - "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", - "params": { - "TestCaseId": "3", - "Input": "\ufdfd" - }, - "expect": { - "error": "No tests matched" - } - } - ] -) -@clientContextParams( - TestCaseId: {type: "string", documentation: "docs"} - Input: {type: "string", documentation: "docs"} -) -service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/uri-encode.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/uri-encode.smithy deleted file mode 100644 index 6d2ef57f6..000000000 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/uri-encode.smithy +++ /dev/null @@ -1,132 +0,0 @@ -$version: "2.0" - -namespace example - -use smithy.rules#clientContextParams -use smithy.rules#endpointRuleSet -use smithy.rules#endpointTests - -@endpointRuleSet({ - "version": "1.3", - "parameters": { - "TestCaseId": { - "type": "string", - "required": true, - "documentation": "Test case id used to select the test case to use" - }, - "Input": { - "type": "string", - "required": true, - "documentation": "The input used to test uriEncode" - } - }, - "rules": [ - { - "documentation": "uriEncode on input", - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "{TestCaseId}", - "1" - ] - }, - { - "fn": "uriEncode", - "argv": [ - "{Input}" - ], - "assign": "output" - } - ], - "error": "The value is: `{output}`", - "type": "error" - }, - { - "documentation": "fallback when no tests match", - "conditions": [], - "error": "No tests matched", - "type": "error" - } - ] -}) -@endpointTests( - version: "1.0", - testCases: [ - { - "documentation": "uriEncode when the string has nothing to encode returns the input", - "params": { - "TestCaseId": "1", - "Input": "abcdefg" - }, - "expect": { - "error": "The value is: `abcdefg`" - } - }, - { - "documentation": "uriEncode with single character to encode encodes only that character", - "params": { - "TestCaseId": "1", - "Input": "abc:defg" - }, - "expect": { - "error": "The value is: `abc%3Adefg`" - } - }, - { - "documentation": "uriEncode with all ASCII characters to encode encodes all characters", - "params": { - "TestCaseId": "1", - "Input": "/:,?#[]{}|@! $&'()*+;=%<>\"^`\\" - }, - "expect": { - "error": "The value is: `%2F%3A%2C%3F%23%5B%5D%7B%7D%7C%40%21%20%24%26%27%28%29%2A%2B%3B%3D%25%3C%3E%22%5E%60%5C`" - } - }, - { - "documentation": "uriEncode with ASCII characters that should not be encoded returns the input", - "params": { - "TestCaseId": "1", - "Input": "0123456789.underscore_dash-Tilda~" - }, - "expect": { - "error": "The value is: `0123456789.underscore_dash-Tilda~`" - } - }, - { - "documentation": "uriEncode encodes unicode characters", - "params": { - "TestCaseId": "1", - "Input": "\ud83d\ude39" - }, - "expect": { - "error": "The value is: `%F0%9F%98%B9`" - } - }, - { - "documentation": "uriEncode on all printable ASCII characters", - "params": { - "TestCaseId": "1", - "Input": " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" - }, - "expect": { - "error": "The value is: `%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~`" - } - }, - { - "documentation": "uriEncode on an empty string", - "params": { - "TestCaseId": "1", - "Input": "" - }, - "expect": { - "error": "The value is: ``" - } - } - ] -) -@clientContextParams( - TestCaseId: {type: "string", documentation: "Test case id used to select the test case to use"}, - Input: {type: "string", documentation: "The input used to test uriEncoder"} -) -service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/valid-hostlabel.smithy b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/valid-hostlabel.smithy deleted file mode 100644 index 41f17593f..000000000 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/runner/valid-hostlabel.smithy +++ /dev/null @@ -1,149 +0,0 @@ -$version: "2.0" - -namespace example - -use smithy.rules#clientContextParams -use smithy.rules#endpointRuleSet -use smithy.rules#endpointTests - -@endpointRuleSet({ - "parameters": { - "Region": { - "type": "string", - "required": true, - "documentation": "The region to dispatch this request, eg. `us-east-1`." - } - }, - "rules": [ - { - "documentation": "Template the region into the URI when region is set", - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "Region" - }, - false - ] - } - ], - "endpoint": { - "url": "https://{Region}.amazonaws.com" - }, - "type": "endpoint" - }, - { - "documentation": "Template the region into the URI when region is set", - "conditions": [ - { - "fn": "isValidHostLabel", - "argv": [ - { - "ref": "Region" - }, - true - ] - } - ], - "endpoint": { - "url": "https://{Region}-subdomains.amazonaws.com" - }, - "type": "endpoint" - }, - { - "documentation": "Region was not a valid host label", - "conditions": [], - "error": "Invalid hostlabel", - "type": "error" - } - ], - "version": "1.3" -}) -@endpointTests( - version: "1.0", - testCases: [ - { - "documentation": "standard region is a valid hostlabel", - "params": { - "Region": "us-east-1" - }, - "expect": { - "endpoint": { - "url": "https://us-east-1.amazonaws.com" - } - } - }, - { - "documentation": "starting with a number is a valid hostlabel", - "params": { - "Region": "3aws4" - }, - "expect": { - "endpoint": { - "url": "https://3aws4.amazonaws.com" - } - } - }, - { - "documentation": "when there are dots, only match if subdomains are allowed", - "params": { - "Region": "part1.part2" - }, - "expect": { - "endpoint": { - "url": "https://part1.part2-subdomains.amazonaws.com" - } - } - }, - { - "documentation": "a space is never a valid hostlabel", - "params": { - "Region": "part1 part2" - }, - "expect": { - "error": "Invalid hostlabel" - } - }, - { - "documentation": "an empty string is not a valid hostlabel", - "params": { - "Region": "" - }, - "expect": { - "error": "Invalid hostlabel" - } - }, - { - "documentation": "ending with a dot is not a valid hostlabel", - "params": { - "Region": "part1." - }, - "expect": { - "error": "Invalid hostlabel" - } - }, - { - "documentation": "multiple consecutive dots are not allowed", - "params": { - "Region": "part1..part2" - }, - "expect": { - "error": "Invalid hostlabel" - } - }, - { - "documentation": "labels cannot start with a dash", - "params": { - "Region": "part1.-part2" - }, - "expect": { - "error": "Invalid hostlabel" - } - } - ] -) -@clientContextParams( - Region: {type: "string", documentation: "docs"} -) -service FizzBuzz {} diff --git a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/substring.json b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/substring.json index b60ca0935..c9bdf0b4c 100644 --- a/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/substring.json +++ b/client/client-rulesengine/src/test/resources/software/amazon/smithy/java/client/rulesengine/substring.json @@ -1,4 +1,5 @@ { + "version": "1.1", "parameters": { "TestCaseId": { "type": "string", @@ -90,6 +91,5 @@ "error": "No tests matched", "type": "error" } - ], - "version": "1.3" + ] } diff --git a/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicOperation.java b/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicOperation.java index f758daf36..252fadcf1 100644 --- a/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicOperation.java +++ b/client/dynamic-client/src/main/java/software/amazon/smithy/java/dynamicclient/DynamicOperation.java @@ -51,8 +51,8 @@ public final class DynamicOperation implements ApiOperation T getMemberValue(Document container, Schema containerSchema, Schema member) { // Make sure it's part of the schema. - var value = SchemaUtils.validateMemberInSchema(containerSchema, member, - container.getMember(member.memberName())); + var value = SchemaUtils.validateMemberInSchema(containerSchema, + member, + container.getMember(member.memberName())); if (value == null) { return null; } diff --git a/server/server-proxy/src/main/java/software/amazon/smithy/java/server/ProxyService.java b/server/server-proxy/src/main/java/software/amazon/smithy/java/server/ProxyService.java index b6084b015..32baa4f18 100644 --- a/server/server-proxy/src/main/java/software/amazon/smithy/java/server/ProxyService.java +++ b/server/server-proxy/src/main/java/software/amazon/smithy/java/server/ProxyService.java @@ -15,7 +15,7 @@ import software.amazon.smithy.java.auth.api.identity.Identity; import software.amazon.smithy.java.auth.api.identity.IdentityResolver; import software.amazon.smithy.java.aws.client.core.settings.RegionSetting; -import software.amazon.smithy.java.client.core.CallContext; +import software.amazon.smithy.java.client.core.ClientContext; import software.amazon.smithy.java.client.core.RequestOverrideConfig; import software.amazon.smithy.java.client.core.auth.scheme.AuthSchemeResolver; import software.amazon.smithy.java.client.core.endpoint.EndpointResolver; @@ -70,7 +70,7 @@ private ProxyService(Builder builder) { clientBuilder.endpointResolver(EndpointResolver.staticEndpoint(builder.proxyEndpoint)); } if (builder.userAgentAppId != null) { - clientBuilder.putConfig(CallContext.APPLICATION_ID, builder.userAgentAppId); + clientBuilder.putConfig(ClientContext.APPLICATION_ID, builder.userAgentAppId); } if (builder.clientConfigurator != null) { clientBuilder = builder.clientConfigurator.apply(clientBuilder); From e33fb6f4c5990d0d8d82d0937b574a30e7e4d1a2 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Wed, 3 Sep 2025 16:35:07 -0500 Subject: [PATCH 11/13] Add SPLIT opcode, fix EndpointBddTrait namespace --- .../client/rulesengine/BytecodeCompiler.java | 10 +++++++- .../rulesengine/BytecodeDisassembler.java | 1 + .../client/rulesengine/BytecodeEvaluator.java | 10 ++++++++ .../rulesengine/EndpointRulesPlugin.java | 2 +- .../java/client/rulesengine/Opcodes.java | 9 +++++++ .../rulesengine/RulesEngineBuilder.java | 2 +- .../rulesengine/BytecodeCompilerTest.java | 2 +- .../rulesengine/BytecodeEvaluatorTest.java | 24 +++++++++++++++++++ .../rulesengine/EndpointRulesPluginTest.java | 2 +- 9 files changed, 57 insertions(+), 5 deletions(-) diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java index aeddfdd1f..cbc4106a5 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompiler.java @@ -32,7 +32,7 @@ import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; import software.amazon.smithy.rulesengine.logic.bdd.Bdd; import software.amazon.smithy.rulesengine.logic.bdd.BddNodeConsumer; -import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; +import software.amazon.smithy.rulesengine.traits.EndpointBddTrait; final class BytecodeCompiler { @@ -304,6 +304,14 @@ public Void visitLibraryFunction(FunctionDefinition fn, List args) { writer.writeByte(Opcodes.URI_ENCODE); return null; } + case "split" -> { + // Compile all three arguments (string, delimiter, limit) + compileExpression(args.get(0)); + compileExpression(args.get(1)); + compileExpression(args.get(2)); + writer.writeByte(Opcodes.SPLIT); + return null; + } } // A generic function call without a special opcode diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java index cae9b7e1d..0882e7b1c 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java @@ -80,6 +80,7 @@ final class BytecodeDisassembler { Map.entry(Opcodes.IS_VALID_HOST_LABEL, new InstructionDef("IS_VALID_HOST_LABEL", OperandType.NONE)), Map.entry(Opcodes.PARSE_URL, new InstructionDef("PARSE_URL", OperandType.NONE)), Map.entry(Opcodes.URI_ENCODE, new InstructionDef("URI_ENCODE", OperandType.NONE)), + Map.entry(Opcodes.SPLIT, new InstructionDef("SPLIT", OperandType.NONE)), // Return operations Map.entry(Opcodes.RETURN_ERROR, new InstructionDef("RETURN_ERROR", OperandType.NONE)), diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java index 999624bc4..b728edcec 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluator.java @@ -18,6 +18,7 @@ import software.amazon.smithy.java.io.uri.URLEncoding; import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.IsValidHostLabel; import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.ParseUrl; +import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Split; import software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring; import software.amazon.smithy.rulesengine.logic.ConditionEvaluator; @@ -381,6 +382,15 @@ private Object run(int start) { stackPosition--; // Pop the null value } } + case Opcodes.SPLIT -> { + // Pops 3, pushes 1 + int idx = stackPosition - 3; + var string = (String) stack[idx]; + var delimiter = (String) stack[idx + 1]; + var limit = ((Number) stack[idx + 2]).intValue(); + stack[idx] = Split.split(string, delimiter, limit); + stackPosition = idx + 1; + } default -> throw new RulesEvaluationError("Unknown rules engine instruction: " + opcode, pc); } } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java index fc7135b91..8c383eca6 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPlugin.java @@ -14,8 +14,8 @@ import software.amazon.smithy.java.context.Context; import software.amazon.smithy.java.core.schema.TraitKey; import software.amazon.smithy.java.logging.InternalLogger; -import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; import software.amazon.smithy.rulesengine.traits.ContextParamTrait; +import software.amazon.smithy.rulesengine.traits.EndpointBddTrait; import software.amazon.smithy.rulesengine.traits.EndpointRuleSetTrait; import software.amazon.smithy.rulesengine.traits.OperationContextParamsTrait; import software.amazon.smithy.rulesengine.traits.StaticContextParamsTrait; diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java index 4fe59c92c..92b806a3c 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Opcodes.java @@ -413,4 +413,13 @@ private Opcodes() {} *

    JNN_OR_POP [offset:ushort] */ public static final byte JNN_OR_POP = 42; + + /** + * Pop a string, delimiter, and limit from the stack and push the split result. + * + *

    Stack: [..., string, delimiter, limit] => [..., list] + * + *

    SPLIT + */ + public static final byte SPLIT = 41; } diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java index f8936557f..27e4cb5d0 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RulesEngineBuilder.java @@ -17,7 +17,7 @@ import java.util.ServiceLoader; import java.util.function.Function; import software.amazon.smithy.java.context.Context; -import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; +import software.amazon.smithy.rulesengine.traits.EndpointBddTrait; /** * Compiles and loads a rules engine used to resolve endpoints based on Smithy's rules engine traits. diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java index b0e272757..6cf9a17c5 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java @@ -41,7 +41,7 @@ import software.amazon.smithy.rulesengine.language.syntax.rule.NoMatchRule; import software.amazon.smithy.rulesengine.language.syntax.rule.Rule; import software.amazon.smithy.rulesengine.logic.bdd.Bdd; -import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; +import software.amazon.smithy.rulesengine.traits.EndpointBddTrait; class BytecodeCompilerTest { diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluatorTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluatorTest.java index 3b0c9b172..e3ac79754 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluatorTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeEvaluatorTest.java @@ -744,6 +744,30 @@ void testUriEncode() { evaluator.test(0); } + @Test + void testSplitWithLimit() { + writer.markConditionStart(); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("a--b--c--d")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("--")); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex(2)); + writer.writeByte(Opcodes.SPLIT); + // Get the second element (should be "b--c--d") + writer.writeByte(Opcodes.GET_INDEX); + writer.writeByte(1); + writer.writeByte(Opcodes.LOAD_CONST); + writer.writeByte(writer.getConstantIndex("b--c--d")); + writer.writeByte(Opcodes.STRING_EQUALS); + writer.writeByte(Opcodes.RETURN_VALUE); + + bytecode = buildBytecode(); + evaluator = createEvaluator(bytecode); + + assertTrue(evaluator.test(0)); + } + private BytecodeEvaluator createEvaluator(Bytecode bytecode) { RegisterFiller filler = RegisterFiller.of(bytecode, Collections.emptyMap()); BytecodeEvaluator eval = new BytecodeEvaluator(bytecode, new RulesExtension[0], filler); diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java index 6531dab49..a0eef3ab4 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/EndpointRulesPluginTest.java @@ -25,8 +25,8 @@ import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.model.traits.Trait; import software.amazon.smithy.rulesengine.language.EndpointRuleSet; -import software.amazon.smithy.rulesengine.logic.bdd.EndpointBddTrait; import software.amazon.smithy.rulesengine.logic.cfg.Cfg; +import software.amazon.smithy.rulesengine.traits.EndpointBddTrait; import software.amazon.smithy.utils.IoUtils; public class EndpointRulesPluginTest { From 3c79d41296a5d76078cb4e5d2ce0855d30bafe14 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Fri, 5 Sep 2025 14:24:44 -0500 Subject: [PATCH 12/13] Use rolling bytecode version, address PR Instead of a major.minor version in the bytecode, we can just use a simpler approach of a rolling bytecode version, and more simply the version of the implementation has to be >= the version in the loaded bytecode. --- .../client/core/endpoint/EndpointImpl.java | 5 ++- .../java/client/rulesengine/Bytecode.java | 37 ++++++++++++++++++- .../rulesengine/BytecodeDisassembler.java | 1 + .../client/rulesengine/BytecodeReader.java | 4 ++ .../client/rulesengine/BytecodeWriter.java | 4 +- .../client/rulesengine/RegisterFiller.java | 2 +- .../rulesengine/RulesEngineBuilder.java | 35 +++++++++--------- 7 files changed, 64 insertions(+), 24 deletions(-) diff --git a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointImpl.java b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointImpl.java index 11da6cad2..aad0e0e56 100644 --- a/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointImpl.java +++ b/client/client-core/src/main/java/software/amazon/smithy/java/client/core/endpoint/EndpointImpl.java @@ -8,6 +8,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -23,8 +24,8 @@ final class EndpointImpl implements Endpoint { private EndpointImpl(Builder builder) { this.uri = Objects.requireNonNull(builder.uri); - this.authSchemes = builder.authSchemes == null ? List.of() : builder.authSchemes; - this.properties = builder.properties == null ? Map.of() : builder.properties; + this.authSchemes = builder.authSchemes == null ? List.of() : Collections.unmodifiableList(builder.authSchemes); + this.properties = builder.properties == null ? Map.of() : Collections.unmodifiableMap(builder.properties); // Clear out the builder, making this class immutable and the builder still reusable. builder.authSchemes = null; builder.properties = null; diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java index 2b29ca774..f01326349 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/Bytecode.java @@ -30,7 +30,7 @@ * Offset Size Description * ------ ---- ----------- * 0 4 Magic number (0x52554C45 = "RULE") - * 4 2 Version (major.minor, currently 0x0101 = 1.1) + * 4 2 Version (rolling version number, currently 1) * 6 2 Condition count (unsigned short) * 8 2 Result count (unsigned short) * 10 2 Register count (unsigned short) @@ -152,7 +152,7 @@ public final class Bytecode { static final int MAGIC = 0x52554C45; // "RULE" - static final short VERSION = 0x0101; // 1.1 + static final short VERSION = 1; static final byte CONST_NULL = 0; static final byte CONST_STRING = 1; static final byte CONST_INTEGER = 2; @@ -160,6 +160,7 @@ public final class Bytecode { static final byte CONST_LIST = 4; static final byte CONST_MAP = 5; + private final short version; private final byte[] bytecode; private final int[] conditionOffsets; private final int[] resultOffsets; @@ -187,6 +188,28 @@ public final class Bytecode { RulesFunction[] functions, int[] bddNodes, int bddRootRef + ) { + this(bytecode, + conditionOffsets, + resultOffsets, + registerDefinitions, + constantPool, + functions, + bddNodes, + bddRootRef, + VERSION); + } + + Bytecode( + byte[] bytecode, + int[] conditionOffsets, + int[] resultOffsets, + RegisterDefinition[] registerDefinitions, + Object[] constantPool, + RulesFunction[] functions, + int[] bddNodes, + int bddRootRef, + short version ) { if (bddNodes.length % 3 != 0) { throw new IllegalArgumentException("BDD nodes length must be multiple of 3, got: " + bddNodes.length); @@ -205,6 +228,16 @@ public final class Bytecode { this.builtinIndices = findBuiltinIndices(registerDefinitions); this.hardRequiredIndices = findRequiredIndicesWithoutDefaultsOrBuiltins(registerDefinitions); this.inputRegisterMap = createInputRegisterMap(registerDefinitions); + this.version = version; + } + + /** + * Get the bytecode version. + * + * @return bytecode version number. + */ + public short getVersion() { + return version; } /** diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java index 0882e7b1c..32754eaf5 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java @@ -139,6 +139,7 @@ String disassemble() { StringBuilder s = new StringBuilder(); s.append("=== Bytecode Program ===\n"); + s.append("Version: ").append(bytecode.getVersion()).append("\n"); s.append("Conditions: ").append(bytecode.getConditionCount()).append("\n"); s.append("Results: ").append(bytecode.getResultCount()).append("\n"); s.append("Registers: ").append(bytecode.getRegisterDefinitions().length).append("\n"); diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java index 33e3e23eb..affa6b2b3 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeReader.java @@ -40,6 +40,10 @@ short readShort() { return (short) value; } + int readUnsignedShort() { + return readShort() & 0xFFFF; + } + int readInt() { checkBounds(4); int value = (data[offset] & 0xFF) << 24; diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java index 76f5a098e..41baeb89e 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWriter.java @@ -18,7 +18,7 @@ * Builds up bytecode incrementally. */ final class BytecodeWriter { - private static final int MAX_CONSTANTS = 65536; + private static final int MAX_CONSTANTS = 0xFFFF + 1; private final ByteArrayOutputStream bytecodeStream = new ByteArrayOutputStream(); private final List conditionOffsets = new ArrayList<>(); @@ -45,7 +45,7 @@ void writeByte(int value) { } void writeShort(int value) { - if (value < 0 || value > 65535) { + if (value < 0 || value > 0xFFFF) { throw new IllegalArgumentException("Value out of range for unsigned short: " + value); } bytecodeStream.write((value >> 8) & 0xFF); diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java index 4164edba9..c10e4053e 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/RegisterFiller.java @@ -108,7 +108,7 @@ static RegisterFiller of(Bytecode bytecode, Map extensions = new ArrayList<>(); private final Map functions = new LinkedHashMap<>(); private final Map> builtinProviders = new HashMap<>(); @@ -138,25 +144,19 @@ public Bytecode load(byte[] data) { } short version = reader.readShort(); - if (version != Bytecode.VERSION) { - int major = (version >> 8) & 0xFF; - int minor = version & 0xFF; - int expectedMajor = (Bytecode.VERSION >> 8) & 0xFF; - int expectedMinor = Bytecode.VERSION & 0xFF; + if (version > Bytecode.VERSION) { throw new IllegalArgumentException(String.format( - "Unsupported bytecode version: %d.%d (expected %d.%d)", - major, - minor, - expectedMajor, - expectedMinor)); + "Unsupported bytecode version: %d (maximum supported: %d)", + version, + Bytecode.VERSION)); } // Read counts - int conditionCount = reader.readShort() & 0xFFFF; - int resultCount = reader.readShort() & 0xFFFF; - int registerCount = reader.readShort() & 0xFFFF; - int constantCount = reader.readShort() & 0xFFFF; - int functionCount = reader.readShort() & 0xFFFF; + int conditionCount = reader.readUnsignedShort(); + int resultCount = reader.readUnsignedShort(); + int registerCount = reader.readUnsignedShort(); + int constantCount = reader.readUnsignedShort(); + int functionCount = reader.readUnsignedShort(); int bddNodeCount = reader.readInt(); int bddRootRef = reader.readInt(); @@ -172,7 +172,7 @@ public Bytecode load(byte[] data) { int bddTableOffset = reader.readInt(); // Validate offsets are within bounds and in expected order - if (conditionTableOffset < 44 + if (conditionTableOffset < BYTECODE_HEADER_SIZE || conditionTableOffset > data.length || resultTableOffset < conditionTableOffset || resultTableOffset > data.length @@ -253,7 +253,8 @@ public Bytecode load(byte[] data) { constantPool, resolvedFunctions, bddNodes, - bddRootRef); + bddRootRef, + version); } private RulesFunction[] loadFunctions(BytecodeReader reader, int count) { From 0af577e51e96e4a12bcd438eed238a753e0b57f1 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Fri, 5 Sep 2025 15:02:54 -0500 Subject: [PATCH 13/13] Add BytecodeWalker to simplify traversal --- .../rulesengine/BytecodeDisassembler.java | 373 +++++++----------- .../client/rulesengine/BytecodeWalker.java | 180 +++++++++ .../rulesengine/BytecodeCompilerTest.java | 34 +- .../rulesengine/BytecodeDisassemblerTest.java | 23 -- .../rulesengine/BytecodeWalkerTest.java | 136 +++++++ 5 files changed, 476 insertions(+), 270 deletions(-) create mode 100644 client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWalker.java create mode 100644 client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeWalkerTest.java diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java index 32754eaf5..6270b6e85 100644 --- a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassembler.java @@ -6,126 +6,97 @@ package software.amazon.smithy.java.client.rulesengine; import java.io.StringWriter; -import java.util.HashMap; import java.util.List; import java.util.Map; import software.amazon.smithy.rulesengine.logic.bdd.BddFormatter; -/** - * Provides a human-readable representation of a Bytecode program. - */ final class BytecodeDisassembler { private static final Map INSTRUCTION_DEFS = Map.ofEntries( // Basic stack operations - Map.entry(Opcodes.LOAD_CONST, new InstructionDef("LOAD_CONST", OperandType.BYTE, Show.CONST)), - Map.entry(Opcodes.LOAD_CONST_W, new InstructionDef("LOAD_CONST_W", OperandType.SHORT, Show.CONST)), - Map.entry(Opcodes.SET_REGISTER, new InstructionDef("SET_REGISTER", OperandType.BYTE, Show.REGISTER)), - Map.entry(Opcodes.LOAD_REGISTER, new InstructionDef("LOAD_REGISTER", OperandType.BYTE, Show.REGISTER)), + Map.entry(Opcodes.LOAD_CONST, new InstructionDef("LOAD_CONST", Show.CONST)), + Map.entry(Opcodes.LOAD_CONST_W, new InstructionDef("LOAD_CONST_W", Show.CONST)), + Map.entry(Opcodes.SET_REGISTER, new InstructionDef("SET_REGISTER", Show.REGISTER)), + Map.entry(Opcodes.LOAD_REGISTER, new InstructionDef("LOAD_REGISTER", Show.REGISTER)), // Boolean operations - Map.entry(Opcodes.NOT, new InstructionDef("NOT", OperandType.NONE)), - Map.entry(Opcodes.ISSET, new InstructionDef("ISSET", OperandType.NONE)), - Map.entry(Opcodes.TEST_REGISTER_ISSET, - new InstructionDef("TEST_REGISTER_ISSET", OperandType.BYTE, Show.REGISTER)), - Map.entry(Opcodes.TEST_REGISTER_NOT_SET, - new InstructionDef("TEST_REGISTER_NOT_SET", OperandType.BYTE, Show.REGISTER)), + Map.entry(Opcodes.NOT, new InstructionDef("NOT")), + Map.entry(Opcodes.ISSET, new InstructionDef("ISSET")), + Map.entry(Opcodes.TEST_REGISTER_ISSET, new InstructionDef("TEST_REGISTER_ISSET", Show.REGISTER)), + Map.entry(Opcodes.TEST_REGISTER_NOT_SET, new InstructionDef("TEST_REGISTER_NOT_SET", Show.REGISTER)), // List operations - Map.entry(Opcodes.LIST0, new InstructionDef("LIST0", OperandType.NONE)), - Map.entry(Opcodes.LIST1, new InstructionDef("LIST1", OperandType.NONE)), - Map.entry(Opcodes.LIST2, new InstructionDef("LIST2", OperandType.NONE)), - Map.entry(Opcodes.LISTN, new InstructionDef("LISTN", OperandType.BYTE, Show.NUMBER)), + Map.entry(Opcodes.LIST0, new InstructionDef("LIST0")), + Map.entry(Opcodes.LIST1, new InstructionDef("LIST1")), + Map.entry(Opcodes.LIST2, new InstructionDef("LIST2")), + Map.entry(Opcodes.LISTN, new InstructionDef("LISTN", Show.NUMBER)), // Map operations - Map.entry(Opcodes.MAP0, new InstructionDef("MAP0", OperandType.NONE)), - Map.entry(Opcodes.MAP1, new InstructionDef("MAP1", OperandType.NONE)), - Map.entry(Opcodes.MAP2, new InstructionDef("MAP2", OperandType.NONE)), - Map.entry(Opcodes.MAP3, new InstructionDef("MAP3", OperandType.NONE)), - Map.entry(Opcodes.MAP4, new InstructionDef("MAP4", OperandType.NONE)), - Map.entry(Opcodes.MAPN, new InstructionDef("MAPN", OperandType.BYTE, Show.NUMBER)), + Map.entry(Opcodes.MAP0, new InstructionDef("MAP0")), + Map.entry(Opcodes.MAP1, new InstructionDef("MAP1")), + Map.entry(Opcodes.MAP2, new InstructionDef("MAP2")), + Map.entry(Opcodes.MAP3, new InstructionDef("MAP3")), + Map.entry(Opcodes.MAP4, new InstructionDef("MAP4")), + Map.entry(Opcodes.MAPN, new InstructionDef("MAPN", Show.NUMBER)), // Template operation - Map.entry(Opcodes.RESOLVE_TEMPLATE, new InstructionDef("RESOLVE_TEMPLATE", OperandType.BYTE, Show.NUMBER)), + Map.entry(Opcodes.RESOLVE_TEMPLATE, new InstructionDef("RESOLVE_TEMPLATE", Show.ARG_COUNT)), - // Function operations (19-23) - Map.entry(Opcodes.FN0, new InstructionDef("FN0", OperandType.BYTE, Show.FN)), - Map.entry(Opcodes.FN1, new InstructionDef("FN1", OperandType.BYTE, Show.FN)), - Map.entry(Opcodes.FN2, new InstructionDef("FN2", OperandType.BYTE, Show.FN)), - Map.entry(Opcodes.FN3, new InstructionDef("FN3", OperandType.BYTE, Show.FN)), - Map.entry(Opcodes.FN, new InstructionDef("FN", OperandType.BYTE, Show.FN)), + // Function operations + Map.entry(Opcodes.FN0, new InstructionDef("FN0", Show.FN)), + Map.entry(Opcodes.FN1, new InstructionDef("FN1", Show.FN)), + Map.entry(Opcodes.FN2, new InstructionDef("FN2", Show.FN)), + Map.entry(Opcodes.FN3, new InstructionDef("FN3", Show.FN)), + Map.entry(Opcodes.FN, new InstructionDef("FN", Show.FN)), // Property access operations - Map.entry(Opcodes.GET_PROPERTY, new InstructionDef("GET_PROPERTY", OperandType.SHORT, Show.CONST)), - Map.entry(Opcodes.GET_INDEX, new InstructionDef("GET_INDEX", OperandType.BYTE, Show.NUMBER)), - Map.entry(Opcodes.GET_PROPERTY_REG, - new InstructionDef("GET_PROPERTY_REG", OperandType.BYTE_SHORT, Show.REG_PROPERTY)), - Map.entry(Opcodes.GET_INDEX_REG, - new InstructionDef("GET_INDEX_REG", OperandType.TWO_BYTES, Show.REG_INDEX)), + Map.entry(Opcodes.GET_PROPERTY, new InstructionDef("GET_PROPERTY", Show.PROPERTY)), + Map.entry(Opcodes.GET_INDEX, new InstructionDef("GET_INDEX", Show.NUMBER)), + Map.entry(Opcodes.GET_PROPERTY_REG, new InstructionDef("GET_PROPERTY_REG", Show.REG_PROPERTY)), + Map.entry(Opcodes.GET_INDEX_REG, new InstructionDef("GET_INDEX_REG", Show.REG_INDEX)), // Boolean test operations - Map.entry(Opcodes.IS_TRUE, new InstructionDef("IS_TRUE", OperandType.NONE)), - Map.entry(Opcodes.TEST_REGISTER_IS_TRUE, - new InstructionDef("TEST_REGISTER_IS_TRUE", OperandType.BYTE, Show.REGISTER)), - Map.entry(Opcodes.TEST_REGISTER_IS_FALSE, - new InstructionDef("TEST_REGISTER_IS_FALSE", OperandType.BYTE, Show.REGISTER)), + Map.entry(Opcodes.IS_TRUE, new InstructionDef("IS_TRUE")), + Map.entry(Opcodes.TEST_REGISTER_IS_TRUE, new InstructionDef("TEST_REGISTER_IS_TRUE", Show.REGISTER)), + Map.entry(Opcodes.TEST_REGISTER_IS_FALSE, new InstructionDef("TEST_REGISTER_IS_FALSE", Show.REGISTER)), // Comparison operations - Map.entry(Opcodes.EQUALS, new InstructionDef("EQUALS", OperandType.NONE)), - Map.entry(Opcodes.STRING_EQUALS, new InstructionDef("STRING_EQUALS", OperandType.NONE)), - Map.entry(Opcodes.BOOLEAN_EQUALS, new InstructionDef("BOOLEAN_EQUALS", OperandType.NONE)), + Map.entry(Opcodes.EQUALS, new InstructionDef("EQUALS")), + Map.entry(Opcodes.STRING_EQUALS, new InstructionDef("STRING_EQUALS")), + Map.entry(Opcodes.BOOLEAN_EQUALS, new InstructionDef("BOOLEAN_EQUALS")), // String operations - Map.entry(Opcodes.SUBSTRING, new InstructionDef("SUBSTRING", OperandType.THREE_BYTES, Show.SUBSTRING)), - Map.entry(Opcodes.IS_VALID_HOST_LABEL, new InstructionDef("IS_VALID_HOST_LABEL", OperandType.NONE)), - Map.entry(Opcodes.PARSE_URL, new InstructionDef("PARSE_URL", OperandType.NONE)), - Map.entry(Opcodes.URI_ENCODE, new InstructionDef("URI_ENCODE", OperandType.NONE)), - Map.entry(Opcodes.SPLIT, new InstructionDef("SPLIT", OperandType.NONE)), + Map.entry(Opcodes.SUBSTRING, new InstructionDef("SUBSTRING", Show.SUBSTRING)), + Map.entry(Opcodes.IS_VALID_HOST_LABEL, new InstructionDef("IS_VALID_HOST_LABEL")), + Map.entry(Opcodes.PARSE_URL, new InstructionDef("PARSE_URL")), + Map.entry(Opcodes.URI_ENCODE, new InstructionDef("URI_ENCODE")), + Map.entry(Opcodes.SPLIT, new InstructionDef("SPLIT")), // Return operations - Map.entry(Opcodes.RETURN_ERROR, new InstructionDef("RETURN_ERROR", OperandType.NONE)), - Map.entry(Opcodes.RETURN_ENDPOINT, - new InstructionDef("RETURN_ENDPOINT", OperandType.BYTE, Show.ENDPOINT_FLAGS)), - Map.entry(Opcodes.RETURN_VALUE, new InstructionDef("RETURN_VALUE", OperandType.NONE)), + Map.entry(Opcodes.RETURN_ERROR, new InstructionDef("RETURN_ERROR")), + Map.entry(Opcodes.RETURN_ENDPOINT, new InstructionDef("RETURN_ENDPOINT", Show.ENDPOINT_FLAGS)), + Map.entry(Opcodes.RETURN_VALUE, new InstructionDef("RETURN_VALUE")), // Control flow - Map.entry(Opcodes.JNN_OR_POP, new InstructionDef("JNN_OR_POP", OperandType.SHORT, Show.JUMP_OFFSET))); - - // Enum to define operand types - private enum OperandType { - NONE(0), - BYTE(1), - SHORT(2), - TWO_BYTES(2), - BYTE_SHORT(3), - THREE_BYTES(3); - - private final int byteCount; - - OperandType(int byteCount) { - this.byteCount = byteCount; - } - } + Map.entry(Opcodes.JNN_OR_POP, new InstructionDef("JNN_OR_POP", Show.JUMP_OFFSET))); private enum Show { - CONST, FN, REGISTER, NUMBER, ENDPOINT_FLAGS, SUBSTRING, REG_PROPERTY, REG_INDEX, JUMP_OFFSET + CONST, + FN, + REGISTER, + NUMBER, + ENDPOINT_FLAGS, + SUBSTRING, + REG_PROPERTY, + REG_INDEX, + JUMP_OFFSET, + PROPERTY, + ARG_COUNT } - // Instruction definition class - private record InstructionDef(String name, OperandType operandType, Show show) { - InstructionDef(String name, OperandType operandType) { - this(name, operandType, null); - } - } - - // Result class for operand parsing - private record OperandResult(int value, int nextPc, int secondValue, int thirdValue) { - OperandResult(int value, int nextPc) { - this(value, nextPc, -1, -1); - } - - OperandResult(int value, int nextPc, int secondValue) { - this(value, nextPc, secondValue, -1); + private record InstructionDef(String name, Show show) { + InstructionDef(String name) { + this(name, null); } } @@ -148,19 +119,6 @@ String disassemble() { s.append("BDD Nodes: ").append(bytecode.getBddNodes().length / 3).append("\n"); s.append("BDD Root: ").append(BddFormatter.formatReference(bytecode.getBddRootRef())).append("\n"); - Map instructionCounts = countInstructions(); - if (!instructionCounts.isEmpty()) { - s.append("\nInstruction counts: "); - instructionCounts.entrySet() - .stream() - .sorted(Map.Entry.comparingByValue().reversed()) - .limit(10) // Top 10 most common - .forEach(e -> s.append(e.getKey()).append("(").append(e.getValue()).append(") ")); - s.append("\n"); - } - s.append("\n"); - - // Functions if (bytecode.getFunctions().length > 0) { s.append("=== Functions ===\n"); int i = 0; @@ -173,7 +131,6 @@ String disassemble() { s.append("\n"); } - // Registers if (bytecode.getRegisterDefinitions().length > 0) { s.append("=== Registers ===\n"); int i = 0; @@ -194,7 +151,6 @@ String disassemble() { s.append("\n"); } - // BDD Structure if (bytecode.getBddNodes().length > 0) { s.append("=== BDD Structure ===\n"); @@ -204,14 +160,12 @@ String disassemble() { formatter.format(); s.append(sw); } catch (Exception e) { - // Fallback if formatting fails s.append("Error formatting BDD nodes: ").append(e.getMessage()).append("\n"); } s.append("\n"); } - // Constants if (bytecode.getConstantPoolCount() > 0) { s.append("=== Constant Pool ===\n"); for (int i = 0; i < bytecode.getConstantPoolCount(); i++) { @@ -221,24 +175,22 @@ String disassemble() { s.append("\n"); } - // Conditions if (bytecode.getConditionCount() > 0) { s.append("=== Conditions ===\n"); for (int i = 0; i < bytecode.getConditionCount(); i++) { s.append(String.format("Condition %d:%n", i)); int startOffset = bytecode.getConditionStartOffset(i); - disassembleSection(s, startOffset, Integer.MAX_VALUE, " "); + disassembleSection(s, startOffset, " "); s.append("\n"); } } - // Results if (bytecode.getResultCount() > 0) { s.append("=== Results ===\n"); for (int i = 0; i < bytecode.getResultCount(); i++) { s.append(String.format("Result %d:%n", i)); int startOffset = bytecode.getResultOffset(i); - disassembleSection(s, startOffset, Integer.MAX_VALUE, " "); + disassembleSection(s, startOffset, " "); s.append("\n"); } } @@ -246,160 +198,124 @@ String disassemble() { return s.toString(); } - private Map countInstructions() { - Map counts = new HashMap<>(); - byte[] instructions = bytecode.getBytecode(); - - int pc = 0; - while (pc < instructions.length) { - byte opcode = instructions[pc]; - InstructionDef def = INSTRUCTION_DEFS.get(opcode); - if (def == null) { - break; // Unknown instruction - } - - counts.merge(def.name(), 1, Integer::sum); - - // Skip operands - pc += 1 + def.operandType().byteCount; - } - - return counts; - } - - private void disassembleSection(StringBuilder s, int startOffset, int endOffset, String indent) { - byte[] instructions = bytecode.getBytecode(); + private void disassembleSection(StringBuilder s, int startOffset, String indent) { + BytecodeWalker walker = new BytecodeWalker(bytecode.getBytecode(), startOffset); - if (startOffset >= instructions.length) { + if (!walker.hasNext()) { s.append(indent).append("(section starts beyond bytecode end)\n"); return; } - for (int pc = startOffset; pc < endOffset && pc < instructions.length;) { - // Check if this is a return opcode - byte opcode = instructions[pc]; - - int nextPc = writeInstruction(s, pc, indent); - if (nextPc < 0) { + while (walker.hasNext()) { + writeInstruction(s, walker, indent); + if (walker.isReturnOpcode()) { break; } - - pc = nextPc; - - // Stop after return instructions - if (opcode == Opcodes.RETURN_VALUE || opcode == Opcodes.RETURN_ENDPOINT || opcode == Opcodes.RETURN_ERROR) { + if (!walker.advance()) { break; } } } - private int writeInstruction(StringBuilder s, int pc, String indent) { - byte[] instructions = bytecode.getBytecode(); - - // instruction address + private void writeInstruction(StringBuilder s, BytecodeWalker walker, String indent) { + int pc = walker.getPosition(); + byte opcode = walker.currentOpcode(); s.append(indent).append(String.format("%04d: ", pc)); - byte opcode = instructions[pc]; InstructionDef def = INSTRUCTION_DEFS.get(opcode); - - // Handle unknown instruction if (def == null) { s.append(String.format("UNKNOWN_OPCODE(0x%02X)%n", opcode)); - return -1; + return; } s.append(String.format("%-22s", def.name())); - // Parse operands based on type - OperandResult operandResult = parseOperands(s, pc, def.operandType(), instructions); - int nextPc = operandResult.nextPc(); - int displayValue = operandResult.value(); - int secondValue = operandResult.secondValue(); - int thirdValue = operandResult.thirdValue(); + // Format operands + int operandCount = walker.getOperandCount(); + if (operandCount > 0) { + s.append(" "); + for (int i = 0; i < operandCount; i++) { + if (i > 0) { + s.append(walker.getInstructionLength() == 4 ? " " : ""); + } + int value = walker.getOperand(i); + // Format based on operand width + if (opcode == Opcodes.LOAD_CONST_W || opcode == Opcodes.GET_PROPERTY + || + opcode == Opcodes.JNN_OR_POP + || (opcode == Opcodes.GET_PROPERTY_REG && i == 1) + || + (opcode == Opcodes.RESOLVE_TEMPLATE && i == 1)) { + s.append(String.format("%5d", value)); + } else { + s.append(String.format("%3d", value)); + } + } + } - // Add symbolic information if available + // Add symbolic information if (def.show() != null) { s.append(" ; "); - appendSymbolicInfo(s, pc, displayValue, secondValue, thirdValue, def.show, instructions); + appendSymbolicInfo(s, walker, def.show()); } s.append("\n"); - return nextPc; } - private OperandResult parseOperands(StringBuilder s, int pc, OperandType type, byte[] instructions) { - return switch (type) { - case NONE -> new OperandResult(-1, pc + 1); - case BYTE -> { - int value = appendByte(s, pc, instructions); - yield new OperandResult(value, pc + 2); - } - case SHORT, TWO_BYTES -> { - int value = appendShort(s, pc, instructions); - yield new OperandResult(value, pc + 3); - } - case BYTE_SHORT -> { - s.append(" "); - int b1 = appendByte(s, pc, instructions); - int b2 = appendShort(s, pc + 1, instructions); - yield new OperandResult(b1, pc + 4, b2); - } - case THREE_BYTES -> { - s.append(" "); - int b1 = appendByte(s, pc, instructions); - int b2 = appendByte(s, pc + 1, instructions); - int b3 = appendByte(s, pc + 2, instructions); - yield new OperandResult(b1, pc + 4, b2, b3); - } - }; - } - - private void appendSymbolicInfo( - StringBuilder s, - int pc, - int value, - int secondValue, - int thirdValue, - Show show, - byte[] instructions - ) { + private void appendSymbolicInfo(StringBuilder s, BytecodeWalker walker, Show show) { switch (show) { case CONST -> { - if (value >= 0 && value < bytecode.getConstantPoolCount()) { - s.append(formatConstant(bytecode.getConstant(value))); + int index = walker.getOperandCount() == 1 ? walker.getOperand(0) : -1; + if (index >= 0 && index < bytecode.getConstantPoolCount()) { + s.append(formatConstant(bytecode.getConstant(index))); } } case FN -> { - if (value >= 0 && value < bytecode.getFunctions().length) { - var fn = bytecode.getFunctions()[value]; + int index = walker.getOperand(0); + if (index >= 0 && index < bytecode.getFunctions().length) { + var fn = bytecode.getFunctions()[index]; s.append(fn.getFunctionName()).append("(").append(fn.getArgumentCount()).append(" args)"); } } case REGISTER -> { - if (value >= 0 && value < bytecode.getRegisterDefinitions().length) { - s.append(bytecode.getRegisterDefinitions()[value].name()); + int index = walker.getOperand(0); + if (index >= 0 && index < bytecode.getRegisterDefinitions().length) { + s.append(bytecode.getRegisterDefinitions()[index].name()); } } - case NUMBER -> s.append(value); + case NUMBER -> s.append(walker.getOperand(0)); + case ARG_COUNT -> s.append("args=").append(walker.getOperand(0)); case ENDPOINT_FLAGS -> { - boolean hasHeaders = (value & 1) != 0; - boolean hasProperties = (value & 2) != 0; + int flags = walker.getOperand(0); + boolean hasHeaders = (flags & 1) != 0; + boolean hasProperties = (flags & 2) != 0; s.append("headers=").append(hasHeaders).append(", properties=").append(hasProperties); } case SUBSTRING -> { s.append("start=") - .append(value) + .append(walker.getOperand(0)) .append(", end=") - .append(secondValue) + .append(walker.getOperand(1)) .append(", reverse=") - .append(thirdValue != 0); + .append(walker.getOperand(2) != 0); + } + case PROPERTY -> { + int index = walker.getOperand(0); + if (index >= 0 && index < bytecode.getConstantPoolCount()) { + Object prop = bytecode.getConstant(index); + if (prop instanceof String) { + s.append("\"").append(prop).append("\""); + } + } } case REG_PROPERTY -> { - if (value >= 0 && value < bytecode.getRegisterDefinitions().length) { - s.append(bytecode.getRegisterDefinitions()[value].name()); + int regIndex = walker.getOperand(0); + int propIndex = walker.getOperand(1); + if (regIndex >= 0 && regIndex < bytecode.getRegisterDefinitions().length) { + s.append(bytecode.getRegisterDefinitions()[regIndex].name()); s.append("."); - if (secondValue >= 0 && secondValue < bytecode.getConstantPoolCount()) { - Object prop = bytecode.getConstant(secondValue); + if (propIndex >= 0 && propIndex < bytecode.getConstantPoolCount()) { + Object prop = bytecode.getConstant(propIndex); if (prop instanceof String) { s.append(prop); } @@ -407,39 +323,20 @@ private void appendSymbolicInfo( } } case REG_INDEX -> { - if (value >= 0 && value < bytecode.getRegisterDefinitions().length) { - s.append(bytecode.getRegisterDefinitions()[value].name()); - s.append("[").append(secondValue).append("]"); + int regIndex = walker.getOperand(0); + int index = walker.getOperand(1); + if (regIndex >= 0 && regIndex < bytecode.getRegisterDefinitions().length) { + s.append(bytecode.getRegisterDefinitions()[regIndex].name()); + s.append("[").append(index).append("]"); } } case JUMP_OFFSET -> { - s.append("-> ").append(pc + 3 + value); // pc + 3 because offset is relative to after instruction + int offset = walker.getOperand(0); + s.append("-> ").append(walker.getJumpTarget()); } } } - private int appendByte(StringBuilder s, int pc, byte[] instructions) { - if (instructions.length <= pc + 1) { - s.append("?? (out of bounds at ").append(pc + 1).append(")"); - return -1; - } else { - int result = instructions[pc + 1] & 0xFF; - s.append(String.format("%3d", result)); - return result; - } - } - - private int appendShort(StringBuilder s, int pc, byte[] instructions) { - if (instructions.length <= pc + 2) { - s.append("?? (out of bounds at ").append(pc + 1).append(")"); - return -1; - } else { - int result = EndpointUtils.bytesToShort(instructions, pc + 1); - s.append(String.format("%5d", result)); - return result; - } - } - private String formatConstant(Object value) { if (value == null) { return "null"; diff --git a/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWalker.java b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWalker.java new file mode 100644 index 000000000..5dc596806 --- /dev/null +++ b/client/client-rulesengine/src/main/java/software/amazon/smithy/java/client/rulesengine/BytecodeWalker.java @@ -0,0 +1,180 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +/** + * Utility for walking through bytecode instructions, understanding instruction boundaries + * and operand sizes. This prevents misinterpreting operands as opcodes. + */ +final class BytecodeWalker { + private final byte[] code; + private int pc; + + public BytecodeWalker(byte[] code) { + this(code, 0); + } + + public BytecodeWalker(byte[] code, int startOffset) { + this.code = code; + this.pc = startOffset; + } + + public boolean hasNext() { + return pc < code.length; + } + + public int getPosition() { + return pc; + } + + public byte currentOpcode() { + if (!hasNext()) { + throw new IllegalStateException("No more instructions"); + } + return code[pc]; + } + + public boolean advance() { + if (!hasNext()) { + return false; + } + int length = getInstructionLength(); + if (length < 0) { + return false; // Unknown opcode + } + pc += length; + return true; + } + + public int getInstructionLength() { + if (!hasNext()) { + return -1; + } + return getInstructionLength(code[pc]); + } + + public int getOperandCount() { + byte opcode = currentOpcode(); + return switch (opcode) { + case Opcodes.NOT, Opcodes.ISSET, Opcodes.LIST0, Opcodes.LIST1, Opcodes.LIST2, Opcodes.MAP0, Opcodes.MAP1, + Opcodes.MAP2, Opcodes.MAP3, Opcodes.MAP4, Opcodes.IS_TRUE, Opcodes.EQUALS, Opcodes.STRING_EQUALS, + Opcodes.BOOLEAN_EQUALS, Opcodes.IS_VALID_HOST_LABEL, Opcodes.PARSE_URL, Opcodes.URI_ENCODE, + Opcodes.RETURN_ERROR, Opcodes.RETURN_VALUE, Opcodes.SPLIT -> + 0; + case Opcodes.LOAD_CONST, Opcodes.SET_REGISTER, Opcodes.LOAD_REGISTER, Opcodes.TEST_REGISTER_ISSET, + Opcodes.TEST_REGISTER_NOT_SET, Opcodes.LISTN, Opcodes.MAPN, Opcodes.FN0, Opcodes.FN1, Opcodes.FN2, + Opcodes.FN3, Opcodes.FN, Opcodes.GET_INDEX, Opcodes.TEST_REGISTER_IS_TRUE, + Opcodes.TEST_REGISTER_IS_FALSE, Opcodes.RETURN_ENDPOINT, Opcodes.LOAD_CONST_W, Opcodes.GET_PROPERTY, + Opcodes.JNN_OR_POP -> + 1; + case Opcodes.GET_PROPERTY_REG, Opcodes.GET_INDEX_REG, Opcodes.RESOLVE_TEMPLATE -> 2; + case Opcodes.SUBSTRING -> 3; + default -> -1; + }; + } + + public int getOperand(int index) { + byte opcode = currentOpcode(); + + switch (opcode) { + // Single byte operand instructions + case Opcodes.LOAD_CONST: + case Opcodes.SET_REGISTER: + case Opcodes.LOAD_REGISTER: + case Opcodes.TEST_REGISTER_ISSET: + case Opcodes.TEST_REGISTER_NOT_SET: + case Opcodes.LISTN: + case Opcodes.MAPN: + case Opcodes.FN0: + case Opcodes.FN1: + case Opcodes.FN2: + case Opcodes.FN3: + case Opcodes.FN: + case Opcodes.GET_INDEX: + case Opcodes.TEST_REGISTER_IS_TRUE: + case Opcodes.TEST_REGISTER_IS_FALSE: + case Opcodes.RETURN_ENDPOINT: + if (index == 0) { + return code[pc + 1] & 0xFF; + } + break; + + // Two byte operand instructions + case Opcodes.LOAD_CONST_W: + case Opcodes.GET_PROPERTY: + case Opcodes.JNN_OR_POP: + if (index == 0) { + return ((code[pc + 1] & 0xFF) << 8) | (code[pc + 2] & 0xFF); + } + break; + + // Mixed operand instructions + case Opcodes.GET_PROPERTY_REG: + if (index == 0) { + return code[pc + 1] & 0xFF; // register + } else if (index == 1) { + return ((code[pc + 2] & 0xFF) << 8) | (code[pc + 3] & 0xFF); // property index + } + break; + + case Opcodes.GET_INDEX_REG: + if (index == 0) { + return code[pc + 1] & 0xFF; // register + } else if (index == 1) { + return code[pc + 2] & 0xFF; // index + } + break; + + case Opcodes.RESOLVE_TEMPLATE: + if (index == 0) { + return code[pc + 1] & 0xFF; // arg count + } else if (index == 1) { + return ((code[pc + 2] & 0xFF) << 8) | (code[pc + 3] & 0xFF); // template index + } + break; + + case Opcodes.SUBSTRING: + if (index >= 0 && index < 3) { + return code[pc + 1 + index] & 0xFF; + } + break; + } + + throw new IllegalArgumentException("Invalid operand index " + index + " for opcode " + opcode); + } + + public int getJumpTarget() { + byte opcode = currentOpcode(); + if (opcode == Opcodes.JNN_OR_POP) { + int offset = getOperand(0); + return pc + 3 + offset; // pc + instruction_length + offset + } + throw new IllegalStateException("Not a jump instruction: " + opcode); + } + + public boolean isReturnOpcode() { + byte op = currentOpcode(); + return op == Opcodes.RETURN_VALUE || op == Opcodes.RETURN_ENDPOINT || op == Opcodes.RETURN_ERROR; + } + + public static int getInstructionLength(byte opcode) { + return switch (opcode) { + case Opcodes.NOT, Opcodes.ISSET, Opcodes.LIST0, Opcodes.LIST1, Opcodes.LIST2, Opcodes.MAP0, Opcodes.MAP1, + Opcodes.MAP2, Opcodes.MAP3, Opcodes.MAP4, Opcodes.IS_TRUE, Opcodes.EQUALS, Opcodes.STRING_EQUALS, + Opcodes.BOOLEAN_EQUALS, Opcodes.IS_VALID_HOST_LABEL, Opcodes.PARSE_URL, Opcodes.URI_ENCODE, + Opcodes.RETURN_ERROR, Opcodes.RETURN_VALUE, Opcodes.SPLIT -> + 1; + case Opcodes.LOAD_CONST, Opcodes.SET_REGISTER, Opcodes.LOAD_REGISTER, Opcodes.TEST_REGISTER_ISSET, + Opcodes.TEST_REGISTER_NOT_SET, Opcodes.LISTN, Opcodes.MAPN, Opcodes.FN0, Opcodes.FN1, Opcodes.FN2, + Opcodes.FN3, Opcodes.FN, Opcodes.GET_INDEX, Opcodes.TEST_REGISTER_IS_TRUE, + Opcodes.TEST_REGISTER_IS_FALSE, Opcodes.RETURN_ENDPOINT -> + 2; + case Opcodes.LOAD_CONST_W, Opcodes.GET_PROPERTY, Opcodes.JNN_OR_POP, Opcodes.GET_INDEX_REG -> 3; + case Opcodes.RESOLVE_TEMPLATE, Opcodes.GET_PROPERTY_REG, Opcodes.SUBSTRING -> 4; + default -> -1; + }; + } +} diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java index 6cf9a17c5..bd2f62e7a 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeCompilerTest.java @@ -527,15 +527,21 @@ void testCompileLargeMap() { assertOpcodePresent(bytecode, Opcodes.MAPN); } - private void assertOpcodePresent(Bytecode bytecode, byte opcode) { + private void assertOpcodePresent(Bytecode bytecode, byte expectedOpcode) { + BytecodeWalker walker = new BytecodeWalker(bytecode.getBytecode()); boolean found = false; - for (byte b : bytecode.getBytecode()) { - if (b == opcode) { + + while (walker.hasNext()) { + if (walker.currentOpcode() == expectedOpcode) { found = true; break; } + if (!walker.advance()) { + break; // Unknown opcode encountered + } } - assertTrue(found, "Expected opcode " + opcode + " to be present in bytecode"); + + assertTrue(found, "Expected opcode " + expectedOpcode + " to be present in bytecode"); } private void assertConstantPresent(Bytecode bytecode, Object expectedConstant) { @@ -549,11 +555,21 @@ private void assertConstantPresent(Bytecode bytecode, Object expectedConstant) { assertTrue(found, "Expected constant " + expectedConstant + " to be present in constant pool"); } - private OpcodeWithValue findOpcodeWithValue(Bytecode bytecode, byte opcode) { - byte[] code = bytecode.getBytecode(); - for (int i = 0; i < code.length; i++) { - if (code[i] == opcode && i + 1 < code.length) { - return new OpcodeWithValue(true, code[i + 1] & 0xFF); + private OpcodeWithValue findOpcodeWithValue(Bytecode bytecode, byte expectedOpcode) { + BytecodeWalker walker = new BytecodeWalker(bytecode.getBytecode()); + + while (walker.hasNext()) { + if (walker.currentOpcode() == expectedOpcode) { + try { + int value = walker.getOperand(0); + return new OpcodeWithValue(true, value); + } catch (IllegalArgumentException e) { + // Opcode doesn't have operands + return new OpcodeWithValue(true, 0); + } + } + if (!walker.advance()) { + break; } } return new OpcodeWithValue(false, 0); diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassemblerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassemblerTest.java index 92a237e75..d1ec88715 100644 --- a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassemblerTest.java +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeDisassemblerTest.java @@ -202,29 +202,6 @@ void handlesEmptyProgram() { assertContains(result, "Functions: 0"); } - @Test - void countsInstructionFrequency() { - BytecodeWriter writer = new BytecodeWriter(); - - // Create multiple conditions with repeated instructions - for (int i = 0; i < 3; i++) { - writer.markConditionStart(); - writer.writeByte(Opcodes.LOAD_CONST); - writer.writeByte(0); - writer.writeByte(Opcodes.LOAD_CONST); - writer.writeByte(1); - writer.writeByte(Opcodes.RETURN_VALUE); - } - - Bytecode bytecode = writer.build(new RegisterDefinition[0], new RulesFunction[0], new int[] {-1, 1, -1}, 1); - String result = new BytecodeDisassembler(bytecode).disassemble(); - - // Should show instruction counts - assertContains(result, "Instruction counts:"); - assertContains(result, "LOAD_CONST"); - assertContains(result, "RETURN_VALUE"); - } - private void assertContains(String actual, String expected) { assertTrue(actual.contains(expected), "Expected to find '" + expected + "' in:\n" + actual); } diff --git a/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeWalkerTest.java b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeWalkerTest.java new file mode 100644 index 000000000..9fde95380 --- /dev/null +++ b/client/client-rulesengine/src/test/java/software/amazon/smithy/java/client/rulesengine/BytecodeWalkerTest.java @@ -0,0 +1,136 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.java.client.rulesengine; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; + +class BytecodeWalkerTest { + @Test + void testBasicWalking() { + byte[] bytecode = {Opcodes.LOAD_CONST, 5, Opcodes.NOT, Opcodes.RETURN_VALUE}; + BytecodeWalker walker = new BytecodeWalker(bytecode); + + // First instruction: LOAD_CONST + assertTrue(walker.hasNext()); + assertEquals(0, walker.getPosition()); + assertEquals(Opcodes.LOAD_CONST, walker.currentOpcode()); + assertEquals(2, walker.getInstructionLength()); + assertEquals(1, walker.getOperandCount()); + assertEquals(5, walker.getOperand(0)); + + // Advance to NOT + assertTrue(walker.advance()); + assertEquals(2, walker.getPosition()); + assertEquals(Opcodes.NOT, walker.currentOpcode()); + assertEquals(1, walker.getInstructionLength()); + assertEquals(0, walker.getOperandCount()); + + // Advance to RETURN_VALUE + assertTrue(walker.advance()); + assertEquals(3, walker.getPosition()); + assertEquals(Opcodes.RETURN_VALUE, walker.currentOpcode()); + assertTrue(walker.isReturnOpcode()); + + // Can advance past RETURN_VALUE to position 4 (end of bytecode) + assertTrue(walker.advance()); + assertEquals(4, walker.getPosition()); + + // Now at end, hasNext() is false + assertFalse(walker.hasNext()); + + // And advance() returns false + assertFalse(walker.advance()); + } + + @Test + void testJumpInstruction() { + byte[] bytecode = { + Opcodes.LOAD_CONST, + 0, // 0-1 + Opcodes.JNN_OR_POP, + 0, + 3, // 2-4 (jump to 8: 2 + 3 + 3) + Opcodes.LOAD_CONST, + 1, // 5-6 + Opcodes.RETURN_VALUE // 7 + }; + BytecodeWalker walker = new BytecodeWalker(bytecode, 2); + + assertEquals(Opcodes.JNN_OR_POP, walker.currentOpcode()); + assertEquals(3, walker.getOperand(0)); + assertEquals(8, walker.getJumpTarget()); + } + + @Test + void testMultiOperandInstructions() { + byte[] bytecode = {Opcodes.SUBSTRING, 1, 5, 0, Opcodes.RETURN_VALUE}; + BytecodeWalker walker = new BytecodeWalker(bytecode); + + assertEquals(Opcodes.SUBSTRING, walker.currentOpcode()); + assertEquals(3, walker.getOperandCount()); + assertEquals(1, walker.getOperand(0)); + assertEquals(5, walker.getOperand(1)); + assertEquals(0, walker.getOperand(2)); + + assertThrows(IllegalArgumentException.class, () -> walker.getOperand(3)); + } + + @Test + void testPropertyAccessInstructions() { + byte[] bytecode = { + Opcodes.GET_PROPERTY_REG, + 2, + 0x00, + 0x0A, // register 2, property index 10 + Opcodes.GET_INDEX_REG, + 3, + 5, // register 3, index 5 + Opcodes.RETURN_VALUE + }; + BytecodeWalker walker = new BytecodeWalker(bytecode); + + // GET_PROPERTY_REG + assertEquals(Opcodes.GET_PROPERTY_REG, walker.currentOpcode()); + assertEquals(2, walker.getOperandCount()); + assertEquals(2, walker.getOperand(0)); // register + assertEquals(10, walker.getOperand(1)); // property index (0x000A) + + // Advance to GET_INDEX_REG + assertTrue(walker.advance()); + assertEquals(Opcodes.GET_INDEX_REG, walker.currentOpcode()); + assertEquals(2, walker.getOperandCount()); + assertEquals(3, walker.getOperand(0)); // register + assertEquals(5, walker.getOperand(1)); // index + } + + @Test + void testEmptyBytecode() { + BytecodeWalker walker = new BytecodeWalker(new byte[0]); + + assertFalse(walker.hasNext()); + assertEquals(0, walker.getPosition()); + assertThrows(IllegalStateException.class, walker::currentOpcode); + assertFalse(walker.advance()); + } + + @Test + void testStartOffset() { + byte[] bytecode = {Opcodes.NOT, Opcodes.NOT, Opcodes.RETURN_VALUE}; + BytecodeWalker walker = new BytecodeWalker(bytecode, 1); + + assertEquals(1, walker.getPosition()); + assertEquals(Opcodes.NOT, walker.currentOpcode()); + + assertTrue(walker.advance()); + assertEquals(2, walker.getPosition()); + assertEquals(Opcodes.RETURN_VALUE, walker.currentOpcode()); + } +}