diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index dfd80c74f2..bcc8dcb0a4 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -115,3 +115,9 @@ no longer requires `Service::Error = OperationError`, inst references = ["smithy-rs#2457"] meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "server" } author = "hlbarber" + +[[aws-sdk-rust]] +message = "The SDK has added support for timestreamwrite and timestreamquery. Support for these services is considered experimental at this time. In order to use these services, you MUST call `.enable_endpoint_discovery()` on the `Client` after construction." +meta = { "breaking" = false, "tada" = true, "bug" = false } +references = ["smithy-rs#2707", "aws-sdk-rust#114"] +author = "rcoh" diff --git a/aws/rust-runtime/aws-inlineable/Cargo.toml b/aws/rust-runtime/aws-inlineable/Cargo.toml index 5586b75ae2..727202f2aa 100644 --- a/aws/rust-runtime/aws-inlineable/Cargo.toml +++ b/aws/rust-runtime/aws-inlineable/Cargo.toml @@ -24,6 +24,7 @@ aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http" } aws-smithy-http-tower = { path = "../../../rust-runtime/aws-smithy-http-tower" } aws-smithy-runtime-api = { path = "../../../rust-runtime/aws-smithy-runtime-api" } aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types" } +aws-smithy-async = { path = "../../../rust-runtime/aws-smithy-async" } aws-types = { path = "../aws-types" } bytes = "1" bytes-utils = "0.1.1" diff --git a/aws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs b/aws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs new file mode 100644 index 0000000000..e74ceddb00 --- /dev/null +++ b/aws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs @@ -0,0 +1,287 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +//! Maintain a cache of discovered endpoints + +use aws_smithy_async::rt::sleep::AsyncSleep; +use aws_smithy_async::time::TimeSource; +use aws_smithy_client::erase::boxclone::BoxFuture; +use aws_smithy_http::endpoint::{ResolveEndpoint, ResolveEndpointError}; +use aws_smithy_types::endpoint::Endpoint; +use std::fmt::{Debug, Formatter}; +use std::future::Future; +use std::sync::{Arc, Mutex}; +use std::time::{Duration, SystemTime}; +use tokio::sync::oneshot::error::TryRecvError; +use tokio::sync::oneshot::{Receiver, Sender}; + +/// Endpoint reloader +#[must_use] +pub struct ReloadEndpoint { + loader: Box BoxFuture<(Endpoint, SystemTime), ResolveEndpointError> + Send + Sync>, + endpoint: Arc>>, + error: Arc>>, + rx: Receiver<()>, + sleep: Arc, + time: Arc, +} + +impl Debug for ReloadEndpoint { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ReloadEndpoint").finish() + } +} + +impl ReloadEndpoint { + /// Reload the endpoint once + pub async fn reload_once(&self) { + match (self.loader)().await { + Ok((endpoint, expiry)) => { + *self.endpoint.lock().unwrap() = Some(ExpiringEndpoint { endpoint, expiry }) + } + Err(err) => *self.error.lock().unwrap() = Some(err), + } + } + + /// An infinite loop task that will reload the endpoint + /// + /// This task will terminate when the corresponding [`Client`](crate::Client) is dropped. + pub async fn reload_task(mut self) { + loop { + match self.rx.try_recv() { + Ok(_) | Err(TryRecvError::Closed) => break, + _ => {} + } + self.reload_increment(self.time.now()).await; + self.sleep.sleep(Duration::from_secs(60)).await; + } + } + + async fn reload_increment(&self, now: SystemTime) { + let should_reload = self + .endpoint + .lock() + .unwrap() + .as_ref() + .map(|e| e.is_expired(now)) + .unwrap_or(true); + if should_reload { + tracing::debug!("reloading endpoint, previous endpoint was expired"); + self.reload_once().await; + } + } +} + +#[derive(Debug, Clone)] +pub(crate) struct EndpointCache { + error: Arc>>, + endpoint: Arc>>, + // When the sender is dropped, this allows the reload loop to stop + _drop_guard: Arc>, +} + +impl ResolveEndpoint for EndpointCache { + fn resolve_endpoint(&self, _params: &T) -> aws_smithy_http::endpoint::Result { + self.resolve_endpoint() + } +} + +#[derive(Debug)] +struct ExpiringEndpoint { + endpoint: Endpoint, + expiry: SystemTime, +} + +impl ExpiringEndpoint { + fn is_expired(&self, now: SystemTime) -> bool { + tracing::debug!(expiry = ?self.expiry, now = ?now, delta = ?self.expiry.duration_since(now), "checking expiry status of endpoint"); + match self.expiry.duration_since(now) { + Err(_) => true, + Ok(t) => t < Duration::from_secs(120), + } + } +} + +pub(crate) async fn create_cache( + loader_fn: impl Fn() -> F + Send + Sync + 'static, + sleep: Arc, + time: Arc, +) -> Result<(EndpointCache, ReloadEndpoint), ResolveEndpointError> +where + F: Future> + Send + 'static, +{ + let error_holder = Arc::new(Mutex::new(None)); + let endpoint_holder = Arc::new(Mutex::new(None)); + let (tx, rx) = tokio::sync::oneshot::channel(); + let cache = EndpointCache { + error: error_holder.clone(), + endpoint: endpoint_holder.clone(), + _drop_guard: Arc::new(tx), + }; + let reloader = ReloadEndpoint { + loader: Box::new(move || Box::pin((loader_fn)()) as _), + endpoint: endpoint_holder, + error: error_holder, + rx, + sleep, + time, + }; + reloader.reload_once().await; + // if we didn't successfully get an endpoint, bail out so the client knows + // configuration failed to work + cache.resolve_endpoint()?; + Ok((cache, reloader)) +} + +impl EndpointCache { + fn resolve_endpoint(&self) -> aws_smithy_http::endpoint::Result { + self.endpoint + .lock() + .unwrap() + .as_ref() + .map(|e| e.endpoint.clone()) + .ok_or_else(|| { + self.error + .lock() + .unwrap() + .take() + .unwrap_or_else(|| ResolveEndpointError::message("no endpoint loaded")) + }) + } +} + +#[cfg(test)] +mod test { + use crate::endpoint_discovery::create_cache; + use aws_smithy_async::rt::sleep::TokioSleep; + use aws_smithy_async::test_util::controlled_time_and_sleep; + use aws_smithy_async::time::SystemTimeSource; + use aws_smithy_types::endpoint::Endpoint; + use std::sync::atomic::{AtomicUsize, Ordering}; + use std::sync::Arc; + use std::time::{Duration, SystemTime, UNIX_EPOCH}; + use tokio::time::timeout; + + fn check_send_v(t: T) -> T { + t + } + + #[tokio::test] + #[allow(unused_must_use)] + async fn check_traits() { + let (cache, reloader) = create_cache( + || async { + Ok(( + Endpoint::builder().url("http://foo.com").build(), + SystemTime::now(), + )) + }, + Arc::new(TokioSleep::new()), + Arc::new(SystemTimeSource::new()), + ) + .await + .unwrap(); + check_send_v(reloader.reload_task()); + check_send_v(cache); + } + + #[tokio::test] + async fn erroring_endpoint_always_reloaded() { + let expiry = UNIX_EPOCH + Duration::from_secs(123456789); + let ct = Arc::new(AtomicUsize::new(0)); + let (cache, reloader) = create_cache( + move || { + let shared_ct = ct.clone(); + shared_ct.fetch_add(1, Ordering::AcqRel); + async move { + Ok(( + Endpoint::builder() + .url(format!("http://foo.com/{shared_ct:?}")) + .build(), + expiry, + )) + } + }, + Arc::new(TokioSleep::new()), + Arc::new(SystemTimeSource::new()), + ) + .await + .expect("returns an endpoint"); + assert_eq!( + cache.resolve_endpoint().expect("ok").url(), + "http://foo.com/1" + ); + // 120 second buffer + reloader + .reload_increment(expiry - Duration::from_secs(240)) + .await; + assert_eq!( + cache.resolve_endpoint().expect("ok").url(), + "http://foo.com/1" + ); + + reloader.reload_increment(expiry).await; + assert_eq!( + cache.resolve_endpoint().expect("ok").url(), + "http://foo.com/2" + ); + } + + #[tokio::test] + async fn test_advance_of_task() { + let expiry = UNIX_EPOCH + Duration::from_secs(123456789); + // expires in 8 minutes + let (time, sleep, mut gate) = controlled_time_and_sleep(expiry - Duration::from_secs(239)); + let ct = Arc::new(AtomicUsize::new(0)); + let (cache, reloader) = create_cache( + move || { + let shared_ct = ct.clone(); + shared_ct.fetch_add(1, Ordering::AcqRel); + async move { + Ok(( + Endpoint::builder() + .url(format!("http://foo.com/{shared_ct:?}")) + .build(), + expiry, + )) + } + }, + Arc::new(sleep.clone()), + Arc::new(time.clone()), + ) + .await + .expect("first load success"); + let reload_task = tokio::spawn(reloader.reload_task()); + assert!(!reload_task.is_finished()); + // expiry occurs after 2 sleeps + // t = 0 + assert_eq!( + gate.expect_sleep().await.duration(), + Duration::from_secs(60) + ); + assert_eq!(cache.resolve_endpoint().unwrap().url(), "http://foo.com/1"); + // t = 60 + + let sleep = gate.expect_sleep().await; + // we're still holding the drop guard, so we haven't expired yet. + assert_eq!(cache.resolve_endpoint().unwrap().url(), "http://foo.com/1"); + assert_eq!(sleep.duration(), Duration::from_secs(60)); + sleep.allow_progress(); + // t = 120 + + let sleep = gate.expect_sleep().await; + assert_eq!(cache.resolve_endpoint().unwrap().url(), "http://foo.com/2"); + sleep.allow_progress(); + + let sleep = gate.expect_sleep().await; + drop(cache); + sleep.allow_progress(); + + timeout(Duration::from_secs(1), reload_task) + .await + .expect("task finishes successfully") + .expect("finishes"); + } +} diff --git a/aws/rust-runtime/aws-inlineable/src/lib.rs b/aws/rust-runtime/aws-inlineable/src/lib.rs index c4b7d23684..465aaac302 100644 --- a/aws/rust-runtime/aws-inlineable/src/lib.rs +++ b/aws/rust-runtime/aws-inlineable/src/lib.rs @@ -45,3 +45,12 @@ pub mod route53_resource_id_preprocessor; /// Convert a streaming `SdkBody` into an aws-chunked streaming body with checksum trailers pub mod http_body_checksum; + +#[allow(dead_code)] +pub mod endpoint_discovery; + +// just so docs work +#[allow(dead_code)] +/// allow docs to work +#[derive(Debug)] +pub struct Client; diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCodegenDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCodegenDecorator.kt index 8959054d16..952cb35e60 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCodegenDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCodegenDecorator.kt @@ -21,6 +21,7 @@ import software.amazon.smithy.rustsdk.customize.s3.S3ExtendedRequestIdDecorator import software.amazon.smithy.rustsdk.customize.s3control.S3ControlDecorator import software.amazon.smithy.rustsdk.customize.sso.SSODecorator import software.amazon.smithy.rustsdk.customize.sts.STSDecorator +import software.amazon.smithy.rustsdk.customize.timestream.TimestreamDecorator import software.amazon.smithy.rustsdk.endpoints.AwsEndpointsStdLib import software.amazon.smithy.rustsdk.endpoints.OperationInputTestDecorator import software.amazon.smithy.rustsdk.endpoints.RequireEndpointRules @@ -69,6 +70,8 @@ val DECORATORS: List = listOf( S3ControlDecorator().onlyApplyTo("com.amazonaws.s3control#AWSS3ControlServiceV20180820"), STSDecorator().onlyApplyTo("com.amazonaws.sts#AWSSecurityTokenServiceV20110615"), SSODecorator().onlyApplyTo("com.amazonaws.sso#SWBPortalService"), + TimestreamDecorator().onlyApplyTo("com.amazonaws.timestreamwrite#Timestream_20181101"), + TimestreamDecorator().onlyApplyTo("com.amazonaws.timestreamquery#Timestream_20181101"), // Only build docs-rs for linux to reduce load on docs.rs listOf( diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCrateDocsDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCrateDocsDecorator.kt index a810b3e8a5..f167015ac2 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCrateDocsDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCrateDocsDecorator.kt @@ -21,6 +21,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.rawTemplate import software.amazon.smithy.rust.codegen.core.rustlang.rust import software.amazon.smithy.rust.codegen.core.rustlang.writable import software.amazon.smithy.rust.codegen.core.smithy.RustCrate +import software.amazon.smithy.rust.codegen.core.smithy.customize.AdHocSection import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsSection import software.amazon.smithy.rust.codegen.core.smithy.generators.ManifestCustomizations @@ -85,6 +86,10 @@ class AwsCrateDocsDecorator : ClientCodegenDecorator { SdkSettings.from(codegenContext.settings).generateReadme } +sealed class DocSection(name: String) : AdHocSection(name) { + data class CreateClient(val crateName: String, val clientName: String = "client", val indent: String) : DocSection("CustomExample") +} + internal class AwsCrateDocGenerator(private val codegenContext: ClientCodegenContext) { private val logger: Logger = Logger.getLogger(javaClass.name) private val awsConfigVersion by lazy { @@ -154,8 +159,7 @@ internal class AwsCrateDocGenerator(private val codegenContext: ClientCodegenCon ##[#{tokio}::main] async fn main() -> Result<(), $shortModuleName::Error> { - let config = #{aws_config}::load_from_env().await; - let client = $shortModuleName::Client::new(&config); + #{constructClient} // ... make some calls with the client @@ -171,6 +175,7 @@ internal class AwsCrateDocGenerator(private val codegenContext: ClientCodegenCon true -> AwsCargoDependency.awsConfig(codegenContext.runtimeConfig).toDevDependency().toType() else -> writable { rust("aws_config") } }, + "constructClient" to AwsDocs.constructClient(codegenContext, indent = " "), ) template( diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsDocs.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsDocs.kt index a8dcdc33d8..7166ce1144 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsDocs.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsDocs.kt @@ -9,6 +9,9 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.core.rustlang.Writable import software.amazon.smithy.rust.codegen.core.rustlang.docsTemplate +import software.amazon.smithy.rust.codegen.core.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.core.rustlang.writable +import software.amazon.smithy.rust.codegen.core.smithy.customize.writeCustomizationsOrElse import software.amazon.smithy.rust.codegen.core.util.toSnakeCase object AwsDocs { @@ -23,6 +26,26 @@ object AwsDocs { ShapeId.from("com.amazonaws.sso#SWBPortalService"), ).contains(codegenContext.serviceShape.id) + fun constructClient(codegenContext: ClientCodegenContext, indent: String): Writable { + val crateName = codegenContext.moduleName.toSnakeCase() + return writable { + writeCustomizationsOrElse( + codegenContext.rootDecorator.extraSections(codegenContext), + DocSection.CreateClient(crateName = crateName, indent = indent), + ) { + if (canRelyOnAwsConfig(codegenContext)) { + addDependency(AwsCargoDependency.awsConfig(codegenContext.runtimeConfig).toDevDependency()) + } + rustTemplate( + """ + let config = aws_config::load_from_env().await; + let client = $crateName::Client::new(&config); + """.trimIndent().prependIndent(indent), + ) + } + } + } + fun clientConstructionDocs(codegenContext: ClientCodegenContext): Writable = { if (canRelyOnAwsConfig(codegenContext)) { val crateName = codegenContext.moduleName.toSnakeCase() @@ -40,8 +63,7 @@ object AwsDocs { In the simplest case, creating a client looks as follows: ```rust,no_run ## async fn wrapper() { - let config = #{aws_config}::load_from_env().await; - let client = $crateName::Client::new(&config); + #{constructClient} ## } ``` @@ -76,6 +98,7 @@ object AwsDocs { [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html##builders-enable-construction-of-complex-values-c-builder """.trimIndent(), "aws_config" to AwsCargoDependency.awsConfig(codegenContext.runtimeConfig).toDevDependency().toType(), + "constructClient" to constructClient(codegenContext, indent = ""), ) } } diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt index 556e71d2b0..744b79c441 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt @@ -77,7 +77,10 @@ class IntegrationTestDependencies( if (hasTests) { val smithyClient = CargoDependency.smithyClient(codegenContext.runtimeConfig) .copy(features = setOf("test-util"), scope = DependencyScope.Dev) + val smithyAsync = CargoDependency.smithyAsync(codegenContext.runtimeConfig) + .copy(features = setOf("test-util"), scope = DependencyScope.Dev) addDependency(smithyClient) + addDependency(smithyAsync) addDependency(CargoDependency.smithyProtocolTestHelpers(codegenContext.runtimeConfig)) addDependency(SerdeJson) addDependency(Tokio) diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ServiceSpecificDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ServiceSpecificDecorator.kt index cc9c34797d..ce4d3f88ae 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ServiceSpecificDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ServiceSpecificDecorator.kt @@ -20,6 +20,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.config.Confi import software.amazon.smithy.rust.codegen.client.smithy.generators.error.ErrorCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.protocol.ProtocolTestGenerator import software.amazon.smithy.rust.codegen.core.smithy.RustCrate +import software.amazon.smithy.rust.codegen.core.smithy.customize.AdHocCustomization import software.amazon.smithy.rust.codegen.core.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.core.smithy.generators.BuilderCustomization import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsCustomization @@ -148,6 +149,11 @@ class ServiceSpecificDecorator( delegateTo.protocolTestGenerator(codegenContext, baseGenerator) } + override fun extraSections(codegenContext: ClientCodegenContext): List = + listOf().maybeApply(codegenContext.serviceShape) { + delegateTo.extraSections(codegenContext) + } + override fun operationRuntimePluginCustomizations( codegenContext: ClientCodegenContext, operation: OperationShape, diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/timestream/TimestreamDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/timestream/TimestreamDecorator.kt new file mode 100644 index 0000000000..8b8bffe398 --- /dev/null +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/timestream/TimestreamDecorator.kt @@ -0,0 +1,106 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rustsdk.customize.timestream + +import software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.client.smithy.customize.ClientCodegenDecorator +import software.amazon.smithy.rust.codegen.client.smithy.endpoint.Types +import software.amazon.smithy.rust.codegen.core.rustlang.CargoDependency +import software.amazon.smithy.rust.codegen.core.rustlang.DependencyScope +import software.amazon.smithy.rust.codegen.core.rustlang.Visibility +import software.amazon.smithy.rust.codegen.core.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.core.rustlang.toType +import software.amazon.smithy.rust.codegen.core.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.core.smithy.RuntimeType.Companion.preludeScope +import software.amazon.smithy.rust.codegen.core.smithy.RustCrate +import software.amazon.smithy.rust.codegen.core.smithy.customize.AdHocCustomization +import software.amazon.smithy.rust.codegen.core.smithy.customize.adhocCustomization +import software.amazon.smithy.rustsdk.AwsCargoDependency +import software.amazon.smithy.rustsdk.DocSection +import software.amazon.smithy.rustsdk.InlineAwsDependency + +/** + * This decorator does two things: + * 1. Adds the `endpoint_discovery` inlineable + * 2. Adds a `enable_endpoint_discovery` method on client that returns a wrapped client with endpoint discovery enabled + */ +class TimestreamDecorator : ClientCodegenDecorator { + override val name: String = "Timestream" + override val order: Byte = -1 + + override fun extraSections(codegenContext: ClientCodegenContext): List { + return listOf( + adhocCustomization { + addDependency(AwsCargoDependency.awsConfig(codegenContext.runtimeConfig).toDevDependency()) + rustTemplate( + """ + let config = aws_config::load_from_env().await; + // You MUST call `enable_endpoint_discovery` to produce a working client for this service. + let ${it.clientName} = ${it.crateName}::Client::new(&config).enable_endpoint_discovery().await; + """.replaceIndent(it.indent), + ) + }, + ) + } + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { + val endpointDiscovery = InlineAwsDependency.forRustFile( + "endpoint_discovery", + Visibility.PUBLIC, + CargoDependency.Tokio.copy(scope = DependencyScope.Compile, features = setOf("sync")), + ) + rustCrate.lib { + // helper function to resolve an endpoint given a base client + rustTemplate( + """ + async fn resolve_endpoint(client: &crate::Client) -> Result<(#{Endpoint}, #{SystemTime}), #{ResolveEndpointError}> { + let describe_endpoints = + client.describe_endpoints().send().await.map_err(|e| { + #{ResolveEndpointError}::from_source("failed to call describe_endpoints", e) + })?; + let endpoint = describe_endpoints.endpoints().unwrap().get(0).unwrap(); + let expiry = client.conf().time_source.now() + #{Duration}::from_secs(endpoint.cache_period_in_minutes() as u64 * 60); + Ok(( + #{Endpoint}::builder() + .url(format!("https://{}", endpoint.address().unwrap())) + .build(), + expiry, + )) + } + + impl Client { + /// Enable endpoint discovery for this client + /// + /// This method MUST be called to construct a working client. + pub async fn enable_endpoint_discovery(self) -> #{Result}<(Self, #{endpoint_discovery}::ReloadEndpoint), #{ResolveEndpointError}> { + let mut new_conf = self.conf().clone(); + let sleep = self.conf().sleep_impl().expect("sleep impl must be provided"); + let time = ::std::sync::Arc::new(self.conf().time_source.clone()); + let (resolver, reloader) = #{endpoint_discovery}::create_cache( + move || { + let client = self.clone(); + async move { resolve_endpoint(&client).await } + }, + sleep, + time + ) + .await?; + new_conf.endpoint_resolver = ::std::sync::Arc::new(resolver); + Ok((Self::from_conf(new_conf), reloader)) + } + } + + """, + "endpoint_discovery" to endpointDiscovery.toType(), + "SystemTime" to RuntimeType.std.resolve("time::SystemTime"), + "Duration" to RuntimeType.std.resolve("time::Duration"), + "SystemTimeSource" to RuntimeType.smithyAsync(codegenContext.runtimeConfig) + .resolve("time::SystemTimeSource"), + *Types(codegenContext.runtimeConfig).toArray(), + *preludeScope, + ) + } + } +} diff --git a/aws/sdk/aws-models/timestream-query.json b/aws/sdk/aws-models/timestream-query.json new file mode 100644 index 0000000000..9545cf1b2b --- /dev/null +++ b/aws/sdk/aws-models/timestream-query.json @@ -0,0 +1,3047 @@ +{ + "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.timestreamquery#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ServiceErrorMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AccessDenied", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

You are not authorized to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.timestreamquery#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.timestreamquery#CancelQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#CancelQueryRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#CancelQueryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Cancels a query that has been issued. Cancellation is provided only if the query has\n not completed running before the cancellation request was issued. Because cancellation\n is an idempotent operation, subsequent cancellation requests will return a\n CancellationMessage, indicating that the query has already been\n canceled. See code\n sample for details.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.timestreamquery#CancelQueryRequest": { + "type": "structure", + "members": { + "QueryId": { + "target": "com.amazonaws.timestreamquery#QueryId", + "traits": { + "smithy.api#documentation": "

The ID of the query that needs to be cancelled. QueryID is returned as\n part of the query result.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#CancelQueryResponse": { + "type": "structure", + "members": { + "CancellationMessage": { + "target": "com.amazonaws.timestreamquery#String", + "traits": { + "smithy.api#documentation": "

A CancellationMessage is returned when a CancelQuery\n request for the query specified by QueryId has already been issued.

" + } + } + } + }, + "com.amazonaws.timestreamquery#ClientRequestToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 32, + "max": 128 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.timestreamquery#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 32, + "max": 128 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.timestreamquery#ColumnInfo": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamquery#String", + "traits": { + "smithy.api#documentation": "

The name of the result set column. The name of the result set is available for\n columns of all data types except for arrays.

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

The data type of the result set column. The data type can be a scalar or complex.\n Scalar data types are integers, strings, doubles, Booleans, and others. Complex data\n types are types such as arrays, rows, and others.

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

Contains the metadata for query results such as the column names, data types, and\n other attributes.

" + } + }, + "com.amazonaws.timestreamquery#ColumnInfoList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#ColumnInfo" + } + }, + "com.amazonaws.timestreamquery#ConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

Unable to poll results for a cancelled query.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.timestreamquery#CreateScheduledQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#CreateScheduledQueryRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#CreateScheduledQueryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#ConflictException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Create a scheduled query that will be run on your behalf at the configured schedule.\n Timestream assumes the execution role provided as part of the\n ScheduledQueryExecutionRoleArn parameter to run the query. You can use\n the NotificationConfiguration parameter to configure notification for your\n scheduled query operations.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.timestreamquery#CreateScheduledQueryRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryName", + "traits": { + "smithy.api#documentation": "

Name of the scheduled query.

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

The query string to run. Parameter\n names can be specified in the query string @ character followed by an\n identifier. The named Parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run.

\n

The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of @scheduled_runtime paramater for each query run. \n For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is \n initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.

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

The schedule configuration for the query.

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

Notification configuration for the scheduled query. A notification is sent by\n Timestream when a query run finishes, when the state is updated or when you delete it.

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

Configuration used for writing the result of a query.

" + } + }, + "ClientToken": { + "target": "com.amazonaws.timestreamquery#ClientToken", + "traits": { + "smithy.api#documentation": "

Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making \n multiple identical CreateScheduledQuery requests has the same effect as making a single request.\n\n

\n
    \n
  • \n

    If CreateScheduledQuery is called without a ClientToken, the\n Query SDK generates a ClientToken on your behalf.

    \n
  • \n
  • \n

    After 8 hours, any request with the same ClientToken is treated\n as a new request.

    \n
  • \n
", + "smithy.api#idempotencyToken": {} + } + }, + "ScheduledQueryExecutionRoleArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The ARN for the IAM role that Timestream will assume when running the scheduled query.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.timestreamquery#TagList", + "traits": { + "smithy.api#documentation": "

A list of key-value pairs to label the scheduled query.

" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamquery#StringValue2048", + "traits": { + "smithy.api#documentation": "

The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS\n key is not specified, the scheduled query resource will be encrypted with a Timestream\n owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias\n ARN. When using an alias name, prefix the name with alias/\n

\n

If ErrorReportConfiguration uses SSE_KMS as encryption type, the same KmsKeyId is used to encrypt the error report at rest.

" + } + }, + "ErrorReportConfiguration": { + "target": "com.amazonaws.timestreamquery#ErrorReportConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#CreateScheduledQueryResponse": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

ARN for the created scheduled query.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#Datum": { + "type": "structure", + "members": { + "ScalarValue": { + "target": "com.amazonaws.timestreamquery#ScalarValue", + "traits": { + "smithy.api#documentation": "

Indicates if the data point is a scalar value such as integer, string, double, or\n Boolean.

" + } + }, + "TimeSeriesValue": { + "target": "com.amazonaws.timestreamquery#TimeSeriesDataPointList", + "traits": { + "smithy.api#documentation": "

Indicates if the data point is a timeseries data type.

" + } + }, + "ArrayValue": { + "target": "com.amazonaws.timestreamquery#DatumList", + "traits": { + "smithy.api#documentation": "

Indicates if the data point is an array.

" + } + }, + "RowValue": { + "target": "com.amazonaws.timestreamquery#Row", + "traits": { + "smithy.api#documentation": "

Indicates if the data point is a row.

" + } + }, + "NullValue": { + "target": "com.amazonaws.timestreamquery#NullableBoolean", + "traits": { + "smithy.api#documentation": "

Indicates if the data point is null.

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

Datum represents a single data point in a query result.

" + } + }, + "com.amazonaws.timestreamquery#DatumList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#Datum" + } + }, + "com.amazonaws.timestreamquery#DeleteScheduledQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#DeleteScheduledQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Deletes a given scheduled query. This is an irreversible operation.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.timestreamquery#DeleteScheduledQueryRequest": { + "type": "structure", + "members": { + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The ARN of the scheduled query.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#DescribeEndpoints": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#DescribeEndpointsRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#DescribeEndpointsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

DescribeEndpoints returns a list of available endpoints to make Timestream\n API calls against. This API is available through both Write and Query.

\n

Because the Timestream SDKs are designed to transparently work with the\n service’s architecture, including the management and mapping of the service endpoints,\n it is not recommended that you use this API unless:

\n \n

For detailed information on how and when to use and implement DescribeEndpoints, see\n The Endpoint Discovery Pattern.

" + } + }, + "com.amazonaws.timestreamquery#DescribeEndpointsRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.timestreamquery#DescribeEndpointsResponse": { + "type": "structure", + "members": { + "Endpoints": { + "target": "com.amazonaws.timestreamquery#Endpoints", + "traits": { + "smithy.api#documentation": "

An Endpoints object is returned when a DescribeEndpoints\n request is made.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#DescribeScheduledQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#DescribeScheduledQueryRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#DescribeScheduledQueryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Provides detailed information about a scheduled query.

" + } + }, + "com.amazonaws.timestreamquery#DescribeScheduledQueryRequest": { + "type": "structure", + "members": { + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The ARN of the scheduled query.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#DescribeScheduledQueryResponse": { + "type": "structure", + "members": { + "ScheduledQuery": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryDescription", + "traits": { + "smithy.api#documentation": "

The scheduled query.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#DimensionMapping": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

Column name from query result.

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

Type for the dimension.

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

This type is used to map column(s) from the query result to a dimension in the\n destination table.

" + } + }, + "com.amazonaws.timestreamquery#DimensionMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#DimensionMapping" + } + }, + "com.amazonaws.timestreamquery#DimensionValueType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "VARCHAR", + "name": "VARCHAR" + } + ] + } + }, + "com.amazonaws.timestreamquery#Double": { + "type": "double", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.timestreamquery#Endpoint": { + "type": "structure", + "members": { + "Address": { + "target": "com.amazonaws.timestreamquery#String", + "traits": { + "smithy.api#documentation": "

An endpoint address.

", + "smithy.api#required": {} + } + }, + "CachePeriodInMinutes": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The TTL for the endpoint, in minutes.

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

Represents an available endpoint against which to make API calls against, as well as\n the TTL for that endpoint.

" + } + }, + "com.amazonaws.timestreamquery#Endpoints": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#Endpoint" + } + }, + "com.amazonaws.timestreamquery#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.timestreamquery#ErrorReportConfiguration": { + "type": "structure", + "members": { + "S3Configuration": { + "target": "com.amazonaws.timestreamquery#S3Configuration", + "traits": { + "smithy.api#documentation": "

The S3 configuration for the error reports.

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

Configuration required for error reporting.

" + } + }, + "com.amazonaws.timestreamquery#ErrorReportLocation": { + "type": "structure", + "members": { + "S3ReportLocation": { + "target": "com.amazonaws.timestreamquery#S3ReportLocation", + "traits": { + "smithy.api#documentation": "

The S3 location where error reports are written.

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

This contains the location of the error report for a single scheduled query call.\n

" + } + }, + "com.amazonaws.timestreamquery#ExecuteScheduledQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#ExecuteScheduledQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

You can use this API to run a scheduled query manually.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.timestreamquery#ExecuteScheduledQueryRequest": { + "type": "structure", + "members": { + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

ARN of the scheduled query.

", + "smithy.api#required": {} + } + }, + "InvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

The timestamp in UTC. Query will be run as if it was invoked at this timestamp.

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

Not used.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.timestreamquery#ExecutionStats": { + "type": "structure", + "members": { + "ExecutionTimeInMillis": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Total time, measured in milliseconds, that was needed for the scheduled query run to complete.

" + } + }, + "DataWrites": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Data writes metered for records ingested in a single scheduled query run.

" + } + }, + "BytesMetered": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Bytes metered for a single scheduled query run.

" + } + }, + "RecordsIngested": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of records ingested for a single scheduled query run.

" + } + }, + "QueryResultRows": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Number of rows present in the output from running a query before ingestion to\n destination data source.

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

Statistics for a single scheduled query run.

" + } + }, + "com.amazonaws.timestreamquery#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

\n Timestream was unable to fully process this request because of an internal\n server error.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.timestreamquery#InvalidEndpointException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The requested endpoint was not valid.

", + "smithy.api#error": "client", + "smithy.api#httpError": 421 + } + }, + "com.amazonaws.timestreamquery#ListScheduledQueries": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#ListScheduledQueriesRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#ListScheduledQueriesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries is eventually consistent.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.timestreamquery#ListScheduledQueriesRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.timestreamquery#MaxScheduledQueriesResults", + "traits": { + "smithy.api#documentation": "

The maximum number of items to return in the output. If the total number of items\n available is more than the value specified, a NextToken is provided in the\n output. To resume pagination, provide the NextToken value as the argument\n to the subsequent call to ListScheduledQueriesRequest.

" + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamquery#NextScheduledQueriesResultsToken", + "traits": { + "smithy.api#documentation": "

A pagination token to resume pagination.

" + } + } + } + }, + "com.amazonaws.timestreamquery#ListScheduledQueriesResponse": { + "type": "structure", + "members": { + "ScheduledQueries": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryList", + "traits": { + "smithy.api#documentation": "

A list of scheduled queries.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamquery#NextScheduledQueriesResultsToken", + "traits": { + "smithy.api#documentation": "

A token to specify where to start paginating. This is the NextToken from a previously\n truncated response.

" + } + } + } + }, + "com.amazonaws.timestreamquery#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

List all tags on a Timestream query resource.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.timestreamquery#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Timestream resource with tags to be listed. This value is an Amazon Resource Name\n (ARN).

", + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.timestreamquery#MaxTagsForResourceResult", + "traits": { + "smithy.api#documentation": "

The maximum number of tags to return.

" + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamquery#NextTagsForResourceResultsToken", + "traits": { + "smithy.api#documentation": "

A pagination token to resume pagination.

" + } + } + } + }, + "com.amazonaws.timestreamquery#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.timestreamquery#TagList", + "traits": { + "smithy.api#documentation": "

The tags currently associated with the Timestream resource.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamquery#NextTagsForResourceResultsToken", + "traits": { + "smithy.api#documentation": "

A pagination token to resume pagination with a subsequent call to\n ListTagsForResourceResponse.

" + } + } + } + }, + "com.amazonaws.timestreamquery#Long": { + "type": "long", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.timestreamquery#MaxQueryResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.timestreamquery#MaxScheduledQueriesResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.timestreamquery#MaxTagsForResourceResult": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.timestreamquery#MeasureValueType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BIGINT", + "name": "BIGINT" + }, + { + "value": "BOOLEAN", + "name": "BOOLEAN" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + }, + { + "value": "VARCHAR", + "name": "VARCHAR" + }, + { + "value": "MULTI", + "name": "MULTI" + } + ] + } + }, + "com.amazonaws.timestreamquery#MixedMeasureMapping": { + "type": "structure", + "members": { + "MeasureName": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

Refers to the value of measure_name in a result row. This field is required if\n MeasureNameColumn is provided.

" + } + }, + "SourceColumn": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

This field refers to the source column from which measure-value is to be read for\n result materialization.

" + } + }, + "TargetMeasureName": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

Target measure name to be used. If not provided, the target measure name by default\n would be measure-name if provided, or sourceColumn otherwise.

" + } + }, + "MeasureValueType": { + "target": "com.amazonaws.timestreamquery#MeasureValueType", + "traits": { + "smithy.api#documentation": "

Type of the value that is to be read from sourceColumn. If the mapping is for MULTI,\n use MeasureValueType.MULTI.

", + "smithy.api#required": {} + } + }, + "MultiMeasureAttributeMappings": { + "target": "com.amazonaws.timestreamquery#MultiMeasureAttributeMappingList", + "traits": { + "smithy.api#documentation": "

Required when measureValueType is MULTI. Attribute mappings for MULTI value\n measures.

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

MixedMeasureMappings are mappings that can be used to ingest data into a mixture of\n narrow and multi measures in the derived table.

" + } + }, + "com.amazonaws.timestreamquery#MixedMeasureMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#MixedMeasureMapping" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamquery#MultiMeasureAttributeMapping": { + "type": "structure", + "members": { + "SourceColumn": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

Source column from where the attribute value is to be read.

", + "smithy.api#required": {} + } + }, + "TargetMultiMeasureAttributeName": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

Custom name to be used for attribute name in derived table. If not provided, source\n column name would be used.

" + } + }, + "MeasureValueType": { + "target": "com.amazonaws.timestreamquery#ScalarMeasureValueType", + "traits": { + "smithy.api#documentation": "

Type of the attribute to be read from the source column.

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

Attribute mapping for MULTI value measures.

" + } + }, + "com.amazonaws.timestreamquery#MultiMeasureAttributeMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#MultiMeasureAttributeMapping" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamquery#MultiMeasureMappings": { + "type": "structure", + "members": { + "TargetMultiMeasureName": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

The name of the target multi-measure name in the derived table. This input is required\n when measureNameColumn is not provided. If MeasureNameColumn is provided, then value\n from that column will be used as multi-measure name.

" + } + }, + "MultiMeasureAttributeMappings": { + "target": "com.amazonaws.timestreamquery#MultiMeasureAttributeMappingList", + "traits": { + "smithy.api#documentation": "

Required. Attribute mappings to be used for mapping query results to ingest data for\n multi-measure attributes.

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

Only one of MixedMeasureMappings or MultiMeasureMappings is to be provided.\n MultiMeasureMappings can be used to ingest data as multi measures in the derived\n table.

" + } + }, + "com.amazonaws.timestreamquery#NextScheduledQueriesResultsToken": { + "type": "string" + }, + "com.amazonaws.timestreamquery#NextTagsForResourceResultsToken": { + "type": "string" + }, + "com.amazonaws.timestreamquery#NotificationConfiguration": { + "type": "structure", + "members": { + "SnsConfiguration": { + "target": "com.amazonaws.timestreamquery#SnsConfiguration", + "traits": { + "smithy.api#documentation": "

Details on SNS configuration.

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

Notification configuration for a scheduled query. A notification is sent by\n Timestream when a scheduled query is created, its state is updated or when it is deleted.

" + } + }, + "com.amazonaws.timestreamquery#NullableBoolean": { + "type": "boolean" + }, + "com.amazonaws.timestreamquery#PaginationToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.timestreamquery#ParameterMapping": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamquery#String", + "traits": { + "smithy.api#documentation": "

Parameter name.

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

Mapping for named parameters.

" + } + }, + "com.amazonaws.timestreamquery#ParameterMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#ParameterMapping" + } + }, + "com.amazonaws.timestreamquery#PrepareQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#PrepareQueryRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#PrepareQueryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

A synchronous operation that allows you to submit a query with parameters to be stored\n by Timestream for later running. Timestream only supports using this operation with the\n PrepareQueryRequest$ValidateOnly set to true.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.timestreamquery#PrepareQueryRequest": { + "type": "structure", + "members": { + "QueryString": { + "target": "com.amazonaws.timestreamquery#QueryString", + "traits": { + "smithy.api#documentation": "

The Timestream query string that you want to use as a prepared statement. Parameter\n names can be specified in the query string @ character followed by an\n identifier.

", + "smithy.api#required": {} + } + }, + "ValidateOnly": { + "target": "com.amazonaws.timestreamquery#NullableBoolean", + "traits": { + "smithy.api#documentation": "

By setting this value to true, Timestream will only validate that the\n query string is a valid Timestream query, and not store the prepared query for later\n use.

" + } + } + } + }, + "com.amazonaws.timestreamquery#PrepareQueryResponse": { + "type": "structure", + "members": { + "QueryString": { + "target": "com.amazonaws.timestreamquery#QueryString", + "traits": { + "smithy.api#documentation": "

The query string that you want prepare.

", + "smithy.api#required": {} + } + }, + "Columns": { + "target": "com.amazonaws.timestreamquery#SelectColumnList", + "traits": { + "smithy.api#documentation": "

A list of SELECT clause columns of the submitted query string.

", + "smithy.api#required": {} + } + }, + "Parameters": { + "target": "com.amazonaws.timestreamquery#ParameterMappingList", + "traits": { + "smithy.api#documentation": "

A list of parameters used in the submitted query string.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#Query": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#QueryRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#QueryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#ConflictException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#QueryExecutionException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

\n Query is a synchronous operation that enables you to run a query against\n your Amazon Timestream data. Query will time out after 60 seconds.\n You must update the default timeout in the SDK to support a timeout of 60 seconds. See\n the code\n sample for details.

\n

Your query request will fail in the following cases:

\n
    \n
  • \n

    If you submit a Query request with the same client token outside\n of the 5-minute idempotency window.

    \n
  • \n
  • \n

    If you submit a Query request with the same client token, but\n change other parameters, within the 5-minute idempotency window.

    \n
  • \n
  • \n

    If the size of the row (including the query metadata) exceeds 1 MB, then the\n query will fail with the following error message:

    \n

    \n Query aborted as max page response size has been exceeded by the output\n result row\n

    \n
  • \n
  • \n

    If the IAM principal of the query initiator and the result reader are not the\n same and/or the query initiator and the result reader do not have the same query\n string in the query requests, the query will fail with an Invalid\n pagination token error.

    \n
  • \n
", + "smithy.api#idempotent": {}, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Rows", + "pageSize": "MaxRows" + } + } + }, + "com.amazonaws.timestreamquery#QueryExecutionException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

\n Timestream was unable to run the query successfully.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.timestreamquery#QueryId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[a-zA-Z0-9]+$" + } + }, + "com.amazonaws.timestreamquery#QueryRequest": { + "type": "structure", + "members": { + "QueryString": { + "target": "com.amazonaws.timestreamquery#QueryString", + "traits": { + "smithy.api#documentation": "

The query to be run by Timestream.

", + "smithy.api#required": {} + } + }, + "ClientToken": { + "target": "com.amazonaws.timestreamquery#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

Unique, case-sensitive string of up to 64 ASCII characters specified when a\n Query request is made. Providing a ClientToken makes the\n call to Query\n idempotent. This means that running the same query repeatedly will\n produce the same result. In other words, making multiple identical Query\n requests has the same effect as making a single request. When using\n ClientToken in a query, note the following:

\n
    \n
  • \n

    If the Query API is instantiated without a ClientToken, the\n Query SDK generates a ClientToken on your behalf.

    \n
  • \n
  • \n

    If the Query invocation only contains the\n ClientToken but does not include a NextToken, that\n invocation of Query is assumed to be a new query run.

    \n
  • \n
  • \n

    If the invocation contains NextToken, that particular invocation\n is assumed to be a subsequent invocation of a prior call to the Query API, and a\n result set is returned.

    \n
  • \n
  • \n

    After 4 hours, any request with the same ClientToken is treated\n as a new request.

    \n
  • \n
", + "smithy.api#idempotencyToken": {} + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamquery#PaginationToken", + "traits": { + "smithy.api#documentation": "

A pagination token used to return a set of results. When the Query API\n is invoked using NextToken, that particular invocation is assumed to be a\n subsequent invocation of a prior call to Query, and a result set is\n returned. However, if the Query invocation only contains the\n ClientToken, that invocation of Query is assumed to be a\n new query run.

\n

Note the following when using NextToken in a query:

\n
    \n
  • \n

    A pagination token can be used for up to five Query invocations,\n OR for a duration of up to 1 hour – whichever comes first.

    \n
  • \n
  • \n

    Using the same NextToken will return the same set of records. To\n keep paginating through the result set, you must to use the most recent\n nextToken.

    \n
  • \n
  • \n

    Suppose a Query invocation returns two NextToken\n values, TokenA and TokenB. If TokenB is\n used in a subsequent Query invocation, then TokenA is\n invalidated and cannot be reused.

    \n
  • \n
  • \n

    To request a previous result set from a query after pagination has begun, you\n must re-invoke the Query API.

    \n
  • \n
  • \n

    The latest NextToken should be used to paginate until\n null is returned, at which point a new NextToken\n should be used.

    \n
  • \n
  • \n

    If the IAM principal of the query initiator and the result reader are not the\n same and/or the query initiator and the result reader do not have the same query\n string in the query requests, the query will fail with an Invalid\n pagination token error.

    \n
  • \n
" + } + }, + "MaxRows": { + "target": "com.amazonaws.timestreamquery#MaxQueryResults", + "traits": { + "smithy.api#documentation": "

The total number of rows to be returned in the Query output. The initial\n run of Query with a MaxRows value specified will return the\n result set of the query in two cases:

\n
    \n
  • \n

    The size of the result is less than 1MB.

    \n
  • \n
  • \n

    The number of rows in the result set is less than the value of\n maxRows.

    \n
  • \n
\n

Otherwise, the initial invocation of Query only returns a\n NextToken, which can then be used in subsequent calls to fetch the\n result set. To resume pagination, provide the NextToken value in the\n subsequent command.

\n

If the row size is large (e.g. a row has many columns), Timestream may return\n fewer rows to keep the response size from exceeding the 1 MB limit. If\n MaxRows is not provided, Timestream will send the necessary\n number of rows to meet the 1 MB limit.

" + } + } + } + }, + "com.amazonaws.timestreamquery#QueryResponse": { + "type": "structure", + "members": { + "QueryId": { + "target": "com.amazonaws.timestreamquery#QueryId", + "traits": { + "smithy.api#documentation": "

A unique ID for the given query.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamquery#PaginationToken", + "traits": { + "smithy.api#documentation": "

A pagination token that can be used again on a Query call to get the\n next set of results.

" + } + }, + "Rows": { + "target": "com.amazonaws.timestreamquery#RowList", + "traits": { + "smithy.api#documentation": "

The result set rows returned by the query.

", + "smithy.api#required": {} + } + }, + "ColumnInfo": { + "target": "com.amazonaws.timestreamquery#ColumnInfoList", + "traits": { + "smithy.api#documentation": "

The column data types of the returned result set.

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

Information about the status of the query, including progress and bytes\n scanned.

" + } + } + } + }, + "com.amazonaws.timestreamquery#QueryStatus": { + "type": "structure", + "members": { + "ProgressPercentage": { + "target": "com.amazonaws.timestreamquery#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The progress of the query, expressed as a percentage.

" + } + }, + "CumulativeBytesScanned": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The amount of data scanned by the query in bytes. This is a cumulative sum and\n represents the total amount of bytes scanned since the query was started.

" + } + }, + "CumulativeBytesMetered": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The amount of data scanned by the query in bytes that you will be charged for. This is\n a cumulative sum and represents the total amount of data that you will be charged for\n since the query was started. The charge is applied only once and is either applied when\n the query completes running or when the query is cancelled.

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

Information about the status of the query, including progress and bytes\n scanned.

" + } + }, + "com.amazonaws.timestreamquery#QueryString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 262144 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.timestreamquery#ResourceName": { + "type": "string" + }, + "com.amazonaws.timestreamquery#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + }, + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The ARN of the scheduled query.

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

The requested resource could not be found.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.timestreamquery#Row": { + "type": "structure", + "members": { + "Data": { + "target": "com.amazonaws.timestreamquery#DatumList", + "traits": { + "smithy.api#documentation": "

List of data points in a single row of the result set.

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

Represents a single row in the query results.

" + } + }, + "com.amazonaws.timestreamquery#RowList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#Row" + } + }, + "com.amazonaws.timestreamquery#S3BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + }, + "smithy.api#pattern": "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$" + } + }, + "com.amazonaws.timestreamquery#S3Configuration": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamquery#S3BucketName", + "traits": { + "smithy.api#documentation": "

Name of the S3 bucket under which error reports will be created.

", + "smithy.api#required": {} + } + }, + "ObjectKeyPrefix": { + "target": "com.amazonaws.timestreamquery#S3ObjectKeyPrefix", + "traits": { + "smithy.api#documentation": "

Prefix for the error report key. Timestream by default adds the following prefix to\n the error report path.

" + } + }, + "EncryptionOption": { + "target": "com.amazonaws.timestreamquery#S3EncryptionOption", + "traits": { + "smithy.api#documentation": "

Encryption at rest options for the error reports. If no encryption option is\n specified, Timestream will choose SSE_S3 as default.

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

Details on S3 location for error reports that result from running a query.

" + } + }, + "com.amazonaws.timestreamquery#S3EncryptionOption": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SSE_S3", + "name": "SSE_S3" + }, + { + "value": "SSE_KMS", + "name": "SSE_KMS" + } + ] + } + }, + "com.amazonaws.timestreamquery#S3ObjectKey": { + "type": "string" + }, + "com.amazonaws.timestreamquery#S3ObjectKeyPrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 896 + }, + "smithy.api#pattern": "^[a-zA-Z0-9|!\\-_*'\\(\\)]([a-zA-Z0-9]|[!\\-_*'\\(\\)\\/.])+$" + } + }, + "com.amazonaws.timestreamquery#S3ReportLocation": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamquery#S3BucketName", + "traits": { + "smithy.api#documentation": "

S3 bucket name.

" + } + }, + "ObjectKey": { + "target": "com.amazonaws.timestreamquery#S3ObjectKey", + "traits": { + "smithy.api#documentation": "

S3 key.

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

S3 report location for the scheduled query run.

" + } + }, + "com.amazonaws.timestreamquery#ScalarMeasureValueType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BIGINT", + "name": "BIGINT" + }, + { + "value": "BOOLEAN", + "name": "BOOLEAN" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + }, + { + "value": "VARCHAR", + "name": "VARCHAR" + }, + { + "value": "TIMESTAMP", + "name": "TIMESTAMP" + } + ] + } + }, + "com.amazonaws.timestreamquery#ScalarType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "VARCHAR", + "name": "VARCHAR" + }, + { + "value": "BOOLEAN", + "name": "BOOLEAN" + }, + { + "value": "BIGINT", + "name": "BIGINT" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + }, + { + "value": "TIMESTAMP", + "name": "TIMESTAMP" + }, + { + "value": "DATE", + "name": "DATE" + }, + { + "value": "TIME", + "name": "TIME" + }, + { + "value": "INTERVAL_DAY_TO_SECOND", + "name": "INTERVAL_DAY_TO_SECOND" + }, + { + "value": "INTERVAL_YEAR_TO_MONTH", + "name": "INTERVAL_YEAR_TO_MONTH" + }, + { + "value": "UNKNOWN", + "name": "UNKNOWN" + }, + { + "value": "INTEGER", + "name": "INTEGER" + } + ] + } + }, + "com.amazonaws.timestreamquery#ScalarValue": { + "type": "string" + }, + "com.amazonaws.timestreamquery#ScheduleConfiguration": { + "type": "structure", + "members": { + "ScheduleExpression": { + "target": "com.amazonaws.timestreamquery#ScheduleExpression", + "traits": { + "smithy.api#documentation": "

An expression that denotes when to trigger the scheduled query run. This can be a cron\n expression or a rate expression.

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

Configuration of the schedule of the query.

" + } + }, + "com.amazonaws.timestreamquery#ScheduleExpression": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.timestreamquery#ScheduledQuery": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryName", + "traits": { + "smithy.api#documentation": "

The name of the scheduled query.

", + "smithy.api#required": {} + } + }, + "CreationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

The creation time of the scheduled query.

" + } + }, + "State": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryState", + "traits": { + "smithy.api#documentation": "

State of scheduled query.

", + "smithy.api#required": {} + } + }, + "PreviousInvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

The last time the scheduled query was run.

" + } + }, + "NextInvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

The next time the scheduled query is to be run.

" + } + }, + "ErrorReportConfiguration": { + "target": "com.amazonaws.timestreamquery#ErrorReportConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration for scheduled query error reporting.

" + } + }, + "TargetDestination": { + "target": "com.amazonaws.timestreamquery#TargetDestination", + "traits": { + "smithy.api#documentation": "

Target data source where final scheduled query result will be written.

" + } + }, + "LastRunStatus": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunStatus", + "traits": { + "smithy.api#documentation": "

Status of the last scheduled query run.

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

Scheduled Query

" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryDescription": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

Scheduled query ARN.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryName", + "traits": { + "smithy.api#documentation": "

Name of the scheduled query.

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

The query to be run.

", + "smithy.api#required": {} + } + }, + "CreationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

Creation time of the scheduled query.

" + } + }, + "State": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryState", + "traits": { + "smithy.api#documentation": "

State of the scheduled query.

", + "smithy.api#required": {} + } + }, + "PreviousInvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

Last time the query was run.

" + } + }, + "NextInvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

The next time the scheduled query is scheduled to run.

" + } + }, + "ScheduleConfiguration": { + "target": "com.amazonaws.timestreamquery#ScheduleConfiguration", + "traits": { + "smithy.api#documentation": "

Schedule configuration.

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

Notification configuration.

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

Scheduled query target store configuration.

" + } + }, + "ScheduledQueryExecutionRoleArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

IAM role that Timestream uses to run the schedule query.

" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamquery#StringValue2048", + "traits": { + "smithy.api#documentation": "

A customer provided KMS key used to encrypt the scheduled query resource.

" + } + }, + "ErrorReportConfiguration": { + "target": "com.amazonaws.timestreamquery#ErrorReportConfiguration", + "traits": { + "smithy.api#documentation": "

Error-reporting configuration for the scheduled query.

" + } + }, + "LastRunSummary": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunSummary", + "traits": { + "smithy.api#documentation": "

Runtime summary for the last scheduled query run.

" + } + }, + "RecentlyFailedRuns": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunSummaryList", + "traits": { + "smithy.api#documentation": "

Runtime summary for the last five failed scheduled query runs.

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

Structure that describes scheduled query.

" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#ScheduledQuery" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryRunStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AUTO_TRIGGER_SUCCESS", + "name": "AUTO_TRIGGER_SUCCESS" + }, + { + "value": "AUTO_TRIGGER_FAILURE", + "name": "AUTO_TRIGGER_FAILURE" + }, + { + "value": "MANUAL_TRIGGER_SUCCESS", + "name": "MANUAL_TRIGGER_SUCCESS" + }, + { + "value": "MANUAL_TRIGGER_FAILURE", + "name": "MANUAL_TRIGGER_FAILURE" + } + ] + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryRunSummary": { + "type": "structure", + "members": { + "InvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

InvocationTime for this run. This is the time at which the query is scheduled to run.\n Parameter @scheduled_runtime can be used in the query to get the value.

" + } + }, + "TriggerTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "

The actual time when the query was run.

" + } + }, + "RunStatus": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunStatus", + "traits": { + "smithy.api#documentation": "

The status of a scheduled query run.

" + } + }, + "ExecutionStats": { + "target": "com.amazonaws.timestreamquery#ExecutionStats", + "traits": { + "smithy.api#documentation": "

Runtime statistics for a scheduled run.

" + } + }, + "ErrorReportLocation": { + "target": "com.amazonaws.timestreamquery#ErrorReportLocation", + "traits": { + "smithy.api#documentation": "

S3 location for error report.

" + } + }, + "FailureReason": { + "target": "com.amazonaws.timestreamquery#ErrorMessage", + "traits": { + "smithy.api#documentation": "

Error message for the scheduled query in case of failure. You might have to look at\n the error report to get more detailed error reasons.

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

Run summary for the scheduled query

" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryRunSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunSummary" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + } + ] + } + }, + "com.amazonaws.timestreamquery#SchemaName": { + "type": "string" + }, + "com.amazonaws.timestreamquery#SelectColumn": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamquery#String", + "traits": { + "smithy.api#documentation": "

Name of the column.

" + } + }, + "Type": { + "target": "com.amazonaws.timestreamquery#Type" + }, + "DatabaseName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "

Database that has this column.

" + } + }, + "TableName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "

Table within the database that has this column.

" + } + }, + "Aliased": { + "target": "com.amazonaws.timestreamquery#NullableBoolean", + "traits": { + "smithy.api#documentation": "

True, if the column name was aliased by the query. False otherwise.

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

Details of the column that is returned by the query.

" + } + }, + "com.amazonaws.timestreamquery#SelectColumnList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#SelectColumn" + } + }, + "com.amazonaws.timestreamquery#ServiceErrorMessage": { + "type": "string" + }, + "com.amazonaws.timestreamquery#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

You have exceeded the service quota.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.timestreamquery#SnsConfiguration": { + "type": "structure", + "members": { + "TopicArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

SNS topic ARN that the scheduled query status notifications will be sent to.

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

Details on SNS that are required to send the notification.

" + } + }, + "com.amazonaws.timestreamquery#String": { + "type": "string" + }, + "com.amazonaws.timestreamquery#StringValue2048": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.timestreamquery#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.timestreamquery#TagKey", + "traits": { + "smithy.api#documentation": "

The key of the tag. Tag keys are case sensitive.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.timestreamquery#TagValue", + "traits": { + "smithy.api#documentation": "

The value of the tag. Tag values are case sensitive and can be null.

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

A tag is a label that you assign to a Timestream database and/or table. Each tag\n consists of a key and an optional value, both of which you define. Tags enable you to\n categorize databases and/or tables, for example, by purpose, owner, or environment.\n

" + } + }, + "com.amazonaws.timestreamquery#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.timestreamquery#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.timestreamquery#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.timestreamquery#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Associate a set of tags with a Timestream resource. You can then activate these\n user-defined tags so that they appear on the Billing and Cost Management console for\n cost allocation tracking.

" + } + }, + "com.amazonaws.timestreamquery#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

Identifies the Timestream resource to which tags should be added. This value is an\n Amazon Resource Name (ARN).

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.timestreamquery#TagList", + "traits": { + "smithy.api#documentation": "

The tags to be assigned to the Timestream resource.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.timestreamquery#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.timestreamquery#TargetConfiguration": { + "type": "structure", + "members": { + "TimestreamConfiguration": { + "target": "com.amazonaws.timestreamquery#TimestreamConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration needed to write data into the Timestream database and table.

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

Configuration used for writing the output of a query.

" + } + }, + "com.amazonaws.timestreamquery#TargetDestination": { + "type": "structure", + "members": { + "TimestreamDestination": { + "target": "com.amazonaws.timestreamquery#TimestreamDestination", + "traits": { + "smithy.api#documentation": "

Query result destination details for Timestream data source.

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

Destination details to write data for a target data source. Current supported data\n source is Timestream.

" + } + }, + "com.amazonaws.timestreamquery#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.timestreamquery#Time": { + "type": "timestamp" + }, + "com.amazonaws.timestreamquery#TimeSeriesDataPoint": { + "type": "structure", + "members": { + "Time": { + "target": "com.amazonaws.timestreamquery#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the measure value was collected.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.timestreamquery#Datum", + "traits": { + "smithy.api#documentation": "

The measure value for the data point.

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

The timeseries data type represents the values of a measure over time. A time series\n is an array of rows of timestamps and measure values, with rows sorted in ascending\n order of time. A TimeSeriesDataPoint is a single data point in the time series. It\n represents a tuple of (time, measure value) in a time series.

" + } + }, + "com.amazonaws.timestreamquery#TimeSeriesDataPointList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#TimeSeriesDataPoint" + } + }, + "com.amazonaws.timestreamquery#Timestamp": { + "type": "string" + }, + "com.amazonaws.timestreamquery#TimestreamConfiguration": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "

Name of Timestream database to which the query result will be written.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "

Name of Timestream table that the query result will be written to. The table should\n be within the same database that is provided in Timestream configuration.

", + "smithy.api#required": {} + } + }, + "TimeColumn": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

Column from query result that should be used as the time column in destination table.\n Column type for this should be TIMESTAMP.

", + "smithy.api#required": {} + } + }, + "DimensionMappings": { + "target": "com.amazonaws.timestreamquery#DimensionMappingList", + "traits": { + "smithy.api#documentation": "

This is to allow mapping column(s) from the query result to the dimension in the\n destination table.

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

Multi-measure mappings.

" + } + }, + "MixedMeasureMappings": { + "target": "com.amazonaws.timestreamquery#MixedMeasureMappingList", + "traits": { + "smithy.api#documentation": "

Specifies how to map measures to multi-measure records.

" + } + }, + "MeasureNameColumn": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "

Name of the measure column.

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

Configuration to write data into Timestream database and table. This configuration\n allows the user to map the query result select columns into the destination table\n columns.

" + } + }, + "com.amazonaws.timestreamquery#TimestreamDestination": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "

Timestream database name.

" + } + }, + "TableName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "

Timestream table name.

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

Destination for scheduled query.

" + } + }, + "com.amazonaws.timestreamquery#Timestream_20181101": { + "type": "service", + "version": "2018-11-01", + "operations": [ + { + "target": "com.amazonaws.timestreamquery#CancelQuery" + }, + { + "target": "com.amazonaws.timestreamquery#CreateScheduledQuery" + }, + { + "target": "com.amazonaws.timestreamquery#DeleteScheduledQuery" + }, + { + "target": "com.amazonaws.timestreamquery#DescribeEndpoints" + }, + { + "target": "com.amazonaws.timestreamquery#DescribeScheduledQuery" + }, + { + "target": "com.amazonaws.timestreamquery#ExecuteScheduledQuery" + }, + { + "target": "com.amazonaws.timestreamquery#ListScheduledQueries" + }, + { + "target": "com.amazonaws.timestreamquery#ListTagsForResource" + }, + { + "target": "com.amazonaws.timestreamquery#PrepareQuery" + }, + { + "target": "com.amazonaws.timestreamquery#Query" + }, + { + "target": "com.amazonaws.timestreamquery#TagResource" + }, + { + "target": "com.amazonaws.timestreamquery#UntagResource" + }, + { + "target": "com.amazonaws.timestreamquery#UpdateScheduledQuery" + } + ], + "traits": { + "aws.api#clientEndpointDiscovery": { + "operation": "com.amazonaws.timestreamquery#DescribeEndpoints", + "error": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + "aws.api#service": { + "sdkId": "Timestream Query", + "arnNamespace": "timestream", + "cloudFormationName": "TimestreamQuery", + "cloudTrailEventSource": "timestreamquery.amazonaws.com", + "endpointPrefix": "query.timestream" + }, + "aws.auth#sigv4": { + "name": "timestream" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "Amazon Timestream Query\n \n

", + "smithy.api#title": "Amazon Timestream Query", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "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" + }, + "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" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://query.timestream-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://query.timestream-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://query.timestream.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://query.timestream.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + } + ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.timestreamquery#Type": { + "type": "structure", + "members": { + "ScalarType": { + "target": "com.amazonaws.timestreamquery#ScalarType", + "traits": { + "smithy.api#documentation": "

Indicates if the column is of type string, integer, Boolean, double, timestamp, date,\n time.

" + } + }, + "ArrayColumnInfo": { + "target": "com.amazonaws.timestreamquery#ColumnInfo", + "traits": { + "smithy.api#documentation": "

Indicates if the column is an array.

" + } + }, + "TimeSeriesMeasureValueColumnInfo": { + "target": "com.amazonaws.timestreamquery#ColumnInfo", + "traits": { + "smithy.api#documentation": "

Indicates if the column is a timeseries data type.

" + } + }, + "RowColumnInfo": { + "target": "com.amazonaws.timestreamquery#ColumnInfoList", + "traits": { + "smithy.api#documentation": "

Indicates if the column is a row.

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

Contains the data type of a column in a query result set. The data type can be scalar\n or complex. The supported scalar data types are integers, Boolean, string, double,\n timestamp, date, time, and intervals. The supported complex data types are arrays, rows,\n and timeseries.

" + } + }, + "com.amazonaws.timestreamquery#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Removes the association of tags from a Timestream query resource.

" + } + }, + "com.amazonaws.timestreamquery#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Timestream resource that the tags will be removed from. This value is an Amazon\n Resource Name (ARN).

", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.timestreamquery#TagKeyList", + "traits": { + "smithy.api#documentation": "

A list of tags keys. Existing tags of the resource whose keys are members of this list\n will be removed from the Timestream resource.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.timestreamquery#UpdateScheduledQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#UpdateScheduledQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Update a scheduled query.

" + } + }, + "com.amazonaws.timestreamquery#UpdateScheduledQueryRequest": { + "type": "structure", + "members": { + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

ARN of the scheuled query.

", + "smithy.api#required": {} + } + }, + "State": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryState", + "traits": { + "smithy.api#documentation": "

State of the scheduled query.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

Invalid or malformed request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + } + } +} diff --git a/aws/sdk/aws-models/timestream-write.json b/aws/sdk/aws-models/timestream-write.json new file mode 100644 index 0000000000..568ab520a0 --- /dev/null +++ b/aws/sdk/aws-models/timestream-write.json @@ -0,0 +1,3663 @@ +{ + "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.timestreamwrite#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You are not authorized to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.timestreamwrite#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + } + } + }, + "com.amazonaws.timestreamwrite#BatchLoadDataFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" + } + } + } + }, + "com.amazonaws.timestreamwrite#BatchLoadProgressReport": { + "type": "structure", + "members": { + "RecordsProcessed": { + "target": "com.amazonaws.timestreamwrite#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

" + } + }, + "RecordsIngested": { + "target": "com.amazonaws.timestreamwrite#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

" + } + }, + "ParseFailures": { + "target": "com.amazonaws.timestreamwrite#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

" + } + }, + "RecordIngestionFailures": { + "target": "com.amazonaws.timestreamwrite#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

" + } + }, + "FileFailures": { + "target": "com.amazonaws.timestreamwrite#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

" + } + }, + "BytesMetered": { + "target": "com.amazonaws.timestreamwrite#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

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

Details about the progress of a batch load task.

" + } + }, + "com.amazonaws.timestreamwrite#BatchLoadStatus": { + "type": "enum", + "members": { + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATED" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "PROGRESS_STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROGRESS_STOPPED" + } + }, + "PENDING_RESUME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_RESUME" + } + } + } + }, + "com.amazonaws.timestreamwrite#BatchLoadTask": { + "type": "structure", + "members": { + "TaskId": { + "target": "com.amazonaws.timestreamwrite#BatchLoadTaskId", + "traits": { + "smithy.api#documentation": "

The ID of the batch load task.

" + } + }, + "TaskStatus": { + "target": "com.amazonaws.timestreamwrite#BatchLoadStatus", + "traits": { + "smithy.api#documentation": "

Status of the batch load task.

" + } + }, + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

Database name for the database into which a batch load task loads data.

" + } + }, + "TableName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

Table name for the table into which a batch load task loads data.

" + } + }, + "CreationTime": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

The time when the Timestream batch load task was created.

" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

The time when the Timestream batch load task was last updated.

" + } + }, + "ResumableUntil": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

\n

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

Details about a batch load task.

" + } + }, + "com.amazonaws.timestreamwrite#BatchLoadTaskDescription": { + "type": "structure", + "members": { + "TaskId": { + "target": "com.amazonaws.timestreamwrite#BatchLoadTaskId", + "traits": { + "smithy.api#documentation": "

The ID of the batch load task.

" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "

" + } + }, + "DataSourceConfiguration": { + "target": "com.amazonaws.timestreamwrite#DataSourceConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration details about the data source for a batch load task.

" + } + }, + "ProgressReport": { + "target": "com.amazonaws.timestreamwrite#BatchLoadProgressReport", + "traits": { + "smithy.api#documentation": "

" + } + }, + "ReportConfiguration": { + "target": "com.amazonaws.timestreamwrite#ReportConfiguration", + "traits": { + "smithy.api#documentation": "

Report configuration for a batch load task. This contains details about where error reports are stored.

" + } + }, + "DataModelConfiguration": { + "target": "com.amazonaws.timestreamwrite#DataModelConfiguration", + "traits": { + "smithy.api#documentation": "

Data model configuration for a batch load task. This contains details about where a data model for a batch load task is stored.

" + } + }, + "TargetDatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "TargetTableName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "TaskStatus": { + "target": "com.amazonaws.timestreamwrite#BatchLoadStatus", + "traits": { + "smithy.api#documentation": "

Status of the batch load task.

" + } + }, + "RecordVersion": { + "target": "com.amazonaws.timestreamwrite#RecordVersion", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

" + } + }, + "CreationTime": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

The time when the Timestream batch load task was created.

" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

The time when the Timestream batch load task was last updated.

" + } + }, + "ResumableUntil": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

\n

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

Details about a batch load task.

" + } + }, + "com.amazonaws.timestreamwrite#BatchLoadTaskId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 32 + }, + "smithy.api#pattern": "^[A-Z0-9]+$" + } + }, + "com.amazonaws.timestreamwrite#BatchLoadTaskList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#BatchLoadTask" + } + }, + "com.amazonaws.timestreamwrite#Boolean": { + "type": "boolean" + }, + "com.amazonaws.timestreamwrite#ClientRequestToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.timestreamwrite#ConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Timestream was unable to process this request because it contains resource that\n already exists.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.timestreamwrite#CreateBatchLoadTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#CreateBatchLoadTaskRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#CreateBatchLoadTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#ConflictException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Creates a new Timestream batch load task. A batch load task processes data from\n a CSV source in an S3 location and writes to a Timestream table. A mapping from\n source to target is defined in a batch load task. Errors and events are written to a report\n at an S3 location. For the report, if the KMS key is not specified, the\n batch load task will be encrypted with a Timestream managed KMS key\n located in your account. For more information, see Amazon Web Services managed\n keys. Service quotas apply. For\n details, see code\n sample.

" + } + }, + "com.amazonaws.timestreamwrite#CreateBatchLoadTaskRequest": { + "type": "structure", + "members": { + "ClientToken": { + "target": "com.amazonaws.timestreamwrite#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

", + "smithy.api#idempotencyToken": {} + } + }, + "DataModelConfiguration": { + "target": "com.amazonaws.timestreamwrite#DataModelConfiguration" + }, + "DataSourceConfiguration": { + "target": "com.amazonaws.timestreamwrite#DataSourceConfiguration", + "traits": { + "smithy.api#documentation": "

Defines configuration details about the data source for a batch load task.

", + "smithy.api#required": {} + } + }, + "ReportConfiguration": { + "target": "com.amazonaws.timestreamwrite#ReportConfiguration", + "traits": { + "smithy.api#required": {} + } + }, + "TargetDatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceCreateAPIName", + "traits": { + "smithy.api#documentation": "

Target Timestream database for a batch load task.

", + "smithy.api#required": {} + } + }, + "TargetTableName": { + "target": "com.amazonaws.timestreamwrite#ResourceCreateAPIName", + "traits": { + "smithy.api#documentation": "

Target Timestream table for a batch load task.

", + "smithy.api#required": {} + } + }, + "RecordVersion": { + "target": "com.amazonaws.timestreamwrite#RecordVersion", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#CreateBatchLoadTaskResponse": { + "type": "structure", + "members": { + "TaskId": { + "target": "com.amazonaws.timestreamwrite#BatchLoadTaskId", + "traits": { + "smithy.api#documentation": "

The ID of the batch load task.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#CreateDatabase": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#CreateDatabaseRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#CreateDatabaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#ConflictException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Creates a new Timestream database. If the KMS key is not\n specified, the database will be encrypted with a Timestream managed KMS key located in your account. For more information, see Amazon Web Services managed keys. Service quotas apply. For\n details, see code sample.\n

" + } + }, + "com.amazonaws.timestreamwrite#CreateDatabaseRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceCreateAPIName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database.

", + "smithy.api#required": {} + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "

The KMS key for the database. If the KMS key is not\n specified, the database will be encrypted with a Timestream managed KMS key located in your account. For more information, see Amazon Web Services managed keys.

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

A list of key-value pairs to label the table.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#CreateDatabaseResponse": { + "type": "structure", + "members": { + "Database": { + "target": "com.amazonaws.timestreamwrite#Database", + "traits": { + "smithy.api#documentation": "

The newly created Timestream database.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#CreateTable": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#CreateTableRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#CreateTableResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#ConflictException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Adds a new table to an existing database in your account. In an Amazon Web Services account, table names must be at least unique within each Region if they are in the same\n database. You might have identical table names in the same Region if the tables are in\n separate databases. While creating the table, you must specify the table name, database\n name, and the retention properties. Service quotas apply. See\n code\n sample for details.

" + } + }, + "com.amazonaws.timestreamwrite#CreateTableRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceCreateAPIName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.timestreamwrite#ResourceCreateAPIName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream table.

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

The duration for which your time-series data must be stored in the memory store and the\n magnetic store.

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

A list of key-value pairs to label the table.

" + } + }, + "MagneticStoreWriteProperties": { + "target": "com.amazonaws.timestreamwrite#MagneticStoreWriteProperties", + "traits": { + "smithy.api#documentation": "

Contains properties to set on the table when enabling magnetic store writes.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#CreateTableResponse": { + "type": "structure", + "members": { + "Table": { + "target": "com.amazonaws.timestreamwrite#Table", + "traits": { + "smithy.api#documentation": "

The newly created Timestream table.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#CsvConfiguration": { + "type": "structure", + "members": { + "ColumnSeparator": { + "target": "com.amazonaws.timestreamwrite#StringValue1", + "traits": { + "smithy.api#documentation": "

Column separator can be one of comma (','), pipe ('|), semicolon (';'), tab('/t'), or\n blank space (' ').

" + } + }, + "EscapeChar": { + "target": "com.amazonaws.timestreamwrite#StringValue1", + "traits": { + "smithy.api#documentation": "

Escape character can be one of

" + } + }, + "QuoteChar": { + "target": "com.amazonaws.timestreamwrite#StringValue1", + "traits": { + "smithy.api#documentation": "

Can be single quote (') or double quote (\").

" + } + }, + "NullValue": { + "target": "com.amazonaws.timestreamwrite#StringValue256", + "traits": { + "smithy.api#documentation": "

Can be blank space (' ').

" + } + }, + "TrimWhiteSpace": { + "target": "com.amazonaws.timestreamwrite#Boolean", + "traits": { + "smithy.api#documentation": "

Specifies to trim leading and trailing white space.

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

A delimited data format where the column separator can be a comma and the record\n separator is a newline character.

" + } + }, + "com.amazonaws.timestreamwrite#DataModel": { + "type": "structure", + "members": { + "TimeColumn": { + "target": "com.amazonaws.timestreamwrite#StringValue256", + "traits": { + "smithy.api#documentation": "

Source column to be mapped to time.

" + } + }, + "TimeUnit": { + "target": "com.amazonaws.timestreamwrite#TimeUnit", + "traits": { + "smithy.api#documentation": "

The granularity of the timestamp unit. It indicates if the time value is in seconds,\n milliseconds, nanoseconds, or other supported values. Default is MILLISECONDS.\n

" + } + }, + "DimensionMappings": { + "target": "com.amazonaws.timestreamwrite#DimensionMappings", + "traits": { + "smithy.api#documentation": "

Source to target mappings for dimensions.

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

Source to target mappings for multi-measure records.

" + } + }, + "MixedMeasureMappings": { + "target": "com.amazonaws.timestreamwrite#MixedMeasureMappingList", + "traits": { + "smithy.api#documentation": "

Source to target mappings for measures.

" + } + }, + "MeasureNameColumn": { + "target": "com.amazonaws.timestreamwrite#StringValue256", + "traits": { + "smithy.api#documentation": "

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

Data model for a batch load task.

" + } + }, + "com.amazonaws.timestreamwrite#DataModelConfiguration": { + "type": "structure", + "members": { + "DataModel": { + "target": "com.amazonaws.timestreamwrite#DataModel", + "traits": { + "smithy.api#documentation": "

" + } + }, + "DataModelS3Configuration": { + "target": "com.amazonaws.timestreamwrite#DataModelS3Configuration", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.timestreamwrite#DataModelS3Configuration": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamwrite#S3BucketName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "ObjectKey": { + "target": "com.amazonaws.timestreamwrite#S3ObjectKey", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.timestreamwrite#DataSourceConfiguration": { + "type": "structure", + "members": { + "DataSourceS3Configuration": { + "target": "com.amazonaws.timestreamwrite#DataSourceS3Configuration", + "traits": { + "smithy.api#documentation": "

Configuration of an S3 location for a file which contains data to load.

", + "smithy.api#required": {} + } + }, + "CsvConfiguration": { + "target": "com.amazonaws.timestreamwrite#CsvConfiguration" + }, + "DataFormat": { + "target": "com.amazonaws.timestreamwrite#BatchLoadDataFormat", + "traits": { + "smithy.api#documentation": "

This is currently CSV.

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

Defines configuration details about the data source.

" + } + }, + "com.amazonaws.timestreamwrite#DataSourceS3Configuration": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamwrite#S3BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name of the customer S3 bucket.

", + "smithy.api#required": {} + } + }, + "ObjectKeyPrefix": { + "target": "com.amazonaws.timestreamwrite#S3ObjectKey", + "traits": { + "smithy.api#documentation": "

\n

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

\n

" + } + }, + "com.amazonaws.timestreamwrite#Database": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name that uniquely identifies this database.

" + } + }, + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database.

" + } + }, + "TableCount": { + "target": "com.amazonaws.timestreamwrite#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The total number of tables found within a Timestream database.

" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "

The identifier of the KMS key used to encrypt the data stored in the\n database.

" + } + }, + "CreationTime": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

The time when the database was created, calculated from the Unix epoch time.

" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

The last time that this database was updated.

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

A top-level container for a table. Databases and tables are the fundamental management\n concepts in Amazon Timestream. All tables in a database are encrypted with the\n same KMS key.

" + } + }, + "com.amazonaws.timestreamwrite#DatabaseList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#Database" + } + }, + "com.amazonaws.timestreamwrite#Date": { + "type": "timestamp" + }, + "com.amazonaws.timestreamwrite#DeleteDatabase": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#DeleteDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Deletes a given Timestream database. This is an irreversible\n operation. After a database is deleted, the time-series data from its tables cannot be\n recovered.\n

\n \n

All tables in the database must be deleted first, or a ValidationException error will\n be thrown.

\n

Due to the nature of distributed retries, the operation can return either success or\n a ResourceNotFoundException. Clients should consider them equivalent.

\n
\n

See code sample\n for details.

" + } + }, + "com.amazonaws.timestreamwrite#DeleteDatabaseRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database to be deleted.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#DeleteTable": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#DeleteTableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Deletes a given Timestream table. This is an irreversible operation. After a\n Timestream database table is deleted, the time-series data stored in the table\n cannot be recovered.

\n \n

Due to the nature of distributed retries, the operation can return either success or\n a ResourceNotFoundException. Clients should consider them equivalent.

\n
\n

See code\n sample for details.

" + } + }, + "com.amazonaws.timestreamwrite#DeleteTableRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the database where the Timestream database is to be deleted.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream table to be deleted.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#DescribeBatchLoadTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#DescribeBatchLoadTaskRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#DescribeBatchLoadTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Returns information about the batch load task, including configurations, mappings,\n progress, and other details. Service quotas apply. See\n code\n sample for details.

" + } + }, + "com.amazonaws.timestreamwrite#DescribeBatchLoadTaskRequest": { + "type": "structure", + "members": { + "TaskId": { + "target": "com.amazonaws.timestreamwrite#BatchLoadTaskId", + "traits": { + "smithy.api#documentation": "

The ID of the batch load task.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#DescribeBatchLoadTaskResponse": { + "type": "structure", + "members": { + "BatchLoadTaskDescription": { + "target": "com.amazonaws.timestreamwrite#BatchLoadTaskDescription", + "traits": { + "smithy.api#documentation": "

Description of the batch load task.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#DescribeDatabase": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#DescribeDatabaseRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#DescribeDatabaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Returns information about the database, including the database name, time that the\n database was created, and the total number of tables found within the database. Service\n quotas apply. See code sample\n for details.

" + } + }, + "com.amazonaws.timestreamwrite#DescribeDatabaseRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#DescribeDatabaseResponse": { + "type": "structure", + "members": { + "Database": { + "target": "com.amazonaws.timestreamwrite#Database", + "traits": { + "smithy.api#documentation": "

The name of the Timestream table.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#DescribeEndpoints": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#DescribeEndpointsRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#DescribeEndpointsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of available endpoints to make Timestream API calls against.\n This API operation is available through both the Write and Query APIs.

\n

Because the Timestream SDKs are designed to transparently work with the\n service’s architecture, including the management and mapping of the service endpoints,\n we don't recommend that you use this API operation unless:

\n \n

For detailed information on how and when to use and implement DescribeEndpoints, see\n The\n Endpoint Discovery Pattern.

" + } + }, + "com.amazonaws.timestreamwrite#DescribeEndpointsRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#DescribeEndpointsResponse": { + "type": "structure", + "members": { + "Endpoints": { + "target": "com.amazonaws.timestreamwrite#Endpoints", + "traits": { + "smithy.api#documentation": "

An Endpoints object is returned when a DescribeEndpoints\n request is made.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#DescribeTable": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#DescribeTableRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#DescribeTableResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Returns information about the table, including the table name, database name, retention\n duration of the memory store and the magnetic store. Service quotas apply. See\n code\n sample for details.

" + } + }, + "com.amazonaws.timestreamwrite#DescribeTableRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream table.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#DescribeTableResponse": { + "type": "structure", + "members": { + "Table": { + "target": "com.amazonaws.timestreamwrite#Table", + "traits": { + "smithy.api#documentation": "

The Timestream table.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#Dimension": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

Dimension represents the metadata attributes of the time series. For example, the name\n and Availability Zone of an EC2 instance or the name of the manufacturer of a wind turbine\n are dimensions.

\n

For constraints on dimension names, see Naming\n Constraints.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.timestreamwrite#SchemaValue", + "traits": { + "smithy.api#documentation": "

The value of the dimension.

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

The data type of the dimension for the time-series data point.

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

Represents the metadata attributes of the time series. For example, the name and\n Availability Zone of an EC2 instance or the name of the manufacturer of a wind turbine are\n dimensions.

" + } + }, + "com.amazonaws.timestreamwrite#DimensionMapping": { + "type": "structure", + "members": { + "SourceColumn": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "DestinationColumn": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

\n

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

" + } + }, + "com.amazonaws.timestreamwrite#DimensionMappings": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#DimensionMapping" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamwrite#DimensionValueType": { + "type": "enum", + "members": { + "VARCHAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VARCHAR" + } + } + } + }, + "com.amazonaws.timestreamwrite#Dimensions": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#Dimension" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + } + } + }, + "com.amazonaws.timestreamwrite#Endpoint": { + "type": "structure", + "members": { + "Address": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

An endpoint address.

", + "smithy.api#required": {} + } + }, + "CachePeriodInMinutes": { + "target": "com.amazonaws.timestreamwrite#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The TTL for the endpoint, in minutes.

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

Represents an available endpoint against which to make API calls against, as well as the\n TTL for that endpoint.

" + } + }, + "com.amazonaws.timestreamwrite#Endpoints": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#Endpoint" + } + }, + "com.amazonaws.timestreamwrite#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.timestreamwrite#Integer": { + "type": "integer", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.timestreamwrite#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Timestream was unable to fully process this request because of an internal server\n error.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.timestreamwrite#InvalidEndpointException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The requested endpoint was not valid.

", + "smithy.api#error": "client", + "smithy.api#httpError": 421 + } + }, + "com.amazonaws.timestreamwrite#ListBatchLoadTasks": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#ListBatchLoadTasksRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#ListBatchLoadTasksResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Provides a list of batch load tasks, along with the name, status, when the task is\n resumable until, and other details. See code\n sample for details.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.timestreamwrite#ListBatchLoadTasksRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

A token to specify where to start paginating. This is the NextToken from a previously\n truncated response.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.timestreamwrite#PageLimit", + "traits": { + "smithy.api#documentation": "

The total number of items to return in the output. If the total number of items\n available is more than the value specified, a NextToken is provided in the output. To\n resume pagination, provide the NextToken value as argument of a subsequent API\n invocation.

" + } + }, + "TaskStatus": { + "target": "com.amazonaws.timestreamwrite#BatchLoadStatus", + "traits": { + "smithy.api#documentation": "

Status of the batch load task.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#ListBatchLoadTasksResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

A token to specify where to start paginating. Provide the next\n ListBatchLoadTasksRequest.

" + } + }, + "BatchLoadTasks": { + "target": "com.amazonaws.timestreamwrite#BatchLoadTaskList", + "traits": { + "smithy.api#documentation": "

A list of batch load task details.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#ListDatabases": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#ListDatabasesRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#ListDatabasesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Returns a list of your Timestream databases. Service quotas apply. See\n code sample for\n details.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.timestreamwrite#ListDatabasesRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

The pagination token. To resume pagination, provide the NextToken value as argument of a\n subsequent API invocation.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.timestreamwrite#PaginationLimit", + "traits": { + "smithy.api#documentation": "

The total number of items to return in the output. If the total number of items\n available is more than the value specified, a NextToken is provided in the output. To\n resume pagination, provide the NextToken value as argument of a subsequent API\n invocation.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#ListDatabasesResponse": { + "type": "structure", + "members": { + "Databases": { + "target": "com.amazonaws.timestreamwrite#DatabaseList", + "traits": { + "smithy.api#documentation": "

A list of database names.

" + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

The pagination token. This parameter is returned when the response is truncated.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#ListTables": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#ListTablesRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#ListTablesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Provides a list of tables, along with the name, status, and retention properties of each\n table. See code sample\n for details.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.timestreamwrite#ListTablesRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database.

" + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

The pagination token. To resume pagination, provide the NextToken value as argument of a\n subsequent API invocation.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.timestreamwrite#PaginationLimit", + "traits": { + "smithy.api#documentation": "

The total number of items to return in the output. If the total number of items\n available is more than the value specified, a NextToken is provided in the output. To\n resume pagination, provide the NextToken value as argument of a subsequent API\n invocation.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#ListTablesResponse": { + "type": "structure", + "members": { + "Tables": { + "target": "com.amazonaws.timestreamwrite#TableList", + "traits": { + "smithy.api#documentation": "

A list of tables.

" + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

A token to specify where to start paginating. This is the NextToken from a previously\n truncated response.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Lists all tags on a Timestream resource.

" + } + }, + "com.amazonaws.timestreamwrite#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamwrite#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Timestream resource with tags to be listed. This value is an Amazon\n Resource Name (ARN).

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.timestreamwrite#TagList", + "traits": { + "smithy.api#documentation": "

The tags currently associated with the Timestream resource.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#Long": { + "type": "long", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.timestreamwrite#MagneticStoreRejectedDataLocation": { + "type": "structure", + "members": { + "S3Configuration": { + "target": "com.amazonaws.timestreamwrite#S3Configuration", + "traits": { + "smithy.api#documentation": "

Configuration of an S3 location to write error reports for records rejected,\n asynchronously, during magnetic store writes.

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

The location to write error reports for records rejected, asynchronously, during\n magnetic store writes.

" + } + }, + "com.amazonaws.timestreamwrite#MagneticStoreRetentionPeriodInDays": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 1, + "max": 73000 + } + } + }, + "com.amazonaws.timestreamwrite#MagneticStoreWriteProperties": { + "type": "structure", + "members": { + "EnableMagneticStoreWrites": { + "target": "com.amazonaws.timestreamwrite#Boolean", + "traits": { + "smithy.api#documentation": "

A flag to enable magnetic store writes.

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

The location to write error reports for records rejected asynchronously during magnetic\n store writes.

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

The set of properties on a table for configuring magnetic store writes.

" + } + }, + "com.amazonaws.timestreamwrite#MeasureValue": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

The name of the MeasureValue.

\n

For constraints on MeasureValue names, see Naming Constraints in the Amazon Timestream Developer Guide.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "

The value for the MeasureValue.

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.timestreamwrite#MeasureValueType", + "traits": { + "smithy.api#documentation": "

Contains the data type of the MeasureValue for the time-series data point.

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

Represents the data attribute of the time series. For example, the CPU utilization of\n an EC2 instance or the RPM of a wind turbine are measures. MeasureValue has both name and\n value.

\n

MeasureValue is only allowed for type MULTI. Using MULTI\n type, you can pass multiple data attributes associated with the same time series in a\n single record

" + } + }, + "com.amazonaws.timestreamwrite#MeasureValueType": { + "type": "enum", + "members": { + "DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOUBLE" + } + }, + "BIGINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BIGINT" + } + }, + "VARCHAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VARCHAR" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOOLEAN" + } + }, + "TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMESTAMP" + } + }, + "MULTI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MULTI" + } + } + } + }, + "com.amazonaws.timestreamwrite#MeasureValues": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#MeasureValue" + } + }, + "com.amazonaws.timestreamwrite#MemoryStoreRetentionPeriodInHours": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 1, + "max": 8766 + } + } + }, + "com.amazonaws.timestreamwrite#MixedMeasureMapping": { + "type": "structure", + "members": { + "MeasureName": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "SourceColumn": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "TargetMeasureName": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "MeasureValueType": { + "target": "com.amazonaws.timestreamwrite#MeasureValueType", + "traits": { + "smithy.api#documentation": "

", + "smithy.api#required": {} + } + }, + "MultiMeasureAttributeMappings": { + "target": "com.amazonaws.timestreamwrite#MultiMeasureAttributeMappingList", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.timestreamwrite#MixedMeasureMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#MixedMeasureMapping" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamwrite#MultiMeasureAttributeMapping": { + "type": "structure", + "members": { + "SourceColumn": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

", + "smithy.api#required": {} + } + }, + "TargetMultiMeasureAttributeName": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "MeasureValueType": { + "target": "com.amazonaws.timestreamwrite#ScalarMeasureValueType", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.timestreamwrite#MultiMeasureAttributeMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#MultiMeasureAttributeMapping" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamwrite#MultiMeasureMappings": { + "type": "structure", + "members": { + "TargetMultiMeasureName": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

" + } + }, + "MultiMeasureAttributeMappings": { + "target": "com.amazonaws.timestreamwrite#MultiMeasureAttributeMappingList", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.timestreamwrite#PageLimit": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.timestreamwrite#PaginationLimit": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 20 + } + } + }, + "com.amazonaws.timestreamwrite#Record": { + "type": "structure", + "members": { + "Dimensions": { + "target": "com.amazonaws.timestreamwrite#Dimensions", + "traits": { + "smithy.api#documentation": "

Contains the list of dimensions for time-series data points.

" + } + }, + "MeasureName": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "

Measure represents the data attribute of the time series. For example, the CPU\n utilization of an EC2 instance or the RPM of a wind turbine are measures.

" + } + }, + "MeasureValue": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "

Contains the measure value for the time-series data point.

" + } + }, + "MeasureValueType": { + "target": "com.amazonaws.timestreamwrite#MeasureValueType", + "traits": { + "smithy.api#documentation": "

Contains the data type of the measure value for the time-series data point. Default\n type is DOUBLE.

" + } + }, + "Time": { + "target": "com.amazonaws.timestreamwrite#StringValue256", + "traits": { + "smithy.api#documentation": "

Contains the time at which the measure value for the data point was collected. The time\n value plus the unit provides the time elapsed since the epoch. For example, if the time\n value is 12345 and the unit is ms, then 12345 ms\n have elapsed since the epoch.

" + } + }, + "TimeUnit": { + "target": "com.amazonaws.timestreamwrite#TimeUnit", + "traits": { + "smithy.api#documentation": "

The granularity of the timestamp unit. It indicates if the time value is in seconds,\n milliseconds, nanoseconds, or other supported values. Default is MILLISECONDS.\n

" + } + }, + "Version": { + "target": "com.amazonaws.timestreamwrite#RecordVersion", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

64-bit attribute used for record updates. Write requests for duplicate data with a\n higher version number will update the existing measure value and version. In cases where\n the measure value is the same, Version will still be updated. Default value is\n 1.

\n \n

\n Version must be 1 or greater, or you will receive a\n ValidationException error.

\n
" + } + }, + "MeasureValues": { + "target": "com.amazonaws.timestreamwrite#MeasureValues", + "traits": { + "smithy.api#documentation": "

Contains the list of MeasureValue for time-series data points.

\n

This is only allowed for type MULTI. For scalar values, use\n MeasureValue attribute of the record directly.

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

Represents a time-series data point being written into Timestream. Each record\n contains an array of dimensions. Dimensions represent the metadata attributes of a\n time-series data point, such as the instance name or Availability Zone of an EC2 instance.\n A record also contains the measure name, which is the name of the measure being collected\n (for example, the CPU utilization of an EC2 instance). Additionally, a record contains the\n measure value and the value type, which is the data type of the measure value. Also, the\n record contains the timestamp of when the measure was collected and the timestamp unit,\n which represents the granularity of the timestamp.

\n

Records have a Version field, which is a 64-bit long that you\n can use for updating data points. Writes of a duplicate record with the same dimension,\n timestamp, and measure name but different measure value will only succeed if the\n Version attribute of the record in the write request is higher than that of\n the existing record. Timestream defaults to a Version of\n 1 for records without the Version field.

" + } + }, + "com.amazonaws.timestreamwrite#RecordIndex": { + "type": "integer", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.timestreamwrite#RecordVersion": { + "type": "long", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.timestreamwrite#Records": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#Record" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.timestreamwrite#RecordsIngested": { + "type": "structure", + "members": { + "Total": { + "target": "com.amazonaws.timestreamwrite#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Total count of successfully ingested records.

" + } + }, + "MemoryStore": { + "target": "com.amazonaws.timestreamwrite#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Count of records ingested into the memory store.

" + } + }, + "MagneticStore": { + "target": "com.amazonaws.timestreamwrite#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Count of records ingested into the magnetic store.

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

Information on the records ingested by this request.

" + } + }, + "com.amazonaws.timestreamwrite#RejectedRecord": { + "type": "structure", + "members": { + "RecordIndex": { + "target": "com.amazonaws.timestreamwrite#RecordIndex", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The index of the record in the input request for WriteRecords. Indexes begin with 0.\n

" + } + }, + "Reason": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage", + "traits": { + "smithy.api#documentation": "

The reason why a record was not successfully inserted into Timestream.\n Possible causes of failure include:

\n
    \n
  • \n

    Records with duplicate data where there are multiple records with the same\n dimensions, timestamps, and measure names but:

    \n
      \n
    • \n

      Measure values are different

      \n
    • \n
    • \n

      Version is not present in the request, or the value of\n version in the new record is equal to or lower than the existing value

      \n
    • \n
    \n

    If Timestream rejects data for this case, the\n ExistingVersion field in the RejectedRecords response\n will indicate the current record’s version. To force an update, you can resend the\n request with a version for the record set to a value greater than the\n ExistingVersion.

    \n
  • \n
  • \n

    Records with timestamps that lie outside the retention duration of the memory\n store.

    \n \n

    When the retention window is updated, you will receive a\n RejectedRecords exception if you immediately try to ingest data\n within the new window. To avoid a RejectedRecords exception, wait\n until the duration of the new window to ingest new data. For further information,\n see Best\n Practices for Configuring Timestream and the\n explanation of how storage works in Timestream.

    \n
    \n
  • \n
  • \n

    Records with dimensions or measures that exceed the Timestream defined\n limits.

    \n
  • \n
\n

For more information, see Access Management in the\n Timestream Developer Guide.

" + } + }, + "ExistingVersion": { + "target": "com.amazonaws.timestreamwrite#RecordVersion", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The existing version of the record. This value is populated in scenarios where an\n identical record exists with a higher version than the version in the write request.

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

Represents records that were not successfully inserted into Timestream due to\n data validation issues that must be resolved before reinserting time-series data into the\n system.

" + } + }, + "com.amazonaws.timestreamwrite#RejectedRecords": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#RejectedRecord" + } + }, + "com.amazonaws.timestreamwrite#RejectedRecordsException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage" + }, + "RejectedRecords": { + "target": "com.amazonaws.timestreamwrite#RejectedRecords", + "traits": { + "smithy.api#documentation": "

\n

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

WriteRecords would throw this exception in the following cases:

\n
    \n
  • \n

    Records with duplicate data where there are multiple records with the same\n dimensions, timestamps, and measure names but:

    \n
      \n
    • \n

      Measure values are different

      \n
    • \n
    • \n

      Version is not present in the request or the value of\n version in the new record is equal to or lower than the existing value

      \n
    • \n
    \n

    In this case, if Timestream rejects data, the\n ExistingVersion field in the RejectedRecords response\n will indicate the current record’s version. To force an update, you can resend the\n request with a version for the record set to a value greater than the\n ExistingVersion.

    \n
  • \n
  • \n

    Records with timestamps that lie outside the retention duration of the memory\n store.

    \n
  • \n
  • \n

    Records with dimensions or measures that exceed the Timestream defined\n limits.

    \n
  • \n
\n

For more information, see Quotas in the Amazon Timestream Developer Guide.

", + "smithy.api#error": "client", + "smithy.api#httpError": 419 + } + }, + "com.amazonaws.timestreamwrite#ReportConfiguration": { + "type": "structure", + "members": { + "ReportS3Configuration": { + "target": "com.amazonaws.timestreamwrite#ReportS3Configuration", + "traits": { + "smithy.api#documentation": "

Configuration of an S3 location to write error reports and events for a batch\n load.

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

Report configuration for a batch load task. This contains details about where error reports are stored.

" + } + }, + "com.amazonaws.timestreamwrite#ReportS3Configuration": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamwrite#S3BucketName", + "traits": { + "smithy.api#documentation": "

", + "smithy.api#required": {} + } + }, + "ObjectKeyPrefix": { + "target": "com.amazonaws.timestreamwrite#S3ObjectKeyPrefix", + "traits": { + "smithy.api#documentation": "

" + } + }, + "EncryptionOption": { + "target": "com.amazonaws.timestreamwrite#S3EncryptionOption", + "traits": { + "smithy.api#documentation": "

" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "

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

" + } + }, + "com.amazonaws.timestreamwrite#ResourceCreateAPIName": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" + } + }, + "com.amazonaws.timestreamwrite#ResourceName": { + "type": "string" + }, + "com.amazonaws.timestreamwrite#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The operation tried to access a nonexistent resource. The resource might not be\n specified correctly, or its status might not be ACTIVE.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.timestreamwrite#ResumeBatchLoadTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#ResumeBatchLoadTaskRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#ResumeBatchLoadTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

\n

" + } + }, + "com.amazonaws.timestreamwrite#ResumeBatchLoadTaskRequest": { + "type": "structure", + "members": { + "TaskId": { + "target": "com.amazonaws.timestreamwrite#BatchLoadTaskId", + "traits": { + "smithy.api#documentation": "

The ID of the batch load task to resume.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#ResumeBatchLoadTaskResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#RetentionProperties": { + "type": "structure", + "members": { + "MemoryStoreRetentionPeriodInHours": { + "target": "com.amazonaws.timestreamwrite#MemoryStoreRetentionPeriodInHours", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The duration for which data must be stored in the memory store.

", + "smithy.api#required": {} + } + }, + "MagneticStoreRetentionPeriodInDays": { + "target": "com.amazonaws.timestreamwrite#MagneticStoreRetentionPeriodInDays", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The duration for which data must be stored in the magnetic store.

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

Retention properties contain the duration for which your time-series data must be stored\n in the magnetic store and the memory store.

" + } + }, + "com.amazonaws.timestreamwrite#S3BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + }, + "smithy.api#pattern": "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$" + } + }, + "com.amazonaws.timestreamwrite#S3Configuration": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamwrite#S3BucketName", + "traits": { + "smithy.api#documentation": "

The bucket name of the customer S3 bucket.

" + } + }, + "ObjectKeyPrefix": { + "target": "com.amazonaws.timestreamwrite#S3ObjectKeyPrefix", + "traits": { + "smithy.api#documentation": "

The object key preview for the customer S3 location.

" + } + }, + "EncryptionOption": { + "target": "com.amazonaws.timestreamwrite#S3EncryptionOption", + "traits": { + "smithy.api#documentation": "

The encryption option for the customer S3 location. Options are S3 server-side\n encryption with an S3 managed key or Amazon Web Services managed key.

" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "

The KMS key ID for the customer S3 location when encrypting with an\n Amazon Web Services managed key.

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

The configuration that specifies an S3 location.

" + } + }, + "com.amazonaws.timestreamwrite#S3EncryptionOption": { + "type": "enum", + "members": { + "SSE_S3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSE_S3" + } + }, + "SSE_KMS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSE_KMS" + } + } + } + }, + "com.amazonaws.timestreamwrite#S3ObjectKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^[a-zA-Z0-9|!\\-_*'\\(\\)]([a-zA-Z0-9]|[!\\-_*'\\(\\)\\/.])+$" + } + }, + "com.amazonaws.timestreamwrite#S3ObjectKeyPrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 928 + }, + "smithy.api#pattern": "^[a-zA-Z0-9|!\\-_*'\\(\\)]([a-zA-Z0-9]|[!\\-_*'\\(\\)\\/.])+$" + } + }, + "com.amazonaws.timestreamwrite#ScalarMeasureValueType": { + "type": "enum", + "members": { + "DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOUBLE" + } + }, + "BIGINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BIGINT" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOOLEAN" + } + }, + "VARCHAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VARCHAR" + } + }, + "TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMESTAMP" + } + } + } + }, + "com.amazonaws.timestreamwrite#SchemaName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamwrite#SchemaValue": { + "type": "string" + }, + "com.amazonaws.timestreamwrite#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The instance quota of resource exceeded for this account.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.timestreamwrite#String": { + "type": "string" + }, + "com.amazonaws.timestreamwrite#StringValue1": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.timestreamwrite#StringValue2048": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.timestreamwrite#StringValue256": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.timestreamwrite#Table": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.timestreamwrite#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name that uniquely identifies this table.

" + } + }, + "TableName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream table.

" + } + }, + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database that contains this table.

" + } + }, + "TableStatus": { + "target": "com.amazonaws.timestreamwrite#TableStatus", + "traits": { + "smithy.api#documentation": "

The current state of the table:

\n
    \n
  • \n

    \n DELETING - The table is being deleted.

    \n
  • \n
  • \n

    \n ACTIVE - The table is ready for use.

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

The retention duration for the memory store and magnetic store.

" + } + }, + "CreationTime": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

The time when the Timestream table was created.

" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.timestreamwrite#Date", + "traits": { + "smithy.api#documentation": "

The time when the Timestream table was last updated.

" + } + }, + "MagneticStoreWriteProperties": { + "target": "com.amazonaws.timestreamwrite#MagneticStoreWriteProperties", + "traits": { + "smithy.api#documentation": "

Contains properties to set on the table when enabling magnetic store writes.

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

Represents a database table in Timestream. Tables contain one or more related\n time series. You can modify the retention duration of the memory store and the magnetic\n store for a table.

" + } + }, + "com.amazonaws.timestreamwrite#TableList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#Table" + } + }, + "com.amazonaws.timestreamwrite#TableStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "RESTORING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESTORING" + } + } + } + }, + "com.amazonaws.timestreamwrite#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.timestreamwrite#TagKey", + "traits": { + "smithy.api#documentation": "

The key of the tag. Tag keys are case sensitive.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.timestreamwrite#TagValue", + "traits": { + "smithy.api#documentation": "

The value of the tag. Tag values are case-sensitive and can be null.

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

A tag is a label that you assign to a Timestream database and/or table. Each\n tag consists of a key and an optional value, both of which you define. With tags, you can\n categorize databases and/or tables, for example, by purpose, owner, or environment.

" + } + }, + "com.amazonaws.timestreamwrite#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.timestreamwrite#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.timestreamwrite#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamwrite#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.timestreamwrite#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Associates a set of tags with a Timestream resource. You can then activate\n these user-defined tags so that they appear on the Billing and Cost Management console for\n cost allocation tracking.

" + } + }, + "com.amazonaws.timestreamwrite#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamwrite#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

Identifies the Timestream resource to which tags should be added. This value\n is an Amazon Resource Name (ARN).

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.timestreamwrite#TagList", + "traits": { + "smithy.api#documentation": "

The tags to be assigned to the Timestream resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.timestreamwrite#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Too many requests were made by a user and they exceeded the service quotas. The request\n was throttled.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.timestreamwrite#TimeUnit": { + "type": "enum", + "members": { + "MILLISECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MILLISECONDS" + } + }, + "SECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SECONDS" + } + }, + "MICROSECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MICROSECONDS" + } + }, + "NANOSECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NANOSECONDS" + } + } + } + }, + "com.amazonaws.timestreamwrite#Timestream_20181101": { + "type": "service", + "version": "2018-11-01", + "operations": [ + { + "target": "com.amazonaws.timestreamwrite#CreateBatchLoadTask" + }, + { + "target": "com.amazonaws.timestreamwrite#CreateDatabase" + }, + { + "target": "com.amazonaws.timestreamwrite#CreateTable" + }, + { + "target": "com.amazonaws.timestreamwrite#DeleteDatabase" + }, + { + "target": "com.amazonaws.timestreamwrite#DeleteTable" + }, + { + "target": "com.amazonaws.timestreamwrite#DescribeBatchLoadTask" + }, + { + "target": "com.amazonaws.timestreamwrite#DescribeDatabase" + }, + { + "target": "com.amazonaws.timestreamwrite#DescribeEndpoints" + }, + { + "target": "com.amazonaws.timestreamwrite#DescribeTable" + }, + { + "target": "com.amazonaws.timestreamwrite#ListBatchLoadTasks" + }, + { + "target": "com.amazonaws.timestreamwrite#ListDatabases" + }, + { + "target": "com.amazonaws.timestreamwrite#ListTables" + }, + { + "target": "com.amazonaws.timestreamwrite#ListTagsForResource" + }, + { + "target": "com.amazonaws.timestreamwrite#ResumeBatchLoadTask" + }, + { + "target": "com.amazonaws.timestreamwrite#TagResource" + }, + { + "target": "com.amazonaws.timestreamwrite#UntagResource" + }, + { + "target": "com.amazonaws.timestreamwrite#UpdateDatabase" + }, + { + "target": "com.amazonaws.timestreamwrite#UpdateTable" + }, + { + "target": "com.amazonaws.timestreamwrite#WriteRecords" + } + ], + "traits": { + "aws.api#clientEndpointDiscovery": { + "operation": "com.amazonaws.timestreamwrite#DescribeEndpoints", + "error": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + "aws.api#service": { + "sdkId": "Timestream Write", + "arnNamespace": "timestream", + "cloudFormationName": "TimestreamWrite", + "cloudTrailEventSource": "timestreamwrite.amazonaws.com", + "endpointPrefix": "ingest.timestream" + }, + "aws.auth#sigv4": { + "name": "timestream" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "Amazon Timestream Write\n

Amazon Timestream is a fast, scalable, fully managed time-series database service\n that makes it easy to store and analyze trillions of time-series data points per day. With\n Timestream, you can easily store and analyze IoT sensor data to derive insights\n from your IoT applications. You can analyze industrial telemetry to streamline equipment\n management and maintenance. You can also store and analyze log data and metrics to improve\n the performance and availability of your applications.

\n

Timestream is built from the ground up to effectively ingest, process, and\n store time-series data. It organizes data to optimize query processing. It automatically\n scales based on the volume of data ingested and on the query volume to ensure you receive\n optimal performance while inserting and querying data. As your data grows over time,\n Timestream’s adaptive query processing engine spans across storage tiers to\n provide fast analysis while reducing costs.

", + "smithy.api#title": "Amazon Timestream Write", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "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" + }, + "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" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://ingest.timestream-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://ingest.timestream-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://ingest.timestream.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://ingest.timestream.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + } + ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-east-1.api.aws" + } + }, + "params": { + "UseDualStack": true, + "UseFIPS": true, + "Region": "us-east-1" + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": true, + "Region": "us-east-1" + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-east-1.api.aws" + } + }, + "params": { + "UseDualStack": true, + "UseFIPS": false, + "Region": "us-east-1" + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-east-1.amazonaws.com" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Region": "us-east-1" + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "UseDualStack": true, + "UseFIPS": true, + "Region": "cn-north-1" + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": true, + "Region": "cn-north-1" + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "UseDualStack": true, + "UseFIPS": false, + "Region": "cn-north-1" + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Region": "cn-north-1" + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "UseDualStack": true, + "UseFIPS": true, + "Region": "us-gov-east-1" + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": true, + "Region": "us-gov-east-1" + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-east-1.api.aws" + } + }, + "params": { + "UseDualStack": true, + "UseFIPS": false, + "Region": "us-gov-east-1" + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Region": "us-gov-east-1" + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": true, + "Region": "us-iso-east-1" + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Region": "us-iso-east-1" + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": true, + "Region": "us-isob-east-1" + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Region": "us-isob-east-1" + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Region": "us-east-1", + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "UseDualStack": false, + "UseFIPS": true, + "Region": "us-east-1", + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "UseDualStack": true, + "UseFIPS": false, + "Region": "us-east-1", + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.timestreamwrite#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Removes the association of tags from a Timestream resource.

" + } + }, + "com.amazonaws.timestreamwrite#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamwrite#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Timestream resource that the tags will be removed from. This value is an\n Amazon Resource Name (ARN).

", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.timestreamwrite#TagKeyList", + "traits": { + "smithy.api#documentation": "

A list of tags keys. Existing tags of the resource whose keys are members of this list\n will be removed from the Timestream resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#UpdateDatabase": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#UpdateDatabaseRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#UpdateDatabaseResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Modifies the KMS key for an existing database. While updating the\n database, you must specify the database name and the identifier of the new KMS key to be used (KmsKeyId). If there are any concurrent\n UpdateDatabase requests, first writer wins.

\n

See code sample\n for details.

" + } + }, + "com.amazonaws.timestreamwrite#UpdateDatabaseRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the database.

", + "smithy.api#required": {} + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "

The identifier of the new KMS key (KmsKeyId) to be used to\n encrypt the data stored in the database. If the KmsKeyId currently registered\n with the database is the same as the KmsKeyId in the request, there will not\n be any update.

\n

You can specify the KmsKeyId using any of the following:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN:\n arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias ARN:\n arn:aws:kms:us-east-1:111122223333:alias/ExampleAlias\n

    \n
  • \n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#UpdateDatabaseResponse": { + "type": "structure", + "members": { + "Database": { + "target": "com.amazonaws.timestreamwrite#Database" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#UpdateTable": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#UpdateTableRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#UpdateTableResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Modifies the retention duration of the memory store and magnetic store for your Timestream table. Note that the change in retention duration takes effect immediately.\n For example, if the retention period of the memory store was initially set to 2 hours and\n then changed to 24 hours, the memory store will be capable of holding 24 hours of data, but\n will be populated with 24 hours of data 22 hours after this change was made. Timestream does not retrieve data from the magnetic store to populate the memory store.

\n

See code\n sample for details.

" + } + }, + "com.amazonaws.timestreamwrite#UpdateTableRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream table.

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

The retention duration of the memory store and the magnetic store.

" + } + }, + "MagneticStoreWriteProperties": { + "target": "com.amazonaws.timestreamwrite#MagneticStoreWriteProperties", + "traits": { + "smithy.api#documentation": "

Contains properties to set on the table when enabling magnetic store writes.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#UpdateTableResponse": { + "type": "structure", + "members": { + "Table": { + "target": "com.amazonaws.timestreamwrite#Table", + "traits": { + "smithy.api#documentation": "

The updated Timestream table.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.timestreamwrite#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamwrite#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

An invalid or malformed request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.timestreamwrite#WriteRecords": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamwrite#WriteRecordsRequest" + }, + "output": { + "target": "com.amazonaws.timestreamwrite#WriteRecordsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamwrite#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamwrite#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamwrite#RejectedRecordsException" + }, + { + "target": "com.amazonaws.timestreamwrite#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamwrite#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamwrite#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "

Enables you to write your time-series data into Timestream. You can specify a\n single data point or a batch of data points to be inserted into the system. Timestream offers you a flexible schema that auto detects the column names and data\n types for your Timestream tables based on the dimension names and data types of\n the data points you specify when invoking writes into the database.

\n

Timestream supports eventual consistency read semantics. This means that when\n you query data immediately after writing a batch of data into Timestream, the\n query results might not reflect the results of a recently completed write operation. The\n results may also include some stale data. If you repeat the query request after a short\n time, the results should return the latest data. Service quotas apply.

\n

See code sample for\n details.

\n

\n Upserts\n

\n

You can use the Version parameter in a WriteRecords request to\n update data points. Timestream tracks a version number with each record.\n Version defaults to 1 when it's not specified for the record\n in the request. Timestream updates an existing record’s measure value along with\n its Version when it receives a write request with a higher\n Version number for that record. When it receives an update request where\n the measure value is the same as that of the existing record, Timestream still\n updates Version, if it is greater than the existing value of\n Version. You can update a data point as many times as desired, as long as\n the value of Version continuously increases.

\n

For example, suppose you write a new record without indicating Version in\n the request. Timestream stores this record, and set Version to\n 1. Now, suppose you try to update this record with a\n WriteRecords request of the same record with a different measure value but,\n like before, do not provide Version. In this case, Timestream will\n reject this update with a RejectedRecordsException since the updated record’s\n version is not greater than the existing value of Version.

\n

However, if you were to resend the update request with Version set to\n 2, Timestream would then succeed in updating the record’s value,\n and the Version would be set to 2. Next, suppose you sent a\n WriteRecords request with this same record and an identical measure value,\n but with Version set to 3. In this case, Timestream\n would only update Version to 3. Any further updates would need to\n send a version number greater than 3, or the update requests would receive a\n RejectedRecordsException.

" + } + }, + "com.amazonaws.timestreamwrite#WriteRecordsRequest": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream database.

", + "smithy.api#required": {} + } + }, + "TableName": { + "target": "com.amazonaws.timestreamwrite#ResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Timestream table.

", + "smithy.api#required": {} + } + }, + "CommonAttributes": { + "target": "com.amazonaws.timestreamwrite#Record", + "traits": { + "smithy.api#documentation": "

A record that contains the common measure, dimension, time, and version attributes\n shared across all the records in the request. The measure and dimension attributes\n specified will be merged with the measure and dimension attributes in the records object\n when the data is written into Timestream. Dimensions may not overlap, or a\n ValidationException will be thrown. In other words, a record must contain\n dimensions with unique names.

" + } + }, + "Records": { + "target": "com.amazonaws.timestreamwrite#Records", + "traits": { + "smithy.api#documentation": "

An array of records that contain the unique measure, dimension, time, and version\n attributes for each time-series data point.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.timestreamwrite#WriteRecordsResponse": { + "type": "structure", + "members": { + "RecordsIngested": { + "target": "com.amazonaws.timestreamwrite#RecordsIngested", + "traits": { + "smithy.api#documentation": "

Information on the records ingested by this request.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + } + } +} diff --git a/aws/sdk/gradle.properties b/aws/sdk/gradle.properties index 1cd163ac60..3bd3028606 100644 --- a/aws/sdk/gradle.properties +++ b/aws/sdk/gradle.properties @@ -3,8 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 # -# timestream requires endpoint discovery: https://github.com/awslabs/aws-sdk-rust/issues/114 -aws.services=-timestreamwrite,-timestreamquery +aws.services= # List of services to generate Event Stream operations for: aws.services.eventstream.allowlist=\ diff --git a/aws/sdk/integration-tests/Cargo.toml b/aws/sdk/integration-tests/Cargo.toml index 74a6f261dc..284bc1bcb1 100644 --- a/aws/sdk/integration-tests/Cargo.toml +++ b/aws/sdk/integration-tests/Cargo.toml @@ -15,5 +15,6 @@ members = [ "s3control", "sts", "transcribestreaming", + "timestreamquery", "webassembly", ] diff --git a/aws/sdk/integration-tests/timestreamquery/Cargo.toml b/aws/sdk/integration-tests/timestreamquery/Cargo.toml new file mode 100644 index 0000000000..b81b618c88 --- /dev/null +++ b/aws/sdk/integration-tests/timestreamquery/Cargo.toml @@ -0,0 +1,20 @@ +# This Cargo.toml is unused in generated code. It exists solely to enable these tests to compile in-situ +[package] +name = "timestream-tests" +version = "0.1.0" +authors = ["Russell Cohen "] +edition = "2021" +license = "Apache-2.0" +repository = "https://github.com/awslabs/smithy-rs" +publish = false + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dev-dependencies] +aws-credential-types = { path = "../../build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] } +aws-sdk-timestreamquery = { path = "../../build/aws-sdk/sdk/timestreamquery" } +tokio = { version = "1.23.1", features = ["full", "test-util"] } +aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } +aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async", features = ["test-util"] } +aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } +tracing-subscriber = "0.3.17" diff --git a/aws/sdk/integration-tests/timestreamquery/tests/endpoint_disco.rs b/aws/sdk/integration-tests/timestreamquery/tests/endpoint_disco.rs new file mode 100644 index 0000000000..a045840907 --- /dev/null +++ b/aws/sdk/integration-tests/timestreamquery/tests/endpoint_disco.rs @@ -0,0 +1,76 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +use aws_credential_types::provider::SharedCredentialsProvider; +use aws_sdk_timestreamquery as query; +use aws_sdk_timestreamquery::config::Credentials; +use aws_smithy_async::test_util::controlled_time_and_sleep; +use aws_smithy_async::time::{SharedTimeSource, TimeSource}; +use aws_smithy_client::dvr::{MediaType, ReplayingConnection}; +use aws_types::region::Region; +use aws_types::SdkConfig; +use std::sync::Arc; +use std::time::{Duration, UNIX_EPOCH}; + +#[tokio::test] +async fn do_endpoint_discovery() { + tracing_subscriber::fmt::init(); + let conn = ReplayingConnection::from_file("tests/traffic.json").unwrap(); + //let conn = aws_smithy_client::dvr::RecordingConnection::new(conn); + let start = UNIX_EPOCH + Duration::from_secs(1234567890); + let (ts, sleep, mut gate) = controlled_time_and_sleep(start); + let config = SdkConfig::builder() + .http_connector(conn.clone()) + .region(Region::from_static("us-west-2")) + .sleep_impl(Arc::new(sleep)) + .credentials_provider(SharedCredentialsProvider::new(Credentials::for_tests())) + .time_source(SharedTimeSource::new(ts.clone())) + .build(); + let conf = query::config::Builder::from(&config) + .make_token("0000-0000-0000") + .build(); + let (client, reloader) = query::Client::from_conf(conf) + .enable_endpoint_discovery() + .await + .expect("initial setup of endpoint discovery failed"); + + tokio::spawn(reloader.reload_task()); + + let _resp = client + .query() + .query_string("SELECT now() as time_now") + .send() + .await + .unwrap(); + + // wait 10 minutes for the endpoint to expire + while ts.now() < start + Duration::from_secs(60 * 10) { + assert_eq!( + gate.expect_sleep().await.duration(), + Duration::from_secs(60) + ); + } + + // the recording validates that this request hits another endpoint + let _resp = client + .query() + .query_string("SELECT now() as time_now") + .send() + .await + .unwrap(); + // if you want to update this test: + // conn.dump_to_file("tests/traffic.json").unwrap(); + conn.validate_body_and_headers( + Some(&[ + "x-amz-security-token", + "x-amz-date", + "content-type", + "x-amz-target", + ]), + MediaType::Json, + ) + .await + .unwrap(); +} diff --git a/aws/sdk/integration-tests/timestreamquery/tests/traffic.json b/aws/sdk/integration-tests/timestreamquery/tests/traffic.json new file mode 100644 index 0000000000..6b692ce1dc --- /dev/null +++ b/aws/sdk/integration-tests/timestreamquery/tests/traffic.json @@ -0,0 +1,407 @@ +{ + "events": [ + { + "connection_id": 0, + "action": { + "Request": { + "request": { + "uri": "https://query.timestream.us-west-2.amazonaws.com/", + "headers": { + "content-type": [ + "application/x-amz-json-1.0" + ], + "x-amz-user-agent": [ + "aws-sdk-rust/0.0.0-smithy-rs-head api/timestreamquery/0.0.0-local os/macos lang/rust/1.67.1" + ], + "authorization": [ + "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-west-2/timestream/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token;x-amz-target;x-amz-user-agent, Signature=1b50e2545f06c8e1ca0e205c20f25a34b6aab82f3a47e4cc370e9a5fea01d08c" + ], + "x-amz-security-token": [ + "notarealsessiontoken" + ], + "x-amz-target": [ + "Timestream_20181101.DescribeEndpoints" + ], + "user-agent": [ + "aws-sdk-rust/0.0.0-smithy-rs-head os/macos lang/rust/1.67.1" + ], + "x-amz-date": [ + "20090213T233130Z" + ] + }, + "method": "POST" + } + } + } + }, + { + "connection_id": 0, + "action": { + "Data": { + "data": { + "Utf8": "{}" + }, + "direction": "Request" + } + } + }, + { + "connection_id": 0, + "action": { + "Eof": { + "ok": true, + "direction": "Request" + } + } + }, + { + "connection_id": 0, + "action": { + "Response": { + "response": { + "Ok": { + "status": 200, + "version": "HTTP/1.1", + "headers": { + "x-amzn-requestid": [ + "fcfdab03-2bb8-45e9-a284-b789cf7efb63" + ], + "content-type": [ + "application/x-amz-json-1.0" + ], + "date": [ + "Wed, 24 May 2023 15:51:07 GMT" + ], + "content-length": [ + "104" + ] + } + } + } + } + } + }, + { + "connection_id": 0, + "action": { + "Data": { + "data": { + "Utf8": "{\"Endpoints\":[{\"Address\":\"query-cell1.timestream.us-west-2.amazonaws.com\",\"CachePeriodInMinutes\":10}]}" + }, + "direction": "Response" + } + } + }, + { + "connection_id": 0, + "action": { + "Eof": { + "ok": true, + "direction": "Response" + } + } + }, + { + "connection_id": 1, + "action": { + "Request": { + "request": { + "uri": "https://query-cell1.timestream.us-west-2.amazonaws.com/", + "headers": { + "content-type": [ + "application/x-amz-json-1.0" + ], + "content-length": [ + "73" + ], + "x-amz-security-token": [ + "notarealsessiontoken" + ], + "user-agent": [ + "aws-sdk-rust/0.0.0-smithy-rs-head os/macos lang/rust/1.67.1" + ], + "x-amz-date": [ + "20090213T233130Z" + ], + "authorization": [ + "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-west-2/timestream/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target;x-amz-user-agent, Signature=8174b6ca0ece22834b562b60785f47ef354b2c1ddf7a541482f255006b5f98c2" + ], + "x-amz-user-agent": [ + "aws-sdk-rust/0.0.0-smithy-rs-head api/timestreamquery/0.0.0-local os/macos lang/rust/1.67.1" + ], + "x-amz-target": [ + "Timestream_20181101.Query" + ] + }, + "method": "POST" + } + } + } + }, + { + "connection_id": 1, + "action": { + "Data": { + "data": { + "Utf8": "{\"QueryString\":\"SELECT now() as time_now\",\"ClientToken\":\"0000-0000-0000\"}" + }, + "direction": "Request" + } + } + }, + { + "connection_id": 1, + "action": { + "Eof": { + "ok": true, + "direction": "Request" + } + } + }, + { + "connection_id": 1, + "action": { + "Response": { + "response": { + "Ok": { + "status": 200, + "version": "HTTP/1.1", + "headers": { + "content-type": [ + "application/x-amz-json-1.0" + ], + "date": [ + "Wed, 24 May 2023 15:51:08 GMT" + ], + "x-amzn-requestid": [ + "OFO47BQ6XAXGTIK3XH4S6GBFLQ" + ], + "content-length": [ + "318" + ] + } + } + } + } + } + }, + { + "connection_id": 1, + "action": { + "Data": { + "data": { + "Utf8": "{\"ColumnInfo\":[{\"Name\":\"time_now\",\"Type\":{\"ScalarType\":\"TIMESTAMP\"}}],\"QueryId\":\"AEDACANMQDLSTQR3SPDV6HEWYACX5IALTEWGK7JM3VSFQQ5J5F3HGKVEMNHBRHY\",\"QueryStatus\":{\"CumulativeBytesMetered\":10000000,\"CumulativeBytesScanned\":0,\"ProgressPercentage\":100.0},\"Rows\":[{\"Data\":[{\"ScalarValue\":\"2023-05-24 15:51:08.760000000\"}]}]}" + }, + "direction": "Response" + } + } + }, + { + "connection_id": 1, + "action": { + "Eof": { + "ok": true, + "direction": "Response" + } + } + }, + { + "connection_id": 2, + "action": { + "Request": { + "request": { + "uri": "https://query.timestream.us-west-2.amazonaws.com/", + "headers": { + "content-type": [ + "application/x-amz-json-1.0" + ], + "user-agent": [ + "aws-sdk-rust/0.0.0-smithy-rs-head os/macos lang/rust/1.67.1" + ], + "x-amz-user-agent": [ + "aws-sdk-rust/0.0.0-smithy-rs-head api/timestreamquery/0.0.0-local os/macos lang/rust/1.67.1" + ], + "x-amz-date": [ + "20090213T234030Z" + ], + "authorization": [ + "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-west-2/timestream/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token;x-amz-target;x-amz-user-agent, Signature=32e468e574c514ba0fa4a0f0304cef82b72f82965b9e8792fd63f6efb67b297c" + ], + "x-amz-target": [ + "Timestream_20181101.DescribeEndpoints" + ], + "x-amz-security-token": [ + "notarealsessiontoken" + ] + }, + "method": "POST" + } + } + } + }, + { + "connection_id": 2, + "action": { + "Response": { + "response": { + "Ok": { + "status": 200, + "version": "HTTP/1.1", + "headers": { + "content-type": [ + "application/x-amz-json-1.0" + ], + "content-length": [ + "104" + ], + "date": [ + "Wed, 24 May 2023 15:51:07 GMT" + ], + "x-amzn-requestid": [ + "fcfdab03-2bb8-45e9-a284-b789cf7efb63" + ] + } + } + } + } + } + }, + { + "connection_id": 2, + "action": { + "Data": { + "data": { + "Utf8": "{}" + }, + "direction": "Request" + } + } + }, + { + "connection_id": 2, + "action": { + "Eof": { + "ok": true, + "direction": "Request" + } + } + }, + { + "connection_id": 2, + "action": { + "Data": { + "data": { + "Utf8": "{\"Endpoints\":[{\"Address\":\"query-cell2.timestream.us-west-2.amazonaws.com\",\"CachePeriodInMinutes\":10}]}" + }, + "direction": "Response" + } + } + }, + { + "connection_id": 2, + "action": { + "Eof": { + "ok": true, + "direction": "Response" + } + } + }, + { + "connection_id": 3, + "action": { + "Request": { + "request": { + "uri": "https://query-cell2.timestream.us-west-2.amazonaws.com/", + "headers": { + "authorization": [ + "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-west-2/timestream/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target;x-amz-user-agent, Signature=8b2abd7688aefb4004200e5fa087f6c154fde879f2df79d3f6c57934cdc8f62a" + ], + "x-amz-date": [ + "20090213T234130Z" + ], + "user-agent": [ + "aws-sdk-rust/0.0.0-smithy-rs-head os/macos lang/rust/1.67.1" + ], + "x-amz-target": [ + "Timestream_20181101.Query" + ], + "x-amz-user-agent": [ + "aws-sdk-rust/0.0.0-smithy-rs-head api/timestreamquery/0.0.0-local os/macos lang/rust/1.67.1" + ], + "content-type": [ + "application/x-amz-json-1.0" + ], + "content-length": [ + "73" + ], + "x-amz-security-token": [ + "notarealsessiontoken" + ] + }, + "method": "POST" + } + } + } + }, + { + "connection_id": 3, + "action": { + "Data": { + "data": { + "Utf8": "{\"QueryString\":\"SELECT now() as time_now\",\"ClientToken\":\"0000-0000-0000\"}" + }, + "direction": "Request" + } + } + }, + { + "connection_id": 3, + "action": { + "Response": { + "response": { + "Ok": { + "status": 200, + "version": "HTTP/1.1", + "headers": { + "content-type": [ + "application/x-amz-json-1.0" + ], + "date": [ + "Wed, 24 May 2023 15:51:08 GMT" + ], + "x-amzn-requestid": [ + "OFO47BQ6XAXGTIK3XH4S6GBFLQ" + ], + "content-length": [ + "318" + ] + } + } + } + } + } + }, + { + "connection_id": 3, + "action": { + "Data": { + "data": { + "Utf8": "{\"ColumnInfo\":[{\"Name\":\"time_now\",\"Type\":{\"ScalarType\":\"TIMESTAMP\"}}],\"QueryId\":\"AEDACANMQDLSTQR3SPDV6HEWYACX5IALTEWGK7JM3VSFQQ5J5F3HGKVEMNHBRHY\",\"QueryStatus\":{\"CumulativeBytesMetered\":10000000,\"CumulativeBytesScanned\":0,\"ProgressPercentage\":100.0},\"Rows\":[{\"Data\":[{\"ScalarValue\":\"2023-05-24 15:51:08.760000000\"}]}]}" + }, + "direction": "Response" + } + } + }, + { + "connection_id": 3, + "action": { + "Eof": { + "ok": true, + "direction": "Response" + } + } + } + ], + "docs": "todo docs", + "version": "V0" +} diff --git a/aws/sra-test/integration-tests/aws-sdk-s3/Cargo.toml b/aws/sra-test/integration-tests/aws-sdk-s3/Cargo.toml index d93edb0e84..67b619607c 100644 --- a/aws/sra-test/integration-tests/aws-sdk-s3/Cargo.toml +++ b/aws/sra-test/integration-tests/aws-sdk-s3/Cargo.toml @@ -12,6 +12,7 @@ aws-sdk-s3 = { path = "../../build/sdk/aws-sdk-s3", features = ["test-util"] } aws-smithy-client = { path = "../../../../rust-runtime/aws-smithy-client", features = ["test-util", "rustls"] } aws-smithy-runtime = { path = "../../../../rust-runtime/aws-smithy-runtime" } aws-smithy-runtime-api = { path = "../../../../rust-runtime/aws-smithy-runtime-api" } +aws-smithy-async = { path = "../../../../rust-runtime/aws-smithy-async", features = ["test-util"]} aws-types = { path = "../../../rust-runtime/aws-types" } criterion = { version = "0.4", features = ["async_tokio"] } http = "0.2.3" diff --git a/buildSrc/src/main/kotlin/aws/sdk/ServiceLoader.kt b/buildSrc/src/main/kotlin/aws/sdk/ServiceLoader.kt index a1cbe0dc99..c1f76be0c0 100644 --- a/buildSrc/src/main/kotlin/aws/sdk/ServiceLoader.kt +++ b/buildSrc/src/main/kotlin/aws/sdk/ServiceLoader.kt @@ -207,7 +207,7 @@ fun parseMembership(rawList: String): Membership { val inclusions = mutableSetOf() val exclusions = mutableSetOf() - rawList.split(",").map { it.trim() }.forEach { item -> + rawList.split(",").map { it.trim() }.filter { it.isNotEmpty() }.forEach { item -> when { item.startsWith('-') -> exclusions.add(item.substring(1)) item.startsWith('+') -> inclusions.add(item.substring(1)) diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/endpoint/Util.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/endpoint/Util.kt index ed283bc6de..df909e9452 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/endpoint/Util.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/endpoint/Util.kt @@ -50,6 +50,8 @@ class Types(runtimeConfig: RuntimeConfig) { val resolveEndpoint = smithyHttpEndpointModule.resolve("ResolveEndpoint") val smithyEndpoint = smithyTypesEndpointModule.resolve("Endpoint") val resolveEndpointError = smithyHttpEndpointModule.resolve("ResolveEndpointError") + + fun toArray() = arrayOf("ResolveEndpointError" to resolveEndpointError, "Endpoint" to smithyEndpoint) } /** diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt index 007f5e24d3..a29d12f7b7 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt @@ -466,6 +466,7 @@ class RustWriter private constructor( val devDependenciesOnly: Boolean = false, ) : SymbolWriter(UseDeclarations(namespace)) { + companion object { fun root() = forModule(null) fun forModule(module: String?): RustWriter = if (module == null) { @@ -486,6 +487,7 @@ class RustWriter private constructor( debugMode = debugMode, devDependenciesOnly = true, ) + fileName == "package.json" -> rawWriter(fileName, debugMode = debugMode) fileName == "stubgen.sh" -> rawWriter(fileName, debugMode = debugMode) else -> RustWriter(fileName, namespace, debugMode = debugMode) @@ -515,6 +517,8 @@ class RustWriter private constructor( return super.write(content, *args) } + fun dirty() = super.toString().isNotBlank() || preamble.isNotEmpty() + /** Helper function to determine if a stack frame is relevant for debug purposes */ private fun StackTraceElement.isRelevant(): Boolean { if (this.className.contains("AbstractCodeWriter") || this.className.startsWith("java.lang")) { @@ -711,7 +715,8 @@ class RustWriter private constructor( override fun toString(): String { val contents = super.toString() val preheader = if (preamble.isNotEmpty()) { - val prewriter = RustWriter(filename, namespace, printWarning = false, devDependenciesOnly = devDependenciesOnly) + val prewriter = + RustWriter(filename, namespace, printWarning = false, devDependenciesOnly = devDependenciesOnly) preamble.forEach { it(prewriter) } prewriter.toString() } else { @@ -757,7 +762,8 @@ class RustWriter private constructor( @Suppress("UNCHECKED_CAST") val func = t as? Writable ?: throw CodegenException("RustWriteableInjector.apply choked on non-function t ($t)") - val innerWriter = RustWriter(filename, namespace, printWarning = false, devDependenciesOnly = devDependenciesOnly) + val innerWriter = + RustWriter(filename, namespace, printWarning = false, devDependenciesOnly = devDependenciesOnly) func(innerWriter) innerWriter.dependencies.forEach { addDependencyTestAware(it) } return innerWriter.toString().trimEnd() @@ -790,7 +796,8 @@ class RustWriter private constructor( @Suppress("UNCHECKED_CAST") val func = t as? Writable ?: throw CodegenException("Invalid function type (expected writable) ($t)") - val innerWriter = RustWriter(filename, namespace, printWarning = false, devDependenciesOnly = devDependenciesOnly) + val innerWriter = + RustWriter(filename, namespace, printWarning = false, devDependenciesOnly = devDependenciesOnly) func(innerWriter) innerWriter.dependencies.forEach { addDependencyTestAware(it) } return innerWriter.toString().trimEnd() diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customize/Customization.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customize/Customization.kt index d563349867..c174c81d95 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customize/Customization.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customize/Customization.kt @@ -60,3 +60,18 @@ fun RustWriter.writeCustomizations(customizations: List RustWriter.writeCustomizationsOrElse( + customizations: List>, + section: T, + orElse: Writable, +) { + val test = RustWriter.root() + test.writeCustomizations(customizations, section) + if (test.dirty()) { + writeCustomizations(customizations, section) + } else { + orElse(this) + } +} diff --git a/rust-runtime/aws-smithy-client/src/dvr/replay.rs b/rust-runtime/aws-smithy-client/src/dvr/replay.rs index fc5d867741..54065e5fc7 100644 --- a/rust-runtime/aws-smithy-client/src/dvr/replay.rs +++ b/rust-runtime/aws-smithy-client/src/dvr/replay.rs @@ -63,15 +63,7 @@ impl ReplayingConnection { /// Validate all headers and bodies pub async fn full_validate(self, media_type: MediaType) -> Result<(), Box> { - self.validate_base(None, |b1, b2| { - aws_smithy_protocol_test::validate_body( - b1, - std::str::from_utf8(b2).unwrap(), - media_type.clone(), - ) - .map_err(|e| Box::new(e) as _) - }) - .await + self.validate_body_and_headers(None, media_type).await } /// Validate actual requests against expected requests @@ -84,6 +76,25 @@ impl ReplayingConnection { .await } + /// Validate that the bodies match, using a given [`MediaType`] for comparison + /// + /// The specified headers are also validated + pub async fn validate_body_and_headers( + self, + checked_headers: Option<&[&str]>, + media_type: MediaType, + ) -> Result<(), Box> { + self.validate_base(checked_headers, |b1, b2| { + aws_smithy_protocol_test::validate_body( + b1, + std::str::from_utf8(b2).unwrap(), + media_type.clone(), + ) + .map_err(|e| Box::new(e) as _) + }) + .await + } + async fn validate_base( self, checked_headers: Option<&[&str]>,