From fe582a8d6806d590d9349ac2fd0b71c421c8fdac Mon Sep 17 00:00:00 2001 From: Kyle Thomson Date: Thu, 26 May 2022 10:04:27 -0700 Subject: [PATCH 01/49] Add local publish configuration to rust-runtime (#1415) * Add local publish configuration to rust-runtime * Removing unnecessary `maven` plugin --- rust-runtime/build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rust-runtime/build.gradle.kts b/rust-runtime/build.gradle.kts index 6910f46b01c..58702756043 100644 --- a/rust-runtime/build.gradle.kts +++ b/rust-runtime/build.gradle.kts @@ -6,6 +6,7 @@ description = "Rust Runtime" plugins { kotlin("jvm") + `maven-publish` } group = "software.amazon.rustruntime" @@ -57,3 +58,12 @@ tasks.register("fixManifests") { arguments = listOf("fix-manifests", "--location", runtimeOutputDir.absolutePath) dependsOn("fixRuntimeCrateVersions") } + +publishing { + publications { + create("default") { + from(components["java"]) + } + } + repositories { maven { url = uri("$buildDir/repository") } } +} \ No newline at end of file From 53fab07a461e358b2094db0f1728bdec9320bac4 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Thu, 26 May 2022 14:01:50 -0700 Subject: [PATCH 02/49] Add support for `credential_process` from profiles (#1356) Co-authored-by: John DiSanti --- CHANGELOG.next.toml | 6 + .../aws-config/src/credential_process.rs | 292 ++++++++++++++++++ .../src/http_credential_provider.rs | 6 +- .../aws-config/src/imds/credentials.rs | 6 +- .../aws-config/src/json_credentials.rs | 94 ++++-- aws/rust-runtime/aws-config/src/lib.rs | 2 + .../aws-config/src/profile/credentials.rs | 11 + .../src/profile/credentials/exec.rs | 4 + .../src/profile/credentials/repr.rs | 88 +++++- aws/rust-runtime/aws-config/src/sso.rs | 24 +- .../credential_process/env.json | 3 + .../credential_process/fs/home/.aws/config | 6 + .../fs/home/.aws/credentials | 3 + .../credential_process/http-traffic.json | 5 + .../credential_process/test-case.json | 12 + .../credential_process_failure/env.json | 3 + .../fs/home/.aws/config | 6 + .../fs/home/.aws/credentials | 3 + .../http-traffic.json | 5 + .../credential_process_failure/test-case.json | 7 + .../credential_process_invalid/env.json | 3 + .../fs/home/.aws/config | 6 + .../fs/home/.aws/credentials | 3 + .../http-traffic.json | 5 + .../credential_process_invalid/test-case.json | 7 + 25 files changed, 554 insertions(+), 56 deletions(-) create mode 100644 aws/rust-runtime/aws-config/src/credential_process.rs create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/env.json create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/fs/home/.aws/config create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/fs/home/.aws/credentials create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/http-traffic.json create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/test-case.json create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/env.json create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/fs/home/.aws/config create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/fs/home/.aws/credentials create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/http-traffic.json create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/test-case.json create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/env.json create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/fs/home/.aws/config create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/fs/home/.aws/credentials create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/http-traffic.json create mode 100644 aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/test-case.json diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index ff97dff4e99..41969384624 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -46,3 +46,9 @@ message = "Switch to [RustCrypto](https://github.com/RustCrypto)'s implementatio references = ["smithy-rs#1404"] meta = { "breaking" = false, "tada" = false, "bug" = false } author = "petrosagg" + +[[aws-sdk-rust]] +message = "Add support for `credential_process` in AWS configs for fetching credentials from an external process." +references = ["smithy-rs#1356"] +meta = { "breaking" = false, "tada" = true, "bug" = false } +author = "jszwedko" diff --git a/aws/rust-runtime/aws-config/src/credential_process.rs b/aws/rust-runtime/aws-config/src/credential_process.rs new file mode 100644 index 00000000000..10e2b424d41 --- /dev/null +++ b/aws/rust-runtime/aws-config/src/credential_process.rs @@ -0,0 +1,292 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +//! Credentials Provider for external process + +use crate::json_credentials::{json_parse_loop, InvalidJsonCredentials, RefreshableCredentials}; +use aws_smithy_json::deserialize::Token; +use aws_smithy_types::date_time::Format; +use aws_smithy_types::DateTime; +use aws_types::credentials::{future, CredentialsError, ProvideCredentials}; +use aws_types::{credentials, Credentials}; +use std::fmt; +use std::process::Command; +use std::time::SystemTime; + +pub(crate) struct CommandWithSensitiveArgs(T); + +impl CommandWithSensitiveArgs +where + T: AsRef, +{ + pub(crate) fn new(value: T) -> Self { + Self(value) + } + + pub(crate) fn unredacted(&self) -> &str { + self.0.as_ref() + } +} + +impl fmt::Display for CommandWithSensitiveArgs +where + T: AsRef, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // Security: The arguments for command must be redacted since they can be sensitive + let command = self.0.as_ref(); + match command.find(char::is_whitespace) { + Some(index) => write!(f, "{} ** arguments redacted **", &command[0..index]), + None => write!(f, "{}", command), + } + } +} + +impl fmt::Debug for CommandWithSensitiveArgs +where + T: AsRef, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}", format!("{}", self)) + } +} + +impl Clone for CommandWithSensitiveArgs +where + T: Clone, +{ + fn clone(&self) -> Self { + Self(self.0.clone()) + } +} + +/// External process credentials provider +/// +/// This credentials provider runs a configured external process and parses +/// its output to retrieve credentials. +/// +/// The external process must exit with status 0 and output the following +/// JSON format to `stdout` to provide credentials: +/// +/// ```json +/// { +/// "Version:" 1, +/// "AccessKeyId": "access key id", +/// "SecretAccessKey": "secret access key", +/// "SessionToken": "session token", +/// "Expiration": "time that the expiration will expire" +/// } +/// ``` +/// +/// The `Version` must be set to 1. `AccessKeyId` and `SecretAccessKey` are always required. +/// `SessionToken` must be set if a session token is associated with the `AccessKeyId`. +/// The `Expiration` is optional, and must be given in the RFC 3339 date time format (e.g., +/// `2022-05-26T12:34:56.789Z`). +/// +/// If the external process exits with a non-zero status, then the contents of `stderr` +/// will be output as part of the credentials provider error message. +/// +/// This credentials provider is included in the profile credentials provider, and can be +/// configured using the `credential_process` attribute. For example: +/// +/// ```plain +/// [profile example] +/// credential_process = /path/to/my/process --some --arguments +/// ``` +#[derive(Debug)] +pub struct CredentialProcessProvider { + command: CommandWithSensitiveArgs, +} + +impl ProvideCredentials for CredentialProcessProvider { + fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'a> + where + Self: 'a, + { + future::ProvideCredentials::new(self.credentials()) + } +} + +impl CredentialProcessProvider { + /// Create new [`CredentialProcessProvider`] with the `command` needed to execute the external process. + pub fn new(command: String) -> Self { + Self { + command: CommandWithSensitiveArgs::new(command), + } + } + + async fn credentials(&self) -> credentials::Result { + // Security: command arguments must be redacted at debug level + tracing::debug!(command = %self.command, "loading credentials from external process"); + + let mut command = if cfg!(windows) { + let mut command = Command::new("cmd.exe"); + command.args(&["/C", self.command.unredacted()]); + command + } else { + let mut command = Command::new("sh"); + command.args(&["-c", self.command.unredacted()]); + command + }; + + let output = command.output().map_err(|e| { + CredentialsError::provider_error(format!( + "Error retrieving credentials from external process: {}", + e + )) + })?; + + // Security: command arguments can be logged at trace level + tracing::trace!(command = ?command, status = ?output.status, "executed command (unredacted)"); + + if !output.status.success() { + let reason = + std::str::from_utf8(&output.stderr).unwrap_or("could not decode stderr as UTF-8"); + return Err(CredentialsError::provider_error(format!( + "Error retrieving credentials: external process exited with code {}. Stderr: {}", + output.status, reason + ))); + } + + let output = std::str::from_utf8(&output.stdout).map_err(|e| { + CredentialsError::provider_error(format!( + "Error retrieving credentials from external process: could not decode output as UTF-8: {}", + e + )) + })?; + + match parse_credential_process_json_credentials(output) { + Ok(RefreshableCredentials { + access_key_id, + secret_access_key, + session_token, + expiration, + .. + }) => Ok(Credentials::new( + access_key_id, + secret_access_key, + Some(session_token.to_string()), + expiration.into(), + "CredentialProcess", + )), + Err(invalid) => Err(CredentialsError::provider_error(format!( + "Error retrieving credentials from external process, could not parse response: {}", + invalid + ))), + } + } +} + +/// Deserialize a credential_process response from a string +/// +/// Returns an error if the response cannot be successfully parsed or is missing keys. +/// +/// Keys are case insensitive. +pub(crate) fn parse_credential_process_json_credentials( + credentials_response: &str, +) -> Result { + let mut version = None; + let mut access_key_id = None; + let mut secret_access_key = None; + let mut session_token = None; + let mut expiration = None; + json_parse_loop(credentials_response.as_bytes(), |key, value| { + match (key, value) { + /* + "Version": 1, + "AccessKeyId": "ASIARTESTID", + "SecretAccessKey": "TESTSECRETKEY", + "SessionToken": "TESTSESSIONTOKEN", + "Expiration": "2022-05-02T18:36:00+00:00" + */ + (key, Token::ValueNumber { value, .. }) if key.eq_ignore_ascii_case("Version") => { + version = Some(value.to_i32()) + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("AccessKeyId") => { + access_key_id = Some(value.to_unescaped()?) + } + (key, Token::ValueString { value, .. }) + if key.eq_ignore_ascii_case("SecretAccessKey") => + { + secret_access_key = Some(value.to_unescaped()?) + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("SessionToken") => { + session_token = Some(value.to_unescaped()?) + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("Expiration") => { + expiration = Some(value.to_unescaped()?) + } + + _ => {} + }; + Ok(()) + })?; + + match version { + Some(1) => { /* continue */ } + None => return Err(InvalidJsonCredentials::MissingField("Version")), + Some(version) => { + return Err(InvalidJsonCredentials::InvalidField { + field: "version", + err: format!("unknown version number: {}", version).into(), + }) + } + } + + let access_key_id = access_key_id.ok_or(InvalidJsonCredentials::MissingField("AccessKeyId"))?; + let secret_access_key = + secret_access_key.ok_or(InvalidJsonCredentials::MissingField("SecretAccessKey"))?; + let session_token = session_token.ok_or(InvalidJsonCredentials::MissingField("Token"))?; + let expiration = expiration.ok_or(InvalidJsonCredentials::MissingField("Expiration"))?; + let expiration = SystemTime::try_from( + DateTime::from_str(expiration.as_ref(), Format::DateTime).map_err(|err| { + InvalidJsonCredentials::InvalidField { + field: "Expiration", + err: err.into(), + } + })?, + ) + .map_err(|_| { + InvalidJsonCredentials::Other( + "credential expiration time cannot be represented by a DateTime".into(), + ) + })?; + Ok(RefreshableCredentials { + access_key_id, + secret_access_key, + session_token, + expiration, + }) +} + +#[cfg(test)] +mod test { + use crate::credential_process::CredentialProcessProvider; + use aws_smithy_types::date_time::Format; + use aws_smithy_types::DateTime; + use aws_types::credentials::ProvideCredentials; + use std::time::SystemTime; + + #[tokio::test] + async fn test_credential_process() { + let provider = CredentialProcessProvider::new(String::from( + r#"echo '{ "Version": 1, "AccessKeyId": "ASIARTESTID", "SecretAccessKey": "TESTSECRETKEY", "SessionToken": "TESTSESSIONTOKEN", "Expiration": "2022-05-02T18:36:00+00:00" }'"#, + )); + let creds = provider.provide_credentials().await.expect("valid creds"); + assert_eq!(creds.access_key_id(), "ASIARTESTID"); + assert_eq!(creds.secret_access_key(), "TESTSECRETKEY"); + assert_eq!(creds.session_token(), Some("TESTSESSIONTOKEN")); + assert_eq!( + creds.expiry(), + Some( + SystemTime::try_from( + DateTime::from_str("2022-05-02T18:36:00+00:00", Format::DateTime) + .expect("static datetime") + ) + .expect("static datetime") + ) + ); + } +} diff --git a/aws/rust-runtime/aws-config/src/http_credential_provider.rs b/aws/rust-runtime/aws-config/src/http_credential_provider.rs index 998fba64dcc..d77037522c3 100644 --- a/aws/rust-runtime/aws-config/src/http_credential_provider.rs +++ b/aws/rust-runtime/aws-config/src/http_credential_provider.rs @@ -22,7 +22,7 @@ use aws_types::credentials::CredentialsError; use aws_types::{credentials, Credentials}; use crate::connector::expect_connector; -use crate::json_credentials::{parse_json_credentials, JsonCredentials}; +use crate::json_credentials::{parse_json_credentials, JsonCredentials, RefreshableCredentials}; use crate::provider_config::ProviderConfig; use bytes::Bytes; @@ -145,12 +145,12 @@ impl ParseStrictResponse for CredentialsResponseParser { std::str::from_utf8(response.body().as_ref()).map_err(CredentialsError::unhandled)?; let json_creds = parse_json_credentials(str_resp).map_err(CredentialsError::unhandled)?; match json_creds { - JsonCredentials::RefreshableCredentials { + JsonCredentials::RefreshableCredentials(RefreshableCredentials { access_key_id, secret_access_key, session_token, expiration, - } => Ok(Credentials::new( + }) => Ok(Credentials::new( access_key_id, secret_access_key, Some(session_token.to_string()), diff --git a/aws/rust-runtime/aws-config/src/imds/credentials.rs b/aws/rust-runtime/aws-config/src/imds/credentials.rs index f66101f3969..28f4d4b22f5 100644 --- a/aws/rust-runtime/aws-config/src/imds/credentials.rs +++ b/aws/rust-runtime/aws-config/src/imds/credentials.rs @@ -10,7 +10,7 @@ use crate::imds; use crate::imds::client::{ImdsError, LazyClient}; -use crate::json_credentials::{parse_json_credentials, JsonCredentials}; +use crate::json_credentials::{parse_json_credentials, JsonCredentials, RefreshableCredentials}; use crate::provider_config::ProviderConfig; use aws_smithy_client::SdkError; use aws_types::credentials::{future, CredentialsError, ProvideCredentials}; @@ -170,13 +170,13 @@ impl ImdsCredentialsProvider { .await .map_err(CredentialsError::provider_error)?; match parse_json_credentials(&credentials) { - Ok(JsonCredentials::RefreshableCredentials { + Ok(JsonCredentials::RefreshableCredentials(RefreshableCredentials { access_key_id, secret_access_key, session_token, expiration, .. - }) => Ok(Credentials::new( + })) => Ok(Credentials::new( access_key_id, secret_access_key, Some(session_token.to_string()), diff --git a/aws/rust-runtime/aws-config/src/json_credentials.rs b/aws/rust-runtime/aws-config/src/json_credentials.rs index 2ea8ccc2a18..fb3cdecc12c 100644 --- a/aws/rust-runtime/aws-config/src/json_credentials.rs +++ b/aws/rust-runtime/aws-config/src/json_credentials.rs @@ -10,7 +10,7 @@ use aws_smithy_types::DateTime; use std::borrow::Cow; use std::convert::TryFrom; use std::error::Error; -use std::fmt::{Display, Formatter}; +use std::fmt::{self, Display, Formatter}; use std::time::SystemTime; #[derive(Debug)] @@ -63,15 +63,29 @@ impl Display for InvalidJsonCredentials { impl Error for InvalidJsonCredentials {} +#[derive(PartialEq, Eq)] +pub(crate) struct RefreshableCredentials<'a> { + pub(crate) access_key_id: Cow<'a, str>, + pub(crate) secret_access_key: Cow<'a, str>, + pub(crate) session_token: Cow<'a, str>, + pub(crate) expiration: SystemTime, +} + +impl<'a> fmt::Debug for RefreshableCredentials<'a> { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.debug_struct("RefreshableCredentials") + .field("access_key_id", &self.access_key_id) + .field("secret_access_key", &"** redacted **") + .field("session_token", &"** redacted **") + .field("expiration", &self.expiration) + .finish() + } +} + #[non_exhaustive] #[derive(Debug, PartialEq, Eq)] pub(crate) enum JsonCredentials<'a> { - RefreshableCredentials { - access_key_id: Cow<'a, str>, - secret_access_key: Cow<'a, str>, - session_token: Cow<'a, str>, - expiration: SystemTime, - }, + RefreshableCredentials(RefreshableCredentials<'a>), Error { code: Cow<'a, str>, message: Cow<'a, str>, @@ -115,7 +129,7 @@ pub(crate) fn parse_json_credentials( let mut expiration = None; let mut message = None; json_parse_loop(credentials_response.as_bytes(), |key, value| { - match key { + match (key, value) { /* "Code": "Success", "Type": "AWS-HMAC", @@ -125,16 +139,31 @@ pub(crate) fn parse_json_credentials( "Expiration" : "....", "LastUpdated" : "2009-11-23T0:00:00Z" */ - c if c.eq_ignore_ascii_case("Code") => code = Some(value), - c if c.eq_ignore_ascii_case("AccessKeyId") => access_key_id = Some(value), - c if c.eq_ignore_ascii_case("SecretAccessKey") => secret_access_key = Some(value), - c if c.eq_ignore_ascii_case("Token") => session_token = Some(value), - c if c.eq_ignore_ascii_case("Expiration") => expiration = Some(value), + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("Code") => { + code = Some(value.to_unescaped()?); + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("AccessKeyId") => { + access_key_id = Some(value.to_unescaped()?); + } + (key, Token::ValueString { value, .. }) + if key.eq_ignore_ascii_case("SecretAccessKey") => + { + secret_access_key = Some(value.to_unescaped()?); + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("Token") => { + session_token = Some(value.to_unescaped()?); + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("Expiration") => { + expiration = Some(value.to_unescaped()?); + } // Error case handling: message will be set - c if c.eq_ignore_ascii_case("Message") => message = Some(value), + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("Message") => { + message = Some(value.to_unescaped()?); + } _ => {} - } + }; + Ok(()) })?; match code { // IMDS does not appear to reply with a `Code` missing, but documentation indicates it @@ -161,12 +190,14 @@ pub(crate) fn parse_json_credentials( "credential expiration time cannot be represented by a SystemTime".into(), ) })?; - Ok(JsonCredentials::RefreshableCredentials { - access_key_id, - secret_access_key, - session_token, - expiration, - }) + Ok(JsonCredentials::RefreshableCredentials( + RefreshableCredentials { + access_key_id, + secret_access_key, + session_token, + expiration, + }, + )) } Some(other) => Ok(JsonCredentials::Error { code: other, @@ -177,7 +208,7 @@ pub(crate) fn parse_json_credentials( pub(crate) fn json_parse_loop<'a>( input: &'a [u8], - mut f: impl FnMut(Cow<'a, str>, Cow<'a, str>), + mut f: impl FnMut(Cow<'a, str>, &Token<'a>) -> Result<(), InvalidJsonCredentials>, ) -> Result<(), InvalidJsonCredentials> { let mut tokens = json_token_iter(input).peekable(); if !matches!(tokens.next().transpose()?, Some(Token::StartObject { .. })) { @@ -189,10 +220,9 @@ pub(crate) fn json_parse_loop<'a>( match tokens.next().transpose()? { Some(Token::EndObject { .. }) => break, Some(Token::ObjectKey { key, .. }) => { - if let Some(Ok(Token::ValueString { value, .. })) = tokens.peek() { + if let Some(Ok(token)) = tokens.peek() { let key = key.to_unescaped()?; - let value = value.to_unescaped()?; - f(key, value) + f(key, token)? } skip_value(&mut tokens)?; } @@ -214,7 +244,7 @@ pub(crate) fn json_parse_loop<'a>( #[cfg(test)] mod test { use crate::json_credentials::{ - parse_json_credentials, InvalidJsonCredentials, JsonCredentials, + parse_json_credentials, InvalidJsonCredentials, JsonCredentials, RefreshableCredentials, }; use std::time::{Duration, UNIX_EPOCH}; @@ -233,12 +263,12 @@ mod test { let parsed = parse_json_credentials(response).expect("valid JSON"); assert_eq!( parsed, - JsonCredentials::RefreshableCredentials { + JsonCredentials::RefreshableCredentials(RefreshableCredentials { access_key_id: "ASIARTEST".into(), secret_access_key: "xjtest".into(), session_token: "IQote///test".into(), expiration: UNIX_EPOCH + Duration::from_secs(1631935916), - } + }) ) } @@ -273,12 +303,12 @@ mod test { let parsed = parse_json_credentials(resp).expect("code not required"); assert_eq!( parsed, - JsonCredentials::RefreshableCredentials { + JsonCredentials::RefreshableCredentials(RefreshableCredentials { access_key_id: "ASIARTEST".into(), secret_access_key: "xjtest".into(), session_token: "IQote///test".into(), expiration: UNIX_EPOCH + Duration::from_secs(1631935916), - } + }) ) } @@ -347,12 +377,12 @@ mod test { assert!( matches!( &parsed, - JsonCredentials::RefreshableCredentials { + JsonCredentials::RefreshableCredentials(RefreshableCredentials{ access_key_id: Cow::Borrowed("ASIARTEST"), secret_access_key: Cow::Borrowed("SECRETTEST"), session_token, expiration - } if session_token.starts_with("token") && *expiration == UNIX_EPOCH + Duration::from_secs(1234567890) + }) if session_token.starts_with("token") && *expiration == UNIX_EPOCH + Duration::from_secs(1234567890) ), "{:?}", parsed diff --git a/aws/rust-runtime/aws-config/src/lib.rs b/aws/rust-runtime/aws-config/src/lib.rs index 74e056d8b33..5b0655c7a9e 100644 --- a/aws/rust-runtime/aws-config/src/lib.rs +++ b/aws/rust-runtime/aws-config/src/lib.rs @@ -123,6 +123,8 @@ pub mod sso; pub mod connector; +pub mod credential_process; + pub(crate) mod parsing; // Re-export types from smithy-types diff --git a/aws/rust-runtime/aws-config/src/profile/credentials.rs b/aws/rust-runtime/aws-config/src/profile/credentials.rs index 3f5487fa0ee..78a2d47696c 100644 --- a/aws/rust-runtime/aws-config/src/profile/credentials.rs +++ b/aws/rust-runtime/aws-config/src/profile/credentials.rs @@ -122,6 +122,14 @@ impl ProvideCredentials for ProfileFileCredentialsProvider { /// /// Other more complex configurations are possible, consult `test-data/assume-role-tests.json`. /// +/// ### Credentials loaded from an external process +/// ```ini +/// [default] +/// credential_process = /opt/bin/awscreds-custom --username helen +/// ``` +/// +/// An external process can be used to provide credentials. +/// /// ### Loading Credentials from SSO /// ```ini /// [default] @@ -493,4 +501,7 @@ mod test { make_test!(retry_on_error); make_test!(invalid_config); make_test!(region_override); + make_test!(credential_process); + make_test!(credential_process_failure); + make_test!(credential_process_invalid); } diff --git a/aws/rust-runtime/aws-config/src/profile/credentials/exec.rs b/aws/rust-runtime/aws-config/src/profile/credentials/exec.rs index d6ebde9f799..b7aa76c849c 100644 --- a/aws/rust-runtime/aws-config/src/profile/credentials/exec.rs +++ b/aws/rust-runtime/aws-config/src/profile/credentials/exec.rs @@ -11,6 +11,7 @@ use aws_types::region::Region; use super::repr::{self, BaseProvider}; +use crate::credential_process::CredentialProcessProvider; use crate::profile::credentials::ProfileFileError; use crate::provider_config::ProviderConfig; use crate::sso::{SsoConfig, SsoCredentialsProvider}; @@ -100,6 +101,9 @@ impl ProviderChain { })? } BaseProvider::AccessKey(key) => Arc::new(key.clone()), + BaseProvider::CredentialProcess(credential_process) => Arc::new( + CredentialProcessProvider::new(credential_process.unredacted().into()), + ), BaseProvider::WebIdentityTokenRole { role_arn, web_identity_token_file, diff --git a/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs b/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs index 04d50c69d62..a14d3e3bc6e 100644 --- a/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs +++ b/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs @@ -12,6 +12,7 @@ //! 1-credential-per row (as opposed to a direct profile file representation which can combine //! multiple actions into the same profile). +use crate::credential_process::CommandWithSensitiveArgs; use crate::profile::credentials::ProfileFileError; use crate::profile::{Profile, ProfileSet}; use aws_types::Credentials; @@ -24,17 +25,17 @@ use aws_types::Credentials; /// ProfileChain is a direct representation of the Profile. It can contain named providers /// that don't actually have implementations. #[derive(Debug)] -pub struct ProfileChain<'a> { - pub(crate) base: BaseProvider<'a>, - pub(crate) chain: Vec>, +pub(super) struct ProfileChain<'a> { + pub(super) base: BaseProvider<'a>, + pub(super) chain: Vec>, } impl<'a> ProfileChain<'a> { - pub fn base(&self) -> &BaseProvider<'a> { + pub(super) fn base(&self) -> &BaseProvider<'a> { &self.base } - pub fn chain(&self) -> &[RoleArn<'a>] { + pub(super) fn chain(&self) -> &[RoleArn<'a>] { self.chain.as_slice() } } @@ -43,9 +44,9 @@ impl<'a> ProfileChain<'a> { /// /// Base providers do not require input credentials to provide their own credentials, /// e.g. IMDS, ECS, Environment variables -#[derive(Debug, Clone)] +#[derive(Clone, Debug)] #[non_exhaustive] -pub enum BaseProvider<'a> { +pub(super) enum BaseProvider<'a> { /// A profile that specifies a named credential source /// Eg: `credential_source = Ec2InstanceMetadata` /// @@ -82,6 +83,13 @@ pub enum BaseProvider<'a> { sso_role_name: &'a str, sso_start_url: &'a str, }, + + /// A profile that specifies a `credential_process` + /// ```ini + /// [profile assume-role] + /// credential_process = /opt/bin/awscreds-custom --username helen + /// ``` + CredentialProcess(CommandWithSensitiveArgs<&'a str>), } /// A profile that specifies a role to assume @@ -89,18 +97,18 @@ pub enum BaseProvider<'a> { /// A RoleArn can only be created from either a profile with `source_profile` /// or one with `credential_source`. #[derive(Debug)] -pub struct RoleArn<'a> { +pub(super) struct RoleArn<'a> { /// Role to assume - pub role_arn: &'a str, + pub(super) role_arn: &'a str, /// external_id parameter to pass to the assume role provider - pub external_id: Option<&'a str>, + pub(super) external_id: Option<&'a str>, /// session name parameter to pass to the assume role provider - pub session_name: Option<&'a str>, + pub(super) session_name: Option<&'a str>, } /// Resolve a ProfileChain from a ProfileSet or return an error -pub fn resolve_chain<'a>( +pub(super) fn resolve_chain<'a>( profile_set: &'a ProfileSet, profile_override: Option<&str>, ) -> Result, ProfileFileError> { @@ -209,6 +217,10 @@ mod static_credentials { pub const AWS_SECRET_ACCESS_KEY: &str = "aws_secret_access_key"; pub const AWS_SESSION_TOKEN: &str = "aws_session_token"; } + +mod credential_process { + pub const CREDENTIAL_PROCESS: &str = "credential_process"; +} const PROVIDER_NAME: &str = "ProfileFile"; fn base_provider(profile: &Profile) -> Result { @@ -217,6 +229,7 @@ fn base_provider(profile: &Profile) -> Result { Some(source) => Ok(BaseProvider::NamedSource(source)), None => web_identity_token_from_profile(profile) .or_else(|| sso_from_profile(profile)) + .or_else(|| credential_process_from_profile(profile)) .unwrap_or_else(|| Ok(BaseProvider::AccessKey(static_creds_from_profile(profile)?))), } } @@ -363,8 +376,28 @@ fn static_creds_from_profile(profile: &Profile) -> Result Option> { + profile + .get(credential_process::CREDENTIAL_PROCESS) + .map(|credential_process| { + Ok(BaseProvider::CredentialProcess( + CommandWithSensitiveArgs::new(credential_process), + )) + }) +} + #[cfg(test)] mod tests { + use crate::credential_process::CommandWithSensitiveArgs; use crate::profile::credentials::repr::{resolve_chain, BaseProvider, ProfileChain}; use crate::profile::ProfileSet; use serde::Deserialize; @@ -427,6 +460,9 @@ mod tests { secret_access_key: creds.secret_access_key().into(), session_token: creds.session_token().map(|tok| tok.to_string()), }), + BaseProvider::CredentialProcess(credential_process) => output.push( + Provider::CredentialProcess(credential_process.unredacted().into()), + ), BaseProvider::WebIdentityTokenRole { role_arn, web_identity_token_file, @@ -477,6 +513,7 @@ mod tests { session_token: Option, }, NamedSource(String), + CredentialProcess(String), WebIdentityToken { role_arn: String, web_identity_token_file: String, @@ -489,4 +526,31 @@ mod tests { sso_start_url: String, }, } + + #[test] + fn base_provider_process_credentials_args_redaction() { + assert_eq!( + "CredentialProcess(\"program\")", + format!( + "{:?}", + BaseProvider::CredentialProcess(CommandWithSensitiveArgs::new("program")) + ) + ); + assert_eq!( + "CredentialProcess(\"program ** arguments redacted **\")", + format!( + "{:?}", + BaseProvider::CredentialProcess(CommandWithSensitiveArgs::new("program arg1 arg2")) + ) + ); + assert_eq!( + "CredentialProcess(\"program ** arguments redacted **\")", + format!( + "{:?}", + BaseProvider::CredentialProcess(CommandWithSensitiveArgs::new( + "program\targ1 arg2" + )) + ) + ); + } } diff --git a/aws/rust-runtime/aws-config/src/sso.rs b/aws/rust-runtime/aws-config/src/sso.rs index d89d0b4b869..eb04f98df10 100644 --- a/aws/rust-runtime/aws-config/src/sso.rs +++ b/aws/rust-runtime/aws-config/src/sso.rs @@ -17,6 +17,7 @@ use crate::provider_config::ProviderConfig; use aws_sdk_sso::middleware::DefaultMiddleware as SsoMiddleware; use aws_sdk_sso::model::RoleCredentials; use aws_smithy_client::erase::DynConnector; +use aws_smithy_json::deserialize::Token; use aws_smithy_types::date_time::Format; use aws_smithy_types::DateTime; use aws_types::credentials::{CredentialsError, ProvideCredentials}; @@ -289,12 +290,23 @@ fn parse_token_json(input: &[u8]) -> Result { let mut expires_at = None; let mut region = None; let mut start_url = None; - json_parse_loop(input, |key, value| match key { - key if key.eq_ignore_ascii_case("accessToken") => acccess_token = Some(value.to_string()), - key if key.eq_ignore_ascii_case("expiresAt") => expires_at = Some(value), - key if key.eq_ignore_ascii_case("region") => region = Some(value.to_string()), - key if key.eq_ignore_ascii_case("startUrl") => start_url = Some(value.to_string()), - _other => {} // ignored + json_parse_loop(input, |key, value| { + match (key, value) { + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("accessToken") => { + acccess_token = Some(value.to_unescaped()?.to_string()) + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("expiresAt") => { + expires_at = Some(value.to_unescaped()?) + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("region") => { + region = Some(value.to_unescaped()?.to_string()) + } + (key, Token::ValueString { value, .. }) if key.eq_ignore_ascii_case("startUrl") => { + start_url = Some(value.to_unescaped()?.to_string()) + } + _other => {} // ignored + }; + Ok(()) })?; let access_token = Zeroizing::new(acccess_token.ok_or(InvalidJsonCredentials::MissingField("accessToken"))?); diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/env.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/env.json new file mode 100644 index 00000000000..55fcfbeb051 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/env.json @@ -0,0 +1,3 @@ +{ + "HOME": "/home" +} diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/fs/home/.aws/config b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/fs/home/.aws/config new file mode 100644 index 00000000000..aaec123f3fa --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/fs/home/.aws/config @@ -0,0 +1,6 @@ +[default] +source_profile = base +credential_process = echo '{ "Version": 1, "AccessKeyId": "ASIARTESTID", "SecretAccessKey": "TESTSECRETKEY", "SessionToken": "TESTSESSIONTOKEN", "Expiration": "2022-05-02T18:36:00+00:00" }' + +[profile base] +region = us-east-1 diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/fs/home/.aws/credentials b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/fs/home/.aws/credentials new file mode 100644 index 00000000000..1cab6a6ca21 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/fs/home/.aws/credentials @@ -0,0 +1,3 @@ +[base] +aws_access_key_id = AKIAFAKE +aws_secret_access_key = FAKE diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/http-traffic.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/http-traffic.json new file mode 100644 index 00000000000..e7ade3e074d --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/http-traffic.json @@ -0,0 +1,5 @@ +{ + "docs": "test case using credential_process", + "version": "V0", + "events": [] +} diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/test-case.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/test-case.json new file mode 100644 index 00000000000..a91725c697d --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process/test-case.json @@ -0,0 +1,12 @@ +{ + "name": "credential_process", + "docs": "credential_process loads credentials from external process", + "result": { + "Ok": { + "access_key_id": "ASIARTESTID", + "secret_access_key": "TESTSECRETKEY", + "session_token": "TESTSESSIONTOKEN", + "expiry": 1651516560 + } + } +} diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/env.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/env.json new file mode 100644 index 00000000000..55fcfbeb051 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/env.json @@ -0,0 +1,3 @@ +{ + "HOME": "/home" +} diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/fs/home/.aws/config b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/fs/home/.aws/config new file mode 100644 index 00000000000..13f1cd1a6c4 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/fs/home/.aws/config @@ -0,0 +1,6 @@ +[default] +source_profile = base +credential_process = exit 1 + +[profile base] +region = us-east-1 diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/fs/home/.aws/credentials b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/fs/home/.aws/credentials new file mode 100644 index 00000000000..1cab6a6ca21 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/fs/home/.aws/credentials @@ -0,0 +1,3 @@ +[base] +aws_access_key_id = AKIAFAKE +aws_secret_access_key = FAKE diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/http-traffic.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/http-traffic.json new file mode 100644 index 00000000000..e7ade3e074d --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/http-traffic.json @@ -0,0 +1,5 @@ +{ + "docs": "test case using credential_process", + "version": "V0", + "events": [] +} diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/test-case.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/test-case.json new file mode 100644 index 00000000000..a905cc413ee --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_failure/test-case.json @@ -0,0 +1,7 @@ +{ + "name": "credential_process_failure", + "docs": "credential_process handles the external process exiting with a non-zero exit code", + "result": { + "ErrorContains": "An error occurred while loading credentials: Error retrieving credentials: external process exited with code exit status: 1" + } +} diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/env.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/env.json new file mode 100644 index 00000000000..55fcfbeb051 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/env.json @@ -0,0 +1,3 @@ +{ + "HOME": "/home" +} diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/fs/home/.aws/config b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/fs/home/.aws/config new file mode 100644 index 00000000000..f42737c30c7 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/fs/home/.aws/config @@ -0,0 +1,6 @@ +[default] +source_profile = base +credential_process = echo 'invalid json' + +[profile base] +region = us-east-1 diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/fs/home/.aws/credentials b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/fs/home/.aws/credentials new file mode 100644 index 00000000000..1cab6a6ca21 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/fs/home/.aws/credentials @@ -0,0 +1,3 @@ +[base] +aws_access_key_id = AKIAFAKE +aws_secret_access_key = FAKE diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/http-traffic.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/http-traffic.json new file mode 100644 index 00000000000..e7ade3e074d --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/http-traffic.json @@ -0,0 +1,5 @@ +{ + "docs": "test case using credential_process", + "version": "V0", + "events": [] +} diff --git a/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/test-case.json b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/test-case.json new file mode 100644 index 00000000000..795134a98c7 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/profile-provider/credential_process_invalid/test-case.json @@ -0,0 +1,7 @@ +{ + "name": "credential_process_invalid", + "docs": "credential_process handles the external process returning invalid json", + "result": { + "ErrorContains": "Error retrieving credentials from external process, could not parse response: invalid JSON in response" + } +} From 16fda3a8396a099f57b875ef55f438c830e50a10 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Thu, 26 May 2022 15:56:18 -0700 Subject: [PATCH 03/49] Simplify a `Clone` impl (#1418) --- aws/rust-runtime/aws-config/src/credential_process.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/aws/rust-runtime/aws-config/src/credential_process.rs b/aws/rust-runtime/aws-config/src/credential_process.rs index 10e2b424d41..77c8b224f75 100644 --- a/aws/rust-runtime/aws-config/src/credential_process.rs +++ b/aws/rust-runtime/aws-config/src/credential_process.rs @@ -15,6 +15,7 @@ use std::fmt; use std::process::Command; use std::time::SystemTime; +#[derive(Clone)] pub(crate) struct CommandWithSensitiveArgs(T); impl CommandWithSensitiveArgs @@ -53,15 +54,6 @@ where } } -impl Clone for CommandWithSensitiveArgs -where - T: Clone, -{ - fn clone(&self) -> Self { - Self(self.0.clone()) - } -} - /// External process credentials provider /// /// This credentials provider runs a configured external process and parses From a5790f7e5f30ddf062aae1fd94266be6a8bd7e38 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Thu, 26 May 2022 17:28:36 -0700 Subject: [PATCH 04/49] Implement release-aware yank tooling (#1407) --- tools/publisher/Cargo.lock | 3 +- tools/publisher/Cargo.toml | 3 +- tools/publisher/src/cargo/yank.rs | 41 ++--- tools/publisher/src/main.rs | 10 +- tools/publisher/src/subcommand/mod.rs | 2 +- .../publisher/src/subcommand/yank_category.rs | 133 -------------- .../publisher/src/subcommand/yank_release.rs | 163 ++++++++++++++++++ 7 files changed, 188 insertions(+), 167 deletions(-) delete mode 100644 tools/publisher/src/subcommand/yank_category.rs create mode 100644 tools/publisher/src/subcommand/yank_release.rs diff --git a/tools/publisher/Cargo.lock b/tools/publisher/Cargo.lock index 2525720476a..d21f3b48965 100644 --- a/tools/publisher/Cargo.lock +++ b/tools/publisher/Cargo.lock @@ -979,7 +979,7 @@ dependencies = [ [[package]] name = "publisher" -version = "0.3.0" +version = "0.4.0" dependencies = [ "anyhow", "async-recursion", @@ -992,6 +992,7 @@ dependencies = [ "lazy_static", "num_cpus", "regex", + "reqwest", "semver", "serde", "serde_json", diff --git a/tools/publisher/Cargo.toml b/tools/publisher/Cargo.toml index d252149a277..f2a30d09486 100644 --- a/tools/publisher/Cargo.toml +++ b/tools/publisher/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "publisher" -version = "0.3.0" +version = "0.4.0" authors = ["AWS Rust SDK Team "] description = "Tool used to publish the AWS SDK to crates.io" edition = "2021" @@ -25,6 +25,7 @@ handlebars = "4.2" lazy_static = "1" num_cpus = "1.13" regex = "1.5.4" +reqwest = "0.11.10" semver = "1.0" serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/tools/publisher/src/cargo/yank.rs b/tools/publisher/src/cargo/yank.rs index b35a91a474b..68b38668a31 100644 --- a/tools/publisher/src/cargo/yank.rs +++ b/tools/publisher/src/cargo/yank.rs @@ -3,26 +3,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -use crate::package::PackageHandle; use anyhow::Result; use smithy_rs_tool_common::shell::{capture_error, output_text, ShellOperation}; -use std::path::PathBuf; use std::process::Command; use tracing::info; /// Yanks a package version from crates.io pub struct Yank { program: &'static str, - package_handle: PackageHandle, - package_path: PathBuf, + crate_name: String, + crate_version: String, } impl Yank { - pub fn new(package_handle: PackageHandle, package_path: impl Into) -> Yank { + pub fn new(crate_name: impl Into, crate_version: impl Into) -> Yank { Yank { program: "cargo", - package_handle, - package_path: package_path.into(), + crate_name: crate_name.into(), + crate_version: crate_version.into(), } } } @@ -33,22 +31,21 @@ impl ShellOperation for Yank { fn run(&self) -> Result<()> { let mut command = Command::new(self.program); command - .current_dir(&self.package_path) .arg("yank") .arg("--vers") - .arg(format!("{}", self.package_handle.version)) - .arg(&self.package_handle.name); + .arg(&self.crate_version) + .arg(&self.crate_name); let output = command.output()?; if !output.status.success() { let (_, stderr) = output_text(&output); let no_such_version = format!( "error: crate `{}` does not have a version `{}`", - self.package_handle.name, self.package_handle.version + self.crate_name, self.crate_version ); if stderr.contains(&no_such_version) { info!( "{} never had a version {}.", - self.package_handle.name, self.package_handle.version + self.crate_name, self.crate_version ); } else { return Err(capture_error("cargo yank", &output)); @@ -61,18 +58,13 @@ impl ShellOperation for Yank { #[cfg(all(test, not(target_os = "windows")))] mod tests { use super::*; - use semver::Version; - use std::env; #[tokio::test] async fn yank_succeeds() { Yank { program: "./fake_cargo/cargo_success", - package_handle: PackageHandle::new( - "aws-sdk-dynamodb", - Version::parse("0.0.22-alpha").unwrap(), - ), - package_path: env::current_dir().unwrap().into(), + crate_name: "aws-sdk-dynamodb".into(), + crate_version: "0.0.22-alpha".into(), } .spawn() .await @@ -83,11 +75,8 @@ mod tests { async fn yank_fails() { let result = Yank { program: "./fake_cargo/cargo_fails", - package_handle: PackageHandle::new( - "something", - Version::parse("0.0.22-alpha").unwrap(), - ), - package_path: env::current_dir().unwrap().into(), + crate_name: "something".into(), + crate_version: "0.0.22-alpha".into(), } .spawn() .await; @@ -105,8 +94,8 @@ mod tests { async fn yank_no_such_version() { Yank { program: "./fake_cargo/cargo_yank_not_found", - package_handle: PackageHandle::new("aws-sigv4", Version::parse("0.0.0").unwrap()), - package_path: env::current_dir().unwrap().into(), + crate_name: "aws-sigv4".into(), + crate_version: "0.0.0".into(), } .spawn() .await diff --git a/tools/publisher/src/main.rs b/tools/publisher/src/main.rs index 753d34c596a..e3a81864580 100644 --- a/tools/publisher/src/main.rs +++ b/tools/publisher/src/main.rs @@ -5,7 +5,7 @@ use crate::subcommand::fix_manifests::subcommand_fix_manifests; use crate::subcommand::publish::subcommand_publish; -use crate::subcommand::yank_category::subcommand_yank_category; +use crate::subcommand::yank_release::{subcommand_yank_release, YankReleaseArgs}; use anyhow::Result; use clap::Parser; use subcommand::fix_manifests::FixManifestsArgs; @@ -14,7 +14,6 @@ use subcommand::generate_version_manifest::{ }; use subcommand::hydrate_readme::{subcommand_hydrate_readme, HydrateReadmeArgs}; use subcommand::publish::PublishArgs; -use subcommand::yank_category::YankCategoryArgs; mod cargo; mod fs; @@ -36,8 +35,9 @@ enum Args { FixManifests(FixManifestsArgs), /// Publishes crates to crates.io Publish(PublishArgs), - /// Yanks a category of packages with the given version number - YankCategory(YankCategoryArgs), + /// Yanks an entire SDK release. For individual packages, use `cargo yank` instead. + /// Only one of the `--github-release-tag` or `--versions-toml` options are required. + YankRelease(YankReleaseArgs), /// Hydrates the SDK README template file HydrateReadme(HydrateReadmeArgs), /// Generates a version manifest file for a generated SDK @@ -55,7 +55,7 @@ async fn main() -> Result<()> { match Args::parse() { Args::Publish(args) => subcommand_publish(&args).await?, Args::FixManifests(args) => subcommand_fix_manifests(&args).await?, - Args::YankCategory(args) => subcommand_yank_category(&args).await?, + Args::YankRelease(args) => subcommand_yank_release(&args).await?, Args::HydrateReadme(args) => subcommand_hydrate_readme(&args).await?, Args::GenerateVersionManifest(args) => subcommand_generate_version_manifest(&args).await?, } diff --git a/tools/publisher/src/subcommand/mod.rs b/tools/publisher/src/subcommand/mod.rs index 867e6481d51..e05711635e8 100644 --- a/tools/publisher/src/subcommand/mod.rs +++ b/tools/publisher/src/subcommand/mod.rs @@ -7,4 +7,4 @@ pub mod fix_manifests; pub mod generate_version_manifest; pub mod hydrate_readme; pub mod publish; -pub mod yank_category; +pub mod yank_release; diff --git a/tools/publisher/src/subcommand/yank_category.rs b/tools/publisher/src/subcommand/yank_category.rs deleted file mode 100644 index 55ffe1c1bef..00000000000 --- a/tools/publisher/src/subcommand/yank_category.rs +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use crate::cargo; -use crate::fs::Fs; -use crate::package::{discover_and_validate_package_batches, Package, PackageHandle, Publish}; -use crate::repo::resolve_publish_location; -use anyhow::{bail, Result}; -use clap::Parser; -use dialoguer::Confirm; -use semver::Version; -use smithy_rs_tool_common::package::PackageCategory; -use smithy_rs_tool_common::shell::ShellOperation; -use std::path::PathBuf; -use std::sync::Arc; -use tokio::sync::Semaphore; -use tracing::info; - -const MAX_CONCURRENCY: usize = 5; - -#[derive(Parser, Debug)] -pub struct YankCategoryArgs { - /// Package category to yank (smithy-runtime, aws-runtime, or aws-sdk) - #[clap(long)] - category: String, - /// Version number to yank - #[clap(long)] - version: Version, - /// Path to `aws-sdk-rust` repo. The repo should be checked out at the - /// version that is being yanked so that the correct list of crate names - /// is used. This will be validated. - #[clap(long)] - location: PathBuf, -} - -pub async fn subcommand_yank_category( - YankCategoryArgs { - category, - version, - location, - }: &YankCategoryArgs, -) -> Result<()> { - let category = match category.as_ref() { - "aws-runtime" => PackageCategory::AwsRuntime, - "aws-sdk" => PackageCategory::AwsSdk, - "smithy-runtime" => PackageCategory::SmithyRuntime, - _ => { - return Err(anyhow::Error::msg(format!( - "unrecognized package category: {}", - category - ))); - } - }; - - // Make sure cargo exists - cargo::confirm_installed_on_path()?; - - let location = resolve_publish_location(location); - - info!("Discovering crates to yank..."); - let (batches, _) = discover_and_validate_package_batches(Fs::Real, &location).await?; - let packages: Vec = batches - .into_iter() - .flatten() - .filter(|p| p.publish == Publish::Allowed && p.category == category) - .map(|p| { - if &p.handle.version != version { - bail!( - "Version to yank, `{}`, does not match locally checked out version of `{}` (`{}`) in {:?}", - version, p.handle.name, p.handle.version, p.crate_path - ); - } - Ok(Package::new( - // Replace the version with the version given on the CLI - PackageHandle::new(p.handle.name, version.clone()), - p.manifest_path, - p.local_dependencies, - Publish::Allowed, - )) - }) - .collect::>>()?; - info!("Finished crate discovery."); - - // Don't proceed unless the user confirms the plan - confirm_plan(&packages)?; - - // Use a semaphore to only allow a few concurrent yanks - let semaphore = Arc::new(Semaphore::new(MAX_CONCURRENCY)); - info!( - "Will yank {} crates in parallel where possible.", - MAX_CONCURRENCY - ); - - let mut tasks = Vec::new(); - for package in packages { - let permit = semaphore.clone().acquire_owned().await.unwrap(); - tasks.push(tokio::spawn(async move { - info!("Yanking `{}`...", package.handle); - let result = cargo::Yank::new(package.handle.clone(), &package.crate_path) - .spawn() - .await; - drop(permit); - info!("Successfully yanked `{}`", package.handle); - result - })); - } - for task in tasks { - task.await??; - } - - Ok(()) -} - -fn confirm_plan(packages: &[Package]) -> Result<()> { - info!("Yank plan:"); - for package in packages { - println!( - "Yank version `{}` of `{}`", - package.handle.version, package.handle.name - ); - } - - if Confirm::new() - .with_prompt("Continuing will yank crate versions from crates.io. Do you wish to continue?") - .interact()? - { - Ok(()) - } else { - Err(anyhow::Error::msg("aborted")) - } -} diff --git a/tools/publisher/src/subcommand/yank_release.rs b/tools/publisher/src/subcommand/yank_release.rs new file mode 100644 index 00000000000..3718be153c5 --- /dev/null +++ b/tools/publisher/src/subcommand/yank_release.rs @@ -0,0 +1,163 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +use crate::cargo; +use anyhow::{bail, Context, Result}; +use clap::Parser; +use dialoguer::Confirm; +use regex::Regex; +use smithy_rs_tool_common::shell::ShellOperation; +use smithy_rs_tool_common::versions_manifest::{Release, VersionsManifest}; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::sync::Arc; +use tokio::sync::Semaphore; +use tracing::info; + +const MAX_CONCURRENCY: usize = 5; + +#[derive(Parser, Debug)] +pub struct YankReleaseArgs { + /// The aws-sdk-rust release tag to yank. The CLI will download the `versions.toml` file + /// from GitHub at this tagged version to determine which crates to yank. + #[clap(long, required_unless_present = "versions-toml")] + github_release_tag: Option, + /// Path to a `versions.toml` file with a `[release]` section to yank. + /// The `--github-release-tag` option is preferred to this, but this is provided as a fail safe. + #[clap(long, required_unless_present = "github-release-tag")] + versions_toml: Option, +} + +pub async fn subcommand_yank_release( + YankReleaseArgs { + github_release_tag, + versions_toml, + }: &YankReleaseArgs, +) -> Result<()> { + // Make sure cargo exists + cargo::confirm_installed_on_path()?; + + // Retrieve information about the release to yank + let release = match (github_release_tag, versions_toml) { + (Some(release_tag), None) => acquire_release_from_tag(release_tag).await, + (None, Some(versions_toml)) => acquire_release_from_file(versions_toml), + _ => bail!("Only one of `--github-release-tag` or `--versions-toml` should be provided"), + } + .context("failed to retrieve information about the release to yank")?; + + // Don't proceed unless the user confirms the plan + confirm_plan(&release)?; + + // Use a semaphore to only allow a few concurrent yanks + let semaphore = Arc::new(Semaphore::new(MAX_CONCURRENCY)); + info!( + "Will yank {} crates in parallel where possible.", + MAX_CONCURRENCY + ); + + let mut tasks = Vec::new(); + for (crate_name, crate_version) in release.crates { + let permit = semaphore.clone().acquire_owned().await.unwrap(); + tasks.push(tokio::spawn(async move { + info!("Yanking `{}-{}`...", crate_name, crate_version); + let result = cargo::Yank::new(&crate_name, &crate_version).spawn().await; + drop(permit); + if result.is_ok() { + info!("Successfully yanked `{}-{}`", crate_name, crate_version); + } + result + })); + } + for task in tasks { + task.await??; + } + + Ok(()) +} + +fn validate_tag(tag: &str) -> Result<()> { + if !Regex::new(r#"(v\d+.\d+.\d+)|(\d{4}-\d{2}-\d{2})"#) + .unwrap() + .is_match(tag) + { + bail!("invalid release tag"); + } + Ok(()) +} + +async fn acquire_release_from_tag(tag: &str) -> Result { + validate_tag(tag)?; + + let manifest_url = format!( + "https://raw.githubusercontent.com/awslabs/aws-sdk-rust/{}/versions.toml", + tag + ); + info!("Downloading versions.toml from {}", manifest_url); + let manifest_contents = reqwest::get(manifest_url) + .await + .context("failed to retrieve release manifest")? + .text() + .await + .context("failed to retrieve release manifest content")?; + let parsed = VersionsManifest::from_str(&manifest_contents) + .context("failed to parse versions.toml file")?; + release_metadata(parsed) +} + +fn acquire_release_from_file(path: &Path) -> Result { + let parsed = VersionsManifest::from_file(path).context("failed to parse versions.toml file")?; + release_metadata(parsed) +} + +fn release_metadata(manifest: VersionsManifest) -> Result { + if let Some(release) = manifest.release { + Ok(release) + } else { + bail!("the versions.toml file didn't have a `[release]` section"); + } +} + +fn confirm_plan(release: &Release) -> Result<()> { + info!( + "This will yank aws-sdk-rust's `{}` release from crates.io.", + release.tag + ); + info!("Crates to yank:"); + for (crate_name, crate_version) in &release.crates { + info!(" {}-{}", crate_name, crate_version); + } + + if Confirm::new() + .with_prompt( + "Continuing will yank these crate versions from crates.io. Do you wish to continue?", + ) + .interact()? + { + Ok(()) + } else { + bail!("aborted") + } +} + +#[cfg(test)] +mod tests { + use super::validate_tag; + + #[test] + fn test_validate_tag() { + assert!(validate_tag("v0.12.0").is_ok()); + assert!(validate_tag("v0.12.1").is_ok()); + assert!(validate_tag("v1.12.1").is_ok()); + assert!(validate_tag("v10.12.11").is_ok()); + assert!(validate_tag("2022-05-24").is_ok()); + + assert!(validate_tag("bad").is_err()); + assert!(validate_tag("2022-5-4").is_err()); + assert!(validate_tag("0.12.0").is_err()); + assert!(validate_tag("v0.12").is_err()); + assert!(validate_tag("url/injection").is_err()); + assert!(validate_tag("..").is_err()); + } +} From 1f31eae373628d5d1ce0e683d8d483908f5204da Mon Sep 17 00:00:00 2001 From: 82marbag <69267416+82marbag@users.noreply.github.com> Date: Fri, 27 May 2022 05:25:33 -0400 Subject: [PATCH 05/49] Correctly generate http response codes (#1405) * Correctly generate http response codes http response codes will be: * `@httpResponseCode` if set * `@http`'s code, if `@httpResponseCode` is not set * the default one, if neither of the above are set @httpResponseCode honors @required and generates code that doesn't use Option when applied. Closes: #1229 --- .../ServerHttpBoundProtocolGenerator.kt | 46 ++++++++++-- codegen-test/model/misc.smithy | 71 +++++++++++++++++++ 2 files changed, 110 insertions(+), 7 deletions(-) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt index cdfd498c025..555b0e4c06e 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt @@ -20,6 +20,7 @@ import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.traits.EnumTrait import software.amazon.smithy.model.traits.ErrorTrait import software.amazon.smithy.model.traits.HttpErrorTrait +import software.amazon.smithy.model.traits.HttpTrait import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustModule @@ -50,6 +51,7 @@ import software.amazon.smithy.rust.codegen.smithy.generators.protocol.MakeOperat import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolGenerator import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolTraitImplGenerator import software.amazon.smithy.rust.codegen.smithy.generators.setterName +import software.amazon.smithy.rust.codegen.smithy.isOptional import software.amazon.smithy.rust.codegen.smithy.protocols.HttpBindingDescriptor import software.amazon.smithy.rust.codegen.smithy.protocols.HttpBoundProtocolPayloadGenerator import software.amazon.smithy.rust.codegen.smithy.protocols.HttpLocation @@ -468,7 +470,15 @@ private class ServerHttpBoundProtocolTraitImplGenerator( Attribute.AllowUnusedMut.render(this) rustTemplate("let mut builder = #{http}::Response::builder();", *codegenScope) serverRenderResponseHeaders(operationShape) - bindings.find { it.location == HttpLocation.RESPONSE_CODE }?.let { serverRenderResponseCodeBinding(it)(this) } + bindings.find { it.location == HttpLocation.RESPONSE_CODE } + ?.let { + serverRenderResponseCodeBinding(it)(this) + } + // no binding, use http's + ?: operationShape.getTrait()?.code?.let { + serverRenderHttpResponseCode(it)(this) + } + // Fallback to the default code of `http::response::Builder`, 200. operationShape.outputShape(model).findStreamingMember(model)?.let { val memberName = symbolProvider.toMemberName(it) @@ -551,25 +561,47 @@ private class ServerHttpBoundProtocolTraitImplGenerator( } } + private fun serverRenderHttpResponseCode( + defaultCode: Int + ): Writable { + return writable { + rustTemplate( + """ + let status = $defaultCode; + let http_status: u16 = status.try_into() + .map_err(|_| #{ResponseRejection}::InvalidHttpStatusCode)?; + builder = builder.status(http_status); + """.trimIndent(), + *codegenScope, + ) + } + } + private fun serverRenderResponseCodeBinding( binding: HttpBindingDescriptor ): Writable { check(binding.location == HttpLocation.RESPONSE_CODE) + return writable { val memberName = symbolProvider.toMemberName(binding.member) - // TODO(https://github.com/awslabs/smithy-rs/issues/1229): This code is problematic for two reasons: - // 1. We're not falling back to the `http` trait if no `output.$memberName` is `None`. - // 2. It only works when `output.$memberName` is of type `Option`. + rust("let status = output.$memberName") + if (symbolProvider.toSymbol(binding.member).isOptional()) { + rustTemplate( + """ + .ok_or(#{ResponseRejection}::MissingHttpStatusCode)? + """.trimIndent(), + *codegenScope, + ) + } rustTemplate( """ - let status = output.$memberName - .ok_or(#{ResponseRejection}::MissingHttpStatusCode)?; + ; let http_status: u16 = status.try_into() .map_err(|_| #{ResponseRejection}::InvalidHttpStatusCode)?; + builder = builder.status(http_status); """.trimIndent(), *codegenScope, ) - rust("builder = builder.status(http_status);") } } diff --git a/codegen-test/model/misc.smithy b/codegen-test/model/misc.smithy index 20cd3ea043e..a954d135089 100644 --- a/codegen-test/model/misc.smithy +++ b/codegen-test/model/misc.smithy @@ -3,6 +3,8 @@ $version: "1.0" namespace aws.protocoltests.misc use aws.protocols#restJson1 +use smithy.test#httpRequestTests +use smithy.test#httpResponseTests /// A service to test miscellaneous aspects of code generation where protocol /// selection is not relevant. If you want to test something protocol-specific, @@ -12,6 +14,9 @@ use aws.protocols#restJson1 service MiscService { operations: [ OperationWithInnerRequiredShape, + ResponseCodeRequired, + ResponseCodeHttpFallback, + ResponseCodeDefault, ], } @@ -108,3 +113,69 @@ union AUnion { string: String, time: Timestamp, } + +/// This operation tests that the response code defaults to 200 when no other code is set +@httpResponseTests([ + { + id: "ResponseCodeDefault", + protocol: "aws.protocols#restJson1", + code: 200, + } +]) +@http(method: "GET", uri: "/responseCodeDefault") +operation ResponseCodeDefault { + input: ResponseCodeDefaultInput, + output: ResponseCodeDefaultOutput, +} + +@input +structure ResponseCodeDefaultInput {} + +@output +structure ResponseCodeDefaultOutput {} + +/// This operation tests that the response code defaults to @http's code +@httpResponseTests([ + { + id: "ResponseCodeHttpFallback", + protocol: "aws.protocols#restJson1", + code: 418, + } +]) +@http(method: "GET", uri: "/responseCodeHttpFallback", code: 418) +operation ResponseCodeHttpFallback { + input: ResponseCodeHttpFallbackInput, + output: ResponseCodeHttpFallbackOutput, +} + +@input +structure ResponseCodeHttpFallbackInput {} + +@output +structure ResponseCodeHttpFallbackOutput {} + +/// This operation tests that @httpResponseCode is @required +/// and is used over @http's code +@httpResponseTests([ + { + id: "ResponseCodeRequired", + protocol: "aws.protocols#restJson1", + code: 201, + params: {"responseCode": 201} + } +]) +@http(method: "GET", uri: "/responseCodeRequired", code: 200) +operation ResponseCodeRequired { + input: ResponseCodeRequiredInput, + output: ResponseCodeRequiredOutput, +} + +@input +structure ResponseCodeRequiredInput {} + +@output +structure ResponseCodeRequiredOutput { + @required + @httpResponseCode + responseCode: Integer, +} From e57776651721775f3d4c6eeb272314793499f686 Mon Sep 17 00:00:00 2001 From: 82marbag <69267416+82marbag@users.noreply.github.com> Date: Fri, 27 May 2022 08:34:19 -0400 Subject: [PATCH 06/49] Allow @required with @httpPrefixHeaders (#1410) * Allow `@required` with `@httpPrefixHeaders` The server generates members with `@required` and `@httpPrefixHeaders` as if they were always optional. This commit allows the correct generation with `@required`. Closes: #1394 Signed-off-by: Daniele Ahmed --- .../smithy/generators/http/HttpBindingGenerator.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt index 20f2b7fcea1..e61dd831065 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt @@ -25,6 +25,7 @@ import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustType import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.asOptional import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.autoDeref import software.amazon.smithy.rust.codegen.rustlang.render @@ -40,6 +41,7 @@ import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.operationBuildError import software.amazon.smithy.rust.codegen.smithy.generators.redactIfNecessary import software.amazon.smithy.rust.codegen.smithy.makeOptional +import software.amazon.smithy.rust.codegen.smithy.mapRustType import software.amazon.smithy.rust.codegen.smithy.protocols.HttpBindingDescriptor import software.amazon.smithy.rust.codegen.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.smithy.protocols.Protocol @@ -131,8 +133,8 @@ class HttpBindingGenerator( fun generateDeserializePrefixHeaderFn(binding: HttpBindingDescriptor): RuntimeType { check(binding.location == HttpBinding.Location.PREFIX_HEADERS) - val outputT = symbolProvider.toSymbol(binding.member) - check(outputT.rustType().stripOuter() is RustType.HashMap) { outputT.rustType() } + val outputSymbol = symbolProvider.toSymbol(binding.member) + check(outputSymbol.rustType().stripOuter() is RustType.HashMap) { outputSymbol.rustType() } val target = model.expectShape(binding.member.target) check(target is MapShape) val fnName = "deser_prefix_header_${fnName(operationShape, binding)}" @@ -146,11 +148,12 @@ class HttpBindingGenerator( deserializeFromHeader(model.expectShape(target.value.target), binding.member) } } + val returnTypeSymbol = outputSymbol.mapRustType { it.asOptional() } return RuntimeType.forInlineFun(fnName, httpSerdeModule) { writer -> writer.rustBlock( "pub fn $fnName(header_map: &#T::HeaderMap) -> std::result::Result<#T, #T::ParseError>", RuntimeType.http, - outputT, + returnTypeSymbol, headerUtil ) { rust( From 8a79ba50d1b956e63c1de16a2908eacbc12ffc72 Mon Sep 17 00:00:00 2001 From: 82marbag <69267416+82marbag@users.noreply.github.com> Date: Fri, 27 May 2022 10:05:03 -0400 Subject: [PATCH 07/49] Remove CodegenMode, use CodegenTarget (#1414) * Remove CodegenMode, use CodegenTarget Closes: #1413 Signed-off-by: Daniele Ahmed --- .../codegen/server/smithy/ServerCodegenVisitor.kt | 3 +-- .../smithy/generators/ServerEnumGenerator.kt | 4 ++-- .../protocol/ServerProtocolTestGenerator.kt | 4 ++-- .../smithy/rust/codegen/smithy/CodegenContext.kt | 15 ++++----------- .../smithy/rust/codegen/smithy/CodegenVisitor.kt | 3 ++- .../codegen/smithy/generators/CodegenTarget.kt | 2 +- .../codegen/smithy/generators/EnumGenerator.kt | 7 +++---- .../codegen/smithy/generators/Instantiator.kt | 5 ++--- .../codegen/smithy/generators/UnionGenerator.kt | 7 +++---- .../generators/http/HttpBindingGenerator.kt | 12 ++++++------ .../generators/protocol/ProtocolTestGenerator.kt | 4 ++-- .../HttpBoundProtocolPayloadGenerator.kt | 4 ++-- .../parse/EventStreamUnmarshallerGenerator.kt | 6 +++--- .../smithy/protocols/parse/JsonParserGenerator.kt | 8 ++++---- .../parse/XmlBindingTraitParserGenerator.kt | 4 ++-- .../serialize/EventStreamMarshallerGenerator.kt | 6 +++--- .../serialize/JsonSerializerGenerator.kt | 4 ++-- .../serialize/QuerySerializerGenerator.kt | 4 ++-- .../XmlBindingTraitSerializerGenerator.kt | 4 ++-- .../smithy/rust/codegen/testutil/TestHelpers.kt | 3 +-- .../codegen/smithy/generators/InstantiatorTest.kt | 15 +++++++-------- .../smithy/protocols/EventStreamTestTools.kt | 10 +++++----- .../parse/EventStreamUnmarshallerGeneratorTest.kt | 8 ++++---- .../serialize/AwsQuerySerializerGeneratorTest.kt | 10 +++++----- .../EventStreamMarshallerGeneratorTest.kt | 4 ++-- 25 files changed, 72 insertions(+), 84 deletions(-) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt index 60a5ef70da0..d9816f9ec19 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt @@ -20,7 +20,6 @@ import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerEnumGe import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerServiceGenerator import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerProtocolLoader import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.DefaultPublicModules import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.RustSettings @@ -86,7 +85,7 @@ class ServerCodegenVisitor(context: PluginContext, private val codegenDecorator: symbolProvider = codegenDecorator.symbolProvider(generator.symbolProvider(model, baseProvider)) - codegenContext = CodegenContext(model, symbolProvider, service, protocol, settings, mode = CodegenMode.Server) + codegenContext = CodegenContext(model, symbolProvider, service, protocol, settings, target = CodegenTarget.SERVER) rustCrate = RustCrate(context.fileManifest, symbolProvider, DefaultPublicModules, settings.codegenConfig) protocolGenerator = protocolGeneratorFactory.buildProtocolGenerator(codegenContext) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt index 314af82e8fd..830de8acfd1 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt @@ -12,10 +12,10 @@ import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.EnumGenerator import software.amazon.smithy.rust.codegen.util.dq @@ -27,7 +27,7 @@ class ServerEnumGenerator( enumTrait: EnumTrait, private val runtimeConfig: RuntimeConfig, ) : EnumGenerator(model, symbolProvider, writer, shape, enumTrait) { - override var mode: CodegenMode = CodegenMode.Server + override var target: CodegenTarget = CodegenTarget.SERVER private val errorStruct = "${enumName}UnknownVariantError" override fun renderFromForStr() { diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt index 81041fc0d52..f4a4c4b8f62 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt @@ -34,8 +34,8 @@ import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerHttpBoundProtocolGenerator import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.Instantiator import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.testutil.TokioTest @@ -72,7 +72,7 @@ class ServerProtocolTestGenerator( private val operationErrorName = "crate::error::${operationSymbol.name}Error" private val instantiator = with(codegenContext) { - Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Server) + Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.SERVER) } private val codegenScope = arrayOf( diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenContext.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenContext.kt index 7ac2f45e27a..dcccd737d5d 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenContext.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenContext.kt @@ -8,14 +8,7 @@ package software.amazon.smithy.rust.codegen.smithy import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.model.shapes.ShapeId - -/** - * Code generation mode: In some situations, codegen has different behavior for client vs. server (eg. required fields) - */ -sealed class CodegenMode { - object Server : CodegenMode() - object Client : CodegenMode() -} +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget /** * Configuration needed to generate the client for a given Service<->Protocol pair @@ -52,7 +45,7 @@ data class CodegenContext( * * Some settings are dependent on whether server vs. client codegen is being invoked. */ - val mode: CodegenMode, + val target: CodegenTarget, ) { constructor( model: Model, @@ -60,8 +53,8 @@ data class CodegenContext( serviceShape: ServiceShape, protocol: ShapeId, settings: RustSettings, - mode: CodegenMode, - ) : this(model, symbolProvider, settings.runtimeConfig, serviceShape, protocol, settings, mode) + target: CodegenTarget, + ) : this(model, symbolProvider, settings.runtimeConfig, serviceShape, protocol, settings, target) /** * The name of the cargo crate to generate e.g. `aws-sdk-s3` diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt index 14c2fc539c8..04bdfe849c6 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt @@ -18,6 +18,7 @@ import software.amazon.smithy.model.traits.EnumTrait import software.amazon.smithy.model.transform.ModelTransformer import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.BuilderGenerator +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.EnumGenerator import software.amazon.smithy.rust.codegen.smithy.generators.ServiceGenerator import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator @@ -68,7 +69,7 @@ class CodegenVisitor(context: PluginContext, private val codegenDecorator: RustC val baseProvider = RustCodegenPlugin.baseSymbolProvider(model, service, symbolVisitorConfig) symbolProvider = codegenDecorator.symbolProvider(generator.symbolProvider(model, baseProvider)) - codegenContext = CodegenContext(model, symbolProvider, service, protocol, settings, mode = CodegenMode.Client) + codegenContext = CodegenContext(model, symbolProvider, service, protocol, settings, target = CodegenTarget.CLIENT) rustCrate = RustCrate( context.fileManifest, symbolProvider, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CodegenTarget.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CodegenTarget.kt index 35079df74e2..fb003cda9de 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CodegenTarget.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CodegenTarget.kt @@ -6,7 +6,7 @@ package software.amazon.smithy.rust.codegen.smithy.generators /** - * The artifact type for whom we are generating the structure. + * Code generation mode: In some situations, codegen has different behavior for client vs. server (eg. required fields) */ enum class CodegenTarget { CLIENT, SERVER diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt index a71a8d4289f..8f2d1abbb6b 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt @@ -17,7 +17,6 @@ import software.amazon.smithy.rust.codegen.rustlang.escape import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.MaybeRenamed import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider @@ -83,7 +82,7 @@ open class EnumGenerator( protected val meta = symbol.expectRustMetadata() protected val sortedMembers: List = enumTrait.values.sortedBy { it.value }.map { EnumMemberModel(it, symbolProvider) } - protected open var mode: CodegenMode = CodegenMode.Client + protected open var target: CodegenTarget = CodegenTarget.CLIENT companion object { /** Name of the generated unknown enum member name for enums with named members. */ @@ -155,7 +154,7 @@ open class EnumGenerator( meta.render(writer) writer.rustBlock("enum $enumName") { sortedMembers.forEach { member -> member.render(writer) } - if (mode == CodegenMode.Client) { + if (target == CodegenTarget.CLIENT) { docs("$UnknownVariant contains new variants that have been added since this code was generated.") write("$UnknownVariant(String)") } @@ -170,7 +169,7 @@ open class EnumGenerator( sortedMembers.forEach { member -> write("""$enumName::${member.derivedName()} => ${member.value.dq()},""") } - if (mode == CodegenMode.Client) { + if (target == CodegenTarget.CLIENT) { write("$enumName::$UnknownVariant(s) => s.as_ref()") } } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/Instantiator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/Instantiator.kt index 04cd76b36c7..1c638d64f38 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/Instantiator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/Instantiator.kt @@ -39,7 +39,6 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.stripOuter import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider @@ -60,7 +59,7 @@ class Instantiator( private val symbolProvider: RustSymbolProvider, private val model: Model, private val runtimeConfig: RuntimeConfig, - private val mode: CodegenMode, + private val target: CodegenTarget, ) { data class Ctx( // The Rust HTTP library lower cases headers but Smithy protocol tests @@ -254,7 +253,7 @@ class Instantiator( writer.rust("$data.to_string()") } else { val enumSymbol = symbolProvider.toSymbol(shape) - if (mode == CodegenMode.Server) { + if (target == CodegenTarget.SERVER) { writer.rust("""#T::try_from($data).expect("This is used in tests ONLY")""", enumSymbol) } else { writer.rust("#T::from($data)", enumSymbol) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/UnionGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/UnionGenerator.kt index bba6c0a20e5..73a425a2edd 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/UnionGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/UnionGenerator.kt @@ -15,14 +15,13 @@ import software.amazon.smithy.rust.codegen.rustlang.docs import software.amazon.smithy.rust.codegen.rustlang.documentShape import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.expectRustMetadata import software.amazon.smithy.rust.codegen.smithy.renamedFrom import software.amazon.smithy.rust.codegen.util.toSnakeCase -fun CodegenMode.renderUnknownVariant() = when (this) { - is CodegenMode.Server -> false - is CodegenMode.Client -> true +fun CodegenTarget.renderUnknownVariant() = when (this) { + CodegenTarget.SERVER -> false + CodegenTarget.CLIENT -> true } /** diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt index e61dd831065..83f3ccf9ef8 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt @@ -36,8 +36,8 @@ import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.stripOuter import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.operationBuildError import software.amazon.smithy.rust.codegen.smithy.generators.redactIfNecessary import software.amazon.smithy.rust.codegen.smithy.makeOptional @@ -93,7 +93,7 @@ class HttpBindingGenerator( ) { private val runtimeConfig = codegenContext.runtimeConfig private val symbolProvider = codegenContext.symbolProvider - private val mode = codegenContext.mode + private val target = codegenContext.target private val model = codegenContext.model private val service = codegenContext.serviceShape private val index = HttpBindingIndex.of(model) @@ -218,15 +218,15 @@ class HttpBindingGenerator( } } - private fun RustWriter.bindEventStreamOutput(operationShape: OperationShape, target: UnionShape) { + private fun RustWriter.bindEventStreamOutput(operationShape: OperationShape, targetShape: UnionShape) { val unmarshallerConstructorFn = EventStreamUnmarshallerGenerator( protocol, model, runtimeConfig, symbolProvider, operationShape, - target, - mode + targetShape, + target ).render() rustTemplate( """ @@ -280,7 +280,7 @@ class HttpBindingGenerator( } } if (targetShape.hasTrait()) { - if (mode == CodegenMode.Server) { + if (target == CodegenTarget.SERVER) { rust( "Ok(#T::try_from(body_str)?)", symbolProvider.toSymbol(targetShape) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt index 1e0f75971e8..b8191b0d3a0 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt @@ -30,8 +30,8 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.Instantiator import software.amazon.smithy.rust.codegen.smithy.generators.error.errorSymbol import software.amazon.smithy.rust.codegen.testutil.TokioTest @@ -76,7 +76,7 @@ class ProtocolTestGenerator( private val operationIndex = OperationIndex.of(codegenContext.model) private val instantiator = with(codegenContext) { - Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Client) + Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) } private val codegenScope = arrayOf( diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt index b9c62b87ccc..6e6dee4864c 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt @@ -51,7 +51,7 @@ class HttpBoundProtocolPayloadGenerator( private val symbolProvider = codegenContext.symbolProvider private val model = codegenContext.model private val runtimeConfig = codegenContext.runtimeConfig - private val mode = codegenContext.mode + private val target = codegenContext.target private val httpBindingResolver = protocol.httpBindingResolver private val operationSerModule = RustModule.private("operation_ser") @@ -163,7 +163,7 @@ class HttpBoundProtocolPayloadGenerator( val marshallerConstructorFn = EventStreamMarshallerGenerator( model, - mode, + target, runtimeConfig, symbolProvider, unionShape, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt index 6f1b8c01a23..1bbfc6482e3 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt @@ -31,10 +31,10 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator import software.amazon.smithy.rust.codegen.smithy.generators.error.errorSymbol import software.amazon.smithy.rust.codegen.smithy.generators.renderUnknownVariant @@ -52,7 +52,7 @@ class EventStreamUnmarshallerGenerator( private val symbolProvider: RustSymbolProvider, private val operationShape: OperationShape, private val unionShape: UnionShape, - private val mode: CodegenMode, + private val target: CodegenTarget, ) { private val unionSymbol = symbolProvider.toSymbol(unionShape) private val operationErrorSymbol = operationShape.errorSymbol(symbolProvider) @@ -144,7 +144,7 @@ class EventStreamUnmarshallerGenerator( } } rustBlock("_unknown_variant => ") { - when (mode.renderUnknownVariant()) { + when (target.renderUnknownVariant()) { true -> rustTemplate( "Ok(#{UnmarshalledMessage}::Event(#{Output}::${UnionGenerator.UnknownVariantName}))", "Output" to unionSymbol, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/JsonParserGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/JsonParserGenerator.kt index ac884a09a1a..939c9f37ecf 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/JsonParserGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/JsonParserGenerator.kt @@ -34,9 +34,9 @@ import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.withBlockTemplate import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.canUseDefault +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator import software.amazon.smithy.rust.codegen.smithy.generators.builderSymbol @@ -62,7 +62,7 @@ class JsonParserGenerator( private val model = codegenContext.model private val symbolProvider = codegenContext.symbolProvider private val runtimeConfig = codegenContext.runtimeConfig - private val mode = codegenContext.mode + private val target = codegenContext.target private val smithyJson = CargoDependency.smithyJson(runtimeConfig).asType() private val jsonDeserModule = RustModule.private("json_deser") private val codegenScope = arrayOf( @@ -251,7 +251,7 @@ class JsonParserGenerator( } } - private fun convertsToEnumInServer(shape: StringShape) = mode == CodegenMode.Server && shape.hasTrait() + private fun convertsToEnumInServer(shape: StringShape) = target == CodegenTarget.SERVER && shape.hasTrait() private fun RustWriter.deserializeString(target: StringShape) { // additional .transpose()? because Rust does not allow ? up from closures @@ -436,7 +436,7 @@ class JsonParserGenerator( } } } - when (mode.renderUnknownVariant()) { + when (target.renderUnknownVariant()) { // in client mode, resolve an unknown union variant to the unknown variant true -> rustTemplate( """ diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt index 34fc1918a35..df51185e379 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt @@ -112,7 +112,7 @@ class XmlBindingTraitParserGenerator( private val model = codegenContext.model private val index = HttpBindingIndex.of(model) private val xmlIndex = XmlNameIndex.of(model) - private val mode = codegenContext.mode + private val target = codegenContext.target private val xmlDeserModule = RustModule.private("xml_deser") /** @@ -430,7 +430,7 @@ class XmlBindingTraitParserGenerator( rust("base = Some(#T::$variantName(tmp));", symbol) } } - when (mode.renderUnknownVariant()) { + when (target.renderUnknownVariant()) { true -> rust("_unknown => base = Some(#T::${UnionGenerator.UnknownVariantName}),", symbol) false -> rustTemplate("""variant => return Err(#{XmlError}::custom(format!("unexpected union variant: {:?}", variant)))""", *codegenScope) } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGenerator.kt index 6928f256653..a12a2be9a8d 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGenerator.kt @@ -30,10 +30,10 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator import software.amazon.smithy.rust.codegen.smithy.generators.renderUnknownVariant import software.amazon.smithy.rust.codegen.smithy.generators.unknownVariantError @@ -45,7 +45,7 @@ import software.amazon.smithy.rust.codegen.util.toPascalCase class EventStreamMarshallerGenerator( private val model: Model, - private val mode: CodegenMode, + private val target: CodegenTarget, runtimeConfig: RuntimeConfig, private val symbolProvider: RustSymbolProvider, private val unionShape: UnionShape, @@ -107,7 +107,7 @@ class EventStreamMarshallerGenerator( renderMarshallEvent(member, target) } } - if (mode.renderUnknownVariant()) { + if (target.renderUnknownVariant()) { rustTemplate( """ Self::Input::${UnionGenerator.UnknownVariantName} => return Err( diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt index 0b590d7e0ad..c2a979ce135 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt @@ -147,7 +147,7 @@ class JsonSerializerGenerator( private val model = codegenContext.model private val symbolProvider = codegenContext.symbolProvider - private val mode = codegenContext.mode + private val target = codegenContext.target private val runtimeConfig = codegenContext.runtimeConfig private val smithyTypes = CargoDependency.SmithyTypes(runtimeConfig).asType() private val smithyJson = CargoDependency.smithyJson(runtimeConfig).asType() @@ -442,7 +442,7 @@ class JsonSerializerGenerator( serializeMember(MemberContext.unionMember(context, "inner", member, jsonName)) } } - if (mode.renderUnknownVariant()) { + if (target.renderUnknownVariant()) { rustTemplate( "#{Union}::${UnionGenerator.UnknownVariantName} => return Err(#{Error}::unknown_variant(${unionSymbol.name.dq()}))", "Union" to unionSymbol, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/QuerySerializerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/QuerySerializerGenerator.kt index 71c3ec45a50..1b75ad3cca7 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/QuerySerializerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/QuerySerializerGenerator.kt @@ -90,7 +90,7 @@ abstract class QuerySerializerGenerator(codegenContext: CodegenContext) : Struct protected val model = codegenContext.model protected val symbolProvider = codegenContext.symbolProvider protected val runtimeConfig = codegenContext.runtimeConfig - private val mode = codegenContext.mode + private val target = codegenContext.target private val serviceShape = codegenContext.serviceShape private val serializerError = runtimeConfig.serializationError() private val smithyTypes = CargoDependency.SmithyTypes(runtimeConfig).asType() @@ -323,7 +323,7 @@ abstract class QuerySerializerGenerator(codegenContext: CodegenContext) : Struct ) } } - if (mode.renderUnknownVariant()) { + if (target.renderUnknownVariant()) { rustTemplate( "#{Union}::${UnionGenerator.UnknownVariantName} => return Err(#{Error}::unknown_variant(${unionSymbol.name.dq()}))", "Union" to unionSymbol, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt index fed0e30aa61..528ac0a8b27 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt @@ -64,7 +64,7 @@ class XmlBindingTraitSerializerGenerator( private val runtimeConfig = codegenContext.runtimeConfig private val model = codegenContext.model private val smithyXml = CargoDependency.smithyXml(runtimeConfig).asType() - private val mode = codegenContext.mode + private val target = codegenContext.target private val codegenScope = arrayOf( "XmlWriter" to smithyXml.member("encode::XmlWriter"), @@ -398,7 +398,7 @@ class XmlBindingTraitSerializerGenerator( } } - if (mode.renderUnknownVariant()) { + if (target.renderUnknownVariant()) { rustTemplate( "#{Union}::${UnionGenerator.UnknownVariantName} => return Err(#{Error}::unknown_variant(${unionSymbol.name.dq()}))", "Union" to unionSymbol, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt index 31ff14941ba..24804bc40ff 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt @@ -17,7 +17,6 @@ import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.smithy.CodegenConfig import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeCrateLocation import software.amazon.smithy.rust.codegen.smithy.RustCodegenPlugin @@ -75,7 +74,7 @@ fun testCodegenContext( model: Model, serviceShape: ServiceShape? = null, settings: RustSettings = testRustSettings(), - mode: CodegenMode = CodegenMode.Client + mode: CodegenTarget = CodegenTarget.CLIENT ): CodegenContext = CodegenContext( model, testSymbolProvider(model), diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/InstantiatorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/InstantiatorTest.kt index eb983628583..f7a95aab4fc 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/InstantiatorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/InstantiatorTest.kt @@ -17,7 +17,6 @@ import software.amazon.smithy.rust.codegen.rustlang.raw import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.transformers.RecursiveShapeBoxer import software.amazon.smithy.rust.codegen.testutil.TestRuntimeConfig import software.amazon.smithy.rust.codegen.testutil.asSmithyModel @@ -82,7 +81,7 @@ class InstantiatorTest { @Test fun `generate unions`() { val union = model.lookup("com.test#MyUnion") - val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Client) + val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) val data = Node.parse( """{ "stringVariant": "ok!" @@ -101,7 +100,7 @@ class InstantiatorTest { @Test fun `generate struct builders`() { val structure = model.lookup("com.test#MyStruct") - val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Client) + val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) val data = Node.parse("""{ "bar": 10, "foo": "hello" }""") val writer = RustWriter.forModule("model") structure.renderWithModelBuilder(model, symbolProvider, writer) @@ -118,7 +117,7 @@ class InstantiatorTest { @Test fun `generate builders for boxed structs`() { val structure = model.lookup("com.test#WithBox") - val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Client) + val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) val data = Node.parse( """ { "member": { @@ -158,7 +157,7 @@ class InstantiatorTest { """ ) val writer = RustWriter.forModule("lib") - val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Client) + val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) writer.test { writer.withBlock("let result = ", ";") { sut.render(writer, model.lookup("com.test#MyList"), data) @@ -179,7 +178,7 @@ class InstantiatorTest { """ ) val writer = RustWriter.forModule("lib") - val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Client) + val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) writer.test { writer.withBlock("let result = ", ";") { sut.render(writer, model.lookup("com.test#MySparseList"), data) @@ -200,7 +199,7 @@ class InstantiatorTest { """ ) val writer = RustWriter.forModule("model") - val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Client) + val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) val inner: StructureShape = model.lookup("com.test#Inner") inner.renderWithModelBuilder(model, symbolProvider, writer) writer.test { @@ -224,7 +223,7 @@ class InstantiatorTest { // "Parameter values that contain binary data MUST be defined using values // that can be represented in plain text (for example, use "foo" and not "Zm9vCg==")." val writer = RustWriter.forModule("lib") - val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenMode.Client) + val sut = Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) writer.test { withBlock("let blob = ", ";") { sut.render( diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/EventStreamTestTools.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/EventStreamTestTools.kt index 9cc8bbdc3a1..2088a78deb2 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/EventStreamTestTools.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/EventStreamTestTools.kt @@ -19,9 +19,9 @@ import software.amazon.smithy.model.traits.ErrorTrait import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.CodegenMode import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.generators.BuilderGenerator +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator import software.amazon.smithy.rust.codegen.smithy.generators.error.CombinedErrorGenerator @@ -125,7 +125,7 @@ object EventStreamTestModels { val validTestUnion: String, val validSomeError: String, val validUnmodeledError: String, - val mode: CodegenMode = CodegenMode.Client, + val target: CodegenTarget = CodegenTarget.CLIENT, val protocolBuilder: (CodegenContext) -> Protocol, ) { override fun toString(): String = protocolShapeId @@ -303,7 +303,7 @@ object EventStreamTestModels { """.trimIndent(), ) { Ec2QueryProtocol(it) }, - ).flatMap { listOf(it, it.copy(mode = CodegenMode.Server)) } + ).flatMap { listOf(it, it.copy(target = CodegenTarget.SERVER)) } class UnmarshallTestCasesProvider : ArgumentsProvider { override fun provideArguments(context: ExtensionContext?): Stream = @@ -350,7 +350,7 @@ object EventStreamTestTools { } project.withModule(RustModule.public("model")) { val inputOutput = model.lookup("test#TestStreamInputOutput") - recursivelyGenerateModels(model, symbolProvider, inputOutput, it, testCase.mode) + recursivelyGenerateModels(model, symbolProvider, inputOutput, it, testCase.target) } project.withModule(RustModule.public("output")) { operationShape.outputShape(model).renderWithModelBuilder(model, symbolProvider, it) @@ -363,7 +363,7 @@ object EventStreamTestTools { symbolProvider: RustSymbolProvider, shape: Shape, writer: RustWriter, - mode: CodegenMode + mode: CodegenTarget ) { for (member in shape.members()) { val target = model.expectShape(member.target) diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGeneratorTest.kt index 487b92a9e51..4648241e6b9 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGeneratorTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.params.provider.ArgumentsSource import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.smithy.CodegenContext -import software.amazon.smithy.rust.codegen.smithy.CodegenMode +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestModels import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestTools import software.amazon.smithy.rust.codegen.testutil.TestRuntimeConfig @@ -31,7 +31,7 @@ class EventStreamUnmarshallerGeneratorTest { test.serviceShape, ShapeId.from(testCase.protocolShapeId), testRustSettings(), - mode = testCase.mode + target = testCase.target ) val protocol = testCase.protocolBuilder(codegenContext) val generator = EventStreamUnmarshallerGenerator( @@ -41,7 +41,7 @@ class EventStreamUnmarshallerGeneratorTest { test.symbolProvider, test.operationShape, test.streamShape, - mode = testCase.mode + target = testCase.target ) test.project.lib { writer -> @@ -97,7 +97,7 @@ class EventStreamUnmarshallerGeneratorTest { """, ) - if (testCase.mode == CodegenMode.Client) { + if (testCase.target == CodegenTarget.CLIENT) { writer.unitTest( "unknown_message", """ diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt index 80cec8dbd10..f7e2eb86097 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt @@ -11,7 +11,7 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.StringShape import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.rust.codegen.rustlang.RustModule -import software.amazon.smithy.rust.codegen.smithy.CodegenMode +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.EnumGenerator import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator import software.amazon.smithy.rust.codegen.smithy.transformers.OperationNormalizer @@ -91,11 +91,11 @@ class AwsQuerySerializerGeneratorTest { fun `generates valid serializers`(generateUnknownVariant: Boolean) { val model = RecursiveShapeBoxer.transform(OperationNormalizer.transform(baseModel)) val symbolProvider = testSymbolProvider(model) - val mode = when (generateUnknownVariant) { - true -> CodegenMode.Client - false -> CodegenMode.Server + val target = when (generateUnknownVariant) { + true -> CodegenTarget.CLIENT + false -> CodegenTarget.SERVER } - val parserGenerator = AwsQuerySerializerGenerator(testCodegenContext(model).copy(mode = mode)) + val parserGenerator = AwsQuerySerializerGenerator(testCodegenContext(model).copy(target = target)) val operationGenerator = parserGenerator.operationInputSerializer(model.lookup("test#Op")) val project = TestWorkspace.testProject(testSymbolProvider(model)) diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt index 0f843cde4b6..8c5f33f9fc1 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt @@ -33,12 +33,12 @@ class EventStreamMarshallerGeneratorTest { test.serviceShape, ShapeId.from(testCase.protocolShapeId), testRustSettings(), - mode = testCase.mode + target = testCase.target ) val protocol = testCase.protocolBuilder(codegenContext) val generator = EventStreamMarshallerGenerator( test.model, - testCase.mode, + testCase.target, TestRuntimeConfig, test.symbolProvider, test.streamShape, From fe92efbfd65b2c8b279cac025a2384860cc22866 Mon Sep 17 00:00:00 2001 From: david-perez Date: Fri, 27 May 2022 17:18:17 +0200 Subject: [PATCH 08/49] Increase max JVM heap size in `gradle.properties` (#1373) It's currently defaulting to 512 MiB. I often see this message in my build logs: > Daemon will be stopped at the end of the build after running out of JVM memory I've done some (unscientific) profiling with this setting enabled, and max heap size can peak at ~600 MiB, so I see no reason to increase it more than 1024 MiB. --- gradle.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gradle.properties b/gradle.properties index a71346f8b43..28617090026 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,8 @@ # Rust MSRV (entered into the generated README) rust.msrv=1.58.1 +org.gradle.jvmargs=-Xmx1024M + # Version number to use for the generated SDK # Note: these must always be full 3-segment semver versions aws.sdk.version=0.12.0 From c503debb4b4171e7199b93f3f4a2f15a64d94299 Mon Sep 17 00:00:00 2001 From: Harry Barber <106155934+hlbarber@users.noreply.github.com> Date: Mon, 30 May 2022 10:56:50 +0100 Subject: [PATCH 09/49] Remove usage of percent_decode_str for decoding query string key-value pairs (#1417) * Use `form_urlencoding::parse` over `serde_urlencoded::from_str`, this removes our dependency on `serde_urlencoded`. * Remove `percent_encoding::percent_decode_str` where possible. * Contract `generateParsePercentEncodedStrFn` and its children into one function and make it optionally apply percent encoding. * Add `impl From for RequestRejection` to remove codegen branch. --- .../server/smithy/ServerCargoDependency.kt | 2 +- .../ServerHttpBoundProtocolGenerator.kt | 183 +++++++----------- .../aws-smithy-http-server/src/rejection.rs | 19 ++ 3 files changed, 93 insertions(+), 111 deletions(-) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCargoDependency.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCargoDependency.kt index 51c469eef62..e9de328bc9b 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCargoDependency.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCargoDependency.kt @@ -16,10 +16,10 @@ import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig */ object ServerCargoDependency { val AsyncTrait: CargoDependency = CargoDependency("async-trait", CratesIo("0.1")) + val FormUrlEncoded: CargoDependency = CargoDependency("form_urlencoded", CratesIo("1")) val FuturesUtil: CargoDependency = CargoDependency("futures-util", CratesIo("0.3")) val Nom: CargoDependency = CargoDependency("nom", CratesIo("7")) val PinProjectLite: CargoDependency = CargoDependency("pin-project-lite", CratesIo("0.2")) - val SerdeUrlEncoded: CargoDependency = CargoDependency("serde_urlencoded", CratesIo("0.7")) val Tower: CargoDependency = CargoDependency("tower", CratesIo("0.4")) fun SmithyHttpServer(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("http-server") diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt index 555b0e4c06e..a8e5e4917fc 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt @@ -12,12 +12,13 @@ import software.amazon.smithy.aws.traits.protocols.RestXmlTrait import software.amazon.smithy.codegen.core.Symbol import software.amazon.smithy.model.knowledge.HttpBindingIndex import software.amazon.smithy.model.node.ExpectationNotMetException +import software.amazon.smithy.model.shapes.BooleanShape import software.amazon.smithy.model.shapes.CollectionShape +import software.amazon.smithy.model.shapes.NumberShape import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.Shape import software.amazon.smithy.model.shapes.StringShape import software.amazon.smithy.model.shapes.StructureShape -import software.amazon.smithy.model.traits.EnumTrait import software.amazon.smithy.model.traits.ErrorTrait import software.amazon.smithy.model.traits.HttpErrorTrait import software.amazon.smithy.model.traits.HttpTrait @@ -57,7 +58,6 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.HttpBoundProtocolPay import software.amazon.smithy.rust.codegen.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.smithy.protocols.Protocol import software.amazon.smithy.rust.codegen.smithy.protocols.parse.StructuredDataParserGenerator -import software.amazon.smithy.rust.codegen.smithy.rustType import software.amazon.smithy.rust.codegen.smithy.toOptional import software.amazon.smithy.rust.codegen.smithy.wrapOptional import software.amazon.smithy.rust.codegen.util.dq @@ -65,7 +65,6 @@ import software.amazon.smithy.rust.codegen.util.expectTrait import software.amazon.smithy.rust.codegen.util.findStreamingMember import software.amazon.smithy.rust.codegen.util.getTrait import software.amazon.smithy.rust.codegen.util.hasStreamingMember -import software.amazon.smithy.rust.codegen.util.hasTrait import software.amazon.smithy.rust.codegen.util.inputShape import software.amazon.smithy.rust.codegen.util.isStreaming import software.amazon.smithy.rust.codegen.util.outputShape @@ -120,6 +119,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( "AsyncTrait" to ServerCargoDependency.AsyncTrait.asType(), "Cow" to ServerRuntimeType.Cow, "DateTime" to RuntimeType.DateTime(runtimeConfig), + "FormUrlEncoded" to ServerCargoDependency.FormUrlEncoded.asType(), "HttpBody" to CargoDependency.HttpBody.asType(), "header_util" to CargoDependency.SmithyHttp(runtimeConfig).asType().member("header"), "Hyper" to CargoDependency.Hyper.asType(), @@ -127,7 +127,6 @@ private class ServerHttpBoundProtocolTraitImplGenerator( "Nom" to ServerCargoDependency.Nom.asType(), "PercentEncoding" to CargoDependency.PercentEncoding.asType(), "Regex" to CargoDependency.Regex.asType(), - "SerdeUrlEncoded" to ServerCargoDependency.SerdeUrlEncoded.asType(), "SmithyHttp" to CargoDependency.SmithyHttp(runtimeConfig).asType(), "SmithyHttpServer" to ServerCargoDependency.SmithyHttpServer(runtimeConfig).asType(), "RuntimeError" to ServerRuntimeType.RuntimeError(runtimeConfig), @@ -775,7 +774,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( .forEachIndexed { index, segment -> val binding = pathBindings.find { it.memberName == segment.content } if (binding != null && segment.isLabel) { - val deserializer = generateParsePercentEncodedStrFn(binding) + val deserializer = generateParseFn(binding, true) rustTemplate( """ input = input.${binding.member.setterName()}( @@ -847,7 +846,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( rustTemplate( """ let query_string = request.uri().query().unwrap_or(""); - let pairs = #{SerdeUrlEncoded}::from_str::, #{Cow}<'_, str>)>>(query_string)?; + let pairs = #{FormUrlEncoded}::parse(query_string.as_bytes()); """.trimIndent(), *codegenScope ) @@ -870,7 +869,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( rustBlock("for (k, v) in pairs") { queryBindingsTargettingSimple.forEach { - val deserializer = generateParsePercentEncodedStrFn(it) + val deserializer = generateParseFn(it, false) val memberName = symbolProvider.toMemberName(it.member) rustTemplate( """ @@ -891,25 +890,15 @@ private class ServerHttpBoundProtocolTraitImplGenerator( when { memberShape.isStringShape -> { - // `<_>::from()/try_from()` is necessary to convert the `&str` into: - // * the Rust enum in case the `string` shape has the `enum` trait; or - // * `String` in case it doesn't. - if (memberShape.hasTrait()) { - rustTemplate( - """ - let v = <#{memberShape}>::try_from(#{PercentEncoding}::percent_decode_str(&v).decode_utf8()?.as_ref())?; - """, - *codegenScope, - "memberShape" to symbolProvider.toSymbol(memberShape), - ) - } else { - rustTemplate( - """ - let v = <_>::from(#{PercentEncoding}::percent_decode_str(&v).decode_utf8()?.as_ref()); - """.trimIndent(), - *codegenScope - ) - } + // NOTE: This path is traversed with or without @enum applied. The `try_from` is used + // as a common conversion. + rustTemplate( + """ + let v = <#{memberShape}>::try_from(v.as_ref())?; + """, + *codegenScope, + "memberShape" to symbolProvider.toSymbol(memberShape), + ) } memberShape.isTimestampShape -> { val index = HttpBindingIndex.of(model) @@ -922,7 +911,6 @@ private class ServerHttpBoundProtocolTraitImplGenerator( val timestampFormatType = RuntimeType.TimestampFormat(runtimeConfig, timestampFormat) rustTemplate( """ - let v = #{PercentEncoding}::percent_decode_str(&v).decode_utf8()?; let v = #{DateTime}::from_str(&v, #{format})?; """.trimIndent(), *codegenScope, @@ -1013,21 +1001,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( ) } - // TODO(https://github.com/awslabs/smithy-rs/issues/1231): If this function was called to parse a query string - // key value pair, we don't need to percent-decode it _again_. - private fun generateParsePercentEncodedStrFn(binding: HttpBindingDescriptor): RuntimeType { - // HTTP bindings we support that contain percent-encoded data. - check(binding.location == HttpLocation.LABEL || binding.location == HttpLocation.QUERY) - - val target = model.expectShape(binding.member.target) - return when { - target.isStringShape -> generateParsePercentEncodedStrAsStringFn(binding) - target.isTimestampShape -> generateParsePercentEncodedStrAsTimestampFn(binding) - else -> generateParseStrAsPrimitiveFn(binding) - } - } - - private fun generateParsePercentEncodedStrAsStringFn(binding: HttpBindingDescriptor): RuntimeType { + private fun generateParseFn(binding: HttpBindingDescriptor, percentDecoding: Boolean): RuntimeType { val output = symbolProvider.toSymbol(binding.member) val fnName = generateParseStrFnName(binding) val symbol = output.extractSymbolFromOption() @@ -1037,85 +1011,74 @@ private class ServerHttpBoundProtocolTraitImplGenerator( *codegenScope, "O" to output, ) { - // `<_>::from()` is necessary to convert the `&str` into: - // * the Rust enum in case the `string` shape has the `enum` trait; or - // * `String` in case it doesn't. - when (symbol.rustType()) { - RustType.String -> - rustTemplate( - """ - let value = <#{T}>::from(#{PercentEncoding}::percent_decode_str(value).decode_utf8()?.as_ref()); - """, - *codegenScope, - "T" to symbol, - ) - else -> { // RustType.Opaque, the Enum - check(symbol.rustType() is RustType.Opaque) + val target = model.expectShape(binding.member.target) + + when { + target.isStringShape -> { + // NOTE: This path is traversed with or without @enum applied. The `try_from` is used as a + // common conversion. + if (percentDecoding) { + rustTemplate( + """ + let value = #{PercentEncoding}::percent_decode_str(value).decode_utf8()?; + let value = #{T}::try_from(value.as_ref())?; + """, + *codegenScope, + "T" to symbol, + ) + } else { + rustTemplate( + """ + let value = #{T}::try_from(value)?; + """, + "T" to symbol, + ) + } + } + target.isTimestampShape -> { + val index = HttpBindingIndex.of(model) + val timestampFormat = + index.determineTimestampFormat( + binding.member, + binding.location, + protocol.defaultTimestampFormat, + ) + val timestampFormatType = RuntimeType.TimestampFormat(runtimeConfig, timestampFormat) + + if (percentDecoding) { + rustTemplate( + """ + let value = #{PercentEncoding}::percent_decode_str(value).decode_utf8()?; + let value = #{DateTime}::from_str(value.as_ref(), #{format})?; + """, + *codegenScope, + "format" to timestampFormatType, + ) + } else { + rustTemplate( + """ + let value = #{DateTime}::from_str(value, #{format})?; + """, + *codegenScope, + "format" to timestampFormatType, + ) + } + } + else -> { + check(target is NumberShape || target is BooleanShape) rustTemplate( """ - let value = <#{T}>::try_from(#{PercentEncoding}::percent_decode_str(value).decode_utf8()?.as_ref())?; + let value = std::str::FromStr::from_str(value)?; """, *codegenScope, - "T" to symbol, ) } } - writer.write( - """ - Ok(${symbolProvider.wrapOptional(binding.member, "value")}) - """ - ) - } - } - } - private fun generateParsePercentEncodedStrAsTimestampFn(binding: HttpBindingDescriptor): RuntimeType { - val output = symbolProvider.toSymbol(binding.member) - val fnName = generateParseStrFnName(binding) - val index = HttpBindingIndex.of(model) - val timestampFormat = - index.determineTimestampFormat( - binding.member, - binding.location, - protocol.defaultTimestampFormat, - ) - val timestampFormatType = RuntimeType.TimestampFormat(runtimeConfig, timestampFormat) - return RuntimeType.forInlineFun(fnName, operationDeserModule) { writer -> - writer.rustBlockTemplate( - "pub fn $fnName(value: &str) -> std::result::Result<#{O}, #{RequestRejection}>", - *codegenScope, - "O" to output, - ) { - rustTemplate( + writer.write( """ - let value = #{PercentEncoding}::percent_decode_str(value).decode_utf8()?; - let value = #{DateTime}::from_str(&value, #{format})?; Ok(${symbolProvider.wrapOptional(binding.member, "value")}) - """.trimIndent(), - *codegenScope, - "format" to timestampFormatType, - ) - } - } - } - - // Function to parse a string as the data type generated for boolean, byte, short, integer, long, float, or double shapes. - // TODO(https://github.com/awslabs/smithy-rs/issues/1232): This function can be replaced by https://docs.rs/aws-smithy-types/latest/aws_smithy_types/primitive/trait.Parse.html - private fun generateParseStrAsPrimitiveFn(binding: HttpBindingDescriptor): RuntimeType { - val output = symbolProvider.toSymbol(binding.member) - val fnName = generateParseStrFnName(binding) - return RuntimeType.forInlineFun(fnName, operationDeserModule) { writer -> - writer.rustBlockTemplate( - "pub fn $fnName(value: &str) -> std::result::Result<#{O}, #{RequestRejection}>", - *codegenScope, - "O" to output, - ) { - rustTemplate( """ - let value = std::str::FromStr::from_str(value)?; - Ok(${symbolProvider.wrapOptional(binding.member, "value")}) - """.trimIndent(), - *codegenScope, ) } } diff --git a/rust-runtime/aws-smithy-http-server/src/rejection.rs b/rust-runtime/aws-smithy-http-server/src/rejection.rs index 9db05d66505..eb19e2b7a95 100644 --- a/rust-runtime/aws-smithy-http-server/src/rejection.rs +++ b/rust-runtime/aws-smithy-http-server/src/rejection.rs @@ -194,6 +194,25 @@ pub enum RequestRejection { impl std::error::Error for RequestRejection {} +// Consider a conversion between `T` and `U` followed by a bubbling up of the conversion error +// through `Result<_, RequestRejection>`. This [`From`] implementation accomodates the special case +// where `T` and `U` are equal, in such cases `T`/`U` a enjoy `TryFrom` with +// `Err = std::convert::Infallible`. +// +// Note that when `!` stabilizes `std::convert::Infallible` will become an alias for `!` and there +// will be a blanket `impl From for T`. This will remove the need for this implementation. +// +// More details on this can be found in the following links: +// - https://doc.rust-lang.org/std/primitive.never.html +// - https://doc.rust-lang.org/std/convert/enum.Infallible.html#future-compatibility +impl From for RequestRejection { + fn from(_err: std::convert::Infallible) -> Self { + // We opt for this `match` here rather than [`unreachable`] to assure the reader that this + // code path is dead. + match _err {} + } +} + // These converters are solely to make code-generation simpler. They convert from a specific error // type (from a runtime/third-party crate or the standard library) into a variant of the // [`crate::rejection::RequestRejection`] enum holding the type-erased boxed [`crate::Error`] From d99d3e0c1723c5a7810068d1b4433a8748263e58 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Tue, 31 May 2022 13:00:16 -0700 Subject: [PATCH 10/49] Prepare for release (#1426) * Version bump * Update SDK models * Revert S3 model --- aws/sdk/aws-models/apigateway.json | 1294 +++--- aws/sdk/aws-models/appflow.json | 142 +- aws/sdk/aws-models/appmesh.json | 259 +- aws/sdk/aws-models/apprunner.json | 4 +- aws/sdk/aws-models/batch.json | 11 +- aws/sdk/aws-models/cloudformation.json | 125 +- aws/sdk/aws-models/cloudfront.json | 19 + aws/sdk/aws-models/cognito-idp.json | 992 ++--- aws/sdk/aws-models/comprehend.json | 103 +- aws/sdk/aws-models/datasync.json | 94 +- aws/sdk/aws-models/discovery.json | 269 +- aws/sdk/aws-models/ec2.json | 130 +- aws/sdk/aws-models/elasticache.json | 24 +- aws/sdk/aws-models/emr-serverless.json | 2468 ++++++++++++ aws/sdk/aws-models/finspace-data.json | 7 +- aws/sdk/aws-models/forecast.json | 1245 +++++- aws/sdk/aws-models/fsx.json | 80 +- aws/sdk/aws-models/gamesparks.json | 54 + aws/sdk/aws-models/glue.json | 5071 +++++++++++++++++++++--- aws/sdk/aws-models/grafana.json | 413 +- aws/sdk/aws-models/greengrassv2.json | 178 +- aws/sdk/aws-models/iot.json | 107 +- aws/sdk/aws-models/iotevents-data.json | 128 + aws/sdk/aws-models/ivschat.json | 81 +- aws/sdk/aws-models/kendra.json | 166 + aws/sdk/aws-models/kms.json | 60 +- aws/sdk/aws-models/lambda.json | 46 +- aws/sdk/aws-models/lightsail.json | 94 +- aws/sdk/aws-models/logs.json | 102 +- aws/sdk/aws-models/lookoutmetrics.json | 156 +- aws/sdk/aws-models/mediaconvert.json | 239 +- aws/sdk/aws-models/networkmanager.json | 342 +- aws/sdk/aws-models/outposts.json | 26 +- aws/sdk/aws-models/personalize.json | 21 +- aws/sdk/aws-models/quicksight.json | 103 +- aws/sdk/aws-models/rekognition.json | 4 +- aws/sdk/aws-models/resiliencehub.json | 370 +- aws/sdk/aws-models/sagemaker.json | 157 +- aws/sdk/aws-models/secretsmanager.json | 2 +- aws/sdk/aws-models/servicecatalog.json | 6 +- aws/sdk/aws-models/ssm-incidents.json | 92 +- aws/sdk/aws-models/sts.json | 2 +- aws/sdk/aws-models/transfer.json | 25 +- aws/sdk/aws-models/voice-id.json | 114 +- aws/sdk/aws-models/workspaces-web.json | 98 +- aws/sdk/aws-models/workspaces.json | 2 +- gradle.properties | 4 +- 47 files changed, 12931 insertions(+), 2598 deletions(-) create mode 100644 aws/sdk/aws-models/emr-serverless.json diff --git a/aws/sdk/aws-models/apigateway.json b/aws/sdk/aws-models/apigateway.json index e592cf9407e..1838347a271 100644 --- a/aws/sdk/aws-models/apigateway.json +++ b/aws/sdk/aws-models/apigateway.json @@ -35,7 +35,7 @@ "format": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

" + "smithy.api#documentation": "

A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

" } }, "destinationArn": { @@ -55,13 +55,13 @@ "cloudwatchRoleArn": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The ARN of an Amazon CloudWatch role for the current Account.

" + "smithy.api#documentation": "

The ARN of an Amazon CloudWatch role for the current Account.

" } }, "throttleSettings": { "target": "com.amazonaws.apigateway#ThrottleSettings", "traits": { - "smithy.api#documentation": "

Specifies the API request limits configured for the current Account.

" + "smithy.api#documentation": "

Specifies the API request limits configured for the current Account.

" } }, "features": { @@ -78,7 +78,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents an AWS account that is associated with API Gateway.

\n
\n

To view the account info, call GET on this resource.

\n

Error Codes

\n

The following exception may be thrown when the request fails.

\n
    \n
  • UnauthorizedException
  • \n
  • NotFoundException
  • \n
  • TooManyRequestsException
  • \n
\n

For detailed error code information, including the corresponding HTTP Status Codes, see API Gateway Error Codes

\n

Example: Get the information about an account.

\n
Request
\n
GET /account HTTP/1.1\nContent-Type: application/json\nHost: apigateway.us-east-1.amazonaws.com\nX-Amz-Date: 20160531T184618Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}\n            
\n
Response
\n

The successful response returns a 200 OK status code and a payload similar to the following:

\n
{\n  \"_links\": {\n    \"curies\": {\n      \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html\",\n      \"name\": \"account\",\n      \"templated\": true\n    },\n    \"self\": {\n      \"href\": \"/account\"\n    },\n    \"account:update\": {\n      \"href\": \"/account\"\n    }\n  },\n  \"cloudwatchRoleArn\": \"arn:aws:iam::123456789012:role/apigAwsProxyRole\",\n  \"throttleSettings\": {\n    \"rateLimit\": 500,\n    \"burstLimit\": 1000\n  }\n}\n            
\n

In addition to making the REST API call directly, you can use the AWS CLI and an AWS SDK to access this resource.

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

Represents an AWS account that is associated with API Gateway.

" } }, "com.amazonaws.apigateway#ApiKey": { @@ -135,7 +135,7 @@ "stageKeys": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A list of Stage resources that are associated with the ApiKey resource.

" + "smithy.api#documentation": "

A list of Stage resources that are associated with the ApiKey resource.

" } }, "tags": { @@ -146,7 +146,7 @@ } }, "traits": { - "smithy.api#documentation": "

A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

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

A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

" } }, "com.amazonaws.apigateway#ApiKeyIds": { @@ -155,7 +155,7 @@ "ids": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A list of all the ApiKey identifiers.

" + "smithy.api#documentation": "

A list of all the ApiKey identifiers.

" } }, "warnings": { @@ -166,7 +166,7 @@ } }, "traits": { - "smithy.api#documentation": "

The identifier of an ApiKey used in a UsagePlan.

" + "smithy.api#documentation": "

The identifier of an ApiKey used in a UsagePlan.

" } }, "com.amazonaws.apigateway#ApiKeySourceType": { @@ -209,7 +209,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection of API keys as represented by an ApiKeys resource.

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

Represents a collection of API keys as represented by an ApiKeys resource.

" } }, "com.amazonaws.apigateway#ApiKeysFormat": { @@ -261,7 +261,7 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the authorizer.

" + "smithy.api#documentation": "

The name of the authorizer.

" } }, "type": { @@ -273,7 +273,7 @@ "providerARNs": { "target": "com.amazonaws.apigateway#ListOfARNs", "traits": { - "smithy.api#documentation": "

A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.

" + "smithy.api#documentation": "

A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.

" } }, "authType": { @@ -297,7 +297,7 @@ "identitySource": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identity source for which authorization is requested.

  • For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth.
  • For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.

" + "smithy.api#documentation": "

The identity source for which authorization is requested. For a TOKEN or\n COGNITO_USER_POOLS authorizer, this is required and specifies the request\n header mapping expression for the custom header holding the authorization token submitted by\n the client. For example, if the token header name is Auth, the header mapping expression is\n method.request.header.Auth. For the REQUEST authorizer, this is required when authorization\n caching is enabled. The value is a comma-separated string of one or more mapping expressions\n of the specified request parameters. For example, if an Auth header, a Name query string\n parameter are defined as identity sources, this value is method.request.header.Auth,\n method.request.querystring.Name. These parameters will be used to derive the authorization\n caching key and to perform runtime validation of the REQUEST authorizer by verifying all of\n the identity-related request parameters are present, not null and non-empty. Only when this is\n true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401\n Unauthorized response without calling the Lambda function. The valid value is a string of\n comma-separated mapping expressions of the specified request parameters. When the\n authorization caching is not enabled, this property is optional.

" } }, "identityValidationExpression": { @@ -314,7 +314,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents an authorization layer for methods. If enabled on a method, API Gateway will activate the authorizer when a client calls the method.

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

Represents an authorization layer for methods. If enabled on a method, API Gateway will activate the authorizer when a client calls the method.

" } }, "com.amazonaws.apigateway#AuthorizerType": { @@ -356,7 +356,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection of Authorizer resources.

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

Represents a collection of Authorizer resources.

" } }, "com.amazonaws.apigateway#BackplaneControlService": { @@ -765,7 +765,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The string identifier of the associated RestApi.

" + "smithy.api#documentation": "

The string identifier of the associated RestApi.

" } }, "stage": { @@ -776,7 +776,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the base path that callers of the API must provide as part of the URL after the domain name.

\n
A custom domain name plus a BasePathMapping specification identifies a deployed RestApi in a given stage of the owner Account.
\n " + "smithy.api#documentation": "

Represents the base path that callers of the API must provide as part of the URL after the domain name.

" } }, "com.amazonaws.apigateway#BasePathMappings": { @@ -798,7 +798,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection of BasePathMapping resources.

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

Represents a collection of BasePathMapping resources.

" } }, "com.amazonaws.apigateway#Blob": { @@ -810,7 +810,7 @@ "com.amazonaws.apigateway#CacheClusterSize": { "type": "string", "traits": { - "smithy.api#documentation": "

Returns the size of the CacheCluster.

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

Returns the size of the CacheCluster.

", "smithy.api#enum": [ { "value": "0.5", @@ -850,7 +850,7 @@ "com.amazonaws.apigateway#CacheClusterStatus": { "type": "string", "traits": { - "smithy.api#documentation": "

Returns the status of the CacheCluster.

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

Returns the status of the CacheCluster.

", "smithy.api#enum": [ { "value": "CREATE_IN_PROGRESS", @@ -948,7 +948,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a client certificate used to configure client-side SSL authentication while sending requests to the integration endpoint.

\n
Client certificates are used to authenticate an API by the backend server. To authenticate an API client (or user), use IAM roles and policies, a custom Authorizer or an Amazon Cognito user pool.
\n " + "smithy.api#documentation": "

Represents a client certificate used to configure client-side SSL authentication while sending requests to the integration endpoint.

" } }, "com.amazonaws.apigateway#ClientCertificates": { @@ -970,7 +970,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection of ClientCertificate resources.

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

Represents a collection of ClientCertificate resources.

" } }, "com.amazonaws.apigateway#ConflictException": { @@ -1045,7 +1045,7 @@ } ], "traits": { - "smithy.api#documentation": "

Create an ApiKey resource.

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

Create an ApiKey resource.

", "smithy.api#http": { "method": "POST", "uri": "/apikeys", @@ -1059,19 +1059,19 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The name of the ApiKey.

" + "smithy.api#documentation": "

The name of the ApiKey.

" } }, "description": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The description of the ApiKey.

" + "smithy.api#documentation": "

The description of the ApiKey.

" } }, "enabled": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the ApiKey can be used by callers.

" + "smithy.api#documentation": "

Specifies whether the ApiKey can be used by callers.

" } }, "generateDistinctId": { @@ -1083,7 +1083,7 @@ "value": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

Specifies a value of the API key.

" + "smithy.api#documentation": "

Specifies a value of the API key.

" } }, "stageKeys": { @@ -1106,7 +1106,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request to create an ApiKey resource.

" + "smithy.api#documentation": "

Request to create an ApiKey resource.

" } }, "com.amazonaws.apigateway#CreateAuthorizer": { @@ -1138,7 +1138,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a new Authorizer resource to an existing RestApi resource.

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

Adds a new Authorizer resource to an existing RestApi resource.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/authorizers", @@ -1152,7 +1152,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1160,21 +1160,21 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the authorizer.

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

The name of the authorizer.

", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.apigateway#AuthorizerType", "traits": { - "smithy.api#documentation": "

[Required] The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.

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

The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.

", "smithy.api#required": {} } }, "providerARNs": { "target": "com.amazonaws.apigateway#ListOfARNs", "traits": { - "smithy.api#documentation": "

A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.

" + "smithy.api#documentation": "

A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.

" } }, "authType": { @@ -1198,7 +1198,7 @@ "identitySource": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identity source for which authorization is requested.

  • For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth.
  • For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.

" + "smithy.api#documentation": "

The identity source for which authorization is requested. For a TOKEN or\n COGNITO_USER_POOLS authorizer, this is required and specifies the request\n header mapping expression for the custom header holding the authorization token submitted by\n the client. For example, if the token header name is Auth, the header mapping\n expression is method.request.header.Auth. For the REQUEST\n authorizer, this is required when authorization caching is enabled. The value is a\n comma-separated string of one or more mapping expressions of the specified request parameters.\n For example, if an Auth header, a Name query string parameter are\n defined as identity sources, this value is method.request.header.Auth,\n method.request.querystring.Name. These parameters will be used to derive the\n authorization caching key and to perform runtime validation of the REQUEST\n authorizer by verifying all of the identity-related request parameters are present, not null\n and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda\n function, otherwise, it returns a 401 Unauthorized response without calling the Lambda\n function. The valid value is a string of comma-separated mapping expressions of the specified\n request parameters. When the authorization caching is not enabled, this property is\n optional.

" } }, "identityValidationExpression": { @@ -1215,7 +1215,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request to add a new Authorizer to an existing RestApi resource.

" + "smithy.api#documentation": "

Request to add a new Authorizer to an existing RestApi resource.

" } }, "com.amazonaws.apigateway#CreateBasePathMapping": { @@ -1247,7 +1247,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new BasePathMapping resource.

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

Creates a new BasePathMapping resource.

", "smithy.api#http": { "method": "POST", "uri": "/domainnames/{domainName}/basepathmappings", @@ -1261,7 +1261,7 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The domain name of the BasePathMapping resource to create.

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

The domain name of the BasePathMapping resource to create.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1275,7 +1275,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#required": {} } }, @@ -1287,7 +1287,7 @@ } }, "traits": { - "smithy.api#documentation": "

Requests API Gateway to create a new BasePathMapping resource.

" + "smithy.api#documentation": "

Requests API Gateway to create a new BasePathMapping resource.

" } }, "com.amazonaws.apigateway#CreateDeployment": { @@ -1322,7 +1322,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a Deployment resource, which makes a specified RestApi callable over the internet.

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

Creates a Deployment resource, which makes a specified RestApi callable over the internet.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/deployments", @@ -1336,7 +1336,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1344,37 +1344,37 @@ "stageName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The name of the Stage resource for the Deployment resource to create.

" + "smithy.api#documentation": "

The name of the Stage resource for the Deployment resource to create.

" } }, "stageDescription": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The description of the Stage resource for the Deployment resource to create.

" + "smithy.api#documentation": "

The description of the Stage resource for the Deployment resource to create.

" } }, "description": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The description for the Deployment resource to create.

" + "smithy.api#documentation": "

The description for the Deployment resource to create.

" } }, "cacheClusterEnabled": { "target": "com.amazonaws.apigateway#NullableBoolean", "traits": { - "smithy.api#documentation": "

Enables a cache cluster for the Stage resource specified in the input.

" + "smithy.api#documentation": "

Enables a cache cluster for the Stage resource specified in the input.

" } }, "cacheClusterSize": { "target": "com.amazonaws.apigateway#CacheClusterSize", "traits": { - "smithy.api#documentation": "

Specifies the cache cluster size for the Stage resource specified in the input, if a cache cluster is enabled.

" + "smithy.api#documentation": "

Specifies the cache cluster size for the Stage resource specified in the input, if a cache cluster is enabled.

" } }, "variables": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

A map that defines the stage variables for the Stage resource that is associated\n with the new deployment. Variable names can have alphanumeric and underscore characters, and the values\n must match [A-Za-z0-9-._~:/?#&=,]+.

" + "smithy.api#documentation": "

A map that defines the stage variables for the Stage resource that is associated\n with the new deployment. Variable names can have alphanumeric and underscore characters, and the values\n must match [A-Za-z0-9-._~:/?#&=,]+.

" } }, "canarySettings": { @@ -1386,12 +1386,12 @@ "tracingEnabled": { "target": "com.amazonaws.apigateway#NullableBoolean", "traits": { - "smithy.api#documentation": "

Specifies whether active tracing with X-ray is enabled for the Stage.

" + "smithy.api#documentation": "

Specifies whether active tracing with X-ray is enabled for the Stage.

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

Requests API Gateway to create a Deployment resource.

" + "smithy.api#documentation": "

Requests API Gateway to create a Deployment resource.

" } }, "com.amazonaws.apigateway#CreateDocumentationPart": { @@ -1423,6 +1423,7 @@ } ], "traits": { + "smithy.api#documentation": "

Creates a documentation part.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/documentation/parts", @@ -1436,7 +1437,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1444,14 +1445,14 @@ "location": { "target": "com.amazonaws.apigateway#DocumentationPartLocation", "traits": { - "smithy.api#documentation": "

[Required] The location of the targeted API entity of the to-be-created documentation part.

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

The location of the targeted API entity of the to-be-created documentation part.

", "smithy.api#required": {} } }, "properties": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value pairs can be exported and, hence, published.

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

The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value pairs can be exported and, hence, published.

", "smithy.api#required": {} } } @@ -1489,6 +1490,7 @@ } ], "traits": { + "smithy.api#documentation": "

Creates a documentation version

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/documentation/versions", @@ -1502,7 +1504,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1510,7 +1512,7 @@ "documentationVersion": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The version identifier of the new snapshot.

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

The version identifier of the new snapshot.

", "smithy.api#required": {} } }, @@ -1571,7 +1573,7 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the DomainName resource.

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

The name of the DomainName resource.

", "smithy.api#required": {} } }, @@ -1620,7 +1622,7 @@ "endpointConfiguration": { "target": "com.amazonaws.apigateway#EndpointConfiguration", "traits": { - "smithy.api#documentation": "

The endpoint configuration of this DomainName showing the endpoint types of the domain name.

" + "smithy.api#documentation": "

The endpoint configuration of this DomainName showing the endpoint types of the domain name.

" } }, "tags": { @@ -1632,7 +1634,7 @@ "securityPolicy": { "target": "com.amazonaws.apigateway#SecurityPolicy", "traits": { - "smithy.api#documentation": "

The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS_1_0 and TLS_1_2.

" + "smithy.api#documentation": "

The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS_1_0 and TLS_1_2.

" } }, "mutualTlsAuthentication": { @@ -1641,7 +1643,7 @@ "ownershipVerificationCertificateArn": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn.

" + "smithy.api#documentation": "

The ARN of the public certificate issued by ACM to validate ownership of your custom\n domain. Only required when configuring mutual TLS and using an ACM imported or private CA\n certificate ARN as the regionalCertificateArn.

" } } }, @@ -1678,7 +1680,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a new Model resource to an existing RestApi resource.

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

Adds a new Model resource to an existing RestApi resource.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/models", @@ -1692,7 +1694,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The RestApi identifier under which the Model will be created.

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

The RestApi identifier under which the Model will be created.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1700,7 +1702,7 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the model. Must be alphanumeric.

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

The name of the model. Must be alphanumeric.

", "smithy.api#required": {} } }, @@ -1713,19 +1715,19 @@ "schema": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The schema for the model. For application/json models, this should be JSON schema draft 4 model.

" + "smithy.api#documentation": "

The schema for the model. For application/json models, this should be JSON schema draft 4 model.

" } }, "contentType": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The content-type for the model.

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

The content-type for the model.

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

Request to add a new Model to an existing RestApi resource.

" + "smithy.api#documentation": "

Request to add a new Model to an existing RestApi resource.

" } }, "com.amazonaws.apigateway#CreateRequestValidator": { @@ -1757,7 +1759,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a ReqeustValidator of a given RestApi.

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

Creates a RequestValidator of a given RestApi.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/requestvalidators", @@ -1771,7 +1773,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1779,7 +1781,7 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The name of the to-be-created RequestValidator.

" + "smithy.api#documentation": "

The name of the to-be-created RequestValidator.

" } }, "validateRequestBody": { @@ -1796,7 +1798,7 @@ } }, "traits": { - "smithy.api#documentation": "

Creates a RequestValidator of a given RestApi.

" + "smithy.api#documentation": "

Creates a RequestValidator of a given RestApi.

" } }, "com.amazonaws.apigateway#CreateResource": { @@ -1828,7 +1830,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a Resource resource.

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

Creates a Resource resource.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/resources/{parentId}", @@ -1842,7 +1844,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1850,7 +1852,7 @@ "parentId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The parent resource's identifier.

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

The parent resource's identifier.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1864,7 +1866,7 @@ } }, "traits": { - "smithy.api#documentation": "

Requests API Gateway to create a Resource resource.

" + "smithy.api#documentation": "

Requests API Gateway to create a Resource resource.

" } }, "com.amazonaws.apigateway#CreateRestApi": { @@ -1893,7 +1895,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new RestApi resource.

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

Creates a new RestApi resource.

", "smithy.api#http": { "method": "POST", "uri": "/restapis", @@ -1907,14 +1909,14 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the RestApi.

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

The name of the RestApi.

", "smithy.api#required": {} } }, "description": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The description of the RestApi.

" + "smithy.api#documentation": "

The description of the RestApi.

" } }, "version": { @@ -1926,13 +1928,13 @@ "cloneFrom": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The ID of the RestApi that you want to clone from.

" + "smithy.api#documentation": "

The ID of the RestApi that you want to clone from.

" } }, "binaryMediaTypes": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

" + "smithy.api#documentation": "

The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

" } }, "minimumCompressionSize": { @@ -1944,19 +1946,19 @@ "apiKeySource": { "target": "com.amazonaws.apigateway#ApiKeySourceType", "traits": { - "smithy.api#documentation": "

The source of the API key for metering requests according to a usage plan. Valid values are:

  • HEADER to read the API key from the X-API-Key header of a request.
  • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

" + "smithy.api#documentation": "

The source of the API key for metering requests according to a usage plan. Valid values\n are: >HEADER to read the API key from the X-API-Key header of a\n request. AUTHORIZER to read the API key from the UsageIdentifierKey\n from a custom authorizer.

" } }, "endpointConfiguration": { "target": "com.amazonaws.apigateway#EndpointConfiguration", "traits": { - "smithy.api#documentation": "

The endpoint configuration of this RestApi showing the endpoint types of the API.

" + "smithy.api#documentation": "

The endpoint configuration of this RestApi showing the endpoint types of the API.

" } }, "policy": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration." + "smithy.api#documentation": "

A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

" } }, "tags": { @@ -1968,12 +1970,12 @@ "disableExecuteApiEndpoint": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.

" + "smithy.api#documentation": "

Specifies whether clients can invoke your API by using the default execute-api endpoint.\n By default, clients can invoke your API with the default\n https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a\n custom domain name to invoke your API, disable the default endpoint

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

The POST Request to add a new RestApi resource to your collection.

" + "smithy.api#documentation": "

The POST Request to add a new RestApi resource to your collection.

" } }, "com.amazonaws.apigateway#CreateStage": { @@ -2005,7 +2007,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new Stage resource that references a pre-existing Deployment for the API.

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

Creates a new Stage resource that references a pre-existing Deployment for the API.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/stages", @@ -2019,7 +2021,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2027,21 +2029,21 @@ "stageName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name for the Stage resource. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

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

The name for the Stage resource. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

", "smithy.api#required": {} } }, "deploymentId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the Deployment resource for the Stage resource.

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

The identifier of the Deployment resource for the Stage resource.

", "smithy.api#required": {} } }, "description": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The description of the Stage resource.

" + "smithy.api#documentation": "

The description of the Stage resource.

" } }, "cacheClusterEnabled": { @@ -2059,7 +2061,7 @@ "variables": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

A map that defines the stage variables for the new Stage resource. Variable names\n can have alphanumeric and underscore characters, and the values must match\n [A-Za-z0-9-._~:/?#&=,]+.

" + "smithy.api#documentation": "

A map that defines the stage variables for the new Stage resource. Variable names\n can have alphanumeric and underscore characters, and the values must match\n [A-Za-z0-9-._~:/?#&=,]+.

" } }, "documentationVersion": { @@ -2077,7 +2079,7 @@ "tracingEnabled": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether active tracing with X-ray is enabled for the Stage.

" + "smithy.api#documentation": "

Specifies whether active tracing with X-ray is enabled for the Stage.

" } }, "tags": { @@ -2088,7 +2090,7 @@ } }, "traits": { - "smithy.api#documentation": "

Requests API Gateway to create a Stage resource.

" + "smithy.api#documentation": "

Requests API Gateway to create a Stage resource.

" } }, "com.amazonaws.apigateway#CreateUsagePlan": { @@ -2171,7 +2173,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the UsagePlan resource representing the usage plan containing the to-be-created UsagePlanKey resource representing a plan customer.

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

The Id of the UsagePlan resource representing the usage plan containing the to-be-created UsagePlanKey resource representing a plan customer.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2179,14 +2181,14 @@ "keyId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of a UsagePlanKey resource for a plan customer.

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

The identifier of a UsagePlanKey resource for a plan customer.

", "smithy.api#required": {} } }, "keyType": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The type of a UsagePlanKey resource for a plan customer.

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

The type of a UsagePlanKey resource for a plan customer.

", "smithy.api#required": {} } } @@ -2201,7 +2203,7 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the usage plan.

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

The name of the usage plan.

", "smithy.api#required": {} } }, @@ -2280,7 +2282,7 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name used to label and identify the VPC link.

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

The name used to label and identify the VPC link.

", "smithy.api#required": {} } }, @@ -2293,7 +2295,7 @@ "targetArns": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

[Required] The ARN of the network load balancer of the VPC targeted by the VPC link. The network load balancer must be owned by the same AWS account of the API owner.

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

The ARN of the network load balancer of the VPC targeted by the VPC link. The network load balancer must be owned by the same AWS account of the API owner.

", "smithy.api#required": {} } }, @@ -2313,6 +2315,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteApiKeyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2331,7 +2336,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the ApiKey resource.

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

Deletes the ApiKey resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/apikeys/{apiKey}", @@ -2345,14 +2350,14 @@ "apiKey": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the ApiKey resource to be deleted.

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

The identifier of the ApiKey resource to be deleted.

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

A request to delete the ApiKey resource.

" + "smithy.api#documentation": "

A request to delete the ApiKey resource.

" } }, "com.amazonaws.apigateway#DeleteAuthorizer": { @@ -2360,6 +2365,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteAuthorizerRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2378,7 +2386,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an existing Authorizer resource.

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

Deletes an existing Authorizer resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/authorizers/{authorizerId}", @@ -2392,7 +2400,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2400,14 +2408,14 @@ "authorizerId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the Authorizer resource.

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

The identifier of the Authorizer resource.

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

Request to delete an existing Authorizer resource.

" + "smithy.api#documentation": "

Request to delete an existing Authorizer resource.

" } }, "com.amazonaws.apigateway#DeleteBasePathMapping": { @@ -2415,6 +2423,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteBasePathMappingRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2433,7 +2444,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the BasePathMapping resource.

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

Deletes the BasePathMapping resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/domainnames/{domainName}/basepathmappings/{basePath}", @@ -2447,7 +2458,7 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The domain name of the BasePathMapping resource to delete.

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

The domain name of the BasePathMapping resource to delete.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2455,14 +2466,14 @@ "basePath": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The base path name of the BasePathMapping resource to delete.

\n

To specify an empty base path, set this parameter to '(none)'.

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

The base path name of the BasePathMapping resource to delete.

\n

To specify an empty base path, set this parameter to '(none)'.

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

A request to delete the BasePathMapping resource.

" + "smithy.api#documentation": "

A request to delete the BasePathMapping resource.

" } }, "com.amazonaws.apigateway#DeleteClientCertificate": { @@ -2470,6 +2481,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteClientCertificateRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2488,7 +2502,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the ClientCertificate resource.

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

Deletes the ClientCertificate resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/clientcertificates/{clientCertificateId}", @@ -2502,14 +2516,14 @@ "clientCertificateId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the ClientCertificate resource to be deleted.

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

The identifier of the ClientCertificate resource to be deleted.

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

A request to delete the ClientCertificate resource.

" + "smithy.api#documentation": "

A request to delete the ClientCertificate resource.

" } }, "com.amazonaws.apigateway#DeleteDeployment": { @@ -2517,6 +2531,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteDeploymentRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2538,7 +2555,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a Deployment resource. Deleting a deployment will only succeed if there are no Stage resources associated with it.

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

Deletes a Deployment resource. Deleting a deployment will only succeed if there are no Stage resources associated with it.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/deployments/{deploymentId}", @@ -2552,7 +2569,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2560,14 +2577,14 @@ "deploymentId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the Deployment resource to delete.

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

The identifier of the Deployment resource to delete.

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

Requests API Gateway to delete a Deployment resource.

" + "smithy.api#documentation": "

Requests API Gateway to delete a Deployment resource.

" } }, "com.amazonaws.apigateway#DeleteDocumentationPart": { @@ -2575,6 +2592,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteDocumentationPartRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2593,6 +2613,7 @@ } ], "traits": { + "smithy.api#documentation": "

Deletes a documentation part

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/documentation/parts/{documentationPartId}", @@ -2606,7 +2627,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2614,7 +2635,7 @@ "documentationPartId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the to-be-deleted documentation part.

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

The identifier of the to-be-deleted documentation part.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2629,6 +2650,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteDocumentationVersionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2647,6 +2671,7 @@ } ], "traits": { + "smithy.api#documentation": "

Deletes a documentation version.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/documentation/versions/{documentationVersion}", @@ -2660,7 +2685,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2668,7 +2693,7 @@ "documentationVersion": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The version identifier of a to-be-deleted documentation snapshot.

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

The version identifier of a to-be-deleted documentation snapshot.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2683,6 +2708,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteDomainNameRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2701,7 +2729,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the DomainName resource.

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

Deletes the DomainName resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/domainnames/{domainName}", @@ -2715,14 +2743,14 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the DomainName resource to be deleted.

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

The name of the DomainName resource to be deleted.

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

A request to delete the DomainName resource.

" + "smithy.api#documentation": "

A request to delete the DomainName resource.

" } }, "com.amazonaws.apigateway#DeleteGatewayResponse": { @@ -2730,6 +2758,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteGatewayResponseRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2748,7 +2779,7 @@ } ], "traits": { - "smithy.api#documentation": "

Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.

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

Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/gatewayresponses/{responseType}", @@ -2762,7 +2793,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2770,14 +2801,14 @@ "responseType": { "target": "com.amazonaws.apigateway#GatewayResponseType", "traits": { - "smithy.api#documentation": "

[Required]

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse.

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

Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.

" + "smithy.api#documentation": "

Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.

" } }, "com.amazonaws.apigateway#DeleteIntegration": { @@ -2785,6 +2816,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteIntegrationRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2817,7 +2851,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2825,7 +2859,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a delete integration request's resource identifier.

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

Specifies a delete integration request's resource identifier.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2833,7 +2867,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a delete integration request's HTTP method.

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

Specifies a delete integration request's HTTP method.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2848,6 +2882,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteIntegrationResponseRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2880,7 +2917,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2888,7 +2925,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a delete integration response request's resource identifier.

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

Specifies a delete integration response request's resource identifier.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2896,7 +2933,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a delete integration response request's HTTP method.

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

Specifies a delete integration response request's HTTP method.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2904,7 +2941,7 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

[Required] Specifies a delete integration response request's status code.

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

Specifies a delete integration response request's status code.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2919,6 +2956,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteMethodRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#ConflictException" @@ -2934,7 +2974,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an existing Method resource.

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

Deletes an existing Method resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}", @@ -2948,7 +2988,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2956,7 +2996,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Resource identifier for the Method resource.

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

The Resource identifier for the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2964,14 +3004,14 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The HTTP verb of the Method resource.

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

The HTTP verb of the Method resource.

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

Request to delete an existing Method resource.

" + "smithy.api#documentation": "

Request to delete an existing Method resource.

" } }, "com.amazonaws.apigateway#DeleteMethodResponse": { @@ -2979,6 +3019,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteMethodResponseRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -2997,7 +3040,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an existing MethodResponse resource.

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

Deletes an existing MethodResponse resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}", @@ -3011,7 +3054,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3019,7 +3062,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Resource identifier for the MethodResponse resource.

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

The Resource identifier for the MethodResponse resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3027,7 +3070,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The HTTP verb of the Method resource.

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

The HTTP verb of the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3035,14 +3078,14 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

[Required] The status code identifier for the MethodResponse resource.

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

The status code identifier for the MethodResponse resource.

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

A request to delete an existing MethodResponse resource.

" + "smithy.api#documentation": "

A request to delete an existing MethodResponse resource.

" } }, "com.amazonaws.apigateway#DeleteModel": { @@ -3050,6 +3093,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteModelRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -3082,7 +3128,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3090,14 +3136,14 @@ "modelName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the model to delete.

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

The name of the model to delete.

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

Request to delete an existing model in an existing RestApi resource.

" + "smithy.api#documentation": "

Request to delete an existing model in an existing RestApi resource.

" } }, "com.amazonaws.apigateway#DeleteRequestValidator": { @@ -3105,6 +3151,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteRequestValidatorRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -3123,7 +3172,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a RequestValidator of a given RestApi.

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

Deletes a RequestValidator of a given RestApi.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/requestvalidators/{requestValidatorId}", @@ -3137,7 +3186,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3145,14 +3194,14 @@ "requestValidatorId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the RequestValidator to be deleted.

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

The identifier of the RequestValidator to be deleted.

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

Deletes a specified RequestValidator of a given RestApi.

" + "smithy.api#documentation": "

Deletes a specified RequestValidator of a given RestApi.

" } }, "com.amazonaws.apigateway#DeleteResource": { @@ -3160,6 +3209,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteResourceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -3178,7 +3230,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a Resource resource.

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

Deletes a Resource resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/resources/{resourceId}", @@ -3192,7 +3244,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3200,14 +3252,14 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the Resource resource.

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

The identifier of the Resource resource.

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

Request to delete a Resource.

" + "smithy.api#documentation": "

Request to delete a Resource.

" } }, "com.amazonaws.apigateway#DeleteRestApi": { @@ -3215,6 +3267,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteRestApiRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -3247,7 +3302,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3262,6 +3317,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteStageRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -3283,7 +3341,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a Stage resource.

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

Deletes a Stage resource.

", "smithy.api#http": { "method": "DELETE", "uri": "/restapis/{restApiId}/stages/{stageName}", @@ -3297,7 +3355,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3305,14 +3363,14 @@ "stageName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the Stage resource to delete.

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

The name of the Stage resource to delete.

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

Requests API Gateway to delete a Stage resource.

" + "smithy.api#documentation": "

Requests API Gateway to delete a Stage resource.

" } }, "com.amazonaws.apigateway#DeleteUsagePlan": { @@ -3320,6 +3378,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteUsagePlanRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -3351,6 +3412,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteUsagePlanKeyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -3383,7 +3447,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the UsagePlan resource representing the usage plan containing the to-be-deleted UsagePlanKey resource representing a plan customer.

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

The Id of the UsagePlan resource representing the usage plan containing the to-be-deleted UsagePlanKey resource representing a plan customer.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3391,7 +3455,7 @@ "keyId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the UsagePlanKey resource to be deleted.

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

The Id of the UsagePlanKey resource to be deleted.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3407,7 +3471,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the to-be-deleted usage plan.

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

The Id of the to-be-deleted usage plan.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3422,6 +3486,9 @@ "input": { "target": "com.amazonaws.apigateway#DeleteVpcLinkRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -3440,7 +3507,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an existing VpcLink of a specified identifier.

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

Deletes an existing VpcLink of a specified identifier.

", "smithy.api#http": { "method": "DELETE", "uri": "/vpclinks/{vpcLinkId}", @@ -3454,14 +3521,14 @@ "vpcLinkId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the VpcLink. It is used in an Integration to reference this VpcLink.

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

The identifier of the VpcLink. It is used in an Integration to reference this VpcLink.

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

Deletes an existing VpcLink of a specified identifier.

" + "smithy.api#documentation": "

Deletes an existing VpcLink of a specified identifier.

" } }, "com.amazonaws.apigateway#Deployment": { @@ -3488,12 +3555,12 @@ "apiSummary": { "target": "com.amazonaws.apigateway#PathToMapOfMethodSnapshot", "traits": { - "smithy.api#documentation": "

A summary of the RestApi at the date and time that the deployment resource was created.

" + "smithy.api#documentation": "

A summary of the RestApi at the date and time that the deployment resource was created.

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

An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

\n
To create a deployment, call POST on the Deployments resource of a RestApi.\n To view, update, or delete a deployment, call GET, PATCH, or DELETE on the specified deployment resource (/restapis/{restapi_id}/deployments/{deployment_id}).
\n " + "smithy.api#documentation": "

An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

" } }, "com.amazonaws.apigateway#DeploymentCanarySettings": { @@ -3541,7 +3608,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection resource that contains zero or more references to your existing deployments, and links that guide you on how to interact with your collection. The collection offers a paginated view of the contained deployments.

\n
To create a new deployment of a RestApi, make a POST request against this resource. To view, update, or delete an existing\n deployment, make a GET, PATCH, or DELETE request, respectively, on a specified Deployment resource.
\n " + "smithy.api#documentation": "

Represents a collection resource that contains zero or more references to your existing deployments, and links that guide you on how to interact with your collection. The collection offers a paginated view of the contained deployments.

" } }, "com.amazonaws.apigateway#DocumentationPart": { @@ -3550,7 +3617,7 @@ "id": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The DocumentationPart identifier, generated by API Gateway when the DocumentationPart is created.

" + "smithy.api#documentation": "

The DocumentationPart identifier, generated by API Gateway when the DocumentationPart is created.

" } }, "location": { @@ -3562,12 +3629,12 @@ "properties": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., \"{ \\\"description\\\": \\\"The API does ...\\\" }\". Only OpenAPI-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a OpenAPI extension of x-amazon-apigateway-documentation.

" + "smithy.api#documentation": "

A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., \"{ \\\"description\\\": \\\"The API does ...\\\" }\". Only OpenAPI-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a OpenAPI extension of x-amazon-apigateway-documentation.

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

A documentation part for a targeted API entity.

\n
\n

A documentation part consists of a content map (properties) and a target (location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.

\n

The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the OpenAPI-compliant documentation fields will be injected into the associated API entity definition in the exported OpenAPI definition file.

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

A documentation part for a targeted API entity.

" } }, "com.amazonaws.apigateway#DocumentationPartIds": { @@ -3587,7 +3654,7 @@ } }, "traits": { - "smithy.api#documentation": "

A collection of the imported DocumentationPart identifiers.

\n
This is used to return the result when documentation parts in an external (e.g., OpenAPI) file are imported into API Gateway
\n " + "smithy.api#documentation": "

A collection of the imported DocumentationPart identifiers.

" } }, "com.amazonaws.apigateway#DocumentationPartLocation": { @@ -3596,7 +3663,7 @@ "type": { "target": "com.amazonaws.apigateway#DocumentationPartType", "traits": { - "smithy.api#documentation": "

[Required] The type of API entity to which the documentation content applies. Valid values are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHORIZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.

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

The type of API entity to which the documentation content applies. Valid values are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHORIZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.

", "smithy.api#required": {} } }, @@ -3709,7 +3776,7 @@ } }, "traits": { - "smithy.api#documentation": "

The collection of documentation parts of an API.

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

The collection of documentation parts of an API.

" } }, "com.amazonaws.apigateway#DocumentationVersion": { @@ -3735,7 +3802,7 @@ } }, "traits": { - "smithy.api#documentation": "

A snapshot of the documentation of an API.

\n

Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., OpenAPI) file.

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

A snapshot of the documentation of an API.

" } }, "com.amazonaws.apigateway#DocumentationVersions": { @@ -3757,7 +3824,7 @@ } }, "traits": { - "smithy.api#documentation": "

The collection of documentation snapshots of an API.

\n

Use the DocumentationVersions to manage documentation snapshots associated with various API stages.

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

The collection of documentation snapshots of an API.

" } }, "com.amazonaws.apigateway#DomainName": { @@ -3796,7 +3863,7 @@ "regionalHostedZoneId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. For more information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints for API Gateway.

" + "smithy.api#documentation": "

The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. For more information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints for API Gateway.

" } }, "regionalCertificateName": { @@ -3814,37 +3881,37 @@ "distributionDomainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The domain name of the Amazon CloudFront distribution associated with this custom domain name for an edge-optimized endpoint. You set up this association when adding a DNS record pointing the custom domain name to this distribution name. For more information about CloudFront distributions, see the Amazon CloudFront documentation.

" + "smithy.api#documentation": "

The domain name of the Amazon CloudFront distribution associated with this custom domain name for an edge-optimized endpoint. You set up this association when adding a DNS record pointing the custom domain name to this distribution name. For more information about CloudFront distributions, see the Amazon CloudFront documentation.

" } }, "distributionHostedZoneId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The valid value is Z2FDTNDATAQYW2 for all the regions. For more information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints for API Gateway.

" + "smithy.api#documentation": "

The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The valid value is Z2FDTNDATAQYW2 for all the regions. For more information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints for API Gateway.

" } }, "endpointConfiguration": { "target": "com.amazonaws.apigateway#EndpointConfiguration", "traits": { - "smithy.api#documentation": "

The endpoint configuration of this DomainName showing the endpoint types of the domain name.

" + "smithy.api#documentation": "

The endpoint configuration of this DomainName showing the endpoint types of the domain name.

" } }, "domainNameStatus": { "target": "com.amazonaws.apigateway#DomainNameStatus", "traits": { - "smithy.api#documentation": "

The status of the DomainName migration. The valid values are AVAILABLE, UPDATING, PENDING_CERTIFICATE_REIMPORT, and PENDING_OWNERSHIP_VERIFICATION. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

" + "smithy.api#documentation": "

The status of the DomainName migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

" } }, "domainNameStatusMessage": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

An optional text message containing detailed information about status of the DomainName migration.

" + "smithy.api#documentation": "

An optional text message containing detailed information about status of the DomainName migration.

" } }, "securityPolicy": { "target": "com.amazonaws.apigateway#SecurityPolicy", "traits": { - "smithy.api#documentation": "

The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS_1_0 and TLS_1_2.

" + "smithy.api#documentation": "

The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS_1_0 and TLS_1_2.

" } }, "tags": { @@ -3856,18 +3923,18 @@ "mutualTlsAuthentication": { "target": "com.amazonaws.apigateway#MutualTlsAuthentication", "traits": { - "smithy.api#documentation": "

The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.

" + "smithy.api#documentation": "

The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway\n performs two-way authentication between the client and the server. Clients must present a\n trusted certificate to access your API.

" } }, "ownershipVerificationCertificateArn": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn.

" + "smithy.api#documentation": "

The ARN of the public certificate issued by ACM to validate ownership of your custom\n domain. Only required when configuring mutual TLS and using an ACM imported or private CA\n certificate ARN as the regionalCertificateArn.

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

Represents a custom domain name as a user-friendly host name of an API (RestApi).

\n
\n

When you deploy an API, API Gateway creates a default host name for the API. This default API host name is of the {restapi-id}.execute-api.{region}.amazonaws.com format. With the default host name, you can access the API's root resource with the URL of https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage}/. When you set up a custom domain name of apis.example.com for this API, you can then access the same resource using the URL of the https://apis.examples.com/myApi, where myApi is the base path mapping (BasePathMapping) of your API under the custom domain name.\n

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

Represents a custom domain name as a user-friendly host name of an API (RestApi).

" } }, "com.amazonaws.apigateway#DomainNameStatus": { @@ -3916,7 +3983,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection of DomainName resources.

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

Represents a collection of DomainName resources.

" } }, "com.amazonaws.apigateway#Double": { @@ -3928,18 +3995,18 @@ "types": { "target": "com.amazonaws.apigateway#ListOfEndpointType", "traits": { - "smithy.api#documentation": "

A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is \"EDGE\". For a regional API and its custom domain name, the endpoint type is REGIONAL. For a private API, the endpoint type is PRIVATE.

" + "smithy.api#documentation": "

A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is \"EDGE\". For a regional API and its custom domain name, the endpoint type is REGIONAL. For a private API, the endpoint type is PRIVATE.

" } }, "vpcEndpointIds": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for PRIVATE endpoint type.

" + "smithy.api#documentation": "

A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for PRIVATE endpoint type.

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

The endpoint configuration to indicate the types of endpoints an API (RestApi) or its custom domain name (DomainName) has.

" + "smithy.api#documentation": "

The endpoint configuration to indicate the types of endpoints an API (RestApi) or its custom domain name (DomainName) has.

" } }, "com.amazonaws.apigateway#EndpointType": { @@ -3982,13 +4049,13 @@ "body": { "target": "com.amazonaws.apigateway#Blob", "traits": { - "smithy.api#documentation": "

The binary blob response to GetExport, which contains the export.

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

The binary blob response to GetExport, which contains the export.

", "smithy.api#httpPayload": {} } } }, "traits": { - "smithy.api#documentation": "

The binary blob response to GetExport, which contains the generated SDK.

" + "smithy.api#documentation": "

The binary blob response to GetExport, which contains the generated SDK.

" } }, "com.amazonaws.apigateway#FlushStageAuthorizersCache": { @@ -3996,6 +4063,9 @@ "input": { "target": "com.amazonaws.apigateway#FlushStageAuthorizersCacheRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -4031,7 +4101,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4054,6 +4124,9 @@ "input": { "target": "com.amazonaws.apigateway#FlushStageCacheRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -4089,7 +4162,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4097,7 +4170,7 @@ "stageName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the stage to flush its cache.

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

The name of the stage to flush its cache.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4113,36 +4186,36 @@ "responseType": { "target": "com.amazonaws.apigateway#GatewayResponseType", "traits": { - "smithy.api#documentation": "

The response type of the associated GatewayResponse.

" + "smithy.api#documentation": "

The response type of the associated GatewayResponse.

" } }, "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

The HTTP status code for this GatewayResponse.

" + "smithy.api#documentation": "

The HTTP status code for this GatewayResponse.

" } }, "responseParameters": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

" + "smithy.api#documentation": "

Response parameters (paths, query strings and headers) of the GatewayResponse as a\n string-to-string map of key-value pairs.

" } }, "responseTemplates": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

" + "smithy.api#documentation": "

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

" } }, "defaultResponse": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

A Boolean flag to indicate whether this GatewayResponse is the default gateway response (true) or not (false). A default gateway response is one generated by API Gateway without any customization by an API developer.

" + "smithy.api#documentation": "

A Boolean flag to indicate whether this GatewayResponse is the default gateway response (true) or not (false). A default gateway response is one generated by API Gateway without any customization by an API developer.

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

A gateway response of a given response type and status code, with optional response parameters and mapping templates.

\n
\n For more information about valid gateway response types, see Gateway Response Types Supported by API Gateway\n
\n

Example: Get a Gateway Response of a given response type

\n
Request
\n

This example shows how to get a gateway response of the MISSING_AUTHENTICATION_TOKEN type.

\n
GET /restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN HTTP/1.1\nHost: beta-apigateway.us-east-1.amazonaws.com\nContent-Type: application/json\nX-Amz-Date: 20170503T202516Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access-key-id}/20170503/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1b52460e3159c1a26cff29093855d50ea141c1c5b937528fecaf60f51129697a\nCache-Control: no-cache\nPostman-Token: 3b2a1ce9-c848-2e26-2e2f-9c2caefbed45\n
\n

The response type is specified as a URL path.

\n
Response
\n

The successful operation returns the 200 OK status code and a payload similar to the following:

\n
{\n  \"_links\": {\n    \"curies\": {\n      \"href\": \"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html\",\n      \"name\": \"gatewayresponse\",\n      \"templated\": true\n    },\n    \"self\": {\n      \"href\": \"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN\"\n    },\n    \"gatewayresponse:delete\": {\n      \"href\": \"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN\"\n    },\n    \"gatewayresponse:put\": {\n      \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n      \"templated\": true\n    },\n    \"gatewayresponse:update\": {\n      \"href\": \"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN\"\n    }\n  },\n  \"defaultResponse\": false,\n  \"responseParameters\": {\n    \"gatewayresponse.header.x-request-path\": \"method.request.path.petId\",\n    \"gatewayresponse.header.Access-Control-Allow-Origin\": \"'a.b.c'\",\n    \"gatewayresponse.header.x-request-query\": \"method.request.querystring.q\",\n    \"gatewayresponse.header.x-request-header\": \"method.request.header.Accept\"\n  },\n  \"responseTemplates\": {\n    \"application/json\": \"{\\n     \\\"message\\\": $context.error.messageString,\\n     \\\"type\\\":  \\\"$context.error.responseType\\\",\\n     \\\"stage\\\":  \\\"$context.stage\\\",\\n     \\\"resourcePath\\\":  \\\"$context.resourcePath\\\",\\n     \\\"stageVariables.a\\\":  \\\"$stageVariables.a\\\",\\n     \\\"statusCode\\\": \\\"'404'\\\"\\n}\"\n  },\n  \"responseType\": \"MISSING_AUTHENTICATION_TOKEN\",\n  \"statusCode\": \"404\"\n}
\n

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

A gateway response of a given response type and status code, with optional response parameters and mapping templates.

" } }, "com.amazonaws.apigateway#GatewayResponseType": { @@ -4249,13 +4322,13 @@ "position": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The current pagination position in the paged result set. The GatewayResponse collection does not support pagination and the position does not apply here.

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

The current pagination position in the paged result set. The GatewayResponse collection does not support pagination and the position does not apply here.

", "smithy.api#httpQuery": "position" } } }, "traits": { - "smithy.api#documentation": "

The collection of the GatewayResponse instances of a RestApi as a responseType-to-GatewayResponse object map of key-value pairs. As such, pagination is not supported for querying this collection.

\n
\n For more information about valid gateway response types, see Gateway Response Types Supported by API Gateway\n
\n

Example: Get the collection of gateway responses of an API

\n
Request
\n

This example request shows how to retrieve the GatewayResponses collection from an API.

\n
GET /restapis/o81lxisefl/gatewayresponses HTTP/1.1\nHost: beta-apigateway.us-east-1.amazonaws.com\nContent-Type: application/json\nX-Amz-Date: 20170503T220604Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access-key-id}/20170503/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=59b42fe54a76a5de8adf2c67baa6d39206f8e9ad49a1d77ccc6a5da3103a398a\nCache-Control: no-cache\nPostman-Token: 5637af27-dc29-fc5c-9dfe-0645d52cb515\n
\n

\n
Response
\n

The successful operation returns the 200 OK status code and a payload similar to the following:

\n
{\n  \"_links\": {\n    \"curies\": {\n      \"href\": \"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html\",\n      \"name\": \"gatewayresponse\",\n      \"templated\": true\n    },\n    \"self\": {\n      \"href\": \"/restapis/o81lxisefl/gatewayresponses\"\n    },\n    \"first\": {\n      \"href\": \"/restapis/o81lxisefl/gatewayresponses\"\n    },\n    \"gatewayresponse:by-type\": {\n      \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n      \"templated\": true\n    },\n    \"item\": [\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/THROTTLED\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE\"\n      },\n      {\n        \"href\": \"/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE\"\n      }\n    ]\n  },\n  \"_embedded\": {\n    \"item\": [\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/INTEGRATION_FAILURE\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"INTEGRATION_FAILURE\",\n        \"statusCode\": \"504\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/RESOURCE_NOT_FOUND\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"RESOURCE_NOT_FOUND\",\n        \"statusCode\": \"404\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/REQUEST_TOO_LARGE\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"REQUEST_TOO_LARGE\",\n        \"statusCode\": \"413\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/THROTTLED\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/THROTTLED\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"THROTTLED\",\n        \"statusCode\": \"429\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/UNSUPPORTED_MEDIA_TYPE\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"UNSUPPORTED_MEDIA_TYPE\",\n        \"statusCode\": \"415\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_CONFIGURATION_ERROR\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"AUTHORIZER_CONFIGURATION_ERROR\",\n        \"statusCode\": \"500\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/DEFAULT_5XX\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"DEFAULT_5XX\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/DEFAULT_4XX\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"DEFAULT_4XX\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_PARAMETERS\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"BAD_REQUEST_PARAMETERS\",\n        \"statusCode\": \"400\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/BAD_REQUEST_BODY\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"BAD_REQUEST_BODY\",\n        \"statusCode\": \"400\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/EXPIRED_TOKEN\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"EXPIRED_TOKEN\",\n        \"statusCode\": \"403\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/ACCESS_DENIED\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"ACCESS_DENIED\",\n        \"statusCode\": \"403\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/INVALID_API_KEY\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"INVALID_API_KEY\",\n        \"statusCode\": \"403\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"UNAUTHORIZED\",\n        \"statusCode\": \"401\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/API_CONFIGURATION_ERROR\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"API_CONFIGURATION_ERROR\",\n        \"statusCode\": \"500\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/QUOTA_EXCEEDED\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"QUOTA_EXCEEDED\",\n        \"statusCode\": \"429\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/INTEGRATION_TIMEOUT\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"INTEGRATION_TIMEOUT\",\n        \"statusCode\": \"504\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/MISSING_AUTHENTICATION_TOKEN\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"MISSING_AUTHENTICATION_TOKEN\",\n        \"statusCode\": \"403\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/INVALID_SIGNATURE\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"INVALID_SIGNATURE\",\n        \"statusCode\": \"403\"\n      },\n      {\n        \"_links\": {\n          \"self\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE\"\n          },\n          \"gatewayresponse:put\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/{response_type}\",\n            \"templated\": true\n          },\n          \"gatewayresponse:update\": {\n            \"href\": \"/restapis/o81lxisefl/gatewayresponses/AUTHORIZER_FAILURE\"\n          }\n        },\n        \"defaultResponse\": true,\n        \"responseParameters\": {},\n        \"responseTemplates\": {\n          \"application/json\": \"{\\\"message\\\":$context.error.messageString}\"\n        },\n        \"responseType\": \"AUTHORIZER_FAILURE\",\n        \"statusCode\": \"500\"\n      }\n    ]\n  }\n}
\n

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

The collection of the GatewayResponse instances of a RestApi as a responseType-to-GatewayResponse object map of key-value pairs. As such, pagination is not supported for querying this collection.

" } }, "com.amazonaws.apigateway#GenerateClientCertificate": { @@ -4284,7 +4357,7 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a ClientCertificate resource.

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

Generates a ClientCertificate resource.

", "smithy.api#http": { "method": "POST", "uri": "/clientcertificates", @@ -4298,7 +4371,7 @@ "description": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The description of the ClientCertificate.

" + "smithy.api#documentation": "

The description of the ClientCertificate.

" } }, "tags": { @@ -4309,7 +4382,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to generate a ClientCertificate resource.

" + "smithy.api#documentation": "

A request to generate a ClientCertificate resource.

" } }, "com.amazonaws.apigateway#GetAccount": { @@ -4335,7 +4408,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about the current Account resource.

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

Gets information about the current Account resource.

", "smithy.api#http": { "method": "GET", "uri": "/account", @@ -4347,7 +4420,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Requests API Gateway to get information about the current Account resource.

" + "smithy.api#documentation": "

Requests API Gateway to get information about the current Account resource.

" } }, "com.amazonaws.apigateway#GetApiKey": { @@ -4373,7 +4446,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about the current ApiKey resource.

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

Gets information about the current ApiKey resource.

", "smithy.api#http": { "method": "GET", "uri": "/apikeys/{apiKey}", @@ -4387,7 +4460,7 @@ "apiKey": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the ApiKey resource.

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

The identifier of the ApiKey resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4401,7 +4474,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get information about the current ApiKey resource.

" + "smithy.api#documentation": "

A request to get information about the current ApiKey resource.

" } }, "com.amazonaws.apigateway#GetApiKeys": { @@ -4427,7 +4500,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about the current ApiKeys resource.

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

Gets information about the current ApiKeys resource.

", "smithy.api#http": { "method": "GET", "uri": "/apikeys", @@ -4481,7 +4554,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get information about the current ApiKeys resource.

" + "smithy.api#documentation": "

A request to get information about the current ApiKeys resource.

" } }, "com.amazonaws.apigateway#GetAuthorizer": { @@ -4507,7 +4580,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describe an existing Authorizer resource.

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

Describe an existing Authorizer resource.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/authorizers/{authorizerId}", @@ -4521,7 +4594,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4529,14 +4602,14 @@ "authorizerId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the Authorizer resource.

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

The identifier of the Authorizer resource.

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

Request to describe an existing Authorizer resource.

" + "smithy.api#documentation": "

Request to describe an existing Authorizer resource.

" } }, "com.amazonaws.apigateway#GetAuthorizers": { @@ -4562,7 +4635,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describe an existing Authorizers resource.

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

Describe an existing Authorizers resource.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/authorizers", @@ -4576,7 +4649,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4597,7 +4670,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request to describe an existing Authorizers resource.

" + "smithy.api#documentation": "

Request to describe an existing Authorizers resource.

" } }, "com.amazonaws.apigateway#GetBasePathMapping": { @@ -4623,7 +4696,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describe a BasePathMapping resource.

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

Describe a BasePathMapping resource.

", "smithy.api#http": { "method": "GET", "uri": "/domainnames/{domainName}/basepathmappings/{basePath}", @@ -4637,7 +4710,7 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The domain name of the BasePathMapping resource to be described.

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

The domain name of the BasePathMapping resource to be described.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4645,14 +4718,14 @@ "basePath": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Specify '(none)' if you do not want callers to specify any base path name after the domain name.

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

The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Specify '(none)' if you do not want callers to specify any base path name after the domain name.

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

Request to describe a BasePathMapping resource.

" + "smithy.api#documentation": "

Request to describe a BasePathMapping resource.

" } }, "com.amazonaws.apigateway#GetBasePathMappings": { @@ -4678,7 +4751,7 @@ } ], "traits": { - "smithy.api#documentation": "

Represents a collection of BasePathMapping resources.

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

Represents a collection of BasePathMapping resources.

", "smithy.api#http": { "method": "GET", "uri": "/domainnames/{domainName}/basepathmappings", @@ -4698,7 +4771,7 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The domain name of a BasePathMapping resource.

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

The domain name of a BasePathMapping resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4719,7 +4792,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get information about a collection of BasePathMapping resources.

" + "smithy.api#documentation": "

A request to get information about a collection of BasePathMapping resources.

" } }, "com.amazonaws.apigateway#GetClientCertificate": { @@ -4745,7 +4818,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about the current ClientCertificate resource.

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

Gets information about the current ClientCertificate resource.

", "smithy.api#http": { "method": "GET", "uri": "/clientcertificates/{clientCertificateId}", @@ -4759,14 +4832,14 @@ "clientCertificateId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the ClientCertificate resource to be described.

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

The identifier of the ClientCertificate resource to be described.

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

A request to get information about the current ClientCertificate resource.

" + "smithy.api#documentation": "

A request to get information about the current ClientCertificate resource.

" } }, "com.amazonaws.apigateway#GetClientCertificates": { @@ -4792,7 +4865,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a collection of ClientCertificate resources.

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

Gets a collection of ClientCertificate resources.

", "smithy.api#http": { "method": "GET", "uri": "/clientcertificates", @@ -4825,7 +4898,7 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get information about a collection of ClientCertificate resources.

" + "smithy.api#documentation": "

A request to get information about a collection of ClientCertificate resources.

" } }, "com.amazonaws.apigateway#GetDeployment": { @@ -4854,7 +4927,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a Deployment resource.

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

Gets information about a Deployment resource.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/deployments/{deploymentId}", @@ -4868,7 +4941,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4876,7 +4949,7 @@ "deploymentId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the Deployment resource to get information about.

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

The identifier of the Deployment resource to get information about.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4884,13 +4957,13 @@ "embed": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this embed parameter value is a list of comma-separated strings, as in GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the \"apisummary\" string. For example, GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary.

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

A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this embed parameter value is a list of comma-separated strings, as in GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the \"apisummary\" string. For example, GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary.

", "smithy.api#httpQuery": "embed" } } }, "traits": { - "smithy.api#documentation": "

Requests API Gateway to get information about a Deployment resource.

" + "smithy.api#documentation": "

Requests API Gateway to get information about a Deployment resource.

" } }, "com.amazonaws.apigateway#GetDeployments": { @@ -4919,7 +4992,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a Deployments collection.

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

Gets information about a Deployments collection.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/deployments", @@ -4939,7 +5012,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4960,7 +5033,7 @@ } }, "traits": { - "smithy.api#documentation": "

Requests API Gateway to get information about a Deployments collection.

" + "smithy.api#documentation": "

Requests API Gateway to get information about a Deployments collection.

" } }, "com.amazonaws.apigateway#GetDocumentationPart": { @@ -4986,6 +5059,7 @@ } ], "traits": { + "smithy.api#documentation": "

Gets a documentation part.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/documentation/parts/{documentationPartId}", @@ -4999,7 +5073,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5007,7 +5081,7 @@ "documentationPartId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5040,6 +5114,7 @@ } ], "traits": { + "smithy.api#documentation": "

Gets documentation parts.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/documentation/parts", @@ -5053,7 +5128,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5096,7 +5171,7 @@ "locationStatus": { "target": "com.amazonaws.apigateway#LocationStatusType", "traits": { - "smithy.api#documentation": "

The status of the API documentation parts to retrieve. Valid values are DOCUMENTED for retrieving DocumentationPart resources with content and UNDOCUMENTED for DocumentationPart resources without content.

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

The status of the API documentation parts to retrieve. Valid values are DOCUMENTED for retrieving DocumentationPart resources with content and UNDOCUMENTED for DocumentationPart resources without content.

", "smithy.api#httpQuery": "locationStatus" } } @@ -5125,6 +5200,7 @@ } ], "traits": { + "smithy.api#documentation": "

Gets a documentation version.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/documentation/versions/{documentationVersion}", @@ -5138,7 +5214,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5146,7 +5222,7 @@ "documentationVersion": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The version identifier of the to-be-retrieved documentation snapshot.

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

The version identifier of the to-be-retrieved documentation snapshot.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5179,6 +5255,7 @@ } ], "traits": { + "smithy.api#documentation": "

Gets documentation versions.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/documentation/versions", @@ -5192,7 +5269,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5253,14 +5330,14 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the DomainName resource.

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

The name of the DomainName resource.

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

Request to get the name of a DomainName resource.

" + "smithy.api#documentation": "

Request to get the name of a DomainName resource.

" } }, "com.amazonaws.apigateway#GetDomainNames": { @@ -5286,7 +5363,7 @@ } ], "traits": { - "smithy.api#documentation": "

Represents a collection of DomainName resources.

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

Represents a collection of DomainName resources.

", "smithy.api#http": { "method": "GET", "uri": "/domainnames", @@ -5319,7 +5396,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request to describe a collection of DomainName resources.

" + "smithy.api#documentation": "

Request to describe a collection of DomainName resources.

" } }, "com.amazonaws.apigateway#GetExport": { @@ -5351,7 +5428,7 @@ } ], "traits": { - "smithy.api#documentation": "

Exports a deployed version of a RestApi in a specified format.

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

Exports a deployed version of a RestApi in a specified format.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/stages/{stageName}/exports/{exportType}", @@ -5365,7 +5442,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5373,7 +5450,7 @@ "stageName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the Stage that will be exported.

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

The name of the Stage that will be exported.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5381,7 +5458,7 @@ "exportType": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The type of export. Acceptable values are 'oas30' for OpenAPI 3.0.x and 'swagger' for Swagger/OpenAPI 2.0.

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

The type of export. Acceptable values are 'oas30' for OpenAPI 3.0.x and 'swagger' for Swagger/OpenAPI 2.0.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5389,7 +5466,7 @@ "parameters": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

A key-value map of query string parameters that specify properties of the export, depending on the requested exportType. For exportType oas30 and swagger, any combination of the following parameters are supported: extensions='integrations' or extensions='apigateway' will export the API with x-amazon-apigateway-integration extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer extensions. postman will export the API with Postman extensions, allowing for import to the Postman tool

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

A key-value map of query string parameters that specify properties of the export, depending on the requested exportType. For exportType \n oas30 and swagger, any combination of the following parameters are supported: extensions='integrations' or extensions='apigateway' will export the API with x-amazon-apigateway-integration extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer extensions. postman will export the API with Postman extensions, allowing for import to the Postman tool

", "smithy.api#httpQueryParams": {} } }, @@ -5402,7 +5479,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request a new export of a RestApi for a particular Stage.

" + "smithy.api#documentation": "

Request a new export of a RestApi for a particular Stage.

" } }, "com.amazonaws.apigateway#GetGatewayResponse": { @@ -5428,7 +5505,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a GatewayResponse of a specified response type on the given RestApi.

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

Gets a GatewayResponse of a specified response type on the given RestApi.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/gatewayresponses/{responseType}", @@ -5442,7 +5519,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5450,14 +5527,14 @@ "responseType": { "target": "com.amazonaws.apigateway#GatewayResponseType", "traits": { - "smithy.api#documentation": "

[Required]

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse.

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

Gets a GatewayResponse of a specified response type on the given RestApi.

" + "smithy.api#documentation": "

Gets a GatewayResponse of a specified response type on the given RestApi.

" } }, "com.amazonaws.apigateway#GetGatewayResponses": { @@ -5483,7 +5560,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the GatewayResponses collection on the given RestApi. If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default GatewayResponses collection for the supported response types.

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

Gets the GatewayResponses collection on the given RestApi. If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default GatewayResponses collection for the supported response types.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/gatewayresponses", @@ -5497,7 +5574,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5505,20 +5582,20 @@ "position": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The current pagination position in the paged result set. The GatewayResponse collection does not support pagination and the position does not apply here.

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

The current pagination position in the paged result set. The GatewayResponse collection does not support pagination and the position does not apply here.

", "smithy.api#httpQuery": "position" } }, "limit": { "target": "com.amazonaws.apigateway#NullableInteger", "traits": { - "smithy.api#documentation": "

The maximum number of returned results per page. The default value is 25 and the maximum value is 500. The GatewayResponses collection does not support pagination and the limit does not apply here.

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

The maximum number of returned results per page. The default value is 25 and the maximum value is 500. The GatewayResponses collection does not support pagination and the limit does not apply here.

", "smithy.api#httpQuery": "limit" } } }, "traits": { - "smithy.api#documentation": "

Gets the GatewayResponses collection on the given RestApi. If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default GatewayResponses collection for the supported response types.

" + "smithy.api#documentation": "

Gets the GatewayResponses collection on the given RestApi. If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default GatewayResponses collection for the supported response types.

" } }, "com.amazonaws.apigateway#GetIntegration": { @@ -5558,7 +5635,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5566,7 +5643,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a get integration request's resource identifier

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

Specifies a get integration request's resource identifier

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5574,7 +5651,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a get integration request's HTTP method.

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

Specifies a get integration request's HTTP method.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5621,7 +5698,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5629,7 +5706,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a get integration response request's resource identifier.

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

Specifies a get integration response request's resource identifier.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5637,7 +5714,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a get integration response request's HTTP method.

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

Specifies a get integration response request's HTTP method.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5645,7 +5722,7 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

[Required] Specifies a get integration response request's status code.

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

Specifies a get integration response request's status code.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5675,7 +5752,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describe an existing Method resource.

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

Describe an existing Method resource.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}", @@ -5689,7 +5766,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5697,7 +5774,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Resource identifier for the Method resource.

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

The Resource identifier for the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5705,14 +5782,14 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies the method request's HTTP method type.

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

Specifies the method request's HTTP method type.

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

Request to describe an existing Method resource.

" + "smithy.api#documentation": "

Request to describe an existing Method resource.

" } }, "com.amazonaws.apigateway#GetMethodResponse": { @@ -5735,7 +5812,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes a MethodResponse resource.

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

Describes a MethodResponse resource.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}", @@ -5749,7 +5826,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5757,7 +5834,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Resource identifier for the MethodResponse resource.

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

The Resource identifier for the MethodResponse resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5765,7 +5842,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The HTTP verb of the Method resource.

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

The HTTP verb of the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5773,14 +5850,14 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

[Required] The status code for the MethodResponse resource.

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

The status code for the MethodResponse resource.

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

Request to describe a MethodResponse resource.

" + "smithy.api#documentation": "

Request to describe a MethodResponse resource.

" } }, "com.amazonaws.apigateway#GetModel": { @@ -5806,7 +5883,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes an existing model defined for a RestApi resource.

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

Describes an existing model defined for a RestApi resource.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/models/{modelName}", @@ -5820,7 +5897,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The RestApi identifier under which the Model exists.

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

The RestApi identifier under which the Model exists.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5828,7 +5905,7 @@ "modelName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the model as an identifier.

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

The name of the model as an identifier.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5842,7 +5919,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request to list information about a model in an existing RestApi resource.

" + "smithy.api#documentation": "

Request to list information about a model in an existing RestApi resource.

" } }, "com.amazonaws.apigateway#GetModelTemplate": { @@ -5882,7 +5959,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5890,7 +5967,7 @@ "modelName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the model for which to generate a template.

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

The name of the model for which to generate a template.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5923,7 +6000,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes existing Models defined for a RestApi resource.

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

Describes existing Models defined for a RestApi resource.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/models", @@ -5943,7 +6020,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5964,7 +6041,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request to list existing Models defined for a RestApi resource.

" + "smithy.api#documentation": "

Request to list existing Models defined for a RestApi resource.

" } }, "com.amazonaws.apigateway#GetRequestValidator": { @@ -5990,7 +6067,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a RequestValidator of a given RestApi.

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

Gets a RequestValidator of a given RestApi.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/requestvalidators/{requestValidatorId}", @@ -6004,7 +6081,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6012,14 +6089,14 @@ "requestValidatorId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the RequestValidator to be retrieved.

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

The identifier of the RequestValidator to be retrieved.

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

Gets a RequestValidator of a given RestApi.

" + "smithy.api#documentation": "

Gets a RequestValidator of a given RestApi.

" } }, "com.amazonaws.apigateway#GetRequestValidators": { @@ -6045,7 +6122,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the RequestValidators collection of a given RestApi.

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

Gets the RequestValidators collection of a given RestApi.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/requestvalidators", @@ -6059,7 +6136,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6080,7 +6157,7 @@ } }, "traits": { - "smithy.api#documentation": "

Gets the RequestValidators collection of a given RestApi.

" + "smithy.api#documentation": "

Gets the RequestValidators collection of a given RestApi.

" } }, "com.amazonaws.apigateway#GetResource": { @@ -6117,7 +6194,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6125,7 +6202,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier for the Resource resource.

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

The identifier for the Resource resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6133,7 +6210,7 @@ "embed": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A query parameter to retrieve the specified resources embedded in the returned Resource representation in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the \"methods\" string. For example, GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods.

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

A query parameter to retrieve the specified resources embedded in the returned Resource representation in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the \"methods\" string. For example, GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods.

", "smithy.api#httpQuery": "embed" } } @@ -6165,7 +6242,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists information about a collection of Resource resources.

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

Lists information about a collection of Resource resources.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/resources", @@ -6185,7 +6262,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6207,7 +6284,7 @@ "embed": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A query parameter used to retrieve the specified resources embedded in the returned Resources resource in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the \"methods\" string. For example, GET /restapis/{restapi_id}/resources?embed=methods.

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

A query parameter used to retrieve the specified resources embedded in the returned Resources resource in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the \"methods\" string. For example, GET /restapis/{restapi_id}/resources?embed=methods.

", "smithy.api#httpQuery": "embed" } } @@ -6239,7 +6316,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the RestApi resource in the collection.

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

Lists the RestApi resource in the collection.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}", @@ -6253,14 +6330,14 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

The GET request to list an existing RestApi defined for your collection.

" + "smithy.api#documentation": "

The GET request to list an existing RestApi defined for your collection.

" } }, "com.amazonaws.apigateway#GetRestApis": { @@ -6286,7 +6363,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the RestApis resources for your collection.

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

Lists the RestApis resources for your collection.

", "smithy.api#http": { "method": "GET", "uri": "/restapis", @@ -6319,7 +6396,7 @@ } }, "traits": { - "smithy.api#documentation": "

The GET request to list existing RestApis defined for your collection.

" + "smithy.api#documentation": "

The GET request to list existing RestApis defined for your collection.

" } }, "com.amazonaws.apigateway#GetSdk": { @@ -6351,7 +6428,7 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a client SDK for a RestApi and Stage.

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

Generates a client SDK for a RestApi and Stage.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/stages/{stageName}/sdks/{sdkType}", @@ -6365,7 +6442,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6373,7 +6450,7 @@ "stageName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the Stage that the SDK will use.

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

The name of the Stage that the SDK will use.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6381,7 +6458,7 @@ "sdkType": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The language for the generated SDK. Currently java, javascript, android, objectivec (for iOS), swift (for iOS), and ruby are supported.

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

The language for the generated SDK. Currently java, javascript, android, objectivec (for iOS), swift (for iOS), and ruby are supported.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6395,7 +6472,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request a new generated client SDK for a RestApi and Stage.

" + "smithy.api#documentation": "

Request a new generated client SDK for a RestApi and Stage.

" } }, "com.amazonaws.apigateway#GetSdkType": { @@ -6421,6 +6498,7 @@ } ], "traits": { + "smithy.api#documentation": "

Gets an SDK type.

", "smithy.api#http": { "method": "GET", "uri": "/sdktypes/{id}", @@ -6434,14 +6512,14 @@ "id": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the queried SdkType instance.

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

The identifier of the queried SdkType instance.

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

Get an SdkType instance.

" + "smithy.api#documentation": "

Get an SdkType instance.

" } }, "com.amazonaws.apigateway#GetSdkTypes": { @@ -6467,6 +6545,7 @@ } ], "traits": { + "smithy.api#documentation": "

Gets SDK types

", "smithy.api#http": { "method": "GET", "uri": "/sdktypes", @@ -6493,7 +6572,7 @@ } }, "traits": { - "smithy.api#documentation": "

Get the SdkTypes collection.

" + "smithy.api#documentation": "

Get the SdkTypes collection.

" } }, "com.amazonaws.apigateway#GetStage": { @@ -6525,7 +6604,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a Stage resource.

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

Gets information about a Stage resource.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/stages/{stageName}", @@ -6539,7 +6618,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6547,14 +6626,14 @@ "stageName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the Stage resource to get information about.

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

The name of the Stage resource to get information about.

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

Requests API Gateway to get information about a Stage resource.

" + "smithy.api#documentation": "

Requests API Gateway to get information about a Stage resource.

" } }, "com.amazonaws.apigateway#GetStages": { @@ -6586,7 +6665,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about one or more Stage resources.

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

Gets information about one or more Stage resources.

", "smithy.api#http": { "method": "GET", "uri": "/restapis/{restApiId}/stages", @@ -6600,7 +6679,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6614,7 +6693,7 @@ } }, "traits": { - "smithy.api#documentation": "

Requests API Gateway to get information about one or more Stage resources.

" + "smithy.api#documentation": "

Requests API Gateway to get information about one or more Stage resources.

" } }, "com.amazonaws.apigateway#GetTags": { @@ -6640,7 +6719,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the Tags collection for a given resource.

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

Gets the Tags collection for a given resource.

", "smithy.api#http": { "method": "GET", "uri": "/tags/{resourceArn}", @@ -6654,7 +6733,7 @@ "resourceArn": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The ARN of a resource that can be tagged.

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

The ARN of a resource that can be tagged.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6675,7 +6754,7 @@ } }, "traits": { - "smithy.api#documentation": "

Gets the Tags collection for a given resource.

" + "smithy.api#documentation": "

Gets the Tags collection for a given resource.

" } }, "com.amazonaws.apigateway#GetUsage": { @@ -6783,7 +6862,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.

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

The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6791,7 +6870,7 @@ "keyId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The key Id of the to-be-retrieved UsagePlanKey resource representing a plan customer.

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

The key Id of the to-be-retrieved UsagePlanKey resource representing a plan customer.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6844,7 +6923,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.

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

The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6881,7 +6960,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the UsagePlan resource to be retrieved.

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

The identifier of the UsagePlan resource to be retrieved.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6963,7 +7042,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the usage plan associated with the usage data.

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

The Id of the usage plan associated with the usage data.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6978,7 +7057,7 @@ "startDate": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The starting date (e.g., 2016-01-01) of the usage data.

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

The starting date (e.g., 2016-01-01) of the usage data.

", "smithy.api#httpQuery": "startDate", "smithy.api#required": {} } @@ -6986,7 +7065,7 @@ "endDate": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The ending date (e.g., 2016-12-31) of the usage data.

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

The ending date (e.g., 2016-12-31) of the usage data.

", "smithy.api#httpQuery": "endDate", "smithy.api#required": {} } @@ -7047,7 +7126,7 @@ "vpcLinkId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the VpcLink. It is used in an Integration to reference this VpcLink.

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

The identifier of the VpcLink. It is used in an Integration to reference this VpcLink.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7080,7 +7159,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the VpcLinks collection under the caller's account in a selected region.

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

Gets the VpcLinks collection under the caller's account in a selected region.

", "smithy.api#http": { "method": "GET", "uri": "/vpclinks", @@ -7113,7 +7192,7 @@ } }, "traits": { - "smithy.api#documentation": "

Gets the VpcLinks collection under the caller's account in a selected region.

" + "smithy.api#documentation": "

Gets the VpcLinks collection under the caller's account in a selected region.

" } }, "com.amazonaws.apigateway#ImportApiKeys": { @@ -7159,7 +7238,7 @@ "body": { "target": "com.amazonaws.apigateway#Blob", "traits": { - "smithy.api#documentation": "

The payload of the POST request to import API keys. For the payload format, see API Key File Format.

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

The payload of the POST request to import API keys. For the payload format, see API Key File Format.

", "smithy.api#httpPayload": {}, "smithy.api#required": {} } @@ -7175,7 +7254,7 @@ "failOnWarnings": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

A query parameter to indicate whether to rollback ApiKey importation (true) or not (false) when error is encountered.

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

A query parameter to indicate whether to rollback ApiKey importation (true) or not (false) when error is encountered.

", "smithy.api#httpQuery": "failonwarnings" } } @@ -7213,6 +7292,7 @@ } ], "traits": { + "smithy.api#documentation": "

Imports documentation parts

", "smithy.api#http": { "method": "PUT", "uri": "/restapis/{restApiId}/documentation/parts", @@ -7226,7 +7306,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7234,7 +7314,7 @@ "mode": { "target": "com.amazonaws.apigateway#PutMode", "traits": { - "smithy.api#documentation": "

A query parameter to indicate whether to overwrite (OVERWRITE) any existing DocumentationParts definition or to merge (MERGE) the new definition into the existing one. The default value is MERGE.

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

A query parameter to indicate whether to overwrite (OVERWRITE) any existing DocumentationParts definition or to merge (MERGE) the new definition into the existing one. The default value is MERGE.

", "smithy.api#httpQuery": "mode" } }, @@ -7248,7 +7328,7 @@ "body": { "target": "com.amazonaws.apigateway#Blob", "traits": { - "smithy.api#documentation": "

[Required] Raw byte array representing the to-be-imported documentation parts. To import from an OpenAPI file, this is a JSON object.

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

Raw byte array representing the to-be-imported documentation parts. To import from an OpenAPI file, this is a JSON object.

", "smithy.api#httpPayload": {}, "smithy.api#required": {} } @@ -7308,14 +7388,14 @@ "parameters": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

A key-value map of context-specific query string parameters specifying the behavior of different API importing operations. The following shows operation-specific parameters and their supported values.

\n

To exclude DocumentationParts from the import, set parameters as ignore=documentation.

\n

To configure the endpoint type, set parameters as endpointConfigurationTypes=EDGE, endpointConfigurationTypes=REGIONAL, or endpointConfigurationTypes=PRIVATE. The default endpoint type is EDGE.

\n

To handle imported basepath, set parameters as basepath=ignore, basepath=prepend or basepath=split.

\n

For example, the AWS CLI command to exclude documentation from the imported API is:

\n
aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'
\n

The AWS CLI command to set the regional endpoint on the imported API is:

\n
aws apigateway import-rest-api --parameters endpointConfigurationTypes=REGIONAL --body 'file:///path/to/imported-api-body.json'
", + "smithy.api#documentation": "

A key-value map of context-specific query string parameters specifying the behavior of different API importing operations. The following shows operation-specific parameters and their supported values.

\n

To exclude DocumentationParts from the import, set parameters as ignore=documentation.

\n

To configure the endpoint type, set parameters as endpointConfigurationTypes=EDGE, endpointConfigurationTypes=REGIONAL, or endpointConfigurationTypes=PRIVATE. The default endpoint type is EDGE.

\n

To handle imported basepath, set parameters as basepath=ignore, basepath=prepend or basepath=split.

\n

For example, the AWS CLI command to exclude documentation from the imported API is:

\n

The AWS CLI command to set the regional endpoint on the imported API is:

", "smithy.api#httpQueryParams": {} } }, "body": { "target": "com.amazonaws.apigateway#Blob", "traits": { - "smithy.api#documentation": "

[Required] The POST request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 6MB.

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

The POST request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 6MB.

", "smithy.api#httpPayload": {}, "smithy.api#required": {} } @@ -7334,7 +7414,7 @@ "type": { "target": "com.amazonaws.apigateway#IntegrationType", "traits": { - "smithy.api#documentation": "

Specifies an API method integration type. The valid value is one of the following:

\n
    \n
  • AWS: for integrating the API method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.
  • \n
  • AWS_PROXY: for integrating the API method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as the Lambda proxy integration.
  • \n
  • HTTP: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC. This integration is also referred to as the HTTP custom integration.
  • \n
  • HTTP_PROXY: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is. This is also referred to as the HTTP proxy integration.
  • \n
  • MOCK: for integrating the API method request with API Gateway as a \"loop-back\" endpoint without invoking any backend.
  • \n
\n

For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a connectionType of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

" + "smithy.api#documentation": "

Specifies an API method integration type. The valid value is one of the following:

\n \n

For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a connectionType of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

" } }, "httpMethod": { @@ -7346,7 +7426,7 @@ "uri": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

\n
    \n
  • For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing.

    \n
  • \n
  • For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}

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

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

\n

For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL\n according to the RFC-3986 specification, for either standard integration, where connectionType\n is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP\n integration, the URI is not used for routing. For AWS or AWS_PROXY integrations, the URI is of\n the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}.\n Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the\n integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by\n certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service\n action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing\n {service_api} refers to a supported action {name} plus any required input parameters.\n Alternatively, path can be used for an AWS service path-based API. The ensuing service_api\n refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services \n service, if applicable. For example, for integration with the S3 API of GetObject, the uri can\n be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or\n arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}\n

" } }, "connectionType": { @@ -7358,7 +7438,7 @@ "connectionId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

" + "smithy.api#documentation": "

The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

" } }, "credentials": { @@ -7382,13 +7462,13 @@ "passthroughBehavior": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "
\n

\n Specifies how the method request body of an unmapped content type will be passed through the integration request\n to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration\n or the content type does not match any of the mapped content types, as specified in requestTemplates.\n The valid value is one of the following:\n

\n
    \n
  • \n WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation\n when the method request content type does not match any content type associated with the mapping templates defined in the integration request.\n
  • \n
  • \n WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation\n when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request\n of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.\n
  • \n
  • \n NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method\n request content type does not match any content type associated with the mapping templates defined in the integration request or\n no mapping template is defined in the integration request.\n
  • \n
\n
" + "smithy.api#documentation": "

Specifies how the method request body of an unmapped content type will be passed through\n the integration request to the back end without transformation. A content type is unmapped if\n no mapping template is defined in the integration or the content type does not match any of\n the mapped content types, as specified in requestTemplates. The valid value is one of the\n following: WHEN_NO_MATCH: passes the method request body through the integration request to\n the back end without transformation when the method request content type does not match any\n content type associated with the mapping templates defined in the integration request.\n WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back\n end without transformation when no mapping template is defined in the integration request. If\n a template is defined when this option is selected, the method request of an unmapped\n content-type will be rejected with an HTTP 415 Unsupported Media Type response. NEVER: rejects\n the method request with an HTTP 415 Unsupported Media Type response when either the method\n request content type does not match any content type associated with the mapping templates\n defined in the integration request or no mapping template is defined in the integration\n request.

" } }, "contentHandling": { "target": "com.amazonaws.apigateway#ContentHandlingStrategy", "traits": { - "smithy.api#documentation": "

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

\n
    \n
  • CONVERT_TO_BINARY: Converts a request payload from a Base64-encoded string to the corresponding binary blob.

  • \n
  • CONVERT_TO_TEXT: Converts a request payload from a binary blob to a Base64-encoded string.

  • \n
\n

If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehavior is configured to support payload pass-through.

" + "smithy.api#documentation": "

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

\n \n

If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehavior is configured to support payload pass-through.

" } }, "timeoutInMillis": { @@ -7406,13 +7486,13 @@ "cacheKeyParameters": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters, these parameters must also be specified for Method requestParameters.

" + "smithy.api#documentation": "

A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters, these parameters must also be specified for Method requestParameters.

" } }, "integrationResponses": { "target": "com.amazonaws.apigateway#MapOfIntegrationResponse", "traits": { - "smithy.api#documentation": "

Specifies the integration's responses.

\n
\n

\n

Example: Get integration responses of a method

\n
Request
\n

\n
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1\nContent-Type: application/json\nHost: apigateway.us-east-1.amazonaws.com\nX-Amz-Date: 20160607T191449Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}\n
\n
Response
\n

The successful response returns 200 OK status and a payload as follows:

\n
{\n  \"_links\": {\n    \"curies\": {\n      \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html\",\n      \"name\": \"integrationresponse\",\n      \"templated\": true\n    },\n    \"self\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\",\n      \"title\": \"200\"\n    },\n    \"integrationresponse:delete\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\"\n    },\n    \"integrationresponse:update\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\"\n    }\n  },\n  \"responseParameters\": {\n    \"method.response.header.Content-Type\": \"'application/xml'\"\n  },\n  \"responseTemplates\": {\n    \"application/json\": \"$util.urlDecode(\\\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\\\")\\n\"\n  },\n  \"statusCode\": \"200\"\n}
\n

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

Specifies the integration's responses.

" } }, "tlsConfig": { @@ -7423,7 +7503,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents an HTTP, HTTP_PROXY, AWS, AWS_PROXY, or Mock integration.

\n
In the API Gateway console, the built-in Lambda integration is an AWS integration.
\n " + "smithy.api#documentation": "

Represents an HTTP, HTTP_PROXY, AWS, AWS_PROXY, or Mock integration.

" } }, "com.amazonaws.apigateway#IntegrationResponse": { @@ -7432,7 +7512,7 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

Specifies the status code that is used to map the integration response to an existing MethodResponse.

" + "smithy.api#documentation": "

Specifies the status code that is used to map the integration response to an existing MethodResponse.

" } }, "selectionPattern": { @@ -7456,12 +7536,12 @@ "contentHandling": { "target": "com.amazonaws.apigateway#ContentHandlingStrategy", "traits": { - "smithy.api#documentation": "

Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

\n
    \n
  • CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

  • \n
  • CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

  • \n
\n

If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.

" + "smithy.api#documentation": "

Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

\n \n

If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.

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

Represents an integration response. The status code must map to an existing MethodResponse, and parameters and templates can be used to transform the back-end response.

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

Represents an integration response. The status code must map to an existing MethodResponse, and parameters and templates can be used to transform the back-end response.

" } }, "com.amazonaws.apigateway#IntegrationType": { @@ -7601,7 +7681,7 @@ "target": "com.amazonaws.apigateway#PatchOperation" }, "traits": { - "smithy.api#documentation": "A list of operations describing the updates to apply to the specified resource. The patches are applied\n in the order specified in the list." + "smithy.api#documentation": "

A list of operations describing the updates to apply to the specified resource. The patches are applied\n in the order specified in the list.

" } }, "com.amazonaws.apigateway#ListOfRequestValidator": { @@ -7802,19 +7882,19 @@ "authorizerId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

" + "smithy.api#documentation": "

The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

" } }, "apiKeyRequired": { "target": "com.amazonaws.apigateway#NullableBoolean", "traits": { - "smithy.api#documentation": "

A boolean flag specifying whether a valid ApiKey is required to invoke this method.

" + "smithy.api#documentation": "

A boolean flag specifying whether a valid ApiKey is required to invoke this method.

" } }, "requestValidatorId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identifier of a RequestValidator for request validation.

" + "smithy.api#documentation": "

The identifier of a RequestValidator for request validation.

" } }, "operationName": { @@ -7826,25 +7906,25 @@ "requestParameters": { "target": "com.amazonaws.apigateway#MapOfStringToBoolean", "traits": { - "smithy.api#documentation": "

A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

" + "smithy.api#documentation": "

A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

" } }, "requestModels": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

" + "smithy.api#documentation": "

A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

" } }, "methodResponses": { "target": "com.amazonaws.apigateway#MapOfMethodResponse", "traits": { - "smithy.api#documentation": "

Gets a method response associated with a given HTTP status code.

\n
\n

The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.

\n

Example: Get a 200 OK response of a GET method

\n
Request
\n

\n
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1\nContent-Type: application/json\nHost: apigateway.us-east-1.amazonaws.com\nContent-Length: 117\nX-Amz-Date: 20160613T215008Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
\n
Response
\n

The successful response returns a 200 OK status code and a payload similar to the following:

\n
{\n  \"_links\": {\n    \"curies\": {\n      \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html\",\n      \"name\": \"methodresponse\",\n      \"templated\": true\n    },\n    \"self\": {\n      \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200\",\n      \"title\": \"200\"\n    },\n    \"methodresponse:delete\": {\n      \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200\"\n    },\n    \"methodresponse:update\": {\n      \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200\"\n    }\n  },\n  \"responseModels\": {\n    \"application/json\": \"Empty\"\n  },\n  \"responseParameters\": {\n    \"method.response.header.operator\": false,\n    \"method.response.header.operand_2\": false,\n    \"method.response.header.operand_1\": false\n  },\n  \"statusCode\": \"200\"\n}
\n

\n
\n
\n AWS CLI\n
" + "smithy.api#documentation": "

Gets a method response associated with a given HTTP status code.

" } }, "methodIntegration": { "target": "com.amazonaws.apigateway#Integration", "traits": { - "smithy.api#documentation": "

Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

\n
\n

\n

Example:

\n
Request
\n

\n
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1\nContent-Type: application/json\nHost: apigateway.us-east-1.amazonaws.com\nContent-Length: 117\nX-Amz-Date: 20160613T213210Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
\n
Response
\n

The successful response returns a 200 OK status code and a payload similar to the following:

\n
{\n  \"_links\": {\n    \"curies\": [\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html\",\n        \"name\": \"integration\",\n        \"templated\": true\n      },\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html\",\n        \"name\": \"integrationresponse\",\n        \"templated\": true\n      }\n    ],\n    \"self\": {\n      \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration\"\n    },\n    \"integration:delete\": {\n      \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration\"\n    },\n    \"integration:responses\": {\n      \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200\",\n      \"name\": \"200\",\n      \"title\": \"200\"\n    },\n    \"integration:update\": {\n      \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration\"\n    },\n    \"integrationresponse:put\": {\n      \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}\",\n      \"templated\": true\n    }\n  },\n  \"cacheKeyParameters\": [],\n  \"cacheNamespace\": \"0cjtch\",\n  \"credentials\": \"arn:aws:iam::123456789012:role/apigAwsProxyRole\",\n  \"httpMethod\": \"POST\",\n  \"passthroughBehavior\": \"WHEN_NO_MATCH\",\n  \"requestTemplates\": {\n    \"application/json\": \"{\\n    \\\"a\\\":  \\\"$input.params('operand1')\\\",\\n    \\\"b\\\":  \\\"$input.params('operand2')\\\", \\n    \\\"op\\\": \\\"$input.params('operator')\\\"   \\n}\"\n  },\n  \"type\": \"AWS\",\n  \"uri\": \"arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations\",\n  \"_embedded\": {\n    \"integration:responses\": {\n      \"_links\": {\n        \"self\": {\n          \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200\",\n          \"name\": \"200\",\n          \"title\": \"200\"\n        },\n        \"integrationresponse:delete\": {\n          \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200\"\n        },\n        \"integrationresponse:update\": {\n          \"href\": \"/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200\"\n        }\n      },\n      \"responseParameters\": {\n        \"method.response.header.operator\": \"integration.response.body.op\",\n        \"method.response.header.operand_2\": \"integration.response.body.b\",\n        \"method.response.header.operand_1\": \"integration.response.body.a\"\n      },\n      \"responseTemplates\": {\n        \"application/json\": \"#set($res = $input.path('$'))\\n{\\n    \\\"result\\\": \\\"$res.a, $res.b, $res.op => $res.c\\\",\\n  \\\"a\\\" : \\\"$res.a\\\",\\n  \\\"b\\\" : \\\"$res.b\\\",\\n  \\\"op\\\" : \\\"$res.op\\\",\\n  \\\"c\\\" : \\\"$res.c\\\"\\n}\"\n      },\n      \"selectionPattern\": \"\",\n      \"statusCode\": \"200\"\n    }\n  }\n}
\n

\n
\n
\n AWS CLI\n
" + "smithy.api#documentation": "

Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

" } }, "authorizationScopes": { @@ -7855,7 +7935,7 @@ } }, "traits": { - "smithy.api#documentation": "

\n Represents a client-facing interface by which the client calls the API to access back-end resources. A Method resource is\n integrated with an Integration resource. Both consist of a request and one or more responses. The method request takes\n the client input that is passed to the back end through the integration request. A method response returns the output from\n the back end to the client through an integration response. A method request is embodied in a Method resource, whereas\n an integration request is embodied in an Integration resource. On the other hand, a method response is represented\n by a MethodResponse resource, whereas an integration response is represented by an IntegrationResponse resource.\n

\n
\n

\n

Example: Retrive the GET method on a specified resource

\n
Request
\n

The following example request retrieves the information about the GET method on an API resource (3kzxbg5sa2) of an API (fugvjdxtri).

\n
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1\nContent-Type: application/json\nHost: apigateway.us-east-1.amazonaws.com\nX-Amz-Date: 20160603T210259Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
\n
Response
\n

The successful response returns a 200 OK status code and a payload similar to the following:

\n
{\n  \"_links\": {\n    \"curies\": [\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html\",\n        \"name\": \"integration\",\n        \"templated\": true\n      },\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html\",\n        \"name\": \"integrationresponse\",\n        \"templated\": true\n      },\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html\",\n        \"name\": \"method\",\n        \"templated\": true\n      },\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html\",\n        \"name\": \"methodresponse\",\n        \"templated\": true\n      }\n    ],\n    \"self\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET\",\n      \"name\": \"GET\",\n      \"title\": \"GET\"\n    },\n    \"integration:put\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n    },\n    \"method:delete\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET\"\n    },\n    \"method:integration\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n    },\n    \"method:responses\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\",\n      \"name\": \"200\",\n      \"title\": \"200\"\n    },\n    \"method:update\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET\"\n    },\n    \"methodresponse:put\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}\",\n      \"templated\": true\n    }\n  },\n  \"apiKeyRequired\": true,\n  \"authorizationType\": \"NONE\",\n  \"httpMethod\": \"GET\",\n  \"_embedded\": {\n    \"method:integration\": {\n      \"_links\": {\n        \"self\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n        },\n        \"integration:delete\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n        },\n        \"integration:responses\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\",\n          \"name\": \"200\",\n          \"title\": \"200\"\n        },\n        \"integration:update\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n        },\n        \"integrationresponse:put\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}\",\n          \"templated\": true\n        }\n      },\n      \"cacheKeyParameters\": [],\n      \"cacheNamespace\": \"3kzxbg5sa2\",\n      \"credentials\": \"arn:aws:iam::123456789012:role/apigAwsProxyRole\",\n      \"httpMethod\": \"POST\",\n      \"passthroughBehavior\": \"WHEN_NO_MATCH\",\n      \"requestParameters\": {\n        \"integration.request.header.Content-Type\": \"'application/x-amz-json-1.1'\"\n      },\n      \"requestTemplates\": {\n        \"application/json\": \"{\\n}\"\n      },\n      \"type\": \"AWS\",\n      \"uri\": \"arn:aws:apigateway:us-east-1:kinesis:action/ListStreams\",\n      \"_embedded\": {\n        \"integration:responses\": {\n          \"_links\": {\n            \"self\": {\n              \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\",\n              \"name\": \"200\",\n              \"title\": \"200\"\n            },\n            \"integrationresponse:delete\": {\n              \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\"\n            },\n            \"integrationresponse:update\": {\n              \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\"\n            }\n          },\n          \"responseParameters\": {\n            \"method.response.header.Content-Type\": \"'application/xml'\"\n          },\n          \"responseTemplates\": {\n            \"application/json\": \"$util.urlDecode(\\\"%3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E\\\")\"\n          },\n          \"statusCode\": \"200\"\n        }\n      }\n    },\n    \"method:responses\": {\n      \"_links\": {\n        \"self\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\",\n          \"name\": \"200\",\n          \"title\": \"200\"\n        },\n        \"methodresponse:delete\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\"\n        },\n        \"methodresponse:update\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\"\n        }\n      },\n      \"responseModels\": {\n        \"application/json\": \"Empty\"\n      },\n      \"responseParameters\": {\n        \"method.response.header.Content-Type\": false\n      },\n      \"statusCode\": \"200\"\n    }\n  }\n}
\n

In the example above, the response template for the 200 OK response maps the JSON output from the ListStreams action in the back end to an XML output. The mapping template is URL-encoded as %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E and the output is decoded using the $util.urlDecode() helper function.

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

\n Represents a client-facing interface by which the client calls the API to access back-end resources. A Method resource is\n integrated with an Integration resource. Both consist of a request and one or more responses. The method request takes\n the client input that is passed to the back end through the integration request. A method response returns the output from\n the back end to the client through an integration response. A method request is embodied in a Method resource, whereas\n an integration request is embodied in an Integration resource. On the other hand, a method response is represented\n by a MethodResponse resource, whereas an integration response is represented by an IntegrationResponse resource.\n

" } }, "com.amazonaws.apigateway#MethodResponse": { @@ -7870,18 +7950,18 @@ "responseParameters": { "target": "com.amazonaws.apigateway#MapOfStringToBoolean", "traits": { - "smithy.api#documentation": "

A key-value map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

" + "smithy.api#documentation": "

A key-value map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

" } }, "responseModels": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

" + "smithy.api#documentation": "

Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

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

Represents a method response of a given HTTP status code returned to the client. The method response is passed from the back end through the associated integration response that can be transformed using a mapping template.

\n
\n

\n

Example: A MethodResponse instance of an API

\n
Request
\n

The example request retrieves a MethodResponse of the 200 status code.

\n
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200 HTTP/1.1\nContent-Type: application/json\nHost: apigateway.us-east-1.amazonaws.com\nX-Amz-Date: 20160603T222952Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
\n
Response
\n

The successful response returns 200 OK status and a payload as follows:

\n
{\n  \"_links\": {\n    \"curies\": {\n      \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html\",\n      \"name\": \"methodresponse\",\n      \"templated\": true\n    },\n    \"self\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\",\n      \"title\": \"200\"\n    },\n    \"methodresponse:delete\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\"\n    },\n    \"methodresponse:update\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\"\n    }\n  },\n  \"responseModels\": {\n    \"application/json\": \"Empty\"\n  },\n  \"responseParameters\": {\n    \"method.response.header.Content-Type\": false\n  },\n  \"statusCode\": \"200\"\n}
\n

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

Represents a method response of a given HTTP status code returned to the client. The method response is passed from the back end through the associated integration response that can be transformed using a mapping template.

" } }, "com.amazonaws.apigateway#MethodSetting": { @@ -7902,7 +7982,7 @@ "dataTraceEnabled": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether full requests and responses are logged for this method, which affects the log entries pushed to Amazon CloudWatch Logs. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this option for production APIs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

" + "smithy.api#documentation": "

Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

" } }, "throttlingBurstLimit": { @@ -7964,12 +8044,12 @@ "apiKeyRequired": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the method requires a valid ApiKey.

" + "smithy.api#documentation": "

Specifies whether the method requires a valid ApiKey.

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

Represents a summary of a Method resource, given a particular date and time.

" + "smithy.api#documentation": "

Represents a summary of a Method resource, given a particular date and time.

" } }, "com.amazonaws.apigateway#Model": { @@ -7996,7 +8076,7 @@ "schema": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The schema for the model. For application/json models, this should be JSON schema draft 4 model. Do not include \"\\*/\" characters in the description of any properties because such \"\\*/\" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.

" + "smithy.api#documentation": "

The schema for the model. For application/json models, this should be JSON schema draft 4 model. Do not include \"\\*/\" characters in the description of any properties because such \"\\*/\" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.

" } }, "contentType": { @@ -8007,7 +8087,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the data structure of a method's request or response payload.

\n
\n

A request model defines the data structure of the client-supplied request payload. A response model defines the data structure of the response payload returned by the back end. Although not required, models are useful for mapping payloads between the front end and back end.

\n

A model is used for generating an API's SDK, validating the input request body, and creating a skeletal mapping template.

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

Represents the data structure of a method's request or response payload.

" } }, "com.amazonaws.apigateway#Models": { @@ -8029,7 +8109,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection of Model resources.

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

Represents a collection of Model resources.

" } }, "com.amazonaws.apigateway#MutualTlsAuthentication": { @@ -8038,24 +8118,24 @@ "truststoreUri": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

An Amazon S3 URL that specifies the truststore for mutual TLS authentication,\n for example s3://bucket-name/key-name.\n The truststore can contain certificates from public or private certificate authorities.\n To update the truststore, upload a new version to S3, and then update your custom domain\n name to use the new version. To update the truststore, you must have permissions to\n access the S3 object.

" + "smithy.api#documentation": "

An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example\n s3://bucket-name/key-name. The truststore can contain certificates from public or private\n certificate authorities. To update the truststore, upload a new version to S3, and then update\n your custom domain name to use the new version. To update the truststore, you must have\n permissions to access the S3 object.

" } }, "truststoreVersion": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The version of the S3 object that contains your truststore. To\n specify a version, you must have versioning enabled for the S3 bucket.

" + "smithy.api#documentation": "

The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.

" } }, "truststoreWarnings": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A list of warnings that API Gateway returns while processing your truststore. Invalid\n certificates produce warnings. Mutual TLS is still enabled, but some clients might not\n be able to access your API. To resolve warnings, upload a new truststore to S3, and then\n update you domain name to use the new version.

" + "smithy.api#documentation": "

A list of warnings that API Gateway returns while processing your truststore. Invalid\n certificates produce warnings. Mutual TLS is still enabled, but some clients might not be able\n to access your API. To resolve warnings, upload a new truststore to S3, and then update you\n domain name to use the new version.

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

If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your custom domain name.

" + "smithy.api#documentation": "

The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway\n performs two-way authentication between the client and the server. Clients must present a\n trusted certificate to access your API.

" } }, "com.amazonaws.apigateway#MutualTlsAuthenticationInput": { @@ -8064,18 +8144,18 @@ "truststoreUri": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

An Amazon S3 resource ARN that specifies the truststore for mutual TLS authentication,\n for example,\n s3://bucket-name/key-name.\n The truststore can contain certificates from public or private certificate authorities.\n To update the truststore, upload a new version to S3, and then update your custom domain\n name to use the new version. To update the truststore, you must have permissions to\n access the S3 object.

" + "smithy.api#documentation": "

An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example\n s3://bucket-name/key-name. The truststore can contain certificates from public or private\n certificate authorities. To update the truststore, upload a new version to S3, and then update\n your custom domain name to use the new version. To update the truststore, you must have\n permissions to access the S3 object.

" } }, "truststoreVersion": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The version of the S3 object that contains your truststore. To\n specify a version, you must have versioning enabled for the S3 bucket.

" + "smithy.api#documentation": "

The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket

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

If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your custom domain name.

" + "smithy.api#documentation": "

The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway\n performs two-way authentication between the client and the server. Clients must present a\n trusted certificate to access your API.

" } }, "com.amazonaws.apigateway#NotFoundException": { @@ -8140,30 +8220,30 @@ "op": { "target": "com.amazonaws.apigateway#Op", "traits": { - "smithy.api#documentation": "

An update operation to be performed with this PATCH request. The valid value can be add, remove, replace or copy. Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

" + "smithy.api#documentation": "

An update operation to be performed with this PATCH request. The valid value can be\n add, remove, replace or copy. Not all valid operations are supported for a given\n resource. Support of the operations depends on specific operational contexts. Attempts\n to apply an unsupported operation on a resource will return an error message..

" } }, "path": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {\"name\":\"value\"}, the path for this property is /name. If the name property value is a JSON object (e.g., {\"name\": {\"child/name\": \"child-value\"}}), the path for the child/name property will be /name/child~1name. Any slash (\"/\") character appearing in path names must be escaped with \"~1\", as shown in the example above. Each op operation can have only one path associated with it.

" + "smithy.api#documentation": "

The op operation's target, as identified by a JSON Pointer value that references a\n location within the targeted resource. For example, if the target resource has an\n updateable property of {\"name\":\"value\"}, the path for this property is /name. If the\n name property value is a JSON object (e.g., {\"name\": {\"child/name\": \"child-value\"}}),\n the path for the child/name property will be /name/child~1name. Any slash (\"/\")\n character appearing in path names must be escaped with \"~1\", as shown in the example\n above. Each op operation can have only one path associated with it.

" } }, "value": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The new target value of the update operation. It is applicable for the add or replace operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '{\"a\": ...}'. In a Windows shell, see Using JSON for Parameters.

" + "smithy.api#documentation": "

The new target value of the update operation. It is applicable for the add or replace\n operation. When using AWS CLI to update a property of a JSON value, enclose the JSON\n object with a pair of single quotes in a Linux shell, e.g., '{\"a\": ...}'.

" } }, "from": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The copy update operation's source as identified by a JSON-Pointer value referencing the location within the targeted resource to copy the value from. For example, to promote a canary deployment, you copy the canary deployment ID to the affiliated deployment ID by calling a PATCH request on a Stage resource with \"op\":\"copy\", \"from\":\"/canarySettings/deploymentId\" and \"path\":\"/deploymentId\".

" + "smithy.api#documentation": "

The copy update operation's source as identified by a JSON-Pointer value referencing\n the location within the targeted resource to copy the value from. For example, to\n promote a canary deployment, you copy the canary deployment ID to the affiliated\n deployment ID by calling a PATCH request on a Stage resource with \"op\":\"copy\",\n \"from\":\"/canarySettings/deploymentId\" and \"path\":\"/deploymentId\".

" } } }, "traits": { - "smithy.api#documentation": "A single patch operation to apply to the specified resource. Please refer to\n http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used." + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

" } }, "com.amazonaws.apigateway#PathToMapOfMethodSnapshot": { @@ -8207,7 +8287,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.

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

Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.

", "smithy.api#http": { "method": "PUT", "uri": "/restapis/{restApiId}/gatewayresponses/{responseType}", @@ -8221,7 +8301,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8229,7 +8309,7 @@ "responseType": { "target": "com.amazonaws.apigateway#GatewayResponseType", "traits": { - "smithy.api#documentation": "

[Required]

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8237,24 +8317,24 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "The HTTP status code of the GatewayResponse." + "smithy.api#documentation": "

The HTTP status code of the GatewayResponse.

" } }, "responseParameters": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

" + "smithy.api#documentation": "

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

" } }, "responseTemplates": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

" + "smithy.api#documentation": "

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

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

Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.

" + "smithy.api#documentation": "

Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.

" } }, "com.amazonaws.apigateway#PutIntegration": { @@ -8300,7 +8380,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8308,7 +8388,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a put integration request's resource ID.

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

Specifies a put integration request's resource ID.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8316,7 +8396,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a put integration request's HTTP method.

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

Specifies the HTTP method for the integration.

", "smithy.api#httpLabel": {}, "smithy.api#jsonName": "requestHttpMethod", "smithy.api#required": {} @@ -8325,21 +8405,21 @@ "type": { "target": "com.amazonaws.apigateway#IntegrationType", "traits": { - "smithy.api#documentation": "

[Required] Specifies a put integration input's type.

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

Specifies a put integration input's type.

", "smithy.api#required": {} } }, "integrationHttpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

Specifies a put integration HTTP method. When the integration type is HTTP or AWS, this field is required.

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

The HTTP method for the integration.

", "smithy.api#jsonName": "httpMethod" } }, "uri": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

\n
    \n
  • For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing.

    \n
  • \n
  • For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}

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

Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or\n HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the\n RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK,\n or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the\n URI is not used for routing. For AWS or AWS_PROXY integrations, the URI is of the form\n arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here,\n {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated\n Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services\n service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API,\n using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to\n a supported action {name} plus any required input parameters. Alternatively, path can be used\n for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services\n service resource, including the region of the integrated Amazon Web Services service, if applicable. For\n example, for integration with the S3 API of GetObject, the uri can be either\n arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or\n arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}.

" } }, "connectionType": { @@ -8351,7 +8431,7 @@ "connectionId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

" + "smithy.api#documentation": "

The ID of the VpcLink used for the integration. Specify this value only if you specify VPC_LINK as the connection type.

" } }, "credentials": { @@ -8375,7 +8455,7 @@ "passthroughBehavior": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.\n

\n
    \n
  • WHEN_NO_MATCH passes the request body for unmapped content types through to the integration back end without transformation.

  • \n
  • NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

  • \n
  • WHEN_NO_TEMPLATES allows pass-through when the integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.

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

Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.\n

" } }, "cacheNamespace": { @@ -8387,13 +8467,13 @@ "cacheKeyParameters": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters, these parameters must also be specified for Method requestParameters.

" + "smithy.api#documentation": "

A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters, these parameters must also be specified for Method requestParameters.

" } }, "contentHandling": { "target": "com.amazonaws.apigateway#ContentHandlingStrategy", "traits": { - "smithy.api#documentation": "

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

\n
    \n
  • CONVERT_TO_BINARY: Converts a request payload from a Base64-encoded string to the corresponding binary blob.

  • \n
  • CONVERT_TO_TEXT: Converts a request payload from a binary blob to a Base64-encoded string.

  • \n
\n

If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehavior is configured to support payload pass-through.

" + "smithy.api#documentation": "

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

\n \n

If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehavior is configured to support payload pass-through.

" } }, "timeoutInMillis": { @@ -8453,7 +8533,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8461,7 +8541,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a put integration response request's resource identifier.

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

Specifies a put integration response request's resource identifier.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8469,7 +8549,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a put integration response request's HTTP method.

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

Specifies a put integration response request's HTTP method.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8477,7 +8557,7 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

[Required] Specifies the status code that is used to map the integration response to an existing MethodResponse.

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

Specifies the status code that is used to map the integration response to an existing MethodResponse.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8503,7 +8583,7 @@ "contentHandling": { "target": "com.amazonaws.apigateway#ContentHandlingStrategy", "traits": { - "smithy.api#documentation": "

Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

\n
    \n
  • CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

  • \n
  • CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

  • \n
\n

If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.

" + "smithy.api#documentation": "

Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

\n \n

If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.

" } } }, @@ -8540,7 +8620,7 @@ } ], "traits": { - "smithy.api#documentation": "

Add a method to an existing Resource resource.

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

Add a method to an existing Resource resource.

", "smithy.api#http": { "method": "PUT", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}", @@ -8554,7 +8634,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8562,7 +8642,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Resource identifier for the new Method resource.

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

The Resource identifier for the new Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8570,7 +8650,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies the method request's HTTP method type.

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

Specifies the method request's HTTP method type.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8578,20 +8658,20 @@ "authorizationType": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

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

The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

", "smithy.api#required": {} } }, "authorizerId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.

" + "smithy.api#documentation": "

Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.

" } }, "apiKeyRequired": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the method required a valid ApiKey.

" + "smithy.api#documentation": "

Specifies whether the method required a valid ApiKey.

" } }, "operationName": { @@ -8603,19 +8683,19 @@ "requestParameters": { "target": "com.amazonaws.apigateway#MapOfStringToBoolean", "traits": { - "smithy.api#documentation": "

A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key defines a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or body-mapping templates.

" + "smithy.api#documentation": "

A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key defines a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or body-mapping templates.

" } }, "requestModels": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

" + "smithy.api#documentation": "

Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

" } }, "requestValidatorId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identifier of a RequestValidator for validating the method request.

" + "smithy.api#documentation": "

The identifier of a RequestValidator for validating the method request.

" } }, "authorizationScopes": { @@ -8626,7 +8706,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request to add a method to an existing Resource resource.

" + "smithy.api#documentation": "

Request to add a method to an existing Resource resource.

" } }, "com.amazonaws.apigateway#PutMethodResponse": { @@ -8658,7 +8738,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a MethodResponse to an existing Method resource.

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

Adds a MethodResponse to an existing Method resource.

", "smithy.api#http": { "method": "PUT", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}", @@ -8672,7 +8752,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8680,7 +8760,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Resource identifier for the Method resource.

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

The Resource identifier for the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8688,7 +8768,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The HTTP verb of the Method resource.

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

The HTTP verb of the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8696,7 +8776,7 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

[Required] The method response's status code.

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

The method response's status code.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8710,12 +8790,12 @@ "responseModels": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

Specifies the Model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.

" + "smithy.api#documentation": "

Specifies the Model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.

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

Request to add a MethodResponse to an existing Method resource.

" + "smithy.api#documentation": "

Request to add a MethodResponse to an existing Method resource.

" } }, "com.amazonaws.apigateway#PutMode": { @@ -8776,7 +8856,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8798,14 +8878,14 @@ "parameters": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API, set ignore=documentation as a parameters value, as in the AWS CLI command of aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'.

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

Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API, set ignore=documentation as a parameters value, as in the AWS CLI command of aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'.

", "smithy.api#httpQueryParams": {} } }, "body": { "target": "com.amazonaws.apigateway#Blob", "traits": { - "smithy.api#documentation": "

[Required] The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 6MB.

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

The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 6MB.

", "smithy.api#httpPayload": {}, "smithy.api#required": {} } @@ -8846,7 +8926,7 @@ "offset": { "target": "com.amazonaws.apigateway#Integer", "traits": { - "smithy.api#documentation": "

The day that a time period starts. For example, with a time period of WEEK, an offset of 0 starts on Sunday, and an offset of 1 starts on Monday.

" + "smithy.api#documentation": "

The number of requests subtracted from the given limit in the initial time period.

" } }, "period": { @@ -8866,19 +8946,19 @@ "id": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identifier of this RequestValidator.

" + "smithy.api#documentation": "

The identifier of this RequestValidator.

" } }, "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The name of this RequestValidator

" + "smithy.api#documentation": "

The name of this RequestValidator

" } }, "validateRequestBody": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

A Boolean flag to indicate whether to validate a request body according to the configured Model schema.

" + "smithy.api#documentation": "

A Boolean flag to indicate whether to validate a request body according to the configured Model schema.

" } }, "validateRequestParameters": { @@ -8889,7 +8969,7 @@ } }, "traits": { - "smithy.api#documentation": "

A set of validation rules for incoming Method requests.

\n
\n

In OpenAPI, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator object. It the referenced using the x-amazon-apigateway-request-validator property.

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

A set of validation rules for incoming Method requests.

" } }, "com.amazonaws.apigateway#RequestValidators": { @@ -8911,7 +8991,7 @@ } }, "traits": { - "smithy.api#documentation": "

A collection of RequestValidator resources of a given RestApi.

\n
\n

In OpenAPI, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators extension.

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

A collection of RequestValidator resources of a given RestApi.

" } }, "com.amazonaws.apigateway#Resource": { @@ -8944,12 +9024,12 @@ "resourceMethods": { "target": "com.amazonaws.apigateway#MapOfMethod", "traits": { - "smithy.api#documentation": "

Gets an API resource's method of a given HTTP verb.

\n
\n

The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map is included in the 200 OK response of the GET /restapis/{restapi_id}/resources/{resource_id} or GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods request.

\n

Example: Get the GET method of an API resource

\n
Request
\n
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1\nContent-Type: application/json\nHost: apigateway.us-east-1.amazonaws.com\nX-Amz-Date: 20170223T031827Z\nAuthorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
\n
Response
\n
{\n  \"_links\": {\n    \"curies\": [\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html\",\n        \"name\": \"integration\",\n        \"templated\": true\n      },\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html\",\n        \"name\": \"integrationresponse\",\n        \"templated\": true\n      },\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html\",\n        \"name\": \"method\",\n        \"templated\": true\n      },\n      {\n        \"href\": \"https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html\",\n        \"name\": \"methodresponse\",\n        \"templated\": true\n      }\n    ],\n    \"self\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET\",\n      \"name\": \"GET\",\n      \"title\": \"GET\"\n    },\n    \"integration:put\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n    },\n    \"method:delete\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET\"\n    },\n    \"method:integration\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n    },\n    \"method:responses\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\",\n      \"name\": \"200\",\n      \"title\": \"200\"\n    },\n    \"method:update\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET\"\n    },\n    \"methodresponse:put\": {\n      \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}\",\n      \"templated\": true\n    }\n  },\n  \"apiKeyRequired\": false,\n  \"authorizationType\": \"NONE\",\n  \"httpMethod\": \"GET\",\n  \"_embedded\": {\n    \"method:integration\": {\n      \"_links\": {\n        \"self\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n        },\n        \"integration:delete\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n        },\n        \"integration:responses\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\",\n          \"name\": \"200\",\n          \"title\": \"200\"\n        },\n        \"integration:update\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration\"\n        },\n        \"integrationresponse:put\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}\",\n          \"templated\": true\n        }\n      },\n      \"cacheKeyParameters\": [],\n      \"cacheNamespace\": \"3kzxbg5sa2\",\n      \"credentials\": \"arn:aws:iam::123456789012:role/apigAwsProxyRole\",\n      \"httpMethod\": \"POST\",\n      \"passthroughBehavior\": \"WHEN_NO_MATCH\",\n      \"requestParameters\": {\n        \"integration.request.header.Content-Type\": \"'application/x-amz-json-1.1'\"\n      },\n      \"requestTemplates\": {\n        \"application/json\": \"{\\n}\"\n      },\n      \"type\": \"AWS\",\n      \"uri\": \"arn:aws:apigateway:us-east-1:kinesis:action/ListStreams\",\n      \"_embedded\": {\n        \"integration:responses\": {\n          \"_links\": {\n            \"self\": {\n              \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\",\n              \"name\": \"200\",\n              \"title\": \"200\"\n            },\n            \"integrationresponse:delete\": {\n              \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\"\n            },\n            \"integrationresponse:update\": {\n              \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200\"\n            }\n          },\n          \"responseParameters\": {\n            \"method.response.header.Content-Type\": \"'application/xml'\"\n          },\n          \"responseTemplates\": {\n            \"application/json\": \"$util.urlDecode(\\\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\\\")\\n\"\n          },\n          \"statusCode\": \"200\"\n        }\n      }\n    },\n    \"method:responses\": {\n      \"_links\": {\n        \"self\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\",\n          \"name\": \"200\",\n          \"title\": \"200\"\n        },\n        \"methodresponse:delete\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\"\n        },\n        \"methodresponse:update\": {\n          \"href\": \"/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200\"\n        }\n      },\n      \"responseModels\": {\n        \"application/json\": \"Empty\"\n      },\n      \"responseParameters\": {\n        \"method.response.header.Content-Type\": false\n      },\n      \"statusCode\": \"200\"\n    }\n  }\n}
\n

If the OPTIONS is enabled on the resource, you can follow the example here to get that method. Just replace the GET of the last path segment in the request URL with OPTIONS.

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

Gets an API resource's method of a given HTTP verb.

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

Represents an API resource.

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

Represents an API resource.

" } }, "com.amazonaws.apigateway#Resources": { @@ -8971,7 +9051,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection of Resource resources.

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

Represents a collection of Resource resources.

" } }, "com.amazonaws.apigateway#RestApi": { @@ -9016,7 +9096,7 @@ "binaryMediaTypes": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

" + "smithy.api#documentation": "

The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

" } }, "minimumCompressionSize": { @@ -9028,19 +9108,19 @@ "apiKeySource": { "target": "com.amazonaws.apigateway#ApiKeySourceType", "traits": { - "smithy.api#documentation": "

The source of the API key for metering requests according to a usage plan. Valid values are:

  • HEADER to read the API key from the X-API-Key header of a request.
  • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

" + "smithy.api#documentation": "

The source of the API key for metering requests according to a usage plan. Valid values\n are: >HEADER to read the API key from the X-API-Key header of a\n request. AUTHORIZER to read the API key from the UsageIdentifierKey\n from a custom authorizer.

" } }, "endpointConfiguration": { "target": "com.amazonaws.apigateway#EndpointConfiguration", "traits": { - "smithy.api#documentation": "

The endpoint configuration of this RestApi showing the endpoint types of the API.

" + "smithy.api#documentation": "

The endpoint configuration of this RestApi showing the endpoint types of the API.

" } }, "policy": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

" + "smithy.api#documentation": "

A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

" } }, "tags": { @@ -9052,12 +9132,12 @@ "disableExecuteApiEndpoint": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.

" + "smithy.api#documentation": "

Specifies whether clients can invoke your API by using the default execute-api endpoint.\n By default, clients can invoke your API with the default\n https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a\n custom domain name to invoke your API, disable the default endpoint.

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

Represents a REST API.

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

Represents a REST API.

" } }, "com.amazonaws.apigateway#RestApis": { @@ -9079,7 +9159,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains references to your APIs and links that guide you in how to interact with your collection. A collection offers a paginated view of your APIs.

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

Contains references to your APIs and links that guide you in how to interact with your collection. A collection offers a paginated view of your APIs.

" } }, "com.amazonaws.apigateway#SdkConfigurationProperty": { @@ -9088,31 +9168,31 @@ "name": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The name of a an SdkType configuration property.

" + "smithy.api#documentation": "

The name of a an SdkType configuration property.

" } }, "friendlyName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The user-friendly name of an SdkType configuration property.

" + "smithy.api#documentation": "

The user-friendly name of an SdkType configuration property.

" } }, "description": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The description of an SdkType configuration property.

" + "smithy.api#documentation": "

The description of an SdkType configuration property.

" } }, "required": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

A boolean flag of an SdkType configuration property to indicate if the associated SDK configuration property is required (true) or not (false).

" + "smithy.api#documentation": "

A boolean flag of an SdkType configuration property to indicate if the associated SDK configuration property is required (true) or not (false).

" } }, "defaultValue": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The default value of an SdkType configuration property.

" + "smithy.api#documentation": "

The default value of an SdkType configuration property.

" } } }, @@ -9140,13 +9220,13 @@ "body": { "target": "com.amazonaws.apigateway#Blob", "traits": { - "smithy.api#documentation": "

The binary blob response to GetSdk, which contains the generated SDK.

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

The binary blob response to GetSdk, which contains the generated SDK.

", "smithy.api#httpPayload": {} } } }, "traits": { - "smithy.api#documentation": "

The binary blob response to GetSdk, which contains the generated SDK.

" + "smithy.api#documentation": "

The binary blob response to GetSdk, which contains the generated SDK.

" } }, "com.amazonaws.apigateway#SdkType": { @@ -9155,25 +9235,25 @@ "id": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identifier of an SdkType instance.

" + "smithy.api#documentation": "

The identifier of an SdkType instance.

" } }, "friendlyName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The user-friendly name of an SdkType instance.

" + "smithy.api#documentation": "

The user-friendly name of an SdkType instance.

" } }, "description": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The description of an SdkType.

" + "smithy.api#documentation": "

The description of an SdkType.

" } }, "configurationProperties": { "target": "com.amazonaws.apigateway#ListOfSdkConfigurationProperty", "traits": { - "smithy.api#documentation": "

A list of configuration properties of an SdkType.

" + "smithy.api#documentation": "

A list of configuration properties of an SdkType.

" } } }, @@ -9193,7 +9273,7 @@ } }, "traits": { - "smithy.api#documentation": "

The collection of SdkType instances.

" + "smithy.api#documentation": "

The collection of SdkType instances.

" } }, "com.amazonaws.apigateway#SecurityPolicy": { @@ -9236,7 +9316,7 @@ "deploymentId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identifier of the Deployment that the stage points to.

" + "smithy.api#documentation": "

The identifier of the Deployment that the stage points to.

" } }, "clientCertificateId": { @@ -9278,13 +9358,13 @@ "methodSettings": { "target": "com.amazonaws.apigateway#MapOfMethodSettings", "traits": { - "smithy.api#documentation": "

A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\\*/\\* for overriding all methods in the stage.

" + "smithy.api#documentation": "

A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\\*/\\* for overriding all methods in the stage.

" } }, "variables": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

A map that defines the stage variables for a Stage resource. Variable names can\n have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

" + "smithy.api#documentation": "

A map that defines the stage variables for a Stage resource. Variable names can\n have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

" } }, "documentationVersion": { @@ -9308,13 +9388,13 @@ "tracingEnabled": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether active tracing with X-ray is enabled for the Stage.

" + "smithy.api#documentation": "

Specifies whether active tracing with X-ray is enabled for the Stage.

" } }, "webAclArn": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The ARN of the WebAcl associated with the Stage.

" + "smithy.api#documentation": "

The ARN of the WebAcl associated with the Stage.

" } }, "tags": { @@ -9337,7 +9417,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a unique identifier for a version of a deployed RestApi that is callable by users.

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

Represents a unique identifier for a version of a deployed RestApi that is callable by users.

" } }, "com.amazonaws.apigateway#StageKey": { @@ -9346,7 +9426,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The string identifier of the associated RestApi.

" + "smithy.api#documentation": "

The string identifier of the associated RestApi.

" } }, "stageName": { @@ -9371,7 +9451,7 @@ } }, "traits": { - "smithy.api#documentation": "

A list of Stage resources that are associated with the ApiKey resource.

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

A list of Stage resources that are associated with the ApiKey resource.

" } }, "com.amazonaws.apigateway#StatusCode": { @@ -9389,6 +9469,9 @@ "input": { "target": "com.amazonaws.apigateway#TagResourceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -9424,7 +9507,7 @@ "resourceArn": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The ARN of a resource that can be tagged.

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

The ARN of a resource that can be tagged.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9432,7 +9515,7 @@ "tags": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

[Required] The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.

", "smithy.api#required": {} } } @@ -9461,12 +9544,12 @@ "value": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The Apache Velocity Template Language (VTL) template content used for the template resource.

" + "smithy.api#documentation": "

The Apache Velocity Template Language (VTL) template content used for the template resource.

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

Represents a mapping template used to transform a payload.

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

Represents a mapping template used to transform a payload.

" } }, "com.amazonaws.apigateway#TestInvokeAuthorizer": { @@ -9492,7 +9575,7 @@ } ], "traits": { - "smithy.api#documentation": "

Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.

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

Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/authorizers/{authorizerId}", @@ -9506,7 +9589,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9514,7 +9597,7 @@ "authorizerId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a test invoke authorizer request's Authorizer ID.

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

Specifies a test invoke authorizer request's Authorizer ID.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9522,42 +9605,42 @@ "headers": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

[Required] A key-value map of headers to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, should be specified.

" + "smithy.api#documentation": "

A key-value map of headers to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, should be specified.

" } }, "multiValueHeaders": { "target": "com.amazonaws.apigateway#MapOfStringToList", "traits": { - "smithy.api#documentation": "

[Optional] The headers as a map from string to list of values to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, may be specified.

" + "smithy.api#documentation": "

The headers as a map from string to list of values to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, may be specified.

" } }, "pathWithQueryString": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Optional] The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.

" + "smithy.api#documentation": "

The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.

" } }, "body": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Optional] The simulated request body of an incoming invocation request.

" + "smithy.api#documentation": "

The simulated request body of an incoming invocation request.

" } }, "stageVariables": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

A key-value map of stage variables to simulate an invocation on a deployed Stage.

" + "smithy.api#documentation": "

A key-value map of stage variables to simulate an invocation on a deployed Stage.

" } }, "additionalContext": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

[Optional] A key-value map of additional context variables.

" + "smithy.api#documentation": "

A key-value map of additional context variables.

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

Make a request to simulate the execution of an Authorizer.

" + "smithy.api#documentation": "

Make a request to simulate the invocation of an Authorizer.

" } }, "com.amazonaws.apigateway#TestInvokeAuthorizerResponse": { @@ -9584,27 +9667,30 @@ "principalId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The principal identity returned by the Authorizer

" + "smithy.api#documentation": "

The principal identity returned by the Authorizer

" } }, "policy": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The JSON policy document returned by the Authorizer

" + "smithy.api#documentation": "

The JSON policy document returned by the Authorizer

" } }, "authorization": { - "target": "com.amazonaws.apigateway#MapOfStringToList" + "target": "com.amazonaws.apigateway#MapOfStringToList", + "traits": { + "smithy.api#documentation": "

The authorization response.

" + } }, "claims": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

The open identity claims, with any supported custom attributes, returned from the Cognito Your User Pool configured for the API.

" + "smithy.api#documentation": "

The open identity claims, with any supported custom attributes, returned from the Cognito Your User Pool configured for the API.

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

Represents the response of the test invoke request for a custom Authorizer

" + "smithy.api#documentation": "

Represents the response of the test invoke request for a custom Authorizer

" } }, "com.amazonaws.apigateway#TestInvokeMethod": { @@ -9630,7 +9716,7 @@ } ], "traits": { - "smithy.api#documentation": "

Simulate the execution of a Method in your RestApi with headers, parameters, and an incoming request body.

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

Simulate the invocation of a Method in your RestApi with headers, parameters, and an incoming request body.

", "smithy.api#http": { "method": "POST", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}", @@ -9644,7 +9730,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9652,7 +9738,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a test invoke method request's resource ID.

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

Specifies a test invoke method request's resource ID.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9660,7 +9746,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies a test invoke method request's HTTP method.

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

Specifies a test invoke method request's HTTP method.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9692,18 +9778,18 @@ "clientCertificateId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.

" + "smithy.api#documentation": "

A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.

" } }, "stageVariables": { "target": "com.amazonaws.apigateway#MapOfStringToString", "traits": { - "smithy.api#documentation": "

A key-value map of stage variables to simulate an invocation on a deployed Stage.

" + "smithy.api#documentation": "

A key-value map of stage variables to simulate an invocation on a deployed Stage.

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

Make a request to simulate the execution of a Method.

" + "smithy.api#documentation": "

Make a request to simulate the invocation of a Method.

" } }, "com.amazonaws.apigateway#TestInvokeMethodResponse": { @@ -9747,7 +9833,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response of the test invoke request in the HTTP method.

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

Represents the response of the test invoke request in the HTTP method.

" } }, "com.amazonaws.apigateway#ThrottleSettings": { @@ -9779,9 +9865,12 @@ "insecureSkipVerification": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint is\n issued by a supported certificate authority. This isn’t recommended, but it enables you to\n use certificates that are signed by private certificate authorities, or certificates\n that are self-signed. If enabled, API Gateway still performs basic certificate\n validation, which includes checking the certificate's expiration date, hostname, and\n presence of a root certificate authority. Supported only for HTTP and\n HTTP_PROXY integrations.

" + "smithy.api#documentation": "

Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint is\n issued by a supported certificate authority. This isn’t recommended, but it enables you to\n use certificates that are signed by private certificate authorities, or certificates\n that are self-signed. If enabled, API Gateway still performs basic certificate\n validation, which includes checking the certificate's expiration date, hostname, and\n presence of a root certificate authority. Supported only for HTTP and\n HTTP_PROXY integrations.

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

Specifies the TLS configuration for an integration.

" } }, "com.amazonaws.apigateway#TooManyRequestsException": { @@ -9840,6 +9929,9 @@ "input": { "target": "com.amazonaws.apigateway#UntagResourceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.apigateway#BadRequestException" @@ -9875,7 +9967,7 @@ "resourceArn": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The ARN of a resource that can be tagged.

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

The ARN of a resource that can be tagged.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9883,7 +9975,7 @@ "tagKeys": { "target": "com.amazonaws.apigateway#ListOfString", "traits": { - "smithy.api#documentation": "

[Required] The Tag keys to delete.

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

The Tag keys to delete.

", "smithy.api#httpQuery": "tagKeys", "smithy.api#required": {} } @@ -9922,7 +10014,7 @@ } ], "traits": { - "smithy.api#documentation": "

Changes information about the current Account resource.

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

Changes information about the current Account resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/account", @@ -9936,12 +10028,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Requests API Gateway to change information about the current Account resource.

" + "smithy.api#documentation": "

Requests API Gateway to change information about the current Account resource.

" } }, "com.amazonaws.apigateway#UpdateApiKey": { @@ -9973,7 +10065,7 @@ } ], "traits": { - "smithy.api#documentation": "

Changes information about an ApiKey resource.

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

Changes information about an ApiKey resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/apikeys/{apiKey}", @@ -9987,7 +10079,7 @@ "apiKey": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the ApiKey resource to be updated.

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

The identifier of the ApiKey resource to be updated.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9995,12 +10087,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

A request to change information about an ApiKey resource.

" + "smithy.api#documentation": "

A request to change information about an ApiKey resource.

" } }, "com.amazonaws.apigateway#UpdateAuthorizer": { @@ -10032,7 +10124,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates an existing Authorizer resource.

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

Updates an existing Authorizer resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/authorizers/{authorizerId}", @@ -10046,7 +10138,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10054,7 +10146,7 @@ "authorizerId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the Authorizer resource.

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

The identifier of the Authorizer resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10062,12 +10154,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Request to update an existing Authorizer resource.

" + "smithy.api#documentation": "

Request to update an existing Authorizer resource.

" } }, "com.amazonaws.apigateway#UpdateBasePathMapping": { @@ -10099,7 +10191,7 @@ } ], "traits": { - "smithy.api#documentation": "

Changes information about the BasePathMapping resource.

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

Changes information about the BasePathMapping resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/domainnames/{domainName}/basepathmappings/{basePath}", @@ -10113,7 +10205,7 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The domain name of the BasePathMapping resource to change.

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

The domain name of the BasePathMapping resource to change.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10121,7 +10213,7 @@ "basePath": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The base path of the BasePathMapping resource to change.

\n

To specify an empty base path, set this parameter to '(none)'.

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

The base path of the BasePathMapping resource to change.

\n

To specify an empty base path, set this parameter to '(none)'.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10129,12 +10221,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

A request to change information about the BasePathMapping resource.

" + "smithy.api#documentation": "

A request to change information about the BasePathMapping resource.

" } }, "com.amazonaws.apigateway#UpdateClientCertificate": { @@ -10166,7 +10258,7 @@ } ], "traits": { - "smithy.api#documentation": "

Changes information about an ClientCertificate resource.

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

Changes information about an ClientCertificate resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/clientcertificates/{clientCertificateId}", @@ -10180,7 +10272,7 @@ "clientCertificateId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the ClientCertificate resource to be updated.

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

The identifier of the ClientCertificate resource to be updated.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10188,12 +10280,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

A request to change information about an ClientCertificate resource.

" + "smithy.api#documentation": "

A request to change information about an ClientCertificate resource.

" } }, "com.amazonaws.apigateway#UpdateDeployment": { @@ -10228,7 +10320,7 @@ } ], "traits": { - "smithy.api#documentation": "

Changes information about a Deployment resource.

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

Changes information about a Deployment resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/deployments/{deploymentId}", @@ -10242,7 +10334,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10250,7 +10342,7 @@ "deploymentId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The replacement identifier for the Deployment resource to change information about.

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

The replacement identifier for the Deployment resource to change information about.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10258,12 +10350,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Requests API Gateway to change information about a Deployment resource.

" + "smithy.api#documentation": "

Requests API Gateway to change information about a Deployment resource.

" } }, "com.amazonaws.apigateway#UpdateDocumentationPart": { @@ -10295,6 +10387,7 @@ } ], "traits": { + "smithy.api#documentation": "

Updates a documentation part.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/documentation/parts/{documentationPartId}", @@ -10308,7 +10401,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10316,7 +10409,7 @@ "documentationPartId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the to-be-updated documentation part.

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

The identifier of the to-be-updated documentation part.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10324,7 +10417,7 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

" } } }, @@ -10361,6 +10454,7 @@ } ], "traits": { + "smithy.api#documentation": "

Updates a documentation version.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/documentation/versions/{documentationVersion}", @@ -10374,7 +10468,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi..

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

The string identifier of the associated RestApi..

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10382,7 +10476,7 @@ "documentationVersion": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The version identifier of the to-be-updated documentation version.

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

The version identifier of the to-be-updated documentation version.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10390,7 +10484,7 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

" } } }, @@ -10427,7 +10521,7 @@ } ], "traits": { - "smithy.api#documentation": "

Changes information about the DomainName resource.

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

Changes information about the DomainName resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/domainnames/{domainName}", @@ -10441,7 +10535,7 @@ "domainName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the DomainName resource to be changed.

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

The name of the DomainName resource to be changed.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10449,12 +10543,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

A request to change information about the DomainName resource.

" + "smithy.api#documentation": "

A request to change information about the DomainName resource.

" } }, "com.amazonaws.apigateway#UpdateGatewayResponse": { @@ -10486,7 +10580,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a GatewayResponse of a specified response type on the given RestApi.

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

Updates a GatewayResponse of a specified response type on the given RestApi.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/gatewayresponses/{responseType}", @@ -10500,7 +10594,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10508,7 +10602,7 @@ "responseType": { "target": "com.amazonaws.apigateway#GatewayResponseType", "traits": { - "smithy.api#documentation": "

[Required]

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10516,12 +10610,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Updates a GatewayResponse of a specified response type on the given RestApi.

" + "smithy.api#documentation": "

Updates a GatewayResponse of a specified response type on the given RestApi.

" } }, "com.amazonaws.apigateway#UpdateIntegration": { @@ -10567,7 +10661,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10575,7 +10669,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Represents an update integration request's resource identifier.

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

Represents an update integration request's resource identifier.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10583,7 +10677,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Represents an update integration request's HTTP method.

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

Represents an update integration request's HTTP method.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10591,7 +10685,7 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

" } } }, @@ -10642,7 +10736,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10650,7 +10744,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies an update integration response request's resource identifier.

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

Specifies an update integration response request's resource identifier.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10658,7 +10752,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] Specifies an update integration response request's HTTP method.

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

Specifies an update integration response request's HTTP method.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10666,7 +10760,7 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

[Required] Specifies an update integration response request's status code.

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

Specifies an update integration response request's status code.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10674,7 +10768,7 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

" } } }, @@ -10708,7 +10802,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates an existing Method resource.

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

Updates an existing Method resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}", @@ -10722,7 +10816,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10730,7 +10824,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Resource identifier for the Method resource.

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

The Resource identifier for the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10738,7 +10832,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The HTTP verb of the Method resource.

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

The HTTP verb of the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10746,12 +10840,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Request to update an existing Method resource.

" + "smithy.api#documentation": "

Request to update an existing Method resource.

" } }, "com.amazonaws.apigateway#UpdateMethodResponse": { @@ -10783,7 +10877,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates an existing MethodResponse resource.

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

Updates an existing MethodResponse resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}", @@ -10797,7 +10891,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10805,7 +10899,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Resource identifier for the MethodResponse resource.

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

The Resource identifier for the MethodResponse resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10813,7 +10907,7 @@ "httpMethod": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The HTTP verb of the Method resource.

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

The HTTP verb of the Method resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10821,7 +10915,7 @@ "statusCode": { "target": "com.amazonaws.apigateway#StatusCode", "traits": { - "smithy.api#documentation": "

[Required] The status code for the MethodResponse resource.

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

The status code for the MethodResponse resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10829,12 +10923,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

A request to update an existing MethodResponse resource.

" + "smithy.api#documentation": "

A request to update an existing MethodResponse resource.

" } }, "com.amazonaws.apigateway#UpdateModel": { @@ -10880,7 +10974,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10888,7 +10982,7 @@ "modelName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the model to update.

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

The name of the model to update.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10896,12 +10990,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Request to update an existing model in an existing RestApi resource.

" + "smithy.api#documentation": "

Request to update an existing model in an existing RestApi resource.

" } }, "com.amazonaws.apigateway#UpdateRequestValidator": { @@ -10933,7 +11027,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a RequestValidator of a given RestApi.

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

Updates a RequestValidator of a given RestApi.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/requestvalidators/{requestValidatorId}", @@ -10947,7 +11041,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10955,7 +11049,7 @@ "requestValidatorId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of RequestValidator to be updated.

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

The identifier of RequestValidator to be updated.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10963,12 +11057,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Updates a RequestValidator of a given RestApi.

" + "smithy.api#documentation": "

Updates a RequestValidator of a given RestApi.

" } }, "com.amazonaws.apigateway#UpdateResource": { @@ -10997,7 +11091,7 @@ } ], "traits": { - "smithy.api#documentation": "

Changes information about a Resource resource.

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

Changes information about a Resource resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/resources/{resourceId}", @@ -11011,7 +11105,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11019,7 +11113,7 @@ "resourceId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the Resource resource.

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

The identifier of the Resource resource.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11027,12 +11121,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Request to change information about a Resource resource.

" + "smithy.api#documentation": "

Request to change information about a Resource resource.

" } }, "com.amazonaws.apigateway#UpdateRestApi": { @@ -11078,7 +11172,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11086,12 +11180,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Request to update an existing RestApi resource in your collection.

" + "smithy.api#documentation": "

Request to update an existing RestApi resource in your collection.

" } }, "com.amazonaws.apigateway#UpdateStage": { @@ -11123,7 +11217,7 @@ } ], "traits": { - "smithy.api#documentation": "

Changes information about a Stage resource.

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

Changes information about a Stage resource.

", "smithy.api#http": { "method": "PATCH", "uri": "/restapis/{restApiId}/stages/{stageName}", @@ -11137,7 +11231,7 @@ "restApiId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11145,7 +11239,7 @@ "stageName": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The name of the Stage resource to change information about.

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

The name of the Stage resource to change information about.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11153,12 +11247,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Requests API Gateway to change information about a Stage resource.

" + "smithy.api#documentation": "

Requests API Gateway to change information about a Stage resource.

" } }, "com.amazonaws.apigateway#UpdateUsage": { @@ -11241,7 +11335,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the to-be-updated usage plan.

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

The Id of the to-be-updated usage plan.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11249,7 +11343,7 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

" } } }, @@ -11263,7 +11357,7 @@ "usagePlanId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The Id of the usage plan associated with the usage data.

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

The Id of the usage plan associated with the usage data.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11271,7 +11365,7 @@ "keyId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.

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

The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11279,7 +11373,7 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

" } } }, @@ -11316,7 +11410,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates an existing VpcLink of a specified identifier.

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

Updates an existing VpcLink of a specified identifier.

", "smithy.api#http": { "method": "PATCH", "uri": "/vpclinks/{vpcLinkId}", @@ -11330,7 +11424,7 @@ "vpcLinkId": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

[Required] The identifier of the VpcLink. It is used in an Integration to reference this VpcLink.

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

The identifier of the VpcLink. It is used in an Integration to reference this VpcLink.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11338,12 +11432,12 @@ "patchOperations": { "target": "com.amazonaws.apigateway#ListOfPatchOperation", "traits": { - "smithy.api#documentation": "

A list of update operations to be applied to the specified resource and in the order specified in this list.

" + "smithy.api#documentation": "

For more information about supported patch operations, see Patch Operations.

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

Updates an existing VpcLink of a specified identifier.

" + "smithy.api#documentation": "

Updates an existing VpcLink of a specified identifier.

" } }, "com.amazonaws.apigateway#Usage": { @@ -11383,7 +11477,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the usage data of a usage plan.

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

Represents the usage data of a usage plan.

" } }, "com.amazonaws.apigateway#UsagePlan": { @@ -11392,7 +11486,7 @@ "id": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identifier of a UsagePlan resource.

" + "smithy.api#documentation": "

The identifier of a UsagePlan resource.

" } }, "name": { @@ -11416,7 +11510,7 @@ "throttle": { "target": "com.amazonaws.apigateway#ThrottleSettings", "traits": { - "smithy.api#documentation": "

Map containing method level throttling information for API stage in a usage plan.

" + "smithy.api#documentation": "

A map containing method level throttling information for API stage in a usage plan.

" } }, "quota": { @@ -11439,7 +11533,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a usage plan used to specify who can assess associated API stages. Optionally, target request rate and quota limits can be set. \n In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. \n Consider using AWS Budgets to monitor costs \n and AWS WAF to manage API requests.

\n
\n

In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.

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

Represents a usage plan used to specify who can assess associated API stages. Optionally, target request rate and quota limits can be set. \n In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. \n Consider using Amazon Web Services Budgets to monitor costs \n and WAF to manage API requests.

" } }, "com.amazonaws.apigateway#UsagePlanKey": { @@ -11471,7 +11565,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a usage plan key to identify a plan customer.

\n
\n

To associate an API stage with a selected API key in a usage plan, you must create a UsagePlanKey resource to represent the selected ApiKey.

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

Represents a usage plan key to identify a plan customer.

" } }, "com.amazonaws.apigateway#UsagePlanKeys": { @@ -11493,7 +11587,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the collection of usage plan keys added to usage plans for the associated API keys and, possibly, other types of keys.

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

Represents the collection of usage plan keys added to usage plans for the associated API keys and, possibly, other types of keys.

" } }, "com.amazonaws.apigateway#UsagePlans": { @@ -11515,7 +11609,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a collection of usage plans for an AWS account.

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

Represents a collection of usage plans for an AWS account.

" } }, "com.amazonaws.apigateway#VpcLink": { @@ -11524,7 +11618,7 @@ "id": { "target": "com.amazonaws.apigateway#String", "traits": { - "smithy.api#documentation": "

The identifier of the VpcLink. It is used in an Integration to reference this VpcLink.

" + "smithy.api#documentation": "

The identifier of the VpcLink. It is used in an Integration to reference this VpcLink.

" } }, "name": { @@ -11548,7 +11642,7 @@ "status": { "target": "com.amazonaws.apigateway#VpcLinkStatus", "traits": { - "smithy.api#documentation": "

The status of the VPC link. The valid values are AVAILABLE, PENDING, DELETING, or FAILED. Deploying an API will wait if the status is PENDING and will fail if the status is DELETING.

" + "smithy.api#documentation": "

The status of the VPC link. The valid values are AVAILABLE, PENDING, DELETING, or FAILED. Deploying an API will wait if the status is PENDING and will fail if the status is DELETING.

" } }, "statusMessage": { @@ -11565,7 +11659,7 @@ } }, "traits": { - "smithy.api#documentation": "

An API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC).

\n
\n

To enable access to a resource in an Amazon Virtual Private Cloud through Amazon API Gateway, you, as an API developer, create a VpcLink resource targeted for one or more network load balancers of the VPC and then integrate an API method with a private integration that uses the VpcLink. The private integration has an integration type of HTTP or HTTP_PROXY and has a connection type of VPC_LINK. The integration uses the connectionId property to identify the VpcLink used.

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

An API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC).

" } }, "com.amazonaws.apigateway#VpcLinkStatus": { @@ -11610,7 +11704,7 @@ } }, "traits": { - "smithy.api#documentation": "

The collection of VPC links under the caller's account in a region.

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

The collection of VPC links under the caller's account in a region.

" } } } diff --git a/aws/sdk/aws-models/appflow.json b/aws/sdk/aws-models/appflow.json index f21f240a81f..df664066f50 100644 --- a/aws/sdk/aws-models/appflow.json +++ b/aws/sdk/aws-models/appflow.json @@ -68,7 +68,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 2048 + "max": 4096 }, "smithy.api#pattern": "^\\S+$", "smithy.api#sensitive": {} @@ -90,7 +90,7 @@ "aggregationType": { "target": "com.amazonaws.appflow#AggregationType", "traits": { - "smithy.api#documentation": "

Specifies whether Amazon AppFlow aggregates the flow records into a single file, or leave\n them unaggregated.

" + "smithy.api#documentation": "

Specifies whether Amazon AppFlow aggregates the flow records into a single file, or\n leave them unaggregated.

" } } }, @@ -830,7 +830,7 @@ } }, "traits": { - "smithy.api#documentation": "

The high-level entity that can be queried in Amazon AppFlow. For example, a Salesforce\n entity might be an Account or Opportunity, whereas a\n ServiceNow entity might be an Incident.

" + "smithy.api#documentation": "

The high-level entity that can be queried in Amazon AppFlow. For example, a\n Salesforce entity might be an Account or\n Opportunity, whereas a ServiceNow entity might be an\n Incident.

" } }, "com.amazonaws.appflow#ConnectorEntityField": { @@ -1871,7 +1871,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new connector profile associated with your Amazon Web Services account. There\n is a soft quota of 100 connector profiles per Amazon Web Services account. If you need more\n connector profiles than this quota allows, you can submit a request to the Amazon AppFlow team\n through the Amazon AppFlow support channel.

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

Creates a new connector profile associated with your Amazon Web Services account. There\n is a soft quota of 100 connector profiles per Amazon Web Services account. If you need more\n connector profiles than this quota allows, you can submit a request to the Amazon AppFlow team through the Amazon AppFlow support channel. In each connector profile that you\n create, you can provide the credentials and properties for only one connector.

", "smithy.api#http": { "method": "POST", "uri": "/create-connector-profile", @@ -1892,7 +1892,7 @@ "kmsArn": { "target": "com.amazonaws.appflow#KMSArn", "traits": { - "smithy.api#documentation": "

The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for\n encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If\n you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.\n

" + "smithy.api#documentation": "

The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for\n encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS\n key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.

" } }, "connectorType": { @@ -1967,7 +1967,7 @@ } ], "traits": { - "smithy.api#documentation": "

Enables your application to create a new flow using Amazon AppFlow. You must create a\n connector profile before calling this API. Please note that the Request Syntax below shows\n syntax for multiple destinations, however, you can only transfer data to one item in this list\n at a time. Amazon AppFlow does not currently support flows to multiple destinations at once.

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

Enables your application to create a new flow using Amazon AppFlow. You must create\n a connector profile before calling this API. Please note that the Request Syntax below shows\n syntax for multiple destinations, however, you can only transfer data to one item in this list\n at a time. Amazon AppFlow does not currently support flows to multiple destinations at\n once.

", "smithy.api#http": { "method": "POST", "uri": "/create-flow", @@ -1994,7 +1994,7 @@ "kmsArn": { "target": "com.amazonaws.appflow#KMSArn", "traits": { - "smithy.api#documentation": "

The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for\n encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If\n you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.\n

" + "smithy.api#documentation": "

The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for\n encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS\n key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.

" } }, "triggerConfig": { @@ -2021,7 +2021,7 @@ "tasks": { "target": "com.amazonaws.appflow#Tasks", "traits": { - "smithy.api#documentation": "

A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.\n

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

A list of tasks that Amazon AppFlow performs while transferring the data in the\n flow run.

", "smithy.api#required": {} } }, @@ -2167,7 +2167,7 @@ "errorHandlingConfig": { "target": "com.amazonaws.appflow#ErrorHandlingConfig", "traits": { - "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data in the\n custom connector as destination.

" + "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data in\n the custom connector as destination.

" } }, "writeOperationType": { @@ -2179,7 +2179,7 @@ "idFieldNames": { "target": "com.amazonaws.appflow#IdFieldNameList", "traits": { - "smithy.api#documentation": "

The name of the field that Amazon AppFlow uses as an ID when performing a write operation\n such as update, delete, or upsert.

" + "smithy.api#documentation": "

The name of the field that Amazon AppFlow uses as an ID when performing a write\n operation such as update, delete, or upsert.

" } }, "customProperties": { @@ -2318,7 +2318,7 @@ "objectTypeName": { "target": "com.amazonaws.appflow#ObjectTypeName", "traits": { - "smithy.api#documentation": "

The object specified in the Amazon Connect Customer Profiles flow destination.

" + "smithy.api#documentation": "

The object specified in the Amazon Connect Customer Profiles flow destination.\n

" } } }, @@ -2538,7 +2538,7 @@ "forceDelete": { "target": "com.amazonaws.appflow#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether Amazon AppFlow should delete the profile, even if it is currently in\n use in one or more flows.

" + "smithy.api#documentation": "

Indicates whether Amazon AppFlow should delete the profile, even if it is currently\n in use in one or more flows.

" } } } @@ -2567,7 +2567,7 @@ } ], "traits": { - "smithy.api#documentation": "

Enables your application to delete an existing flow. Before deleting the flow, Amazon\n AppFlow validates the request by checking the flow configuration and status. You can delete\n flows one at a time.

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

Enables your application to delete an existing flow. Before deleting the flow, Amazon AppFlow validates the request by checking the flow configuration and status. You can\n delete flows one at a time.

", "smithy.api#http": { "method": "POST", "uri": "/delete-flow", @@ -2588,7 +2588,7 @@ "forceDelete": { "target": "com.amazonaws.appflow#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether Amazon AppFlow should delete the flow, even if it is currently in use.\n

" + "smithy.api#documentation": "

Indicates whether Amazon AppFlow should delete the flow, even if it is currently in\n use.

" } } } @@ -2651,7 +2651,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides details regarding the entity used with the connector, with a description of the\n data model for each entity.

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

Provides details regarding the entity used with the connector, with a description of the\n data model for each field in that entity.

", "smithy.api#http": { "method": "POST", "uri": "/describe-connector-entity", @@ -2829,7 +2829,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the connectors vended by Amazon AppFlow for specified connector types. If you\n don't specify a connector type, this operation describes all connectors vended by Amazon\n AppFlow. If there are more connectors than can be returned in one page, the response contains\n a nextToken object, which can be be passed in to the next call to the\n DescribeConnectors API operation to retrieve the next page.

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

Describes the connectors vended by Amazon AppFlow for specified connector types. If\n you don't specify a connector type, this operation describes all connectors vended by Amazon AppFlow. If there are more connectors than can be returned in one page, the response\n contains a nextToken object, which can be be passed in to the next call to the\n DescribeConnectors API operation to retrieve the next page.

", "smithy.api#http": { "method": "POST", "uri": "/describe-connectors", @@ -3023,7 +3023,7 @@ "kmsArn": { "target": "com.amazonaws.appflow#KMSArn", "traits": { - "smithy.api#documentation": "

The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for\n encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If\n you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.\n

" + "smithy.api#documentation": "

The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for\n encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS\n key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.

" } }, "flowStatus": { @@ -3047,7 +3047,7 @@ "destinationFlowConfigList": { "target": "com.amazonaws.appflow#DestinationFlowConfigList", "traits": { - "smithy.api#documentation": "

The configuration that controls how Amazon AppFlow transfers data to the destination\n connector.

" + "smithy.api#documentation": "

The configuration that controls how Amazon AppFlow transfers data to the\n destination connector.

" } }, "lastRunExecutionDetails": { @@ -3065,7 +3065,7 @@ "tasks": { "target": "com.amazonaws.appflow#Tasks", "traits": { - "smithy.api#documentation": "

A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.\n

" + "smithy.api#documentation": "

A list of tasks that Amazon AppFlow performs while transferring the data in the\n flow run.

" } }, "createdAt": { @@ -3475,7 +3475,7 @@ } }, "traits": { - "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data in the\n destination. For example, this setting would determine if the flow should fail after one\n insertion error, or continue and attempt to insert every record regardless of the initial\n failure. ErrorHandlingConfig is a part of the destination connector details.\n

" + "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data\n in the destination. For example, this setting would determine if the flow should fail after\n one insertion error, or continue and attempt to insert every record regardless of the initial\n failure. ErrorHandlingConfig is a part of the destination connector details.\n

" } }, "com.amazonaws.appflow#ErrorInfo": { @@ -3523,7 +3523,7 @@ } }, "traits": { - "smithy.api#documentation": "

The properties that are applied when Amazon EventBridge is being used as a destination.\n

" + "smithy.api#documentation": "

The properties that are applied when Amazon EventBridge is being used as a\n destination.

" } }, "com.amazonaws.appflow#EventBridgeMetadata": { @@ -3800,7 +3800,7 @@ "sourceConnectorType": { "target": "com.amazonaws.appflow#ConnectorType", "traits": { - "smithy.api#documentation": "

Specifies the source connector type, such as Salesforce, Amazon S3, Amplitude, and so on.\n

" + "smithy.api#documentation": "

Specifies the source connector type, such as Salesforce, Amazon S3, Amplitude,\n and so on.

" } }, "sourceConnectorLabel": { @@ -3812,7 +3812,7 @@ "destinationConnectorType": { "target": "com.amazonaws.appflow#ConnectorType", "traits": { - "smithy.api#documentation": "

Specifies the destination connector type, such as Salesforce, Amazon S3, Amplitude, and\n so on.

" + "smithy.api#documentation": "

Specifies the destination connector type, such as Salesforce, Amazon S3,\n Amplitude, and so on.

" } }, "destinationConnectorLabel": { @@ -3878,6 +3878,15 @@ "smithy.api#pattern": "^[\\w!@#\\-.?,\\s]*$" } }, + "com.amazonaws.appflow#FlowErrorDeactivationThreshold": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, "com.amazonaws.appflow#FlowExecutionList": { "type": "list", "member": { @@ -4303,6 +4312,12 @@ "smithy.api#httpError": 500 } }, + "com.amazonaws.appflow#JavaBoolean": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.appflow#KMSArn": { "type": "string", "traits": { @@ -4771,7 +4786,7 @@ } }, "traits": { - "smithy.api#documentation": "

The properties that Amazon AppFlow applies when you use Marketo as a flow destination.

" + "smithy.api#documentation": "

The properties that Amazon AppFlow applies when you use Marketo as a flow\n destination.

" } }, "com.amazonaws.appflow#MarketoMetadata": { @@ -5021,7 +5036,7 @@ "tokenUrlCustomProperties": { "target": "com.amazonaws.appflow#TokenUrlCustomProperties", "traits": { - "smithy.api#documentation": "

Associates your token URL with a map of properties that you define. Use this parameter\n to provide any additional details that the connector requires to authenticate your\n request.

" + "smithy.api#documentation": "

Associates your token URL with a map of properties that you define. Use this parameter to\n provide any additional details that the connector requires to authenticate your\n request.

" } } }, @@ -5420,7 +5435,7 @@ } }, "traits": { - "smithy.api#documentation": "

Determines the prefix that Amazon AppFlow applies to the destination folder name. You can\n name your destination folders according to the flow frequency and date.

" + "smithy.api#documentation": "

Determines the prefix that Amazon AppFlow applies to the destination folder name.\n You can name your destination folders according to the flow frequency and date.

" } }, "com.amazonaws.appflow#PrefixFormat": { @@ -5655,7 +5670,7 @@ } }, "traits": { - "smithy.api#documentation": "

The connector-specific profile credentials required when using Amazon Redshift.

" + "smithy.api#documentation": "

The connector-specific profile credentials required when using Amazon Redshift.\n

" } }, "com.amazonaws.appflow#RedshiftConnectorProfileProperties": { @@ -5706,7 +5721,7 @@ "intermediateBucketName": { "target": "com.amazonaws.appflow#BucketName", "traits": { - "smithy.api#documentation": "

The intermediate bucket that Amazon AppFlow uses when moving data into Amazon Redshift.\n

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

The intermediate bucket that Amazon AppFlow uses when moving data into Amazon Redshift.

", "smithy.api#required": {} } }, @@ -5719,7 +5734,7 @@ "errorHandlingConfig": { "target": "com.amazonaws.appflow#ErrorHandlingConfig", "traits": { - "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data in the\n Amazon Redshift destination. For example, this setting would determine if the flow should fail\n after one insertion error, or continue and attempt to insert every record regardless of the\n initial failure. ErrorHandlingConfig is a part of the destination connector\n details.

" + "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data\n in the Amazon Redshift destination. For example, this setting would determine if the flow\n should fail after one insertion error, or continue and attempt to insert every record\n regardless of the initial failure. ErrorHandlingConfig is a part of the\n destination connector details.

" } } }, @@ -5739,7 +5754,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 1024 + "max": 2048 }, "smithy.api#pattern": "^\\S+$" } @@ -5972,7 +5987,7 @@ "bucketName": { "target": "com.amazonaws.appflow#BucketName", "traits": { - "smithy.api#documentation": "

The Amazon S3 bucket name in which Amazon AppFlow places the transferred data.

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

The Amazon S3 bucket name in which Amazon AppFlow places the transferred\n data.

", "smithy.api#required": {} } }, @@ -6016,7 +6031,7 @@ } }, "traits": { - "smithy.api#documentation": "

When you use Amazon S3 as the source, the configuration format that you provide the flow input data.

" + "smithy.api#documentation": "

When you use Amazon S3 as the source, the configuration format that you provide\n the flow input data.

" } }, "com.amazonaws.appflow#S3Metadata": { @@ -6032,21 +6047,27 @@ "fileType": { "target": "com.amazonaws.appflow#FileType", "traits": { - "smithy.api#documentation": "

Indicates the file type that Amazon AppFlow places in the Amazon S3 bucket.

" + "smithy.api#documentation": "

Indicates the file type that Amazon AppFlow places in the Amazon S3\n bucket.

" } }, "prefixConfig": { "target": "com.amazonaws.appflow#PrefixConfig", "traits": { - "smithy.api#documentation": "

Determines the prefix that Amazon AppFlow applies to the folder name in the Amazon S3\n bucket. You can name folders according to the flow frequency and date.

" + "smithy.api#documentation": "

Determines the prefix that Amazon AppFlow applies to the folder name in the Amazon S3 bucket. You can name folders according to the flow frequency and date.

" } }, "aggregationConfig": { "target": "com.amazonaws.appflow#AggregationConfig" + }, + "preserveSourceDataTyping": { + "target": "com.amazonaws.appflow#JavaBoolean", + "traits": { + "smithy.api#documentation": "

If your file output format is Parquet, use this parameter to set whether Amazon AppFlow preserves the data types in your source data when it writes the output to Amazon S3.

\n
    \n
  • \n

    \n true: Amazon AppFlow preserves the data types when it writes to\n Amazon S3. For example, an integer or 1 in your source data is\n still an integer in your output.

    \n
  • \n
  • \n

    \n false: Amazon AppFlow converts all of the source data into strings\n when it writes to Amazon S3. For example, an integer of 1 in your\n source data becomes the string \"1\" in the output.

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

The configuration that determines how Amazon AppFlow should format the flow output data\n when Amazon S3 is used as the destination.

" + "smithy.api#documentation": "

The configuration that determines how Amazon AppFlow should format the flow output\n data when Amazon S3 is used as the destination.

" } }, "com.amazonaws.appflow#S3SourceProperties": { @@ -6062,7 +6083,7 @@ "bucketPrefix": { "target": "com.amazonaws.appflow#BucketPrefix", "traits": { - "smithy.api#documentation": "

The object key for the Amazon S3 bucket in which the source files are stored.

" + "smithy.api#documentation": "

The object key for the Amazon S3 bucket in which the source files are stored.\n

" } }, "s3InputFormatConfig": { @@ -6070,7 +6091,7 @@ } }, "traits": { - "smithy.api#documentation": "

The properties that are applied when Amazon S3 is being used as the flow source.

" + "smithy.api#documentation": "

The properties that are applied when Amazon S3 is being used as the flow source.\n

" } }, "com.amazonaws.appflow#SAPODataConnectorOperator": { @@ -6252,7 +6273,7 @@ "successResponseHandlingConfig": { "target": "com.amazonaws.appflow#SuccessResponseHandlingConfig", "traits": { - "smithy.api#documentation": "

Determines how Amazon AppFlow handles the success response that it gets\n from the connector after placing data.

\n

For example, this setting would determine where to write the response from a destination\n connector upon a successful insert operation.

" + "smithy.api#documentation": "

Determines how Amazon AppFlow handles the success response that it gets from the\n connector after placing data.

\n

For example, this setting would determine where to write the response from a destination\n connector upon a successful insert operation.

" } }, "idFieldNames": { @@ -6446,13 +6467,13 @@ "idFieldNames": { "target": "com.amazonaws.appflow#IdFieldNameList", "traits": { - "smithy.api#documentation": "

The name of the field that Amazon AppFlow uses as an ID when performing a write operation\n such as update or delete.

" + "smithy.api#documentation": "

The name of the field that Amazon AppFlow uses as an ID when performing a write\n operation such as update or delete.

" } }, "errorHandlingConfig": { "target": "com.amazonaws.appflow#ErrorHandlingConfig", "traits": { - "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data in the\n Salesforce destination. For example, this setting would determine if the flow should fail\n after one insertion error, or continue and attempt to insert every record regardless of the\n initial failure. ErrorHandlingConfig is a part of the destination connector\n details.

" + "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data\n in the Salesforce destination. For example, this setting would determine if the flow should\n fail after one insertion error, or continue and attempt to insert every record regardless of\n the initial failure. ErrorHandlingConfig is a part of the destination connector\n details.

" } }, "writeOperationType": { @@ -6521,7 +6542,7 @@ "name": "appflow" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

Welcome to the Amazon AppFlow API reference. This guide is for developers who need\n detailed information about the Amazon AppFlow API operations, data types, and errors.

\n\n

Amazon AppFlow is a fully managed integration service that enables you to securely\n transfer data between software as a service (SaaS) applications like Salesforce, Marketo,\n Slack, and ServiceNow, and Amazon Web Services like Amazon S3 and Amazon Redshift.

\n\n\n\n

Use the following links to get started on the Amazon AppFlow API:

\n\n
    \n
  • \n

    \n Actions: An alphabetical list of all Amazon AppFlow API operations.

    \n
  • \n
  • \n

    \n Data\n types: An alphabetical list of all Amazon AppFlow data types.

    \n
  • \n
  • \n

    \n Common parameters: Parameters that all Query operations can use.

    \n
  • \n
  • \n

    \n Common\n errors: Client and server errors that all operations can return.

    \n
  • \n
\n\n

If you're new to Amazon AppFlow, we recommend that you review the Amazon AppFlow User\n Guide.

\n

Amazon AppFlow API users can use vendor-specific mechanisms for OAuth, and include\n applicable OAuth attributes (such as auth-code and redirecturi) with\n the connector-specific ConnectorProfileProperties when creating a new connector\n profile using Amazon AppFlow API operations. For example, Salesforce users can refer to the\n \n Authorize Apps with OAuth\n documentation.

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

Welcome to the Amazon AppFlow API reference. This guide is for developers who need\n detailed information about the Amazon AppFlow API operations, data types, and errors.

\n

Amazon AppFlow is a fully managed integration service that enables you to securely\n transfer data between software as a service (SaaS) applications like Salesforce, Marketo,\n Slack, and ServiceNow, and Amazon Web Services like Amazon S3 and Amazon Redshift.

\n

Use the following links to get started on the Amazon AppFlow API:

\n
    \n
  • \n

    \n Actions: An alphabetical list of all Amazon AppFlow API\n operations.

    \n
  • \n
  • \n

    \n Data\n types: An alphabetical list of all Amazon AppFlow data types.

    \n
  • \n
  • \n

    \n Common parameters: Parameters that all Query operations can use.

    \n
  • \n
  • \n

    \n Common\n errors: Client and server errors that all operations can return.

    \n
  • \n
\n

If you're new to Amazon AppFlow, we recommend that you review the Amazon AppFlow User Guide.

\n

Amazon AppFlow API users can use vendor-specific mechanisms for OAuth, and include\n applicable OAuth attributes (such as auth-code and redirecturi) with\n the connector-specific ConnectorProfileProperties when creating a new connector\n profile using Amazon AppFlow API operations. For example, Salesforce users can refer to\n the \n Authorize Apps with OAuth\n documentation.

", "smithy.api#title": "Amazon Appflow" }, "version": "2020-08-23", @@ -6663,19 +6684,19 @@ "scheduleStartTime": { "target": "com.amazonaws.appflow#Date", "traits": { - "smithy.api#documentation": "

Specifies the scheduled start time for a schedule-triggered flow.

" + "smithy.api#documentation": "

The time at which the scheduled flow starts. The time is formatted as a timestamp that\n follows the ISO 8601 standard, such as 2022-04-26T13:00:00-07:00.

" } }, "scheduleEndTime": { "target": "com.amazonaws.appflow#Date", "traits": { - "smithy.api#documentation": "

Specifies the scheduled end time for a schedule-triggered flow.

" + "smithy.api#documentation": "

The time at which the scheduled flow ends. The time is formatted as a timestamp that\n follows the ISO 8601 standard, such as 2022-04-27T13:00:00-07:00.

" } }, "timezone": { "target": "com.amazonaws.appflow#Timezone", "traits": { - "smithy.api#documentation": "

Specifies the time zone used when referring to the date and time of a scheduled-triggered\n flow, such as America/New_York.

" + "smithy.api#documentation": "

Specifies the time zone used when referring to the dates and times of a scheduled flow,\n such as America/New_York. This time zone is only a descriptive label. It doesn't affect how\n Amazon AppFlow interprets the timestamps that you specify to schedule the flow.

\n

If you want to schedule a flow by using times in a particular time zone, indicate the time zone as a UTC\n offset in your timestamps. For example, the UTC offsets for the America/New_York timezone are\n -04:00 EDT and -05:00 EST.

" } }, "scheduleOffset": { @@ -6690,6 +6711,13 @@ "traits": { "smithy.api#documentation": "

Specifies the date range for the records to import from the connector in the first flow\n run.

" } + }, + "flowErrorDeactivationThreshold": { + "target": "com.amazonaws.appflow#FlowErrorDeactivationThreshold", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

Defines how many times a scheduled flow fails consecutively before Amazon AppFlow\n deactivates it.

" + } } }, "traits": { @@ -7179,7 +7207,7 @@ "stage": { "target": "com.amazonaws.appflow#Stage", "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 stage that was created while setting up an Amazon S3 stage in\n the Snowflake account. This is written in the following format: < Database><\n Schema>.

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

The name of the Amazon S3 stage that was created while setting up an Amazon S3 stage in the Snowflake account. This is written in the following format: <\n Database>< Schema>.

", "smithy.api#required": {} } }, @@ -7193,7 +7221,7 @@ "bucketPrefix": { "target": "com.amazonaws.appflow#BucketPrefix", "traits": { - "smithy.api#documentation": "

The bucket path that refers to the Amazon S3 bucket associated with Snowflake.

" + "smithy.api#documentation": "

The bucket path that refers to the Amazon S3 bucket associated with Snowflake.\n

" } }, "privateLinkServiceName": { @@ -7232,7 +7260,7 @@ "intermediateBucketName": { "target": "com.amazonaws.appflow#BucketName", "traits": { - "smithy.api#documentation": "

The intermediate bucket that Amazon AppFlow uses when moving data into Snowflake.

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

The intermediate bucket that Amazon AppFlow uses when moving data into Snowflake.\n

", "smithy.api#required": {} } }, @@ -7245,7 +7273,7 @@ "errorHandlingConfig": { "target": "com.amazonaws.appflow#ErrorHandlingConfig", "traits": { - "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data in the\n Snowflake destination. For example, this setting would determine if the flow should fail after\n one insertion error, or continue and attempt to insert every record regardless of the initial\n failure. ErrorHandlingConfig is a part of the destination connector details.\n

" + "smithy.api#documentation": "

The settings that determine how Amazon AppFlow handles an error when placing data\n in the Snowflake destination. For example, this setting would determine if the flow should\n fail after one insertion error, or continue and attempt to insert every record regardless of\n the initial failure. ErrorHandlingConfig is a part of the destination connector\n details.

" } } }, @@ -7600,7 +7628,7 @@ } }, "traits": { - "smithy.api#documentation": "

Determines how Amazon AppFlow handles the success response that it gets\n from the connector after placing data.

\n

For example, this setting would determine\n where to write the response from the destination connector upon a successful insert\n operation.

" + "smithy.api#documentation": "

Determines how Amazon AppFlow handles the success response that it gets from the\n connector after placing data.

\n

For example, this setting would determine where to write the response from the destination\n connector upon a successful insert operation.

" } }, "com.amazonaws.appflow#SupportedApiVersion": { @@ -8028,7 +8056,7 @@ } }, "traits": { - "smithy.api#documentation": "

The trigger settings that determine how and when Amazon AppFlow runs the specified flow.\n

" + "smithy.api#documentation": "

The trigger settings that determine how and when Amazon AppFlow runs the specified\n flow.

" } }, "com.amazonaws.appflow#TriggerProperties": { @@ -8111,7 +8139,7 @@ "forceDelete": { "target": "com.amazonaws.appflow#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether Amazon AppFlow should unregister the connector, even if it is currently\n in use in one or more connector profiles. The default value is false.

" + "smithy.api#documentation": "

Indicates whether Amazon AppFlow should unregister the connector, even if it is\n currently in use in one or more connector profiles. The default value is false.

" } } } @@ -8329,14 +8357,14 @@ "destinationFlowConfigList": { "target": "com.amazonaws.appflow#DestinationFlowConfigList", "traits": { - "smithy.api#documentation": "

The configuration that controls how Amazon AppFlow transfers data to the destination\n connector.

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

The configuration that controls how Amazon AppFlow transfers data to the\n destination connector.

", "smithy.api#required": {} } }, "tasks": { "target": "com.amazonaws.appflow#Tasks", "traits": { - "smithy.api#documentation": "

A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.\n

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

A list of tasks that Amazon AppFlow performs while transferring the data in the\n flow run.

", "smithy.api#required": {} } } @@ -8379,14 +8407,14 @@ "bucketName": { "target": "com.amazonaws.appflow#UpsolverBucketName", "traits": { - "smithy.api#documentation": "

The Upsolver Amazon S3 bucket name in which Amazon AppFlow places the transferred data.\n

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

The Upsolver Amazon S3 bucket name in which Amazon AppFlow places the\n transferred data.

", "smithy.api#required": {} } }, "bucketPrefix": { "target": "com.amazonaws.appflow#BucketPrefix", "traits": { - "smithy.api#documentation": "

The object key for the destination Upsolver Amazon S3 bucket in which Amazon AppFlow\n places the files.

" + "smithy.api#documentation": "

The object key for the destination Upsolver Amazon S3 bucket in which Amazon AppFlow places the files.

" } }, "s3OutputFormatConfig": { @@ -8414,7 +8442,7 @@ "fileType": { "target": "com.amazonaws.appflow#FileType", "traits": { - "smithy.api#documentation": "

Indicates the file type that Amazon AppFlow places in the Upsolver Amazon S3 bucket.\n

" + "smithy.api#documentation": "

Indicates the file type that Amazon AppFlow places in the Upsolver Amazon S3 bucket.

" } }, "prefixConfig": { @@ -8428,7 +8456,7 @@ } }, "traits": { - "smithy.api#documentation": "

The configuration that determines how Amazon AppFlow formats the flow output data when\n Upsolver is used as the destination.

" + "smithy.api#documentation": "

The configuration that determines how Amazon AppFlow formats the flow output data\n when Upsolver is used as the destination.

" } }, "com.amazonaws.appflow#Username": { diff --git a/aws/sdk/aws-models/appmesh.json b/aws/sdk/aws-models/appmesh.json index 9273d629e0b..c848c8ec46a 100644 --- a/aws/sdk/aws-models/appmesh.json +++ b/aws/sdk/aws-models/appmesh.json @@ -26,6 +26,22 @@ }, "com.amazonaws.appmesh#AppMesh": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "App Mesh", + "arnNamespace": "appmesh", + "cloudFormationName": "AppMesh", + "cloudTrailEventSource": "appmesh.amazonaws.com", + "endpointPrefix": "appmesh" + }, + "aws.auth#sigv4": { + "name": "appmesh" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": {}, + "smithy.api#documentation": "

App Mesh is a service mesh based on the Envoy proxy that makes it easy to\n monitor and control microservices. App Mesh standardizes how your microservices\n communicate, giving you end-to-end visibility and helping to ensure high availability for\n your applications.

\n

App Mesh gives you consistent visibility and network traffic controls for\n every microservice in an application. You can use App Mesh with Amazon Web Services Fargate, Amazon ECS, Amazon EKS, Kubernetes on Amazon Web Services, and\n Amazon EC2.

\n \n

App Mesh supports microservice applications that use service discovery\n naming for their components. For more information about service discovery on Amazon ECS, see Service\n Discovery in the Amazon Elastic Container Service Developer Guide. Kubernetes\n kube-dns and coredns are supported. For more information,\n see DNS\n for Services and Pods in the Kubernetes documentation.

\n
", + "smithy.api#title": "AWS App Mesh" + }, "version": "2019-01-25", "operations": [ { @@ -42,23 +58,7 @@ { "target": "com.amazonaws.appmesh#Mesh" } - ], - "traits": { - "aws.api#service": { - "sdkId": "App Mesh", - "arnNamespace": "appmesh", - "cloudFormationName": "AppMesh", - "cloudTrailEventSource": "appmesh.amazonaws.com", - "endpointPrefix": "appmesh" - }, - "aws.auth#sigv4": { - "name": "appmesh" - }, - "aws.protocols#restJson1": {}, - "smithy.api#cors": {}, - "smithy.api#documentation": "

App Mesh is a service mesh based on the Envoy proxy that makes it easy to monitor and\n control microservices. App Mesh standardizes how your microservices communicate, giving you\n end-to-end visibility and helping to ensure high availability for your applications.

\n

App Mesh gives you consistent visibility and network traffic controls for every\n microservice in an application. You can use App Mesh with Amazon Web Services Fargate, Amazon ECS, Amazon EKS,\n Kubernetes on Amazon Web Services, and Amazon EC2.

\n \n

App Mesh supports microservice applications that use service discovery naming for their\n components. For more information about service discovery on Amazon ECS, see Service Discovery in the Amazon Elastic Container Service Developer Guide. Kubernetes\n kube-dns and coredns are supported. For more information,\n see DNS\n for Services and Pods in the Kubernetes documentation.

\n
", - "smithy.api#title": "AWS App Mesh" - } + ] }, "com.amazonaws.appmesh#Arn": { "type": "string" @@ -69,20 +69,20 @@ "key": { "target": "com.amazonaws.appmesh#AwsCloudMapInstanceAttributeKey", "traits": { - "smithy.api#documentation": "

The name of an Cloud Map service instance attribute key. Any Cloud Map service\n instance that contains the specified key and value is returned.

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

The name of an Cloud Map service instance attribute key. Any Cloud Map service instance that contains the specified key and value is\n returned.

", "smithy.api#required": {} } }, "value": { "target": "com.amazonaws.appmesh#AwsCloudMapInstanceAttributeValue", "traits": { - "smithy.api#documentation": "

The value of an Cloud Map service instance attribute key. Any Cloud Map service\n instance that contains the specified key and value is returned.

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

The value of an Cloud Map service instance attribute key. Any Cloud Map service instance that contains the specified key and value is\n returned.

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

An object that represents the Cloud Map attribute information for your virtual\n node.

\n \n

AWS Cloud Map is not available in the eu-south-1 Region.

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

An object that represents the Cloud Map attribute information for your\n virtual node.

\n \n

Cloud Map is not available in the eu-south-1 Region.

\n
" } }, "com.amazonaws.appmesh#AwsCloudMapInstanceAttributeKey": { @@ -142,10 +142,16 @@ "traits": { "smithy.api#documentation": "

A string map that contains attributes with values that you can use to filter instances\n by any custom attribute that you specified when you registered the instance. Only instances\n that match all of the specified key/value pairs will be returned.

" } + }, + "ipPreference": { + "target": "com.amazonaws.appmesh#IpPreference", + "traits": { + "smithy.api#documentation": "

The IP version to use to control traffic within the mesh.

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

An object that represents the Cloud Map service discovery information for your virtual\n node.

\n \n

Cloud Map is not available in the eu-south-1 Region.

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

An object that represents the Cloud Map service discovery information for\n your virtual node.

\n \n

Cloud Map is not available in the eu-south-1 Region.

\n
" } }, "com.amazonaws.appmesh#Backend": { @@ -381,7 +387,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -593,7 +599,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -653,7 +659,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a virtual gateway.

\n

A virtual gateway allows resources outside your mesh to communicate to resources that\n are inside your mesh. The virtual gateway represents an Envoy proxy running in an Amazon ECS\n task, in a Kubernetes service, or on an Amazon EC2 instance. Unlike a virtual node, which\n represents an Envoy running with an application, a virtual gateway represents Envoy\n deployed by itself.

\n

For more information about virtual gateways, see Virtual gateways.

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

Creates a virtual gateway.

\n

A virtual gateway allows resources outside your mesh to communicate to resources that\n are inside your mesh. The virtual gateway represents an Envoy proxy running in an Amazon ECS task, in a Kubernetes service, or on an Amazon EC2 instance. Unlike a\n virtual node, which represents an Envoy running with an application, a virtual gateway\n represents Envoy deployed by itself.

\n

For more information about virtual gateways, see Virtual gateways.

", "smithy.api#http": { "method": "PUT", "uri": "/v20190125/meshes/{meshName}/virtualGateways", @@ -703,7 +709,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -757,7 +763,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a virtual node within a service mesh.

\n

A virtual node acts as a logical pointer to a particular task group, such as an Amazon ECS\n service or a Kubernetes deployment. When you create a virtual node, you can specify the\n service discovery information for your task group, and whether the proxy running in a task\n group will communicate with other proxies using Transport Layer Security (TLS).

\n

You define a listener for any inbound traffic that your virtual node\n expects. Any virtual service that your virtual node expects to communicate to is specified\n as a backend.

\n

The response metadata for your new virtual node contains the arn that is\n associated with the virtual node. Set this value to the full ARN; for example,\n arn:aws:appmesh:us-west-2:123456789012:myMesh/default/virtualNode/myApp)\n as the APPMESH_RESOURCE_ARN environment variable for your task group's Envoy\n proxy container in your task definition or pod spec. This is then mapped to the\n node.id and node.cluster Envoy parameters.

\n \n

By default, App Mesh uses the name of the resource you specified in\n APPMESH_RESOURCE_ARN when Envoy is referring to itself in metrics and\n traces. You can override this behavior by setting the\n APPMESH_RESOURCE_CLUSTER environment variable with your own name.

\n
\n

For more information about virtual nodes, see Virtual nodes. You must be using 1.15.0 or later of the Envoy image when\n setting these variables. For more information aboutApp Mesh Envoy variables, see Envoy image in\n the AWS App Mesh User Guide.

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

Creates a virtual node within a service mesh.

\n

A virtual node acts as a logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. When you create a virtual node, you can\n specify the service discovery information for your task group, and whether the proxy\n running in a task group will communicate with other proxies using Transport Layer Security\n (TLS).

\n

You define a listener for any inbound traffic that your virtual node\n expects. Any virtual service that your virtual node expects to communicate to is specified\n as a backend.

\n

The response metadata for your new virtual node contains the arn that is\n associated with the virtual node. Set this value to the full ARN; for example,\n arn:aws:appmesh:us-west-2:123456789012:myMesh/default/virtualNode/myApp)\n as the APPMESH_RESOURCE_ARN environment variable for your task group's Envoy\n proxy container in your task definition or pod spec. This is then mapped to the\n node.id and node.cluster Envoy parameters.

\n \n

By default, App Mesh uses the name of the resource you specified in\n APPMESH_RESOURCE_ARN when Envoy is referring to itself in metrics and\n traces. You can override this behavior by setting the\n APPMESH_RESOURCE_CLUSTER environment variable with your own name.

\n
\n

For more information about virtual nodes, see Virtual nodes. You must be using 1.15.0 or later of the Envoy image when\n setting these variables. For more information aboutApp Mesh Envoy variables, see\n Envoy\n image in the App Mesh User Guide.

", "smithy.api#http": { "method": "PUT", "uri": "/v20190125/meshes/{meshName}/virtualNodes", @@ -810,7 +816,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -923,7 +929,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1036,7 +1042,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then\n the account that you specify must share the mesh with your account before you can create \n the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1147,7 +1153,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1310,7 +1316,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1398,7 +1404,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1480,7 +1486,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1568,7 +1574,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1656,7 +1662,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1749,7 +1755,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1820,7 +1826,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -1905,7 +1911,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } }, @@ -1998,7 +2004,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -2077,7 +2083,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -2162,7 +2168,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -2247,7 +2253,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -2302,6 +2308,12 @@ "traits": { "smithy.api#documentation": "

Specifies the DNS response type for the virtual node.

" } + }, + "ipPreference": { + "target": "com.amazonaws.appmesh#IpPreference", + "traits": { + "smithy.api#documentation": "

The IP version to use to control traffic within the mesh.

" + } } }, "traits": { @@ -2358,7 +2370,7 @@ "type": { "target": "com.amazonaws.appmesh#EgressFilterType", "traits": { - "smithy.api#documentation": "

The egress filter type. By default, the type is DROP_ALL, which allows\n egress only from virtual nodes to other defined resources in the service mesh (and any\n traffic to *.amazonaws.com for Amazon Web Services API calls). You can set the egress filter\n type to ALLOW_ALL to allow egress to any endpoint inside or outside of the\n service mesh.

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

The egress filter type. By default, the type is DROP_ALL, which allows\n egress only from virtual nodes to other defined resources in the service mesh (and any\n traffic to *.amazonaws.com for Amazon Web Services API calls). You can set the\n egress filter type to ALLOW_ALL to allow egress to any endpoint inside or\n outside of the service mesh.

", "smithy.api#required": {} } } @@ -2397,7 +2409,7 @@ "path": { "target": "com.amazonaws.appmesh#FilePath", "traits": { - "smithy.api#documentation": "

The file path to write access logs to. You can use /dev/stdout to send\n access logs to standard out and configure your Envoy container to use a log driver, such as\n awslogs, to export the access logs to a log storage service such as Amazon\n CloudWatch Logs. You can also specify a path in the Envoy container's file system to write\n the files to disk.

\n \n

The Envoy process must have write permissions to the path that you specify here.\n Otherwise, Envoy fails to bootstrap properly.

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

The file path to write access logs to. You can use /dev/stdout to send\n access logs to standard out and configure your Envoy container to use a log driver, such as\n awslogs, to export the access logs to a log storage service such as Amazon\n CloudWatch Logs. You can also specify a path in the Envoy container's file system to write\n the files to disk.

\n \n \n

The Envoy process must have write permissions to the path that you specify here.\n Otherwise, Envoy fails to bootstrap properly.

\n
", "smithy.api#required": {} } } @@ -2596,14 +2608,14 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, "resourceOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, @@ -2818,7 +2830,7 @@ "invert": { "target": "smithy.api#Boolean", "traits": { - "smithy.api#documentation": "

Specify True to match anything except the match criteria. The default value is False.

" + "smithy.api#documentation": "

Specify True to match anything except the match criteria. The default value\n is False.

" } }, "match": { @@ -2913,7 +2925,7 @@ "httpRetryEvents": { "target": "com.amazonaws.appmesh#HttpRetryPolicyEvents", "traits": { - "smithy.api#documentation": "

Specify at least one of the following values.

\n
    \n
  • \n

    \n server-error – HTTP status codes 500, 501,\n 502, 503, 504, 505, 506, 507, 508, 510, and 511

    \n
  • \n
  • \n

    \n gateway-error – HTTP status codes 502,\n 503, and 504

    \n
  • \n
  • \n

    \n client-error – HTTP status code 409

    \n
  • \n
  • \n

    \n stream-error – Retry on refused\n stream

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

Specify at least one of the following values.

\n
    \n
  • \n

    \n server-error – HTTP status codes 500, 501,\n 502, 503, 504, 505, 506, 507, 508, 510, and 511

    \n
  • \n
  • \n

    \n gateway-error – HTTP status codes 502,\n 503, and 504

    \n
  • \n
  • \n

    \n client-error – HTTP status code 409

    \n
  • \n
  • \n

    \n stream-error – Retry on refused\n stream

    \n
  • \n
" } }, "tcpRetryEvents": { @@ -3343,11 +3355,14 @@ "invert": { "target": "smithy.api#Boolean", "traits": { - "smithy.api#documentation": "

Specify True to match anything except the match criteria. The default value is False.

" + "smithy.api#documentation": "

Specify True to match anything except the match criteria. The default value\n is False.

" } }, "match": { - "target": "com.amazonaws.appmesh#HeaderMatchMethod" + "target": "com.amazonaws.appmesh#HeaderMatchMethod", + "traits": { + "smithy.api#documentation": "

An object that represents the method and value to match with the header value sent in a\n request. Specify one match method.

" + } } }, "traits": { @@ -3613,7 +3628,7 @@ "httpRetryEvents": { "target": "com.amazonaws.appmesh#HttpRetryPolicyEvents", "traits": { - "smithy.api#documentation": "

Specify at least one of the following values.

\n
    \n
  • \n

    \n server-error – HTTP status codes 500, 501,\n 502, 503, 504, 505, 506, 507, 508, 510, and 511

    \n
  • \n
  • \n

    \n gateway-error – HTTP status codes 502,\n 503, and 504

    \n
  • \n
  • \n

    \n client-error – HTTP status code 409

    \n
  • \n
  • \n

    \n stream-error – Retry on refused\n stream

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

Specify at least one of the following values.

\n
    \n
  • \n

    \n server-error – HTTP status codes 500, 501,\n 502, 503, 504, 505, 506, 507, 508, 510, and 511

    \n
  • \n
  • \n

    \n gateway-error – HTTP status codes 502,\n 503, and 504

    \n
  • \n
  • \n

    \n client-error – HTTP status code 409

    \n
  • \n
  • \n

    \n stream-error – Retry on refused\n stream

    \n
  • \n
" } }, "tcpRetryEvents": { @@ -3829,6 +3844,29 @@ "smithy.api#retryable": {} } }, + "com.amazonaws.appmesh#IpPreference": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "IPv6_PREFERRED", + "name": "IPv6_PREFERRED" + }, + { + "value": "IPv4_PREFERRED", + "name": "IPv4_PREFERRED" + }, + { + "value": "IPv4_ONLY", + "name": "IPv4_ONLY" + }, + { + "value": "IPv6_ONLY", + "name": "IPv6_ONLY" + } + ] + } + }, "com.amazonaws.appmesh#LimitExceededException": { "type": "structure", "members": { @@ -3837,7 +3875,7 @@ } }, "traits": { - "smithy.api#documentation": "

You have exceeded a service limit for your account. For more information, see Service\n Limits in the AWS App Mesh User Guide.

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

You have exceeded a service limit for your account. For more information, see Service\n Limits in the App Mesh User Guide.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -3922,7 +3960,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -4006,7 +4044,7 @@ "nextToken": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

The nextToken value returned from a previous paginated\n ListMeshes request where limit was used and the results\n exceeded the value of that parameter. Pagination continues from the end of the previous\n results that returned the nextToken value.

\n \n

This token should be treated as an opaque identifier that is used only to\n retrieve the next items in a list and not for other programmatic purposes.

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

The nextToken value returned from a previous paginated\n ListMeshes request where limit was used and the results\n exceeded the value of that parameter. Pagination continues from the end of the previous\n results that returned the nextToken value.

\n \n

This token should be treated as an opaque identifier that is used only to\n retrieve the next items in a list and not for other programmatic purposes.

\n
", "smithy.api#httpQuery": "nextToken" } }, @@ -4133,7 +4171,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -4343,7 +4381,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -4449,7 +4487,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -4561,7 +4599,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -4673,7 +4711,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -4758,6 +4796,16 @@ "smithy.api#documentation": "

An object that represents a listener for a virtual node.

" } }, + "com.amazonaws.lattice.v20190125#ListenerPort": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 65535 + } + } + }, "com.amazonaws.appmesh#ListenerTimeout": { "type": "union", "members": { @@ -4830,7 +4878,7 @@ } }, "traits": { - "smithy.api#documentation": "

An object that represents an AWS Certicate Manager (ACM) certificate.

" + "smithy.api#documentation": "

An object that represents an Certificate Manager certificate.

" } }, "com.amazonaws.appmesh#ListenerTlsCertificate": { @@ -4839,7 +4887,7 @@ "acm": { "target": "com.amazonaws.appmesh#ListenerTlsAcmCertificate", "traits": { - "smithy.api#documentation": "

A reference to an object that represents an AWS Certicate Manager (ACM) certificate.

" + "smithy.api#documentation": "

A reference to an object that represents an Certificate Manager certificate.

" } }, "file": { @@ -4912,7 +4960,7 @@ } }, "traits": { - "smithy.api#documentation": "

An object that represents the listener's Secret Discovery Service certificate. The proxy\n must be configured with a local SDS provider via a Unix Domain Socket. See App Mesh TLS documentation\n for more info.

" + "smithy.api#documentation": "

An object that represents the listener's Secret Discovery Service certificate. The proxy\n must be configured with a local SDS provider via a Unix Domain Socket. See App Mesh\n TLS\n documentation for more info.

" } }, "com.amazonaws.appmesh#ListenerTlsValidationContext": { @@ -4960,12 +5008,6 @@ "type": "list", "member": { "target": "com.amazonaws.appmesh#Listener" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 1 - } } }, "com.amazonaws.appmesh#Logging": { @@ -5142,14 +5184,14 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, "resourceOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, @@ -5186,6 +5228,20 @@ "smithy.api#documentation": "

An object that represents a service mesh returned by a list operation.

" } }, + "com.amazonaws.appmesh#MeshServiceDiscovery": { + "type": "structure", + "members": { + "ipPreference": { + "target": "com.amazonaws.appmesh#IpPreference", + "traits": { + "smithy.api#documentation": "

The IP version to use to control traffic within the mesh.

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

An object that represents the service discovery information for a service mesh.

" + } + }, "com.amazonaws.appmesh#MeshSpec": { "type": "structure", "members": { @@ -5194,6 +5250,9 @@ "traits": { "smithy.api#documentation": "

The egress filter rules for the service mesh.

" } + }, + "serviceDiscovery": { + "target": "com.amazonaws.appmesh#MeshServiceDiscovery" } }, "traits": { @@ -5450,14 +5509,14 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, "resourceOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } } @@ -5610,14 +5669,14 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, "resourceOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, @@ -6104,7 +6163,7 @@ } }, "traits": { - "smithy.api#documentation": "

An object that represents a Transport Layer Security (TLS) Secret Discovery Service validation context trust. The\n proxy must be configured with a local SDS provider via a Unix Domain Socket. See App Mesh\n TLS\n documentation for more info.

" + "smithy.api#documentation": "

An object that represents a Transport Layer Security (TLS) Secret Discovery Service validation context trust. The\n proxy must be configured with a local SDS provider via a Unix Domain Socket. See App Mesh\n TLS\n documentation for more info.

" } }, "com.amazonaws.appmesh#TlsValidationContextTrust": { @@ -6113,7 +6172,7 @@ "acm": { "target": "com.amazonaws.appmesh#TlsValidationContextAcmTrust", "traits": { - "smithy.api#documentation": "

A reference to an object that represents a Transport Layer Security (TLS) validation context trust for an\n Certificate Manager certificate.

" + "smithy.api#documentation": "

A reference to an object that represents a Transport Layer Security (TLS) validation context trust for an Certificate Manager certificate.

" } }, "file": { @@ -6141,7 +6200,7 @@ } }, "traits": { - "smithy.api#documentation": "

The maximum request rate permitted by the App Mesh APIs has been exceeded for your\n account. For best results, use an increasing or variable sleep interval between\n requests.

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

The maximum request rate permitted by the App Mesh APIs has been exceeded for\n your account. For best results, use an increasing or variable sleep interval between\n requests.

", "smithy.api#error": "client", "smithy.api#httpError": 429, "smithy.api#retryable": { @@ -6321,7 +6380,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -6513,7 +6572,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -6618,7 +6677,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -6717,7 +6776,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -6822,7 +6881,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -6927,7 +6986,7 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#httpQuery": "meshOwner" } } @@ -7532,12 +7591,6 @@ "type": "list", "member": { "target": "com.amazonaws.appmesh#VirtualGatewayListener" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 1 - } } }, "com.amazonaws.appmesh#VirtualGatewayLogging": { @@ -7615,14 +7668,14 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, "resourceOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, @@ -7783,7 +7836,7 @@ } }, "traits": { - "smithy.api#documentation": "

An object that represents a virtual gateway's listener's Transport Layer Security (TLS) Secret Discovery Service\n validation context trust. The proxy must be configured with a local SDS provider via a Unix\n Domain Socket. See App Mesh TLS documentation for more info.

" + "smithy.api#documentation": "

An object that represents a virtual gateway's listener's Transport Layer Security (TLS) Secret Discovery Service\n validation context trust. The proxy must be configured with a local SDS provider via a Unix\n Domain Socket. See App Mesh\n TLS\n documentation for more info.

" } }, "com.amazonaws.appmesh#VirtualGatewayTlsValidationContextTrust": { @@ -7792,7 +7845,7 @@ "acm": { "target": "com.amazonaws.appmesh#VirtualGatewayTlsValidationContextAcmTrust", "traits": { - "smithy.api#documentation": "

A reference to an object that represents a Transport Layer Security (TLS) validation context trust for an\n Certificate Manager certificate.

" + "smithy.api#documentation": "

A reference to an object that represents a Transport Layer Security (TLS) validation context trust for an Certificate Manager certificate.

" } }, "file": { @@ -8004,14 +8057,14 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, "resourceOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, @@ -8261,12 +8314,6 @@ "type": "list", "member": { "target": "com.amazonaws.appmesh#VirtualRouterListener" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 1 - } } }, "com.amazonaws.appmesh#VirtualRouterRef": { @@ -8289,14 +8336,14 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, "resourceOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, @@ -8544,14 +8591,14 @@ "meshOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's\n the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, "resourceOwner": { "target": "com.amazonaws.appmesh#AccountId", "traits": { - "smithy.api#documentation": "

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

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

The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's\n the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes.

", "smithy.api#required": {} } }, @@ -8594,7 +8641,7 @@ "provider": { "target": "com.amazonaws.appmesh#VirtualServiceProvider", "traits": { - "smithy.api#documentation": "

The App Mesh object that is acting as the provider for a virtual service. You can specify\n a single virtual node or virtual router.

" + "smithy.api#documentation": "

The App Mesh object that is acting as the provider for a virtual service. You\n can specify a single virtual node or virtual router.

" } } }, diff --git a/aws/sdk/aws-models/apprunner.json b/aws/sdk/aws-models/apprunner.json index ad29ce60899..d8664c2c476 100644 --- a/aws/sdk/aws-models/apprunner.json +++ b/aws/sdk/aws-models/apprunner.json @@ -549,7 +549,7 @@ "CodeConfiguration": { "target": "com.amazonaws.apprunner#CodeConfiguration", "traits": { - "smithy.api#documentation": "

Configuration for building and running the service from a source code repository.

" + "smithy.api#documentation": "

Configuration for building and running the service from a source code repository.

\n \n

\n CodeConfiguration is required only for CreateService request.

\n
" } } }, @@ -1026,7 +1026,7 @@ "Subnets": { "target": "com.amazonaws.apprunner#StringList", "traits": { - "smithy.api#documentation": "

A list of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single\n Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.

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

A list of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single\n Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.

\n \n

\n App Runner currently only provides support for IPv4.\n

\n
", "smithy.api#required": {} } }, diff --git a/aws/sdk/aws-models/batch.json b/aws/sdk/aws-models/batch.json index 50f9f9c1e7f..716964b4756 100644 --- a/aws/sdk/aws-models/batch.json +++ b/aws/sdk/aws-models/batch.json @@ -688,7 +688,7 @@ "tags": { "target": "com.amazonaws.batch#TagsMap", "traits": { - "smithy.api#documentation": "

Key-value pair tags to be applied to EC2 resources that are launched in the compute environment. For Batch,\n these take the form of \"String1\": \"String2\", where String1 is the tag key and String2 is the tag value−for\n example, { \"Name\": \"Batch Instance - C4OnDemand\" }. This is helpful for recognizing your Batch\n instances in the Amazon EC2 console. These tags can't be updated or removed after the compute environment is created. Any\n changes to these tags require that you create a new compute environment and remove the old compute environment. These\n tags aren't seen when using the Batch ListTagsForResource API operation.

\n \n

This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be\n specified.

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

Key-value pair tags to be applied to EC2 resources that are launched in the compute environment. For Batch,\n these take the form of \"String1\": \"String2\", where String1 is the tag key and String2 is the tag value−for\n example, { \"Name\": \"Batch Instance - C4OnDemand\" }. This is helpful for recognizing your Batch\n instances in the Amazon EC2 console. Updating these tags requires an infrastructure update to the compute environment. For\n more information, see Updating compute\n environments in the Batch User Guide. These tags aren't seen when using the Batch\n ListTagsForResource API operation.

\n \n

This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be\n specified.

\n
" } }, "placementGroup": { @@ -1221,7 +1221,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an Batch compute environment. You can create MANAGED or UNMANAGED compute\n environments. MANAGED compute environments can use Amazon EC2 or Fargate resources.\n UNMANAGED compute environments can only use EC2 resources.

\n

In a managed compute environment, Batch manages the capacity and instance types of the compute resources\n within the environment. This is based on the compute resource specification that you define or the launch template that you\n specify when you create the compute environment. Either, you can choose to use EC2 On-Demand Instances and EC2 Spot\n Instances. Or, you can use Fargate and Fargate Spot capacity in your managed compute environment. You can\n optionally set a maximum price so that Spot Instances only launch when the Spot Instance price is less than a\n specified percentage of the On-Demand price.

\n \n

Multi-node parallel jobs aren't supported on Spot Instances.

\n
\n

In an unmanaged compute environment, you can manage your own EC2 compute resources and have a lot of flexibility\n with how you configure your compute resources. For example, you can use custom AMIs. However, you must verify that\n each of your AMIs meet the Amazon ECS container instance AMI specification. For more information, see container instance AMIs in the\n Amazon Elastic Container Service Developer Guide. After you created your unmanaged compute environment, you can use the DescribeComputeEnvironments operation to find the Amazon ECS cluster that's associated with it. Then, launch\n your container instances into that Amazon ECS cluster. For more information, see Launching an Amazon ECS container instance in the\n Amazon Elastic Container Service Developer Guide.

\n \n

Batch doesn't upgrade the AMIs in a compute environment after the environment is created. For example, it\n doesn't update the AMIs when a newer version of the Amazon ECS optimized AMI is available. Therefore, you're responsible\n for managing the guest operating system (including its updates and security patches) and any additional application\n software or utilities that you install on the compute resources. To use a new AMI for your Batch jobs, complete\n these steps:

\n
    \n
  1. \n

    Create a new compute environment with the new AMI.

    \n
  2. \n
  3. \n

    Add the compute environment to an existing job queue.

    \n
  4. \n
  5. \n

    Remove the earlier compute environment from your job queue.

    \n
  6. \n
  7. \n

    Delete the earlier compute environment.

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

Creates an Batch compute environment. You can create MANAGED or UNMANAGED compute\n environments. MANAGED compute environments can use Amazon EC2 or Fargate resources.\n UNMANAGED compute environments can only use EC2 resources.

\n

In a managed compute environment, Batch manages the capacity and instance types of the compute resources\n within the environment. This is based on the compute resource specification that you define or the launch template that you\n specify when you create the compute environment. Either, you can choose to use EC2 On-Demand Instances and EC2 Spot\n Instances. Or, you can use Fargate and Fargate Spot capacity in your managed compute environment. You can\n optionally set a maximum price so that Spot Instances only launch when the Spot Instance price is less than a\n specified percentage of the On-Demand price.

\n \n

Multi-node parallel jobs aren't supported on Spot Instances.

\n
\n

In an unmanaged compute environment, you can manage your own EC2 compute resources and have a lot of flexibility\n with how you configure your compute resources. For example, you can use custom AMIs. However, you must verify that\n each of your AMIs meet the Amazon ECS container instance AMI specification. For more information, see container instance AMIs in the\n Amazon Elastic Container Service Developer Guide. After you created your unmanaged compute environment, you can use the DescribeComputeEnvironments operation to find the Amazon ECS cluster that's associated with it. Then, launch\n your container instances into that Amazon ECS cluster. For more information, see Launching an Amazon ECS container instance in the\n Amazon Elastic Container Service Developer Guide.

\n \n

Batch doesn't automatically upgrade the AMIs in a compute environment after it's created. For example, it\n also doesn't update the AMIs in your compute environment when a newer version of the Amazon ECS optimized AMI is\n available. You're responsible for the management of the guest operating system. This includes any updates and\n security patches. You're also responsible for any additional application software or utilities that you install on\n the compute resources. There are two ways to use a new AMI for your Batch jobs. The original method is to complete\n these steps:

\n
    \n
  1. \n

    Create a new compute environment with the new AMI.

    \n
  2. \n
  3. \n

    Add the compute environment to an existing job queue.

    \n
  4. \n
  5. \n

    Remove the earlier compute environment from your job queue.

    \n
  6. \n
  7. \n

    Delete the earlier compute environment.

    \n
  8. \n
\n

In April 2022, Batch added enhanced support for updating compute environments. For more information, see\n Updating compute\n environments. To use the enhanced updating of compute environments to update AMIs, follow these\n rules:

\n
    \n
  • \n

    Either do not set the service role (serviceRole) parameter or set it to the AWSBatchServiceRole service-linked role.

    \n
  • \n
  • \n

    Set the allocation strategy (allocationStrategy) parameter to BEST_FIT_PROGRESSIVE\n or SPOT_CAPACITY_OPTIMIZED.

    \n
  • \n
  • \n

    Set the update to latest image version (updateToLatestImageVersion) parameter to\n true.

    \n
  • \n
  • \n

    Do not specify an AMI ID in imageId, imageIdOverride (in \n ec2Configuration\n ), or in the launch template (launchTemplate). In that case\n Batch will select the latest Amazon ECS optimized AMI supported by Batch at the time the infrastructure update is\n initiated. Alternatively you can specify the AMI ID in the imageId or imageIdOverride\n parameters, or the launch template identified by the LaunchTemplate properties. Changing any of these\n properties will trigger an infrastructure update. If the AMI ID is specified in the launch template, it can not be\n replaced by specifying an AMI ID in either the imageId or imageIdOverride parameters. It\n can only be replaced by specifying a different launch template, or if the launch template version is set to\n $Default or $Latest, by setting either a new default version for the launch template\n (if $Default)or by adding a new version to the launch template (if $Latest).

    \n
  • \n
\n

If these rules are followed, any update that triggers an infrastructure update will cause the AMI ID to be\n re-selected. If the version setting in the launch template (launchTemplate) is set to\n $Latest or $Default, the latest or default version of the launch template will be\n evaluated up at the time of the infrastructure update, even if the launchTemplate was not\n updated.

\n
", "smithy.api#http": { "method": "POST", "uri": "/v1/createcomputeenvironment", @@ -1659,6 +1659,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "computeEnvironments", "pageSize": "maxResults" } } @@ -1732,6 +1733,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "jobDefinitions", "pageSize": "maxResults" } } @@ -1817,6 +1819,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "jobQueues", "pageSize": "maxResults" } } @@ -2977,6 +2980,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "jobSummaryList", "pageSize": "maxResults" } } @@ -3081,6 +3085,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "schedulingPolicies", "pageSize": "maxResults" } } @@ -3900,7 +3905,7 @@ "shareIdentifier": { "target": "com.amazonaws.batch#String", "traits": { - "smithy.api#documentation": "

The share identifier for the job.

" + "smithy.api#documentation": "

The share identifier for the job. If the job queue does not have a scheduling policy, then this parameter must\n not be specified. If the job queue has a scheduling policy, then this parameter must be specified.

" } }, "schedulingPriorityOverride": { diff --git a/aws/sdk/aws-models/cloudformation.json b/aws/sdk/aws-models/cloudformation.json index 667bd5700d6..1b699ba2eae 100644 --- a/aws/sdk/aws-models/cloudformation.json +++ b/aws/sdk/aws-models/cloudformation.json @@ -158,7 +158,7 @@ "PublicTypeArn": { "target": "com.amazonaws.cloudformation#ThirdPartyTypeArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the public extension.

\n

Conditional: You must specify PublicTypeArn, or TypeName,\n Type, and PublisherId.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the public extension.

\n

Conditional: You must specify PublicTypeArn, or TypeName,\n Type, and PublisherId.

" } }, "PublisherId": { @@ -214,7 +214,7 @@ "Arn": { "target": "com.amazonaws.cloudformation#PrivateTypeArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the activated extension, in this account and\n region.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the activated extension, in this account and\n region.

" } } } @@ -417,6 +417,9 @@ "input": { "target": "com.amazonaws.cloudformation#CancelUpdateStackInput" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudformation#TokenAlreadyExistsException" @@ -1284,7 +1287,7 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to create the stack.

\n
    \n
  • \n

    \n CAPABILITY_IAM and CAPABILITY_NAMED_IAM\n

    \n

    Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this\n by specifying one of these capabilities.

    \n

    The following IAM resources require you to specify either the\n CAPABILITY_IAM or CAPABILITY_NAMED_IAM\n capability.

    \n
      \n
    • \n

      If you have IAM resources, you can specify either\n capability.

      \n
    • \n
    • \n

      If you have IAM resources with custom names, you\n must specify CAPABILITY_NAMED_IAM.

      \n
    • \n
    • \n

      If you don't specify either of these capabilities, CloudFormation\n returns an InsufficientCapabilities error.

      \n
    • \n
    \n

    If your stack template contains these resources, we recommend that you review all\n permissions associated with them and edit their permissions if necessary.

    \n \n

    For more information, see Acknowledging IAM resources in CloudFormation templates.

    \n
  • \n
  • \n

    \n CAPABILITY_AUTO_EXPAND\n

    \n

    Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually creating the stack. If your stack template contains one or\n more macros, and you choose to create a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.

    \n \n

    This capacity doesn't apply to creating change sets, and specifying it when\n creating change sets has no effect.

    \n

    If you want to create a stack from a stack template that contains macros\n and nested stacks, you must create or update the stack\n directly from the template using the CreateStack or UpdateStack action, and specifying this capability.

    \n
    \n

    For more information on macros, see Using CloudFormation macros to\n perform custom processing on templates.

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

In some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to create the stack.

\n
    \n
  • \n

    \n CAPABILITY_IAM and CAPABILITY_NAMED_IAM\n

    \n

    Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this\n by specifying one of these capabilities.

    \n

    The following IAM resources require you to specify either the\n CAPABILITY_IAM or CAPABILITY_NAMED_IAM\n capability.

    \n
      \n
    • \n

      If you have IAM resources, you can specify either\n capability.

      \n
    • \n
    • \n

      If you have IAM resources with custom names, you\n must specify CAPABILITY_NAMED_IAM.

      \n
    • \n
    • \n

      If you don't specify either of these capabilities, CloudFormation\n returns an InsufficientCapabilities error.

      \n
    • \n
    \n

    If your stack template contains these resources, we suggest that you review all\n permissions associated with them and edit their permissions if necessary.

    \n \n

    For more information, see Acknowledging IAM resources in CloudFormation templates.

    \n
  • \n
  • \n

    \n CAPABILITY_AUTO_EXPAND\n

    \n

    Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually creating the stack. If your stack template contains one or\n more macros, and you choose to create a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.

    \n \n

    This capacity doesn't apply to creating change sets, and specifying it when\n creating change sets has no effect.

    \n

    If you want to create a stack from a stack template that contains macros\n and nested stacks, you must create or update the stack\n directly from the template using the CreateStack or UpdateStack action, and specifying this capability.

    \n
    \n

    For more information about macros, see Using CloudFormation macros to\n perform custom processing on templates.

    \n
  • \n
" } }, "ResourceTypes": { @@ -1683,7 +1686,7 @@ "StackId": { "target": "com.amazonaws.cloudformation#StackId", "traits": { - "smithy.api#documentation": "

The stack ID you are importing into a new stack set. Specify the Amazon Resource Number\n (ARN) of the stack.

" + "smithy.api#documentation": "

The stack ID you are importing into a new stack set. Specify the Amazon Resource Name\n (ARN) of the stack.

" } }, "Parameters": { @@ -1707,7 +1710,7 @@ "AdministrationRoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the IAM role to use to create this\n stack set.

\n

Specify an IAM role only if you are using customized administrator roles\n to control which users or groups can manage specific stack sets within the same\n administrator account. For more information, see Prerequisites: Granting Permissions for Stack\n Set Operations in the CloudFormation User Guide.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role to use to create this\n stack set.

\n

Specify an IAM role only if you are using customized administrator roles\n to control which users or groups can manage specific stack sets within the same\n administrator account. For more information, see Prerequisites: Granting Permissions for Stack\n Set Operations in the CloudFormation User Guide.

" } }, "ExecutionRoleName": { @@ -1878,6 +1881,9 @@ "input": { "target": "com.amazonaws.cloudformation#DeleteStackInput" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudformation#TokenAlreadyExistsException" @@ -2034,7 +2040,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a stack set. Before you can delete a stack set, all of its member stack\n instances must be deleted. For more information about how to do this, see DeleteStackInstances.

" + "smithy.api#documentation": "

Deletes a stack set. Before you can delete a stack set, all its member stack instances\n must be deleted. For more information about how to complete this, see DeleteStackInstances.

" } }, "com.amazonaws.cloudformation#DeleteStackSetInput": { @@ -2519,7 +2525,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about a CloudFormation extension publisher.

\n

If you don't supply a PublisherId, and you have registered as an extension\n publisher, DescribePublisher returns information about your own publisher\n account.

\n

For more information on registering as a publisher, see:

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

Returns information about a CloudFormation extension publisher.

\n

If you don't supply a PublisherId, and you have registered as an extension\n publisher, DescribePublisher returns information about your own publisher\n account.

\n

For more information about registering as a publisher, see:

\n ", "smithy.api#idempotent": {} } }, @@ -2572,7 +2578,7 @@ "target": "com.amazonaws.cloudformation#DescribeStackDriftDetectionStatusOutput" }, "traits": { - "smithy.api#documentation": "

Returns information about a stack drift detection operation. A stack drift detection\n operation detects whether a stack's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. A stack is considered to have\n drifted if one or more of its resources have drifted. For more information on stack and\n resource drift, see Detecting\n Unregulated Configuration Changes to Stacks and Resources.

\n

Use DetectStackDrift to initiate a stack drift detection operation.\n DetectStackDrift returns a StackDriftDetectionId you can use\n to monitor the progress of the operation using\n DescribeStackDriftDetectionStatus. Once the drift detection operation has\n completed, use DescribeStackResourceDrifts to return drift information\n about the stack and its resources.

" + "smithy.api#documentation": "

Returns information about a stack drift detection operation. A stack drift detection\n operation detects whether a stack's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. A stack is considered to have\n drifted if one or more of its resources have drifted. For more information about stack and\n resource drift, see Detecting\n Unregulated Configuration Changes to Stacks and Resources.

\n

Use DetectStackDrift to initiate a stack drift detection operation.\n DetectStackDrift returns a StackDriftDetectionId you can use\n to monitor the progress of the operation using\n DescribeStackDriftDetectionStatus. Once the drift detection operation has\n completed, use DescribeStackResourceDrifts to return drift information\n about the stack and its resources.

" } }, "com.amazonaws.cloudformation#DescribeStackDriftDetectionStatusInput": { @@ -2830,7 +2836,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "

If the request doesn't return all of the remaining results, NextToken is\n set to a token. To retrieve the next set of results, call\n DescribeStackResourceDrifts again and assign that token to the request\n object's NextToken parameter. If the request returns all results,\n NextToken is set to null.

" + "smithy.api#documentation": "

If the request doesn't return all the remaining results, NextToken is set\n to a token. To retrieve the next set of results, call\n DescribeStackResourceDrifts again and assign that token to the request\n object's NextToken parameter. If the request returns all results,\n NextToken is set to null.

" } } } @@ -3485,7 +3491,7 @@ "PublisherId": { "target": "com.amazonaws.cloudformation#PublisherId", "traits": { - "smithy.api#documentation": "

The publisher ID of the extension publisher.

\n

Extensions provided by Amazon are not assigned a publisher ID.

" + "smithy.api#documentation": "

The publisher ID of the extension publisher.

\n

Extensions provided by Amazon Web Services are not assigned a publisher ID.

" } }, "PublicVersionNumber": { @@ -3520,25 +3526,25 @@ "DefaultVersionId": { "target": "com.amazonaws.cloudformation#TypeVersionId", "traits": { - "smithy.api#documentation": "

The ID of the default version of the extension. The default version is used when the\n extension version isn't specified.

\n

This applies only to private extensions you have registered in your account. For public\n extensions, both those provided by Amazon and published by third parties, CloudFormation returns null. For more information, see RegisterType.

\n

To set the default version of an extension, use \n SetTypeDefaultVersion\n .

" + "smithy.api#documentation": "

The ID of the default version of the extension. The default version is used when the\n extension version isn't specified.

\n

This applies only to private extensions you have registered in your account. For public\n extensions, both those provided by Amazon Web Services and published by third parties, CloudFormation returns null. For more information, see RegisterType.

\n

To set the default version of an extension, use \n SetTypeDefaultVersion\n .

" } }, "IsDefaultVersion": { "target": "com.amazonaws.cloudformation#IsDefaultVersion", "traits": { - "smithy.api#documentation": "

Whether the specified extension version is set as the default version.

\n

This applies only to private extensions you have registered in your account, and\n extensions published by Amazon. For public third-party extensions, whether or not they are\n activated in your account, CloudFormation returns null.

" + "smithy.api#documentation": "

Whether the specified extension version is set as the default version.

\n

This applies only to private extensions you have registered in your account, and\n extensions published by Amazon Web Services. For public third-party extensions, whether they\n are activated in your account, CloudFormation returns null.

" } }, "TypeTestsStatus": { "target": "com.amazonaws.cloudformation#TypeTestsStatus", "traits": { - "smithy.api#documentation": "

The contract test status of the registered extension version. To return the extension\n test status of a specific extension version, you must specify\n VersionId.

\n

This applies only to registered private extension versions. CloudFormation\n doesn't return this information for public extensions, whether or not they are activated in\n your account.

\n
    \n
  • \n

    \n PASSED: The extension has passed all its contract tests.

    \n

    An extension must have a test status of PASSED before it can be\n published. For more information, see Publishing extensions to make them available for public\n use in the CloudFormation Command Line Interface User\n Guide.

    \n
  • \n
  • \n

    \n FAILED: The extension has failed one or more contract tests.

    \n
  • \n
  • \n

    \n IN_PROGRESS: Contract tests are currently being performed on the\n extension.

    \n
  • \n
  • \n

    \n NOT_TESTED: Contract tests haven't been performed on the\n extension.

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

The contract test status of the registered extension version. To return the extension\n test status of a specific extension version, you must specify\n VersionId.

\n

This applies only to registered private extension versions. CloudFormation\n doesn't return this information for public extensions, whether they are activated in your\n account.

\n
    \n
  • \n

    \n PASSED: The extension has passed all its contract tests.

    \n

    An extension must have a test status of PASSED before it can be\n published. For more information, see Publishing extensions to make them available for public\n use in the CloudFormation Command Line Interface User\n Guide.

    \n
  • \n
  • \n

    \n FAILED: The extension has failed one or more contract tests.

    \n
  • \n
  • \n

    \n IN_PROGRESS: Contract tests are currently being performed on the\n extension.

    \n
  • \n
  • \n

    \n NOT_TESTED: Contract tests haven't been performed on the\n extension.

    \n
  • \n
" } }, "TypeTestsStatusDescription": { "target": "com.amazonaws.cloudformation#TypeTestsStatusDescription", "traits": { - "smithy.api#documentation": "

The description of the test status. To return the extension test status of a specific\n extension version, you must specify VersionId.

\n

This applies only to registered private extension versions. CloudFormation\n doesn't return this information for public extensions, whether or not they are activated in\n your account.

" + "smithy.api#documentation": "

The description of the test status. To return the extension test status of a specific\n extension version, you must specify VersionId.

\n

This applies only to registered private extension versions. CloudFormation\n doesn't return this information for public extensions, whether they are activated in your\n account.

" } }, "Description": { @@ -3550,7 +3556,7 @@ "Schema": { "target": "com.amazonaws.cloudformation#TypeSchema", "traits": { - "smithy.api#documentation": "

The schema that defines the extension.

\n

For more information on extension schemas, see Resource Provider\n Schema in the CloudFormation CLI User\n Guide.

" + "smithy.api#documentation": "

The schema that defines the extension.

\n

For more information about extension schemas, see Resource Provider\n Schema in the CloudFormation CLI User\n Guide.

" } }, "ProvisioningType": { @@ -3568,7 +3574,7 @@ "LoggingConfig": { "target": "com.amazonaws.cloudformation#LoggingConfig", "traits": { - "smithy.api#documentation": "

Contains logging configuration information for private extensions. This applies only to\n private extensions you have registered in your account. For public extensions, both those\n provided by Amazon and published by third parties, CloudFormation returns\n null. For more information, see RegisterType.

" + "smithy.api#documentation": "

Contains logging configuration information for private extensions. This applies only to\n private extensions you have registered in your account. For public extensions, both those\n provided by Amazon Web Services and published by third parties, CloudFormation returns\n null. For more information, see RegisterType.

" } }, "RequiredActivatedTypes": { @@ -3580,13 +3586,13 @@ "ExecutionRoleArn": { "target": "com.amazonaws.cloudformation#RoleARN2", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM execution role used to register\n the extension. This applies only to private extensions you have registered in your account.\n For more information, see RegisterType.

\n

\n

If the registered extension calls any Amazon Web Services APIs, you must create an\n \n IAM execution role\n that includes the necessary\n permissions to call those Amazon Web Services APIs, and provision that execution role in\n your account. CloudFormation then assumes that execution role to provide your\n extension with the appropriate credentials.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM execution role used to register\n the extension. This applies only to private extensions you have registered in your account.\n For more information, see RegisterType.

\n

If the registered extension calls any Amazon Web Services APIs, you must create an\n \n IAM execution role\n that includes the necessary\n permissions to call those Amazon Web Services APIs, and provision that execution role in\n your account. CloudFormation then assumes that execution role to provide your\n extension with the appropriate credentials.

" } }, "Visibility": { "target": "com.amazonaws.cloudformation#Visibility", "traits": { - "smithy.api#documentation": "

The scope at which the extension is visible and usable in CloudFormation\n operations.

\n

Valid values include:

\n
    \n
  • \n

    \n PRIVATE: The extension is only visible and usable within the account\n in which it is registered. CloudFormation marks any extensions you register as\n PRIVATE.

    \n
  • \n
  • \n

    \n PUBLIC: The extension is publicly visible and usable within any\n Amazon account.

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

The scope at which the extension is visible and usable in CloudFormation\n operations.

\n

Valid values include:

\n
    \n
  • \n

    \n PRIVATE: The extension is only visible and usable within the account\n in which it is registered. CloudFormation marks any extensions you register as\n PRIVATE.

    \n
  • \n
  • \n

    \n PUBLIC: The extension is publicly visible and usable within any\n Amazon Web Services account.

    \n
  • \n
" } }, "SourceUrl": { @@ -3652,7 +3658,7 @@ "IsActivated": { "target": "com.amazonaws.cloudformation#IsActivated", "traits": { - "smithy.api#documentation": "

Whether or not the extension is activated in the account and region.

\n

This only applies to public third-party extensions. For all other extensions, CloudFormation returns null.

" + "smithy.api#documentation": "

Whether the extension is activated in the account and region.

\n

This only applies to public third-party extensions. For all other extensions, CloudFormation returns null.

" } }, "AutoUpdate": { @@ -3864,7 +3870,7 @@ } ], "traits": { - "smithy.api#documentation": "

Detect drift on a stack set. When CloudFormation performs drift detection on a\n stack set, it performs drift detection on the stack associated with each stack instance in\n the stack set. For more information, see How CloudFormation performs drift detection on a stack set.

\n

\n DetectStackSetDrift returns the OperationId of the stack set\n drift detection operation. Use this operation id with \n DescribeStackSetOperation\n to monitor the progress of the drift\n detection operation. The drift detection operation may take some time, depending on the\n number of stack instances included in the stack set, in addition to the number of resources\n included in each stack.

\n

Once the operation has completed, use the following actions to return drift\n information:

\n
    \n
  • \n

    Use \n DescribeStackSet\n to return detailed information\n about the stack set, including detailed information about the last\n completed drift operation performed on the stack set.\n (Information about drift operations that are in progress isn't included.)

    \n
  • \n
  • \n

    Use \n ListStackInstances\n to return a list of stack\n instances belonging to the stack set, including the drift status and last drift time\n checked of each instance.

    \n
  • \n
  • \n

    Use \n DescribeStackInstance\n to return detailed\n information about a specific stack instance, including its drift status and last\n drift time checked.

    \n
  • \n
\n

For more information on performing a drift detection operation on a stack set, see\n Detecting unmanaged\n changes in stack sets.

\n

You can only run a single drift detection operation on a given stack set at one\n time.

\n

To stop a drift detection stack set operation, use \n StopStackSetOperation\n .

" + "smithy.api#documentation": "

Detect drift on a stack set. When CloudFormation performs drift detection on a\n stack set, it performs drift detection on the stack associated with each stack instance in\n the stack set. For more information, see How CloudFormation performs drift detection on a stack set.

\n

\n DetectStackSetDrift returns the OperationId of the stack set\n drift detection operation. Use this operation id with \n DescribeStackSetOperation\n to monitor the progress of the drift\n detection operation. The drift detection operation may take some time, depending on the\n number of stack instances included in the stack set, in addition to the number of resources\n included in each stack.

\n

Once the operation has completed, use the following actions to return drift\n information:

\n
    \n
  • \n

    Use \n DescribeStackSet\n to return detailed information\n about the stack set, including detailed information about the last\n completed drift operation performed on the stack set.\n (Information about drift operations that are in progress isn't included.)

    \n
  • \n
  • \n

    Use \n ListStackInstances\n to return a list of stack\n instances belonging to the stack set, including the drift status and last drift time\n checked of each instance.

    \n
  • \n
  • \n

    Use \n DescribeStackInstance\n to return detailed\n information about a specific stack instance, including its drift status and last\n drift time checked.

    \n
  • \n
\n

For more information about performing a drift detection operation on a stack set, see\n Detecting unmanaged\n changes in stack sets.

\n

You can only run a single drift detection operation on a given stack set at one\n time.

\n

To stop a drift detection stack set operation, use \n StopStackSetOperation\n .

" } }, "com.amazonaws.cloudformation#DetectStackSetDriftInput": { @@ -4875,7 +4881,7 @@ "code": "LimitExceededException", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The quota for the resource has already been reached.

\n

For information on resource and stack limitations, see CloudFormation\n quotas in the CloudFormation User Guide.

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

The quota for the resource has already been reached.

\n

For information about resource and stack limitations, see CloudFormation\n quotas in the CloudFormation User Guide.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -5080,7 +5086,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "

If the previous request didn't return all of the remaining results, the response's\n NextToken parameter value is set to a token. To retrieve the next set of\n results, call ListStackInstances again and assign that token to the request\n object's NextToken parameter. If there are no remaining results, the previous\n response object's NextToken parameter is set to null.

" + "smithy.api#documentation": "

If the previous request didn't return all the remaining results, the response's\n NextToken parameter value is set to a token. To retrieve the next set of\n results, call ListStackInstances again and assign that token to the request\n object's NextToken parameter. If there are no remaining results, the previous\n response object's NextToken parameter is set to null.

" } }, "MaxResults": { @@ -5236,7 +5242,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "

If the previous request didn't return all of the remaining results, the response\n object's NextToken parameter value is set to a token. To retrieve the next set\n of results, call ListStackSetOperationResults again and assign that token to\n the request object's NextToken parameter. If there are no remaining results,\n the previous response object's NextToken parameter is set to\n null.

" + "smithy.api#documentation": "

If the previous request didn't return all the remaining results, the response object's\n NextToken parameter value is set to a token. To retrieve the next set of\n results, call ListStackSetOperationResults again and assign that token to the\n request object's NextToken parameter. If there are no remaining results, the\n previous response object's NextToken parameter is set to\n null.

" } }, "MaxResults": { @@ -5537,7 +5543,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "

If the request doesn't return all of the remaining results, NextToken is\n set to a token. To retrieve the next set of results, call this action again and assign that\n token to the request object's NextToken parameter. If the request returns all\n results, NextToken is set to null.

" + "smithy.api#documentation": "

If the request doesn't return all the remaining results, NextToken is set\n to a token. To retrieve the next set of results, call this action again and assign that\n token to the request object's NextToken parameter. If the request returns all\n results, NextToken is set to null.

" } } } @@ -5659,7 +5665,7 @@ "Visibility": { "target": "com.amazonaws.cloudformation#Visibility", "traits": { - "smithy.api#documentation": "

The scope at which the extensions are visible and usable in CloudFormation\n operations.

\n

Valid values include:

\n
    \n
  • \n

    \n PRIVATE: Extensions that are visible and usable within this account\n and region. This includes:

    \n
      \n
    • \n

      Private extensions you have registered in this account and region.

      \n
    • \n
    • \n

      Public extensions that you have activated in this account and region.

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

    \n PUBLIC: Extensions that are publicly visible and available to be\n activated within any Amazon account. This includes extensions from Amazon, as well as\n third-party publishers.

    \n
  • \n
\n

The default is PRIVATE.

" + "smithy.api#documentation": "

The scope at which the extensions are visible and usable in CloudFormation\n operations.

\n

Valid values include:

\n
    \n
  • \n

    \n PRIVATE: Extensions that are visible and usable within this account\n and region. This includes:

    \n
      \n
    • \n

      Private extensions you have registered in this account and region.

      \n
    • \n
    • \n

      Public extensions that you have activated in this account and region.

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

    \n PUBLIC: Extensions that are publicly visible and available to be\n activated within any Amazon Web Services account. This includes extensions from Amazon Web Services, in\n addition to third-party publishers.

    \n
  • \n
\n

The default is PRIVATE.

" } }, "ProvisioningType": { @@ -5695,7 +5701,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "

If the previous paginated request didn't return all of the remaining results, the\n response object's NextToken parameter value is set to a token. To retrieve the\n next set of results, call this action again and assign that token to the request object's\n NextToken parameter. If there are no remaining results, the previous\n response object's NextToken parameter is set to null.

" + "smithy.api#documentation": "

If the previous paginated request didn't return all the remaining results, the response\n object's NextToken parameter value is set to a token. To retrieve the next set\n of results, call this action again and assign that token to the request object's\n NextToken parameter. If there are no remaining results, the previous\n response object's NextToken parameter is set to null.

" } } } @@ -5846,7 +5852,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains information about the module from which the resource was created, if the\n resource was created from a module included in the stack template.

\n

For more information on modules, see Using modules to encapsulate and\n reuse resource configurations in the\n CloudFormation User Guide.

" + "smithy.api#documentation": "

Contains information about the module from which the resource was created, if the\n resource was created from a module included in the stack template.

\n

For more information about modules, see Using modules to encapsulate and\n reuse resource configurations in the\n CloudFormation User Guide.

" } }, "com.amazonaws.cloudformation#MonitoringTimeInMinutes": { @@ -6353,7 +6359,7 @@ } ], "traits": { - "smithy.api#documentation": "

Publishes the specified extension to the CloudFormation registry as a public\n extension in this region. Public extensions are available for use by all CloudFormation users. For more information on publishing extensions, see Publishing extensions to make them available for public use in the\n CloudFormation CLI User Guide.

\n

To publish an extension, you must be registered as a publisher with CloudFormation. For more information, see RegisterPublisher.

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

Publishes the specified extension to the CloudFormation registry as a public\n extension in this region. Public extensions are available for use by all CloudFormation users. For more information about publishing extensions, see Publishing extensions to make them available for public use in the\n CloudFormation CLI User Guide.

\n

To publish an extension, you must be registered as a publisher with CloudFormation. For more information, see RegisterPublisher.

", "smithy.api#idempotent": {} } }, @@ -6369,7 +6375,7 @@ "Arn": { "target": "com.amazonaws.cloudformation#PrivateTypeArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the extension.

\n

Conditional: You must specify Arn, or TypeName and\n Type.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the extension.

\n

Conditional: You must specify Arn, or TypeName and\n Type.

" } }, "TypeName": { @@ -6392,7 +6398,7 @@ "PublicTypeArn": { "target": "com.amazonaws.cloudformation#TypeArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) assigned to the public extension upon\n publication.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) assigned to the public extension upon\n publication.

" } } } @@ -6560,7 +6566,7 @@ } ], "traits": { - "smithy.api#documentation": "

Registers your account as a publisher of public extensions in the CloudFormation registry. Public extensions are available for use by all CloudFormation users.\n This publisher ID applies to your account in all Amazon Web Services Regions.

\n

For information on requirements for registering as a public extension publisher, see\n Registering your account to publish CloudFormation\n extensions in the CloudFormation CLI User\n Guide.

\n

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

Registers your account as a publisher of public extensions in the CloudFormation registry. Public extensions are available for use by all CloudFormation users.\n This publisher ID applies to your account in all Amazon Web Services Regions.

\n

For information about requirements for registering as a public extension publisher, see\n Registering your account to publish CloudFormation\n extensions in the CloudFormation CLI User\n Guide.

\n

", "smithy.api#idempotent": {} } }, @@ -6606,7 +6612,7 @@ } ], "traits": { - "smithy.api#documentation": "

Registers an extension with the CloudFormation service. Registering an\n extension makes it available for use in CloudFormation templates in your Amazon Web Services account, and includes:

\n
    \n
  • \n

    Validating the extension schema.

    \n
  • \n
  • \n

    Determining which handlers, if any, have been specified for the extension.

    \n
  • \n
  • \n

    Making the extension available for use in your account.

    \n
  • \n
\n

For more information on how to develop extensions and ready them for registration, see\n Creating Resource\n Providers in the CloudFormation CLI User\n Guide.

\n

You can have a maximum of 50 resource extension versions registered at a time. This\n maximum is per account and per region. Use DeregisterType to deregister specific extension versions if necessary.

\n

Once you have initiated a registration request using \n RegisterType\n , you can use \n DescribeTypeRegistration\n to\n monitor the progress of the registration request.

\n

Once you have registered a private extension in your account and region, use SetTypeConfiguration to specify configuration properties for the extension. For\n more information, see Configuring extensions at the account level in the CloudFormation User Guide.

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

Registers an extension with the CloudFormation service. Registering an\n extension makes it available for use in CloudFormation templates in your Amazon Web Services account, and includes:

\n
    \n
  • \n

    Validating the extension schema.

    \n
  • \n
  • \n

    Determining which handlers, if any, have been specified for the extension.

    \n
  • \n
  • \n

    Making the extension available for use in your account.

    \n
  • \n
\n

For more information about how to develop extensions and ready them for registration,\n see Creating Resource\n Providers in the CloudFormation CLI User\n Guide.

\n

You can have a maximum of 50 resource extension versions registered at a time. This\n maximum is per account and per region. Use DeregisterType to deregister specific extension versions if necessary.

\n

Once you have initiated a registration request using \n RegisterType\n , you can use \n DescribeTypeRegistration\n to\n monitor the progress of the registration request.

\n

Once you have registered a private extension in your account and region, use SetTypeConfiguration to specify configuration properties for the extension. For\n more information, see Configuring extensions at the account level in the CloudFormation User Guide.

", "smithy.api#idempotent": {} } }, @@ -6622,14 +6628,14 @@ "TypeName": { "target": "com.amazonaws.cloudformation#TypeName", "traits": { - "smithy.api#documentation": "

The name of the extension being registered.

\n

We recommend that extension names adhere to the following patterns:

\n
    \n
  • \n

    For resource types,\n company_or_organization::service::type.

    \n
  • \n
  • \n

    For modules,\n company_or_organization::service::type::MODULE.

    \n
  • \n
\n\n \n

The following organization namespaces are reserved and can't be used in your\n extension names:

\n
    \n
  • \n

    \n Alexa\n

    \n
  • \n
  • \n

    \n AMZN\n

    \n
  • \n
  • \n

    \n Amazon\n

    \n
  • \n
  • \n

    \n AWS\n

    \n
  • \n
  • \n

    \n Custom\n

    \n
  • \n
  • \n

    \n Dev\n

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

The name of the extension being registered.

\n

We suggest that extension names adhere to the following patterns:

\n
    \n
  • \n

    For resource types,\n company_or_organization::service::type.

    \n
  • \n
  • \n

    For modules,\n company_or_organization::service::type::MODULE.

    \n
  • \n
  • \n

    For hooks, MyCompany::Testing::MyTestHook.

    \n
  • \n
\n\n \n

The following organization namespaces are reserved and can't be used in your\n extension names:

\n
    \n
  • \n

    \n Alexa\n

    \n
  • \n
  • \n

    \n AMZN\n

    \n
  • \n
  • \n

    \n Amazon\n

    \n
  • \n
  • \n

    \n AWS\n

    \n
  • \n
  • \n

    \n Custom\n

    \n
  • \n
  • \n

    \n Dev\n

    \n
  • \n
\n
", "smithy.api#required": {} } }, "SchemaHandlerPackage": { "target": "com.amazonaws.cloudformation#S3Url", "traits": { - "smithy.api#documentation": "

A URL to the S3 bucket containing the extension project package that contains the\n necessary files for the extension you want to register.

\n

For information on generating a schema handler package for the extension you want to\n register, see submit\n in the CloudFormation CLI User Guide.

\n \n

The user registering the extension must be able to access the package in the S3\n bucket. That's, the user needs to have GetObject permissions for the\n schema handler package. For more information, see Actions, Resources, and Condition Keys\n for Amazon S3 in the Identity and Access Management User\n Guide.

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

A URL to the S3 bucket containing the extension project package that contains the\n necessary files for the extension you want to register.

\n

For information about generating a schema handler package for the extension you want to\n register, see submit\n in the CloudFormation CLI User Guide.

\n \n

The user registering the extension must be able to access the package in the S3\n bucket. That's, the user needs to have GetObject permissions for the\n schema handler package. For more information, see Actions, Resources, and Condition Keys\n for Amazon S3 in the Identity and Access Management User\n Guide.

\n
", "smithy.api#required": {} } }, @@ -6642,7 +6648,7 @@ "ExecutionRoleArn": { "target": "com.amazonaws.cloudformation#RoleARN2", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.

\n

For CloudFormation to assume the specified execution role, the role must\n contain a trust relationship with the CloudFormation service principle\n (resources.cloudformation.amazonaws.com). For more information on adding\n trust relationships, see Modifying a role trust policy in the Identity and Access Management User\n Guide.

\n

If your extension calls Amazon Web Services APIs in any of its handlers, you must create\n an \n IAM execution role\n that includes the necessary\n permissions to call those Amazon Web Services APIs, and provision that execution role in\n your account. When CloudFormation needs to invoke the resource type handler,\n CloudFormation assumes this execution role to create a temporary session token,\n which it then passes to the resource type handler, thereby supplying your resource type\n with the appropriate credentials.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.

\n

For CloudFormation to assume the specified execution role, the role must\n contain a trust relationship with the CloudFormation service principle\n (resources.cloudformation.amazonaws.com). For more information about adding\n trust relationships, see Modifying a role trust policy in the Identity and Access Management User\n Guide.

\n

If your extension calls Amazon Web Services APIs in any of its handlers, you must create\n an \n IAM execution role\n that includes the necessary\n permissions to call those Amazon Web Services APIs, and provision that execution role in\n your account. When CloudFormation needs to invoke the resource type handler,\n CloudFormation assumes this execution role to create a temporary session token,\n which it then passes to the resource type handler, thereby supplying your resource type\n with the appropriate credentials.

" } }, "ClientRequestToken": { @@ -7410,6 +7416,9 @@ "input": { "target": "com.amazonaws.cloudformation#SetStackPolicyInput" }, + "output": { + "target": "smithy.api#Unit" + }, "traits": { "smithy.api#documentation": "

Sets a stack policy for a specified stack.

" } @@ -7567,6 +7576,9 @@ "input": { "target": "com.amazonaws.cloudformation#SignalResourceInput" }, + "output": { + "target": "smithy.api#Unit" + }, "traits": { "smithy.api#documentation": "

Sends a signal to the specified resource with a success or failure status. You can use\n the SignalResource operation in conjunction with a creation policy or update policy. CloudFormation doesn't proceed with a stack creation or update until resources receive\n the required number of signals or the timeout period is exceeded. The SignalResource operation is\n useful in cases where you want to send signals from anywhere other than an Amazon EC2\n instance.

" } @@ -7724,7 +7736,7 @@ "EnableTerminationProtection": { "target": "com.amazonaws.cloudformation#EnableTerminationProtection", "traits": { - "smithy.api#documentation": "

Whether termination protection is enabled for the stack.

\n

For nested stacks,\n termination protection is set on the root stack and cannot be changed directly on the\n nested stack. For more information, see Protecting a Stack From Being\n Deleted in the CloudFormation User Guide.

" + "smithy.api#documentation": "

Whether termination protection is enabled for the stack.

\n

For nested stacks,\n termination protection is set on the root stack and can't be changed directly on the nested\n stack. For more information, see Protecting a Stack From Being Deleted in the\n CloudFormation User Guide.

" } }, "ParentId": { @@ -7742,7 +7754,7 @@ "DriftInformation": { "target": "com.amazonaws.cloudformation#StackDriftInformation", "traits": { - "smithy.api#documentation": "

Information on whether a stack's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. For more information, see Detecting Unregulated Configuration\n Changes to Stacks and Resources.

" + "smithy.api#documentation": "

Information about whether a stack's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. For more information, see Detecting Unregulated Configuration\n Changes to Stacks and Resources.

" } } }, @@ -8593,7 +8605,7 @@ "StackResourceDriftStatus": { "target": "com.amazonaws.cloudformation#StackResourceDriftStatus", "traits": { - "smithy.api#documentation": "

Status of the resource's actual configuration compared to its expected\n configuration.

\n
    \n
  • \n

    \n DELETED: The resource differs from its expected configuration in that\n it has been deleted.

    \n
  • \n
  • \n

    \n MODIFIED: The resource differs from its expected\n configuration.

    \n
  • \n
  • \n

    \n NOT_CHECKED: CloudFormation hasn't checked if the resource differs from its\n expected configuration.

    \n

    Any resources that don't currently support drift detection have a status of\n NOT_CHECKED. For more information, see Resources that Support Drift Detection. If you performed an ContinueUpdateRollback operation on a stack, any resources included in\n ResourcesToSkip will also have a status of NOT_CHECKED.\n For more information on skipping resources during rollback operations, see Continue Rolling Back an Update in the CloudFormation User Guide.

    \n
  • \n
  • \n

    \n IN_SYNC: The resource's actual configuration matches its expected\n configuration.

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

Status of the resource's actual configuration compared to its expected\n configuration.

\n
    \n
  • \n

    \n DELETED: The resource differs from its expected configuration in that\n it has been deleted.

    \n
  • \n
  • \n

    \n MODIFIED: The resource differs from its expected\n configuration.

    \n
  • \n
  • \n

    \n NOT_CHECKED: CloudFormation hasn't checked if the resource differs from its\n expected configuration.

    \n

    Any resources that don't currently support drift detection have a status of\n NOT_CHECKED. For more information, see Resources that Support Drift Detection. If you performed an ContinueUpdateRollback operation on a stack, any resources included in\n ResourcesToSkip will also have a status of NOT_CHECKED.\n For more information about skipping resources during rollback operations, see Continue Rolling Back an Update in the CloudFormation User Guide.

    \n
  • \n
  • \n

    \n IN_SYNC: The resource's actual configuration matches its expected\n configuration.

    \n
  • \n
", "smithy.api#required": {} } }, @@ -8775,13 +8787,13 @@ "StackSetARN": { "target": "com.amazonaws.cloudformation#StackSetARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the stack set.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the stack set.

" } }, "AdministrationRoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the IAM role used to create or update\n the stack set.

\n

Use customized administrator roles to control which users or groups can manage specific\n stack sets within the same administrator account. For more information, see Prerequisites: Granting Permissions for Stack\n Set Operations in the CloudFormation User Guide.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role used to create or update\n the stack set.

\n

Use customized administrator roles to control which users or groups can manage specific\n stack sets within the same administrator account. For more information, see Prerequisites: Granting Permissions for Stack\n Set Operations in the CloudFormation User Guide.

" } }, "ExecutionRoleName": { @@ -9018,7 +9030,7 @@ "AdministrationRoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the IAM role used to perform this\n stack set operation.

\n

Use customized administrator roles to control which users or groups can manage specific\n stack sets within the same administrator account. For more information, see Define Permissions for Multiple\n Administrators in the CloudFormation User Guide.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role used to perform this\n stack set operation.

\n

Use customized administrator roles to control which users or groups can manage specific\n stack sets within the same administrator account. For more information, see Define Permissions for Multiple\n Administrators in the CloudFormation User Guide.

" } }, "ExecutionRoleName": { @@ -9050,6 +9062,12 @@ "traits": { "smithy.api#documentation": "

Detailed information about the drift status of the stack set. This includes information\n about drift operations currently being performed on the stack set.

\n

This information will only be present for stack set operations whose Action\n type is DETECT_DRIFT.

\n

For more information, see Detecting Unmanaged\n Changes in Stack Sets in the CloudFormation User Guide.

" } + }, + "StatusReason": { + "target": "com.amazonaws.cloudformation#StackSetOperationStatusReason", + "traits": { + "smithy.api#documentation": "

The status of the operation in details.

" + } } }, "traits": { @@ -9120,7 +9138,7 @@ } }, "traits": { - "smithy.api#documentation": "

The user-specified preferences for how CloudFormation performs a stack set\n operation.

\n

For more information on maximum concurrent accounts and failure tolerance, see Stack set operation options.

" + "smithy.api#documentation": "

The user-specified preferences for how CloudFormation performs a stack set\n operation.

\n

For more information about maximum concurrent accounts and failure tolerance, see Stack set operation options.

" } }, "com.amazonaws.cloudformation#StackSetOperationResultStatus": { @@ -9231,6 +9249,9 @@ ] } }, + "com.amazonaws.cloudformation#StackSetOperationStatusReason": { + "type": "string" + }, "com.amazonaws.cloudformation#StackSetOperationSummaries": { "type": "list", "member": { @@ -9269,6 +9290,12 @@ "traits": { "smithy.api#documentation": "

The time at which the stack set operation ended, across all accounts and Regions\n specified. Note that this doesn't necessarily mean that the stack set operation was\n successful, or even attempted, in each account or Region.

" } + }, + "StatusReason": { + "target": "com.amazonaws.cloudformation#StackSetOperationStatusReason", + "traits": { + "smithy.api#documentation": "

The status of the operation in details.

" + } } }, "traits": { @@ -9541,7 +9568,7 @@ "DriftInformation": { "target": "com.amazonaws.cloudformation#StackDriftInformationSummary", "traits": { - "smithy.api#documentation": "

Summarizes information on whether a stack's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. For more information, see Detecting Unregulated Configuration\n Changes to Stacks and Resources.

" + "smithy.api#documentation": "

Summarizes information about whether a stack's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. For more information, see Detecting Unregulated Configuration\n Changes to Stacks and Resources.

" } } }, @@ -10007,7 +10034,7 @@ "IsDefaultConfiguration": { "target": "com.amazonaws.cloudformation#IsDefaultConfiguration", "traits": { - "smithy.api#documentation": "

Whether or not this configuration data is the default configuration for the\n extension.

" + "smithy.api#documentation": "

Whether this configuration data is the default configuration for the extension.

" } } }, @@ -10246,7 +10273,7 @@ "IsActivated": { "target": "com.amazonaws.cloudformation#IsActivated", "traits": { - "smithy.api#documentation": "

Whether or not the extension is activated for this account and region.

\n

This applies only to third-party public extensions. Extensions published by Amazon are\n activated by default.

" + "smithy.api#documentation": "

Whether the extension is activated for this account and region.

\n

This applies only to third-party public extensions. Extensions published by Amazon are\n activated by default.

" } } }, @@ -10416,13 +10443,13 @@ "StackPolicyDuringUpdateBody": { "target": "com.amazonaws.cloudformation#StackPolicyDuringUpdateBody", "traits": { - "smithy.api#documentation": "

Structure containing the temporary overriding stack policy body. You can specify either\n the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL\n parameter, but not both.

\n

If you want to update protected resources, specify a temporary overriding stack policy\n during this update. If you do not specify a stack policy, the current policy that is\n associated with the stack will be used.

" + "smithy.api#documentation": "

Structure containing the temporary overriding stack policy body. You can specify either\n the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL\n parameter, but not both.

\n

If you want to update protected resources, specify a temporary overriding stack policy\n during this update. If you don't specify a stack policy, the current policy that is\n associated with the stack will be used.

" } }, "StackPolicyDuringUpdateURL": { "target": "com.amazonaws.cloudformation#StackPolicyDuringUpdateURL", "traits": { - "smithy.api#documentation": "

Location of a file containing the temporary overriding stack policy. The URL must point\n to a policy (max size: 16KB) located in an S3 bucket in the same Region as the stack. You\n can specify either the StackPolicyDuringUpdateBody or the\n StackPolicyDuringUpdateURL parameter, but not both.

\n

If you want to update protected resources, specify a temporary overriding stack policy\n during this update. If you do not specify a stack policy, the current policy that is\n associated with the stack will be used.

" + "smithy.api#documentation": "

Location of a file containing the temporary overriding stack policy. The URL must point\n to a policy (max size: 16KB) located in an S3 bucket in the same Region as the stack. You\n can specify either the StackPolicyDuringUpdateBody or the\n StackPolicyDuringUpdateURL parameter, but not both.

\n

If you want to update protected resources, specify a temporary overriding stack policy\n during this update. If you don't specify a stack policy, the current policy that is\n associated with the stack will be used.

" } }, "Parameters": { @@ -10434,7 +10461,7 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to update the stack.

\n
    \n
  • \n

    \n CAPABILITY_IAM and CAPABILITY_NAMED_IAM\n

    \n

    Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this\n by specifying one of these capabilities.

    \n

    The following IAM resources require you to specify either the\n CAPABILITY_IAM or CAPABILITY_NAMED_IAM\n capability.

    \n
      \n
    • \n

      If you have IAM resources, you can specify either\n capability.

      \n
    • \n
    • \n

      If you have IAM resources with custom names, you\n must specify CAPABILITY_NAMED_IAM.

      \n
    • \n
    • \n

      If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities error.

      \n
    • \n
    \n

    If your stack template contains these resources, we recommend that you review all\n permissions associated with them and edit their permissions if necessary.

    \n \n

    For more information, see Acknowledging IAM Resources in CloudFormation Templates.

    \n
  • \n
  • \n

    \n CAPABILITY_AUTO_EXPAND\n

    \n

    Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually updating the stack. If your stack template contains one or\n more macros, and you choose to update a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.

    \n

    If you want to update a stack from a stack template that contains macros\n and nested stacks, you must update the stack directly from\n the template using this capability.

    \n \n

    You should only update stacks directly from a stack template that contains\n macros if you know what processing the macro performs.

    \n

    Each macro relies on an underlying Lambda service function for\n processing stack templates. Be aware that the Lambda function owner can update the\n function operation without CloudFormation being notified.

    \n
    \n

    For more information, see Using\n CloudFormation Macros to Perform Custom Processing on\n Templates.

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

In some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to update the stack.

\n
    \n
  • \n

    \n CAPABILITY_IAM and CAPABILITY_NAMED_IAM\n

    \n

    Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this\n by specifying one of these capabilities.

    \n

    The following IAM resources require you to specify either the\n CAPABILITY_IAM or CAPABILITY_NAMED_IAM\n capability.

    \n
      \n
    • \n

      If you have IAM resources, you can specify either\n capability.

      \n
    • \n
    • \n

      If you have IAM resources with custom names, you\n must specify CAPABILITY_NAMED_IAM.

      \n
    • \n
    • \n

      If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities error.

      \n
    • \n
    \n

    If your stack template contains these resources, we suggest that you review all\n permissions associated with them and edit their permissions if necessary.

    \n \n

    For more information, see Acknowledging IAM Resources in CloudFormation Templates.

    \n
  • \n
  • \n

    \n CAPABILITY_AUTO_EXPAND\n

    \n

    Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually updating the stack. If your stack template contains one or\n more macros, and you choose to update a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.

    \n

    If you want to update a stack from a stack template that contains macros\n and nested stacks, you must update the stack directly from\n the template using this capability.

    \n \n

    You should only update stacks directly from a stack template that contains\n macros if you know what processing the macro performs.

    \n

    Each macro relies on an underlying Lambda service function for\n processing stack templates. Be aware that the Lambda function owner can update the\n function operation without CloudFormation being notified.

    \n
    \n

    For more information, see Using\n CloudFormation Macros to Perform Custom Processing on\n Templates.

    \n
  • \n
" } }, "ResourceTypes": { @@ -10702,7 +10729,7 @@ "AdministrationRoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the IAM role to use to update this\n stack set.

\n

Specify an IAM role only if you are using customized administrator roles\n to control which users or groups can manage specific stack sets within the same\n administrator account. For more information, see Granting Permissions for Stack Set\n Operations in the CloudFormation User Guide.

\n

If you specified a customized administrator role when you created the stack set, you\n must specify a customized administrator role, even if it is the same customized\n administrator role used with this stack set previously.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role to use to update this\n stack set.

\n

Specify an IAM role only if you are using customized administrator roles\n to control which users or groups can manage specific stack sets within the same\n administrator account. For more information, see Granting Permissions for Stack Set\n Operations in the CloudFormation User Guide.

\n

If you specified a customized administrator role when you created the stack set, you\n must specify a customized administrator role, even if it is the same customized\n administrator role used with this stack set previously.

" } }, "ExecutionRoleName": { diff --git a/aws/sdk/aws-models/cloudfront.json b/aws/sdk/aws-models/cloudfront.json index 1769a5bab77..cb590c05b44 100644 --- a/aws/sdk/aws-models/cloudfront.json +++ b/aws/sdk/aws-models/cloudfront.json @@ -2851,6 +2851,9 @@ { "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAlreadyExists" }, + { + "target": "com.amazonaws.cloudfront#TooLongCSPInResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#TooManyCustomHeadersInResponseHeadersPolicy" }, @@ -12309,6 +12312,19 @@ "smithy.api#documentation": "

Contains the result of testing a CloudFront function with TestFunction.

" } }, + "com.amazonaws.cloudfront#TooLongCSPInResponseHeadersPolicy": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudfront#string" + } + }, + "traits": { + "smithy.api#documentation": "

The length of the Content-Security-Policy header value in the response headers\n\t\t\tpolicy exceeds the maximum.

\n\t\t

For more information, see Quotas (formerly known as limits) in the\n\t\t\t\tAmazon CloudFront Developer Guide.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.cloudfront#TooManyCacheBehaviors": { "type": "structure", "members": { @@ -14201,6 +14217,9 @@ { "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAlreadyExists" }, + { + "target": "com.amazonaws.cloudfront#TooLongCSPInResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#TooManyCustomHeadersInResponseHeadersPolicy" } diff --git a/aws/sdk/aws-models/cognito-idp.json b/aws/sdk/aws-models/cognito-idp.json index 7fc817d042b..b2ca47a4d02 100644 --- a/aws/sdk/aws-models/cognito-idp.json +++ b/aws/sdk/aws-models/cognito-idp.json @@ -46,7 +46,7 @@ "name": "cognito-idp" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

Using the Amazon Cognito user pools API, you can create a user pool to manage directories and users. You can authenticate a user to obtain tokens related to user identity and access policies.

\n

This API reference provides information about user pools in Amazon Cognito user pools.

\n

For more information, see the Amazon Cognito Documentation.

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

Using the Amazon Cognito user pools API, you can create a user pool to manage directories and\n users. You can authenticate a user to obtain tokens related to user identity and access\n policies.

\n

This API reference provides information about user pools in Amazon Cognito user pools.

\n

For more information, see the Amazon Cognito\n Documentation.

", "smithy.api#title": "Amazon Cognito Identity Provider", "smithy.api#xmlNamespace": { "uri": "http://cognito-idp.amazonaws.com/doc/2016-04-18/" @@ -399,7 +399,7 @@ "EventAction": { "target": "com.amazonaws.cognitoidentityprovider#AccountTakeoverEventActionType", "traits": { - "smithy.api#documentation": "

The action to take in response to the account takeover action. Valid values\n are:

\n \n
    \n
  • \n

    \n BLOCK Choosing this action will block the request.

    \n
  • \n
  • \n

    \n MFA_IF_CONFIGURED Present an MFA challenge if user has configured it, else allow the request.

    \n
  • \n
  • \n

    \n MFA_REQUIRED Present an MFA challenge if user has configured it, else block the request.

    \n
  • \n
  • \n

    \n NO_ACTION Allow the user to sign in.

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

The action to take in response to the account takeover action. Valid values are as\n follows:

\n
    \n
  • \n

    \n BLOCK Choosing this action will block the request.

    \n
  • \n
  • \n

    \n MFA_IF_CONFIGURED Present an MFA challenge if user has configured\n it, else allow the request.

    \n
  • \n
  • \n

    \n MFA_REQUIRED Present an MFA challenge if user has configured it,\n else block the request.

    \n
  • \n
  • \n

    \n NO_ACTION Allow the user to sign in.

    \n
  • \n
", "smithy.api#required": {} } } @@ -475,7 +475,7 @@ } }, "traits": { - "smithy.api#documentation": "

Configuration for mitigation actions and notification for different levels of risk detected for a potential account takeover.

" + "smithy.api#documentation": "

Configuration for mitigation actions and notification for different levels of risk\n detected for a potential account takeover.

" } }, "com.amazonaws.cognitoidentityprovider#AddCustomAttributes": { @@ -536,7 +536,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response from the server for the request to add custom attributes.

" + "smithy.api#documentation": "

Represents the response from the server for the request to add custom\n attributes.

" } }, "com.amazonaws.cognitoidentityprovider#AdminAddUserToGroup": { @@ -544,6 +544,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#AdminAddUserToGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -638,7 +641,7 @@ } ], "traits": { - "smithy.api#documentation": "

Confirms user registration as an admin without using a confirmation code. Works on any user.

\n

Calling this action requires developer credentials.

" + "smithy.api#documentation": "

Confirms user registration as an admin without using a confirmation code. Works on any\n user.

\n

Calling this action requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminConfirmSignUpRequest": { @@ -661,7 +664,7 @@ "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n

If your user pool configuration includes triggers, the AdminConfirmSignUp API action\n invokes the Lambda function that is specified for the post\n confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON\n payload, which the function receives as input. In this payload, the\n clientMetadata attribute provides the data that you assigned to the\n ClientMetadata parameter in your AdminConfirmSignUp request. In your function code in\n Lambda, you can process the ClientMetadata value to enhance your workflow for your\n specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration \n doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

If your user pool configuration includes triggers, the AdminConfirmSignUp API action\n invokes the Lambda function that is specified for the post\n confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON\n payload, which the function receives as input. In this payload, the\n clientMetadata attribute provides the data that you assigned to the\n ClientMetadata parameter in your AdminConfirmSignUp request. In your function code in\n Lambda, you can process the ClientMetadata value to enhance your workflow for your\n specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -673,7 +676,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response from the server for the request to confirm registration.

" + "smithy.api#documentation": "

Represents the response from the server for the request to confirm\n registration.

" } }, "com.amazonaws.cognitoidentityprovider#AdminCreateUser": { @@ -735,7 +738,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new user in the specified user pool.

\n

If MessageAction isn't set, the default is to send a welcome message via email or phone (SMS).

\n \n \n\n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

This message is based on a template that you configured in your call to create or update a user pool. This template includes your custom sign-up instructions and placeholders for \n user name and temporary password.

\n

Alternatively, you can call AdminCreateUser with SUPPRESS for the MessageAction parameter, and Amazon Cognito won't send any email.

\n

In either case, the user will be in the FORCE_CHANGE_PASSWORD state until they sign in and change their password.

\n

\n AdminCreateUser requires developer credentials.

" + "smithy.api#documentation": "

Creates a new user in the specified user pool.

\n

If MessageAction isn't set, the default is to send a welcome message via\n email or phone (SMS).

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

This message is based on a template that you configured in your call to create or\n update a user pool. This template includes your custom sign-up instructions and\n placeholders for user name and temporary password.

\n

Alternatively, you can call AdminCreateUser with SUPPRESS\n for the MessageAction parameter, and Amazon Cognito won't send any email.

\n

In either case, the user will be in the FORCE_CHANGE_PASSWORD state until\n they sign in and change their password.

\n

\n AdminCreateUser requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminCreateUserConfigType": { @@ -744,13 +747,13 @@ "AllowAdminCreateUserOnly": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.

" + "smithy.api#documentation": "

Set to True if only the administrator is allowed to create user profiles.\n Set to False if users can sign themselves up via an app.

" } }, "UnusedAccountValidityDays": { "target": "com.amazonaws.cognitoidentityprovider#AdminCreateUserUnusedAccountValidityDaysType", "traits": { - "smithy.api#documentation": "

The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, \n specifying \"RESEND\" for the MessageAction parameter. The default value for this parameter is 7.

\n \n

If you set a value for TemporaryPasswordValidityDays in PasswordPolicy, that value will be used, and UnusedAccountValidityDays will be no longer \n be an available parameter for that user pool.

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

The user account expiration limit, in days, after which a new account that hasn't\n signed in is no longer usable. To reset the account after that time limit, you must call\n AdminCreateUser again, specifying \"RESEND\" for the\n MessageAction parameter. The default value for this parameter is 7.

\n \n

If you set a value for TemporaryPasswordValidityDays in\n PasswordPolicy, that value will be used, and\n UnusedAccountValidityDays will be no longer be an available\n parameter for that user pool.

\n
" } }, "InviteMessageTemplate": { @@ -777,50 +780,50 @@ "Username": { "target": "com.amazonaws.cognitoidentityprovider#UsernameType", "traits": { - "smithy.api#documentation": "

The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username can't be changed.

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

The username for the user. Must be unique within the user pool. Must be a UTF-8 string\n between 1 and 128 characters. After the user is created, the username can't be\n changed.

", "smithy.api#required": {} } }, "UserAttributes": { "target": "com.amazonaws.cognitoidentityprovider#AttributeListType", "traits": { - "smithy.api#documentation": "

An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes \n other than Username. However, any attributes that you specify as required (when creating a user pool or in the Attributes tab \n of the console) either you should supply (in your call to AdminCreateUser) or the user should supply (when they sign up in response to your welcome message).

\n

For custom attributes, you must prepend the custom: prefix to the attribute name.

\n

To send a message inviting the user to sign up, you must specify the user's email address or phone number. You can do this in your call to AdminCreateUser or \n in the Users tab of the Amazon Cognito console for managing your user pools.

\n

In your call to AdminCreateUser, you can set the email_verified attribute to True, and you can set the phone_number_verified \n attribute to True. You can also do this by calling \n AdminUpdateUserAttributes.

\n \n
    \n
  • \n

    \n email: The email address of the user to whom the message that contains the code and username will be sent. Required if the \n email_verified attribute is set to True, or if \"EMAIL\" is specified in the DesiredDeliveryMediums parameter.

    \n
  • \n
  • \n

    \n phone_number: The phone number of the user to whom the message that contains the code and username will be sent. Required if the \n phone_number_verified attribute is set to True, or if \"SMS\" is specified in the DesiredDeliveryMediums parameter.

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

An array of name-value pairs that contain user attributes and attribute values to be\n set for the user to be created. You can create a user without specifying any attributes\n other than Username. However, any attributes that you specify as required\n (when creating a user pool or in the Attributes tab of\n the console) either you should supply (in your call to AdminCreateUser) or\n the user should supply (when they sign up in response to your welcome message).

\n

For custom attributes, you must prepend the custom: prefix to the\n attribute name.

\n

To send a message inviting the user to sign up, you must specify the user's email\n address or phone number. You can do this in your call to AdminCreateUser or in the\n Users tab of the Amazon Cognito console for managing your\n user pools.

\n

In your call to AdminCreateUser, you can set the\n email_verified attribute to True, and you can set the\n phone_number_verified attribute to True. You can also do\n this by calling AdminUpdateUserAttributes.

\n
    \n
  • \n

    \n email: The email address of the user to whom\n the message that contains the code and username will be sent. Required if the\n email_verified attribute is set to True, or if\n \"EMAIL\" is specified in the DesiredDeliveryMediums\n parameter.

    \n
  • \n
  • \n

    \n phone_number: The phone number of the user to\n whom the message that contains the code and username will be sent. Required if\n the phone_number_verified attribute is set to True, or\n if \"SMS\" is specified in the DesiredDeliveryMediums\n parameter.

    \n
  • \n
" } }, "ValidationData": { "target": "com.amazonaws.cognitoidentityprovider#AttributeListType", "traits": { - "smithy.api#documentation": "

The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the \n types of user accounts that can be registered. For example, you might choose to allow or disallow user sign-up based on the user's domain.

\n

To configure custom validation, you must create a Pre Sign-up Lambda trigger for the user pool as described in the Amazon Cognito Developer Guide. The Lambda trigger receives the validation \n data and uses it in the validation process.

\n

The user's validation data isn't persisted.

" + "smithy.api#documentation": "

The user's validation data. This is an array of name-value pairs that contain user\n attributes and attribute values that you can use for custom validation, such as\n restricting the types of user accounts that can be registered. For example, you might\n choose to allow or disallow user sign-up based on the user's domain.

\n

To configure custom validation, you must create a Pre Sign-up Lambda trigger for\n the user pool as described in the Amazon Cognito Developer Guide. The Lambda trigger receives the\n validation data and uses it in the validation process.

\n

The user's validation data isn't persisted.

" } }, "TemporaryPassword": { "target": "com.amazonaws.cognitoidentityprovider#PasswordType", "traits": { - "smithy.api#documentation": "

The user's temporary password. This password must conform to the password policy that you specified when you created the user pool.

\n

The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page, along with a new password to be used \n in all future sign-ins.

\n

This parameter isn't required. If you don't specify a value, Amazon Cognito generates one for you.

\n

The temporary password can only be used until the user account expiration limit that you specified when you created the user pool. To reset the account after that time limit, you must \n call AdminCreateUser again, specifying \"RESEND\" for the MessageAction parameter.

" + "smithy.api#documentation": "

The user's temporary password. This password must conform to the password policy that\n you specified when you created the user pool.

\n

The temporary password is valid only once. To complete the Admin Create User flow, the\n user must enter the temporary password in the sign-in page, along with a new password to\n be used in all future sign-ins.

\n

This parameter isn't required. If you don't specify a value, Amazon Cognito generates one for\n you.

\n

The temporary password can only be used until the user account expiration limit that\n you specified when you created the user pool. To reset the account after that time\n limit, you must call AdminCreateUser again, specifying\n \"RESEND\" for the MessageAction parameter.

" } }, "ForceAliasCreation": { "target": "com.amazonaws.cognitoidentityprovider#ForceAliasCreation", "traits": { - "smithy.api#documentation": "

This parameter is used only if the phone_number_verified or email_verified attribute is set to True. Otherwise, it is ignored.

\n

If this parameter is set to True and the phone number or email address specified in the UserAttributes parameter already exists as an alias with a different user, the API \n call will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias.

\n

If this parameter is set to False, the API throws an AliasExistsException error if the alias already exists. The default value is False.

" + "smithy.api#documentation": "

This parameter is used only if the phone_number_verified or\n email_verified attribute is set to True. Otherwise, it is\n ignored.

\n

If this parameter is set to True and the phone number or email address\n specified in the UserAttributes parameter already exists as an alias with a different\n user, the API call will migrate the alias from the previous user to the newly created\n user. The previous user will no longer be able to log in using that alias.

\n

If this parameter is set to False, the API throws an\n AliasExistsException error if the alias already exists. The default\n value is False.

" } }, "MessageAction": { "target": "com.amazonaws.cognitoidentityprovider#MessageActionType", "traits": { - "smithy.api#documentation": "

Set to RESEND to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to SUPPRESS to suppress \n sending the message. You can specify only one value.

" + "smithy.api#documentation": "

Set to RESEND to resend the invitation message to a user that already\n exists and reset the expiration limit on the user's account. Set to\n SUPPRESS to suppress sending the message. You can specify only one\n value.

" } }, "DesiredDeliveryMediums": { "target": "com.amazonaws.cognitoidentityprovider#DeliveryMediumListType", "traits": { - "smithy.api#documentation": "

Specify \"EMAIL\" if email will be used to send the welcome message. Specify \"SMS\" if the phone number will be used. The default value is \"SMS\". You \n can specify more than one value.

" + "smithy.api#documentation": "

Specify \"EMAIL\" if email will be used to send the welcome message.\n Specify \"SMS\" if the phone number will be used. The default value is\n \"SMS\". You can specify more than one value.

" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminCreateUser API action, \n Amazon Cognito invokes the function that is assigned to the pre sign-up trigger. When Amazon Cognito invokes this function, \n it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, \n which provides the data that you assigned to the ClientMetadata parameter in your AdminCreateUser request. In your function code \n in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the AdminCreateUser API action, Amazon Cognito invokes the function that is assigned\n to the pre sign-up trigger. When Amazon Cognito invokes this function, it\n passes a JSON payload, which the function receives as input. This payload contains a\n clientMetadata attribute, which provides the data that you assigned to\n the ClientMetadata parameter in your AdminCreateUser request. In your function code in\n Lambda, you can process the clientMetadata value to enhance your\n workflow for your specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -856,6 +859,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#AdminDeleteUserRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -909,7 +915,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the user attributes in a user pool as an administrator. Works on any user.

\n

Calling this action requires developer credentials.

" + "smithy.api#documentation": "

Deletes the user attributes in a user pool as an administrator. Works on any\n user.

\n

Calling this action requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminDeleteUserAttributesRequest": { @@ -932,7 +938,7 @@ "UserAttributeNames": { "target": "com.amazonaws.cognitoidentityprovider#AttributeNameListType", "traits": { - "smithy.api#documentation": "

An array of strings representing the user attribute names you want to delete.

\n

For custom attributes, you must prepend the custom: prefix to the attribute name.

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

An array of strings representing the user attribute names you want to delete.

\n

For custom attributes, you must prepend the custom: prefix to the\n attribute name.

", "smithy.api#required": {} } } @@ -945,7 +951,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response received from the server for a request to delete user attributes.

" + "smithy.api#documentation": "

Represents the response received from the server for a request to delete user\n attributes.

" } }, "com.amazonaws.cognitoidentityprovider#AdminDeleteUserRequest": { @@ -1002,7 +1008,7 @@ } ], "traits": { - "smithy.api#documentation": "

Prevents the user from signing in with the specified external (SAML or social)\n identity provider. If the user that you want to deactivate is a Amazon Cognito user pools native\n username + password user, they can't use their password to sign in. If the user to\n deactivate is a linked external identity provider (IdP) user, any link between that user\n and an existing user is removed. When the external user signs in again, and the user is\n no longer attached to the previously linked DestinationUser, the user must\n create a new user account. See AdminLinkProviderForUser.

\n

This action is enabled only for admin access and requires developer credentials.

\n

The ProviderName must match the value specified when creating an IdP for the pool.

\n

To deactivate a native username + password user, the ProviderName value must be Cognito and the ProviderAttributeName must be Cognito_Subject. \n The ProviderAttributeValue must be the name that is used in the user pool for the user.

\n

The ProviderAttributeName must always be Cognito_Subject for social identity providers. The ProviderAttributeValue must always be the exact \n subject that was used when the user was originally linked as a source user.

\n

For de-linking a SAML identity, there are two scenarios. If the linked identity has not yet been used to sign in, the ProviderAttributeName and ProviderAttributeValue \n must be the same values that were used for the SourceUser when the identities were originally linked using AdminLinkProviderForUser call. (If the linking was done \n with ProviderAttributeName set to Cognito_Subject, the same applies here). However, if the user has already signed in, the ProviderAttributeName must \n be Cognito_Subject and ProviderAttributeValue must be the subject of the SAML assertion.

" + "smithy.api#documentation": "

Prevents the user from signing in with the specified external (SAML or social)\n identity provider (IdP). If the user that you want to deactivate is a Amazon Cognito user pools\n native username + password user, they can't use their password to sign in. If the user\n to deactivate is a linked external IdP user, any link between that user and an existing\n user is removed. When the external user signs in again, and the user is no longer\n attached to the previously linked DestinationUser, the user must create a\n new user account. See AdminLinkProviderForUser.

\n

This action is enabled only for admin access and requires developer\n credentials.

\n

The ProviderName must match the value specified when creating an IdP for\n the pool.

\n

To deactivate a native username + password user, the ProviderName value\n must be Cognito and the ProviderAttributeName must be\n Cognito_Subject. The ProviderAttributeValue must be the\n name that is used in the user pool for the user.

\n

The ProviderAttributeName must always be Cognito_Subject for\n social IdPs. The ProviderAttributeValue must always be the exact subject\n that was used when the user was originally linked as a source user.

\n

For de-linking a SAML identity, there are two scenarios. If the linked identity has\n not yet been used to sign in, the ProviderAttributeName and\n ProviderAttributeValue must be the same values that were used for the\n SourceUser when the identities were originally linked using \n AdminLinkProviderForUser call. (If the linking was done with\n ProviderAttributeName set to Cognito_Subject, the same\n applies here). However, if the user has already signed in, the\n ProviderAttributeName must be Cognito_Subject and\n ProviderAttributeValue must be the subject of the SAML\n assertion.

" } }, "com.amazonaws.cognitoidentityprovider#AdminDisableProviderForUserRequest": { @@ -1086,7 +1092,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response received from the server to disable the user as an administrator.

" + "smithy.api#documentation": "

Represents the response received from the server to disable the user as an\n administrator.

" } }, "com.amazonaws.cognitoidentityprovider#AdminEnableUser": { @@ -1147,7 +1153,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response from the server for the request to enable a user as an administrator.

" + "smithy.api#documentation": "

Represents the response from the server for the request to enable a user as an\n administrator.

" } }, "com.amazonaws.cognitoidentityprovider#AdminForgetDevice": { @@ -1155,6 +1161,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#AdminForgetDeviceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -1316,7 +1325,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the specified user by user name in a user pool as an administrator. Works on any user.

\n

Calling this action requires developer credentials.

" + "smithy.api#documentation": "

Gets the specified user by user name in a user pool as an administrator. Works on any\n user.

\n

Calling this action requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminGetUserRequest": { @@ -1325,7 +1334,7 @@ "UserPoolId": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolIdType", "traits": { - "smithy.api#documentation": "

The user pool ID for the user pool where you want to get information about the user.

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

The user pool ID for the user pool where you want to get information about the\n user.

", "smithy.api#required": {} } }, @@ -1378,13 +1387,13 @@ "UserStatus": { "target": "com.amazonaws.cognitoidentityprovider#UserStatusType", "traits": { - "smithy.api#documentation": "

The user status. Can be one of the following:

\n
    \n
  • \n

    UNCONFIRMED - User has been created but not confirmed.

    \n
  • \n
  • \n

    CONFIRMED - User has been confirmed.

    \n
  • \n
  • \n

    ARCHIVED - User is no longer active.

    \n
  • \n
  • \n

    UNKNOWN - User status isn't known.

    \n
  • \n
  • \n

    RESET_REQUIRED - User is confirmed, but the user must request a code and reset their password before they can sign in.

    \n
  • \n
  • \n

    FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change their password to a new value \n before doing anything else.

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

The user status. Can be one of the following:

\n
    \n
  • \n

    UNCONFIRMED - User has been created but not confirmed.

    \n
  • \n
  • \n

    CONFIRMED - User has been confirmed.

    \n
  • \n
  • \n

    ARCHIVED - User is no longer active.

    \n
  • \n
  • \n

    UNKNOWN - User status isn't known.

    \n
  • \n
  • \n

    RESET_REQUIRED - User is confirmed, but the user must request a code and reset\n their password before they can sign in.

    \n
  • \n
  • \n

    FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a\n temporary password, but on first sign-in, the user must change their password to\n a new value before doing anything else.

    \n
  • \n
" } }, "MFAOptions": { "target": "com.amazonaws.cognitoidentityprovider#MFAOptionListType", "traits": { - "smithy.api#documentation": "

\n This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn't provide information about time-based one-time \n password (TOTP) software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.

" + "smithy.api#documentation": "

\n This response parameter is no longer supported. It provides\n information only about SMS MFA configurations. It doesn't provide information about\n time-based one-time password (TOTP) software token MFA configurations. To look up\n information about either type of MFA configuration, use UserMFASettingList\n instead.

" } }, "PreferredMfaSetting": { @@ -1396,12 +1405,12 @@ "UserMFASettingList": { "target": "com.amazonaws.cognitoidentityprovider#UserMFASettingListType", "traits": { - "smithy.api#documentation": "

The MFA options that are activated for the user. The possible values in this list are SMS_MFA and SOFTWARE_TOKEN_MFA.

" + "smithy.api#documentation": "

The MFA options that are activated for the user. The possible values in this list are\n SMS_MFA and SOFTWARE_TOKEN_MFA.

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

Represents the response from the server from the request to get the specified user as an administrator.

" + "smithy.api#documentation": "

Represents the response from the server from the request to get the specified user as\n an administrator.

" } }, "com.amazonaws.cognitoidentityprovider#AdminInitiateAuth": { @@ -1460,7 +1469,7 @@ } ], "traits": { - "smithy.api#documentation": "

Initiates the authentication flow, as an administrator.

\n\n\n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

Calling this action requires developer credentials.

" + "smithy.api#documentation": "

Initiates the authentication flow, as an administrator.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

Calling this action requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminInitiateAuthRequest": { @@ -1483,32 +1492,32 @@ "AuthFlow": { "target": "com.amazonaws.cognitoidentityprovider#AuthFlowType", "traits": { - "smithy.api#documentation": "

The authentication flow for this call to run. The API action will depend on this value. For example:

\n \n
    \n
  • \n

    \n REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.

    \n
  • \n
  • \n

    \n USER_SRP_AUTH will take in USERNAME and SRP_A and return the Secure Remote Password (SRP) protocol variables to be used for next \n challenge execution.

    \n
  • \n
  • \n

    \n ADMIN_USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.

    \n
  • \n
\n

Valid values include:

\n
    \n
  • \n

    \n USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

    \n
  • \n
  • \n

    \n REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

    \n
  • \n
  • \n

    \n CUSTOM_AUTH: Custom authentication flow.

    \n
  • \n
  • \n

    \n ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in the USERNAME and PASSWORD directly if the flow is enabled for calling the app client.

    \n
  • \n
  • \n

    \n ADMIN_USER_PASSWORD_AUTH: Admin-based user password authentication. This replaces the ADMIN_NO_SRP_AUTH authentication flow. In this flow, Amazon Cognito \n receives the password in the request instead of using the SRP process to verify passwords.

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

The authentication flow for this call to run. The API action will depend on this\n value. For example:

\n
    \n
  • \n

    \n REFRESH_TOKEN_AUTH will take in a valid refresh token and return\n new tokens.

    \n
  • \n
  • \n

    \n USER_SRP_AUTH will take in USERNAME and\n SRP_A and return the Secure Remote Password (SRP) protocol\n variables to be used for next challenge execution.

    \n
  • \n
  • \n

    \n ADMIN_USER_PASSWORD_AUTH will take in USERNAME and\n PASSWORD and return the next challenge or tokens.

    \n
  • \n
\n

Valid values include:

\n
    \n
  • \n

    \n USER_SRP_AUTH: Authentication flow for the Secure Remote Password\n (SRP) protocol.

    \n
  • \n
  • \n

    \n REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication\n flow for refreshing the access token and ID token by supplying a valid refresh\n token.

    \n
  • \n
  • \n

    \n CUSTOM_AUTH: Custom authentication flow.

    \n
  • \n
  • \n

    \n ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in\n the USERNAME and PASSWORD directly if the flow is enabled for calling the app\n client.

    \n
  • \n
  • \n

    \n ADMIN_USER_PASSWORD_AUTH: Admin-based user password\n authentication. This replaces the ADMIN_NO_SRP_AUTH authentication\n flow. In this flow, Amazon Cognito receives the password in the request instead of using\n the SRP process to verify passwords.

    \n
  • \n
", "smithy.api#required": {} } }, "AuthParameters": { "target": "com.amazonaws.cognitoidentityprovider#AuthParametersType", "traits": { - "smithy.api#documentation": "

The authentication parameters. These are inputs corresponding to the AuthFlow that you're invoking. The required values depend on the value of AuthFlow:

\n \n
    \n
  • \n

    For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client \n secret), DEVICE_KEY.

    \n
  • \n
  • \n

    For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), \n DEVICE_KEY.

    \n
  • \n
  • \n

    For ADMIN_NO_SRP_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), PASSWORD (required), \n DEVICE_KEY.

    \n
  • \n
  • \n

    For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY. To start the \n authentication flow with password verification, include ChallengeName: SRP_A and SRP_A: (The SRP_A Value).

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

The authentication parameters. These are inputs corresponding to the\n AuthFlow that you're invoking. The required values depend on the value\n of AuthFlow:

\n
    \n
  • \n

    For USER_SRP_AUTH: USERNAME (required),\n SRP_A (required), SECRET_HASH (required if the app\n client is configured with a client secret), DEVICE_KEY.

    \n
  • \n
  • \n

    For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN\n (required), SECRET_HASH (required if the app client is configured\n with a client secret), DEVICE_KEY.

    \n
  • \n
  • \n

    For ADMIN_NO_SRP_AUTH: USERNAME (required),\n SECRET_HASH (if app client is configured with client secret),\n PASSWORD (required), DEVICE_KEY.

    \n
  • \n
  • \n

    For CUSTOM_AUTH: USERNAME (required),\n SECRET_HASH (if app client is configured with client secret),\n DEVICE_KEY. To start the authentication flow with password\n verification, include ChallengeName: SRP_A and SRP_A: (The\n SRP_A Value).

    \n
  • \n
" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminInitiateAuth API action, Amazon Cognito invokes the Lambda functions that are specified for \n various triggers. The ClientMetadata value is passed as input to the functions for only the following triggers:

\n
    \n
  • \n

    Pre signup

    \n
  • \n
  • \n

    Pre authentication

    \n
  • \n
  • \n

    User migration

    \n
  • \n
\n

When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which\n the function receives as input. This payload contains a validationData\n attribute, which provides the data that you assigned to the ClientMetadata parameter in\n your AdminInitiateAuth request. In your function code in Lambda, you can process the\n validationData value to enhance your workflow for your specific\n needs.

\n

When you use the AdminInitiateAuth API action, Amazon Cognito also invokes the functions for the following triggers, but it doesn't provide the ClientMetadata value as input:

\n
    \n
  • \n

    Post authentication

    \n
  • \n
  • \n

    Custom message

    \n
  • \n
  • \n

    Pre token generation

    \n
  • \n
  • \n

    Create auth challenge

    \n
  • \n
  • \n

    Define auth challenge

    \n
  • \n
  • \n

    Verify auth challenge

    \n
  • \n
\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration \n doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for certain custom\n workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the AdminInitiateAuth API action, Amazon Cognito invokes the Lambda functions that\n are specified for various triggers. The ClientMetadata value is passed as input to the\n functions for only the following triggers:

\n
    \n
  • \n

    Pre signup

    \n
  • \n
  • \n

    Pre authentication

    \n
  • \n
  • \n

    User migration

    \n
  • \n
\n

When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which\n the function receives as input. This payload contains a validationData\n attribute, which provides the data that you assigned to the ClientMetadata parameter in\n your AdminInitiateAuth request. In your function code in Lambda, you can process the\n validationData value to enhance your workflow for your specific\n needs.

\n

When you use the AdminInitiateAuth API action, Amazon Cognito also invokes the functions for\n the following triggers, but it doesn't provide the ClientMetadata value as input:

\n
    \n
  • \n

    Post authentication

    \n
  • \n
  • \n

    Custom message

    \n
  • \n
  • \n

    Pre token generation

    \n
  • \n
  • \n

    Create auth challenge

    \n
  • \n
  • \n

    Define auth challenge

    \n
  • \n
  • \n

    Verify auth challenge

    \n
  • \n
\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } }, "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The analytics metadata for collecting Amazon Pinpoint metrics for AdminInitiateAuth calls.

" + "smithy.api#documentation": "

The analytics metadata for collecting Amazon Pinpoint metrics for\n AdminInitiateAuth calls.

" } }, "ContextData": { "target": "com.amazonaws.cognitoidentityprovider#ContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } } }, @@ -1522,25 +1531,25 @@ "ChallengeName": { "target": "com.amazonaws.cognitoidentityprovider#ChallengeNameType", "traits": { - "smithy.api#documentation": "

The name of the challenge that you're responding to with this call. This is returned in the AdminInitiateAuth response if you must pass another challenge.

\n \n
    \n
  • \n

    \n MFA_SETUP: If MFA is required, users who don't have at least one of the MFA methods set up are presented with an MFA_SETUP challenge. The user must set up at \n least one MFA type to continue to authenticate.

    \n
  • \n
  • \n

    \n SELECT_MFA_TYPE: Selects the MFA type. Valid MFA options are SMS_MFA for text SMS MFA, and SOFTWARE_TOKEN_MFA for time-based one-time password (TOTP) \n software token MFA.

    \n
  • \n
  • \n

    \n SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.

    \n
  • \n
  • \n

    \n PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the \n client-side SRP calculations.

    \n
  • \n
  • \n

    \n CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.

    \n
  • \n
  • \n

    \n DEVICE_SRP_AUTH: If device tracking was activated in your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking \n this device.

    \n
  • \n
  • \n

    \n DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.

    \n
  • \n
  • \n

    \n ADMIN_NO_SRP_AUTH: This is returned if you must authenticate with USERNAME and PASSWORD directly. An app client must be enabled to use this flow.

    \n
  • \n
  • \n

    \n NEW_PASSWORD_REQUIRED: For users who are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD \n and any other required attributes.

    \n
  • \n
  • \n

    \n MFA_SETUP: For users who are required to set up an MFA factor before they can sign in. The MFA types activated for the user pool will be listed in the challenge \n parameters MFA_CAN_SETUP value.

    \n

    To set up software token MFA, use the session returned here from InitiateAuth as an input to AssociateSoftwareToken, and use the session returned by \n VerifySoftwareToken as an input to RespondToAuthChallenge with challenge name MFA_SETUP to complete sign-in. To set up SMS MFA, users will \n need help from an administrator to add a phone number to their account and then call InitiateAuth again to restart sign-in.

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

The name of the challenge that you're responding to with this call. This is returned\n in the AdminInitiateAuth response if you must pass another\n challenge.

\n
    \n
  • \n

    \n MFA_SETUP: If MFA is required, users who don't have at least one\n of the MFA methods set up are presented with an MFA_SETUP\n challenge. The user must set up at least one MFA type to continue to\n authenticate.

    \n
  • \n
  • \n

    \n SELECT_MFA_TYPE: Selects the MFA type. Valid MFA options are\n SMS_MFA for text SMS MFA, and SOFTWARE_TOKEN_MFA\n for time-based one-time password (TOTP) software token MFA.

    \n
  • \n
  • \n

    \n SMS_MFA: Next challenge is to supply an\n SMS_MFA_CODE, delivered via SMS.

    \n
  • \n
  • \n

    \n PASSWORD_VERIFIER: Next challenge is to supply\n PASSWORD_CLAIM_SIGNATURE,\n PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after\n the client-side SRP calculations.

    \n
  • \n
  • \n

    \n CUSTOM_CHALLENGE: This is returned if your custom authentication\n flow determines that the user should pass another challenge before tokens are\n issued.

    \n
  • \n
  • \n

    \n DEVICE_SRP_AUTH: If device tracking was activated in your user\n pool and the previous challenges were passed, this challenge is returned so that\n Amazon Cognito can start tracking this device.

    \n
  • \n
  • \n

    \n DEVICE_PASSWORD_VERIFIER: Similar to\n PASSWORD_VERIFIER, but for devices only.

    \n
  • \n
  • \n

    \n ADMIN_NO_SRP_AUTH: This is returned if you must authenticate with\n USERNAME and PASSWORD directly. An app client must\n be enabled to use this flow.

    \n
  • \n
  • \n

    \n NEW_PASSWORD_REQUIRED: For users who are required to change their\n passwords after successful first login. Respond to this challenge with\n NEW_PASSWORD and any required attributes that Amazon Cognito returned in\n the requiredAttributes parameter. You can also set values for\n attributes that aren't required by your user pool and that your app client can\n write. For more information, see AdminRespondToAuthChallenge.

    \n \n \n

    In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value. \nIn AdminRespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the requiredAttributes parameter, \nthen use the AdminUpdateUserAttributes API operation to modify the value of any additional attributes.

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

    \n MFA_SETUP: For users who are required to set up an MFA factor\n before they can sign in. The MFA types activated for the user pool will be\n listed in the challenge parameters MFA_CAN_SETUP value.

    \n

    To set up software token MFA, use the session returned here from\n InitiateAuth as an input to\n AssociateSoftwareToken, and use the session returned by\n VerifySoftwareToken as an input to\n RespondToAuthChallenge with challenge name\n MFA_SETUP to complete sign-in. To set up SMS MFA, users will\n need help from an administrator to add a phone number to their account and then\n call InitiateAuth again to restart sign-in.

    \n
  • \n
" } }, "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service. If AdminInitiateAuth or AdminRespondToAuthChallenge API call determines \n that the caller must pass another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next AdminRespondToAuthChallenge \n API call.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service. If AdminInitiateAuth or AdminRespondToAuthChallenge\n API call determines that the caller must pass another challenge, they return a session\n with other challenge parameters. This session should be passed as it is to the next\n AdminRespondToAuthChallenge API call.

" } }, "ChallengeParameters": { "target": "com.amazonaws.cognitoidentityprovider#ChallengeParametersType", "traits": { - "smithy.api#documentation": "

The challenge parameters. These are returned to you in the AdminInitiateAuth response if you must pass another challenge. The responses in this parameter should be used to \n compute inputs to the next call (AdminRespondToAuthChallenge).

\n

All challenges require USERNAME and SECRET_HASH (if applicable).

\n

The value of the USER_ID_FOR_SRP attribute is the user's actual username, not an alias (such as email address or phone number), even if you specified an alias in your call \n to AdminInitiateAuth. This happens because, in the AdminRespondToAuthChallenge API ChallengeResponses, the USERNAME attribute can't be \n an alias.

" + "smithy.api#documentation": "

The challenge parameters. These are returned to you in the\n AdminInitiateAuth response if you must pass another challenge. The\n responses in this parameter should be used to compute inputs to the next call\n (AdminRespondToAuthChallenge).

\n

All challenges require USERNAME and SECRET_HASH (if\n applicable).

\n

The value of the USER_ID_FOR_SRP attribute is the user's actual username,\n not an alias (such as email address or phone number), even if you specified an alias in\n your call to AdminInitiateAuth. This happens because, in the\n AdminRespondToAuthChallenge API ChallengeResponses, the\n USERNAME attribute can't be an alias.

" } }, "AuthenticationResult": { "target": "com.amazonaws.cognitoidentityprovider#AuthenticationResultType", "traits": { - "smithy.api#documentation": "

The result of the authentication response. This is only returned if the caller doesn't need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, \n ChallengeName, ChallengeParameters, and Session are returned.

" + "smithy.api#documentation": "

The result of the authentication response. This is only returned if the caller doesn't\n need to pass another challenge. If the caller does need to pass another challenge before\n it gets tokens, ChallengeName, ChallengeParameters, and\n Session are returned.

" } } }, @@ -1583,7 +1592,7 @@ } ], "traits": { - "smithy.api#documentation": "

Links an existing user account in a user pool (DestinationUser) to an identity from an external identity provider (SourceUser) based on a specified \n attribute name and value from the external identity provider. This allows you to create a link from the existing user account to an external federated user identity that has not \n yet been used to sign in. You can then use the federated user identity to sign in as the existing user account.

\n

For example, if there is an existing user with a username and password, this API links that user to a federated user identity. When the user signs in with a federated user \n identity, they sign in as the existing user account.

\n \n

The maximum number of federated identities linked to a user is 5.

\n
\n \n

Because this API allows a user with an external federated identity to sign in as an existing user in the user pool, it is critical that it only be used with external \n identity providers and provider attributes that have been trusted by the application owner.

\n
\n \n

This action is administrative and requires developer credentials.

" + "smithy.api#documentation": "

Links an existing user account in a user pool (DestinationUser) to an\n identity from an external IdP (SourceUser) based on a specified attribute\n name and value from the external IdP. This allows you to create a link from the existing\n user account to an external federated user identity that has not yet been used to sign\n in. You can then use the federated user identity to sign in as the existing user\n account.

\n

For example, if there is an existing user with a username and password, this API\n links that user to a federated user identity. When the user signs in with a federated\n user identity, they sign in as the existing user account.

\n \n

The maximum number of federated identities linked to a user is five.

\n
\n \n

Because this API allows a user with an external federated identity to sign in as\n an existing user in the user pool, it is critical that it only be used with external\n IdPs and provider attributes that have been trusted by the application owner.

\n
\n \n

This action is administrative and requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminLinkProviderForUserRequest": { @@ -1599,14 +1608,14 @@ "DestinationUser": { "target": "com.amazonaws.cognitoidentityprovider#ProviderUserIdentifierType", "traits": { - "smithy.api#documentation": "

The existing user in the user pool that you want to assign to the external identity\n provider user account. This user can be a native (Username + Password) Amazon Cognito user pools\n user or a federated user (for example, a SAML or Facebook user). If the user doesn't\n exist, Amazon Cognito generates an exception. Amazon Cognito returns this user when the new user (with the\n linked identity provider attribute) signs in.

\n

For a native username + password user, the ProviderAttributeValue for the DestinationUser should be the username in the user pool. For a federated user, \n it should be the provider-specific user_id.

\n

The ProviderAttributeName of the DestinationUser is ignored.

\n

The ProviderName should be set to Cognito for users in Cognito user pools.

\n \n

All attributes in the DestinationUser profile must be mutable. If you have assigned the user any immutable custom attributes, the operation won't succeed.

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

The existing user in the user pool that you want to assign to the external IdP user\n account. This user can be a native (Username + Password) Amazon Cognito user pools user or a\n federated user (for example, a SAML or Facebook user). If the user doesn't exist, Amazon Cognito\n generates an exception. Amazon Cognito returns this user when the new user (with the linked IdP\n attribute) signs in.

\n

For a native username + password user, the ProviderAttributeValue for the\n DestinationUser should be the username in the user pool. For a\n federated user, it should be the provider-specific user_id.

\n

The ProviderAttributeName of the DestinationUser is\n ignored.

\n

The ProviderName should be set to Cognito for users in\n Cognito user pools.

\n \n

All attributes in the DestinationUser profile must be mutable. If you have\n assigned the user any immutable custom attributes, the operation won't\n succeed.

\n
", "smithy.api#required": {} } }, "SourceUser": { "target": "com.amazonaws.cognitoidentityprovider#ProviderUserIdentifierType", "traits": { - "smithy.api#documentation": "

An external identity provider account for a user who doesn't exist yet in the user pool. This user must be a federated user (for example, a SAML or Facebook user), not another native user.

\n

If the SourceUser is using a federated social identity provider, such as Facebook, Google, or Login with Amazon, you must set the ProviderAttributeName \n to Cognito_Subject. For social identity providers, the ProviderName will be Facebook, Google, or LoginWithAmazon, \n and Amazon Cognito will automatically parse the Facebook, Google, and Login with Amazon tokens for id, sub, and user_id, respectively. The \n ProviderAttributeValue for the user must be the same value as the id, sub, or user_id value found in the social identity provider token.

\n

\n

For SAML, the ProviderAttributeName can be any value that matches a claim in the SAML assertion. If you want to link SAML users based on the subject of the SAML \n assertion, you should map the subject to a claim through the SAML identity provider and submit that claim name as the ProviderAttributeName. If you set \n ProviderAttributeName to Cognito_Subject, Amazon Cognito will automatically parse the default unique identifier found in the subject from the SAML token.

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

An external IdP account for a user who doesn't exist yet in the user pool. This user\n must be a federated user (for example, a SAML or Facebook user), not another native\n user.

\n

If the SourceUser is using a federated social IdP, such as Facebook,\n Google, or Login with Amazon, you must set the ProviderAttributeName to\n Cognito_Subject. For social IdPs, the ProviderName will be\n Facebook, Google, or LoginWithAmazon, and\n Amazon Cognito will automatically parse the Facebook, Google, and Login with Amazon tokens for\n id, sub, and user_id, respectively. The\n ProviderAttributeValue for the user must be the same value as the\n id, sub, or user_id value found in the social\n IdP token.

\n

\n

For SAML, the ProviderAttributeName can be any value that matches a claim\n in the SAML assertion. If you want to link SAML users based on the subject of the SAML\n assertion, you should map the subject to a claim through the SAML IdP and submit that\n claim name as the ProviderAttributeName. If you set\n ProviderAttributeName to Cognito_Subject, Amazon Cognito will\n automatically parse the default unique identifier found in the subject from the SAML\n token.

", "smithy.api#required": {} } } @@ -1766,7 +1775,7 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKey", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } } @@ -1783,7 +1792,7 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKey", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } } @@ -1820,7 +1829,7 @@ } ], "traits": { - "smithy.api#documentation": "

A history of user activity and any risks detected as part of Amazon Cognito advanced security.

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

A history of user activity and any risks detected as part of Amazon Cognito advanced\n security.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1866,7 +1875,7 @@ "AuthEvents": { "target": "com.amazonaws.cognitoidentityprovider#AuthEventsType", "traits": { - "smithy.api#documentation": "

The response object. It includes the EventID, EventType, CreationDate, EventRisk, and EventResponse.

" + "smithy.api#documentation": "

The response object. It includes the EventID, EventType,\n CreationDate, EventRisk, and\n EventResponse.

" } }, "NextToken": { @@ -1882,6 +1891,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#AdminRemoveUserFromGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -1982,7 +1994,7 @@ } ], "traits": { - "smithy.api#documentation": "

Resets the specified user's password in a user pool as an administrator. Works on any user.

\n

When a developer calls this API, the current password is invalidated, so it must be changed. If a user tries to sign in after the API is called, \n the app will get a PasswordResetRequiredException exception back and should direct the user down the flow to reset the password, which is the same \n as the forgot password flow. In addition, if the user pool has phone verification selected and a verified phone number exists for the user, or if \n email verification is selected and a verified email exists for the user, calling this API will also result in sending a message to the end user \n with the code to change their password.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

Calling this action requires developer credentials.

" + "smithy.api#documentation": "

Resets the specified user's password in a user pool as an administrator. Works on any\n user.

\n

When a developer calls this API, the current password is invalidated, so it must be\n changed. If a user tries to sign in after the API is called, the app will get a\n PasswordResetRequiredException exception back and should direct the user down the flow\n to reset the password, which is the same as the forgot password flow. In addition, if\n the user pool has phone verification selected and a verified phone number exists for the\n user, or if email verification is selected and a verified email exists for the user,\n calling this API will also result in sending a message to the end user with the code to\n change their password.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

Calling this action requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminResetUserPasswordRequest": { @@ -2005,7 +2017,7 @@ "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n \n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminResetUserPassword API action, \n Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, \n which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the \n ClientMetadata parameter in your AdminResetUserPassword request. In your function code in Lambda, you can process the clientMetadata \n value to enhance your workflow for your specific needs.\n

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool\n triggers. When you use the AdminResetUserPassword API action, Amazon Cognito invokes the function\n that is assigned to the custom message trigger. When Amazon Cognito invokes\n this function, it passes a JSON payload, which the function receives as input. This\n payload contains a clientMetadata attribute, which provides the data that\n you assigned to the ClientMetadata parameter in your AdminResetUserPassword request. In\n your function code in Lambda, you can process the\n clientMetadata value to enhance your workflow for your specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -2017,7 +2029,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response from the server to reset a user password as an administrator.

" + "smithy.api#documentation": "

Represents the response from the server to reset a user password as an\n administrator.

" } }, "com.amazonaws.cognitoidentityprovider#AdminRespondToAuthChallenge": { @@ -2091,7 +2103,7 @@ } ], "traits": { - "smithy.api#documentation": "

Responds to an authentication challenge, as an administrator.

\n\n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

Calling this action requires developer credentials.

" + "smithy.api#documentation": "

Responds to an authentication challenge, as an administrator.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

Calling this action requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminRespondToAuthChallengeRequest": { @@ -2121,31 +2133,31 @@ "ChallengeResponses": { "target": "com.amazonaws.cognitoidentityprovider#ChallengeResponsesType", "traits": { - "smithy.api#documentation": "

The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:

\n \n
    \n
  • \n

    \n SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured with client secret).

    \n
  • \n
  • \n

    \n PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME, SECRET_HASH \n (if app client is configured with client secret).

    \n \n

    \n PASSWORD_VERIFIER requires DEVICE_KEY when signing in with a remembered device.

    \n
    \n
  • \n
  • \n

    \n ADMIN_NO_SRP_AUTH: PASSWORD, USERNAME, SECRET_HASH (if app client is configured with client secret).

    \n
  • \n
  • \n

    \n NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME, SECRET_HASH (if app client is configured with \n client secret).

    \n
  • \n
  • \n

    \n MFA_SETUP requires USERNAME, plus you must use the session value returned by VerifySoftwareToken in the Session parameter.

    \n
  • \n
\n

The value of the USERNAME attribute must be the user's actual username, not an alias (such as an email address or phone number). To make this simpler, the \n AdminInitiateAuth response includes the actual username value in the USERNAMEUSER_ID_FOR_SRP attribute. This happens even if you specified an \n alias in your call to AdminInitiateAuth.

" + "smithy.api#documentation": "

The challenge responses. These are inputs corresponding to the value of\n ChallengeName, for example:

\n
    \n
  • \n

    \n SMS_MFA: SMS_MFA_CODE, USERNAME,\n SECRET_HASH (if app client is configured with client\n secret).

    \n
  • \n
  • \n

    \n PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE,\n PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP,\n USERNAME, SECRET_HASH (if app client is configured\n with client secret).

    \n \n

    \n PASSWORD_VERIFIER requires DEVICE_KEY when\n signing in with a remembered device.

    \n
    \n
  • \n
  • \n

    \n ADMIN_NO_SRP_AUTH: PASSWORD, USERNAME,\n SECRET_HASH (if app client is configured with client secret).\n

    \n
  • \n
  • \n

    \n NEW_PASSWORD_REQUIRED: NEW_PASSWORD,\n USERNAME, SECRET_HASH (if app client is configured\n with client secret). To set any required attributes that Amazon Cognito returned as\n requiredAttributes in the AdminInitiateAuth\n response, add a userAttributes.attributename\n \n parameter. This parameter can also set values for writable attributes that\n aren't required by your user pool.

    \n \n \n

    In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value. \nIn AdminRespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the requiredAttributes parameter, \nthen use the AdminUpdateUserAttributes API operation to modify the value of any additional attributes.

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

    \n MFA_SETUP requires USERNAME, plus you must use the\n session value returned by VerifySoftwareToken in the\n Session parameter.

    \n
  • \n
\n

The value of the USERNAME attribute must be the user's actual username,\n not an alias (such as an email address or phone number). To make this simpler, the\n AdminInitiateAuth response includes the actual username value in the\n USERNAMEUSER_ID_FOR_SRP attribute. This happens even if you specified\n an alias in your call to AdminInitiateAuth.

" } }, "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service. If an InitiateAuth or RespondToAuthChallenge API call determines \n that the caller must pass another challenge, it returns a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge \n API call.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service. If an InitiateAuth or RespondToAuthChallenge API call\n determines that the caller must pass another challenge, it returns a session with other\n challenge parameters. This session should be passed as it is to the next\n RespondToAuthChallenge API call.

" } }, "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The analytics metadata for collecting Amazon Pinpoint metrics for AdminRespondToAuthChallenge calls.

" + "smithy.api#documentation": "

The analytics metadata for collecting Amazon Pinpoint metrics for\n AdminRespondToAuthChallenge calls.

" } }, "ContextData": { "target": "com.amazonaws.cognitoidentityprovider#ContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the AdminRespondToAuthChallenge API action, Amazon Cognito invokes any functions\n that you have assigned to the following triggers:

\n
    \n
  • \n

    pre sign-up

    \n
  • \n
  • \n

    custom message

    \n
  • \n
  • \n

    post authentication

    \n
  • \n
  • \n

    user migration

    \n
  • \n
  • \n

    pre token generation

    \n
  • \n
  • \n

    define auth challenge

    \n
  • \n
  • \n

    create auth challenge

    \n
  • \n
  • \n

    verify auth challenge response

    \n
  • \n
\n

When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the\n function receives as input. This payload contains a clientMetadata\n attribute that provides the data that you assigned to the ClientMetadata parameter in\n your AdminRespondToAuthChallenge request. In your function code in Lambda, you can\n process the clientMetadata value to enhance your workflow for your specific\n needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration \n doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the AdminRespondToAuthChallenge API action, Amazon Cognito invokes any functions\n that you have assigned to the following triggers:

\n
    \n
  • \n

    pre sign-up

    \n
  • \n
  • \n

    custom message

    \n
  • \n
  • \n

    post authentication

    \n
  • \n
  • \n

    user migration

    \n
  • \n
  • \n

    pre token generation

    \n
  • \n
  • \n

    define auth challenge

    \n
  • \n
  • \n

    create auth challenge

    \n
  • \n
  • \n

    verify auth challenge response

    \n
  • \n
\n

When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the\n function receives as input. This payload contains a clientMetadata\n attribute that provides the data that you assigned to the ClientMetadata parameter in\n your AdminRespondToAuthChallenge request. In your function code in Lambda, you can\n process the clientMetadata value to enhance your workflow for your specific\n needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -2165,7 +2177,7 @@ "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service. If the caller must pass another challenge, they return a session with other challenge parameters. \n This session should be passed as it is to the next RespondToAuthChallenge API call.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service. If the caller must pass another challenge, they return a session with other\n challenge parameters. This session should be passed as it is to the next\n RespondToAuthChallenge API call.

" } }, "ChallengeParameters": { @@ -2217,7 +2229,7 @@ } ], "traits": { - "smithy.api#documentation": "

The user's multi-factor authentication (MFA) preference, including which MFA options are activated, and if any are preferred. Only one factor can be set as preferred. The preferred \n MFA factor will be used to authenticate a user if multiple factors are activated. If multiple options are activated and no preference is set, a challenge to choose an MFA option will \n be returned during sign-in.

" + "smithy.api#documentation": "

The user's multi-factor authentication (MFA) preference, including which MFA options\n are activated, and if any are preferred. Only one factor can be set as preferred. The\n preferred MFA factor will be used to authenticate a user if multiple factors are\n activated. If multiple options are activated and no preference is set, a challenge to\n choose an MFA option will be returned during sign-in.

" } }, "com.amazonaws.cognitoidentityprovider#AdminSetUserMFAPreferenceRequest": { @@ -2287,7 +2299,7 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the specified user's password in a user pool as an administrator. Works on any user.

\n

The password can be temporary or permanent. If it is temporary, the user status enters the FORCE_CHANGE_PASSWORD state. When the user next tries to sign in, \n the InitiateAuth/AdminInitiateAuth response will contain the NEW_PASSWORD_REQUIRED challenge. If the user doesn't sign in before it expires, the user won't be \n able to sign in, and an administrator must reset their password.

\n

Once the user has set a new password, or the password is permanent, the user status is set to Confirmed.

" + "smithy.api#documentation": "

Sets the specified user's password in a user pool as an administrator. Works on any\n user.

\n

The password can be temporary or permanent. If it is temporary, the user status enters\n the FORCE_CHANGE_PASSWORD state. When the user next tries to sign in, the\n InitiateAuth/AdminInitiateAuth response will contain the\n NEW_PASSWORD_REQUIRED challenge. If the user doesn't sign in before it\n expires, the user won't be able to sign in, and an administrator must reset their\n password.

\n

Once the user has set a new password, or the password is permanent, the user status is\n set to Confirmed.

" } }, "com.amazonaws.cognitoidentityprovider#AdminSetUserPasswordRequest": { @@ -2317,7 +2329,7 @@ "Permanent": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

\n True if the password is permanent, False if it is temporary.

" + "smithy.api#documentation": "

\n True if the password is permanent, False if it is\n temporary.

" } } } @@ -2352,7 +2364,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n This action is no longer supported. You can use it to configure only SMS MFA. You can't use it to configure time-based one-time password (TOTP) \n software token MFA. To configure either type of MFA, \n use AdminSetUserMFAPreference instead.

" + "smithy.api#documentation": "

\n This action is no longer supported. You can use it to configure\n only SMS MFA. You can't use it to configure time-based one-time password (TOTP) software\n token MFA. To configure either type of MFA, use AdminSetUserMFAPreference instead.

" } }, "com.amazonaws.cognitoidentityprovider#AdminSetUserSettingsRequest": { @@ -2375,20 +2387,20 @@ "MFAOptions": { "target": "com.amazonaws.cognitoidentityprovider#MFAOptionListType", "traits": { - "smithy.api#documentation": "

You can use this parameter only to set an SMS configuration that uses SMS for delivery.

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

You can use this parameter only to set an SMS configuration that uses SMS for\n delivery.

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

You can use this parameter to set an MFA configuration that uses the SMS delivery medium.

" + "smithy.api#documentation": "

You can use this parameter to set an MFA configuration that uses the SMS delivery\n medium.

" } }, "com.amazonaws.cognitoidentityprovider#AdminSetUserSettingsResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response from the server to set user settings as an administrator.

" + "smithy.api#documentation": "

Represents the response from the server to set user settings as an\n administrator.

" } }, "com.amazonaws.cognitoidentityprovider#AdminUpdateAuthEventFeedback": { @@ -2423,7 +2435,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides feedback for an authentication event indicating if it was from a valid user. This feedback is used for improving the risk evaluation decision for the user pool \n as part of Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Provides feedback for an authentication event indicating if it was from a valid user.\n This feedback is used for improving the risk evaluation decision for the user pool as\n part of Amazon Cognito advanced security.

" } }, "com.amazonaws.cognitoidentityprovider#AdminUpdateAuthEventFeedbackRequest": { @@ -2590,7 +2602,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the specified user's attributes, including developer attributes, as an administrator. Works on any user.

\n

For custom attributes, you must prepend the custom: prefix to the attribute name.

\n

In addition to updating user attributes, this API can also be used to mark phone and email as verified.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

Calling this action requires developer credentials.

" + "smithy.api#documentation": "

Updates the specified user's attributes, including developer attributes, as an\n administrator. Works on any user.

\n

For custom attributes, you must prepend the custom: prefix to the\n attribute name.

\n

In addition to updating user attributes, this API can also be used to mark phone and\n email as verified.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
\n\n

Calling this action requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminUpdateUserAttributesRequest": { @@ -2613,14 +2625,14 @@ "UserAttributes": { "target": "com.amazonaws.cognitoidentityprovider#AttributeListType", "traits": { - "smithy.api#documentation": "

An array of name-value pairs representing user attributes.

\n

For custom attributes, you must prepend the custom: prefix to the attribute name.

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

An array of name-value pairs representing user attributes.

\n

For custom attributes, you must prepend the custom: prefix to the\n attribute name.

\n

If your user pool requires verification before Amazon Cognito updates an attribute value that\n you specify in this request, Amazon Cognito doesn’t immediately update the value of that\n attribute. After your user receives and responds to a verification message to verify the\n new value, Amazon Cognito updates the attribute value. Your user can sign in and receive messages\n with the original attribute value until they verify the new value.

\n

To update the value of an attribute that requires verification in the same API\n request, include the email_verified or phone_number_verified\n attribute, with a value of true. If you set the email_verified\n or phone_number_verified value for an email or\n phone_number attribute that requires verification to true,\n Amazon Cognito doesn’t send a verification message to your user.

", "smithy.api#required": {} } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n \n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminUpdateUserAttributes API action, Amazon Cognito invokes \n the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives \n as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your \n AdminUpdateUserAttributes request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for \n your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool\n triggers. When you use the AdminUpdateUserAttributes API action, Amazon Cognito invokes the\n function that is assigned to the custom message trigger. When Amazon Cognito\n invokes this function, it passes a JSON payload, which the function receives as input.\n This payload contains a clientMetadata attribute, which provides the data\n that you assigned to the ClientMetadata parameter in your AdminUpdateUserAttributes\n request. In your function code in Lambda, you can process the\n clientMetadata value to enhance your workflow for your specific\n needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -2632,7 +2644,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response from the server for the request to update user attributes as an administrator.

" + "smithy.api#documentation": "

Represents the response from the server for the request to update user attributes as\n an administrator.

" } }, "com.amazonaws.cognitoidentityprovider#AdminUserGlobalSignOut": { @@ -2664,7 +2676,7 @@ } ], "traits": { - "smithy.api#documentation": "

Signs out users from all devices, as an administrator. It also invalidates all refresh tokens issued to a user. The user's current access and Id tokens remain valid until their expiry. Access and \n Id tokens expire one hour after they're issued.

\n

Calling this action requires developer credentials.

" + "smithy.api#documentation": "

Signs out a user from all devices. You must sign AdminUserGlobalSignOut requests\n with Amazon Web Services credentials. It also invalidates all refresh tokens that Amazon Cognito has issued to\n a user. The user's current access and ID tokens remain valid until they expire. By\n default, access and ID tokens expire one hour after they're issued. A user can still use\n a hosted UI cookie to retrieve new tokens for the duration of the cookie validity period\n of 1 hour.

\n

Calling this action requires developer credentials.

" } }, "com.amazonaws.cognitoidentityprovider#AdminUserGlobalSignOutRequest": { @@ -2751,7 +2763,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception \n tells user that an account with this email or phone already exists.

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

This exception is thrown when a user tries to confirm the account with an email\n address or phone number that has already been supplied as an alias from a different\n account. This exception indicates that an account with this email address or phone\n already exists in a user pool that you've configured to use email address or phone\n number as a sign-in alias.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2768,13 +2780,13 @@ "ApplicationArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an Amazon Pinpoint project. You can use the Amazon Pinpoint project\n to integrate with the chosen user pool Client. Amazon Cognito publishes events to the\n Amazon Pinpointproject declared by the app ARN.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an Amazon Pinpoint project. You can use the Amazon Pinpoint project\n to integrate with the chosen user pool Client. Amazon Cognito publishes events to the Amazon Pinpoint\n project that the app ARN declares.

" } }, "RoleArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The ARN of an Identity and Access Management role that authorizes Amazon Cognito to publish events to Amazon Pinpoint analytics.

" + "smithy.api#documentation": "

The ARN of an Identity and Access Management role that authorizes Amazon Cognito to publish events to Amazon Pinpoint\n analytics.

" } }, "ExternalId": { @@ -2786,12 +2798,12 @@ "UserDataShared": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

If UserDataShared is true, Amazon Cognito will include user data in the events it publishes to Amazon Pinpoint analytics.

" + "smithy.api#documentation": "

If UserDataShared is true, Amazon Cognito includes user data in the\n events that it publishes to Amazon Pinpoint analytics.

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

The Amazon Pinpoint analytics configuration for collecting metrics for a user pool.

\n \n

In Regions where Amazon Pinpointisn't available, user pools only support sending events to Amazon Pinpoint\n projects in us-east-1. In Regions where Amazon Pinpoint is available, user pools support\n sending events to Amazon Pinpoint projects within that same Region.

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

The Amazon Pinpoint analytics configuration necessary to collect metrics for a user\n pool.

\n \n

In Regions where Amazon Pinpointisn't available, user pools only support sending events to\n Amazon Pinpoint projects in us-east-1. In Regions where Amazon Pinpoint is available, user pools\n support sending events to Amazon Pinpoint projects within that same Region.

\n
" } }, "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType": { @@ -2805,7 +2817,7 @@ } }, "traits": { - "smithy.api#documentation": "

An Amazon Pinpoint analytics endpoint.

\n

An endpoint uniquely identifies a mobile device, email address, or phone number that can receive messages from Amazon Pinpoint analytics.

\n \n

Amazon Cognito user pools only support sending events to Amazon Pinpoint projects in the US East (N.\n Virginia) us-east-1 Region, regardless of the Region where the user pool\n resides.

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

An Amazon Pinpoint analytics endpoint.

\n

An endpoint uniquely identifies a mobile device, email address, or phone number that\n can receive messages from Amazon Pinpoint analytics. For more information about Amazon Web Services Regions that\n can contain Amazon Pinpoint resources for use with Amazon Cognito user pools, see Using Amazon Pinpoint analytics with Amazon Cognito user pools.

" } }, "com.amazonaws.cognitoidentityprovider#ArnType": { @@ -2847,7 +2859,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique generated shared secret key code for the user account. The request takes an access token or a session string, but not both.

\n \n

Calling AssociateSoftwareToken immediately disassociates the existing software token from the user account. If the user doesn't subsequently verify the software token, \n their account is set up to authenticate without MFA. If MFA config is set to Optional at the user pool level, the user can then log in without MFA. However, if MFA is \n set to Required for the user pool, the user is asked to set up a new software token MFA during sign-in.

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

Returns a unique generated shared secret key code for the user account. The request\n takes an access token or a session string, but not both.

\n \n

Calling AssociateSoftwareToken immediately disassociates the existing software\n token from the user account. If the user doesn't subsequently verify the software\n token, their account is set up to authenticate without MFA. If MFA config is set to\n Optional at the user pool level, the user can then log in without MFA. However, if\n MFA is set to Required for the user pool, the user is asked to set up a new software\n token MFA during sign-in.

\n
" } }, "com.amazonaws.cognitoidentityprovider#AssociateSoftwareTokenRequest": { @@ -2856,13 +2868,13 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token.

" + "smithy.api#documentation": "

A valid access token that Amazon Cognito issued to the user whose software token you want to\n generate.

" } }, "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service. This allows authentication of the user as part of the MFA setup process.

" } } } @@ -2873,13 +2885,13 @@ "SecretCode": { "target": "com.amazonaws.cognitoidentityprovider#SecretCodeType", "traits": { - "smithy.api#documentation": "

A unique generated shared secret code that is used in the time-based one-time password (TOTP) algorithm to generate a one-time code.

" + "smithy.api#documentation": "

A unique generated shared secret code that is used in the time-based one-time password\n (TOTP) algorithm to generate a one-time code.

" } }, "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service. This allows authentication of the user as part of the MFA setup process.

" } } } @@ -2978,6 +2990,12 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.cognitoidentityprovider#AttributesRequireVerificationBeforeUpdateType": { + "type": "list", + "member": { + "target": "com.amazonaws.cognitoidentityprovider#VerifiedAttributeType" + } + }, "com.amazonaws.cognitoidentityprovider#AuthEventType": { "type": "structure", "members": { @@ -3020,13 +3038,13 @@ "EventContextData": { "target": "com.amazonaws.cognitoidentityprovider#EventContextDataType", "traits": { - "smithy.api#documentation": "

The user context data captured at the time of an event request. This value provides additional information about the client from which event the request is received.

" + "smithy.api#documentation": "

The user context data captured at the time of an event request. This value provides\n additional information about the client from which event the request is received.

" } }, "EventFeedback": { "target": "com.amazonaws.cognitoidentityprovider#EventFeedbackType", "traits": { - "smithy.api#documentation": "

A flag specifying the user feedback captured at the time of an event request is good or bad.

" + "smithy.api#documentation": "

A flag specifying the user feedback captured at the time of an event request is good\n or bad.

" } } }, @@ -3093,7 +3111,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token.

" + "smithy.api#documentation": "

A valid access token that Amazon Cognito issued to the user who you want to\n authenticate.

" } }, "ExpiresIn": { @@ -3351,7 +3369,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token.

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

A valid access token that Amazon Cognito issued to the user whose password you want to\n change.

", "smithy.api#required": {} } } @@ -3435,24 +3453,24 @@ "Destination": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

The destination for the code delivery details.

" + "smithy.api#documentation": "

The email address or phone number destination where Amazon Cognito sent the code.

" } }, "DeliveryMedium": { "target": "com.amazonaws.cognitoidentityprovider#DeliveryMediumType", "traits": { - "smithy.api#documentation": "

The delivery medium (email message or phone number).

" + "smithy.api#documentation": "

The method that Amazon Cognito used to send the code.

" } }, "AttributeName": { "target": "com.amazonaws.cognitoidentityprovider#AttributeNameType", "traits": { - "smithy.api#documentation": "

The attribute name.

" + "smithy.api#documentation": "

The name of the attribute that Amazon Cognito verifies with the code.

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

The code delivery details being returned from the server.

" + "smithy.api#documentation": "

The delivery details for an email or SMS message that Amazon Cognito sent for authentication or\n verification.

" } }, "com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException": { @@ -3466,7 +3484,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when a verification code fails to deliver successfully.

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

This exception is thrown when a verification code fails to deliver\n successfully.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -3482,7 +3500,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown if the provided code doesn't match what the server was expecting.

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

This exception is thrown if the provided code doesn't match what the server was\n expecting.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -3533,7 +3551,7 @@ "EventFilter": { "target": "com.amazonaws.cognitoidentityprovider#EventFiltersType", "traits": { - "smithy.api#documentation": "

Perform the action for these events. The default is to perform all events if no event filter is specified.

" + "smithy.api#documentation": "

Perform the action for these events. The default is to perform all events if no event\n filter is specified.

" } }, "Actions": { @@ -3559,7 +3577,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown if two or more modifications are happening concurrently.

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

This exception is thrown if two or more modifications are happening\n concurrently.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -3611,7 +3629,7 @@ } ], "traits": { - "smithy.api#documentation": "

Confirms tracking of the device. This API call is the call that begins device tracking.

" + "smithy.api#documentation": "

Confirms tracking of the device. This API call is the call that begins device\n tracking.

" } }, "com.amazonaws.cognitoidentityprovider#ConfirmDeviceRequest": { @@ -3620,7 +3638,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token.

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

A valid access token that Amazon Cognito issued to the user whose device you want to\n confirm.

", "smithy.api#required": {} } }, @@ -3736,20 +3754,20 @@ "SecretHash": { "target": "com.amazonaws.cognitoidentityprovider#SecretHashType", "traits": { - "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

" + "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a\n user pool client and username plus the client ID in the message.

" } }, "Username": { "target": "com.amazonaws.cognitoidentityprovider#UsernameType", "traits": { - "smithy.api#documentation": "

The user name of the user for whom you want to enter a code to retrieve a forgotten password.

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

The user name of the user for whom you want to enter a code to retrieve a forgotten\n password.

", "smithy.api#required": {} } }, "ConfirmationCode": { "target": "com.amazonaws.cognitoidentityprovider#ConfirmationCodeType", "traits": { - "smithy.api#documentation": "

The confirmation code sent by a user's request to retrieve a forgotten password. For more information, \n see ForgotPassword.

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

The confirmation code sent by a user's request to retrieve a forgotten password. For\n more information, see ForgotPassword.

", "smithy.api#required": {} } }, @@ -3763,19 +3781,19 @@ "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmForgotPassword calls.

" + "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for\n ConfirmForgotPassword calls.

" } }, "UserContextData": { "target": "com.amazonaws.cognitoidentityprovider#UserContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the ConfirmForgotPassword API action, Amazon Cognito invokes the function that is\n assigned to the post confirmation trigger. When Amazon Cognito invokes this\n function, it passes a JSON payload, which the function receives as input. This payload\n contains a clientMetadata attribute, which provides the data that you\n assigned to the ClientMetadata parameter in your ConfirmForgotPassword request. In your\n function code in Lambda, you can process the clientMetadata value to\n enhance your workflow for your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the ConfirmForgotPassword API action, Amazon Cognito invokes the function that is\n assigned to the post confirmation trigger. When Amazon Cognito invokes this\n function, it passes a JSON payload, which the function receives as input. This payload\n contains a clientMetadata attribute, which provides the data that you\n assigned to the ClientMetadata parameter in your ConfirmForgotPassword request. In your\n function code in Lambda, you can process the clientMetadata value to\n enhance your workflow for your specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -3787,7 +3805,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The response from the server that results from a user's request to retrieve a forgotten password.

" + "smithy.api#documentation": "

The response from the server that results from a user's request to retrieve a\n forgotten password.

" } }, "com.amazonaws.cognitoidentityprovider#ConfirmSignUp": { @@ -3844,7 +3862,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Confirms registration of a user and handles the existing alias from a previous user.

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

Confirms registration of a new user.

", "smithy.api#optionalAuth": {} } }, @@ -3861,7 +3879,7 @@ "SecretHash": { "target": "com.amazonaws.cognitoidentityprovider#SecretHashType", "traits": { - "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

" + "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a\n user pool client and username plus the client ID in the message.

" } }, "Username": { @@ -3881,25 +3899,25 @@ "ForceAliasCreation": { "target": "com.amazonaws.cognitoidentityprovider#ForceAliasCreation", "traits": { - "smithy.api#documentation": "

Boolean to be specified to force user confirmation irrespective of existing alias. By default set to False. If this parameter is set to \n True and the phone number/email used for sign up confirmation already exists as an alias with a different user, the API call will migrate \n the alias from the previous user to the newly created user being confirmed. If set to False, the API will throw an \n AliasExistsException error.

" + "smithy.api#documentation": "

Boolean to be specified to force user confirmation irrespective of existing alias. By\n default set to False. If this parameter is set to True and the\n phone number/email used for sign up confirmation already exists as an alias with a\n different user, the API call will migrate the alias from the previous user to the newly\n created user being confirmed. If set to False, the API will throw an\n AliasExistsException error.

" } }, "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmSignUp calls.

" + "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmSignUp\n calls.

" } }, "UserContextData": { "target": "com.amazonaws.cognitoidentityprovider#UserContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n \n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the ConfirmSignUp API action, \n Amazon Cognito invokes the function that is assigned to the post confirmation trigger. When Amazon Cognito invokes this \n function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which \n provides the data that you assigned to the ClientMetadata parameter in your ConfirmSignUp request. In your function code in Lambda, \n you can process the clientMetadata value to enhance your workflow for your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool\n triggers. When you use the ConfirmSignUp API action, Amazon Cognito invokes the function that is\n assigned to the post confirmation trigger. When Amazon Cognito invokes this\n function, it passes a JSON payload, which the function receives as input. This payload\n contains a clientMetadata attribute, which provides the data that you\n assigned to the ClientMetadata parameter in your ConfirmSignUp request. In your function\n code in Lambda, you can process the clientMetadata value to\n enhance your workflow for your specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -3958,12 +3976,12 @@ "EncodedData": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

Encoded data containing device fingerprinting details collected using the Amazon Cognito context data collection library.

" + "smithy.api#documentation": "

Encoded data containing device fingerprinting details collected using the Amazon Cognito\n context data collection library.

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

Contextual user data type used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual user data type used for evaluating the risk of an unexpected event by Amazon Cognito\n advanced security.

" } }, "com.amazonaws.cognitoidentityprovider#CreateGroup": { @@ -4033,7 +4051,7 @@ "Precedence": { "target": "com.amazonaws.cognitoidentityprovider#PrecedenceType", "traits": { - "smithy.api#documentation": "

A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. \n Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher ornull Precedence \n values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the \n cognito:roles and cognito:preferred_role claims.

\n

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same \n Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If \n the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens.

\n

The default Precedence value is null.

" + "smithy.api#documentation": "

A non-negative integer value that specifies the precedence of this group relative to\n the other groups that a user can belong to in the user pool. Zero is the highest\n precedence value. Groups with lower Precedence values take precedence over\n groups with higher or null Precedence values. If a user belongs to two or\n more groups, it is the group with the lowest precedence value whose role ARN is given in\n the user's tokens for the cognito:roles and\n cognito:preferred_role claims.

\n

Two groups can have the same Precedence value. If this happens, neither\n group takes precedence over the other. If two groups with the same\n Precedence have the same role ARN, that role is used in the\n cognito:preferred_role claim in tokens for users in each group. If the\n two groups have different role ARNs, the cognito:preferred_role claim isn't\n set in users' tokens.

\n

The default Precedence value is null. The maximum Precedence\n value is 2^31-1.

" } } } @@ -4081,7 +4099,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an identity provider for a user pool.

" + "smithy.api#documentation": "

Creates an IdP for a user pool.

" } }, "com.amazonaws.cognitoidentityprovider#CreateIdentityProviderRequest": { @@ -4097,34 +4115,34 @@ "ProviderName": { "target": "com.amazonaws.cognitoidentityprovider#ProviderNameTypeV1", "traits": { - "smithy.api#documentation": "

The identity provider name.

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

The IdP name.

", "smithy.api#required": {} } }, "ProviderType": { "target": "com.amazonaws.cognitoidentityprovider#IdentityProviderTypeType", "traits": { - "smithy.api#documentation": "

The identity provider type.

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

The IdP type.

", "smithy.api#required": {} } }, "ProviderDetails": { "target": "com.amazonaws.cognitoidentityprovider#ProviderDetailsType", "traits": { - "smithy.api#documentation": "

The identity provider details. The following list describes the provider detail keys for each identity provider type.

\n
    \n
  • \n

    For Google and Login with Amazon:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      authorize_scopes

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

    For Facebook:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      authorize_scopes

      \n
    • \n
    • \n

      api_version

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

    For Sign in with Apple:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      team_id

      \n
    • \n
    • \n

      key_id

      \n
    • \n
    • \n

      private_key

      \n
    • \n
    • \n

      authorize_scopes

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

    For OpenID Connect (OIDC) providers:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      attributes_request_method

      \n
    • \n
    • \n

      oidc_issuer

      \n
    • \n
    • \n

      authorize_scopes

      \n
    • \n
    • \n

      authorize_url if not available from discovery URL specified by oidc_issuer key\n

      \n
    • \n
    • \n

      token_url if not available from discovery URL specified by oidc_issuer key\n

      \n
    • \n
    • \n

      attributes_url if not available from discovery URL specified by oidc_issuer key\n

      \n
    • \n
    • \n

      jwks_uri if not available from discovery URL specified by oidc_issuer key\n

      \n
    • \n
    • \n

      attributes_url_add_attributes a read-only property that is set automatically\n

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

    For SAML providers:

    \n
      \n
    • \n

      MetadataFile OR MetadataURL

      \n
    • \n
    • \n

      IDPSignout (optional)

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

The IdP details. The following list describes the provider detail keys for each IdP\n type.

\n
    \n
  • \n

    For Google and Login with Amazon:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      authorize_scopes

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

    For Facebook:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      authorize_scopes

      \n
    • \n
    • \n

      api_version

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

    For Sign in with Apple:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      team_id

      \n
    • \n
    • \n

      key_id

      \n
    • \n
    • \n

      private_key

      \n
    • \n
    • \n

      authorize_scopes

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

    For OpenID Connect (OIDC) providers:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      attributes_request_method

      \n
    • \n
    • \n

      oidc_issuer

      \n
    • \n
    • \n

      authorize_scopes

      \n
    • \n
    • \n

      The following keys are only present if Amazon Cognito didn't discover them at\n the oidc_issuer URL.

      \n
        \n
      • \n

        authorize_url

        \n
      • \n
      • \n

        token_url

        \n
      • \n
      • \n

        attributes_url

        \n
      • \n
      • \n

        jwks_uri

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

      Amazon Cognito sets the value of the following keys automatically. They are\n read-only.

      \n
        \n
      • \n

        attributes_url_add_attributes

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

    For SAML providers:

    \n
      \n
    • \n

      MetadataFile or MetadataURL

      \n
    • \n
    • \n

      IDPSignout optional\n

      \n
    • \n
    \n
  • \n
", "smithy.api#required": {} } }, "AttributeMapping": { "target": "com.amazonaws.cognitoidentityprovider#AttributeMappingType", "traits": { - "smithy.api#documentation": "

A mapping of identity provider attributes to standard and custom user pool attributes.

" + "smithy.api#documentation": "

A mapping of IdP attributes to standard and custom user pool attributes.

" } }, "IdpIdentifiers": { "target": "com.amazonaws.cognitoidentityprovider#IdpIdentifiersListType", "traits": { - "smithy.api#documentation": "

A list of identity provider identifiers.

" + "smithy.api#documentation": "

A list of IdP identifiers.

" } } } @@ -4135,7 +4153,7 @@ "IdentityProvider": { "target": "com.amazonaws.cognitoidentityprovider#IdentityProviderType", "traits": { - "smithy.api#documentation": "

The newly created identity provider object.

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

The newly created IdP object.

", "smithy.api#required": {} } } @@ -4186,7 +4204,7 @@ "Identifier": { "target": "com.amazonaws.cognitoidentityprovider#ResourceServerIdentifierType", "traits": { - "smithy.api#documentation": "

A unique resource server identifier for the resource server. This could be an HTTPS endpoint where the resource server is located, such as https://my-weather-api.example.com.

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

A unique resource server identifier for the resource server. This could be an HTTPS\n endpoint where the resource server is located, such as\n https://my-weather-api.example.com.

", "smithy.api#required": {} } }, @@ -4200,7 +4218,7 @@ "Scopes": { "target": "com.amazonaws.cognitoidentityprovider#ResourceServerScopeListType", "traits": { - "smithy.api#documentation": "

A list of scopes. Each scope is a key-value map with the keys name and description.

" + "smithy.api#documentation": "

A list of scopes. Each scope is a key-value map with the keys name and\n description.

" } } } @@ -4265,7 +4283,7 @@ "UserPoolId": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolIdType", "traits": { - "smithy.api#documentation": "

The user pool ID for the user pool that the users are being imported\n into.

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

The user pool ID for the user pool that the users are being imported into.

", "smithy.api#required": {} } }, @@ -4292,7 +4310,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server to the request to create the user import job.

" + "smithy.api#documentation": "

Represents the response from the server to the request to create the user import\n job.

" } }, "com.amazonaws.cognitoidentityprovider#CreateUserPool": { @@ -4333,7 +4351,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

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

Creates a new Amazon Cognito user pool and sets the password policy for the\n pool.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
" } }, "com.amazonaws.cognitoidentityprovider#CreateUserPoolClient": { @@ -4371,7 +4389,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates the user pool client.

\n

When you create a new user pool client, token revocation is automatically activated. For more information about revoking tokens, \n see RevokeToken.

" + "smithy.api#documentation": "

Creates the user pool client.

\n

When you create a new user pool client, token revocation is automatically activated.\n For more information about revoking tokens, see RevokeToken.

" } }, "com.amazonaws.cognitoidentityprovider#CreateUserPoolClientRequest": { @@ -4394,31 +4412,31 @@ "GenerateSecret": { "target": "com.amazonaws.cognitoidentityprovider#GenerateSecret", "traits": { - "smithy.api#documentation": "

Boolean to specify whether you want to generate a secret for the user pool client being created.

" + "smithy.api#documentation": "

Boolean to specify whether you want to generate a secret for the user pool client\n being created.

" } }, "RefreshTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#RefreshTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit, in days, after which the refresh token is no longer valid and can't be used.

" + "smithy.api#documentation": "

The refresh token time limit. After this limit expires, your user can't use \n their refresh token. To specify the time unit for RefreshTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set RefreshTokenValidity as 10 and\n TokenValidityUnits as days, your user can refresh their session\n and retrieve new access and ID tokens for 10 days.

\n

The default time unit for RefreshTokenValidity in an API request is days. \n You can't set RefreshTokenValidity to 0. If you do, Amazon Cognito overrides the \n value with the default value of 30 days. Valid range is displayed below \n in seconds.

" } }, "AccessTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#AccessTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit, between 5 minutes and 1 day, after which the access token is no longer valid and can't be used. If you supply a TokenValidityUnits value, you will override \n the default time unit.

" + "smithy.api#documentation": "

The access token time limit. After this limit expires, your user can't use \n their access token. To specify the time unit for AccessTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set AccessTokenValidity to 10 and\n TokenValidityUnits to hours, your user can authorize access with\n their access token for 10 hours.

\n

The default time unit for AccessTokenValidity in an API request is hours. \n Valid range is displayed below in seconds.

" } }, "IdTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#IdTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit, between 5 minutes and 1 day, after which the access token is no longer valid and can't be used. If you supply a TokenValidityUnits value, you will override \n the default time unit.

" + "smithy.api#documentation": "

The ID token time limit. After this limit expires, your user can't use \n their ID token. To specify the time unit for IdTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set IdTokenValidity as 10 and\n TokenValidityUnits as hours, your user can authenticate their \n session with their ID token for 10 hours.

\n

The default time unit for AccessTokenValidity in an API request is hours. \n Valid range is displayed below in seconds.

" } }, "TokenValidityUnits": { "target": "com.amazonaws.cognitoidentityprovider#TokenValidityUnitsType", "traits": { - "smithy.api#documentation": "

The units in which the validity times are represented. Default for RefreshToken is days, and default for ID and access tokens are hours.

" + "smithy.api#documentation": "

The units in which the validity times are represented. The default unit for\n RefreshToken is days, and default for ID and access tokens are hours.

" } }, "ReadAttributes": { @@ -4430,55 +4448,55 @@ "WriteAttributes": { "target": "com.amazonaws.cognitoidentityprovider#ClientPermissionListType", "traits": { - "smithy.api#documentation": "

The user pool attributes that the app client can write to.

\n

If your app client allows users to sign in through an identity provider, this array\n must include all attributes that you have mapped to identity provider attributes. Amazon Cognito\n updates mapped attributes when users sign in to your application through an identity\n provider. If your app client does not have write access to a mapped attribute, Amazon Cognito\n throws an error when it tries to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your user\n pool.

" + "smithy.api#documentation": "

The user pool attributes that the app client can write to.

\n

If your app client allows users to sign in through an IdP, this array must include all\n attributes that you have mapped to IdP attributes. Amazon Cognito updates mapped attributes when\n users sign in to your application through an IdP. If your app client does not have write\n access to a mapped attribute, Amazon Cognito throws an error when it tries to update the\n attribute. For more information, see Specifying IdP Attribute Mappings for Your user\n pool.

" } }, "ExplicitAuthFlows": { "target": "com.amazonaws.cognitoidentityprovider#ExplicitAuthFlowsListType", "traits": { - "smithy.api#documentation": "

The authentication flows that are supported by the user pool clients. Flow names\n without the ALLOW_ prefix are no longer supported, in favor of new names\n with the ALLOW_ prefix.

\n \n

Values with ALLOW_ prefix must be used only along with the\n ALLOW_ prefix.

\n
\n

Valid values include:

\n \n
    \n
  • \n

    \n ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password\n authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces\n the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Amazon Cognito\n receives the password in the request instead of using the Secure Remote Password\n (SRP) protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_CUSTOM_AUTH: Enable Lambda trigger based\n authentication.

    \n
  • \n
  • \n

    \n ALLOW_USER_PASSWORD_AUTH: Enable user password-based\n authentication. In this flow, Amazon Cognito receives the password in the request instead\n of using the SRP protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.

    \n
  • \n
  • \n

    \n ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh\n tokens.

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

The authentication flows that are supported by the user pool clients. Flow names\n without the ALLOW_ prefix are no longer supported, in favor of new names\n with the ALLOW_ prefix.

\n \n

Values with ALLOW_ prefix must be used only along with the\n ALLOW_ prefix.

\n
\n

Valid values include:

\n
    \n
  • \n

    \n ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password\n authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces\n the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Amazon Cognito\n receives the password in the request instead of using the Secure Remote Password\n (SRP) protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_CUSTOM_AUTH: Enable Lambda trigger based\n authentication.

    \n
  • \n
  • \n

    \n ALLOW_USER_PASSWORD_AUTH: Enable user password-based\n authentication. In this flow, Amazon Cognito receives the password in the request instead\n of using the SRP protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.

    \n
  • \n
  • \n

    \n ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh\n tokens.

    \n
  • \n
\n

If you don't specify a value for ExplicitAuthFlows, your app client\n activates the ALLOW_USER_SRP_AUTH and ALLOW_CUSTOM_AUTH\n authentication flows.

" } }, "SupportedIdentityProviders": { "target": "com.amazonaws.cognitoidentityprovider#SupportedIdentityProvidersListType", "traits": { - "smithy.api#documentation": "

A list of provider names for the identity providers that are supported on this client. The following are supported: COGNITO, Facebook, Google \n and LoginWithAmazon.

" + "smithy.api#documentation": "

A list of provider names for the IdPs that this client supports. The following are\n supported: COGNITO, Facebook, Google\n LoginWithAmazon, and the names of your own SAML and OIDC providers.

" } }, "CallbackURLs": { "target": "com.amazonaws.cognitoidentityprovider#CallbackURLsListType", "traits": { - "smithy.api#documentation": "

A list of allowed redirect (callback) URLs for the identity providers.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a \n fragment component.

    \n
  • \n
\n

See OAuth 2.0 - Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

\n

App callback URLs such as myapp://example are also supported.

" + "smithy.api#documentation": "

A list of allowed redirect (callback) URLs for the IdPs.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a fragment component.

    \n
  • \n
\n

See OAuth 2.0 -\n Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes\n only.

\n

App callback URLs such as myapp://example are also supported.

" } }, "LogoutURLs": { "target": "com.amazonaws.cognitoidentityprovider#LogoutURLsListType", "traits": { - "smithy.api#documentation": "

A list of allowed logout URLs for the identity providers.

" + "smithy.api#documentation": "

A list of allowed logout URLs for the IdPs.

" } }, "DefaultRedirectURI": { "target": "com.amazonaws.cognitoidentityprovider#RedirectUrlType", "traits": { - "smithy.api#documentation": "

The default redirect URI. Must be in the CallbackURLs list.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a \n fragment component.

    \n
  • \n
\n

See OAuth 2.0 - Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

\n

App callback URLs such as myapp://example are also supported.

" + "smithy.api#documentation": "

The default redirect URI. Must be in the CallbackURLs list.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a fragment component.

    \n
  • \n
\n

See OAuth 2.0 -\n Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes\n only.

\n

App callback URLs such as myapp://example are also supported.

" } }, "AllowedOAuthFlows": { "target": "com.amazonaws.cognitoidentityprovider#OAuthFlowsType", "traits": { - "smithy.api#documentation": "

The allowed OAuth flows.

\n

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

\n

Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

\n

Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a \n combination of client and client_secret.

" + "smithy.api#documentation": "

The allowed OAuth flows.

\n
\n
code
\n
\n

Use a code grant flow, which provides an authorization code as the\n response. This code can be exchanged for access tokens with the\n /oauth2/token endpoint.

\n
\n
implicit
\n
\n

Issue the access token (and, optionally, ID token, based on scopes)\n directly to your user.

\n
\n
client_credentials
\n
\n

Issue the access token from the /oauth2/token endpoint\n directly to a non-person user using a combination of the client ID and\n client secret.

\n
\n
" } }, "AllowedOAuthScopes": { "target": "com.amazonaws.cognitoidentityprovider#ScopeListType", "traits": { - "smithy.api#documentation": "

The allowed OAuth scopes. Possible values provided by OAuth are: phone, email, openid, and profile. Possible values \n provided by Amazon Web Services are: aws.cognito.signin.user.admin. Custom scopes created in Resource Servers are also supported.

" + "smithy.api#documentation": "

The allowed OAuth scopes. Possible values provided by OAuth are phone,\n email, openid, and profile. Possible values\n provided by Amazon Web Services are aws.cognito.signin.user.admin. Custom\n scopes created in Resource Servers are also supported.

" } }, "AllowedOAuthFlowsUserPoolClient": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

Set to true if the client is allowed to follow the OAuth protocol when interacting with Amazon Cognito user pools.

" + "smithy.api#documentation": "

Set to true if the client is allowed to follow the OAuth protocol when interacting\n with Amazon Cognito user pools.

" } }, "AnalyticsConfiguration": { @@ -4490,13 +4508,13 @@ "PreventUserExistenceErrors": { "target": "com.amazonaws.cognitoidentityprovider#PreventUserExistenceErrorTypes", "traits": { - "smithy.api#documentation": "

Errors and responses that you want Amazon Cognito APIs to return during authentication, account confirmation, and password recovery when the user doesn't exist in the user \n pool. When set to ENABLED and the user doesn't exist, authentication returns an error indicating either the username or password was incorrect. \n Account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those \n APIs return a UserNotFoundException exception if the user doesn't exist in the user pool.

\n

Valid values include:

\n \n
    \n
  • \n

    \n ENABLED - This prevents user existence-related errors.

    \n
  • \n
  • \n

    \n LEGACY - This represents the early behavior of Amazon Cognito where user existence related errors aren't prevented.

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

Errors and responses that you want Amazon Cognito APIs to return during authentication, account\n confirmation, and password recovery when the user doesn't exist in the user pool. When\n set to ENABLED and the user doesn't exist, authentication returns an error\n indicating either the username or password was incorrect. Account confirmation and\n password recovery return a response indicating a code was sent to a simulated\n destination. When set to LEGACY, those APIs return a\n UserNotFoundException exception if the user doesn't exist in the user\n pool.

\n

Valid values include:

\n
    \n
  • \n

    \n ENABLED - This prevents user existence-related errors.

    \n
  • \n
  • \n

    \n LEGACY - This represents the early behavior of Amazon Cognito where user\n existence related errors aren't prevented.

    \n
  • \n
" } }, "EnableTokenRevocation": { "target": "com.amazonaws.cognitoidentityprovider#WrappedBooleanType", "traits": { - "smithy.api#documentation": "

Activates or deactivates token revocation. For more information about revoking tokens, \n see RevokeToken.

\n

If you don't include this parameter, token revocation is automatically activated for the new user pool client.

" + "smithy.api#documentation": "

Activates or deactivates token revocation. For more information about revoking tokens,\n see RevokeToken.

\n

If you don't include this parameter, token revocation is automatically activated for\n the new user pool client.

" } } }, @@ -4553,7 +4571,7 @@ "Domain": { "target": "com.amazonaws.cognitoidentityprovider#DomainType", "traits": { - "smithy.api#documentation": "

The domain string. For custom domains, this is the fully-qualified domain name, such as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone, \n such as auth.

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

The domain string. For custom domains, this is the fully-qualified domain name, such\n as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone,\n such as auth.

", "smithy.api#required": {} } }, @@ -4567,7 +4585,7 @@ "CustomDomainConfig": { "target": "com.amazonaws.cognitoidentityprovider#CustomDomainConfigType", "traits": { - "smithy.api#documentation": "

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

\n

Provide this parameter only if you want to use a custom domain for your user pool. Otherwise, you can exclude this parameter and use the Amazon Cognito hosted domain instead.

\n

For more information about the hosted domain and custom domains, \n see Configuring a User Pool Domain.

" + "smithy.api#documentation": "

The configuration for a custom domain that hosts the sign-up and sign-in webpages for\n your application.

\n

Provide this parameter only if you want to use a custom domain for your user pool.\n Otherwise, you can exclude this parameter and use the Amazon Cognito hosted domain\n instead.

\n

For more information about the hosted domain and custom domains, see Configuring a User Pool Domain.

" } } } @@ -4578,7 +4596,7 @@ "CloudFrontDomain": { "target": "com.amazonaws.cognitoidentityprovider#DomainType", "traits": { - "smithy.api#documentation": "

The Amazon CloudFront endpoint that you use as the target of the alias that you set up with your Domain Name Service (DNS) provider.

" + "smithy.api#documentation": "

The Amazon CloudFront endpoint that you use as the target of the alias that you set up with\n your Domain Name Service (DNS) provider.

" } } } @@ -4602,7 +4620,7 @@ "LambdaConfig": { "target": "com.amazonaws.cognitoidentityprovider#LambdaConfigType", "traits": { - "smithy.api#documentation": "

The Lambda trigger configuration information for the new user pool.

\n \n

In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you must make an \n extra call to add permission for these event sources to invoke your Lambda function.

\n

\n

For more information on using the Lambda API \n to add permission, see AddPermission .

\n

For adding permission using the CLI, see add-permission .

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

The Lambda trigger configuration information for the new user pool.

\n \n

In a push model, event sources (such as Amazon S3 and custom applications) need\n permission to invoke a function. So you must make an extra call to add permission\n for these event sources to invoke your Lambda function.

\n

\n

For more information on using the Lambda API to add permission, see\n AddPermission .

\n

For adding permission using the CLI, see add-permission\n .

\n
" } }, "AutoVerifiedAttributes": { @@ -4614,13 +4632,13 @@ "AliasAttributes": { "target": "com.amazonaws.cognitoidentityprovider#AliasAttributesListType", "traits": { - "smithy.api#documentation": "

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or \n preferred_username.

" + "smithy.api#documentation": "

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or\n preferred_username.

" } }, "UsernameAttributes": { "target": "com.amazonaws.cognitoidentityprovider#UsernameAttributesListType", "traits": { - "smithy.api#documentation": "

Specifies whether a user can use an email address or phone number as a username when they sign up.

" + "smithy.api#documentation": "

Specifies whether a user can use an email address or phone number as a username when\n they sign up.

" } }, "SmsVerificationMessage": { @@ -4632,19 +4650,19 @@ "EmailVerificationMessage": { "target": "com.amazonaws.cognitoidentityprovider#EmailVerificationMessageType", "traits": { - "smithy.api#documentation": "

A string representing the email verification message. EmailVerificationMessage is allowed only if \n EmailSendingAccount is DEVELOPER.

" + "smithy.api#documentation": "

A string representing the email verification message. EmailVerificationMessage is\n allowed only if EmailSendingAccount is DEVELOPER.

" } }, "EmailVerificationSubject": { "target": "com.amazonaws.cognitoidentityprovider#EmailVerificationSubjectType", "traits": { - "smithy.api#documentation": "

A string representing the email verification subject. EmailVerificationSubject is allowed only if \n EmailSendingAccount is DEVELOPER.

" + "smithy.api#documentation": "

A string representing the email verification subject. EmailVerificationSubject is\n allowed only if EmailSendingAccount is DEVELOPER.

" } }, "VerificationMessageTemplate": { "target": "com.amazonaws.cognitoidentityprovider#VerificationMessageTemplateType", "traits": { - "smithy.api#documentation": "

The template for the verification message that the user sees when the app requests permission to access the user's information.

" + "smithy.api#documentation": "

The template for the verification message that the user sees when the app requests\n permission to access the user's information.

" } }, "SmsAuthenticationMessage": { @@ -4659,6 +4677,12 @@ "smithy.api#documentation": "

Specifies MFA configuration details.

" } }, + "UserAttributeUpdateSettings": { + "target": "com.amazonaws.cognitoidentityprovider#UserAttributeUpdateSettingsType", + "traits": { + "smithy.api#documentation": "

" + } + }, "DeviceConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#DeviceConfigurationType", "traits": { @@ -4680,7 +4704,7 @@ "UserPoolTags": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolTagsType", "traits": { - "smithy.api#documentation": "

The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, \n or other criteria.

" + "smithy.api#documentation": "

The tag keys and values to assign to the user pool. A tag is a label that you can use\n to categorize and manage user pools in different ways, such as by purpose, owner,\n environment, or other criteria.

" } }, "AdminCreateUserConfig": { @@ -4692,25 +4716,25 @@ "Schema": { "target": "com.amazonaws.cognitoidentityprovider#SchemaAttributesListType", "traits": { - "smithy.api#documentation": "

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

" + "smithy.api#documentation": "

An array of schema attributes for the new user pool. These attributes can be standard\n or custom attributes.

" } }, "UserPoolAddOns": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolAddOnsType", "traits": { - "smithy.api#documentation": "

Enables advanced security risk detection. Set the key AdvancedSecurityMode to the value \"AUDIT\".

" + "smithy.api#documentation": "

Enables advanced security risk detection. Set the key\n AdvancedSecurityMode to the value \"AUDIT\".

" } }, "UsernameConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#UsernameConfigurationType", "traits": { - "smithy.api#documentation": "

Case sensitivity on the username input for the selected sign-in option. For example, when case sensitivity is set to False, users can sign in using either \"username\" \n or \"Username\". This configuration is immutable once it has been set. For more information, \n see UsernameConfigurationType.

" + "smithy.api#documentation": "

Case sensitivity on the username input for the selected sign-in option. For example,\n when case sensitivity is set to False, users can sign in using either\n \"username\" or \"Username\". This configuration is immutable once it has been set. For more\n information, see UsernameConfigurationType.

" } }, "AccountRecoverySetting": { "target": "com.amazonaws.cognitoidentityprovider#AccountRecoverySettingType", "traits": { - "smithy.api#documentation": "

The available verified method a user can use to recover their password when they call ForgotPassword. You can use this setting to define a \n preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the \n user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method \n where SMS is preferred through email.

" + "smithy.api#documentation": "

The available verified method a user can use to recover their password when they call\n ForgotPassword. You can use this setting to define a preferred method\n when a user has more than one method available. With this setting, SMS doesn't qualify\n for a valid password recovery mechanism if the user also has SMS multi-factor\n authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy\n behavior to determine the recovery method where SMS is preferred through email.

" } } }, @@ -4766,7 +4790,7 @@ } }, "traits": { - "smithy.api#documentation": "

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

" + "smithy.api#documentation": "

The configuration for a custom domain that hosts the sign-up and sign-in webpages for\n your application.

" } }, "com.amazonaws.cognitoidentityprovider#CustomEmailLambdaVersionConfigType": { @@ -4775,14 +4799,14 @@ "LambdaVersion": { "target": "com.amazonaws.cognitoidentityprovider#CustomEmailSenderLambdaVersionType", "traits": { - "smithy.api#documentation": "

Signature of the \"request\" attribute in the \"event\" information Amazon Cognito passes to your custom email Lambda function. The only supported value is V1_0.

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

Signature of the \"request\" attribute in the \"event\" information Amazon Cognito passes to your\n custom email Lambda function. The only supported value is V1_0.

", "smithy.api#required": {} } }, "LambdaArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Lambda function that Amazon Cognito activates to send email notifications to users.

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

The Amazon Resource Name (ARN) of the Lambda function that Amazon Cognito activates to send\n email notifications to users.

", "smithy.api#required": {} } } @@ -4808,14 +4832,14 @@ "LambdaVersion": { "target": "com.amazonaws.cognitoidentityprovider#CustomSMSSenderLambdaVersionType", "traits": { - "smithy.api#documentation": "

Signature of the \"request\" attribute in the \"event\" information that Amazon Cognito passes to your custom SMS Lambda function. The only supported value is V1_0.

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

Signature of the \"request\" attribute in the \"event\" information that Amazon Cognito passes to\n your custom SMS Lambda function. The only supported value is V1_0.

", "smithy.api#required": {} } }, "LambdaArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Lambda function that Amazon Cognito activates to send SMS notifications to users.

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

The Amazon Resource Name (ARN) of the Lambda function that Amazon Cognito activates to send SMS\n notifications to users.

", "smithy.api#required": {} } } @@ -4858,6 +4882,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#DeleteGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -4903,6 +4930,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#DeleteIdentityProviderRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -4924,7 +4954,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an identity provider for a user pool.

" + "smithy.api#documentation": "

Deletes an IdP for a user pool.

" } }, "com.amazonaws.cognitoidentityprovider#DeleteIdentityProviderRequest": { @@ -4940,7 +4970,7 @@ "ProviderName": { "target": "com.amazonaws.cognitoidentityprovider#ProviderNameType", "traits": { - "smithy.api#documentation": "

The identity provider name.

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

The IdP name.

", "smithy.api#required": {} } } @@ -4951,6 +4981,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#DeleteResourceServerRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -4996,6 +5029,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#DeleteUserRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -5074,14 +5110,14 @@ "UserAttributeNames": { "target": "com.amazonaws.cognitoidentityprovider#AttributeNameListType", "traits": { - "smithy.api#documentation": "

An array of strings representing the user attribute names you want to delete.

\n

For custom attributes, you must prependattach the custom: prefix to the front of the attribute name.

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

An array of strings representing the user attribute names you want to delete.

\n

For custom attributes, you must prependattach the custom: prefix to the\n front of the attribute name.

", "smithy.api#required": {} } }, "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token used in the request to delete user attributes.

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

A valid access token that Amazon Cognito issued to the user whose attributes you want to\n delete.

", "smithy.api#required": {} } } @@ -5102,6 +5138,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#DeleteUserPoolRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -5131,6 +5170,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#DeleteUserPoolClientRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -5206,7 +5248,7 @@ "Domain": { "target": "com.amazonaws.cognitoidentityprovider#DomainType", "traits": { - "smithy.api#documentation": "

The domain string. For custom domains, this is the fully-qualified domain name, such as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone, \n such as auth.

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

The domain string. For custom domains, this is the fully-qualified domain name, such\n as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone,\n such as auth.

", "smithy.api#required": {} } }, @@ -5244,7 +5286,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token from a request to delete a user.

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

A valid access token that Amazon Cognito issued to the user whose user profile you want to\n delete.

", "smithy.api#required": {} } } @@ -5300,7 +5342,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a specific identity provider.

" + "smithy.api#documentation": "

Gets information about a specific IdP.

" } }, "com.amazonaws.cognitoidentityprovider#DescribeIdentityProviderRequest": { @@ -5316,7 +5358,7 @@ "ProviderName": { "target": "com.amazonaws.cognitoidentityprovider#ProviderNameType", "traits": { - "smithy.api#documentation": "

The identity provider name.

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

The IdP name.

", "smithy.api#required": {} } } @@ -5328,7 +5370,7 @@ "IdentityProvider": { "target": "com.amazonaws.cognitoidentityprovider#IdentityProviderType", "traits": { - "smithy.api#documentation": "

The identity provider that was deleted.

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

The IdP that was deleted.

", "smithy.api#required": {} } } @@ -5518,7 +5560,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server to the request to describe the user import job.

" + "smithy.api#documentation": "

Represents the response from the server to the request to describe the user import\n job.

" } }, "com.amazonaws.cognitoidentityprovider#DescribeUserPool": { @@ -5579,7 +5621,7 @@ } ], "traits": { - "smithy.api#documentation": "

Client method for returning the configuration information and metadata of the specified user pool app client.

" + "smithy.api#documentation": "

Client method for returning the configuration information and metadata of the\n specified user pool app client.

" } }, "com.amazonaws.cognitoidentityprovider#DescribeUserPoolClientRequest": { @@ -5615,7 +5657,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server from a request to describe the user pool client.

" + "smithy.api#documentation": "

Represents the response from the server from a request to describe the user pool\n client.

" } }, "com.amazonaws.cognitoidentityprovider#DescribeUserPoolDomain": { @@ -5650,7 +5692,7 @@ "Domain": { "target": "com.amazonaws.cognitoidentityprovider#DomainType", "traits": { - "smithy.api#documentation": "

The domain string. For custom domains, this is the fully-qualified domain name, such as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone, \n such as auth.

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

The domain string. For custom domains, this is the fully-qualified domain name, such\n as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone,\n such as auth.

", "smithy.api#required": {} } } @@ -5711,18 +5753,18 @@ "ChallengeRequiredOnNewDevice": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

When true, device authentication can replace SMS and time-based one-time password (TOTP) factors for multi-factor authentication (MFA).

\n \n

Users that sign in with devices that have not been confirmed or remembered will still have to provide a second factor, whether or not ChallengeRequiredOnNewDevice is true, when your user \n pool requires MFA.

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

When true, device authentication can replace SMS and time-based one-time password\n (TOTP) factors for multi-factor authentication (MFA).

\n \n

Users that sign in with devices that have not been confirmed or remembered will\n still have to provide a second factor, whether or not ChallengeRequiredOnNewDevice\n is true, when your user pool requires MFA.

\n
" } }, "DeviceOnlyRememberedOnUserPrompt": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

When true, users can opt in to remembering their device. Your app code must use callback functions to return the user's choice.

" + "smithy.api#documentation": "

When true, users can opt in to remembering their device. Your app code must use\n callback functions to return the user's choice.

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

The device tracking configuration for a user pool. A user pool with device tracking deactivated returns a null value.

\n \n

When you provide values for any DeviceConfiguration field, you activate device tracking.

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

The device tracking configuration for a user pool. A user pool with device tracking\n deactivated returns a null value.

\n \n

When you provide values for any DeviceConfiguration field, you activate device\n tracking.

\n
" } }, "com.amazonaws.cognitoidentityprovider#DeviceKeyType": { @@ -5777,7 +5819,7 @@ "Salt": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

The salt.

" + "smithy.api#documentation": "

The salt\n

" } } }, @@ -5841,7 +5883,7 @@ "Domain": { "target": "com.amazonaws.cognitoidentityprovider#DomainType", "traits": { - "smithy.api#documentation": "

The domain string. For custom domains, this is the fully-qualified domain name, such as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone, such as auth.

" + "smithy.api#documentation": "

The domain string. For custom domains, this is the fully-qualified domain name, such\n as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone,\n such as auth.

" } }, "S3Bucket": { @@ -5871,7 +5913,7 @@ "CustomDomainConfig": { "target": "com.amazonaws.cognitoidentityprovider#CustomDomainConfigType", "traits": { - "smithy.api#documentation": "

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

" + "smithy.api#documentation": "

The configuration for a custom domain that hosts the sign-up and sign-in webpages for\n your application.

" } } }, @@ -5933,7 +5975,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when the provider is already supported by the user pool.

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

This exception is thrown when the provider is already supported by the user\n pool.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -5950,7 +5992,7 @@ "SourceArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The ARN of a verified email address in Amazon SES. Amazon Cognito uses this email address in one of the following ways, depending on the value that you specify for the EmailSendingAccount \n parameter:

\n
    \n
  • \n

    If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users using its built-in email account.

    \n
  • \n
  • \n

    If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.

    \n
  • \n
\n

The Region value of the SourceArn parameter must indicate a supported\n Amazon Web Services Region of your user pool. Typically, the Region in the SourceArn and\n the user pool Region are the same. For more information, see Amazon SES email configuration regions in the Amazon Cognito Developer\n Guide.

" + "smithy.api#documentation": "

The ARN of a verified email address in Amazon SES. Amazon Cognito uses this email address in one of\n the following ways, depending on the value that you specify for the\n EmailSendingAccount parameter:

\n
    \n
  • \n

    If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the\n custom FROM address when it emails your users using its built-in email\n account.

    \n
  • \n
  • \n

    If you specify DEVELOPER, Amazon Cognito emails your users with this\n address by calling Amazon SES on your behalf.

    \n
  • \n
\n

The Region value of the SourceArn parameter must indicate a supported\n Amazon Web Services Region of your user pool. Typically, the Region in the SourceArn and\n the user pool Region are the same. For more information, see Amazon SES email configuration regions in the Amazon Cognito Developer\n Guide.

" } }, "ReplyToEmailAddress": { @@ -5962,13 +6004,13 @@ "EmailSendingAccount": { "target": "com.amazonaws.cognitoidentityprovider#EmailSendingAccountType", "traits": { - "smithy.api#documentation": "

Specifies whether Amazon Cognito uses its built-in functionality to send your users email\n messages, or uses your Amazon Simple Email Service email configuration. Specify one of the following\n values:

\n
\n
COGNITO_DEFAULT
\n
\n

When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. \n For typical production environments, the default email limit is less than the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email \n configuration.

\n

To look up the email delivery limit for the default option, see Limits in in the \n Developer Guide.

\n

The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the Amazon Resource Name (ARN) of an Amazon SES verified email address \n for the SourceArn parameter.

\n

If EmailSendingAccount is COGNITO_DEFAULT, you can't use the following parameters:

\n
    \n
  • \n

    EmailVerificationMessage

    \n
  • \n
  • \n

    EmailVerificationSubject

    \n
  • \n
  • \n

    InviteMessageTemplate.EmailMessage

    \n
  • \n
  • \n

    InviteMessageTemplate.EmailSubject

    \n
  • \n
  • \n

    VerificationMessageTemplate.EmailMessage

    \n
  • \n
  • \n

    VerificationMessageTemplate.EmailMessageByLink

    \n
  • \n
  • \n

    VerificationMessageTemplate.EmailSubject,

    \n
  • \n
  • \n

    VerificationMessageTemplate.EmailSubjectByLink

    \n
  • \n
\n \n

DEVELOPER EmailSendingAccount is required.

\n
\n
\n
DEVELOPER
\n
\n

When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this \n option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your Amazon Web Services account.

\n

If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

\n

Before Amazon Cognito can email your users, it requires additional permissions to call\n Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito\n creates a service-linked role, which is a type of role,\n in your Amazon Web Services account. This role contains the permissions that\n allow to access Amazon SES and send email messages with your address. For more\n information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the\n Amazon Cognito Developer Guide.

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

Specifies whether Amazon Cognito uses its built-in functionality to send your users email\n messages, or uses your Amazon Simple Email Service email configuration. Specify one of the following\n values:

\n
\n
COGNITO_DEFAULT
\n
\n

When Amazon Cognito emails your users, it uses its built-in email functionality.\n When you use the default option, Amazon Cognito allows only a limited number of\n emails each day for your user pool. For typical production environments, the\n default email limit is less than the required delivery volume. To achieve a\n higher delivery volume, specify DEVELOPER to use your Amazon SES email\n configuration.

\n

To look up the email delivery limit for the default option, see Limits in in the Developer Guide.

\n

The default FROM address is no-reply@verificationemail.com.\n To customize the FROM address, provide the Amazon Resource Name (ARN) of an\n Amazon SES verified email address for the SourceArn\n parameter.

\n \n
\n
DEVELOPER
\n
\n

When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito\n calls Amazon SES on your behalf to send email from your verified email address.\n When you use this option, the email delivery limits are the same limits that\n apply to your Amazon SES verified email address in your Amazon Web Services account.

\n

If you use this option, provide the ARN of an Amazon SES verified email address\n for the SourceArn parameter.

\n

Before Amazon Cognito can email your users, it requires additional permissions to\n call Amazon SES on your behalf. When you update your user pool with this option,\n Amazon Cognito creates a service-linked role, which is a type of\n role, in your Amazon Web Services account. This role contains the permissions\n that allow to access Amazon SES and send email messages with your address. For\n more information about the service-linked role that Amazon Cognito creates, see\n Using Service-Linked Roles for Amazon Cognito in the\n Amazon Cognito Developer Guide.

\n
\n
" } }, "From": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

Either the sender’s email address or the sender’s name with their email address. For example, testuser@example.com or \n Test User . This address appears before the body of the email.

" + "smithy.api#documentation": "

Either the sender’s email address or the sender’s name with their email address. For\n example, testuser@example.com or Test User\n . This address appears before the body of the\n email.

" } }, "ConfigurationSet": { @@ -5979,7 +6021,7 @@ } }, "traits": { - "smithy.api#documentation": "

The email configuration of your user pool. The email configuration type sets your\n preferred sending method, Amazon Web Services Region, and sender for messages from your user\n pool.

\n \n

Amazon Cognito can send email messages with Amazon Simple Email Service resources in the Amazon Web Services Region where you\n created your user pool, and in alternate Regions in some cases. For more information\n on the supported Regions, see Email settings for Amazon Cognito user pools.

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

The email configuration of your user pool. The email configuration type sets your\n preferred sending method, Amazon Web Services Region, and sender for messages from your user\n pool.

\n \n

Amazon Cognito can send email messages with Amazon Simple Email Service resources in the Amazon Web Services Region where\n you created your user pool, and in alternate Regions in some cases. For more\n information on the supported Regions, see Email settings for Amazon Cognito user pools.

\n
" } }, "com.amazonaws.cognitoidentityprovider#EmailNotificationBodyType": { @@ -6065,7 +6107,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when there is a code mismatch and the service fails to configure the software token TOTP multi-factor authentication (MFA).

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

This exception is thrown when there is a code mismatch and the service fails to\n configure the software token TOTP multi-factor authentication (MFA).

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -6204,7 +6246,7 @@ "CompromisedCredentialsDetected": { "target": "com.amazonaws.cognitoidentityprovider#WrappedBooleanType", "traits": { - "smithy.api#documentation": "

Indicates whether compromised credentials were detected during an authentication event.

" + "smithy.api#documentation": "

Indicates whether compromised credentials were detected during an authentication\n event.

" } } }, @@ -6315,6 +6357,9 @@ "input": { "target": "com.amazonaws.cognitoidentityprovider#ForgetDeviceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cognitoidentityprovider#InternalErrorException" @@ -6354,7 +6399,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token for the forgotten device request.

" + "smithy.api#documentation": "

A valid access token that Amazon Cognito issued to the user whose registered device you want to\n forget.

" } }, "DeviceKey": { @@ -6423,7 +6468,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password. For the \n Username parameter, you can use the username or user alias. The method used to send the confirmation code is sent according to the \n specified AccountRecoverySetting. For more information, \n see Recovering User Accounts \n in the Amazon Cognito Developer Guide. If neither a verified phone number nor a verified email exists, \n an InvalidParameterException is thrown. To use the confirmation code for resetting the password, \n call ConfirmForgotPassword.\n

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

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

Calling this API causes a message to be sent to the end user with a confirmation code\n that is required to change the user's password. For the Username parameter,\n you can use the username or user alias. The method used to send the confirmation code is\n sent according to the specified AccountRecoverySetting. For more information, see Recovering\n User Accounts in the Amazon Cognito Developer Guide. If\n neither a verified phone number nor a verified email exists, an\n InvalidParameterException is thrown. To use the confirmation code for\n resetting the password, call ConfirmForgotPassword.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
", "smithy.api#optionalAuth": {} } }, @@ -6440,32 +6485,32 @@ "SecretHash": { "target": "com.amazonaws.cognitoidentityprovider#SecretHashType", "traits": { - "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

" + "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a\n user pool client and username plus the client ID in the message.

" } }, "UserContextData": { "target": "com.amazonaws.cognitoidentityprovider#UserContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } }, "Username": { "target": "com.amazonaws.cognitoidentityprovider#UsernameType", "traits": { - "smithy.api#documentation": "

The user name of the user for whom you want to enter a code to reset a forgotten password.

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

The user name of the user for whom you want to enter a code to reset a forgotten\n password.

", "smithy.api#required": {} } }, "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for ForgotPassword\n calls.

" + "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata that contributes to your metrics for\n ForgotPassword calls.

" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool\n triggers. When you use the ForgotPassword API action, Amazon Cognito invokes any\n functions that are assigned to the following triggers: pre sign-up,\n custom message, and user migration. When\n Amazon Cognito invokes any of these functions, it passes a JSON payload, which the\n function receives as input. This payload contains a clientMetadata\n attribute, which provides the data that you assigned to the ClientMetadata parameter in\n your ForgotPassword request. In your function code in Lambda, you can\n process the clientMetadata value to enhance your workflow for your specific\n needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool\n triggers. When you use the ForgotPassword API action, Amazon Cognito invokes any\n functions that are assigned to the following triggers: pre sign-up,\n custom message, and user migration. When\n Amazon Cognito invokes any of these functions, it passes a JSON payload, which the\n function receives as input. This payload contains a clientMetadata\n attribute, which provides the data that you assigned to the ClientMetadata parameter in\n your ForgotPassword request. In your function code in Lambda, you can\n process the clientMetadata value to enhance your workflow for your specific\n needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -6479,12 +6524,12 @@ "CodeDeliveryDetails": { "target": "com.amazonaws.cognitoidentityprovider#CodeDeliveryDetailsType", "traits": { - "smithy.api#documentation": "

The code delivery details returned by the server in response to the request to reset a password.

" + "smithy.api#documentation": "

The code delivery details returned by the server in response to the request to reset a\n password.

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

Respresents the response from the server regarding the request to reset a password.

" + "smithy.api#documentation": "

Represents the response from the server regarding the request to reset a\n password.

" } }, "com.amazonaws.cognitoidentityprovider#GenerateSecret": { @@ -6516,7 +6561,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the header information for the comma-separated value (CSV) file to be used as input for the user import job.

" + "smithy.api#documentation": "

Gets the header information for the comma-separated value (CSV) file to be used as\n input for the user import job.

" } }, "com.amazonaws.cognitoidentityprovider#GetCSVHeaderRequest": { @@ -6531,7 +6576,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to get the header information of the CSV file for the user import job.

" + "smithy.api#documentation": "

Represents the request to get the header information of the CSV file for the user\n import job.

" } }, "com.amazonaws.cognitoidentityprovider#GetCSVHeaderResponse": { @@ -6540,7 +6585,7 @@ "UserPoolId": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolIdType", "traits": { - "smithy.api#documentation": "

The user pool ID for the user pool that the users are to be imported\n into.

" + "smithy.api#documentation": "

The user pool ID for the user pool that the users are to be imported into.

" } }, "CSVHeader": { @@ -6551,7 +6596,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server to the request to get the header information of the CSV file for the user import job.

" + "smithy.api#documentation": "

Represents the response from the server to the request to get the header information\n of the CSV file for the user import job.

" } }, "com.amazonaws.cognitoidentityprovider#GetDevice": { @@ -6608,7 +6653,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token.

" + "smithy.api#documentation": "

A valid access token that Amazon Cognito issued to the user whose device information you want\n to request.

" } } }, @@ -6716,7 +6761,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the specified identity provider.

" + "smithy.api#documentation": "

Gets the specified IdP.

" } }, "com.amazonaws.cognitoidentityprovider#GetIdentityProviderByIdentifierRequest": { @@ -6732,7 +6777,7 @@ "IdpIdentifier": { "target": "com.amazonaws.cognitoidentityprovider#IdpIdentifierType", "traits": { - "smithy.api#documentation": "

The identity provider ID.

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

The IdP identifier.

", "smithy.api#required": {} } } @@ -6744,7 +6789,7 @@ "IdentityProvider": { "target": "com.amazonaws.cognitoidentityprovider#IdentityProviderType", "traits": { - "smithy.api#documentation": "

The identity provider object.

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

The IdP object.

", "smithy.api#required": {} } } @@ -6828,7 +6873,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the user interface (UI) Customization information for a particular app client's app UI, if any such information exists for the client. If nothing is set for the particular client, \n but there is an existing pool level customization (the app clientId is ALL), then that information is returned. If nothing is present, then an empty shape is returned.

" + "smithy.api#documentation": "

Gets the user interface (UI) Customization information for a particular app client's\n app UI, if any such information exists for the client. If nothing is set for the\n particular client, but there is an existing pool level customization (the app\n clientId is ALL), then that information is returned. If\n nothing is present, then an empty shape is returned.

" } }, "com.amazonaws.cognitoidentityprovider#GetUICustomizationRequest": { @@ -6961,7 +7006,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Gets the user attribute verification code for the specified attribute name.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

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

Generates a user attribute verification code for the specified attribute name. Sends a\n message to a user with a code that they must return in a VerifyUserAttribute\n request.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
", "smithy.api#optionalAuth": {} } }, @@ -6971,21 +7016,21 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token returned by the server response to get the user attribute verification code.

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

A non-expired access token for the user whose attribute verification code you want to\n generate.

", "smithy.api#required": {} } }, "AttributeName": { "target": "com.amazonaws.cognitoidentityprovider#AttributeNameType", "traits": { - "smithy.api#documentation": "

The attribute name returned by the server response to get the user attribute verification code.

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

The attribute name returned by the server response to get the user attribute\n verification code.

", "smithy.api#required": {} } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n \n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the GetUserAttributeVerificationCode \n API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it \n passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data \n that you assigned to the ClientMetadata parameter in your GetUserAttributeVerificationCode request. In your function code in Lambda, \n you can process the clientMetadata value to enhance your workflow for your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool\n triggers. When you use the GetUserAttributeVerificationCode API action, Amazon Cognito invokes\n the function that is assigned to the custom message trigger. When\n Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as\n input. This payload contains a clientMetadata attribute, which provides the\n data that you assigned to the ClientMetadata parameter in your\n GetUserAttributeVerificationCode request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for\n your specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -6999,12 +7044,12 @@ "CodeDeliveryDetails": { "target": "com.amazonaws.cognitoidentityprovider#CodeDeliveryDetailsType", "traits": { - "smithy.api#documentation": "

The code delivery details returned by the server in response to the request to get the user attribute verification code.

" + "smithy.api#documentation": "

The code delivery details returned by the server in response to the request to get the\n user attribute verification code.

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

The verification code response returned by the server response to get the user attribute verification code.

" + "smithy.api#documentation": "

The verification code response returned by the server response to get the user\n attribute verification code.

" } }, "com.amazonaws.cognitoidentityprovider#GetUserPoolMfaConfig": { @@ -7066,7 +7111,7 @@ "MfaConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolMfaType", "traits": { - "smithy.api#documentation": "

The multi-factor (MFA) configuration. Valid values include:

\n \n
    \n
  • \n

    \n OFF MFA won't be used for any users.

    \n
  • \n
  • \n

    \n ON MFA is required for all users to sign in.

    \n
  • \n
  • \n

    \n OPTIONAL MFA will be required only for individual users who have an MFA factor activated.

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

The multi-factor (MFA) configuration. Valid values include:

\n
    \n
  • \n

    \n OFF MFA won't be used for any users.

    \n
  • \n
  • \n

    \n ON MFA is required for all users to sign in.

    \n
  • \n
  • \n

    \n OPTIONAL MFA will be required only for individual users who have\n an MFA factor activated.

    \n
  • \n
" } } } @@ -7077,7 +7122,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token returned by the server response to get information about the user.

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

A non-expired access token for the user whose information you want to query.

", "smithy.api#required": {} } } @@ -7099,14 +7144,14 @@ "UserAttributes": { "target": "com.amazonaws.cognitoidentityprovider#AttributeListType", "traits": { - "smithy.api#documentation": "

An array of name-value pairs representing user attributes.

\n

For custom attributes, you must prepend the custom: prefix to the attribute name.

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

An array of name-value pairs representing user attributes.

\n

For custom attributes, you must prepend the custom: prefix to the\n attribute name.

", "smithy.api#required": {} } }, "MFAOptions": { "target": "com.amazonaws.cognitoidentityprovider#MFAOptionListType", "traits": { - "smithy.api#documentation": "

\n This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn't provide information about time-based one-time \n password (TOTP) software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.

" + "smithy.api#documentation": "

\n This response parameter is no longer supported. It provides\n information only about SMS MFA configurations. It doesn't provide information about\n time-based one-time password (TOTP) software token MFA configurations. To look up\n information about either type of MFA configuration, use UserMFASettingList\n instead.

" } }, "PreferredMfaSetting": { @@ -7118,12 +7163,12 @@ "UserMFASettingList": { "target": "com.amazonaws.cognitoidentityprovider#UserMFASettingListType", "traits": { - "smithy.api#documentation": "

The MFA options that are activated for the user. The possible values in this list are SMS_MFA and SOFTWARE_TOKEN_MFA.

" + "smithy.api#documentation": "

The MFA options that are activated for the user. The possible values in this list are\n SMS_MFA and SOFTWARE_TOKEN_MFA.

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

Represents the response from the server from the request to get information about the user.

" + "smithy.api#documentation": "

Represents the response from the server from the request to get information about the\n user.

" } }, "com.amazonaws.cognitoidentityprovider#GlobalSignOut": { @@ -7158,7 +7203,7 @@ } ], "traits": { - "smithy.api#documentation": "

Signs out users from all devices. It also invalidates all refresh tokens issued to a user. The user's current access and ID tokens remain valid until their expiry. Access and Id tokens expire \n one hour after they're issued.

" + "smithy.api#documentation": "

Signs out users from all devices. It also invalidates all refresh tokens that Amazon Cognito\n has issued to a user. The user's current access and ID tokens remain valid until their\n expiry. By default, access and ID tokens expire one hour after Amazon Cognito issues them. A user\n can still use a hosted UI cookie to retrieve new tokens for the duration of the cookie\n validity period of 1 hour.

" } }, "com.amazonaws.cognitoidentityprovider#GlobalSignOutRequest": { @@ -7167,7 +7212,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token.

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

A valid access token that Amazon Cognito issued to the user who you want to sign out.

", "smithy.api#required": {} } } @@ -7191,7 +7236,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when Amazon Cognito encounters a group that already exists in the user pool.

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

This exception is thrown when Amazon Cognito encounters a group that already exists in the user\n pool.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -7242,7 +7287,7 @@ "Precedence": { "target": "com.amazonaws.cognitoidentityprovider#PrecedenceType", "traits": { - "smithy.api#documentation": "

A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in \n the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with \n higher ornull Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence \n value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims.

\n

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two \n groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim \n in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in \n users' tokens.

\n

The default Precedence value is null.

" + "smithy.api#documentation": "

A non-negative integer value that specifies the precedence of this group relative to\n the other groups that a user can belong to in the user pool. Zero is the highest\n precedence value. Groups with lower Precedence values take precedence over\n groups with higher ornull Precedence values. If a user belongs to two or\n more groups, it is the group with the lowest precedence value whose role ARN is given in\n the user's tokens for the cognito:roles and\n cognito:preferred_role claims.

\n

Two groups can have the same Precedence value. If this happens, neither\n group takes precedence over the other. If two groups with the same\n Precedence have the same role ARN, that role is used in the\n cognito:preferred_role claim in tokens for users in each group. If the\n two groups have different role ARNs, the cognito:preferred_role claim isn't\n set in users' tokens.

\n

The default Precedence value is null.

" } }, "LastModifiedDate": { @@ -7316,48 +7361,48 @@ "ProviderName": { "target": "com.amazonaws.cognitoidentityprovider#ProviderNameType", "traits": { - "smithy.api#documentation": "

The identity provider name.

" + "smithy.api#documentation": "

The IdP name.

" } }, "ProviderType": { "target": "com.amazonaws.cognitoidentityprovider#IdentityProviderTypeType", "traits": { - "smithy.api#documentation": "

The identity provider type.

" + "smithy.api#documentation": "

The IdP type.

" } }, "ProviderDetails": { "target": "com.amazonaws.cognitoidentityprovider#ProviderDetailsType", "traits": { - "smithy.api#documentation": "

The identity provider details. The following list describes the provider detail keys for each identity provider type.

\n
    \n
  • \n

    For Google and Login with Amazon:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      authorize_scopes

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

    For Facebook:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      authorize_scopes

      \n
    • \n
    • \n

      api_version

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

    For Sign in with Apple:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      team_id

      \n
    • \n
    • \n

      key_id

      \n
    • \n
    • \n

      private_key

      \n
    • \n
    • \n

      authorize_scopes

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

    For OIDC providers:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      attributes_request_method

      \n
    • \n
    • \n

      oidc_issuer

      \n
    • \n
    • \n

      authorize_scopes

      \n
    • \n
    • \n

      authorize_url if not available from discovery URL specified by oidc_issuer key\n

      \n
    • \n
    • \n

      token_url if not available from discovery URL specified by oidc_issuer key\n

      \n
    • \n
    • \n

      attributes_url if not available from discovery URL specified by oidc_issuer key\n

      \n
    • \n
    • \n

      jwks_uri if not available from discovery URL specified by oidc_issuer key\n

      \n
    • \n
    • \n

      attributes_url_add_attributes a read-only property that is set automatically\n

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

    For SAML providers:

    \n
      \n
    • \n

      MetadataFile or MetadataURL

      \n
    • \n
    • \n

      IDPSignOut optional\n

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

The IdP details. The following list describes the provider detail keys for each IdP\n type.

\n
    \n
  • \n

    For Google and Login with Amazon:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      authorize_scopes

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

    For Facebook:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      authorize_scopes

      \n
    • \n
    • \n

      api_version

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

    For Sign in with Apple:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      team_id

      \n
    • \n
    • \n

      key_id

      \n
    • \n
    • \n

      private_key

      \n

      \n You can submit a private_key when you add or update an IdP.\n Describe operations don't return the private key.\n

      \n
    • \n
    • \n

      authorize_scopes

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

    For OIDC providers:

    \n
      \n
    • \n

      client_id

      \n
    • \n
    • \n

      client_secret

      \n
    • \n
    • \n

      attributes_request_method

      \n
    • \n
    • \n

      oidc_issuer

      \n
    • \n
    • \n

      authorize_scopes

      \n
    • \n
    • \n

      The following keys are only present if Amazon Cognito didn't discover them at\n the oidc_issuer URL.

      \n
        \n
      • \n

        authorize_url

        \n
      • \n
      • \n

        token_url

        \n
      • \n
      • \n

        attributes_url

        \n
      • \n
      • \n

        jwks_uri

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

      Amazon Cognito sets the value of the following keys automatically. They are\n read-only.

      \n
        \n
      • \n

        attributes_url_add_attributes

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

    For SAML providers:

    \n
      \n
    • \n

      MetadataFile or MetadataURL

      \n
    • \n
    • \n

      IDPSignout optional\n

      \n
    • \n
    \n
  • \n
" } }, "AttributeMapping": { "target": "com.amazonaws.cognitoidentityprovider#AttributeMappingType", "traits": { - "smithy.api#documentation": "

A mapping of identity provider attributes to standard and custom user pool attributes.

" + "smithy.api#documentation": "

A mapping of IdP attributes to standard and custom user pool attributes.

" } }, "IdpIdentifiers": { "target": "com.amazonaws.cognitoidentityprovider#IdpIdentifiersListType", "traits": { - "smithy.api#documentation": "

A list of identity provider identifiers.

" + "smithy.api#documentation": "

A list of IdP identifiers.

" } }, "LastModifiedDate": { "target": "com.amazonaws.cognitoidentityprovider#DateType", "traits": { - "smithy.api#documentation": "

The date the identity provider was last modified.

" + "smithy.api#documentation": "

The date the IdP was last modified.

" } }, "CreationDate": { "target": "com.amazonaws.cognitoidentityprovider#DateType", "traits": { - "smithy.api#documentation": "

The date the identity provider was created.

" + "smithy.api#documentation": "

The date the IdP was created.

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

A container for information about an identity provider.

" + "smithy.api#documentation": "

A container for information about an IdP.

" } }, "com.amazonaws.cognitoidentityprovider#IdentityProviderTypeType": { @@ -7473,7 +7518,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Initiates the authentication flow.

\n\n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

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

Initiates sign-in for a user in the Amazon Cognito user directory. You can't sign in a user\n with a federated IdP with InitiateAuth. For more information, see Adding user pool sign-in through a third party.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
", "smithy.api#optionalAuth": {} } }, @@ -7483,20 +7528,20 @@ "AuthFlow": { "target": "com.amazonaws.cognitoidentityprovider#AuthFlowType", "traits": { - "smithy.api#documentation": "

The authentication flow for this call to run. The API action will depend on this value. For example:

\n
    \n
  • \n

    \n REFRESH_TOKEN_AUTH takes in a valid refresh token and returns new tokens.

    \n
  • \n
  • \n

    \n USER_SRP_AUTH takes in USERNAME and SRP_A and returns the SRP variables to be used for next challenge execution.

    \n
  • \n
  • \n

    \n USER_PASSWORD_AUTH takes in USERNAME and PASSWORD and returns the next challenge or tokens.

    \n
  • \n
\n

Valid values include:

\n \n
    \n
  • \n

    \n USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

    \n
  • \n
  • \n

    \n REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

    \n
  • \n
  • \n

    \n CUSTOM_AUTH: Custom authentication flow.

    \n
  • \n
  • \n

    \n USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration \n Lambda if it doesn't find the USERNAME in the user pool.

    \n
  • \n
\n

\n ADMIN_NO_SRP_AUTH isn't a valid value.

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

The authentication flow for this call to run. The API action will depend on this\n value. For example:

\n
    \n
  • \n

    \n REFRESH_TOKEN_AUTH takes in a valid refresh token and returns new\n tokens.

    \n
  • \n
  • \n

    \n USER_SRP_AUTH takes in USERNAME and\n SRP_A and returns the SRP variables to be used for next\n challenge execution.

    \n
  • \n
  • \n

    \n USER_PASSWORD_AUTH takes in USERNAME and\n PASSWORD and returns the next challenge or tokens.

    \n
  • \n
\n

Valid values include:

\n
    \n
  • \n

    \n USER_SRP_AUTH: Authentication flow for the Secure Remote Password\n (SRP) protocol.

    \n
  • \n
  • \n

    \n REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication\n flow for refreshing the access token and ID token by supplying a valid refresh\n token.

    \n
  • \n
  • \n

    \n CUSTOM_AUTH: Custom authentication flow.

    \n
  • \n
  • \n

    \n USER_PASSWORD_AUTH: Non-SRP authentication flow; user name and\n password are passed directly. If a user migration Lambda trigger is set, this\n flow will invoke the user migration Lambda if it doesn't find the user name in\n the user pool.

    \n
  • \n
\n

\n ADMIN_NO_SRP_AUTH isn't a valid value.

", "smithy.api#required": {} } }, "AuthParameters": { "target": "com.amazonaws.cognitoidentityprovider#AuthParametersType", "traits": { - "smithy.api#documentation": "

The authentication parameters. These are inputs corresponding to the AuthFlow that you're invoking. The required values depend on the value of AuthFlow:

\n \n
    \n
  • \n

    For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), \n DEVICE_KEY.

    \n
  • \n
  • \n

    For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), \n DEVICE_KEY.

    \n
  • \n
  • \n

    For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY. To start the \n authentication flow with password verification, include ChallengeName: SRP_A and SRP_A: (The SRP_A Value).

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

The authentication parameters. These are inputs corresponding to the\n AuthFlow that you're invoking. The required values depend on the value\n of AuthFlow:

\n
    \n
  • \n

    For USER_SRP_AUTH: USERNAME (required),\n SRP_A (required), SECRET_HASH (required if the app\n client is configured with a client secret), DEVICE_KEY.

    \n
  • \n
  • \n

    For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN\n (required), SECRET_HASH (required if the app client is configured\n with a client secret), DEVICE_KEY.

    \n
  • \n
  • \n

    For CUSTOM_AUTH: USERNAME (required),\n SECRET_HASH (if app client is configured with client secret),\n DEVICE_KEY. To start the authentication flow with password\n verification, include ChallengeName: SRP_A and SRP_A: (The\n SRP_A Value).

    \n
  • \n
" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the InitiateAuth API action, Amazon Cognito invokes the Lambda functions that are specified for various \n triggers. The ClientMetadata value is passed as input to the functions for only the following triggers:

\n
    \n
  • \n

    Pre signup

    \n
  • \n
  • \n

    Pre authentication

    \n
  • \n
  • \n

    User migration

    \n
  • \n
\n

When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which\n the function receives as input. This payload contains a validationData\n attribute, which provides the data that you assigned to the ClientMetadata parameter in\n your InitiateAuth request. In your function code in Lambda, you can process the\n validationData value to enhance your workflow for your specific\n needs.

\n

When you use the InitiateAuth API action, Amazon Cognito also invokes the functions for the following triggers, but it doesn't provide the ClientMetadata value as input:

\n
    \n
  • \n

    Post authentication

    \n
  • \n
  • \n

    Custom message

    \n
  • \n
  • \n

    Pre token generation

    \n
  • \n
  • \n

    Create auth challenge

    \n
  • \n
  • \n

    Define auth challenge

    \n
  • \n
  • \n

    Verify auth challenge

    \n
  • \n
\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration \n doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for certain custom\n workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the InitiateAuth API action, Amazon Cognito invokes the Lambda functions that are\n specified for various triggers. The ClientMetadata value is passed as input to the\n functions for only the following triggers:

\n
    \n
  • \n

    Pre signup

    \n
  • \n
  • \n

    Pre authentication

    \n
  • \n
  • \n

    User migration

    \n
  • \n
\n

When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which\n the function receives as input. This payload contains a validationData\n attribute, which provides the data that you assigned to the ClientMetadata parameter in\n your InitiateAuth request. In your function code in Lambda, you can process the\n validationData value to enhance your workflow for your specific\n needs.

\n

When you use the InitiateAuth API action, Amazon Cognito also invokes the functions for the\n following triggers, but it doesn't provide the ClientMetadata value as input:

\n
    \n
  • \n

    Post authentication

    \n
  • \n
  • \n

    Custom message

    \n
  • \n
  • \n

    Pre token generation

    \n
  • \n
  • \n

    Create auth challenge

    \n
  • \n
  • \n

    Define auth challenge

    \n
  • \n
  • \n

    Verify auth challenge

    \n
  • \n
\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } }, "ClientId": { @@ -7509,13 +7554,13 @@ "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for InitiateAuth calls.

" + "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata that contributes to your metrics for\n InitiateAuth calls.

" } }, "UserContextData": { "target": "com.amazonaws.cognitoidentityprovider#UserContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } } }, @@ -7529,25 +7574,25 @@ "ChallengeName": { "target": "com.amazonaws.cognitoidentityprovider#ChallengeNameType", "traits": { - "smithy.api#documentation": "

The name of the challenge that you're responding to with this call. This name is\n returned in the AdminInitiateAuth response if you must pass another\n challenge.

\n

Valid values include the following:

\n \n

All of the following challenges require USERNAME and\n SECRET_HASH (if applicable) in the parameters.

\n
\n \n
    \n
  • \n

    \n SMS_MFA: Next challenge is to supply an\n SMS_MFA_CODE, delivered via SMS.

    \n
  • \n
  • \n

    \n PASSWORD_VERIFIER: Next challenge is to supply\n PASSWORD_CLAIM_SIGNATURE,\n PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after\n the client-side SRP calculations.

    \n
  • \n
  • \n

    \n CUSTOM_CHALLENGE: This is returned if your custom authentication\n flow determines that the user should pass another challenge before tokens are\n issued.

    \n
  • \n
  • \n

    \n DEVICE_SRP_AUTH: If device tracking was activated on your user\n pool and the previous challenges were passed, this challenge is returned so that\n Amazon Cognito can start tracking this device.

    \n
  • \n
  • \n

    \n DEVICE_PASSWORD_VERIFIER: Similar to\n PASSWORD_VERIFIER, but for devices only.

    \n
  • \n
  • \n

    \n NEW_PASSWORD_REQUIRED: For users who are required to change their\n passwords after successful first login. This challenge should be passed with\n NEW_PASSWORD and any other required attributes.

    \n
  • \n
  • \n

    \n MFA_SETUP: For users who are required to setup an MFA factor\n before they can sign in. The MFA types activated for the user pool will be\n listed in the challenge parameters MFA_CAN_SETUP value.

    \n

    To set up software token MFA, use the session returned here from\n InitiateAuth as an input to\n AssociateSoftwareToken. Use the session returned by\n VerifySoftwareToken as an input to\n RespondToAuthChallenge with challenge name\n MFA_SETUP to complete sign-in. To set up SMS MFA, an\n administrator should help the user to add a phone number to their account, and\n then the user should call InitiateAuth again to restart\n sign-in.

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

The name of the challenge that you're responding to with this call. This name is\n returned in the AdminInitiateAuth response if you must pass another\n challenge.

\n

Valid values include the following:

\n \n

All of the following challenges require USERNAME and\n SECRET_HASH (if applicable) in the parameters.

\n
\n
    \n
  • \n

    \n SMS_MFA: Next challenge is to supply an\n SMS_MFA_CODE, delivered via SMS.

    \n
  • \n
  • \n

    \n PASSWORD_VERIFIER: Next challenge is to supply\n PASSWORD_CLAIM_SIGNATURE,\n PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after\n the client-side SRP calculations.

    \n
  • \n
  • \n

    \n CUSTOM_CHALLENGE: This is returned if your custom authentication\n flow determines that the user should pass another challenge before tokens are\n issued.

    \n
  • \n
  • \n

    \n DEVICE_SRP_AUTH: If device tracking was activated on your user\n pool and the previous challenges were passed, this challenge is returned so that\n Amazon Cognito can start tracking this device.

    \n
  • \n
  • \n

    \n DEVICE_PASSWORD_VERIFIER: Similar to\n PASSWORD_VERIFIER, but for devices only.

    \n
  • \n
  • \n

    \n NEW_PASSWORD_REQUIRED: For users who are required to change their\n passwords after successful first login.

    \n

    Respond to this challenge with NEW_PASSWORD and any required\n attributes that Amazon Cognito returned in the requiredAttributes parameter.\n You can also set values for attributes that aren't required by your user pool\n and that your app client can write. For more information, see RespondToAuthChallenge.

    \n \n \n

    In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value. \nIn RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the requiredAttributes parameter, \nthen use the UpdateUserAttributes API operation to modify the value of any additional attributes.

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

    \n MFA_SETUP: For users who are required to setup an MFA factor\n before they can sign in. The MFA types activated for the user pool will be\n listed in the challenge parameters MFA_CAN_SETUP value.

    \n

    To set up software token MFA, use the session returned here from\n InitiateAuth as an input to\n AssociateSoftwareToken. Use the session returned by\n VerifySoftwareToken as an input to\n RespondToAuthChallenge with challenge name\n MFA_SETUP to complete sign-in. To set up SMS MFA, an\n administrator should help the user to add a phone number to their account, and\n then the user should call InitiateAuth again to restart\n sign-in.

    \n
  • \n
" } }, "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should pass both ways in challenge-response calls to the service. If the caller must pass another challenge, they return a session with other challenge parameters. This session \n should be passed as it is to the next RespondToAuthChallenge API call.

" + "smithy.api#documentation": "

The session that should pass both ways in challenge-response calls to the service. If\n the caller must pass another challenge, they return a session with other challenge\n parameters. This session should be passed as it is to the next\n RespondToAuthChallenge API call.

" } }, "ChallengeParameters": { "target": "com.amazonaws.cognitoidentityprovider#ChallengeParametersType", "traits": { - "smithy.api#documentation": "

The challenge parameters. These are returned in the InitiateAuth response if you must pass another challenge. The responses in this parameter should be used to compute inputs to \n the next call (RespondToAuthChallenge).

\n

All challenges require USERNAME and SECRET_HASH (if applicable).

" + "smithy.api#documentation": "

The challenge parameters. These are returned in the InitiateAuth response\n if you must pass another challenge. The responses in this parameter should be used to\n compute inputs to the next call (RespondToAuthChallenge).

\n

All challenges require USERNAME and SECRET_HASH (if\n applicable).

" } }, "AuthenticationResult": { "target": "com.amazonaws.cognitoidentityprovider#AuthenticationResultType", "traits": { - "smithy.api#documentation": "

The result of the authentication response. This result is only returned if the caller doesn't need to pass another challenge. If the caller does need to pass another challenge before it gets \n tokens, ChallengeName, ChallengeParameters, and Session are returned.

" + "smithy.api#documentation": "

The result of the authentication response. This result is only returned if the caller\n doesn't need to pass another challenge. If the caller does need to pass another\n challenge before it gets tokens, ChallengeName,\n ChallengeParameters, and Session are returned.

" } } }, @@ -7579,12 +7624,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when you have an unverified email address or the identity policy isn't set on an email address that Amazon Cognito can access.

" + "smithy.api#documentation": "

The message returned when you have an unverified email address or the identity policy\n isn't set on an email address that Amazon Cognito can access.

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

This exception is thrown when Amazon Cognito isn't allowed to use your email identity. HTTP status code: 400.

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

This exception is thrown when Amazon Cognito isn't allowed to use your email identity. HTTP\n status code: 400.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -7595,7 +7640,7 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when Amazon Cognito hrows an invalid Lambda response exception.

" + "smithy.api#documentation": "

The message returned when Amazon Cognito throws an invalid Lambda response\n exception.

" } } }, @@ -7624,12 +7669,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when the Amazon Cognito service throws an invalid parameter exception.

" + "smithy.api#documentation": "

The message returned when the Amazon Cognito service throws an invalid parameter\n exception.

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

This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

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

This exception is thrown when the Amazon Cognito service encounters an invalid\n parameter.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -7656,12 +7701,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when the invalid SMS role access policy exception is thrown.

" + "smithy.api#documentation": "

The message returned when the invalid SMS role access policy exception is\n thrown.

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

This exception is returned when the role provided for SMS configuration doesn't have permission to publish using Amazon SNS.

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

This exception is returned when the role provided for SMS configuration doesn't have\n permission to publish using Amazon SNS.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -7672,12 +7717,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when the role trust relationship for the SMS message is not valid.

" + "smithy.api#documentation": "

The message returned when the role trust relationship for the SMS message is not\n valid.

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

This exception is thrown when the trust relationship is not valid for the role provided for SMS configuration. This can happen if you don't trust cognito-idp.amazonaws.com or the \n external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

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

This exception is thrown when the trust relationship is not valid for the role\n provided for SMS configuration. This can happen if you don't trust\n cognito-idp.amazonaws.com or the external ID provided in the role does\n not match what is provided in the SMS configuration for the user pool.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -7776,7 +7821,7 @@ "KMSKeyID": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an KMS key. Amazon Cognito uses the key to encrypt codes and temporary passwords sent to \n CustomEmailSender and CustomSMSSender.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an KMS key. Amazon Cognito\n uses the key to encrypt codes and temporary passwords sent to\n CustomEmailSender and CustomSMSSender.

" } } }, @@ -7795,7 +7840,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when a user exceeds the limit for a requested Amazon Web Services resource.

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

This exception is thrown when a user exceeds the limit for a requested Amazon Web Services\n resource.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -7838,7 +7883,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the devices.

" + "smithy.api#documentation": "

Lists the sign-in devices that Amazon Cognito has registered to the current user.

" } }, "com.amazonaws.cognitoidentityprovider#ListDevicesRequest": { @@ -7847,7 +7892,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access tokens for the request to list devices.

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

A valid access token that Amazon Cognito issued to the user whose list of devices you want to\n view.

", "smithy.api#required": {} } }, @@ -7942,7 +7987,7 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKey", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } } @@ -7959,7 +8004,7 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKey", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } } @@ -7990,7 +8035,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists information about all identity providers for a user pool.

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

Lists information about all IdPs for a user pool.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -8012,7 +8057,7 @@ "MaxResults": { "target": "com.amazonaws.cognitoidentityprovider#ListProvidersLimitType", "traits": { - "smithy.api#documentation": "

The maximum number of identity providers to return.

" + "smithy.api#documentation": "

The maximum number of IdPs to return.

" } }, "NextToken": { @@ -8029,7 +8074,7 @@ "Providers": { "target": "com.amazonaws.cognitoidentityprovider#ProvidersListType", "traits": { - "smithy.api#documentation": "

A list of identity provider objects.

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

A list of IdP objects.

", "smithy.api#required": {} } }, @@ -8169,7 +8214,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the tags that are assigned to an Amazon Cognito user pool.

\n

A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

\n

You can use this action up to 10 times per second, per account.

" + "smithy.api#documentation": "

Lists the tags that are assigned to an Amazon Cognito user pool.

\n

A tag is a label that you can apply to user pools to categorize and manage them in\n different ways, such as by purpose, owner, environment, or other criteria.

\n

You can use this action up to 10 times per second, per account.

" } }, "com.amazonaws.cognitoidentityprovider#ListTagsForResourceRequest": { @@ -8244,7 +8289,7 @@ "PaginationToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKeyType", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to ListUserImportJobs, which can be used to return the next set of import jobs in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to\n ListUserImportJobs, which can be used to return the next set of import\n jobs in the list.

" } } }, @@ -8264,12 +8309,12 @@ "PaginationToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKeyType", "traits": { - "smithy.api#documentation": "

An identifier that can be used to return the next set of user import jobs in the list.

" + "smithy.api#documentation": "

An identifier that can be used to return the next set of user import jobs in the\n list.

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

Represents the response from the server to the request to list the user import jobs.

" + "smithy.api#documentation": "

Represents the response from the server to the request to list the user import\n jobs.

" } }, "com.amazonaws.cognitoidentityprovider#ListUserPoolClients": { @@ -8320,13 +8365,13 @@ "MaxResults": { "target": "com.amazonaws.cognitoidentityprovider#QueryLimit", "traits": { - "smithy.api#documentation": "

The maximum number of results you want the request to return when listing the user pool clients.

" + "smithy.api#documentation": "

The maximum number of results you want the request to return when listing the user\n pool clients.

" } }, "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKey", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } }, @@ -8346,7 +8391,7 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKey", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } }, @@ -8392,13 +8437,13 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKeyType", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } }, "MaxResults": { "target": "com.amazonaws.cognitoidentityprovider#PoolQueryLimitType", "traits": { - "smithy.api#documentation": "

The maximum number of results you want the request to return when listing the user pools.

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

The maximum number of results you want the request to return when listing the user\n pools.

", "smithy.api#required": {} } } @@ -8419,7 +8464,7 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKeyType", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } }, @@ -8523,7 +8568,7 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKey", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } } @@ -8540,7 +8585,7 @@ "NextToken": { "target": "com.amazonaws.cognitoidentityprovider#PaginationKey", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that you can use in a later request to return the next set of items in\n the list.

" } } } @@ -8558,7 +8603,7 @@ "AttributesToGet": { "target": "com.amazonaws.cognitoidentityprovider#SearchedAttributeNamesListType", "traits": { - "smithy.api#documentation": "

An array of strings, where each string is the name of a user attribute to be returned for each user in the search results. If the array is null, all attributes are returned.

" + "smithy.api#documentation": "

An array of strings, where each string is the name of a user attribute to be returned\n for each user in the search results. If the array is null, all attributes are\n returned.

" } }, "Limit": { @@ -8570,13 +8615,13 @@ "PaginationToken": { "target": "com.amazonaws.cognitoidentityprovider#SearchPaginationTokenType", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } }, "Filter": { "target": "com.amazonaws.cognitoidentityprovider#UserFilterType", "traits": { - "smithy.api#documentation": "

A filter string of the form \"AttributeName \n Filter-Type \"AttributeValue\"\". Quotation \n marks within the filter string must be escaped using the backslash (\\) character. For example, \"family_name = \\\"Reddy\\\"\".

\n
    \n
  • \n

    \n AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.

    \n
  • \n
  • \n

    \n Filter-Type: For an exact match, use =, for example, \"given_name = \\\"Jon\\\"\". For a prefix (\"starts with\") match, use ^=, for example, \n \"given_name ^= \\\"Jon\\\"\".

    \n
  • \n
  • \n

    \n AttributeValue: The attribute value that must be matched for each user.

    \n
  • \n
\n

If the filter string is empty, ListUsers returns all users in the user pool.

\n

You can only search for the following standard attributes:

\n
    \n
  • \n

    \n username (case-sensitive)

    \n
  • \n
  • \n

    \n email \n

    \n
  • \n
  • \n

    \n phone_number \n

    \n
  • \n
  • \n

    \n name \n

    \n
  • \n
  • \n

    \n given_name \n

    \n
  • \n
  • \n

    \n family_name \n

    \n
  • \n
  • \n

    \n preferred_username \n

    \n
  • \n
  • \n

    \n cognito:user_status (called Status in the Console) (case-insensitive)

    \n
  • \n
  • \n

    \n status (called Enabled in the Console) (case-sensitive)\n

    \n
  • \n
  • \n

    \n sub\n

    \n
  • \n
\n

Custom attributes aren't searchable.

\n \n

You can also list users with a client-side filter. The server-side filter matches no more than 1 attribute. For an advanced search, \n use a client-side filter with the --query parameter of the list-users action in the CLI. When you use a \n client-side filter, ListUsers returns a paginated list of zero or more users. You can receive multiple pages in a row with zero \n results. Repeat the query with each pagination token that is returned until you receive a null pagination token value, and then \n review the combined result.\n

\n

For more information about server-side and client-side filtering, \n see FilteringCLI output \n in the Command Line Interface User Guide.\n

\n
\n

For more information, \n see Searching for Users \n Using the ListUsers API \n and Examples of Using \n the ListUsers API in the Amazon Cognito Developer Guide.

" + "smithy.api#documentation": "

A filter string of the form \"AttributeName\n Filter-Type \"AttributeValue\"\". Quotation marks\n within the filter string must be escaped using the backslash (\\) character. For example,\n \"family_name = \\\"Reddy\\\"\".

\n
    \n
  • \n

    \n AttributeName: The name of the attribute to search for.\n You can only search for one attribute at a time.

    \n
  • \n
  • \n

    \n Filter-Type: For an exact match, use =, for example,\n \"given_name = \\\"Jon\\\"\". For a prefix (\"starts with\") match, use\n ^=, for example, \"given_name ^= \\\"Jon\\\"\".

    \n
  • \n
  • \n

    \n AttributeValue: The attribute value that must be matched\n for each user.

    \n
  • \n
\n

If the filter string is empty, ListUsers returns all users in the user\n pool.

\n

You can only search for the following standard attributes:

\n
    \n
  • \n

    \n username (case-sensitive)

    \n
  • \n
  • \n

    \n email\n

    \n
  • \n
  • \n

    \n phone_number\n

    \n
  • \n
  • \n

    \n name\n

    \n
  • \n
  • \n

    \n given_name\n

    \n
  • \n
  • \n

    \n family_name\n

    \n
  • \n
  • \n

    \n preferred_username\n

    \n
  • \n
  • \n

    \n cognito:user_status (called Status in the Console) (case-insensitive)

    \n
  • \n
  • \n

    \n status (called Enabled in the Console)\n (case-sensitive)\n

    \n
  • \n
  • \n

    \n sub\n

    \n
  • \n
\n

Custom attributes aren't searchable.

\n \n

You can also list users with a client-side filter. The server-side filter matches\n no more than one attribute. For an advanced search, use a client-side filter with\n the --query parameter of the list-users action in the\n CLI. When you use a client-side filter, ListUsers returns a paginated list of zero\n or more users. You can receive multiple pages in a row with zero results. Repeat the\n query with each pagination token that is returned until you receive a null\n pagination token value, and then review the combined result.

\n

For more information about server-side and client-side filtering, see FilteringCLI output in the Command Line Interface\n User Guide.

\n
\n

For more information, see Searching for Users Using the ListUsers API and Examples of Using the ListUsers API in the Amazon Cognito Developer\n Guide.

" } } }, @@ -8596,7 +8641,7 @@ "PaginationToken": { "target": "com.amazonaws.cognitoidentityprovider#SearchPaginationTokenType", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } }, @@ -8625,12 +8670,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when Amazon Cognito throws an MFA method not found exception.

" + "smithy.api#documentation": "

The message returned when Amazon Cognito throws an MFA method not found\n exception.

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

This exception is thrown when Amazon Cognito can't find a multi-factor authentication (MFA) method.

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

This exception is thrown when Amazon Cognito can't find a multi-factor authentication\n (MFA) method.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -8647,13 +8692,13 @@ "DeliveryMedium": { "target": "com.amazonaws.cognitoidentityprovider#DeliveryMediumType", "traits": { - "smithy.api#documentation": "

The delivery medium to send the MFA code. You can use this parameter to set only the SMS delivery medium value.

" + "smithy.api#documentation": "

The delivery medium to send the MFA code. You can use this parameter to set only the\n SMS delivery medium value.

" } }, "AttributeName": { "target": "com.amazonaws.cognitoidentityprovider#AttributeNameType", "traits": { - "smithy.api#documentation": "

The attribute name of the MFA option type. The only valid value is phone_number.

" + "smithy.api#documentation": "

The attribute name of the MFA option type. The only valid value is\n phone_number.

" } } }, @@ -8688,13 +8733,13 @@ "EmailMessage": { "target": "com.amazonaws.cognitoidentityprovider#EmailVerificationMessageType", "traits": { - "smithy.api#documentation": "

The message template for email messages. EmailMessage is allowed only if \n EmailSendingAccount is DEVELOPER.

" + "smithy.api#documentation": "

The message template for email messages. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

" } }, "EmailSubject": { "target": "com.amazonaws.cognitoidentityprovider#EmailVerificationSubjectType", "traits": { - "smithy.api#documentation": "

The subject line for email messages. EmailSubject is allowed only if \n EmailSendingAccount is DEVELOPER.

" + "smithy.api#documentation": "

The subject line for email messages. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

" } } }, @@ -8747,7 +8792,7 @@ "From": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

The email address that is sending the email. The address must be either individually verified with Amazon Simple Email Service, or from a domain that has been verified with Amazon SES.

" + "smithy.api#documentation": "

The email address that is sending the email. The address must be either individually\n verified with Amazon Simple Email Service, or from a domain that has been verified with Amazon SES.

" } }, "ReplyTo": { @@ -8759,7 +8804,7 @@ "SourceArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the identity that is associated with the sending authorization policy. This identity permits Amazon Cognito to send for the email address specified in the \n From parameter.

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

The Amazon Resource Name (ARN) of the identity that is associated with the sending\n authorization policy. This identity permits Amazon Cognito to send for the email address\n specified in the From parameter.

", "smithy.api#required": {} } }, @@ -8778,7 +8823,7 @@ "MfaEmail": { "target": "com.amazonaws.cognitoidentityprovider#NotifyEmailType", "traits": { - "smithy.api#documentation": "

The multi-factor authentication (MFA) email template used when MFA is challenged as part of a detected risk.

" + "smithy.api#documentation": "

The multi-factor authentication (MFA) email template used when MFA is challenged as\n part of a detected risk.

" } } }, @@ -8897,37 +8942,37 @@ "MinimumLength": { "target": "com.amazonaws.cognitoidentityprovider#PasswordPolicyMinLengthType", "traits": { - "smithy.api#documentation": "

The minimum length of the password in the policy that you have set. This value can't be less than 6.

" + "smithy.api#documentation": "

The minimum length of the password in the policy that you have set. This value can't\n be less than 6.

" } }, "RequireUppercase": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.

" + "smithy.api#documentation": "

In the password policy that you have set, refers to whether you have required users to\n use at least one uppercase letter in their password.

" } }, "RequireLowercase": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.

" + "smithy.api#documentation": "

In the password policy that you have set, refers to whether you have required users to\n use at least one lowercase letter in their password.

" } }, "RequireNumbers": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

In the password policy that you have set, refers to whether you have required users to use at least one number in their password.

" + "smithy.api#documentation": "

In the password policy that you have set, refers to whether you have required users to\n use at least one number in their password.

" } }, "RequireSymbols": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.

" + "smithy.api#documentation": "

In the password policy that you have set, refers to whether you have required users to\n use at least one symbol in their password.

" } }, "TemporaryPasswordValidityDays": { "target": "com.amazonaws.cognitoidentityprovider#TemporaryPasswordValidityDaysType", "traits": { - "smithy.api#documentation": "

The number of days a temporary password is valid in the password policy. If the user doesn't sign in during this time, an administrator must reset their password.

\n \n

When you set TemporaryPasswordValidityDays for a user pool, you can no longer set the deprecated UnusedAccountValidityDays value for that user pool.

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

The number of days a temporary password is valid in the password policy. If the user\n doesn't sign in during this time, an administrator must reset their password.

\n \n

When you set TemporaryPasswordValidityDays for a user pool, you can\n no longer set a value for the legacy UnusedAccountValidityDays\n parameter in that user pool.

\n
" } } }, @@ -9035,13 +9080,13 @@ "ProviderName": { "target": "com.amazonaws.cognitoidentityprovider#ProviderNameType", "traits": { - "smithy.api#documentation": "

The identity provider name.

" + "smithy.api#documentation": "

The IdP name.

" } }, "ProviderType": { "target": "com.amazonaws.cognitoidentityprovider#IdentityProviderTypeType", "traits": { - "smithy.api#documentation": "

The identity provider type.

" + "smithy.api#documentation": "

The IdP type.

" } }, "LastModifiedDate": { @@ -9058,7 +9103,7 @@ } }, "traits": { - "smithy.api#documentation": "

A container for identity provider details.

" + "smithy.api#documentation": "

A container for IdP details.

" } }, "com.amazonaws.cognitoidentityprovider#ProviderDetailsType": { @@ -9084,7 +9129,7 @@ "type": "string", "traits": { "smithy.api#length": { - "min": 1, + "min": 3, "max": 32 }, "smithy.api#pattern": "^[^_][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_]+$" @@ -9108,12 +9153,12 @@ "ProviderAttributeValue": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

The value of the provider attribute to link to, such as xxxxx_account.

" + "smithy.api#documentation": "

The value of the provider attribute to link to, such as\n xxxxx_account.

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

A container for information about an identity provider for a user pool.

" + "smithy.api#documentation": "

A container for information about an IdP for a user pool.

" } }, "com.amazonaws.cognitoidentityprovider#ProvidersListType": { @@ -9184,7 +9229,7 @@ "Priority": { "target": "com.amazonaws.cognitoidentityprovider#PriorityType", "traits": { - "smithy.api#documentation": "

A positive integer specifying priority of a method with 1 being the highest priority.

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

A positive integer specifying priority of a method with 1 being the highest\n priority.

", "smithy.api#required": {} } }, @@ -9282,7 +9327,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Resends the confirmation (for confirmation of registration) to a specific user in the user pool.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

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

Resends the confirmation (for confirmation of registration) to a specific user in the\n user pool.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
", "smithy.api#optionalAuth": {} } }, @@ -9299,32 +9344,32 @@ "SecretHash": { "target": "com.amazonaws.cognitoidentityprovider#SecretHashType", "traits": { - "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

" + "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a\n user pool client and username plus the client ID in the message.

" } }, "UserContextData": { "target": "com.amazonaws.cognitoidentityprovider#UserContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } }, "Username": { "target": "com.amazonaws.cognitoidentityprovider#UsernameType", "traits": { - "smithy.api#documentation": "

The username attribute of the user to whom you want to resend a confirmation code.

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

The username attribute of the user to whom you want to resend a\n confirmation code.

", "smithy.api#required": {} } }, "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for ResendConfirmationCode calls.

" + "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata that contributes to your metrics for\n ResendConfirmationCode calls.

" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the ResendConfirmationCode API action, Amazon Cognito invokes the function that is\n assigned to the custom message trigger. When Amazon Cognito invokes this\n function, it passes a JSON payload, which the function receives as input. This payload\n contains a clientMetadata attribute, which provides the data that you\n assigned to the ClientMetadata parameter in your ResendConfirmationCode request. In your\n function code in Lambda, you can process the clientMetadata value to enhance\n your workflow for your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the ResendConfirmationCode API action, Amazon Cognito invokes the function that is\n assigned to the custom message trigger. When Amazon Cognito invokes this\n function, it passes a JSON payload, which the function receives as input. This payload\n contains a clientMetadata attribute, which provides the data that you\n assigned to the ClientMetadata parameter in your ResendConfirmationCode request. In your\n function code in Lambda, you can process the clientMetadata value to enhance\n your workflow for your specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -9338,12 +9383,12 @@ "CodeDeliveryDetails": { "target": "com.amazonaws.cognitoidentityprovider#CodeDeliveryDetailsType", "traits": { - "smithy.api#documentation": "

The code delivery details returned by the server in response to the request to resend the confirmation code.

" + "smithy.api#documentation": "

The code delivery details returned by the server in response to the request to resend\n the confirmation code.

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

The response from the server when Amazon Cognito makes the request to resend a confirmation code.

" + "smithy.api#documentation": "

The response from the server when Amazon Cognito makes the request to resend a confirmation\n code.

" } }, "com.amazonaws.cognitoidentityprovider#ResourceNotFoundException": { @@ -9352,12 +9397,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when the Amazon Cognito service returns a resource not found exception.

" + "smithy.api#documentation": "

The message returned when the Amazon Cognito service returns a resource not found\n exception.

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

This exception is thrown when the Amazon Cognito service can't find the requested resource.

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

This exception is thrown when the Amazon Cognito service can't find the requested\n resource.

", "smithy.api#error": "client", "smithy.api#httpError": 404 } @@ -9545,7 +9590,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Responds to the authentication challenge.

\n\n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

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

Responds to the authentication challenge.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
", "smithy.api#optionalAuth": {} } }, @@ -9569,31 +9614,31 @@ "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines \n that the caller must pass another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge \n API call.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service. If InitiateAuth or RespondToAuthChallenge API call\n determines that the caller must pass another challenge, they return a session with other\n challenge parameters. This session should be passed as it is to the next\n RespondToAuthChallenge API call.

" } }, "ChallengeResponses": { "target": "com.amazonaws.cognitoidentityprovider#ChallengeResponsesType", "traits": { - "smithy.api#documentation": "

The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:

\n \n

\n SECRET_HASH (if app client is configured with client secret) applies to all of the inputs that follow (including SOFTWARE_TOKEN_MFA).

\n
\n
    \n
  • \n

    \n SMS_MFA: SMS_MFA_CODE, USERNAME.

    \n
  • \n
  • \n

    \n PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME.

    \n \n

    \n PASSWORD_VERIFIER requires DEVICE_KEY when signing in with a remembered device.

    \n
    \n
  • \n
  • \n

    \n NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME.

    \n
  • \n
  • \n

    \n SOFTWARE_TOKEN_MFA: USERNAME and SOFTWARE_TOKEN_MFA_CODE are required attributes.

    \n
  • \n
  • \n

    \n DEVICE_SRP_AUTH requires USERNAME, DEVICE_KEY, SRP_A (and SECRET_HASH).

    \n
  • \n
  • \n

    \n DEVICE_PASSWORD_VERIFIER requires everything that PASSWORD_VERIFIER requires, plus DEVICE_KEY.

    \n
  • \n
  • \n

    \n MFA_SETUP requires USERNAME, plus you must use the session value returned by VerifySoftwareToken in the Session parameter.

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

The challenge responses. These are inputs corresponding to the value of\n ChallengeName, for example:

\n \n

\n SECRET_HASH (if app client is configured with client secret) applies\n to all of the inputs that follow (including SOFTWARE_TOKEN_MFA).

\n
\n
    \n
  • \n

    \n SMS_MFA: SMS_MFA_CODE, USERNAME.

    \n
  • \n
  • \n

    \n PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE,\n PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP,\n USERNAME.

    \n \n

    \n PASSWORD_VERIFIER requires DEVICE_KEY when you\n sign in with a remembered device.

    \n
    \n
  • \n
  • \n

    \n NEW_PASSWORD_REQUIRED: NEW_PASSWORD,\n USERNAME, SECRET_HASH (if app client is configured\n with client secret). To set any required attributes that Amazon Cognito returned as\n requiredAttributes in the InitiateAuth response,\n add a userAttributes.attributename\n parameter.\n This parameter can also set values for writable attributes that aren't required\n by your user pool.

    \n \n \n

    In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value. \nIn RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the requiredAttributes parameter, \nthen use the UpdateUserAttributes API operation to modify the value of any additional attributes.

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

    \n SOFTWARE_TOKEN_MFA: USERNAME and\n SOFTWARE_TOKEN_MFA_CODE are required attributes.

    \n
  • \n
  • \n

    \n DEVICE_SRP_AUTH requires USERNAME,\n DEVICE_KEY, SRP_A (and\n SECRET_HASH).

    \n
  • \n
  • \n

    \n DEVICE_PASSWORD_VERIFIER requires everything that\n PASSWORD_VERIFIER requires, plus\n DEVICE_KEY.

    \n
  • \n
  • \n

    \n MFA_SETUP requires USERNAME, plus you must use the\n session value returned by VerifySoftwareToken in the\n Session parameter.

    \n
  • \n
" } }, "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for RespondToAuthChallenge calls.

" + "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata that contributes to your metrics for\n RespondToAuthChallenge calls.

" } }, "UserContextData": { "target": "com.amazonaws.cognitoidentityprovider#UserContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the RespondToAuthChallenge API action, Amazon Cognito \n invokes any functions that are assigned to the following triggers: post authentication, pre token generation, \n define auth challenge, create auth challenge, and verify auth challenge. When Amazon Cognito \n invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata \n attribute, which provides the data that you assigned to the ClientMetadata parameter in your RespondToAuthChallenge request. In your function code in \n Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration \n doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool\n triggers. When you use the RespondToAuthChallenge API action, Amazon Cognito invokes any\n functions that are assigned to the following triggers: post\n authentication, pre token generation,\n define auth challenge, create auth\n challenge, and verify auth challenge. When Amazon Cognito\n invokes any of these functions, it passes a JSON payload, which the function receives as\n input. This payload contains a clientMetadata attribute, which provides the\n data that you assigned to the ClientMetadata parameter in your RespondToAuthChallenge\n request. In your function code in Lambda, you can process the\n clientMetadata value to enhance your workflow for your specific\n needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -9613,7 +9658,7 @@ "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service. If the caller must pass another challenge, they return a session with other challenge parameters. \n This session should be passed as it is to the next RespondToAuthChallenge API call.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service. If the caller must pass another challenge, they return a session with other\n challenge parameters. This session should be passed as it is to the next\n RespondToAuthChallenge API call.

" } }, "ChallengeParameters": { @@ -9625,7 +9670,7 @@ "AuthenticationResult": { "target": "com.amazonaws.cognitoidentityprovider#AuthenticationResultType", "traits": { - "smithy.api#documentation": "

The result returned by the server in response to the request to respond to the authentication challenge.

" + "smithy.api#documentation": "

The result returned by the server in response to the request to respond to the\n authentication challenge.

" } } }, @@ -9662,7 +9707,7 @@ } ], "traits": { - "smithy.api#documentation": "

Revokes all of the access tokens generated by the specified refresh token. After the token is revoked, you can't use the revoked token to access Amazon Cognito authenticated APIs.

" + "smithy.api#documentation": "

Revokes all of the access tokens generated by the specified refresh token. After the\n token is revoked, you can't use the revoked token to access Amazon Cognito authenticated\n APIs.

" } }, "com.amazonaws.cognitoidentityprovider#RevokeTokenRequest": { @@ -9685,7 +9730,7 @@ "ClientSecret": { "target": "com.amazonaws.cognitoidentityprovider#ClientSecretType", "traits": { - "smithy.api#documentation": "

The secret for the client ID. This is required only if the client ID has a secret.

" + "smithy.api#documentation": "

The secret for the client ID. This is required only if the client ID has a\n secret.

" } } } @@ -9712,13 +9757,13 @@ "CompromisedCredentialsRiskConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#CompromisedCredentialsRiskConfigurationType", "traits": { - "smithy.api#documentation": "

The compromised credentials risk configuration object, including the EventFilter and the EventAction.

" + "smithy.api#documentation": "

The compromised credentials risk configuration object, including the\n EventFilter and the EventAction.

" } }, "AccountTakeoverRiskConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#AccountTakeoverRiskConfigurationType", "traits": { - "smithy.api#documentation": "

The account takeover risk configuration object, including the NotifyConfiguration object and Actions to take if there is an account takeover.

" + "smithy.api#documentation": "

The account takeover risk configuration object, including the\n NotifyConfiguration object and Actions to take if there is\n an account takeover.

" } }, "RiskExceptionConfiguration": { @@ -9763,13 +9808,13 @@ "BlockedIPRangeList": { "target": "com.amazonaws.cognitoidentityprovider#BlockedIPRangeListType", "traits": { - "smithy.api#documentation": "

Overrides the risk decision to always block the pre-authentication requests. The IP range is in CIDR notation, a compact representation of an IP address and its routing prefix.

" + "smithy.api#documentation": "

Overrides the risk decision to always block the pre-authentication requests. The IP\n range is in CIDR notation, a compact representation of an IP address and its routing\n prefix.

" } }, "SkippedIPRangeList": { "target": "com.amazonaws.cognitoidentityprovider#SkippedIPRangeListType", "traits": { - "smithy.api#documentation": "

Risk detection isn't performed on the IP addresses in this range list. The IP range is in CIDR notation.

" + "smithy.api#documentation": "

Risk detection isn't performed on the IP addresses in this range list. The IP range is\n in CIDR notation.

" } } }, @@ -9822,7 +9867,7 @@ "Enabled": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

Specifies whether SMS text message MFA is activated. If an MFA type is activated for a user, the user will be prompted for MFA during all sign-in attempts, unless device tracking is \n turned on and the device has been trusted.

" + "smithy.api#documentation": "

Specifies whether SMS text message MFA is activated. If an MFA type is activated for a\n user, the user will be prompted for MFA during all sign-in attempts, unless device\n tracking is turned on and the device has been trusted.

" } }, "PreferredMfa": { @@ -9833,7 +9878,7 @@ } }, "traits": { - "smithy.api#documentation": "

The type used for enabling SMS multi-factor authentication (MFA) at the user level. Phone numbers don't need to be verified to be used for SMS MFA. If an MFA type \n is activated for a user, the user will be prompted for MFA during all sign-in attempts, unless device tracking is turned on and the device has been trusted. If you \n would like MFA to be applied selectively based on the assessed risk level of sign-in attempts, deactivate MFA for users and turn on Adaptive Authentication for the user pool.

" + "smithy.api#documentation": "

The type used for enabling SMS multi-factor authentication (MFA) at the user level.\n Phone numbers don't need to be verified to be used for SMS MFA. If an MFA type is\n activated for a user, the user will be prompted for MFA during all sign-in attempts,\n unless device tracking is turned on and the device has been trusted. If you would like\n MFA to be applied selectively based on the assessed risk level of sign-in attempts,\n deactivate MFA for users and turn on Adaptive Authentication for the user pool.

" } }, "com.amazonaws.cognitoidentityprovider#SchemaAttributeType": { @@ -9855,21 +9900,21 @@ "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": " \n

You should use WriteAttributes \n in the user pool client to control how attributes can be mutated for new use cases instead of using DeveloperOnlyAttribute.

\n
\n

Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users won't be able to modify this attribute using their access \n token. For example, DeveloperOnlyAttribute can be modified using AdminUpdateUserAttributes but can't be updated using UpdateUserAttributes.

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

You should use WriteAttributes in the user pool client to control how attributes can\n be mutated for new use cases instead of using\n DeveloperOnlyAttribute.

\n
\n

Specifies whether the attribute type is developer only. This attribute can only be\n modified by an administrator. Users won't be able to modify this attribute using their\n access token. For example, DeveloperOnlyAttribute can be modified using\n AdminUpdateUserAttributes but can't be updated using UpdateUserAttributes.

" } }, "Mutable": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "

Specifies whether the value of the attribute can be changed.

\n

For any user pool attribute that is mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users \n sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, \n see Specifying Identity Provider Attribute Mappings for \n Your User Pool.

" + "smithy.api#documentation": "

Specifies whether the value of the attribute can be changed.

\n

For any user pool attribute that is mapped to an IdP attribute, you must set this\n parameter to true. Amazon Cognito updates mapped attributes when users sign in to\n your application through an IdP. If an attribute is immutable, Amazon Cognito throws an error\n when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User\n Pool.

" } }, "Required": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "

Specifies whether a user pool attribute is required. If the attribute is required and the user doesn't provide a value, registration or sign-in will fail.

" + "smithy.api#documentation": "

Specifies whether a user pool attribute is required. If the attribute is required and\n the user doesn't provide a value, registration or sign-in will fail.

" } }, "NumberAttributeConstraints": { @@ -10016,7 +10061,7 @@ } ], "traits": { - "smithy.api#documentation": "

Configures actions on detected risks. To delete the risk configuration for UserPoolId or ClientId, pass null values for all four configuration types.

\n

To activate Amazon Cognito advanced security features, update the user pool to include the UserPoolAddOns keyAdvancedSecurityMode.

" + "smithy.api#documentation": "

Configures actions on detected risks. To delete the risk configuration for\n UserPoolId or ClientId, pass null values for all four\n configuration types.

\n

To activate Amazon Cognito advanced security features, update the user pool to include the\n UserPoolAddOns keyAdvancedSecurityMode.

" } }, "com.amazonaws.cognitoidentityprovider#SetRiskConfigurationRequest": { @@ -10032,7 +10077,7 @@ "ClientId": { "target": "com.amazonaws.cognitoidentityprovider#ClientIdType", "traits": { - "smithy.api#documentation": "

The app client ID. If ClientId is null, then the risk configuration is mapped to userPoolId. When the client ID is null, the same risk configuration is applied \n to all the clients in the userPool.

\n

Otherwise, ClientId is mapped to the client. When the client ID isn't null, the user pool configuration is overridden and the risk configuration for the client is used instead.

" + "smithy.api#documentation": "

The app client ID. If ClientId is null, then the risk configuration is\n mapped to userPoolId. When the client ID is null, the same risk\n configuration is applied to all the clients in the userPool.

\n

Otherwise, ClientId is mapped to the client. When the client ID isn't\n null, the user pool configuration is overridden and the risk configuration for the\n client is used instead.

" } }, "CompromisedCredentialsRiskConfiguration": { @@ -10093,7 +10138,7 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the user interface (UI) customization information for a user pool's built-in app UI.

\n

You can specify app UI customization settings for a single client (with a specific clientId) or for all clients (by setting the clientId \n to ALL). If you specify ALL, the default configuration is used for every client that has no previously set UI customization. If you specify UI \n customization settings for a particular client, it will no longer return to the ALL configuration.

\n \n

To use this API, your user pool must have a domain associated with it. Otherwise, there is no place to host the app's pages, and the service will throw an error.

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

Sets the user interface (UI) customization information for a user pool's built-in app\n UI.

\n

You can specify app UI customization settings for a single client (with a specific\n clientId) or for all clients (by setting the clientId to\n ALL). If you specify ALL, the default configuration is\n used for every client that has no previously set UI customization. If you specify UI\n customization settings for a particular client, it will no longer return to the\n ALL configuration.

\n \n

To use this API, your user pool must have a domain associated with it. Otherwise,\n there is no place to host the app's pages, and the service will throw an\n error.

\n
" } }, "com.amazonaws.cognitoidentityprovider#SetUICustomizationRequest": { @@ -10170,7 +10215,7 @@ } ], "traits": { - "smithy.api#documentation": "

Set the user's multi-factor authentication (MFA) method preference, including which MFA factors are activated and if any are preferred. \n Only one factor can be set as preferred. The preferred MFA factor will be used to authenticate a user if multiple factors are activated. \n If multiple options are activated and no preference is set, a challenge to choose an MFA option will be returned during sign-in. If an \n MFA type is activated for a user, the user will be prompted for MFA during all sign-in attempts unless device tracking is turned on and \n the device has been trusted. If you want MFA to be applied selectively based on the assessed risk level of sign-in attempts, deactivate \n MFA for users and turn on Adaptive Authentication for the user pool.

" + "smithy.api#documentation": "

Set the user's multi-factor authentication (MFA) method preference, including which\n MFA factors are activated and if any are preferred. Only one factor can be set as\n preferred. The preferred MFA factor will be used to authenticate a user if multiple\n factors are activated. If multiple options are activated and no preference is set, a\n challenge to choose an MFA option will be returned during sign-in. If an MFA type is\n activated for a user, the user will be prompted for MFA during all sign-in attempts\n unless device tracking is turned on and the device has been trusted. If you want MFA to\n be applied selectively based on the assessed risk level of sign-in attempts, deactivate\n MFA for users and turn on Adaptive Authentication for the user pool.

" } }, "com.amazonaws.cognitoidentityprovider#SetUserMFAPreferenceRequest": { @@ -10191,7 +10236,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token for the user.

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

A valid access token that Amazon Cognito issued to the user whose MFA preference you want to\n set.

", "smithy.api#required": {} } } @@ -10261,7 +10306,7 @@ "MfaConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolMfaType", "traits": { - "smithy.api#documentation": "

The MFA configuration. If you set the MfaConfiguration value to ‘ON’, only users who\n have set up an MFA factor can sign in. To learn more, see Adding Multi-Factor\n Authentication (MFA) to a user pool. Valid values include:

\n \n
    \n
  • \n

    \n OFF MFA won't be used for any users.

    \n
  • \n
  • \n

    \n ON MFA is required for all users to sign in.

    \n
  • \n
  • \n

    \n OPTIONAL MFA will be required only for individual users who have an MFA factor activated.

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

The MFA configuration. If you set the MfaConfiguration value to ‘ON’, only users who\n have set up an MFA factor can sign in. To learn more, see Adding Multi-Factor\n Authentication (MFA) to a user pool. Valid values include:

\n
    \n
  • \n

    \n OFF MFA won't be used for any users.

    \n
  • \n
  • \n

    \n ON MFA is required for all users to sign in.

    \n
  • \n
  • \n

    \n OPTIONAL MFA will be required only for individual users who have\n an MFA factor activated.

    \n
  • \n
" } } } @@ -10284,7 +10329,7 @@ "MfaConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolMfaType", "traits": { - "smithy.api#documentation": "

The MFA configuration. Valid values include:

\n \n
    \n
  • \n

    \n OFF MFA won't be used for any users.

    \n
  • \n
  • \n

    \n ON MFA is required for all users to sign in.

    \n
  • \n
  • \n

    \n OPTIONAL MFA will be required only for individual users who have an MFA factor enabled.

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

The MFA configuration. Valid values include:

\n
    \n
  • \n

    \n OFF MFA won't be used for any users.

    \n
  • \n
  • \n

    \n ON MFA is required for all users to sign in.

    \n
  • \n
  • \n

    \n OPTIONAL MFA will be required only for individual users who have\n an MFA factor enabled.

    \n
  • \n
" } } } @@ -10322,7 +10367,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

\n This action is no longer supported. You can use it to configure only SMS MFA. You can't use it to configure time-based one-time password (TOTP) software token MFA. \n To configure either type of MFA, use SetUserMFAPreference instead.

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

\n This action is no longer supported. You can use it to configure\n only SMS MFA. You can't use it to configure time-based one-time password (TOTP) software\n token MFA. To configure either type of MFA, use SetUserMFAPreference instead.

", "smithy.api#optionalAuth": {} } }, @@ -10332,14 +10377,14 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token for the set user settings request.

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

A valid access token that Amazon Cognito issued to the user whose user settings you want to\n configure.

", "smithy.api#required": {} } }, "MFAOptions": { "target": "com.amazonaws.cognitoidentityprovider#MFAOptionListType", "traits": { - "smithy.api#documentation": "

You can use this parameter only to set an SMS configuration that uses SMS for delivery.

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

You can use this parameter only to set an SMS configuration that uses SMS for\n delivery.

", "smithy.api#required": {} } } @@ -10409,7 +10454,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Registers the user in the specified user pool and creates a user name, password, and user attributes.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

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

Registers the user in the specified user pool and creates a user name, password, and\n user attributes.

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
", "smithy.api#optionalAuth": {} } }, @@ -10426,7 +10471,7 @@ "SecretHash": { "target": "com.amazonaws.cognitoidentityprovider#SecretHashType", "traits": { - "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

" + "smithy.api#documentation": "

A keyed-hash message authentication code (HMAC) calculated using the secret key of a\n user pool client and username plus the client ID in the message.

" } }, "Username": { @@ -10446,7 +10491,7 @@ "UserAttributes": { "target": "com.amazonaws.cognitoidentityprovider#AttributeListType", "traits": { - "smithy.api#documentation": "

An array of name-value pairs representing user attributes.

\n

For custom attributes, you must prepend the custom: prefix to the attribute name.

" + "smithy.api#documentation": "

An array of name-value pairs representing user attributes.

\n

For custom attributes, you must prepend the custom: prefix to the\n attribute name.

" } }, "ValidationData": { @@ -10458,19 +10503,19 @@ "AnalyticsMetadata": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsMetadataType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata for collecting metrics for SignUp calls.

" + "smithy.api#documentation": "

The Amazon Pinpoint analytics metadata that contributes to your metrics for\n SignUp calls.

" } }, "UserContextData": { "target": "com.amazonaws.cognitoidentityprovider#UserContextDataType", "traits": { - "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data such as the user's device fingerprint, IP address, or location used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito \n invokes any functions that are assigned to the following triggers: pre sign-up, custom message, \n and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function \n receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the \n ClientMetadata parameter in your SignUp request. In your function code in Lambda, you can process the clientMetadata \n value to enhance your workflow for your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action triggers.

\n

You create custom workflows by assigning Lambda functions to user pool triggers.\n When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the\n following triggers: pre sign-up, custom\n message, and post confirmation. When Amazon Cognito invokes\n any of these functions, it passes a JSON payload, which the function receives as input.\n This payload contains a clientMetadata attribute, which provides the data\n that you assigned to the ClientMetadata parameter in your SignUp request. In your\n function code in Lambda, you can process the clientMetadata value to enhance\n your workflow for your specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -10484,20 +10529,20 @@ "UserConfirmed": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

A response from the server indicating that a user registration has been confirmed.

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

A response from the server indicating that a user registration has been\n confirmed.

", "smithy.api#required": {} } }, "CodeDeliveryDetails": { "target": "com.amazonaws.cognitoidentityprovider#CodeDeliveryDetailsType", "traits": { - "smithy.api#documentation": "

The code delivery details returned by the server response to the user registration request.

" + "smithy.api#documentation": "

The code delivery details returned by the server response to the user registration\n request.

" } }, "UserSub": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

The UUID of the authenticated user. This isn't the same as username.

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

The UUID of the authenticated user. This isn't the same as\n username.

", "smithy.api#required": {} } } @@ -10524,14 +10569,14 @@ "SnsCallerArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon SNS caller. This is the ARN of the IAM role in your Amazon Web Services account that Amazon Cognito will use to send SMS messages. SMS messages are \n subject to a spending limit.

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

The Amazon Resource Name (ARN) of the Amazon SNS caller. This is the ARN of the IAM role\n in your Amazon Web Services account that Amazon Cognito will use to send SMS messages. SMS\n messages are subject to a spending limit.

", "smithy.api#required": {} } }, "ExternalId": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

The external ID provides additional security for your IAM role. You can use an\n ExternalId with the IAM role that you use with Amazon SNS to send SMS\n messages for your user pool. If you provide an ExternalId, your Amazon Cognito user\n pool includes it in the request to assume your IAM role. You can configure the role\n trust policy to require that Amazon Cognito, and any principal, provide the\n ExternalID. If you use the Amazon Cognito Management Console to create a role\n for SMS multi-factor authentication (MFA), Amazon Cognito creates a role with the required\n permissions and a trust policy that demonstrates use of the\n ExternalId.

\n

For more information about the ExternalId of a role, \n see How to use an external ID when granting access to your Amazon Web Services resources to a \n third party\n

" + "smithy.api#documentation": "

The external ID provides additional security for your IAM role. You can use an\n ExternalId with the IAM role that you use with Amazon SNS to send SMS\n messages for your user pool. If you provide an ExternalId, your Amazon Cognito user\n pool includes it in the request to assume your IAM role. You can configure the role\n trust policy to require that Amazon Cognito, and any principal, provide the\n ExternalID. If you use the Amazon Cognito Management Console to create a role\n for SMS multi-factor authentication (MFA), Amazon Cognito creates a role with the required\n permissions and a trust policy that demonstrates use of the\n ExternalId.

\n

For more information about the ExternalId of a role, see How to use an\n external ID when granting access to your Amazon Web Services resources to a third\n party\n

" } }, "SnsRegion": { @@ -10551,7 +10596,7 @@ "SmsAuthenticationMessage": { "target": "com.amazonaws.cognitoidentityprovider#SmsVerificationMessageType", "traits": { - "smithy.api#documentation": "

The SMS authentication message that will be sent to users with the code they must sign in. The message must contain the ‘{####}’ placeholder, which is replaced with the code. \n If the message isn't included, and default message will be used.

" + "smithy.api#documentation": "

The SMS authentication message that will be sent to users with the code they must sign\n in. The message must contain the ‘{####}’ placeholder, which is replaced with the code.\n If the message isn't included, and default message will be used.

" } }, "SmsConfiguration": { @@ -10583,7 +10628,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when the software token time-based one-time password (TOTP) multi-factor authentication (MFA) isn't activated for the user pool.

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

This exception is thrown when the software token time-based one-time password (TOTP)\n multi-factor authentication (MFA) isn't activated for the user pool.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -10618,7 +10663,7 @@ "Enabled": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

Specifies whether software token MFA is activated. If an MFA type is activated for a user, the user will be prompted for MFA during all sign-in attempts, unless device tracking is turned \n on and the device has been trusted.

" + "smithy.api#documentation": "

Specifies whether software token MFA is activated. If an MFA type is activated for a\n user, the user will be prompted for MFA during all sign-in attempts, unless device\n tracking is turned on and the device has been trusted.

" } }, "PreferredMfa": { @@ -10629,7 +10674,7 @@ } }, "traits": { - "smithy.api#documentation": "

The type used for enabling software token MFA at the user level. If an MFA type is activated for a user, the user will be prompted for MFA during all sign-in attempts, unless device tracking \n is turned on and the device has been trusted. If you want MFA to be applied selectively based on the assessed risk level of sign-in attempts, deactivate MFA for users and turn on Adaptive \n Authentication for the user pool.

" + "smithy.api#documentation": "

The type used for enabling software token MFA at the user level. If an MFA type is\n activated for a user, the user will be prompted for MFA during all sign-in attempts,\n unless device tracking is turned on and the device has been trusted. If you want MFA to\n be applied selectively based on the assessed risk level of sign-in attempts, deactivate\n MFA for users and turn on Adaptive Authentication for the user pool.

" } }, "com.amazonaws.cognitoidentityprovider#StartUserImportJob": { @@ -10697,7 +10742,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server to the request to start the user import job.

" + "smithy.api#documentation": "

Represents the response from the server to the request to start the user import\n job.

" } }, "com.amazonaws.cognitoidentityprovider#StatusType": { @@ -10753,7 +10798,7 @@ "UserPoolId": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolIdType", "traits": { - "smithy.api#documentation": "

The user pool ID for the user pool that the users are being imported\n into.

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

The user pool ID for the user pool that the users are being imported into.

", "smithy.api#required": {} } }, @@ -10780,7 +10825,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server to the request to stop the user import job.

" + "smithy.api#documentation": "

Represents the response from the server to the request to stop the user import\n job.

" } }, "com.amazonaws.cognitoidentityprovider#StringAttributeConstraintsType": { @@ -10847,7 +10892,7 @@ } ], "traits": { - "smithy.api#documentation": "

Assigns a set of tags to an Amazon Cognito user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.

\n

Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of a user pool, \n one for testing and another for production, you might assign an Environment tag key to both user pools. The value of this key might be Test for \n one user pool, and Production for the other.

\n

Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with \n your user pools. In an Identity and Access Management policy, you can constrain permissions for user pools based on specific tags or tag values.

\n

You can use this action up to 5 times per second, per account. A user pool can have as many as 50 tags.

" + "smithy.api#documentation": "

Assigns a set of tags to an Amazon Cognito user pool. A tag is a label that you can use to\n categorize and manage user pools in different ways, such as by purpose, owner,\n environment, or other criteria.

\n

Each tag consists of a key and value, both of which you define. A key is a general\n category for more specific values. For example, if you have two versions of a user pool,\n one for testing and another for production, you might assign an Environment\n tag key to both user pools. The value of this key might be Test for one\n user pool, and Production for the other.

\n

Tags are useful for cost tracking and access control. You can activate your tags so\n that they appear on the Billing and Cost Management console, where you can track the\n costs associated with your user pools. In an Identity and Access Management policy, you can constrain\n permissions for user pools based on specific tags or tag values.

\n

You can use this action up to 5 times per second, per account. A user pool can have as\n many as 50 tags.

" } }, "com.amazonaws.cognitoidentityprovider#TagResourceRequest": { @@ -10927,24 +10972,24 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TimeUnitsType", "traits": { - "smithy.api#documentation": "

A time unit in “seconds”, “minutes”, “hours”, or “days” for the value in AccessTokenValidity, defaulting to hours.

" + "smithy.api#documentation": "

A time unit in “seconds”, “minutes”, “hours”, or “days” for the value in\n AccessTokenValidity, defaulting to hours.

" } }, "IdToken": { "target": "com.amazonaws.cognitoidentityprovider#TimeUnitsType", "traits": { - "smithy.api#documentation": "

A time unit in “seconds”, “minutes”, “hours”, or “days” for the value in IdTokenValidity, defaulting to hours.

" + "smithy.api#documentation": "

A time unit in “seconds”, “minutes”, “hours”, or “days” for the value in\n IdTokenValidity, defaulting to hours.

" } }, "RefreshToken": { "target": "com.amazonaws.cognitoidentityprovider#TimeUnitsType", "traits": { - "smithy.api#documentation": "

A time unit in “seconds”, “minutes”, “hours”, or “days” for the value in RefreshTokenValidity, defaulting to days.

" + "smithy.api#documentation": "

A time unit in “seconds”, “minutes”, “hours”, or “days” for the value in\n RefreshTokenValidity, defaulting to days.

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

The data type for TokenValidityUnits that specifics the time measurements for token validity.

" + "smithy.api#documentation": "

The data type TokenValidityUnits specifies the time units you use when you set the\n duration of ID, access, and refresh tokens.

" } }, "com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException": { @@ -10953,12 +10998,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when Amazon Cognito returns a TooManyFailedAttempts exception.

" + "smithy.api#documentation": "

The message returned when Amazon Cognito returns a TooManyFailedAttempts\n exception.

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

This exception is thrown when the user has made too many failed attempts for a given action, such as sign-in.

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

This exception is thrown when the user has made too many failed attempts for a given\n action, such as sign-in.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -10969,12 +11014,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when the Amazon Cognito service returns a too many requests exception.

" + "smithy.api#documentation": "

The message returned when the Amazon Cognito service returns a too many requests\n exception.

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

This exception is thrown when the user has made too many requests for a given operation.

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

This exception is thrown when the user has made too many requests for a given\n operation.

", "smithy.api#error": "client", "smithy.api#httpError": 429 } @@ -11026,7 +11071,7 @@ } }, "traits": { - "smithy.api#documentation": "

A container for the UI customization information for a user pool's built-in app UI.

" + "smithy.api#documentation": "

A container for the UI customization information for a user pool's built-in app\n UI.

" } }, "com.amazonaws.cognitoidentityprovider#UnauthorizedException": { @@ -11037,7 +11082,7 @@ } }, "traits": { - "smithy.api#documentation": "

Exception that is thrown when the request isn't authorized. This can happen due to an invalid access token in the request.

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

Exception that is thrown when the request isn't authorized. This can happen due to an\n invalid access token in the request.

", "smithy.api#error": "client", "smithy.api#httpError": 401 } @@ -11053,7 +11098,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when Amazon Cognito encounters an unexpected exception with Lambda.

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

This exception is thrown when Amazon Cognito encounters an unexpected exception with\n Lambda.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -11079,7 +11124,7 @@ } }, "traits": { - "smithy.api#documentation": "

Exception that is thrown when you attempt to perform an operation that isn't enabled for the user pool client.

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

Exception that is thrown when you attempt to perform an operation that isn't enabled\n for the user pool client.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -11139,7 +11184,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified tags from an Amazon Cognito user pool. You can use this action up to 5 times per second, per account.

" + "smithy.api#documentation": "

Removes the specified tags from an Amazon Cognito user pool. You can use this action up to 5\n times per second, per account.

" } }, "com.amazonaws.cognitoidentityprovider#UntagResourceRequest": { @@ -11197,7 +11242,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides the feedback for an authentication event, whether it was from a valid user or not. This feedback is used for improving the risk evaluation decision for the user pool as part \n of Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Provides the feedback for an authentication event, whether it was from a valid user or\n not. This feedback is used for improving the risk evaluation decision for the user pool\n as part of Amazon Cognito advanced security.

" } }, "com.amazonaws.cognitoidentityprovider#UpdateAuthEventFeedbackRequest": { @@ -11291,7 +11336,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token.

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

A valid access token that Amazon Cognito issued to the user whose device status you want to\n update.

", "smithy.api#required": {} } }, @@ -11375,13 +11420,13 @@ "RoleArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The new role Amazon Resource Name (ARN) for the group. This is used for setting the cognito:roles and cognito:preferred_role claims in the token.

" + "smithy.api#documentation": "

The new role Amazon Resource Name (ARN) for the group. This is used for setting the\n cognito:roles and cognito:preferred_role claims in the\n token.

" } }, "Precedence": { "target": "com.amazonaws.cognitoidentityprovider#PrecedenceType", "traits": { - "smithy.api#documentation": "

The new precedence value for the group. For more information about this parameter, \n see CreateGroup.

" + "smithy.api#documentation": "

The new precedence value for the group. For more information about this parameter, see\n CreateGroup.

" } } } @@ -11426,7 +11471,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates identity provider information for a user pool.

" + "smithy.api#documentation": "

Updates IdP information for a user pool.

" } }, "com.amazonaws.cognitoidentityprovider#UpdateIdentityProviderRequest": { @@ -11442,26 +11487,26 @@ "ProviderName": { "target": "com.amazonaws.cognitoidentityprovider#ProviderNameType", "traits": { - "smithy.api#documentation": "

The identity provider name.

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

The IdP name.

", "smithy.api#required": {} } }, "ProviderDetails": { "target": "com.amazonaws.cognitoidentityprovider#ProviderDetailsType", "traits": { - "smithy.api#documentation": "

The identity provider details to be updated, such as MetadataURL and MetadataFile.

" + "smithy.api#documentation": "

The IdP details to be updated, such as MetadataURL and\n MetadataFile.

" } }, "AttributeMapping": { "target": "com.amazonaws.cognitoidentityprovider#AttributeMappingType", "traits": { - "smithy.api#documentation": "

The identity provider attribute mapping to be changed.

" + "smithy.api#documentation": "

The IdP attribute mapping to be changed.

" } }, "IdpIdentifiers": { "target": "com.amazonaws.cognitoidentityprovider#IdpIdentifiersListType", "traits": { - "smithy.api#documentation": "

A list of identity provider identifiers.

" + "smithy.api#documentation": "

A list of IdP identifiers.

" } } } @@ -11472,7 +11517,7 @@ "IdentityProvider": { "target": "com.amazonaws.cognitoidentityprovider#IdentityProviderType", "traits": { - "smithy.api#documentation": "

The identity provider object.

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

The IdP object.

", "smithy.api#required": {} } } @@ -11504,7 +11549,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the name and scopes of resource server. All other fields are read-only.

\n \n

If you don't provide a value for an attribute, it is set to the default value.

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

Updates the name and scopes of resource server. All other fields are read-only.

\n \n

If you don't provide a value for an attribute, it is set to the default\n value.

\n
" } }, "com.amazonaws.cognitoidentityprovider#UpdateResourceServerRequest": { @@ -11627,21 +11672,21 @@ "UserAttributes": { "target": "com.amazonaws.cognitoidentityprovider#AttributeListType", "traits": { - "smithy.api#documentation": "

An array of name-value pairs representing user attributes.

\n

For custom attributes, you must prepend the custom: prefix to the attribute name.

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

An array of name-value pairs representing user attributes.

\n

For custom attributes, you must prepend the custom: prefix to the\n attribute name.

\n

If you have set an attribute to require verification before Amazon Cognito updates its value,\n this request doesn’t immediately update the value of that attribute. After your user\n receives and responds to a verification message to verify the new value, Amazon Cognito updates\n the attribute value. Your user can sign in and receive messages with the original \n attribute value until they verify the new value.

", "smithy.api#required": {} } }, "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token for the request to update user attributes.

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

A valid access token that Amazon Cognito issued to the user whose user attributes you want to\n update.

", "smithy.api#required": {} } }, "ClientMetadata": { "target": "com.amazonaws.cognitoidentityprovider#ClientMetadataType", "traits": { - "smithy.api#documentation": "

A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.

\n

You create custom workflows by assigning Lambda functions to user pool triggers. When\n you use the UpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned\n to the custom message trigger. When Amazon Cognito invokes this function, it\n passes a JSON payload, which the function receives as input. This payload contains a\n clientMetadata attribute, which provides the data that you assigned to\n the ClientMetadata parameter in your UpdateUserAttributes request. In your function code\n in Lambda, you can process the clientMetadata value to enhance your workflow\n for your specific needs.

\n\n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool \n configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

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

A map of custom key-value pairs that you can provide as input for any custom workflows\n that this action initiates.

\n

You create custom workflows by assigning Lambda functions to user pool triggers. When\n you use the UpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned\n to the custom message trigger. When Amazon Cognito invokes this function, it\n passes a JSON payload, which the function receives as input. This payload contains a\n clientMetadata attribute, which provides the data that you assigned to\n the ClientMetadata parameter in your UpdateUserAttributes request. In your function code\n in Lambda, you can process the clientMetadata value to enhance your workflow\n for your specific needs.

\n \n

For more information, see \nCustomizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

\n\n \n

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the\n following:

\n
    \n
  • \n

    Store the ClientMetadata value. This data is available only to Lambda\n triggers that are assigned to a user pool to support custom workflows. If\n your user pool configuration doesn't include triggers, the ClientMetadata\n parameter serves no purpose.

    \n
  • \n
  • \n

    Validate the ClientMetadata value.

    \n
  • \n
  • \n

    Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive\n information.

    \n
  • \n
\n
" } } }, @@ -11655,12 +11700,12 @@ "CodeDeliveryDetailsList": { "target": "com.amazonaws.cognitoidentityprovider#CodeDeliveryDetailsListType", "traits": { - "smithy.api#documentation": "

The code delivery details list from the server for the request to update user attributes.

" + "smithy.api#documentation": "

The code delivery details list from the server for the request to update user\n attributes.

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

Represents the response from the server for the request to update user attributes.

" + "smithy.api#documentation": "

Represents the response from the server for the request to update user\n attributes.

" } }, "com.amazonaws.cognitoidentityprovider#UpdateUserPool": { @@ -11707,7 +11752,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the specified user pool with the specified attributes. You can get a list of the current user pool settings using \n DescribeUserPool. \n If you don't provide a value for an attribute, it will be set to the default value.

\n\n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

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

Updates the specified user pool with the specified attributes. You can get a list of\n the current user pool settings using DescribeUserPool. If you don't provide a value for an attribute, it will be\n set to the default value.\n

\n \n \n

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers\n require you to register an origination phone number before you can send SMS messages\n to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a\n phone number with Amazon Pinpoint.\n Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must\n receive SMS messages might not be able to sign up, activate their accounts, or sign\n in.

\n

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service,\n Amazon Simple Notification Service might place your account in the SMS sandbox. In \n sandbox\n mode\n , you can send messages only to verified phone\n numbers. After you test your app while in the sandbox environment, you can move out\n of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito\n Developer Guide.

\n
" } }, "com.amazonaws.cognitoidentityprovider#UpdateUserPoolClient": { @@ -11745,7 +11790,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the specified user pool app client with the specified attributes. You can get a list of the current user pool app client settings using \n DescribeUserPoolClient.

\n \n

If you don't provide a value for an attribute, it will be set to the default value.

\n
\n

You can also use this operation to enable token revocation for user pool clients. For more information about revoking tokens, \n see RevokeToken.

" + "smithy.api#documentation": "

Updates the specified user pool app client with the specified attributes. You can get\n a list of the current user pool app client settings using DescribeUserPoolClient.

\n \n

If you don't provide a value for an attribute, it will be set to the default\n value.

\n
\n

You can also use this operation to enable token revocation for user pool clients. For\n more information about revoking tokens, see RevokeToken.

" } }, "com.amazonaws.cognitoidentityprovider#UpdateUserPoolClientRequest": { @@ -11754,7 +11799,7 @@ "UserPoolId": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolIdType", "traits": { - "smithy.api#documentation": "

The user pool ID for the user pool where you want to update the user pool client.

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

The user pool ID for the user pool where you want to update the user pool\n client.

", "smithy.api#required": {} } }, @@ -11774,25 +11819,25 @@ "RefreshTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#RefreshTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit, in days, after which the refresh token is no longer valid and can't be used.

" + "smithy.api#documentation": "

The refresh token time limit. After this limit expires, your user can't use \n their refresh token. To specify the time unit for RefreshTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set RefreshTokenValidity as 10 and\n TokenValidityUnits as days, your user can refresh their session\n and retrieve new access and ID tokens for 10 days.

\n

The default time unit for RefreshTokenValidity in an API request is days. \n You can't set RefreshTokenValidity to 0. If you do, Amazon Cognito overrides the \n value with the default value of 30 days. Valid range is displayed below \n in seconds.

" } }, "AccessTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#AccessTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit after which the access token is no longer valid and can't be used.

" + "smithy.api#documentation": "

The access token time limit. After this limit expires, your user can't use \n their access token. To specify the time unit for AccessTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set AccessTokenValidity to 10 and\n TokenValidityUnits to hours, your user can authorize access with\n their access token for 10 hours.

\n

The default time unit for AccessTokenValidity in an API request is hours. \n Valid range is displayed below in seconds.

" } }, "IdTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#IdTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit after which the ID token is no longer valid and can't be used.

" + "smithy.api#documentation": "

The ID token time limit. After this limit expires, your user can't use \n their ID token. To specify the time unit for IdTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set IdTokenValidity as 10 and\n TokenValidityUnits as hours, your user can authenticate their \n session with their ID token for 10 hours.

\n

The default time unit for AccessTokenValidity in an API request is hours. \n Valid range is displayed below in seconds.

" } }, "TokenValidityUnits": { "target": "com.amazonaws.cognitoidentityprovider#TokenValidityUnitsType", "traits": { - "smithy.api#documentation": "

The units in which the validity times are represented. Default for RefreshToken is days, and default for ID and access tokens is hours.

" + "smithy.api#documentation": "

The units in which the validity times are represented. The default unit for\n RefreshToken is days, and the default for ID and access tokens is hours.

" } }, "ReadAttributes": { @@ -11810,67 +11855,67 @@ "ExplicitAuthFlows": { "target": "com.amazonaws.cognitoidentityprovider#ExplicitAuthFlowsListType", "traits": { - "smithy.api#documentation": "

The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are no longer supported in favor of new names with the \n ALLOW_ prefix. Note that values with ALLOW_ prefix must be used only along with values with the ALLOW_ prefix.

\n

Valid values include:

\n
    \n
  • \n

    \n ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the \n ADMIN_NO_SRP_AUTH setting. With this authentication flow, Amazon Cognito receives the password in the request instead of using the Secure Remote Password (SRP) protocol to \n verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.

    \n
  • \n
  • \n

    \n ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Amazon Cognito receives the password in the request instead of using the SRP \n protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.

    \n
  • \n
  • \n

    \n ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.

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

The authentication flows that are supported by the user pool clients. Flow names\n without the ALLOW_ prefix are no longer supported in favor of new names\n with the ALLOW_ prefix. Note that values with ALLOW_ prefix\n must be used only along with values with the ALLOW_ prefix.

\n

Valid values include:

\n
    \n
  • \n

    \n ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password\n authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces\n the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Amazon Cognito\n receives the password in the request instead of using the Secure Remote Password\n (SRP) protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_CUSTOM_AUTH: Enable Lambda trigger based\n authentication.

    \n
  • \n
  • \n

    \n ALLOW_USER_PASSWORD_AUTH: Enable user password-based\n authentication. In this flow, Amazon Cognito receives the password in the request instead\n of using the SRP protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.

    \n
  • \n
  • \n

    \n ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh\n tokens.

    \n
  • \n
" } }, "SupportedIdentityProviders": { "target": "com.amazonaws.cognitoidentityprovider#SupportedIdentityProvidersListType", "traits": { - "smithy.api#documentation": "

A list of provider names for the identity providers that are supported on this client.

" + "smithy.api#documentation": "

A list of provider names for the IdPs that this client supports. The following are\n supported: COGNITO, Facebook, Google\n LoginWithAmazon, and the names of your own SAML and OIDC providers.

" } }, "CallbackURLs": { "target": "com.amazonaws.cognitoidentityprovider#CallbackURLsListType", "traits": { - "smithy.api#documentation": "

A list of allowed redirect (callback) URLs for the identity providers.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a \n fragment component.

    \n
  • \n
\n

See OAuth 2.0 - Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

\n

App callback URLs such as myapp://example are also supported.

" + "smithy.api#documentation": "

A list of allowed redirect (callback) URLs for the IdPs.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a fragment component.

    \n
  • \n
\n

See OAuth 2.0 -\n Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes\n only.

\n

App callback URLs such as myapp://example are also supported.

" } }, "LogoutURLs": { "target": "com.amazonaws.cognitoidentityprovider#LogoutURLsListType", "traits": { - "smithy.api#documentation": "

A list of allowed logout URLs for the identity providers.

" + "smithy.api#documentation": "

A list of allowed logout URLs for the IdPs.

" } }, "DefaultRedirectURI": { "target": "com.amazonaws.cognitoidentityprovider#RedirectUrlType", "traits": { - "smithy.api#documentation": "

The default redirect URI. Must be in the CallbackURLs list.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a \n fragment component.

    \n
  • \n
\n

See OAuth 2.0 - Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

\n

App callback URLs such as myapp://example are also supported.

" + "smithy.api#documentation": "

The default redirect URI. Must be in the CallbackURLs list.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a fragment component.

    \n
  • \n
\n

See OAuth 2.0 -\n Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing\n purposes only.

\n

App callback URLs such as myapp://example are also supported.

" } }, "AllowedOAuthFlows": { "target": "com.amazonaws.cognitoidentityprovider#OAuthFlowsType", "traits": { - "smithy.api#documentation": "

The allowed OAuth flows.

\n

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

\n

Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

\n

Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination \n of client and client_secret.

" + "smithy.api#documentation": "

The allowed OAuth flows.

\n
\n
code
\n
\n

Use a code grant flow, which provides an authorization code as the\n response. This code can be exchanged for access tokens with the\n /oauth2/token endpoint.

\n
\n
implicit
\n
\n

Issue the access token (and, optionally, ID token, based on scopes)\n directly to your user.

\n
\n
client_credentials
\n
\n

Issue the access token from the /oauth2/token endpoint\n directly to a non-person user using a combination of the client ID and\n client secret.

\n
\n
" } }, "AllowedOAuthScopes": { "target": "com.amazonaws.cognitoidentityprovider#ScopeListType", "traits": { - "smithy.api#documentation": "

The allowed OAuth scopes. Possible values provided by OAuth are: phone, \n email, openid, and profile. Possible values provided by Amazon Web Services are: aws.cognito.signin.user.admin. Custom scopes created \n in Resource Servers are also supported.

" + "smithy.api#documentation": "

The allowed OAuth scopes. Possible values provided by OAuth are phone,\n email, openid, and profile. Possible values\n provided by Amazon Web Services are aws.cognito.signin.user.admin. Custom scopes created\n in Resource Servers are also supported.

" } }, "AllowedOAuthFlowsUserPoolClient": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { - "smithy.api#documentation": "

Set to true if the client is allowed to follow the OAuth protocol when interacting with Amazon Cognito user pools.

" + "smithy.api#documentation": "

Set to true if the client is allowed to follow the OAuth protocol when interacting\n with Amazon Cognito user pools.

" } }, "AnalyticsConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsConfigurationType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.

\n \n

In Amazon Web Services Regions where Amazon Pinpoint isn't available, user pools only support sending events to Amazon Pinpoint\n projects in us-east-1. In Regions where Amazon Pinpoint is available, user pools support\n sending events to Amazon Pinpoint projects within that same Region.

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

The Amazon Pinpoint analytics configuration necessary to collect metrics for this user\n pool.

\n \n

In Amazon Web Services Regions where Amazon Pinpoint isn't available, user pools only support sending\n events to Amazon Pinpoint projects in us-east-1. In Regions where Amazon Pinpoint is available, user\n pools support sending events to Amazon Pinpoint projects within that same Region.

\n
" } }, "PreventUserExistenceErrors": { "target": "com.amazonaws.cognitoidentityprovider#PreventUserExistenceErrorTypes", "traits": { - "smithy.api#documentation": "

Errors and responses that you want Amazon Cognito APIs to return during authentication, account confirmation, and password recovery when the user doesn't exist in the \n user pool. When set to ENABLED and the user doesn't exist, authentication returns an error indicating either the username or password was incorrect. \n Account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs \n return a UserNotFoundException exception if the user doesn't exist in the user pool.

\n

Valid values include:

\n
    \n
  • \n

    \n ENABLED - This prevents user existence-related errors.

    \n
  • \n
  • \n

    \n LEGACY - This represents the early \n behavior of Amazon Cognito where user existence related errors aren't prevented.

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

Errors and responses that you want Amazon Cognito APIs to return during authentication, account\n confirmation, and password recovery when the user doesn't exist in the user pool. When\n set to ENABLED and the user doesn't exist, authentication returns an error\n indicating either the username or password was incorrect. Account confirmation and\n password recovery return a response indicating a code was sent to a simulated\n destination. When set to LEGACY, those APIs return a\n UserNotFoundException exception if the user doesn't exist in the user\n pool.

\n

Valid values include:

\n
    \n
  • \n

    \n ENABLED - This prevents user existence-related errors.

    \n
  • \n
  • \n

    \n LEGACY - This represents the early behavior of Amazon Cognito where user\n existence related errors aren't prevented.

    \n
  • \n
" } }, "EnableTokenRevocation": { "target": "com.amazonaws.cognitoidentityprovider#WrappedBooleanType", "traits": { - "smithy.api#documentation": "

Activates or deactivates token revocation. For more information about revoking tokens, \n see RevokeToken.

" + "smithy.api#documentation": "

Activates or deactivates token revocation. For more information about revoking tokens,\n see RevokeToken.

" } } }, @@ -11884,12 +11929,12 @@ "UserPoolClient": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolClientType", "traits": { - "smithy.api#documentation": "

The user pool client value from the response from the server when you request to update the user pool client.

" + "smithy.api#documentation": "

The user pool client value from the response from the server when you request to\n update the user pool client.

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

Represents the response from the server to the request to update the user pool client.

" + "smithy.api#documentation": "

Represents the response from the server to the request to update the user pool\n client.

" } }, "com.amazonaws.cognitoidentityprovider#UpdateUserPoolDomain": { @@ -11918,7 +11963,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the Secure Sockets Layer (SSL) certificate for the custom domain for your user pool.

\n

You can use this operation to provide the Amazon Resource Name (ARN) of a new certificate to Amazon Cognito. You can't use it to change the domain for a user pool.

\n

A custom domain is used to host the Amazon Cognito hosted UI, which provides sign-up and sign-in pages for your application. When you set up a custom domain, you provide a certificate that you \n manage with Certificate Manager (ACM). When necessary, you can use this operation to change the certificate that you applied to your custom domain.

\n

Usually, this is unnecessary following routine certificate renewal with ACM. When you renew your existing certificate in ACM, the ARN for your certificate remains the same, \n and your custom domain uses the new certificate automatically.

\n

However, if you replace your existing certificate with a new one, ACM gives the new certificate a new ARN. To apply the new certificate to your custom domain, you must provide \n this ARN to Amazon Cognito.

\n

When you add your new certificate in ACM, you must choose US East (N. Virginia) as the Amazon Web Services Region.

\n

After you submit your request, Amazon Cognito requires up to 1 hour to distribute your new certificate to your custom domain.

\n

For more information about adding a custom domain to your user pool, \n see Using Your Own Domain for the Hosted UI.

" + "smithy.api#documentation": "

Updates the Secure Sockets Layer (SSL) certificate for the custom domain for your user\n pool.

\n

You can use this operation to provide the Amazon Resource Name (ARN) of a new\n certificate to Amazon Cognito. You can't use it to change the domain for a user pool.

\n

A custom domain is used to host the Amazon Cognito hosted UI, which provides sign-up and\n sign-in pages for your application. When you set up a custom domain, you provide a\n certificate that you manage with Certificate Manager (ACM). When necessary, you can use this\n operation to change the certificate that you applied to your custom domain.

\n

Usually, this is unnecessary following routine certificate renewal with ACM. When\n you renew your existing certificate in ACM, the ARN for your certificate remains the\n same, and your custom domain uses the new certificate automatically.

\n

However, if you replace your existing certificate with a new one, ACM gives the new\n certificate a new ARN. To apply the new certificate to your custom domain, you must\n provide this ARN to Amazon Cognito.

\n

When you add your new certificate in ACM, you must choose US East (N. Virginia) as\n the Amazon Web Services Region.

\n

After you submit your request, Amazon Cognito requires up to 1 hour to distribute your new\n certificate to your custom domain.

\n

For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

" } }, "com.amazonaws.cognitoidentityprovider#UpdateUserPoolDomainRequest": { @@ -11927,21 +11972,21 @@ "Domain": { "target": "com.amazonaws.cognitoidentityprovider#DomainType", "traits": { - "smithy.api#documentation": "

The domain name for the custom domain that hosts the sign-up and sign-in pages for your application. One example might be auth.example.com.

\n

This string can include only lowercase letters, numbers, and hyphens. Don't use a hyphen for the first or last character. Use periods to separate subdomain names.

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

The domain name for the custom domain that hosts the sign-up and sign-in pages for\n your application. One example might be auth.example.com.

\n

This string can include only lowercase letters, numbers, and hyphens. Don't use a\n hyphen for the first or last character. Use periods to separate subdomain names.

", "smithy.api#required": {} } }, "UserPoolId": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolIdType", "traits": { - "smithy.api#documentation": "

The ID of the user pool that is associated with the custom domain whose certificate you're updating.

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

The ID of the user pool that is associated with the custom domain whose certificate\n you're updating.

", "smithy.api#required": {} } }, "CustomDomainConfig": { "target": "com.amazonaws.cognitoidentityprovider#CustomDomainConfigType", "traits": { - "smithy.api#documentation": "

The configuration for a custom domain that hosts the sign-up and sign-in pages for your application. Use this object to specify an SSL certificate that is managed by ACM.

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

The configuration for a custom domain that hosts the sign-up and sign-in pages for\n your application. Use this object to specify an SSL certificate that is managed by\n ACM.

", "smithy.api#required": {} } } @@ -11956,7 +12001,7 @@ "CloudFrontDomain": { "target": "com.amazonaws.cognitoidentityprovider#DomainType", "traits": { - "smithy.api#documentation": "

The Amazon CloudFront endpoint that Amazon Cognito set up when you added the custom domain to your user pool.

" + "smithy.api#documentation": "

The Amazon CloudFront endpoint that Amazon Cognito set up when you added the custom domain to your user\n pool.

" } } }, @@ -11989,7 +12034,7 @@ "AutoVerifiedAttributes": { "target": "com.amazonaws.cognitoidentityprovider#VerifiedAttributesListType", "traits": { - "smithy.api#documentation": "

The attributes that are automatically verified when Amazon Cognito requests to update user pools.

" + "smithy.api#documentation": "

The attributes that are automatically verified when Amazon Cognito requests to update user\n pools.

" } }, "SmsVerificationMessage": { @@ -12022,10 +12067,16 @@ "smithy.api#documentation": "

The contents of the SMS authentication message.

" } }, + "UserAttributeUpdateSettings": { + "target": "com.amazonaws.cognitoidentityprovider#UserAttributeUpdateSettingsType", + "traits": { + "smithy.api#documentation": "

" + } + }, "MfaConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolMfaType", "traits": { - "smithy.api#documentation": "

Can be one of the following values:

\n \n
    \n
  • \n

    \n OFF - MFA tokens aren't required and can't be specified during user registration.

    \n
  • \n
  • \n

    \n ON - MFA tokens are required for all user registrations. You can only specify ON when you're initially creating a user pool. You can \n use the SetUserPoolMfaConfig API operation \n to turn MFA \"ON\" for existing user pools.

    \n
  • \n
  • \n

    \n OPTIONAL - Users have the option when registering to create an MFA token.

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

Possible values include:

\n
    \n
  • \n

    \n OFF - MFA tokens aren't required and can't be specified during user\n registration.

    \n
  • \n
  • \n

    \n ON - MFA tokens are required for all user registrations. You can\n only specify ON when you're initially creating a user pool. You can use the\n SetUserPoolMfaConfig API operation to turn MFA \"ON\" for existing\n user pools.

    \n
  • \n
  • \n

    \n OPTIONAL - Users have the option when registering to create an MFA\n token.

    \n
  • \n
" } }, "DeviceConfiguration": { @@ -12049,7 +12100,7 @@ "UserPoolTags": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolTagsType", "traits": { - "smithy.api#documentation": "

The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, \n or other criteria.

" + "smithy.api#documentation": "

The tag keys and values to assign to the user pool. A tag is a label that you can use\n to categorize and manage user pools in different ways, such as by purpose, owner,\n environment, or other criteria.

" } }, "AdminCreateUserConfig": { @@ -12061,13 +12112,13 @@ "UserPoolAddOns": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolAddOnsType", "traits": { - "smithy.api#documentation": "

Enables advanced security risk detection. Set the key AdvancedSecurityMode to the value \"AUDIT\".

" + "smithy.api#documentation": "

Enables advanced security risk detection. Set the key\n AdvancedSecurityMode to the value \"AUDIT\".

" } }, "AccountRecoverySetting": { "target": "com.amazonaws.cognitoidentityprovider#AccountRecoverySettingType", "traits": { - "smithy.api#documentation": "

The available verified method a user can use to recover their password when they call ForgotPassword. You can use this setting to define a \n preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user \n also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method \n where SMS is preferred through email.

" + "smithy.api#documentation": "

The available verified method a user can use to recover their password when they call\n ForgotPassword. You can use this setting to define a preferred method\n when a user has more than one method available. With this setting, SMS doesn't qualify\n for a valid password recovery mechanism if the user also has SMS multi-factor\n authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy\n behavior to determine the recovery method where SMS is preferred through email.

" } } }, @@ -12079,7 +12130,21 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the response from the server when you make a request to update the user pool.

" + "smithy.api#documentation": "

Represents the response from the server when you make a request to update the user\n pool.

" + } + }, + "com.amazonaws.cognitoidentityprovider#UserAttributeUpdateSettingsType": { + "type": "structure", + "members": { + "AttributesRequireVerificationBeforeUpdate": { + "target": "com.amazonaws.cognitoidentityprovider#AttributesRequireVerificationBeforeUpdateType", + "traits": { + "smithy.api#documentation": "

Requires that your user verifies their email address, phone number, or both before \n Amazon Cognito updates the value of that attribute. When you update a user attribute that has \n this option activated, Amazon Cognito sends a verification message to the new phone number or \n email address. Amazon Cognito doesn’t change the value of the attribute until your user responds \n to the verification message and confirms the new value.

\n

You can verify an updated email address or phone number with a VerifyUserAttribute API request. You can also call the UpdateUserAttributes or AdminUpdateUserAttributes API and set email_verified or\n phone_number_verified to true.

\n

When AttributesRequireVerificationBeforeUpdate is false, your user pool\n doesn't require that your users verify attribute changes before Amazon Cognito updates them. In a\n user pool where AttributesRequireVerificationBeforeUpdate is false, API\n operations that change attribute values can immediately update a user’s\n email or phone_number attribute.

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

The settings for updates to user attributes.

" } }, "com.amazonaws.cognitoidentityprovider#UserContextDataType": { @@ -12088,12 +12153,12 @@ "EncodedData": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

Contextual data, such as the user's device fingerprint, IP address, or location, used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Contextual data, such as the user's device fingerprint, IP address, or location, used\n for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

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

Contextual data, such as the user's device fingerprint, IP address, or location, used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

" + "smithy.api#documentation": "

Information that your app generates about a user's AdminInitiateAuth or\n AdminRespondToAuthChallenge session. Amazon Cognito advanced security features\n calculate risk levels for user sessions based on this context data.

" } }, "com.amazonaws.cognitoidentityprovider#UserFilterType": { @@ -12116,7 +12181,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when you're trying to modify a user pool while a user import job is in progress for that pool.

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

This exception is thrown when you're trying to modify a user pool while a user import\n job is in progress for that pool.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -12198,7 +12263,7 @@ "UserPoolId": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolIdType", "traits": { - "smithy.api#documentation": "

The user pool ID for the user pool that the users are being imported\n into.

" + "smithy.api#documentation": "

The user pool ID for the user pool that the users are being imported into.

" } }, "PreSignedUrl": { @@ -12228,13 +12293,13 @@ "Status": { "target": "com.amazonaws.cognitoidentityprovider#UserImportJobStatusType", "traits": { - "smithy.api#documentation": "

The status of the user import job. One of the following:

\n \n
    \n
  • \n

    \n Created - The job was created but not started.

    \n
  • \n
  • \n

    \n Pending - A transition state. You have started the job, but it has not begun importing users yet.

    \n
  • \n
  • \n

    \n InProgress - The job has started, and users are being imported.

    \n
  • \n
  • \n

    \n Stopping - You have stopped the job, but the job has not stopped importing users yet.

    \n
  • \n
  • \n

    \n Stopped - You have stopped the job, and the job has stopped importing users.

    \n
  • \n
  • \n

    \n Succeeded - The job has completed successfully.

    \n
  • \n
  • \n

    \n Failed - The job has stopped due to an error.

    \n
  • \n
  • \n

    \n Expired - You created a job, but did not start the job within 24-48 hours. All data associated with the job was deleted, and the job can't be started.

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

The status of the user import job. One of the following:

\n
    \n
  • \n

    \n Created - The job was created but not started.

    \n
  • \n
  • \n

    \n Pending - A transition state. You have started the job, but it\n has not begun importing users yet.

    \n
  • \n
  • \n

    \n InProgress - The job has started, and users are being\n imported.

    \n
  • \n
  • \n

    \n Stopping - You have stopped the job, but the job has not stopped\n importing users yet.

    \n
  • \n
  • \n

    \n Stopped - You have stopped the job, and the job has stopped\n importing users.

    \n
  • \n
  • \n

    \n Succeeded - The job has completed successfully.

    \n
  • \n
  • \n

    \n Failed - The job has stopped due to an error.

    \n
  • \n
  • \n

    \n Expired - You created a job, but did not start the job within\n 24-48 hours. All data associated with the job was deleted, and the job can't be\n started.

    \n
  • \n
" } }, "CloudWatchLogsRoleArn": { "target": "com.amazonaws.cognitoidentityprovider#ArnType", "traits": { - "smithy.api#documentation": "

The role Amazon Resource Name (ARN) for the Amazon CloudWatch Logging role for the user import job. For more information, see \"Creating the CloudWatch Logs IAM Role\" in the Amazon Cognito Developer Guide.

" + "smithy.api#documentation": "

The role Amazon Resource Name (ARN) for the Amazon CloudWatch Logging role for the user import\n job. For more information, see \"Creating the CloudWatch Logs IAM Role\" in the Amazon Cognito Developer\n Guide.

" } }, "ImportedUsers": { @@ -12284,12 +12349,12 @@ "message": { "target": "com.amazonaws.cognitoidentityprovider#MessageType", "traits": { - "smithy.api#documentation": "

The message returned when the Amazon Cognito service returns a user validation exception with the Lambda service.

" + "smithy.api#documentation": "

The message returned when the Amazon Cognito service returns a user validation exception with\n the Lambda service.

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

This exception is thrown when the Amazon Cognito service encounters a user validation exception with the Lambda service.

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

This exception is thrown when the Amazon Cognito service encounters a user validation exception\n with the Lambda service.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -12372,7 +12437,7 @@ "UserPoolId": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolIdType", "traits": { - "smithy.api#documentation": "

The user pool ID for the user pool where you want to describe the user pool client.

" + "smithy.api#documentation": "

The user pool ID for the user pool where you want to describe the user pool\n client.

" } }, "ClientName": { @@ -12434,25 +12499,25 @@ "RefreshTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#RefreshTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit, in days, after which the refresh token is no longer valid and can't be used.

" + "smithy.api#documentation": "

The refresh token time limit. After this limit expires, your user can't use \n their refresh token. To specify the time unit for RefreshTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set RefreshTokenValidity as 10 and\n TokenValidityUnits as days, your user can refresh their session\n and retrieve new access and ID tokens for 10 days.

\n

The default time unit for RefreshTokenValidity in an API request is days. \n You can't set RefreshTokenValidity to 0. If you do, Amazon Cognito overrides the \n value with the default value of 30 days. Valid range is displayed below \n in seconds.

" } }, "AccessTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#AccessTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit, specified by tokenValidityUnits, defaulting to hours, after which the access token is no longer valid and can't be used.

" + "smithy.api#documentation": "

The access token time limit. After this limit expires, your user can't use \n their access token. To specify the time unit for AccessTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set AccessTokenValidity to 10 and\n TokenValidityUnits to hours, your user can authorize access with\n their access token for 10 hours.

\n

The default time unit for AccessTokenValidity in an API request is hours. \n Valid range is displayed below in seconds.

" } }, "IdTokenValidity": { "target": "com.amazonaws.cognitoidentityprovider#IdTokenValidityType", "traits": { - "smithy.api#documentation": "

The time limit specified by tokenValidityUnits, defaulting to hours, after which the refresh token is no longer valid and can't be used.

" + "smithy.api#documentation": "

The ID token time limit. After this limit expires, your user can't use \n their ID token. To specify the time unit for IdTokenValidity as \n seconds, minutes, hours, or days, \n set a TokenValidityUnits value in your API request.

\n

For example, when you set IdTokenValidity as 10 and\n TokenValidityUnits as hours, your user can authenticate their \n session with their ID token for 10 hours.

\n

The default time unit for AccessTokenValidity in an API request is hours. \n Valid range is displayed below in seconds.

" } }, "TokenValidityUnits": { "target": "com.amazonaws.cognitoidentityprovider#TokenValidityUnitsType", "traits": { - "smithy.api#documentation": "

The time units used to specify the token validity times of their respective token.

" + "smithy.api#documentation": "

The time units used to specify the token validity times of each token type: ID,\n access, and refresh.

" } }, "ReadAttributes": { @@ -12470,68 +12535,68 @@ "ExplicitAuthFlows": { "target": "com.amazonaws.cognitoidentityprovider#ExplicitAuthFlowsListType", "traits": { - "smithy.api#documentation": "

The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are no longer supported in favor of new names with the \n ALLOW_ prefix. Note that values with ALLOW_ prefix must be used only along with values including the ALLOW_ prefix.

\n

Valid values include:

\n \n
    \n
  • \n

    \n ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the \n ADMIN_NO_SRP_AUTH setting. With this authentication flow, Amazon Cognito receives the password in the request instead of using the Secure Remote Password (SRP) protocol to \n verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.

    \n
  • \n
  • \n

    \n ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Amazon Cognito receives the password in the request instead of using the SRP \n protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.

    \n
  • \n
  • \n

    \n ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.

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

The authentication flows that are supported by the user pool clients. Flow names\n without the ALLOW_ prefix are no longer supported in favor of new names\n with the ALLOW_ prefix. Note that values with ALLOW_ prefix\n must be used only along with values including the ALLOW_ prefix.

\n

Valid values include:

\n
    \n
  • \n

    \n ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password\n authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces\n the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Amazon Cognito\n receives the password in the request instead of using the Secure Remote Password\n (SRP) protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_CUSTOM_AUTH: Enable Lambda trigger based\n authentication.

    \n
  • \n
  • \n

    \n ALLOW_USER_PASSWORD_AUTH: Enable user password-based\n authentication. In this flow, Amazon Cognito receives the password in the request instead\n of using the SRP protocol to verify passwords.

    \n
  • \n
  • \n

    \n ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.

    \n
  • \n
  • \n

    \n ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh\n tokens.

    \n
  • \n
" } }, "SupportedIdentityProviders": { "target": "com.amazonaws.cognitoidentityprovider#SupportedIdentityProvidersListType", "traits": { - "smithy.api#documentation": "

A list of provider names for the identity providers that are supported on this client.

" + "smithy.api#documentation": "

A list of provider names for the IdPs that this client supports. The following are\n supported: COGNITO, Facebook, Google\n LoginWithAmazon, and the names of your own SAML and OIDC providers.

" } }, "CallbackURLs": { "target": "com.amazonaws.cognitoidentityprovider#CallbackURLsListType", "traits": { - "smithy.api#documentation": "

A list of allowed redirect (callback) URLs for the identity providers.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a \n fragment component.

    \n
  • \n
\n

See OAuth 2.0 - Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

\n

App callback URLs such as myapp://example are also supported.

" + "smithy.api#documentation": "

A list of allowed redirect (callback) URLs for the IdPs.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a fragment component.

    \n
  • \n
\n

See OAuth 2.0 -\n Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes\n only.

\n

App callback URLs such as myapp://example are also supported.

" } }, "LogoutURLs": { "target": "com.amazonaws.cognitoidentityprovider#LogoutURLsListType", "traits": { - "smithy.api#documentation": "

A list of allowed logout URLs for the identity providers.

" + "smithy.api#documentation": "

A list of allowed logout URLs for the IdPs.

" } }, "DefaultRedirectURI": { "target": "com.amazonaws.cognitoidentityprovider#RedirectUrlType", "traits": { - "smithy.api#documentation": "

The default redirect URI. Must be in the CallbackURLs list.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a \n fragment component.

    \n
  • \n
\n

See OAuth 2.0 - Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

\n

App callback URLs such as myapp://example are also supported.

" + "smithy.api#documentation": "

The default redirect URI. Must be in the CallbackURLs list.

\n

A redirect URI must:

\n
    \n
  • \n

    Be an absolute URI.

    \n
  • \n
  • \n

    Be registered with the authorization server.

    \n
  • \n
  • \n

    Not include a fragment component.

    \n
  • \n
\n

See OAuth 2.0 -\n Redirection Endpoint.

\n

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes\n only.

\n

App callback URLs such as myapp://example are also supported.

" } }, "AllowedOAuthFlows": { "target": "com.amazonaws.cognitoidentityprovider#OAuthFlowsType", "traits": { - "smithy.api#documentation": "

The allowed OAuth flows.

\n

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

\n

Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

\n

Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination \n of client and client_secret.

" + "smithy.api#documentation": "

The allowed OAuth flows.

\n
\n
code
\n
\n

Use a code grant flow, which provides an authorization code as the\n response. This code can be exchanged for access tokens with the\n /oauth2/token endpoint.

\n
\n
implicit
\n
\n

Issue the access token (and, optionally, ID token, based on scopes)\n directly to your user.

\n
\n
client_credentials
\n
\n

Issue the access token from the /oauth2/token endpoint\n directly to a non-person user using a combination of the client ID and\n client secret.

\n
\n
" } }, "AllowedOAuthScopes": { "target": "com.amazonaws.cognitoidentityprovider#ScopeListType", "traits": { - "smithy.api#documentation": "

The allowed OAuth scopes. Possible values provided by OAuth are: \n phone, email, openid, and profile. Possible values provided by Amazon Web Services are: aws.cognito.signin.user.admin. \n Custom scopes created in Resource Servers are also supported.

" + "smithy.api#documentation": "

The OAuth scopes that your app client supports. Possible values that OAuth provides\n are phone, email, openid, and\n profile. Possible values that Amazon Web Services provides are\n aws.cognito.signin.user.admin. Amazon Cognito also supports custom scopes that\n you create in Resource Servers.

" } }, "AllowedOAuthFlowsUserPoolClient": { "target": "com.amazonaws.cognitoidentityprovider#BooleanType", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "

Set to true if the client is allowed to follow the OAuth protocol when interacting with Amazon Cognito user pools.

" + "smithy.api#documentation": "

Set to true if the client is allowed to follow the OAuth protocol when interacting\n with Amazon Cognito user pools.

" } }, "AnalyticsConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#AnalyticsConfigurationType", "traits": { - "smithy.api#documentation": "

The Amazon Pinpoint analytics configuration for the user pool client.

\n \n

Amazon Cognito user pools only support sending events to Amazon Pinpoint projects in the US East (N.\n Virginia) us-east-1 Region, regardless of the Region where the user pool\n resides.

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

The Amazon Pinpoint analytics configuration for the user pool client.

\n \n

Amazon Cognito user pools only support sending events to Amazon Pinpoint projects in the US East\n (N. Virginia) us-east-1 Region, regardless of the Region where the user pool\n resides.

\n
" } }, "PreventUserExistenceErrors": { "target": "com.amazonaws.cognitoidentityprovider#PreventUserExistenceErrorTypes", "traits": { - "smithy.api#documentation": "

Errors and responses that you want Amazon Cognito APIs to return during authentication, account confirmation, and password recovery when the user doesn't exist \n in the user pool. When set to ENABLED and the user doesn't exist, authentication returns an error indicating either the username or password \n was incorrect. Account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to \n LEGACY, those APIs return a UserNotFoundException exception if the user doesn't exist in the user pool.

\n

Valid values include:

\n \n
    \n
  • \n

    \n ENABLED - This prevents user existence-related errors.

    \n
  • \n
  • \n

    \n LEGACY - This \n represents the old behavior of Cognito where user existence related errors aren't prevented.

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

Errors and responses that you want Amazon Cognito APIs to return during authentication, account\n confirmation, and password recovery when the user doesn't exist in the user pool. When\n set to ENABLED and the user doesn't exist, authentication returns an error\n indicating either the username or password was incorrect. Account confirmation and\n password recovery return a response indicating a code was sent to a simulated\n destination. When set to LEGACY, those APIs return a\n UserNotFoundException exception if the user doesn't exist in the user\n pool.

\n

Valid values include:

\n
    \n
  • \n

    \n ENABLED - This prevents user existence-related errors.

    \n
  • \n
  • \n

    \n LEGACY - This represents the old behavior of Amazon Cognito where user\n existence related errors aren't prevented.

    \n
  • \n
" } }, "EnableTokenRevocation": { "target": "com.amazonaws.cognitoidentityprovider#WrappedBooleanType", "traits": { - "smithy.api#documentation": "

Indicates whether token revocation is activated for the user pool client. When you create a new user pool client, token revocation is activated by default. For more information about \n revoking tokens, see RevokeToken.

" + "smithy.api#documentation": "

Indicates whether token revocation is activated for the user pool client. When you\n create a new user pool client, token revocation is activated by default. For more\n information about revoking tokens, see RevokeToken.

" } } }, @@ -12736,7 +12801,7 @@ "UsernameAttributes": { "target": "com.amazonaws.cognitoidentityprovider#UsernameAttributesListType", "traits": { - "smithy.api#documentation": "

Specifies whether a user can use an email address or phone number as a username when they sign up.

" + "smithy.api#documentation": "

Specifies whether a user can use an email address or phone number as a username when\n they sign up.

" } }, "SmsVerificationMessage": { @@ -12769,10 +12834,16 @@ "smithy.api#documentation": "

The contents of the SMS authentication message.

" } }, + "UserAttributeUpdateSettings": { + "target": "com.amazonaws.cognitoidentityprovider#UserAttributeUpdateSettingsType", + "traits": { + "smithy.api#documentation": "

" + } + }, "MfaConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolMfaType", "traits": { - "smithy.api#documentation": "

Can be one of the following values:

\n \n
    \n
  • \n

    \n OFF - MFA tokens aren't required and can't be specified during user registration.

    \n
  • \n
  • \n

    \n ON - MFA tokens are required for all user registrations. You can only specify required when you're initially creating a user pool.

    \n
  • \n
  • \n

    \n OPTIONAL - Users have the option when registering to create an MFA token.

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

Can be one of the following values:

\n
    \n
  • \n

    \n OFF - MFA tokens aren't required and can't be specified during user\n registration.

    \n
  • \n
  • \n

    \n ON - MFA tokens are required for all user registrations. You can\n only specify required when you're initially creating a user pool.

    \n
  • \n
  • \n

    \n OPTIONAL - Users have the option when registering to create an MFA\n token.

    \n
  • \n
" } }, "DeviceConfiguration": { @@ -12802,7 +12873,7 @@ "UserPoolTags": { "target": "com.amazonaws.cognitoidentityprovider#UserPoolTagsType", "traits": { - "smithy.api#documentation": "

The tags that are assigned to the user pool. A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, \n or other criteria.

" + "smithy.api#documentation": "

The tags that are assigned to the user pool. A tag is a label that you can apply to\n user pools to categorize and manage them in different ways, such as by purpose, owner,\n environment, or other criteria.

" } }, "SmsConfigurationFailure": { @@ -12814,7 +12885,7 @@ "EmailConfigurationFailure": { "target": "com.amazonaws.cognitoidentityprovider#StringType", "traits": { - "smithy.api#documentation": "

Deprecated. Review error codes from API requests with\n EventSource:cognito-idp.amazonaws.com in CloudTrail for\n information about problems with user pool email configuration.

" + "smithy.api#documentation": "

Deprecated. Review error codes from API requests with\n EventSource:cognito-idp.amazonaws.com in CloudTrail for\n information about problems with user pool email configuration.

" } }, "Domain": { @@ -12826,7 +12897,7 @@ "CustomDomain": { "target": "com.amazonaws.cognitoidentityprovider#DomainType", "traits": { - "smithy.api#documentation": "

A custom domain name that you provide to Amazon Cognito. This parameter applies only if you use a custom domain to host the sign-up and sign-in pages for your application. An \n example of a custom domain name might be auth.example.com.

\n

For more information about adding a custom domain to your user pool, \n see Using Your Own Domain for the Hosted UI.

" + "smithy.api#documentation": "

A custom domain name that you provide to Amazon Cognito. This parameter applies only if you use\n a custom domain to host the sign-up and sign-in pages for your application. An example\n of a custom domain name might be auth.example.com.

\n

For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

" } }, "AdminCreateUserConfig": { @@ -12844,7 +12915,7 @@ "UsernameConfiguration": { "target": "com.amazonaws.cognitoidentityprovider#UsernameConfigurationType", "traits": { - "smithy.api#documentation": "

Case sensitivity of the username input for the selected sign-in option. For example, when case sensitivity is set to False, users can sign in using either \"username\" \n or \"Username\". This configuration is immutable once it has been set. For more information, \n see UsernameConfigurationType.

" + "smithy.api#documentation": "

Case sensitivity of the username input for the selected sign-in option. For example,\n when case sensitivity is set to False, users can sign in using either\n \"username\" or \"Username\". This configuration is immutable once it has been set. For more\n information, see UsernameConfigurationType.

" } }, "Arn": { @@ -12856,7 +12927,7 @@ "AccountRecoverySetting": { "target": "com.amazonaws.cognitoidentityprovider#AccountRecoverySettingType", "traits": { - "smithy.api#documentation": "

The available verified method a user can use to recover their password when they call ForgotPassword. You can use this setting to define a \n preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user \n also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method \n where SMS is preferred through email.

" + "smithy.api#documentation": "

The available verified method a user can use to recover their password when they call\n ForgotPassword. You can use this setting to define a preferred method\n when a user has more than one method available. With this setting, SMS doesn't qualify\n for a valid password recovery mechanism if the user also has SMS multi-factor\n authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy\n behavior to determine the recovery method where SMS is preferred through email.

" } } }, @@ -12935,7 +13006,7 @@ "UserStatus": { "target": "com.amazonaws.cognitoidentityprovider#UserStatusType", "traits": { - "smithy.api#documentation": "

The user status. This can be one of the following:

\n \n
    \n
  • \n

    UNCONFIRMED - User has been created but not confirmed.

    \n
  • \n
  • \n

    CONFIRMED - User has been confirmed.

    \n
  • \n
  • \n

    ARCHIVED - User is no longer active.

    \n
  • \n
  • \n

    UNKNOWN - User status isn't known.

    \n
  • \n
  • \n

    RESET_REQUIRED - User is confirmed, but the user must request a code and reset their password before they can sign in.

    \n
  • \n
  • \n

    FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change their password to a \n new value before doing anything else.

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

The user status. This can be one of the following:

\n
    \n
  • \n

    UNCONFIRMED - User has been created but not confirmed.

    \n
  • \n
  • \n

    CONFIRMED - User has been confirmed.

    \n
  • \n
  • \n

    EXTERNAL_PROVIDER - User signed in with a third-party IdP.

    \n
  • \n
  • \n

    ARCHIVED - User is no longer active.

    \n
  • \n
  • \n

    UNKNOWN - User status isn't known.

    \n
  • \n
  • \n

    RESET_REQUIRED - User is confirmed, but the user must request a code and reset\n their password before they can sign in.

    \n
  • \n
  • \n

    FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a\n temporary password, but on first sign-in, the user must change their password to\n a new value before doing anything else.

    \n
  • \n
" } }, "MFAOptions": { @@ -12946,7 +13017,7 @@ } }, "traits": { - "smithy.api#documentation": "

The user type.

" + "smithy.api#documentation": "

A user profile in a Amazon Cognito user pool.

" } }, "com.amazonaws.cognitoidentityprovider#UsernameAttributeType": { @@ -12976,7 +13047,7 @@ "CaseSensitive": { "target": "com.amazonaws.cognitoidentityprovider#WrappedBooleanType", "traits": { - "smithy.api#documentation": "

Specifies whether username case sensitivity will be applied for all users in the user\n pool through Amazon Cognito APIs.

\n

Valid values include:

\n
\n
True
\n
\n

Enables case sensitivity for all username input. When this option is set\n to True, users must sign in using the exact capitalization of\n their given username, such as “UserName”. This is the default value.

\n
\n
False
\n
\n

Enables case insensitivity for all username input. For example, when this\n option is set to False, users can sign in using either\n \"username\" or \"Username\". This option also enables both\n preferred_username and email alias to be case\n insensitive, in addition to the username attribute.

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

Specifies whether user name case sensitivity will be applied for all users in the user\n pool through Amazon Cognito APIs.

\n

Valid values include:

\n
\n
True
\n
\n

Enables case sensitivity for all username input. When this option is set\n to True, users must sign in using the exact capitalization of\n their given username, such as “UserName”. This is the default value.

\n
\n
False
\n
\n

Enables case insensitivity for all username input. For example, when this\n option is set to False, users can sign in using either\n \"username\" or \"Username\". This option also enables both\n preferred_username and email alias to be case\n insensitive, in addition to the username attribute.

\n
\n
", "smithy.api#required": {} } } @@ -12996,7 +13067,7 @@ } }, "traits": { - "smithy.api#documentation": "

This exception is thrown when Amazon Cognito encounters a user name that already exists in the user pool.

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

This exception is thrown when Amazon Cognito encounters a user name that already\n exists in the user pool.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -13024,31 +13095,31 @@ "SmsMessage": { "target": "com.amazonaws.cognitoidentityprovider#SmsVerificationMessageType", "traits": { - "smithy.api#documentation": "

The SMS message template.

" + "smithy.api#documentation": "

The template for SMS messages that Amazon Cognito sends to your users.

" } }, "EmailMessage": { "target": "com.amazonaws.cognitoidentityprovider#EmailVerificationMessageType", "traits": { - "smithy.api#documentation": "

The email message template. EmailMessage is allowed only if \n EmailSendingAccount is DEVELOPER.

" + "smithy.api#documentation": "

The template for email messages that Amazon Cognito sends to your users. You can set an\n EmailMessage template only if the value of EmailSendingAccount is DEVELOPER. When your EmailSendingAccount is DEVELOPER, your user pool sends email\n messages with your own Amazon SES configuration.

" } }, "EmailSubject": { "target": "com.amazonaws.cognitoidentityprovider#EmailVerificationSubjectType", "traits": { - "smithy.api#documentation": "

The subject line for the email message template. EmailSubject is allowed only if \n EmailSendingAccount is DEVELOPER.

" + "smithy.api#documentation": "

The subject line for the email message template. You can set an\n EmailSubject template only if the value of EmailSendingAccount is DEVELOPER. When your EmailSendingAccount is DEVELOPER, your user pool sends email\n messages with your own Amazon SES configuration.

" } }, "EmailMessageByLink": { "target": "com.amazonaws.cognitoidentityprovider#EmailVerificationMessageByLinkType", "traits": { - "smithy.api#documentation": "

The email message template for sending a confirmation link to the user. EmailMessageByLink is allowed only if \n EmailSendingAccount is DEVELOPER.

" + "smithy.api#documentation": "

The email message template for sending a confirmation link to the user. You can set an\n EmailMessageByLink template only if the value of EmailSendingAccount is DEVELOPER. When your EmailSendingAccount is DEVELOPER, your user pool sends email\n messages with your own Amazon SES configuration.

" } }, "EmailSubjectByLink": { "target": "com.amazonaws.cognitoidentityprovider#EmailVerificationSubjectByLinkType", "traits": { - "smithy.api#documentation": "

The subject line for the email message template for sending a confirmation link to the user. EmailSubjectByLink is allowed only \n EmailSendingAccount is DEVELOPER.

" + "smithy.api#documentation": "

The subject line for the email message template for sending a confirmation link to the\n user. You can set an EmailSubjectByLink template only if the value of\n EmailSendingAccount is DEVELOPER. When your EmailSendingAccount is DEVELOPER, your user pool sends email\n messages with your own Amazon SES configuration.

" } }, "DefaultEmailOption": { @@ -13130,7 +13201,7 @@ } ], "traits": { - "smithy.api#documentation": "

Use this API to register a user's entered time-based one-time password (TOTP) code and mark the user's software token MFA status as \"verified\" if successful. The request takes an access \n token or a session string, but not both.

" + "smithy.api#documentation": "

Use this API to register a user's entered time-based one-time password (TOTP) code and\n mark the user's software token MFA status as \"verified\" if successful. The request takes\n an access token or a session string, but not both.

" } }, "com.amazonaws.cognitoidentityprovider#VerifySoftwareTokenRequest": { @@ -13139,19 +13210,19 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token.

" + "smithy.api#documentation": "

A valid access token that Amazon Cognito issued to the user whose software token you want to\n verify.

" } }, "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service.

" } }, "UserCode": { "target": "com.amazonaws.cognitoidentityprovider#SoftwareTokenMFAUserCodeType", "traits": { - "smithy.api#documentation": "

The one- time password computed using the secret code returned by \n AssociateSoftwareToken.

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

The one- time password computed using the secret code returned by AssociateSoftwareToken.

", "smithy.api#required": {} } }, @@ -13175,7 +13246,7 @@ "Session": { "target": "com.amazonaws.cognitoidentityprovider#SessionType", "traits": { - "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the service.

" + "smithy.api#documentation": "

The session that should be passed both ways in challenge-response calls to the\n service.

" } } } @@ -13204,6 +13275,9 @@ "target": "com.amazonaws.cognitoidentityprovider#VerifyUserAttributeResponse" }, "errors": [ + { + "target": "com.amazonaws.cognitoidentityprovider#AliasExistsException" + }, { "target": "com.amazonaws.cognitoidentityprovider#CodeMismatchException" }, @@ -13240,7 +13314,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Verifies the specified user attributes in the user pool.

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

Verifies the specified user attributes in the user pool.

\n

\n If your user pool requires verification before Amazon Cognito updates the attribute value, \n VerifyUserAttribute updates the affected attribute to its pending value. For more information, \n see \n UserAttributeUpdateSettingsType.\n

", "smithy.api#optionalAuth": {} } }, @@ -13250,7 +13324,7 @@ "AccessToken": { "target": "com.amazonaws.cognitoidentityprovider#TokenModelType", "traits": { - "smithy.api#documentation": "

The access token of the request to verify user attributes.

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

A valid access token that Amazon Cognito issued to the user whose user attributes you want to\n verify.

", "smithy.api#required": {} } }, @@ -13277,7 +13351,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

A container representing the response from the server from the request to verify user attributes.

" + "smithy.api#documentation": "

A container representing the response from the server from the request to verify user\n attributes.

" } }, "com.amazonaws.cognitoidentityprovider#WrappedBooleanType": { diff --git a/aws/sdk/aws-models/comprehend.json b/aws/sdk/aws-models/comprehend.json index a63ca42840d..84047f72b94 100644 --- a/aws/sdk/aws-models/comprehend.json +++ b/aws/sdk/aws-models/comprehend.json @@ -334,7 +334,7 @@ "TextList": { "target": "com.amazonaws.comprehend#CustomerInputStringList", "traits": { - "smithy.api#documentation": "

A list containing the text of the input documents. The list can contain a maximum of 25\n documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded\n characters.

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

A list containing the text of the input documents. The list can contain a maximum of 25\n documents. Each document must contain fewer than 5,000 bytes of UTF-8 encoded\n characters.

", "smithy.api#required": {} } }, @@ -728,7 +728,7 @@ "EndpointArn": { "target": "com.amazonaws.comprehend#DocumentClassifierEndpointArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the endpoint.

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

The Amazon Resource Number (ARN) of the endpoint. For information about endpoints, see Managing endpoints.

", "smithy.api#required": {} } } @@ -1100,7 +1100,7 @@ "LanguageCode": { "target": "com.amazonaws.comprehend#LanguageCode", "traits": { - "smithy.api#documentation": "

The language of the input documents.

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

The language of the input documents. Currently, English is the only valid language.

", "smithy.api#required": {} } } @@ -1289,7 +1289,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a model-specific endpoint for synchronous inference for a previously trained\n custom model

" + "smithy.api#documentation": "

Creates a model-specific endpoint for synchronous inference for a previously trained\n custom model \n For information about endpoints, see Managing endpoints.

" } }, "com.amazonaws.comprehend#CreateEndpointRequest": { @@ -1445,7 +1445,7 @@ "VpcConfig": { "target": "com.amazonaws.comprehend#VpcConfig", "traits": { - "smithy.api#documentation": "

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing\n the resources you are using for your custom entity recognizer. For more information, see\n Amazon\n VPC.

" + "smithy.api#documentation": "

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing\n the resources you are using for your custom entity recognizer. For more information, see\n Amazon\n VPC.

" } }, "ModelKmsKeyId": { @@ -1488,6 +1488,9 @@ "target": "com.amazonaws.comprehend#CustomerInputString" }, "traits": { + "smithy.api#length": { + "min": 1 + }, "smithy.api#sensitive": {} } }, @@ -1565,7 +1568,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a model-specific endpoint for a previously-trained custom model. All endpoints\n must be deleted in order for the model to be deleted.

" + "smithy.api#documentation": "

Deletes a model-specific endpoint for a previously-trained custom model. All endpoints\n must be deleted in order for the model to be deleted.\n For information about endpoints, see Managing endpoints.

" } }, "com.amazonaws.comprehend#DeleteEndpointRequest": { @@ -1847,7 +1850,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the properties associated with a specific endpoint. Use this operation to get the\n status of an endpoint.

" + "smithy.api#documentation": "

Gets the properties associated with a specific endpoint. Use this operation to get the\n status of an endpoint.\n For information about endpoints, see Managing endpoints.

" } }, "com.amazonaws.comprehend#DescribeEndpointRequest": { @@ -2423,7 +2426,7 @@ "EndpointArn": { "target": "com.amazonaws.comprehend#EntityRecognizerEndpointArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name of an endpoint that is associated with a custom entity\n recognition model. Provide an endpoint if you want to detect entities by using your own custom\n model instead of the default model that is used by Amazon Comprehend.

\n

If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and\n it ignores any language code that you provide in your request.

" + "smithy.api#documentation": "

The Amazon Resource Name of an endpoint that is associated with a custom entity\n recognition model. Provide an endpoint if you want to detect entities by using your own custom\n model instead of the default model that is used by Amazon Comprehend.

\n

If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and\n it ignores any language code that you provide in your request.

\n

For information about endpoints, see Managing endpoints.

" } } } @@ -2540,7 +2543,7 @@ "LanguageCode": { "target": "com.amazonaws.comprehend#LanguageCode", "traits": { - "smithy.api#documentation": "

The language of the input documents.

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

The language of the input documents. Currently, English is the only valid language.

", "smithy.api#required": {} } } @@ -2811,7 +2814,7 @@ "VpcConfig": { "target": "com.amazonaws.comprehend#VpcConfig", "traits": { - "smithy.api#documentation": "

Configuration parameters for a private Virtual Private Cloud (VPC) containing the\n resources you are using for your document classification job. For more information, see Amazon\n VPC.

" + "smithy.api#documentation": "

Configuration parameters for a private Virtual Private Cloud (VPC) containing the\n resources you are using for your document classification job. For more information, see Amazon\n VPC.

" } } }, @@ -2933,7 +2936,7 @@ } }, "traits": { - "smithy.api#documentation": "

The input properties for training a document classifier.

\n

For more information on how the input file is formatted, see how-document-classification-training-data.

" + "smithy.api#documentation": "

The input properties for training a document classifier.

\n

For more information on how the input file is formatted, see prep-classifier-data.

" } }, "com.amazonaws.comprehend#DocumentClassifierMode": { @@ -3055,7 +3058,7 @@ "VpcConfig": { "target": "com.amazonaws.comprehend#VpcConfig", "traits": { - "smithy.api#documentation": "

Configuration parameters for a private Virtual Private Cloud (VPC) containing the\n resources you are using for your custom classifier. For more information, see Amazon\n VPC.

" + "smithy.api#documentation": "

Configuration parameters for a private Virtual Private Cloud (VPC) containing the\n resources you are using for your custom classifier. For more information, see Amazon\n VPC.

" } }, "Mode": { @@ -3354,7 +3357,7 @@ "VpcConfig": { "target": "com.amazonaws.comprehend#VpcConfig", "traits": { - "smithy.api#documentation": "

Configuration parameters for a private Virtual Private Cloud (VPC) containing the\n resources you are using for your dominant language detection job. For more information, see\n Amazon\n VPC.

" + "smithy.api#documentation": "

Configuration parameters for a private Virtual Private Cloud (VPC) containing the\n resources you are using for your dominant language detection job. For more information, see\n Amazon\n VPC.

" } } }, @@ -3477,7 +3480,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies information about the specified endpoint.

" + "smithy.api#documentation": "

Specifies information about the specified endpoint.\n For information about endpoints, see Managing endpoints.

" } }, "com.amazonaws.comprehend#EndpointPropertiesList": { @@ -5164,7 +5167,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a list of all existing endpoints that you've created.

" + "smithy.api#documentation": "

Gets a list of all existing endpoints that you've created.\n For information about endpoints, see Managing endpoints.

" } }, "com.amazonaws.comprehend#ListEndpointsRequest": { @@ -6446,6 +6449,62 @@ { "value": "ALL", "name": "ALL" + }, + { + "value": "LICENSE_PLATE", + "name": "LICENSE_PLATE" + }, + { + "value": "VEHICLE_IDENTIFICATION_NUMBER", + "name": "VEHICLE_IDENTIFICATION_NUMBER" + }, + { + "value": "UK_NATIONAL_INSURANCE_NUMBER", + "name": "UK_NATIONAL_INSURANCE_NUMBER" + }, + { + "value": "CA_SOCIAL_INSURANCE_NUMBER", + "name": "CA_SOCIAL_INSURANCE_NUMBER" + }, + { + "value": "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", + "name": "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" + }, + { + "value": "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", + "name": "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" + }, + { + "value": "IN_PERMANENT_ACCOUNT_NUMBER", + "name": "IN_PERMANENT_ACCOUNT_NUMBER" + }, + { + "value": "IN_NREGA", + "name": "IN_NREGA" + }, + { + "value": "INTERNATIONAL_BANK_ACCOUNT_NUMBER", + "name": "INTERNATIONAL_BANK_ACCOUNT_NUMBER" + }, + { + "value": "SWIFT_CODE", + "name": "SWIFT_CODE" + }, + { + "value": "UK_NATIONAL_HEALTH_SERVICE_NUMBER", + "name": "UK_NATIONAL_HEALTH_SERVICE_NUMBER" + }, + { + "value": "CA_HEALTH_NUMBER", + "name": "CA_HEALTH_NUMBER" + }, + { + "value": "IN_AADHAAR", + "name": "IN_AADHAAR" + }, + { + "value": "IN_VOTER_NUMBER", + "name": "IN_VOTER_NUMBER" } ] } @@ -6942,7 +7001,7 @@ "VpcConfig": { "target": "com.amazonaws.comprehend#VpcConfig", "traits": { - "smithy.api#documentation": "

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing\n the resources you are using for your document classification job. For more information, see\n Amazon\n VPC.

" + "smithy.api#documentation": "

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing\n the resources you are using for your document classification job. For more information, see\n Amazon\n VPC.

" } }, "Tags": { @@ -7406,7 +7465,7 @@ "VpcConfig": { "target": "com.amazonaws.comprehend#VpcConfig", "traits": { - "smithy.api#documentation": "

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing\n the resources you are using for your key phrases detection job. For more information, see\n Amazon\n VPC.

" + "smithy.api#documentation": "

Configuration parameters for an optional private Virtual Private Cloud (VPC) containing\n the resources you are using for your key phrases detection job. For more information, see\n Amazon\n VPC.

" } }, "Tags": { @@ -7515,7 +7574,7 @@ "LanguageCode": { "target": "com.amazonaws.comprehend#LanguageCode", "traits": { - "smithy.api#documentation": "

The language of the input documents.

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

The language of the input documents. Currently, English is the only valid language.

", "smithy.api#required": {} } }, @@ -7734,7 +7793,7 @@ "LanguageCode": { "target": "com.amazonaws.comprehend#LanguageCode", "traits": { - "smithy.api#documentation": "

The language of the input documents. You can specify any of the primary languages\n supported by Amazon Comprehend. All documents must be in the same language.

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

The language of the input documents. Currently, English is the only valid language.

", "smithy.api#required": {} } }, @@ -8180,7 +8239,7 @@ } ], "traits": { - "smithy.api#documentation": "

Stops a sentiment detection job in progress.

\n

If the job state is IN_PROGRESS the job is marked for termination and put\n into the STOP_REQUESTED state. If the job completes before it can be stopped, it\n is put into the COMPLETED state; otherwise the job is be stopped and put into the\n STOPPED state.

\n

If the job is in the COMPLETED or FAILED state when you call the\n StopDominantLanguageDetectionJob operation, the operation returns a 400\n Internal Request Exception.

\n

When a job is stopped, any documents already processed are written to the output\n location.

" + "smithy.api#documentation": "

Stops a sentiment detection job in progress.

\n

If the job state is IN_PROGRESS, the job is marked for termination and put\n into the STOP_REQUESTED state. If the job completes before it can be stopped, it\n is put into the COMPLETED state; otherwise the job is be stopped and put into the\n STOPPED state.

\n

If the job is in the COMPLETED or FAILED state when you call the\n StopDominantLanguageDetectionJob operation, the operation returns a 400\n Internal Request Exception.

\n

When a job is stopped, any documents already processed are written to the output\n location.

" } }, "com.amazonaws.comprehend#StopSentimentDetectionJobRequest": { @@ -8232,7 +8291,7 @@ } ], "traits": { - "smithy.api#documentation": "

Stops a targeted sentiment detection job in progress.

\n

If the job state is IN_PROGRESS the job is marked for termination and put\n into the STOP_REQUESTED state. If the job completes before it can be stopped, it\n is put into the COMPLETED state; otherwise the job is be stopped and put into the\n STOPPED state.

\n

If the job is in the COMPLETED or FAILED state when you call the\n StopDominantLanguageDetectionJob operation, the operation returns a 400\n Internal Request Exception.

\n

When a job is stopped, any documents already processed are written to the output\n location.

" + "smithy.api#documentation": "

Stops a targeted sentiment detection job in progress.

\n

If the job state is IN_PROGRESS, the job is marked for termination and put\n into the STOP_REQUESTED state. If the job completes before it can be stopped, it\n is put into the COMPLETED state; otherwise the job is be stopped and put into the\n STOPPED state.

\n

If the job is in the COMPLETED or FAILED state when you call the\n StopDominantLanguageDetectionJob operation, the operation returns a 400\n Internal Request Exception.

\n

When a job is stopped, any documents already processed are written to the output\n location.

" } }, "com.amazonaws.comprehend#StopTargetedSentimentDetectionJobRequest": { @@ -8952,7 +9011,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates information about the specified endpoint.

" + "smithy.api#documentation": "

Updates information about the specified endpoint.\n For information about endpoints, see Managing endpoints.

" } }, "com.amazonaws.comprehend#UpdateEndpointRequest": { diff --git a/aws/sdk/aws-models/datasync.json b/aws/sdk/aws-models/datasync.json index dc4bc0a1a1f..574346b0ef6 100644 --- a/aws/sdk/aws-models/datasync.json +++ b/aws/sdk/aws-models/datasync.json @@ -267,7 +267,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an endpoint for an Amazon EFS file system.

" + "smithy.api#documentation": "

Creates an endpoint for an Amazon EFS file system that DataSync\n can access for a transfer. For more information, see Creating a location for Amazon EFS.

" } }, "com.amazonaws.datasync#CreateLocationEfsRequest": { @@ -276,27 +276,45 @@ "Subdirectory": { "target": "com.amazonaws.datasync#EfsSubdirectory", "traits": { - "smithy.api#documentation": "

A subdirectory in the location’s path. This subdirectory in the EFS file system is used\n to read data from the EFS source location or write data to the EFS destination. By default,\n DataSync uses the root directory.

\n \n

\n Subdirectory must be specified with forward slashes. For example,\n /path/to/folder.

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

Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location). By default, DataSync uses the root directory, but you can also include subdirectories.

\n \n

You must specify a value with forward slashes (for example,\n /path/to/folder).

\n
" } }, "EfsFilesystemArn": { "target": "com.amazonaws.datasync#EfsFilesystemArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the Amazon EFS file system.

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

Specifies the ARN for the Amazon EFS file system.

", "smithy.api#required": {} } }, "Ec2Config": { "target": "com.amazonaws.datasync#Ec2Config", "traits": { - "smithy.api#documentation": "

The subnet and security group that the Amazon EFS file system uses. The security group\n that you provide needs to be able to communicate with the security group on the mount target\n in the subnet specified.

\n

The exact relationship between security group M (of the mount target) and security\n group S (which you provide for DataSync to use at this stage) is as follows:

\n
    \n
  • \n

    Security group M (which you associate with the mount target) must allow inbound\n access for the Transmission Control Protocol (TCP) on the NFS port (2049) from security\n group S. You can enable inbound connections either by IP address (CIDR range) or security\n group.

    \n
  • \n
  • \n

    Security group S (provided to DataSync to access EFS) should have a rule that\n enables outbound connections to the NFS port on one of the file system’s mount targets.\n You can enable outbound connections either by IP address (CIDR range) or security\n group.

    \n \n

    For information about security groups and mount targets, see Security\n Groups for Amazon EC2 Instances and Mount Targets in the Amazon EFS User\n Guide.\n

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

Specifies the subnet and security groups DataSync uses to access your Amazon EFS file system.

", "smithy.api#required": {} } }, "Tags": { "target": "com.amazonaws.datasync#InputTagList", "traits": { - "smithy.api#documentation": "

The key-value pair that represents a tag that you want to add to the resource. The\n value can be an empty string. This value helps you manage, filter, and search for your\n resources. We recommend that you create a name tag for your location.

" + "smithy.api#documentation": "

Specifies the key-value pair that represents a tag that you want to add to the\n resource. The value can be an empty string. This value helps you manage, filter, and search\n for your resources. We recommend that you create a name tag for your location.

" + } + }, + "AccessPointArn": { + "target": "com.amazonaws.datasync#EfsAccessPointArn", + "traits": { + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

" + } + }, + "FileSystemAccessRoleArn": { + "target": "com.amazonaws.datasync#IamRoleArn", + "traits": { + "smithy.api#documentation": "

Specifies an Identity and Access Management (IAM) role that DataSync\n assumes when mounting the Amazon EFS file system.

" + } + }, + "InTransitEncryption": { + "target": "com.amazonaws.datasync#EfsInTransitEncryption", + "traits": { + "smithy.api#documentation": "

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system.

\n

If you specify an access point using AccessPointArn or an IAM\n role using FileSystemAccessRoleArn, you must set this parameter to\n TLS1_2.

" } } }, @@ -310,7 +328,7 @@ "LocationArn": { "target": "com.amazonaws.datasync#LocationArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon EFS file system location that is\n created.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon EFS file system location that you\n create.

" } } }, @@ -1313,7 +1331,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns metadata, such as the path information about an Amazon EFS location.

" + "smithy.api#documentation": "

Returns metadata about your DataSync location for an Amazon EFS file system.

" } }, "com.amazonaws.datasync#DescribeLocationEfsRequest": { @@ -1322,7 +1340,7 @@ "LocationArn": { "target": "com.amazonaws.datasync#LocationArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the EFS location to describe.

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

The Amazon Resource Name (ARN) of the Amazon EFS file system location that you want information about.

", "smithy.api#required": {} } } @@ -1337,13 +1355,13 @@ "LocationArn": { "target": "com.amazonaws.datasync#LocationArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the EFS location that was described.

" + "smithy.api#documentation": "

The ARN of the Amazon EFS file system location.

" } }, "LocationUri": { "target": "com.amazonaws.datasync#LocationUri", "traits": { - "smithy.api#documentation": "

The URL of the EFS location that was described.

" + "smithy.api#documentation": "

The URL of the Amazon EFS file system location.

" } }, "Ec2Config": { @@ -1352,7 +1370,25 @@ "CreationTime": { "target": "com.amazonaws.datasync#Time", "traits": { - "smithy.api#documentation": "

The time that the EFS location was created.

" + "smithy.api#documentation": "

The time that the location was created.

" + } + }, + "AccessPointArn": { + "target": "com.amazonaws.datasync#EfsAccessPointArn", + "traits": { + "smithy.api#documentation": "

The ARN of the access point that DataSync uses to access the Amazon EFS file system.

" + } + }, + "FileSystemAccessRoleArn": { + "target": "com.amazonaws.datasync#IamRoleArn", + "traits": { + "smithy.api#documentation": "

The Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

" + } + }, + "InTransitEncryption": { + "target": "com.amazonaws.datasync#EfsInTransitEncryption", + "traits": { + "smithy.api#documentation": "

Whether DataSync uses TLS encryption when transferring data to or from your Amazon EFS file system.

" } } }, @@ -2258,20 +2294,20 @@ "SubnetArn": { "target": "com.amazonaws.datasync#Ec2SubnetArn", "traits": { - "smithy.api#documentation": "

The ARN of the subnet that DataSync uses to access the target EFS file\n system.

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

Specifies the ARN of a subnet where DataSync creates the network interfaces for managing traffic during your transfer.

\n

The subnet must be located:

\n
    \n
  • \n

    In the same virtual private cloud (VPC) as the Amazon EFS file system.

    \n
  • \n
  • \n

    In the same Availability Zone as at least one mount target for the Amazon EFS file\n system.

    \n
  • \n
\n \n

You don't need to specify a subnet that includes a file system mount target.

\n
", "smithy.api#required": {} } }, "SecurityGroupArns": { "target": "com.amazonaws.datasync#Ec2SecurityGroupArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the security groups that are configured for the\n Amazon EC2 resource.

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

Specifies the Amazon Resource Names (ARNs) of the security groups associated with an\n Amazon EFS file system's mount target.

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

The subnet that DataSync uses to access target EFS file system. The\n subnet must have at least one mount target for that file system. The security group that you\n provide needs to be able to communicate with the security group on the mount target in the\n subnet specified.

" + "smithy.api#documentation": "

The subnet and security groups that DataSync uses to access your Amazon EFS file system.

" } }, "com.amazonaws.datasync#Ec2SecurityGroupArn": { @@ -2306,6 +2342,16 @@ "smithy.api#pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:subnet/.*$" } }, + "com.amazonaws.datasync#EfsAccessPointArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + }, + "smithy.api#pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\\-0-9]+:[0-9]{12}:access-point/fsap-[0-9a-f]{8,40}$" + } + }, "com.amazonaws.datasync#EfsFilesystemArn": { "type": "string", "traits": { @@ -2316,6 +2362,21 @@ "smithy.api#pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\\-0-9]*:[0-9]{12}:file-system/fs-.*$" } }, + "com.amazonaws.datasync#EfsInTransitEncryption": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NONE", + "name": "NONE" + }, + { + "value": "TLS1_2", + "name": "TLS1_2" + } + ] + } + }, "com.amazonaws.datasync#EfsSubdirectory": { "type": "string", "traits": { @@ -2932,6 +2993,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Agents", "pageSize": "MaxResults" } } @@ -2997,6 +3059,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Locations", "pageSize": "MaxResults" } } @@ -3068,6 +3131,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Tags", "pageSize": "MaxResults" } } @@ -3140,6 +3204,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "TaskExecutions", "pageSize": "MaxResults" } } @@ -3211,6 +3276,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Tasks", "pageSize": "MaxResults" } } diff --git a/aws/sdk/aws-models/discovery.json b/aws/sdk/aws-models/discovery.json index 176bd87a753..8330690fddb 100644 --- a/aws/sdk/aws-models/discovery.json +++ b/aws/sdk/aws-models/discovery.json @@ -31,6 +31,24 @@ "shapes": { "com.amazonaws.applicationdiscoveryservice#AWSPoseidonService_V2015_11_01": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Application Discovery Service", + "arnNamespace": "discovery", + "cloudFormationName": "ApplicationDiscoveryService", + "cloudTrailEventSource": "applicationdiscoveryservice.amazonaws.com", + "endpointPrefix": "discovery" + }, + "aws.auth#sigv4": { + "name": "discovery" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "Amazon Web Services Application Discovery Service\n\n

Amazon Web Services Application Discovery Service helps you plan application migration projects. It\n automatically identifies servers, virtual machines (VMs), and network dependencies in your\n on-premises data centers. For more information, see the Amazon Web Services Application Discovery Service FAQ. \n Application Discovery Service offers three ways of performing discovery and\n collecting data about your on-premises servers:

\n\n
    \n
  • \n

    \n Agentless discovery is recommended for environments\n that use VMware vCenter Server. This mode doesn't require you to install an agent on each\n host. It does not work in non-VMware environments.

    \n\n
      \n
    • \n

      Agentless discovery gathers server information regardless of the operating\n systems, which minimizes the time required for initial on-premises infrastructure\n assessment.

      \n
    • \n
    • \n

      Agentless discovery doesn't collect information about network dependencies, only\n agent-based discovery collects that information.

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

    \n Agent-based discovery collects a richer set of data\n than agentless discovery by using the Amazon Web Services Application Discovery Agent, which you install\n on one or more hosts in your data center.

    \n\n
      \n
    • \n

      The agent captures infrastructure and application information, including an\n inventory of running processes, system performance information, resource utilization,\n and network dependencies.

      \n
    • \n
    • \n

      The information collected by agents is secured at rest and in transit to the\n Application Discovery Service database in the cloud.

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

    \n Amazon Web Services Partner Network (APN) solutions integrate with\n Application Discovery Service, enabling you to import details of your on-premises\n environment directly into Migration Hub without using the discovery connector or discovery\n agent.

    \n\n
      \n
    • \n

      Third-party application discovery tools can query Amazon Web Services Application Discovery\n Service, and they can write to the Application Discovery Service database using the\n public API.

      \n
    • \n
    • \n

      In this way, you can import data into Migration Hub and view it, so that you can\n associate applications with servers and track migrations.

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

\n Recommendations\n

\n

We recommend that you use agent-based discovery for non-VMware environments, and\n whenever you want to collect information about network dependencies. You can run agent-based\n and agentless discovery simultaneously. Use agentless discovery to complete the initial\n infrastructure assessment quickly, and then install agents on select hosts to collect\n additional information.

\n\n

\n Working With This Guide\n

\n\n

This API reference provides descriptions, syntax, and usage examples for each of the\n actions and data types for Application Discovery Service. The topic for each action shows the\n API request parameters and the response. Alternatively, you can use one of the Amazon Web Services SDKs to\n access an API that is tailored to the programming language or platform that you're using. For\n more information, see Amazon Web Services\n SDKs.

\n\n \n
    \n
  • \n

    Remember that you must set your Migration Hub home region before you call any of\n these APIs.

    \n
  • \n
  • \n

    You must make API calls for write actions (create, notify, associate, disassociate,\n import, or put) while in your home region, or a HomeRegionNotSetException\n error is returned.

    \n
  • \n
  • \n

    API calls for read actions (list, describe, stop, and delete) are permitted outside\n of your home region.

    \n
  • \n
  • \n

    Although it is unlikely, the Migration Hub home region could change. If you call\n APIs outside the home region, an InvalidInputException is returned.

    \n
  • \n
  • \n

    You must call GetHomeRegion to obtain the latest Migration Hub home\n region.

    \n
  • \n
\n
\n\n

This guide is intended for use with the Amazon Web Services Application\n Discovery Service User Guide.

\n\n \n

All data is handled according to the Amazon Web Services \n Privacy Policy. You can operate Application Discovery Service offline to inspect\n collected data before it is shared with the service.

\n
", + "smithy.api#title": "AWS Application Discovery Service", + "smithy.api#xmlNamespace": { + "uri": "http://ec2.amazon.com/awsposiedon/V2015_11_01/" + } + }, "version": "2015-11-01", "operations": [ { @@ -108,25 +126,7 @@ { "target": "com.amazonaws.applicationdiscoveryservice#UpdateApplication" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Application Discovery Service", - "arnNamespace": "discovery", - "cloudFormationName": "ApplicationDiscoveryService", - "cloudTrailEventSource": "applicationdiscoveryservice.amazonaws.com", - "endpointPrefix": "discovery" - }, - "aws.auth#sigv4": { - "name": "discovery" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "AWS Application Discovery Service\n\n

AWS Application Discovery Service helps you plan application migration projects. It\n automatically identifies servers, virtual machines (VMs), and network dependencies in your\n on-premises data centers. For more information, see the AWS Application Discovery Service\n FAQ. Application Discovery Service offers three ways of performing discovery and\n collecting data about your on-premises servers:

\n\n
    \n
  • \n

    \n Agentless discovery is recommended for environments\n that use VMware vCenter Server. This mode doesn't require you to install an agent on each\n host. It does not work in non-VMware environments.

    \n\n
      \n
    • \n

      Agentless discovery gathers server information regardless of the operating\n systems, which minimizes the time required for initial on-premises infrastructure\n assessment.

      \n
    • \n
    • \n

      Agentless discovery doesn't collect information about network dependencies, only\n agent-based discovery collects that information.

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

    \n Agent-based discovery collects a richer set of data\n than agentless discovery by using the AWS Application Discovery Agent, which you install\n on one or more hosts in your data center.

    \n\n
      \n
    • \n

      The agent captures infrastructure and application information, including an\n inventory of running processes, system performance information, resource utilization,\n and network dependencies.

      \n
    • \n
    • \n

      The information collected by agents is secured at rest and in transit to the\n Application Discovery Service database in the cloud.

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

    \n AWS Partner Network (APN) solutions integrate with\n Application Discovery Service, enabling you to import details of your on-premises\n environment directly into Migration Hub without using the discovery connector or discovery\n agent.

    \n\n
      \n
    • \n

      Third-party application discovery tools can query AWS Application Discovery\n Service, and they can write to the Application Discovery Service database using the\n public API.

      \n
    • \n
    • \n

      In this way, you can import data into Migration Hub and view it, so that you can\n associate applications with servers and track migrations.

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

\n Recommendations\n

\n

We recommend that you use agent-based discovery for non-VMware environments, and\n whenever you want to collect information about network dependencies. You can run agent-based\n and agentless discovery simultaneously. Use agentless discovery to complete the initial\n infrastructure assessment quickly, and then install agents on select hosts to collect\n additional information.

\n\n

\n Working With This Guide\n

\n\n

This API reference provides descriptions, syntax, and usage examples for each of the\n actions and data types for Application Discovery Service. The topic for each action shows the\n API request parameters and the response. Alternatively, you can use one of the AWS SDKs to\n access an API that is tailored to the programming language or platform that you're using. For\n more information, see AWS\n SDKs.

\n\n \n
    \n
  • \n

    Remember that you must set your Migration Hub home region before you call any of\n these APIs.

    \n
  • \n
  • \n

    You must make API calls for write actions (create, notify, associate, disassociate,\n import, or put) while in your home region, or a HomeRegionNotSetException\n error is returned.

    \n
  • \n
  • \n

    API calls for read actions (list, describe, stop, and delete) are permitted outside\n of your home region.

    \n
  • \n
  • \n

    Although it is unlikely, the Migration Hub home region could change. If you call\n APIs outside the home region, an InvalidInputException is returned.

    \n
  • \n
  • \n

    You must call GetHomeRegion to obtain the latest Migration Hub home\n region.

    \n
  • \n
\n
\n\n

This guide is intended for use with the AWS Application\n Discovery Service User Guide.

\n\n \n

All data is handled according to the AWS\n Privacy Policy. You can operate Application Discovery Service offline to inspect\n collected data before it is shared with the service.

\n
", - "smithy.api#title": "AWS Application Discovery Service", - "smithy.api#xmlNamespace": { - "uri": "http://ec2.amazon.com/awsposiedon/V2015_11_01/" - } - } + ] }, "com.amazonaws.applicationdiscoveryservice#AgentConfigurationStatus": { "type": "structure", @@ -161,7 +161,14 @@ } }, "com.amazonaws.applicationdiscoveryservice#AgentId": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 20 + }, + "smithy.api#pattern": "^\\S+$" + } }, "com.amazonaws.applicationdiscoveryservice#AgentIds": { "type": "list", @@ -234,7 +241,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about agents or connectors associated with the user’s AWS account.\n Information includes agent or connector IDs, IP addresses, media access control (MAC)\n addresses, agent or connector health, hostname where the agent or connector resides, and agent\n version for each agent.

" + "smithy.api#documentation": "

Information about agents or connectors associated with the user’s Amazon Web Services account.\n Information includes agent or connector IDs, IP addresses, media access control (MAC)\n addresses, agent or connector health, hostname where the agent or connector resides, and agent\n version for each agent.

" } }, "com.amazonaws.applicationdiscoveryservice#AgentNetworkInfo": { @@ -300,8 +307,25 @@ "target": "com.amazonaws.applicationdiscoveryservice#AgentInfo" } }, + "com.amazonaws.applicationdiscoveryservice#ApplicationDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": "^(^$|[\\s\\S]*\\S[\\s\\S]*)$" + } + }, "com.amazonaws.applicationdiscoveryservice#ApplicationId": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#pattern": "^\\S+$" + } }, "com.amazonaws.applicationdiscoveryservice#ApplicationIdsList": { "type": "list", @@ -309,6 +333,16 @@ "target": "com.amazonaws.applicationdiscoveryservice#ApplicationId" } }, + "com.amazonaws.applicationdiscoveryservice#ApplicationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 127 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" + } + }, "com.amazonaws.applicationdiscoveryservice#AssociateConfigurationItemsToApplication": { "type": "operation", "input": { @@ -369,7 +403,7 @@ } }, "traits": { - "smithy.api#documentation": "

The AWS user account does not have permission to perform the action. Check the IAM\n policy associated with this account.

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

The Amazon Web Services user account does not have permission to perform the action. Check the IAM\n policy associated with this account.

", "smithy.api#error": "client", "smithy.api#httpError": 403 } @@ -400,7 +434,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes one or more import tasks, each identified by their import ID. Each import task has\n a number of records that can identify servers or applications.

\n\n

AWS Application Discovery Service has built-in matching logic that will identify when\n discovered servers match existing entries that you've previously discovered, the information\n for the already-existing discovered server is updated. When you delete an import task that\n contains records that were used to match, the information in those matched records that comes\n from the deleted records will also be deleted.

" + "smithy.api#documentation": "

Deletes one or more import tasks, each identified by their import ID. Each import task has\n a number of records that can identify servers or applications.

\n\n

Amazon Web Services Application Discovery Service has built-in matching logic that will identify when\n discovered servers match existing entries that you've previously discovered, the information\n for the already-existing discovered server is updated. When you delete an import task that\n contains records that were used to match, the information in those matched records that comes\n from the deleted records will also be deleted.

" } }, "com.amazonaws.applicationdiscoveryservice#BatchDeleteImportDataError": { @@ -499,7 +533,14 @@ } }, "com.amazonaws.applicationdiscoveryservice#Condition": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#pattern": "^\\S+$" + } }, "com.amazonaws.applicationdiscoveryservice#Configuration": { "type": "map", @@ -511,7 +552,14 @@ } }, "com.amazonaws.applicationdiscoveryservice#ConfigurationId": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#pattern": "^\\S*$" + } }, "com.amazonaws.applicationdiscoveryservice#ConfigurationIdList": { "type": "list", @@ -599,7 +647,14 @@ "type": "string" }, "com.amazonaws.applicationdiscoveryservice#ConfigurationsExportId": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#pattern": "^\\S*$" + } }, "com.amazonaws.applicationdiscoveryservice#ConflictErrorException": { "type": "structure", @@ -632,7 +687,7 @@ "statusDetail": { "target": "com.amazonaws.applicationdiscoveryservice#StringMax255", "traits": { - "smithy.api#documentation": "

Contains information about any errors that have occurred. This data type can have the\n following values:

\n\n
    \n
  • \n

    ACCESS_DENIED - You don’t have permission to start Data Exploration in Amazon\n Athena. Contact your AWS administrator for help. For more information, see Setting Up AWS Application Discovery Service in the Application Discovery\n Service User Guide.

    \n
  • \n
  • \n

    DELIVERY_STREAM_LIMIT_FAILURE - You reached the limit for Amazon Kinesis Data\n Firehose delivery streams. Reduce the number of streams or request a limit increase and\n try again. For more information, see Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer\n Guide.

    \n
  • \n
  • \n

    FIREHOSE_ROLE_MISSING - The Data Exploration feature is in an error state because\n your IAM User is missing the AWSApplicationDiscoveryServiceFirehose role. Turn on Data\n Exploration in Amazon Athena and try again. For more information, see Step 3: Provide Application Discovery Service Access to Non-Administrator Users by\n Attaching Policies in the Application Discovery Service User Guide.

    \n
  • \n
  • \n

    FIREHOSE_STREAM_DOES_NOT_EXIST - The Data Exploration feature is in an error state\n because your IAM User is missing one or more of the Kinesis data delivery\n streams.

    \n
  • \n
  • \n

    INTERNAL_FAILURE - The Data Exploration feature is in an error state because of an\n internal failure. Try again later. If this problem persists, contact AWS\n Support.

    \n
  • \n
  • \n

    S3_BUCKET_LIMIT_FAILURE - You reached the limit for Amazon S3 buckets. Reduce the\n number of Amazon S3 buckets or request a limit increase and try again. For more\n information, see Bucket\n Restrictions and Limitations in the Amazon Simple Storage Service Developer\n Guide.

    \n
  • \n
  • \n

    S3_NOT_SIGNED_UP - Your account is not signed up for the Amazon S3 service. You\n must sign up before you can use Amazon S3. You can sign up at the following URL: https://aws.amazon.com/s3.

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

Contains information about any errors that have occurred. This data type can have the\n following values:

\n\n
    \n
  • \n

    ACCESS_DENIED - You don’t have permission to start Data Exploration in Amazon\n Athena. Contact your Amazon Web Services administrator for help. For more information, see Setting Up Amazon Web Services Application Discovery Service in the Application Discovery\n Service User Guide.

    \n
  • \n
  • \n

    DELIVERY_STREAM_LIMIT_FAILURE - You reached the limit for Amazon Kinesis Data\n Firehose delivery streams. Reduce the number of streams or request a limit increase and\n try again. For more information, see Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer\n Guide.

    \n
  • \n
  • \n

    FIREHOSE_ROLE_MISSING - The Data Exploration feature is in an error state because\n your IAM User is missing the AWSApplicationDiscoveryServiceFirehose role. Turn on Data\n Exploration in Amazon Athena and try again. For more information, see Step 3: Provide Application Discovery Service Access to Non-Administrator Users by\n Attaching Policies in the Application Discovery Service User Guide.

    \n
  • \n
  • \n

    FIREHOSE_STREAM_DOES_NOT_EXIST - The Data Exploration feature is in an error state\n because your IAM User is missing one or more of the Kinesis data delivery\n streams.

    \n
  • \n
  • \n

    INTERNAL_FAILURE - The Data Exploration feature is in an error state because of an\n internal failure. Try again later. If this problem persists, contact Amazon Web Services\n Support.

    \n
  • \n
  • \n

    LAKE_FORMATION_ACCESS_DENIED - You don't have sufficient lake formation permissions\n to start continuous export. For more information, see \n Upgrading Amazon Web Services Glue Data Permissions to the Amazon Web Services Lake Formation Model in the\n Amazon Web Services Lake Formation Developer Guide.

    \n

    You can use one of the following two ways to resolve this issue.

    \n
      \n
    1. \n

      If you don’t want to use the Lake Formation permission model, you can change\n the default Data Catalog settings to use only Amazon Web Services Identity and Access Management\n (IAM) access control for new databases. For more information, see Change Data Catalog Settings in the Lake Formation\n Developer Guide.

      \n
    2. \n
    3. \n

      You can give the service-linked IAM roles\n AWSServiceRoleForApplicationDiscoveryServiceContinuousExport and\n AWSApplicationDiscoveryServiceFirehose the required Lake Formation permissions. For\n more information, see \n Granting Database Permissions in the Lake Formation\n Developer Guide.

      \n
        \n
      1. \n

        AWSServiceRoleForApplicationDiscoveryServiceContinuousExport - Grant\n database creator permissions, which gives the role database creation ability and\n implicit permissions for any created tables. For more information, see \n Implicit Lake Formation Permissions in the Lake\n Formation Developer Guide.

        \n
      2. \n
      3. \n

        AWSApplicationDiscoveryServiceFirehose - Grant describe permissions for all\n tables in the database.

        \n
      4. \n
      \n
    4. \n
    \n
  • \n
  • \n

    S3_BUCKET_LIMIT_FAILURE - You reached the limit for Amazon S3 buckets. Reduce the\n number of S3 buckets or request a limit increase and try again. For more\n information, see Bucket\n Restrictions and Limitations in the Amazon Simple Storage Service Developer\n Guide.

    \n
  • \n
  • \n

    S3_NOT_SIGNED_UP - Your account is not signed up for the Amazon S3 service. You\n must sign up before you can use Amazon S3. You can sign up at the following URL: https://aws.amazon.com/s3.

    \n
  • \n
" } }, "s3Bucket": { @@ -750,14 +805,14 @@ "type": "structure", "members": { "name": { - "target": "com.amazonaws.applicationdiscoveryservice#String", + "target": "com.amazonaws.applicationdiscoveryservice#ApplicationName", "traits": { "smithy.api#documentation": "

Name of the application to be created.

", "smithy.api#required": {} } }, "description": { - "target": "com.amazonaws.applicationdiscoveryservice#String", + "target": "com.amazonaws.applicationdiscoveryservice#ApplicationDescription", "traits": { "smithy.api#documentation": "

Description of the application to be created.

" } @@ -804,7 +859,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates one or more tags for configuration items. Tags are metadata that help you\n categorize IT assets. This API accepts a list of multiple configuration items.

" + "smithy.api#documentation": "

Creates one or more tags for configuration items. Tags are metadata that help you\n categorize IT assets. This API accepts a list of multiple configuration items.

\n\n \n

Do not store sensitive information (like personal data) in tags.

\n
" } }, "com.amazonaws.applicationdiscoveryservice#CreateTagsRequest": { @@ -944,6 +999,63 @@ "smithy.api#documentation": "

Inventory data for installed discovery connectors.

" } }, + "com.amazonaws.applicationdiscoveryservice#CustomerMeCollectorInfo": { + "type": "structure", + "members": { + "activeMeCollectors": { + "target": "com.amazonaws.applicationdiscoveryservice#Integer", + "traits": { + "smithy.api#documentation": "

\n The number of active Migration Evaluator collectors.\n

", + "smithy.api#required": {} + } + }, + "healthyMeCollectors": { + "target": "com.amazonaws.applicationdiscoveryservice#Integer", + "traits": { + "smithy.api#documentation": "

\n The number of healthy Migration Evaluator collectors.\n

", + "smithy.api#required": {} + } + }, + "denyListedMeCollectors": { + "target": "com.amazonaws.applicationdiscoveryservice#Integer", + "traits": { + "smithy.api#documentation": "

\n The number of deny-listed Migration Evaluator collectors.\n

", + "smithy.api#required": {} + } + }, + "shutdownMeCollectors": { + "target": "com.amazonaws.applicationdiscoveryservice#Integer", + "traits": { + "smithy.api#documentation": "

\n The number of Migration Evaluator collectors with SHUTDOWN status.\n

", + "smithy.api#required": {} + } + }, + "unhealthyMeCollectors": { + "target": "com.amazonaws.applicationdiscoveryservice#Integer", + "traits": { + "smithy.api#documentation": "

\n The number of unhealthy Migration Evaluator collectors.\n

", + "smithy.api#required": {} + } + }, + "totalMeCollectors": { + "target": "com.amazonaws.applicationdiscoveryservice#Integer", + "traits": { + "smithy.api#documentation": "

\n The total number of Migration Evaluator collectors.\n

", + "smithy.api#required": {} + } + }, + "unknownMeCollectors": { + "target": "com.amazonaws.applicationdiscoveryservice#Integer", + "traits": { + "smithy.api#documentation": "

\n The number of unknown Migration Evaluator collectors.\n

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

\n The inventory data for installed Migration Evaluator collectors.\n

" + } + }, "com.amazonaws.applicationdiscoveryservice#DataSource": { "type": "string", "traits": { @@ -1098,7 +1210,7 @@ "agentIds": { "target": "com.amazonaws.applicationdiscoveryservice#AgentIds", "traits": { - "smithy.api#documentation": "

The agent or the Connector IDs for which you want information. If you specify no IDs,\n the system returns information about all agents/Connectors associated with your AWS user\n account.

" + "smithy.api#documentation": "

The agent or the Connector IDs for which you want information. If you specify no IDs,\n the system returns information about all agents/Connectors associated with your Amazon Web Services user\n account.

" } }, "filters": { @@ -1164,7 +1276,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves attributes for a list of configuration item IDs.

\n\n \n

All of the supplied IDs must be for the same asset type from one of the\n following:

\n
    \n
  • \n

    server

    \n
  • \n
  • \n

    application

    \n
  • \n
  • \n

    process

    \n
  • \n
  • \n

    connection

    \n
  • \n
\n\n

Output fields are specific to the asset type specified. For example, the output for a\n server configuration item includes a list of attributes about the\n server, such as host name, operating system, number of network cards, etc.

\n

For a complete list of outputs for each asset type, see Using the DescribeConfigurations Action in the AWS Application\n Discovery Service User Guide.

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

Retrieves attributes for a list of configuration item IDs.

\n\n \n

All of the supplied IDs must be for the same asset type from one of the\n following:

\n
    \n
  • \n

    server

    \n
  • \n
  • \n

    application

    \n
  • \n
  • \n

    process

    \n
  • \n
  • \n

    connection

    \n
  • \n
\n\n

Output fields are specific to the asset type specified. For example, the output for a\n server configuration item includes a list of attributes about the\n server, such as host name, operating system, number of network cards, etc.

\n

For a complete list of outputs for each asset type, see Using the DescribeConfigurations Action in the Amazon Web Services Application\n Discovery Service User Guide.

\n
" } }, "com.amazonaws.applicationdiscoveryservice#DescribeConfigurationsAttribute": { @@ -1325,7 +1437,7 @@ ], "traits": { "smithy.api#deprecated": {}, - "smithy.api#documentation": "

\n DescribeExportConfigurations is deprecated. Use DescribeImportTasks, instead.

" + "smithy.api#documentation": "

\n DescribeExportConfigurations is deprecated. Use DescribeExportTasks, instead.

" } }, "com.amazonaws.applicationdiscoveryservice#DescribeExportConfigurationsRequest": { @@ -1725,14 +1837,14 @@ "name": { "target": "com.amazonaws.applicationdiscoveryservice#FilterName", "traits": { - "smithy.api#documentation": "

A single ExportFilter name. Supported filters:\n agentId.

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

A single ExportFilter name. Supported filters:\n agentIds.

", "smithy.api#required": {} } }, "values": { "target": "com.amazonaws.applicationdiscoveryservice#FilterValues", "traits": { - "smithy.api#documentation": "

A single agentId for a Discovery Agent. An agentId can be\n found using the DescribeAgents action. Typically an ADS agentId is in the form\n o-0123456789abcdef0.

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

A single agent ID for a Discovery Agent. An agent ID can be found using the DescribeAgents action. Typically an ADS agent ID is in the form\n o-0123456789abcdef0.

", "smithy.api#required": {} } }, @@ -1877,14 +1989,28 @@ } }, "traits": { - "smithy.api#documentation": "

A filter that can use conditional operators.

\n

For more information about filters, see Querying Discovered\n Configuration Items in the AWS Application Discovery Service User\n Guide.

" + "smithy.api#documentation": "

A filter that can use conditional operators.

\n

For more information about filters, see Querying Discovered\n Configuration Items in the Amazon Web Services Application Discovery Service User\n Guide.

" } }, "com.amazonaws.applicationdiscoveryservice#FilterName": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" + } }, "com.amazonaws.applicationdiscoveryservice#FilterValue": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": "^(^$|[\\s\\S]*\\S[\\s\\S]*)$" + } }, "com.amazonaws.applicationdiscoveryservice#FilterValues": { "type": "list", @@ -1972,6 +2098,12 @@ "traits": { "smithy.api#documentation": "

Details about discovered connectors, including connector status and health.

" } + }, + "meCollectorSummary": { + "target": "com.amazonaws.applicationdiscoveryservice#CustomerMeCollectorInfo", + "traits": { + "smithy.api#documentation": "

\n Details about Migration Evaluator collectors, including collector status and health.\n

" + } } } }, @@ -2045,7 +2177,7 @@ "importTaskId": { "target": "com.amazonaws.applicationdiscoveryservice#ImportTaskIdentifier", "traits": { - "smithy.api#documentation": "

The unique ID for a specific import task. These IDs aren't globally unique, but they are\n unique within an AWS account.

" + "smithy.api#documentation": "

The unique ID for a specific import task. These IDs aren't globally unique, but they are\n unique within an Amazon Web Services account.

" } }, "clientRequestToken": { @@ -2186,7 +2318,14 @@ } }, "com.amazonaws.applicationdiscoveryservice#ImportTaskIdentifier": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#pattern": "^\\S*$" + } }, "com.amazonaws.applicationdiscoveryservice#ImportTaskList": { "type": "list", @@ -2200,7 +2339,8 @@ "smithy.api#length": { "min": 1, "max": 100 - } + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" } }, "com.amazonaws.applicationdiscoveryservice#ImportURL": { @@ -2209,7 +2349,8 @@ "smithy.api#length": { "min": 1, "max": 4000 - } + }, + "smithy.api#pattern": "^\\S+:\\/\\/\\S+\\/[\\s\\S]*\\S[\\s\\S]*$" } }, "com.amazonaws.applicationdiscoveryservice#Integer": { @@ -2286,7 +2427,7 @@ "filters": { "target": "com.amazonaws.applicationdiscoveryservice#Filters", "traits": { - "smithy.api#documentation": "

You can filter the request using various logical operators and a\n key-value format. For example:

\n

\n {\"key\": \"serverType\", \"value\": \"webServer\"}\n

\n

For a complete list of filter options and guidance about using them with this action,\n see Using the ListConfigurations Action in the AWS Application Discovery\n Service User Guide.

" + "smithy.api#documentation": "

You can filter the request using various logical operators and a\n key-value format. For example:

\n

\n {\"key\": \"serverType\", \"value\": \"webServer\"}\n

\n

For a complete list of filter options and guidance about using them with this action,\n see Using the ListConfigurations Action in the Amazon Web Services Application Discovery\n Service User Guide.

" } }, "maxResults": { @@ -2304,7 +2445,7 @@ "orderBy": { "target": "com.amazonaws.applicationdiscoveryservice#OrderByList", "traits": { - "smithy.api#documentation": "

Certain filter criteria return output that can be sorted in ascending or descending\n order. For a list of output characteristics for each filter, see Using the ListConfigurations Action in the AWS Application Discovery\n Service User Guide.

" + "smithy.api#documentation": "

Certain filter criteria return output that can be sorted in ascending or descending\n order. For a list of output characteristics for each filter, see Using the ListConfigurations Action in the Amazon Web Services Application Discovery\n Service User Guide.

" } } } @@ -2488,7 +2629,7 @@ "type": "structure", "members": { "fieldName": { - "target": "com.amazonaws.applicationdiscoveryservice#String", + "target": "com.amazonaws.applicationdiscoveryservice#OrderByElementFieldName", "traits": { "smithy.api#documentation": "

The field on which to order.

", "smithy.api#required": {} @@ -2505,6 +2646,16 @@ "smithy.api#documentation": "

A field and direction for ordered output.

" } }, + "com.amazonaws.applicationdiscoveryservice#OrderByElementFieldName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" + } + }, "com.amazonaws.applicationdiscoveryservice#OrderByList": { "type": "list", "member": { @@ -2677,7 +2828,7 @@ "agentIds": { "target": "com.amazonaws.applicationdiscoveryservice#AgentIds", "traits": { - "smithy.api#documentation": "

The IDs of the agents or connectors from which to start collecting data. If you send a\n request to an agent/connector ID that you do not have permission to contact, according to your\n AWS account, the service does not throw an exception. Instead, it returns the error in the\n Description field. If you send a request to multiple agents/connectors\n and you do not have permission to contact some of those agents/connectors, the system does not\n throw an exception. Instead, the system shows Failed in the\n Description field.

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

The IDs of the agents or connectors from which to start collecting data. If you send a\n request to an agent/connector ID that you do not have permission to contact, according to your\n Amazon Web Services account, the service does not throw an exception. Instead, it returns the error in the\n Description field. If you send a request to multiple agents/connectors\n and you do not have permission to contact some of those agents/connectors, the system does not\n throw an exception. Instead, the system shows Failed in the\n Description field.

", "smithy.api#required": {} } } @@ -2723,7 +2874,7 @@ } ], "traits": { - "smithy.api#documentation": "

Begins the export of discovered data to an S3 bucket.

\n

If you specify agentIds in a filter, the task exports up to 72 hours of\n detailed data collected by the identified Application Discovery Agent, including network,\n process, and performance details. A time range for exported agent data may be set by using\n startTime and endTime. Export of detailed agent data is limited to\n five concurrently running exports.

\n

If you do not include an agentIds filter, summary data is exported that\n includes both AWS Agentless Discovery Connector data and summary data from AWS Discovery\n Agents. Export of summary data is limited to two exports per day.

" + "smithy.api#documentation": "

Begins the export of discovered data to an S3 bucket.

\n

If you specify agentIds in a filter, the task exports up to 72 hours of\n detailed data collected by the identified Application Discovery Agent, including network,\n process, and performance details. A time range for exported agent data may be set by using\n startTime and endTime. Export of detailed agent data is limited to\n five concurrently running exports.

\n

If you do not include an agentIds filter, summary data is exported that\n includes both Amazon Web Services Agentless Discovery Connector data and summary data from Amazon Web Services Discovery\n Agents. Export of summary data is limited to two exports per day.

" } }, "com.amazonaws.applicationdiscoveryservice#StartExportTaskRequest": { @@ -2795,7 +2946,7 @@ } ], "traits": { - "smithy.api#documentation": "

Starts an import task, which allows you to import details of your on-premises environment\n directly into AWS Migration Hub without having to use the Application Discovery Service (ADS)\n tools such as the Discovery Connector or Discovery Agent. This gives you the option to perform\n migration assessment and planning directly from your imported data, including the ability to\n group your devices as applications and track their migration status.

\n\n

To start an import request, do this:

\n\n
    \n
  1. \n

    Download the specially formatted comma separated value (CSV) import template, which\n you can find here: https://s3-us-west-2.amazonaws.com/templates-7cffcf56-bd96-4b1c-b45b-a5b42f282e46/import_template.csv.

    \n
  2. \n
  3. \n

    Fill out the template with your server and application data.

    \n
  4. \n
  5. \n

    Upload your import file to an Amazon S3 bucket, and make a note of it's Object URL.\n Your import file must be in the CSV format.

    \n
  6. \n
  7. \n

    Use the console or the StartImportTask command with the AWS CLI or one of\n the AWS SDKs to import the records from your file.

    \n
  8. \n
\n\n

For more information, including step-by-step procedures, see Migration Hub\n Import in the AWS Application Discovery Service User\n Guide.

\n\n \n

There are limits to the number of import tasks you can create (and delete) in an AWS\n account. For more information, see AWS Application\n Discovery Service Limits in the AWS Application Discovery Service User\n Guide.

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

Starts an import task, which allows you to import details of your on-premises environment\n directly into Amazon Web Services Migration Hub without having to use the Application Discovery Service (ADS)\n tools such as the Discovery Connector or Discovery Agent. This gives you the option to perform\n migration assessment and planning directly from your imported data, including the ability to\n group your devices as applications and track their migration status.

\n\n

To start an import request, do this:

\n\n
    \n
  1. \n

    Download the specially formatted comma separated value (CSV) import template, which\n you can find here: https://s3.us-west-2.amazonaws.com/templates-7cffcf56-bd96-4b1c-b45b-a5b42f282e46/import_template.csv.

    \n
  2. \n
  3. \n

    Fill out the template with your server and application data.

    \n
  4. \n
  5. \n

    Upload your import file to an Amazon S3 bucket, and make a note of it's Object URL.\n Your import file must be in the CSV format.

    \n
  6. \n
  7. \n

    Use the console or the StartImportTask command with the Amazon Web Services CLI or one of\n the Amazon Web Services SDKs to import the records from your file.

    \n
  8. \n
\n\n

For more information, including step-by-step procedures, see Migration Hub\n Import in the Amazon Web Services Application Discovery Service User\n Guide.

\n\n \n

There are limits to the number of import tasks you can create (and delete) in an Amazon Web Services\n account. For more information, see Amazon Web Services Application\n Discovery Service Limits in the Amazon Web Services Application Discovery Service User\n Guide.

\n
" } }, "com.amazonaws.applicationdiscoveryservice#StartImportTaskRequest": { @@ -2818,7 +2969,7 @@ "importUrl": { "target": "com.amazonaws.applicationdiscoveryservice#ImportURL", "traits": { - "smithy.api#documentation": "

The URL for your import file that you've uploaded to Amazon S3.

\n\n \n

If you're using the AWS CLI, this URL is structured as follows:\n s3://BucketName/ImportFileName.CSV\n

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

The URL for your import file that you've uploaded to Amazon S3.

\n\n \n

If you're using the Amazon Web Services CLI, this URL is structured as follows:\n s3://BucketName/ImportFileName.CSV\n

\n
", "smithy.api#required": {} } } @@ -2955,7 +3106,14 @@ } }, "com.amazonaws.applicationdiscoveryservice#String": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10000 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } }, "com.amazonaws.applicationdiscoveryservice#StringMax255": { "type": "string", @@ -2963,7 +3121,8 @@ "smithy.api#length": { "min": 1, "max": 255 - } + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" } }, "com.amazonaws.applicationdiscoveryservice#Tag": { @@ -2985,7 +3144,7 @@ } }, "traits": { - "smithy.api#documentation": "

Metadata that help you categorize IT assets.

" + "smithy.api#documentation": "

Metadata that help you categorize IT assets.

\n \n

Do not store sensitive information (like personal data) in tags.

\n
" } }, "com.amazonaws.applicationdiscoveryservice#TagFilter": { @@ -3086,13 +3245,13 @@ } }, "name": { - "target": "com.amazonaws.applicationdiscoveryservice#String", + "target": "com.amazonaws.applicationdiscoveryservice#ApplicationName", "traits": { "smithy.api#documentation": "

New name of the application to be updated.

" } }, "description": { - "target": "com.amazonaws.applicationdiscoveryservice#String", + "target": "com.amazonaws.applicationdiscoveryservice#ApplicationDescription", "traits": { "smithy.api#documentation": "

New description of the application to be updated.

" } diff --git a/aws/sdk/aws-models/ec2.json b/aws/sdk/aws-models/ec2.json index a3906537105..3ba777c8494 100644 --- a/aws/sdk/aws-models/ec2.json +++ b/aws/sdk/aws-models/ec2.json @@ -11811,7 +11811,7 @@ "target": "com.amazonaws.ec2#CreateLaunchTemplateResult" }, "traits": { - "smithy.api#documentation": "

Creates a launch template.

\n

A launch template contains the parameters to launch an\n instance. When you launch an instance using RunInstances, you can\n specify a launch template instead of providing the launch parameters in the request. For\n more information, see Launching an instance from a\n launch template in the Amazon Elastic Compute Cloud User Guide.

\n

If you want to clone an existing launch template as the basis for creating a new\n launch template, you can use the Amazon EC2 console. The API, SDKs, and CLI do not support\n cloning a template. For more information, see Create a launch template from an existing launch template in the\n Amazon Elastic Compute Cloud User Guide.

" + "smithy.api#documentation": "

Creates a launch template.

\n

A launch template contains the parameters to launch an\n instance. When you launch an instance using RunInstances, you can\n specify a launch template instead of providing the launch parameters in the request. For\n more information, see Launch an instance from a\n launch template in the Amazon Elastic Compute Cloud User Guide.

\n

If you want to clone an existing launch template as the basis for creating a new\n launch template, you can use the Amazon EC2 console. The API, SDKs, and CLI do not support\n cloning a template. For more information, see Create a launch template from an existing launch template in the\n Amazon Elastic Compute Cloud User Guide.

" } }, "com.amazonaws.ec2#CreateLaunchTemplateRequest": { @@ -11826,7 +11826,7 @@ "ClientToken": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "

Unique, case-sensitive identifier you provide to ensure the idempotency of the\n request. For more information, see Ensuring\n Idempotency.

\n

Constraint: Maximum 128 ASCII characters.

" + "smithy.api#documentation": "

Unique, case-sensitive identifier you provide to ensure the idempotency of the\n request. For more information, see Ensuring\n idempotency.

\n

Constraint: Maximum 128 ASCII characters.

" } }, "LaunchTemplateName": { @@ -11888,7 +11888,7 @@ "target": "com.amazonaws.ec2#CreateLaunchTemplateVersionResult" }, "traits": { - "smithy.api#documentation": "

Creates a new version for a launch template. You can specify an existing version of\n launch template from which to base the new version.

\n

Launch template versions are numbered in the order in which they are created. You\n cannot specify, change, or replace the numbering of launch template versions.

\n

For more information, see Managing launch template versionsin the\n Amazon Elastic Compute Cloud User Guide.

" + "smithy.api#documentation": "

Creates a new version for a launch template. You can specify an existing version of\n launch template from which to base the new version.

\n

Launch template versions are numbered in the order in which they are created. You\n cannot specify, change, or replace the numbering of launch template versions.

\n

Launch templates are immutable; after you create a launch template, you can't modify it. \n Instead, you can create a new version of the launch template that includes any changes you require.

\n

For more information, see Modify a launch template (manage launch template versions)in the\n Amazon Elastic Compute Cloud User Guide.

" } }, "com.amazonaws.ec2#CreateLaunchTemplateVersionRequest": { @@ -11903,7 +11903,7 @@ "ClientToken": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "

Unique, case-sensitive identifier you provide to ensure the idempotency of the\n request. For more information, see Ensuring\n Idempotency.

\n

Constraint: Maximum 128 ASCII characters.

" + "smithy.api#documentation": "

Unique, case-sensitive identifier you provide to ensure the idempotency of the\n request. For more information, see Ensuring\n idempotency.

\n

Constraint: Maximum 128 ASCII characters.

" } }, "LaunchTemplateId": { @@ -14089,7 +14089,7 @@ "target": "com.amazonaws.ec2#CreateTrafficMirrorTargetResult" }, "traits": { - "smithy.api#documentation": "

Creates a target for your Traffic Mirror session.

\n

A Traffic Mirror target is the destination for mirrored traffic. The Traffic Mirror source and\n the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in\n different VPCs connected via VPC peering or a transit gateway.

\n

A Traffic Mirror target can be a network interface, or a Network Load Balancer.

\n

To use the target in a Traffic Mirror session, use CreateTrafficMirrorSession.

" + "smithy.api#documentation": "

Creates a target for your Traffic Mirror session.

\n

A Traffic Mirror target is the destination for mirrored traffic. The Traffic Mirror source and\n the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in\n different VPCs connected via VPC peering or a transit gateway.

\n

A Traffic Mirror target can be a network interface, a Network Load Balancer, or a Gateway Load Balancer endpoint.

\n

To use the target in a Traffic Mirror session, use CreateTrafficMirrorSession.

" } }, "com.amazonaws.ec2#CreateTrafficMirrorTargetRequest": { @@ -14132,6 +14132,12 @@ "smithy.api#documentation": "

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

", "smithy.api#idempotencyToken": {} } + }, + "GatewayLoadBalancerEndpointId": { + "target": "com.amazonaws.ec2#VpcEndpointId", + "traits": { + "smithy.api#documentation": "

The ID of the Gateway Load Balancer endpoint.

" + } } } }, @@ -43197,6 +43203,14 @@ "smithy.api#documentation": "

The user data.

", "smithy.api#xmlName": "userData" } + }, + "DisableApiStop": { + "target": "com.amazonaws.ec2#AttributeBooleanValue", + "traits": { + "aws.protocols#ec2QueryName": "DisableApiStop", + "smithy.api#documentation": "

To enable the instance for Amazon Web Services Stop Protection, set this parameter to\n true; otherwise, set it to false.

", + "smithy.api#xmlName": "disableApiStop" + } } }, "traits": { @@ -43266,6 +43280,10 @@ { "value": "enclaveOptions", "name": "enclaveOptions" + }, + { + "value": "disableApiStop", + "name": "disableApiStop" } ] } @@ -47632,6 +47650,50 @@ { "value": "i4i.32xlarge", "name": "i4i_32xlarge" + }, + { + "value": "i4i.metal", + "name": "i4i_metal" + }, + { + "value": "x2idn.metal", + "name": "x2idn_metal" + }, + { + "value": "x2iedn.metal", + "name": "x2iedn_metal" + }, + { + "value": "c7g.medium", + "name": "c7g_medium" + }, + { + "value": "c7g.large", + "name": "c7g_large" + }, + { + "value": "c7g.xlarge", + "name": "c7g_xlarge" + }, + { + "value": "c7g.2xlarge", + "name": "c7g_2xlarge" + }, + { + "value": "c7g.4xlarge", + "name": "c7g_4xlarge" + }, + { + "value": "c7g.8xlarge", + "name": "c7g_8xlarge" + }, + { + "value": "c7g.12xlarge", + "name": "c7g_12xlarge" + }, + { + "value": "c7g.16xlarge", + "name": "c7g_16xlarge" } ] } @@ -50874,7 +50936,7 @@ } }, "traits": { - "smithy.api#documentation": "

Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more\n information, see What is Amazon Web Services Nitro Enclaves?\n in the Amazon Web Services Nitro Enclaves User Guide.

" + "smithy.api#documentation": "

Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more\n information, see What is Amazon Web Services Nitro Enclaves?\n in the Amazon Web Services Nitro Enclaves User Guide.

" } }, "com.amazonaws.ec2#LaunchTemplateErrorCode": { @@ -50935,7 +50997,7 @@ } }, "traits": { - "smithy.api#documentation": "

Indicates whether the instance is configured for hibernation. This parameter is valid\n only if the instance meets the hibernation\n prerequisites.

" + "smithy.api#documentation": "

Indicates whether the instance is configured for hibernation. This parameter is valid\n only if the instance meets the hibernation\n prerequisites.

" } }, "com.amazonaws.ec2#LaunchTemplateHttpTokensState": { @@ -54534,6 +54596,12 @@ "smithy.api#documentation": "

A new value for the attribute. Use only with the kernel,\n ramdisk, userData, disableApiTermination, or\n instanceInitiatedShutdownBehavior attribute.

", "smithy.api#xmlName": "value" } + }, + "DisableApiStop": { + "target": "com.amazonaws.ec2#AttributeBooleanValue", + "traits": { + "smithy.api#documentation": "

Indicates whether an instance is enabled for stop protection. \n For more information, see Stop Protection.

\n

" + } } } }, @@ -55287,7 +55355,7 @@ "ClientToken": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "

Unique, case-sensitive identifier you provide to ensure the idempotency of the\n request. For more information, see Ensuring\n Idempotency.

\n

Constraint: Maximum 128 ASCII characters.

" + "smithy.api#documentation": "

Unique, case-sensitive identifier you provide to ensure the idempotency of the\n request. For more information, see Ensuring\n idempotency.

\n

Constraint: Maximum 128 ASCII characters.

" } }, "LaunchTemplateId": { @@ -64265,7 +64333,7 @@ "KernelId": { "target": "com.amazonaws.ec2#KernelId", "traits": { - "smithy.api#documentation": "

The ID of the kernel.

\n \n

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more\n information, see User Provided\n Kernels in the Amazon Elastic Compute Cloud User\n Guide.

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

The ID of the kernel.

\n \n

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more\n information, see User provided\n kernels in the Amazon Elastic Compute Cloud User Guide.

\n
" } }, "EbsOptimized": { @@ -64303,7 +64371,7 @@ "InstanceType": { "target": "com.amazonaws.ec2#InstanceType", "traits": { - "smithy.api#documentation": "

The instance type. For more information, see Instance Types in the\n Amazon Elastic Compute Cloud User Guide.

\n

If you specify InstanceTypes, you can't specify\n InstanceRequirements.

" + "smithy.api#documentation": "

The instance type. For more information, see Instance types in the\n Amazon Elastic Compute Cloud User Guide.

\n

If you specify InstanceTypes, you can't specify\n InstanceRequirements.

" } }, "KeyName": { @@ -64327,7 +64395,7 @@ "RamDiskId": { "target": "com.amazonaws.ec2#RamdiskId", "traits": { - "smithy.api#documentation": "

The ID of the RAM disk.

\n \n

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more\n information, see User Provided\n Kernels in the Amazon Elastic Compute Cloud User\n Guide.

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

The ID of the RAM disk.

\n \n

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more\n information, see User provided\n kernels in the Amazon Elastic Compute Cloud User Guide.

\n
" } }, "DisableApiTermination": { @@ -64345,7 +64413,7 @@ "UserData": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "

The user data to make available to the instance. You must provide base64-encoded text.\n User data is limited to 16 KB. For more information, see Running Commands on Your Linux Instance\n at Launch (Linux) or Adding User Data (Windows).

\n\n

If you are creating the launch template for use with Batch, the user\n data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the Batch User Guide.

" + "smithy.api#documentation": "

The user data to make available to the instance. You must provide base64-encoded text.\n User data is limited to 16 KB. For more information, see Run commands on your Linux instance\n at launch (Linux) or Work with instance user data (Windows) in the Amazon Elastic Compute Cloud User Guide.

\n\n

If you are creating the launch template for use with Batch, the user\n data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the Batch User Guide.

" } }, "TagSpecifications": { @@ -64417,7 +64485,7 @@ "HibernationOptions": { "target": "com.amazonaws.ec2#LaunchTemplateHibernationOptionsRequest", "traits": { - "smithy.api#documentation": "

Indicates whether an instance is enabled for hibernation. This parameter is valid only\n if the instance meets the hibernation\n prerequisites. For more information, see Hibernate your instance in the\n Amazon Elastic Compute Cloud User Guide.

" + "smithy.api#documentation": "

Indicates whether an instance is enabled for hibernation. This parameter is valid only\n if the instance meets the hibernation\n prerequisites. For more information, see Hibernate your instance in the\n Amazon Elastic Compute Cloud User Guide.

" } }, "MetadataOptions": { @@ -64449,6 +64517,12 @@ "traits": { "smithy.api#documentation": "

The maintenance options for the instance.

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

Indicates whether to enable the instance for stop protection. For more information,\n see Stop\n Protection.

" + } } }, "traits": { @@ -66653,6 +66727,14 @@ "smithy.api#documentation": "

The maintenance options for your instance.

", "smithy.api#xmlName": "maintenanceOptions" } + }, + "DisableApiStop": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "DisableApiStop", + "smithy.api#documentation": "

Indicates whether the instance is enabled for stop protection. \n For more information, see Stop Protection.

", + "smithy.api#xmlName": "disableApiStop" + } } }, "traits": { @@ -68034,6 +68116,12 @@ "traits": { "smithy.api#documentation": "

The maintenance and recovery options for the instance.

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

Indicates whether an instance is enabled for stop protection. For more information,\n see Stop\n Protection.\n

" + } } } }, @@ -74446,6 +74534,14 @@ "smithy.api#documentation": "

The tags assigned to the Traffic Mirror target.

", "smithy.api#xmlName": "tagSet" } + }, + "GatewayLoadBalancerEndpointId": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "GatewayLoadBalancerEndpointId", + "smithy.api#documentation": "

The ID of the Gateway Load Balancer endpoint.

", + "smithy.api#xmlName": "gatewayLoadBalancerEndpointId" + } } }, "traits": { @@ -74484,6 +74580,10 @@ { "value": "network-load-balancer", "name": "network_load_balancer" + }, + { + "value": "gateway-load-balancer-endpoint", + "name": "gateway_load_balancer_endpoint" } ] } @@ -77801,7 +77901,7 @@ "target": "com.amazonaws.ec2#String", "traits": { "aws.protocols#ec2QueryName": "Code", - "smithy.api#documentation": "

The error code that indicates why the parameter or parameter combination is not valid.\n For more information about error codes, see Error\n Codes.

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

The error code that indicates why the parameter or parameter combination is not valid.\n For more information about error codes, see Error\n codes.

", "smithy.api#xmlName": "code" } }, @@ -77809,7 +77909,7 @@ "target": "com.amazonaws.ec2#String", "traits": { "aws.protocols#ec2QueryName": "Message", - "smithy.api#documentation": "

The error message that describes why the parameter or parameter combination is not\n valid. For more information about error messages, see Error\n Codes.

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

The error message that describes why the parameter or parameter combination is not\n valid. For more information about error messages, see Error\n codes.

", "smithy.api#xmlName": "message" } } diff --git a/aws/sdk/aws-models/elasticache.json b/aws/sdk/aws-models/elasticache.json index 0d34cdf7178..fee4e6ef348 100644 --- a/aws/sdk/aws-models/elasticache.json +++ b/aws/sdk/aws-models/elasticache.json @@ -727,7 +727,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "

The name of the compute and memory capacity node type for the cluster.

\n \n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\n\t\t\t\t\t \n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

The name of the compute and memory capacity node type for the cluster.

\n \n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\n\t\t\t\t\t \n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "Engine": { @@ -1083,7 +1083,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents an individual cache node within a cluster. Each cache node runs its own\n instance of the cluster's protocol-compliant caching software - either Memcached or\n Redis.

\n\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\t\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

Represents an individual cache node within a cluster. Each cache node runs its own\n instance of the cluster's protocol-compliant caching software - either Memcached or\n Redis.

\n\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\t\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "com.amazonaws.elasticache#CacheNodeIdsList": { @@ -2081,7 +2081,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "

The compute and memory capacity of the nodes in the node group (shard).

\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n \t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t \n\t\t\t\t\t \tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

The compute and memory capacity of the nodes in the node group (shard).

\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n \t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t \n\t\t\t\t\t \tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "Engine": { @@ -2203,6 +2203,12 @@ "traits": { "smithy.api#documentation": "

Specifies the destination, format and type of the logs.

" } + }, + "TransitEncryptionEnabled": { + "target": "com.amazonaws.elasticache#BooleanOptional", + "traits": { + "smithy.api#documentation": "

A flag that enables in-transit encryption when set to true.\n \n You cannot modify the value of TransitEncryptionEnabled after the cluster is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled to true when you create a cluster.

\n \n

\n Required:\n Only available when creating a cache cluster in an Amazon VPC using Memcached version 1.6.12 or later.

" + } } }, "traits": { @@ -2639,7 +2645,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "

The compute and memory capacity of the nodes in the node group (shard).

\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t\tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\t\n\t\t\t\t\t \n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward): \n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\n\t\t\t\t\t \t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

The compute and memory capacity of the nodes in the node group (shard).

\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t\tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\t\n\t\t\t\t\t \n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward): \n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\n\t\t\t\t\t \t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "Engine": { @@ -4571,7 +4577,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "

The cache node type filter value. \n Use this parameter to show only those reservations matching the specified cache node type.

\n \n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\n\t\t\t\t\t\t\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

The cache node type filter value. \n Use this parameter to show only those reservations matching the specified cache node type.

\n \n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\n\t\t\t\t\t\t\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "Duration": { @@ -4650,7 +4656,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "

The cache node type filter value. \n Use this parameter to show only the available offerings matching the specified cache node type.

\n\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward)\tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\n\t\t\t\t\t \t\t\t \t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

The cache node type filter value. \n Use this parameter to show only the available offerings matching the specified cache node type.

\n\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward)\tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\n\t\t\t\t\t \t\t\t \t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "Duration": { @@ -8724,7 +8730,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "

The cache node type for the reserved cache nodes.

\n \n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n\t\t\t\t\t \n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n \t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\t\n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

The cache node type for the reserved cache nodes.

\n \n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n\t\t\t\t\t \n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n \t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\t\n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "StartTime": { @@ -8884,7 +8890,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "

The cache node type for the reserved cache node.

\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

The cache node type for the reserved cache node.

\n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t\t cache.r6g.large,\n\t\t\t\t\t\t\tcache.r6g.xlarge,\n\t\t\t\t\t\t\tcache.r6g.2xlarge,\n\t\t\t\t\t\t\tcache.r6g.4xlarge,\n\t\t\t\t\t\t\tcache.r6g.8xlarge,\n\t\t\t\t\t\t\tcache.r6g.12xlarge,\n\t\t\t\t\t\t\tcache.r6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

      \t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "Duration": { @@ -9454,7 +9460,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "

The name of the compute and memory capacity node type for the source cluster.

\n \n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \t\n cache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t

      \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t \n\t\t \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t cache.r6g.large,\n\t\t cache.r6g.xlarge,\n\t\t cache.r6g.2xlarge,\n\t\t cache.r6g.4xlarge,\n\t\t cache.r6g.8xlarge,\n\t\t cache.r6g.12xlarge,\n\t\t cache.r6g.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

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

The name of the compute and memory capacity node type for the source cluster.

\n \n

The following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.

\n\t\t
    \n
  • \n

    General purpose:

    \n\t\t\t\t
      \n
    • \n

      Current generation:

      \n\t\t\t\t\t \n\t\t\t\t\t

      \n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \t\n cache.m6g.large,\n\t\t\t\t\t\t\tcache.m6g.xlarge,\n\t\t\t\t\t\t\tcache.m6g.2xlarge,\n\t\t\t\t\t\t\tcache.m6g.4xlarge,\n\t\t\t\t\t\t\tcache.m6g.8xlarge,\n\t\t\t\t\t\t\tcache.m6g.12xlarge,\n\t\t\t\t\t\t\tcache.m6g.16xlarge\n\t\t\t\t\t\t\t\n\t\t\t\t\t

      \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t

      \n M5 node types:\n \t\t\t\t\t\t cache.m5.large,\n \t\t\t\t\t\tcache.m5.xlarge,\n \t\t\t\t\t\tcache.m5.2xlarge,\n \t\t\t\t\t\tcache.m5.4xlarge,\n \t\t\t\t\t\tcache.m5.12xlarge,\n \t\t\t\t\t\tcache.m5.24xlarge\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \t\n \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

      \n M4 node types:\n \t\t\t\t\t\t cache.m4.large,\n \t\t\t\t\t\tcache.m4.xlarge,\n \t\t\t\t\t\tcache.m4.2xlarge,\n \t\t\t\t\t\tcache.m4.4xlarge,\n \t\t\t\t\t\tcache.m4.10xlarge\n

      \n \t\t\t\n\t\t\t\t\t

      \n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):

      \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n\t\t\t\t\t cache.t4g.micro,\n\t\t\t\t\t cache.t4g.small,\n\t\t\t\t\t cache.t4g.medium\n\t\t\t\t\t

      \t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

      \n T3 node types:\n\t\t\t\t\t cache.t3.micro, \n \t\t\t\t\t\tcache.t3.small,\n \t\t\t\t\t\tcache.t3.medium\n

      \n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t

      \n T2 node types:\n\t\t\t\t\t cache.t2.micro, \n \t\t\t\t\t\tcache.t2.small,\n \t\t\t\t\t\tcache.t2.medium\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t\t\t\t

      \n T1 node types:\n\t\t\t\t\t cache.t1.micro\n

      \n\t\t\t\t\t \n\t\t\t\t\t\t

      \n M1 node types:\n\t\t\t\t\t\t cache.m1.small, \n\t\t\t\t\t\t cache.m1.medium, \n\t\t\t\t\t\t cache.m1.large,\n\t\t\t\t\t\t cache.m1.xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t

      \n M3 node types:\n \t\t\t\t\t\t cache.m3.medium,\n \t\t\t\t\t\tcache.m3.large, \n \t\t\t\t\t\tcache.m3.xlarge,\n \t\t\t\t\t\tcache.m3.2xlarge\n

      \n\t\t\t\t\t\t \n\t\t\t\t\t\t
    • \n
    \n
  • \n
  • \n

    Compute optimized:

    \n\n\t\t\t\t
      \n
    • \n

      Previous generation: (not recommended)

      \n\t\t\t

      \n C1 node types:\n\t\t\t cache.c1.xlarge\n

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

    Memory optimized with data tiering:

    \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t

      \n R6gd node types (available only for Redis engine version 6.2 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n\t\t cache.r6gd.xlarge,\n\t\t cache.r6gd.2xlarge,\n\t\t cache.r6gd.4xlarge,\n\t\t cache.r6gd.8xlarge,\n\t\t cache.r6gd.12xlarge,\n\t\t cache.r6gd.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\t\t\t\t \n\t\t \n\t\t
    • \n
    \n
  • \n
  • \n

    Memory optimized:

    \n\t\t \n\t\t \n\t\t
      \n
    • \n

      Current generation:

      \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).

      \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t cache.r6g.large,\n\t\t cache.r6g.xlarge,\n\t\t cache.r6g.2xlarge,\n\t\t cache.r6g.4xlarge,\n\t\t cache.r6g.8xlarge,\n\t\t cache.r6g.12xlarge,\n\t\t cache.r6g.16xlarge\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t

      \t\n\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t \n

      For region availability, see Supported Node Types\n

      \n
      \n\t\t\t\t\t

      \n R5 node types:\n \t\t\t\t\t cache.r5.large,\n \t\t\t\t\t cache.r5.xlarge,\n \t\t\t\t\t cache.r5.2xlarge,\n \t\t\t\t\t cache.r5.4xlarge,\n \t\t\t\t\t cache.r5.12xlarge,\n \t\t\t\t\t cache.r5.24xlarge\n

      \n\t\t\t\t\t\t\n \t\t\t\t\t

      \n R4 node types:\n \t\t\t\t\t cache.r4.large,\n \t\t\t\t\t cache.r4.xlarge,\n \t\t\t\t\t cache.r4.2xlarge,\n \t\t\t\t\t cache.r4.4xlarge,\n \t\t\t\t\t cache.r4.8xlarge,\n \t\t\t\t\t cache.r4.16xlarge\n

      \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n\n \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t \n \t\t\t\t\t
    • \n
    • \n

      Previous generation: (not recommended)

      \n

      \n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge, \n \t\t\t\t\t\tcache.m2.2xlarge,\n \t\t\t\t\t\tcache.m2.4xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t

      \n R3 node types:\n \t\t\t\t\t cache.r3.large, \n \t\t\t\t\t\tcache.r3.xlarge,\n \t\t\t\t\t\tcache.r3.2xlarge, \n \t\t\t\t\t\tcache.r3.4xlarge,\n \t\t\t\t\t\tcache.r3.8xlarge\n

      \n \t\t\t\t\t\t\n \t\t\t\t\t\t
    • \n
    \n
  • \n
\n\t\t\t\t\n\t\t

\n Additional node type info\n

\n\t\t
    \n
  • \n

    All current generation instance types are created in Amazon VPC by default.

    \n
  • \n
  • \n

    Redis append-only files (AOF) are not supported for T1 or T2 instances.

    \n
  • \n
  • \n

    Redis Multi-AZ with automatic failover is not supported on T1 instances.

    \n
  • \n
  • \n

    Redis configuration variables appendonly and \n\t\t\t\tappendfsync are not supported on Redis version 2.8.22 and later.

    \n
  • \n
" } }, "Engine": { diff --git a/aws/sdk/aws-models/emr-serverless.json b/aws/sdk/aws-models/emr-serverless.json new file mode 100644 index 00000000000..58de1be61e5 --- /dev/null +++ b/aws/sdk/aws-models/emr-serverless.json @@ -0,0 +1,2468 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.emrserverless#Application": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "name": { + "target": "com.amazonaws.emrserverless#ApplicationName", + "traits": { + "smithy.api#documentation": "

The name of the application.

" + } + }, + "arn": { + "target": "com.amazonaws.emrserverless#ApplicationArn", + "traits": { + "smithy.api#documentation": "

The ARN of the application.

", + "smithy.api#required": {} + } + }, + "releaseLabel": { + "target": "com.amazonaws.emrserverless#ReleaseLabel", + "traits": { + "smithy.api#documentation": "

The EMR release version associated with the application.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.emrserverless#EngineType", + "traits": { + "smithy.api#documentation": "

The type of application, such as Spark or Hive.

", + "smithy.api#required": {} + } + }, + "state": { + "target": "com.amazonaws.emrserverless#ApplicationState", + "traits": { + "smithy.api#documentation": "

The state of the application.

", + "smithy.api#required": {} + } + }, + "stateDetails": { + "target": "com.amazonaws.emrserverless#String256", + "traits": { + "smithy.api#documentation": "

The state details of the application.

" + } + }, + "initialCapacity": { + "target": "com.amazonaws.emrserverless#InitialCapacityConfigMap", + "traits": { + "smithy.api#documentation": "

The initial capacity of the application.

" + } + }, + "maximumCapacity": { + "target": "com.amazonaws.emrserverless#MaximumAllowedResources", + "traits": { + "smithy.api#documentation": "

The maximum capacity of the application. This is cumulative across all workers at any\n given point in time during the lifespan of the application is created. No new resources\n will be created once any one of the defined limits is hit.

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

The date and time when the application run was created.

", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "com.amazonaws.emrserverless#Date", + "traits": { + "smithy.api#documentation": "

The date and time when the application run was last updated.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.emrserverless#TagMap", + "traits": { + "smithy.api#documentation": "

The tags assigned to the application.

" + } + }, + "autoStartConfiguration": { + "target": "com.amazonaws.emrserverless#AutoStartConfig", + "traits": { + "smithy.api#documentation": "

The configuration for an application to automatically start on job submission.

" + } + }, + "autoStopConfiguration": { + "target": "com.amazonaws.emrserverless#AutoStopConfig", + "traits": { + "smithy.api#documentation": "

The configuration for an application to automatically stop after a certain amount of time being idle.

" + } + }, + "networkConfiguration": { + "target": "com.amazonaws.emrserverless#NetworkConfiguration", + "traits": { + "smithy.api#documentation": "

The network configuration for customer VPC connectivity for the application.

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

Information about an application. EMR Serverless uses applications to run jobs.

" + } + }, + "com.amazonaws.emrserverless#ApplicationArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 60, + "max": 1024 + }, + "smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\\d{12}):\\/applications\\/[0-9a-zA-Z]+$" + } + }, + "com.amazonaws.emrserverless#ApplicationId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[0-9a-z]+$" + } + }, + "com.amazonaws.emrserverless#ApplicationList": { + "type": "list", + "member": { + "target": "com.amazonaws.emrserverless#ApplicationSummary" + } + }, + "com.amazonaws.emrserverless#ApplicationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[A-Za-z0-9._/#-]+$" + } + }, + "com.amazonaws.emrserverless#ApplicationResource": { + "type": "resource", + "identifiers": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId" + } + }, + "create": { + "target": "com.amazonaws.emrserverless#CreateApplication" + }, + "read": { + "target": "com.amazonaws.emrserverless#GetApplication" + }, + "update": { + "target": "com.amazonaws.emrserverless#UpdateApplication" + }, + "delete": { + "target": "com.amazonaws.emrserverless#DeleteApplication" + }, + "list": { + "target": "com.amazonaws.emrserverless#ListApplications" + }, + "operations": [ + { + "target": "com.amazonaws.emrserverless#StartApplication" + }, + { + "target": "com.amazonaws.emrserverless#StopApplication" + } + ] + }, + "com.amazonaws.emrserverless#ApplicationState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "CREATED", + "name": "CREATED" + }, + { + "value": "STARTING", + "name": "STARTING" + }, + { + "value": "STARTED", + "name": "STARTED" + }, + { + "value": "STOPPING", + "name": "STOPPING" + }, + { + "value": "STOPPED", + "name": "STOPPED" + }, + { + "value": "TERMINATED", + "name": "TERMINATED" + } + ] + } + }, + "com.amazonaws.emrserverless#ApplicationStateSet": { + "type": "set", + "member": { + "target": "com.amazonaws.emrserverless#ApplicationState" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 7 + } + } + }, + "com.amazonaws.emrserverless#ApplicationSummary": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "name": { + "target": "com.amazonaws.emrserverless#ApplicationName", + "traits": { + "smithy.api#documentation": "

The name of the application.

" + } + }, + "arn": { + "target": "com.amazonaws.emrserverless#ApplicationArn", + "traits": { + "smithy.api#documentation": "

The ARN of the application.

", + "smithy.api#required": {} + } + }, + "releaseLabel": { + "target": "com.amazonaws.emrserverless#ReleaseLabel", + "traits": { + "smithy.api#documentation": "

The EMR release version associated with the application.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.emrserverless#EngineType", + "traits": { + "smithy.api#documentation": "

The type of application, such as Spark or Hive.

", + "smithy.api#required": {} + } + }, + "state": { + "target": "com.amazonaws.emrserverless#ApplicationState", + "traits": { + "smithy.api#documentation": "

The state of the application.

", + "smithy.api#required": {} + } + }, + "stateDetails": { + "target": "com.amazonaws.emrserverless#String256", + "traits": { + "smithy.api#documentation": "

The state details of the application.

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

The date and time when the application was created.

", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "com.amazonaws.emrserverless#Date", + "traits": { + "smithy.api#documentation": "

The date and time when the application was last updated.

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

The summary of attributes associated with an application.

" + } + }, + "com.amazonaws.emrserverless#AutoStartConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Enables the application to automatically start on job submission. Defaults to true.

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

The configuration for an application to automatically start on job submission.

" + } + }, + "com.amazonaws.emrserverless#AutoStopConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Enables the application to automatically stop after a certain amount of time being idle. Defaults to true.

" + } + }, + "idleTimeoutMinutes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The amount of idle time in minutes after which your application will automatically stop. Defaults to 15 minutes.

", + "smithy.api#range": { + "min": 1, + "max": 10080 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration for an application to automatically stop after a certain amount of time being idle.

" + } + }, + "com.amazonaws.emrserverless#AwsToledoWebService": { + "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "EMR Serverless", + "arnNamespace": "emr-serverless" + }, + "aws.auth#sigv4": { + "name": "emr-serverless" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "*", + "Authorization", + "Date", + "X-Amz-Date", + "X-Amz-Security-Token", + "X-Amz-Target", + "content-type", + "x-amz-content-sha256", + "x-amz-user-agent", + "x-amzn-platform-id", + "x-amzn-trace-id" + ], + "additionalExposedHeaders": [ + "x-amzn-errortype", + "x-amzn-requestid", + "x-amzn-trace-id", + "x-amz-apigw-id" + ] + }, + "smithy.api#documentation": "

Amazon EMR Serverless is a new deployment option for Amazon EMR. EMR Serverless provides\n a serverless runtime environment that simplifies running analytics applications using the\n latest open source frameworks such as Apache Spark and Apache Hive. With EMR Serverless,\n you don’t have to configure, optimize, secure, or operate clusters to run applications with\n these frameworks.

\n

The API reference to Amazon EMR Serverless is emr-serverless. The\n emr-serverless prefix is used in the following scenarios:

\n
    \n
  • \n

    It is the prefix in the CLI commands for Amazon EMR Serverless. For example,\n aws emr-serverless start-job-run.

    \n
  • \n
  • \n

    It is the prefix before IAM policy actions for Amazon EMR Serverless. For example,\n \"Action\": [\"emr-serverless:StartJobRun\"]. For more information, see\n Policy actions for Amazon EMR Serverless.

    \n
  • \n
  • \n

    It is the prefix used in Amazon EMR Serverless service endpoints. For example,\n emr-serverless.us-east-2.amazonaws.com.

    \n
  • \n
", + "smithy.api#title": "EMR Serverless" + }, + "version": "2021-07-13", + "operations": [ + { + "target": "com.amazonaws.emrserverless#ListTagsForResource" + }, + { + "target": "com.amazonaws.emrserverless#TagResource" + }, + { + "target": "com.amazonaws.emrserverless#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.emrserverless#ApplicationResource" + }, + { + "target": "com.amazonaws.emrserverless#JobRunResource" + } + ] + }, + "com.amazonaws.emrserverless#CancelJobRun": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#CancelJobRunRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#CancelJobRunResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Cancels a job run.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/applications/{applicationId}/jobruns/{jobRunId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.emrserverless#CancelJobRunRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application on which the job run will be canceled.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "jobRunId": { + "target": "com.amazonaws.emrserverless#JobRunId", + "traits": { + "smithy.api#documentation": "

The ID of the job run to cancel.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "jobRunId" + } + } + } + }, + "com.amazonaws.emrserverless#CancelJobRunResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The output contains the application ID on which the job run is cancelled.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "jobRunId": { + "target": "com.amazonaws.emrserverless#JobRunId", + "traits": { + "smithy.api#documentation": "

The output contains the ID of the cancelled job run.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "jobRunId" + } + } + } + }, + "com.amazonaws.emrserverless#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[A-Za-z0-9._-]+$" + } + }, + "com.amazonaws.emrserverless#Configuration": { + "type": "structure", + "members": { + "classification": { + "target": "com.amazonaws.emrserverless#String1024", + "traits": { + "smithy.api#documentation": "

The classification within a configuration.

", + "smithy.api#required": {} + } + }, + "properties": { + "target": "com.amazonaws.emrserverless#SensitivePropertiesMap", + "traits": { + "smithy.api#documentation": "

A set of properties specified within a configuration classification.

" + } + }, + "configurations": { + "target": "com.amazonaws.emrserverless#ConfigurationList", + "traits": { + "smithy.api#documentation": "

A list of additional configurations to apply within a configuration object.

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

A configuration specification to be used when provisioning an application. A\n configuration consists of a classification, properties, and optional nested configurations.\n A classification refers to an application-specific configuration file. Properties are the\n settings you want to change in that file.

" + } + }, + "com.amazonaws.emrserverless#ConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.emrserverless#Configuration" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.emrserverless#ConfigurationOverrides": { + "type": "structure", + "members": { + "applicationConfiguration": { + "target": "com.amazonaws.emrserverless#ConfigurationList", + "traits": { + "smithy.api#documentation": "

The override configurations for the application.

" + } + }, + "monitoringConfiguration": { + "target": "com.amazonaws.emrserverless#MonitoringConfiguration", + "traits": { + "smithy.api#documentation": "

The override configurations for monitoring.

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

A configuration specification to be used to override existing configurations.

" + } + }, + "com.amazonaws.emrserverless#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.emrserverless#String1024", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request could not be processed because of conflict in the current state of the\n resource.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.emrserverless#CpuSize": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 15 + }, + "smithy.api#pattern": "^[1-9][0-9]*(\\s)?(vCPU|vcpu|VCPU)?$" + } + }, + "com.amazonaws.emrserverless#CreateApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#CreateApplicationRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#CreateApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#ConflictException" + }, + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an application.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.emrserverless#CreateApplicationRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.emrserverless#ApplicationName", + "traits": { + "smithy.api#documentation": "

The name of the application.

" + } + }, + "releaseLabel": { + "target": "com.amazonaws.emrserverless#ReleaseLabel", + "traits": { + "smithy.api#documentation": "

The EMR release version associated with the application.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.emrserverless#EngineType", + "traits": { + "smithy.api#documentation": "

The type of application you want to start, such as Spark or Hive.

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

The client idempotency token of the application to create. Its value must be unique for\n each request.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "initialCapacity": { + "target": "com.amazonaws.emrserverless#InitialCapacityConfigMap", + "traits": { + "smithy.api#documentation": "

The capacity to initialize when the application is created.

" + } + }, + "maximumCapacity": { + "target": "com.amazonaws.emrserverless#MaximumAllowedResources", + "traits": { + "smithy.api#documentation": "

The maximum capacity to allocate when the application is created. This is cumulative\n across all workers at any given point in time, not just when an application is created. No\n new resources will be created once any one of the defined limits is hit.

" + } + }, + "tags": { + "target": "com.amazonaws.emrserverless#TagMap", + "traits": { + "smithy.api#documentation": "

The tags assigned to the application.

" + } + }, + "autoStartConfiguration": { + "target": "com.amazonaws.emrserverless#AutoStartConfig", + "traits": { + "smithy.api#documentation": "

The configuration for an application to automatically start on job submission.

" + } + }, + "autoStopConfiguration": { + "target": "com.amazonaws.emrserverless#AutoStopConfig", + "traits": { + "smithy.api#documentation": "

The configuration for an application to automatically stop after a certain amount of time being idle.

" + } + }, + "networkConfiguration": { + "target": "com.amazonaws.emrserverless#NetworkConfiguration", + "traits": { + "smithy.api#documentation": "

The network configuration for customer VPC connectivity.

" + } + } + } + }, + "com.amazonaws.emrserverless#CreateApplicationResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The output contains the application ID.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "name": { + "target": "com.amazonaws.emrserverless#ApplicationName", + "traits": { + "smithy.api#documentation": "

The output contains the name of the application.

" + } + }, + "arn": { + "target": "com.amazonaws.emrserverless#ApplicationArn", + "traits": { + "smithy.api#documentation": "

The output contains the ARN of the application.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.emrserverless#Date": { + "type": "timestamp" + }, + "com.amazonaws.emrserverless#DeleteApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#DeleteApplicationRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#DeleteApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an application. An application has to be in a stopped or created state in order\n to be deleted.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/applications/{applicationId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.emrserverless#DeleteApplicationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application that will be deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + } + } + }, + "com.amazonaws.emrserverless#DeleteApplicationResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.emrserverless#DiskSize": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 15 + }, + "smithy.api#pattern": "^[1-9][0-9]*(\\s)?(GB|gb|gB|Gb)$" + } + }, + "com.amazonaws.emrserverless#Duration": { + "type": "long", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 1000000 + } + } + }, + "com.amazonaws.emrserverless#EncryptionKeyArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):kms:[a-zA-Z0-9\\-]*:(\\d{12})?:key\\/[a-zA-Z0-9-]+$" + } + }, + "com.amazonaws.emrserverless#EngineType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.emrserverless#EntryPointArgument": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10280 + }, + "smithy.api#pattern": ".*\\S.*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.emrserverless#EntryPointArguments": { + "type": "list", + "member": { + "target": "com.amazonaws.emrserverless#EntryPointArgument" + } + }, + "com.amazonaws.emrserverless#EntryPointPath": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": ".*\\S.*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.emrserverless#GetApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#GetApplicationRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#GetApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Displays detailed information about a specified application.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.emrserverless#GetApplicationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application that will be described.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + } + } + }, + "com.amazonaws.emrserverless#GetApplicationResponse": { + "type": "structure", + "members": { + "application": { + "target": "com.amazonaws.emrserverless#Application", + "traits": { + "smithy.api#documentation": "

The output displays information about the specified application.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.emrserverless#GetJobRun": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#GetJobRunRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#GetJobRunResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Displays detailed information about a job run.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}/jobruns/{jobRunId}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.emrserverless#GetJobRunRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application on which the job run is submitted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "jobRunId": { + "target": "com.amazonaws.emrserverless#JobRunId", + "traits": { + "smithy.api#documentation": "

The ID of the job run.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "jobRunId" + } + } + } + }, + "com.amazonaws.emrserverless#GetJobRunResponse": { + "type": "structure", + "members": { + "jobRun": { + "target": "com.amazonaws.emrserverless#JobRun", + "traits": { + "smithy.api#documentation": "

The output displays information about the job run.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.emrserverless#Hive": { + "type": "structure", + "members": { + "query": { + "target": "com.amazonaws.emrserverless#Query", + "traits": { + "smithy.api#documentation": "

The query for the Hive job run.

", + "smithy.api#required": {} + } + }, + "initQueryFile": { + "target": "com.amazonaws.emrserverless#InitScriptPath", + "traits": { + "smithy.api#documentation": "

The query file for the Hive job run.

" + } + }, + "parameters": { + "target": "com.amazonaws.emrserverless#HiveCliParameters", + "traits": { + "smithy.api#documentation": "

The parameters for the Hive job run.

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

The configurations for the Hive job driver.

" + } + }, + "com.amazonaws.emrserverless#HiveCliParameters": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 102400 + }, + "smithy.api#pattern": ".*\\S.*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.emrserverless#IAMRoleArn": { + "type": "string", + "traits": { + "aws.api#arnReference": { + "type": "AWS::IAM::Role" + }, + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$" + } + }, + "com.amazonaws.emrserverless#InitScriptPath": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": ".*\\S.*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.emrserverless#InitialCapacityConfig": { + "type": "structure", + "members": { + "workerCount": { + "target": "com.amazonaws.emrserverless#WorkerCounts", + "traits": { + "smithy.api#documentation": "

The number of workers in the initial capacity configuration.

", + "smithy.api#required": {} + } + }, + "workerConfiguration": { + "target": "com.amazonaws.emrserverless#WorkerResourceConfig", + "traits": { + "smithy.api#documentation": "

The resource configuration of the initial capacity configuration.

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

The initial capacity configuration per worker.

" + } + }, + "com.amazonaws.emrserverless#InitialCapacityConfigMap": { + "type": "map", + "key": { + "target": "com.amazonaws.emrserverless#WorkerTypeString" + }, + "value": { + "target": "com.amazonaws.emrserverless#InitialCapacityConfig" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, + "com.amazonaws.emrserverless#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.emrserverless#String1024", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Request processing failed because of an error or failure with the service.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.emrserverless#JobArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 60, + "max": 1024 + }, + "smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\\d{12}):\\/applications\\/[0-9a-zA-Z]+\\/jobruns\\/[0-9a-zA-Z]+$" + } + }, + "com.amazonaws.emrserverless#JobDriver": { + "type": "union", + "members": { + "sparkSubmit": { + "target": "com.amazonaws.emrserverless#SparkSubmit", + "traits": { + "smithy.api#documentation": "

The job driver parameters specified for Spark.

" + } + }, + "hive": { + "target": "com.amazonaws.emrserverless#Hive", + "traits": { + "smithy.api#documentation": "

The job driver parameters specified for Hive.

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

The driver that the job runs on.

" + } + }, + "com.amazonaws.emrserverless#JobRun": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application the job is running on.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "jobRunId": { + "target": "com.amazonaws.emrserverless#JobRunId", + "traits": { + "smithy.api#documentation": "

The ID of the job run.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "jobRunId" + } + }, + "name": { + "target": "com.amazonaws.emrserverless#String256", + "traits": { + "smithy.api#documentation": "

The optional job run name. This doesn't have to be unique.

" + } + }, + "arn": { + "target": "com.amazonaws.emrserverless#JobArn", + "traits": { + "smithy.api#documentation": "

The execution role ARN of the job run.

", + "smithy.api#required": {} + } + }, + "createdBy": { + "target": "com.amazonaws.emrserverless#RequestIdentityUserArn", + "traits": { + "smithy.api#documentation": "

The user who created the job run.

", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.emrserverless#Date", + "traits": { + "smithy.api#documentation": "

The date and time when the job run was created.

", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "com.amazonaws.emrserverless#Date", + "traits": { + "smithy.api#documentation": "

The date and time when the job run was updated.

", + "smithy.api#required": {} + } + }, + "executionRole": { + "target": "com.amazonaws.emrserverless#IAMRoleArn", + "traits": { + "smithy.api#documentation": "

The execution role ARN of the job run.

", + "smithy.api#required": {} + } + }, + "state": { + "target": "com.amazonaws.emrserverless#JobRunState", + "traits": { + "smithy.api#documentation": "

The state of the job run.

", + "smithy.api#required": {} + } + }, + "stateDetails": { + "target": "com.amazonaws.emrserverless#String256", + "traits": { + "smithy.api#documentation": "

The state details of the job run.

", + "smithy.api#required": {} + } + }, + "releaseLabel": { + "target": "com.amazonaws.emrserverless#ReleaseLabel", + "traits": { + "smithy.api#documentation": "

The EMR release version associated with the application your job is running on.

", + "smithy.api#required": {} + } + }, + "configurationOverrides": { + "target": "com.amazonaws.emrserverless#ConfigurationOverrides", + "traits": { + "smithy.api#documentation": "

The configuration settings that are used to override default configuration.

" + } + }, + "jobDriver": { + "target": "com.amazonaws.emrserverless#JobDriver", + "traits": { + "smithy.api#documentation": "

The job driver for the job run.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.emrserverless#TagMap", + "traits": { + "smithy.api#documentation": "

The tags assigned to the job run.

" + } + }, + "totalResourceUtilization": { + "target": "com.amazonaws.emrserverless#TotalResourceUtilization", + "traits": { + "smithy.api#documentation": "

The aggregate vCPU, memory, and storage resources used from the time job start executing till the time job is terminated,\n rounded up to the nearest second.

" + } + }, + "networkConfiguration": { + "target": "com.amazonaws.emrserverless#NetworkConfiguration" + }, + "totalExecutionDurationSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The job run total execution duration in seconds. This field is only available for job runs in a COMPLETED, FAILED, or CANCELLED state.

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

Information about a job run. A job run is a unit of work, such as a Spark JAR, Hive\n query, or SparkSQL query, that you submit to an EMR Serverless application.

" + } + }, + "com.amazonaws.emrserverless#JobRunId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[0-9a-z]+$" + } + }, + "com.amazonaws.emrserverless#JobRunResource": { + "type": "resource", + "identifiers": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId" + }, + "jobRunId": { + "target": "com.amazonaws.emrserverless#JobRunId" + } + }, + "create": { + "target": "com.amazonaws.emrserverless#StartJobRun" + }, + "read": { + "target": "com.amazonaws.emrserverless#GetJobRun" + }, + "delete": { + "target": "com.amazonaws.emrserverless#CancelJobRun" + }, + "list": { + "target": "com.amazonaws.emrserverless#ListJobRuns" + } + }, + "com.amazonaws.emrserverless#JobRunState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SUBMITTED", + "name": "SUBMITTED" + }, + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "SCHEDULED", + "name": "SCHEDULED" + }, + { + "value": "RUNNING", + "name": "RUNNING" + }, + { + "value": "SUCCESS", + "name": "SUCCESS" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "CANCELLING", + "name": "CANCELLING" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, + "com.amazonaws.emrserverless#JobRunStateSet": { + "type": "set", + "member": { + "target": "com.amazonaws.emrserverless#JobRunState" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 8 + } + } + }, + "com.amazonaws.emrserverless#JobRunSummary": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application the job is running on.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "id": { + "target": "com.amazonaws.emrserverless#JobRunId", + "traits": { + "smithy.api#documentation": "

The ID of the job run.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "jobRunId" + } + }, + "name": { + "target": "com.amazonaws.emrserverless#String256", + "traits": { + "smithy.api#documentation": "

The optional job run name. This doesn't have to be unique.

" + } + }, + "arn": { + "target": "com.amazonaws.emrserverless#JobArn", + "traits": { + "smithy.api#documentation": "

The ARN of the job run.

", + "smithy.api#required": {} + } + }, + "createdBy": { + "target": "com.amazonaws.emrserverless#RequestIdentityUserArn", + "traits": { + "smithy.api#documentation": "

The user who created the job run.

", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.emrserverless#Date", + "traits": { + "smithy.api#documentation": "

The date and time when the job run was created.

", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "com.amazonaws.emrserverless#Date", + "traits": { + "smithy.api#documentation": "

The date and time when the job run was last updated.

", + "smithy.api#required": {} + } + }, + "executionRole": { + "target": "com.amazonaws.emrserverless#IAMRoleArn", + "traits": { + "smithy.api#documentation": "

The execution role ARN of the job run.

", + "smithy.api#required": {} + } + }, + "state": { + "target": "com.amazonaws.emrserverless#JobRunState", + "traits": { + "smithy.api#documentation": "

The state of the job run.

", + "smithy.api#required": {} + } + }, + "stateDetails": { + "target": "com.amazonaws.emrserverless#String256", + "traits": { + "smithy.api#documentation": "

The state details of the job run.

", + "smithy.api#required": {} + } + }, + "releaseLabel": { + "target": "com.amazonaws.emrserverless#ReleaseLabel", + "traits": { + "smithy.api#documentation": "

The EMR release version associated with the application your job is running on.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.emrserverless#JobRunType", + "traits": { + "smithy.api#documentation": "

The type of job run, such as Spark or Hive.

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

The summary of attributes associated with a job run.

" + } + }, + "com.amazonaws.emrserverless#JobRunType": { + "type": "string" + }, + "com.amazonaws.emrserverless#JobRuns": { + "type": "list", + "member": { + "target": "com.amazonaws.emrserverless#JobRunSummary" + } + }, + "com.amazonaws.emrserverless#ListApplications": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#ListApplicationsRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#ListApplicationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists applications based on a set of parameters.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "applications" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.emrserverless#ListApplicationsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.emrserverless#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of application results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The maximum number of applications that can be listed.

", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "states": { + "target": "com.amazonaws.emrserverless#ApplicationStateSet", + "traits": { + "smithy.api#documentation": "

An optional filter for application states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.

", + "smithy.api#httpQuery": "states" + } + } + } + }, + "com.amazonaws.emrserverless#ListApplicationsResponse": { + "type": "structure", + "members": { + "applications": { + "target": "com.amazonaws.emrserverless#ApplicationList", + "traits": { + "smithy.api#documentation": "

The output lists the specified applications.

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

The output displays the token for the next set of application results. This is required\n for pagination and is available as a response of the previous request.

" + } + } + } + }, + "com.amazonaws.emrserverless#ListJobRuns": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#ListJobRunsRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#ListJobRunsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists job runs based on a set of parameters.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}/jobruns" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "jobRuns" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.emrserverless#ListJobRunsRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application for which to list the job run.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "nextToken": { + "target": "com.amazonaws.emrserverless#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of job run results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The maximum number of job runs that can be listed.

", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "createdAtAfter": { + "target": "com.amazonaws.emrserverless#Date", + "traits": { + "smithy.api#documentation": "

The lower bound of the option to filter by creation date and time.

", + "smithy.api#httpQuery": "createdAtAfter" + } + }, + "createdAtBefore": { + "target": "com.amazonaws.emrserverless#Date", + "traits": { + "smithy.api#documentation": "

The upper bound of the option to filter by creation date and time.

", + "smithy.api#httpQuery": "createdAtBefore" + } + }, + "states": { + "target": "com.amazonaws.emrserverless#JobRunStateSet", + "traits": { + "smithy.api#documentation": "

An optional filter for job run states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.

", + "smithy.api#httpQuery": "states" + } + } + } + }, + "com.amazonaws.emrserverless#ListJobRunsResponse": { + "type": "structure", + "members": { + "jobRuns": { + "target": "com.amazonaws.emrserverless#JobRuns", + "traits": { + "smithy.api#documentation": "

The output lists information about the specified job runs.

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

The output displays the token for the next set of job run results. This is required for\n pagination and is available as a response of the previous request.

" + } + } + } + }, + "com.amazonaws.emrserverless#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the tags assigned to the resources.

", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.emrserverless#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.emrserverless#ResourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon EMR Serverless applications and job runs.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.emrserverless#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.emrserverless#TagMap", + "traits": { + "smithy.api#documentation": "

The tags for the resource.

" + } + } + } + }, + "com.amazonaws.emrserverless#ManagedPersistenceMonitoringConfiguration": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Enables managed logging and defaults to true. If set to false, managed logging will be turned off.

" + } + }, + "encryptionKeyArn": { + "target": "com.amazonaws.emrserverless#EncryptionKeyArn", + "traits": { + "smithy.api#documentation": "

The KMS key ARN to encrypt the logs stored in managed log persistence.

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

The managed log persistence configuration for a job run.

" + } + }, + "com.amazonaws.emrserverless#MaximumAllowedResources": { + "type": "structure", + "members": { + "cpu": { + "target": "com.amazonaws.emrserverless#CpuSize", + "traits": { + "smithy.api#documentation": "

The maximum allowed CPU for an application.

", + "smithy.api#required": {} + } + }, + "memory": { + "target": "com.amazonaws.emrserverless#MemorySize", + "traits": { + "smithy.api#documentation": "

The maximum allowed resources for an application.

", + "smithy.api#required": {} + } + }, + "disk": { + "target": "com.amazonaws.emrserverless#DiskSize", + "traits": { + "smithy.api#documentation": "

The maximum allowed disk for an application.

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

The maximum allowed cumulative resources for an application. No new resources will be\n created once the limit is hit.

" + } + }, + "com.amazonaws.emrserverless#MemorySize": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 15 + }, + "smithy.api#pattern": "^[1-9][0-9]*(\\s)?(GB|gb|gB|Gb)?$" + } + }, + "com.amazonaws.emrserverless#MonitoringConfiguration": { + "type": "structure", + "members": { + "s3MonitoringConfiguration": { + "target": "com.amazonaws.emrserverless#S3MonitoringConfiguration", + "traits": { + "smithy.api#documentation": "

The Amazon S3 configuration for monitoring log publishing.

" + } + }, + "managedPersistenceMonitoringConfiguration": { + "target": "com.amazonaws.emrserverless#ManagedPersistenceMonitoringConfiguration", + "traits": { + "smithy.api#documentation": "

The managed log persistence configuration for a job run.

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

The configuration setting for monitoring.

" + } + }, + "com.amazonaws.emrserverless#NetworkConfiguration": { + "type": "structure", + "members": { + "subnetIds": { + "target": "com.amazonaws.emrserverless#SubnetIds", + "traits": { + "smithy.api#documentation": "

The array of subnet Ids for customer VPC connectivity.

" + } + }, + "securityGroupIds": { + "target": "com.amazonaws.emrserverless#SecurityGroupIds", + "traits": { + "smithy.api#documentation": "

The array of security group Ids for customer VPC connectivity.

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

The network configuration for customer VPC connectivity.

" + } + }, + "com.amazonaws.emrserverless#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^[A-Za-z0-9_=-]+$" + } + }, + "com.amazonaws.emrserverless#Query": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10280 + }, + "smithy.api#pattern": ".*\\S.*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.emrserverless#ReleaseLabel": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[A-Za-z0-9._/-]+$" + } + }, + "com.amazonaws.emrserverless#RequestIdentityUserArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):(iam|sts)::(\\d{12})?:[\\w/+=,.@-]+$" + } + }, + "com.amazonaws.emrserverless#ResourceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 60, + "max": 1024 + }, + "smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\\d{12}):\\/applications\\/[0-9a-zA-Z]+(\\/jobruns\\/[0-9a-zA-Z]+)?$" + } + }, + "com.amazonaws.emrserverless#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.emrserverless#String1024", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The specified resource was not found.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.emrserverless#S3MonitoringConfiguration": { + "type": "structure", + "members": { + "logUri": { + "target": "com.amazonaws.emrserverless#UriString", + "traits": { + "smithy.api#documentation": "

The Amazon S3 destination URI for log publishing.

" + } + }, + "encryptionKeyArn": { + "target": "com.amazonaws.emrserverless#EncryptionKeyArn", + "traits": { + "smithy.api#documentation": "

The KMS key ARN to encrypt the logs published to the given Amazon S3 destination.

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

The Amazon S3 configuration for monitoring log publishing. You can configure your jobs\n to send log information to Amazon S3.

" + } + }, + "com.amazonaws.emrserverless#SecurityGroupIds": { + "type": "list", + "member": { + "target": "com.amazonaws.emrserverless#SecurityGroupString" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 5 + } + } + }, + "com.amazonaws.emrserverless#SecurityGroupString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 32 + }, + "smithy.api#pattern": "^[-0-9a-zA-Z]+" + } + }, + "com.amazonaws.emrserverless#SensitivePropertiesMap": { + "type": "map", + "key": { + "target": "com.amazonaws.emrserverless#String1024" + }, + "value": { + "target": "com.amazonaws.emrserverless#String1024" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.emrserverless#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.emrserverless#String1024", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The maximum number of resources per account has been reached.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.emrserverless#SparkSubmit": { + "type": "structure", + "members": { + "entryPoint": { + "target": "com.amazonaws.emrserverless#EntryPointPath", + "traits": { + "smithy.api#documentation": "

The entry point for the Spark submit job run.

", + "smithy.api#required": {} + } + }, + "entryPointArguments": { + "target": "com.amazonaws.emrserverless#EntryPointArguments", + "traits": { + "smithy.api#documentation": "

The arguments for the Spark submit job run.

" + } + }, + "sparkSubmitParameters": { + "target": "com.amazonaws.emrserverless#SparkSubmitParameters", + "traits": { + "smithy.api#documentation": "

The parameters for the Spark submit job run.

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

The configurations for the Spark submit job driver.

" + } + }, + "com.amazonaws.emrserverless#SparkSubmitParameters": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 102400 + }, + "smithy.api#pattern": ".*\\S.*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.emrserverless#StartApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#StartApplicationRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#StartApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts a specified application and initializes initial capacity if configured.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications/{applicationId}/start" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.emrserverless#StartApplicationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application to start.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + } + } + }, + "com.amazonaws.emrserverless#StartApplicationResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.emrserverless#StartJobRun": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#StartJobRunRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#StartJobRunResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#ConflictException" + }, + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts a job run.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications/{applicationId}/jobruns" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.emrserverless#StartJobRunRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application on which to run the job.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "clientToken": { + "target": "com.amazonaws.emrserverless#ClientToken", + "traits": { + "smithy.api#documentation": "

The client idempotency token of the job run to start. Its value must be unique for each\n request.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "executionRoleArn": { + "target": "com.amazonaws.emrserverless#IAMRoleArn", + "traits": { + "smithy.api#documentation": "

The execution role ARN for the job run.

", + "smithy.api#required": {} + } + }, + "jobDriver": { + "target": "com.amazonaws.emrserverless#JobDriver", + "traits": { + "smithy.api#documentation": "

The job driver for the job run.

" + } + }, + "configurationOverrides": { + "target": "com.amazonaws.emrserverless#ConfigurationOverrides", + "traits": { + "smithy.api#documentation": "

The configuration overrides for the job run.

" + } + }, + "tags": { + "target": "com.amazonaws.emrserverless#TagMap", + "traits": { + "smithy.api#documentation": "

The tags assigned to the job run.

" + } + }, + "executionTimeoutMinutes": { + "target": "com.amazonaws.emrserverless#Duration", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The maximum duration for the job run to run. If the job run runs beyond this duration, it will be automatically cancelled.

" + } + }, + "name": { + "target": "com.amazonaws.emrserverless#String256", + "traits": { + "smithy.api#documentation": "

The optional job run name. This doesn't have to be unique.

" + } + } + } + }, + "com.amazonaws.emrserverless#StartJobRunResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

This output displays the application ID on which the job run was submitted.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "jobRunId": { + "target": "com.amazonaws.emrserverless#JobRunId", + "traits": { + "smithy.api#documentation": "

The output contains the ID of the started job run.

", + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "jobRunId" + } + }, + "arn": { + "target": "com.amazonaws.emrserverless#JobArn", + "traits": { + "smithy.api#documentation": "

The output lists the execution role ARN of the job run.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.emrserverless#StopApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#StopApplicationRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#StopApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Stops a specified application and releases initial capacity if configured. All scheduled\n and running jobs must be completed or cancelled before stopping an application.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications/{applicationId}/stop" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.emrserverless#StopApplicationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application to stop.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + } + } + }, + "com.amazonaws.emrserverless#StopApplicationResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.emrserverless#String1024": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.emrserverless#String256": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.emrserverless#SubnetIds": { + "type": "list", + "member": { + "target": "com.amazonaws.emrserverless#SubnetString" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 16 + } + } + }, + "com.amazonaws.emrserverless#SubnetString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 32 + }, + "smithy.api#pattern": "^[-0-9a-zA-Z]+" + } + }, + "com.amazonaws.emrserverless#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[A-Za-z0-9 /_.:=+@-]+$" + } + }, + "com.amazonaws.emrserverless#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.emrserverless#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.emrserverless#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.emrserverless#TagKey" + }, + "value": { + "target": "com.amazonaws.emrserverless#TagValue" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.emrserverless#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Assigns tags to resources. A tag is a label that you assign to an AWS resource. Each tag\n consists of a key and an optional value, both of which you define. Tags enable you to\n categorize your AWS resources by attributes such as purpose, owner, or environment. When\n you have many resources of the same type, you can quickly identify a specific resource\n based on the tags you've assigned to it.

", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}" + } + } + }, + "com.amazonaws.emrserverless#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.emrserverless#ResourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon EMR Serverless applications and job runs.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.emrserverless#TagMap", + "traits": { + "smithy.api#documentation": "

The tags to add to the resource. A tag is an array of key-value pairs.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.emrserverless#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.emrserverless#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[A-Za-z0-9 /_.:=+@-]*$" + } + }, + "com.amazonaws.emrserverless#TotalResourceUtilization": { + "type": "structure", + "members": { + "vCPUHour": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

The aggregated vCPU used per hour from the time job start executing till the time job is terminated.

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

The aggregated memory used per hour from the time job start executing till the time job is terminated.

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

The aggregated storage used per hour from the time job start executing till the time job is terminated.

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

The aggregate vCPU, memory, and storage resources used from the time job start executing till the time job is terminated,\n rounded up to the nearest second.

" + } + }, + "com.amazonaws.emrserverless#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes tags from resources.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.emrserverless#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.emrserverless#ResourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon EMR Serverless applications and job runs.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.emrserverless#TagKeyList", + "traits": { + "smithy.api#documentation": "

The keys of the tags to be removed.

", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.emrserverless#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.emrserverless#UpdateApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.emrserverless#UpdateApplicationRequest" + }, + "output": { + "target": "com.amazonaws.emrserverless#UpdateApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.emrserverless#InternalServerException" + }, + { + "target": "com.amazonaws.emrserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.emrserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates a specified application. An application has to be in a stopped or created state\n in order to be updated.

", + "smithy.api#http": { + "method": "PATCH", + "uri": "/applications/{applicationId}" + } + } + }, + "com.amazonaws.emrserverless#UpdateApplicationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.emrserverless#ApplicationId", + "traits": { + "smithy.api#documentation": "

The ID of the application to update.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#resourceIdentifier": "applicationId" + } + }, + "clientToken": { + "target": "com.amazonaws.emrserverless#ClientToken", + "traits": { + "smithy.api#documentation": "

The client idempotency token of the application to update. Its value must be unique for\n each request.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "initialCapacity": { + "target": "com.amazonaws.emrserverless#InitialCapacityConfigMap", + "traits": { + "smithy.api#documentation": "

The capacity to initialize when the application is updated.

" + } + }, + "maximumCapacity": { + "target": "com.amazonaws.emrserverless#MaximumAllowedResources", + "traits": { + "smithy.api#documentation": "

The maximum capacity to allocate when the application is updated. This is cumulative\n across all workers at any given point in time during the lifespan of the application. No\n new resources will be created once any one of the defined limits is hit.

" + } + }, + "autoStartConfiguration": { + "target": "com.amazonaws.emrserverless#AutoStartConfig", + "traits": { + "smithy.api#documentation": "

The configuration for an application to automatically start on job submission.

" + } + }, + "autoStopConfiguration": { + "target": "com.amazonaws.emrserverless#AutoStopConfig", + "traits": { + "smithy.api#documentation": "

The configuration for an application to automatically stop after a certain amount of time being idle.

" + } + }, + "networkConfiguration": { + "target": "com.amazonaws.emrserverless#NetworkConfiguration" + } + } + }, + "com.amazonaws.emrserverless#UpdateApplicationResponse": { + "type": "structure", + "members": { + "application": { + "target": "com.amazonaws.emrserverless#Application", + "traits": { + "smithy.api#documentation": "

Information about the updated application.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.emrserverless#UriString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10280 + }, + "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\r\\n\\t]*" + } + }, + "com.amazonaws.emrserverless#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.emrserverless#String1024", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an AWS service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.emrserverless#WorkerCounts": { + "type": "long", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 1000000 + } + } + }, + "com.amazonaws.emrserverless#WorkerResourceConfig": { + "type": "structure", + "members": { + "cpu": { + "target": "com.amazonaws.emrserverless#CpuSize", + "traits": { + "smithy.api#documentation": "

The CPU requirements for every worker instance of the worker type.

", + "smithy.api#required": {} + } + }, + "memory": { + "target": "com.amazonaws.emrserverless#MemorySize", + "traits": { + "smithy.api#documentation": "

The memory requirements for every worker instance of the worker type.

", + "smithy.api#required": {} + } + }, + "disk": { + "target": "com.amazonaws.emrserverless#DiskSize", + "traits": { + "smithy.api#documentation": "

The disk requirements for every worker instance of the worker type.

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

The cumulative configuration requirements for every worker instance of the worker\n type.

" + } + }, + "com.amazonaws.emrserverless#WorkerTypeString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^[a-zA-Z]+[-_]*[a-zA-Z]+$" + } + } + } +} diff --git a/aws/sdk/aws-models/finspace-data.json b/aws/sdk/aws-models/finspace-data.json index dd67dfc5e20..37d3e54f9ed 100644 --- a/aws/sdk/aws-models/finspace-data.json +++ b/aws/sdk/aws-models/finspace-data.json @@ -2608,6 +2608,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "changesets", "pageSize": "maxResults" } } @@ -2698,6 +2699,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "dataViews", "pageSize": "maxResults" } } @@ -2785,6 +2787,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "datasets", "pageSize": "maxResults" } } @@ -2864,6 +2867,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "permissionGroups", "pageSize": "maxResults" } } @@ -2937,6 +2941,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "users", "pageSize": "maxResults" } } @@ -3229,7 +3234,7 @@ } }, "traits": { - "smithy.api#documentation": "

Resource permission for a dataset. When you create a dataset, all the other members of the same user group inherit access to the dataset. You can only create a dataset if your user group has application permission for Create Datasets.

\n

The following is a list of valid dataset permissions that you can apply:\n \n

\n
    \n
  • \n

    \n ViewDatasetDetails\n

    \n
  • \n
  • \n

    \n ReadDatasetDetails\n

    \n
  • \n
  • \n

    \n AddDatasetData\n

    \n
  • \n
  • \n

    \n CreateSnapshot\n

    \n
  • \n
  • \n

    \n EditDatasetMetadata\n

    \n
  • \n
  • \n

    \n DeleteDataset\n

    \n
  • \n
\n

For more information on the dataset permissions, see Supported Dataset Permissions in the FinSpace User Guide.

" + "smithy.api#documentation": "

Resource permission for a dataset. When you create a dataset, all the other members of the same user group inherit access to the dataset. You can only create a dataset if your user group has application permission for Create Datasets.

\n

The following is a list of valid dataset permissions that you can apply:\n \n

\n
    \n
  • \n

    \n ViewDatasetDetails\n

    \n
  • \n
  • \n

    \n ReadDatasetDetails\n

    \n
  • \n
  • \n

    \n AddDatasetData\n

    \n
  • \n
  • \n

    \n CreateDataView\n

    \n
  • \n
  • \n

    \n EditDatasetMetadata\n

    \n
  • \n
  • \n

    \n DeleteDataset\n

    \n
  • \n
\n

For more information on the dataset permissions, see Supported Dataset Permissions in the FinSpace User Guide.

" } }, "com.amazonaws.finspacedata#ResourcePermissionsList": { diff --git a/aws/sdk/aws-models/forecast.json b/aws/sdk/aws-models/forecast.json index 50182d1a4b6..aea7d46449c 100644 --- a/aws/sdk/aws-models/forecast.json +++ b/aws/sdk/aws-models/forecast.json @@ -42,12 +42,12 @@ "Configuration": { "target": "com.amazonaws.forecast#Configuration", "traits": { - "smithy.api#documentation": "

\n Weather Index\n

\n

To enable the Weather Index, do not specify a value for\n Configuration.

\n

\n Holidays\n

\n

To enable Holidays, set CountryCode to one of the following two-letter country\n codes:

\n
    \n
  • \n

    \"AL\" - ALBANIA

    \n
  • \n
  • \n

    \"AR\" - ARGENTINA

    \n
  • \n
  • \n

    \"AT\" - AUSTRIA

    \n
  • \n
  • \n

    \"AU\" - AUSTRALIA

    \n
  • \n
  • \n

    \"BA\" - BOSNIA HERZEGOVINA

    \n
  • \n
  • \n

    \"BE\" - BELGIUM

    \n
  • \n
  • \n

    \"BG\" - BULGARIA

    \n
  • \n
  • \n

    \"BO\" - BOLIVIA

    \n
  • \n
  • \n

    \"BR\" - BRAZIL

    \n
  • \n
  • \n

    \"BY\" - BELARUS

    \n
  • \n
  • \n

    \"CA\" - CANADA

    \n
  • \n
  • \n

    \"CL\" - CHILE

    \n
  • \n
  • \n

    \"CO\" - COLOMBIA

    \n
  • \n
  • \n

    \"CR\" - COSTA RICA

    \n
  • \n
  • \n

    \"HR\" - CROATIA

    \n
  • \n
  • \n

    \"CZ\" - CZECH REPUBLIC

    \n
  • \n
  • \n

    \"DK\" - DENMARK

    \n
  • \n
  • \n

    \"EC\" - ECUADOR

    \n
  • \n
  • \n

    \"EE\" - ESTONIA

    \n
  • \n
  • \n

    \"ET\" - ETHIOPIA

    \n
  • \n
  • \n

    \"FI\" - FINLAND

    \n
  • \n
  • \n

    \"FR\" - FRANCE

    \n
  • \n
  • \n

    \"DE\" - GERMANY

    \n
  • \n
  • \n

    \"GR\" - GREECE

    \n
  • \n
  • \n

    \"HU\" - HUNGARY

    \n
  • \n
  • \n

    \"IS\" - ICELAND

    \n
  • \n
  • \n

    \"IN\" - INDIA

    \n
  • \n
  • \n

    \"IE\" - IRELAND

    \n
  • \n
  • \n

    \"IT\" - ITALY

    \n
  • \n
  • \n

    \"JP\" - JAPAN

    \n
  • \n
  • \n

    \"KZ\" - KAZAKHSTAN

    \n
  • \n
  • \n

    \"KR\" - KOREA

    \n
  • \n
  • \n

    \"LV\" - LATVIA

    \n
  • \n
  • \n

    \"LI\" - LIECHTENSTEIN

    \n
  • \n
  • \n

    \"LT\" - LITHUANIA

    \n
  • \n
  • \n

    \"LU\" - LUXEMBOURG

    \n
  • \n
  • \n

    \"MK\" - MACEDONIA

    \n
  • \n
  • \n

    \"MT\" - MALTA

    \n
  • \n
  • \n

    \"MX\" - MEXICO

    \n
  • \n
  • \n

    \"MD\" - MOLDOVA

    \n
  • \n
  • \n

    \"ME\" - MONTENEGRO

    \n
  • \n
  • \n

    \"NL\" - NETHERLANDS

    \n
  • \n
  • \n

    \"NZ\" - NEW ZEALAND

    \n
  • \n
  • \n

    \"NI\" - NICARAGUA

    \n
  • \n
  • \n

    \"NG\" - NIGERIA

    \n
  • \n
  • \n

    \"NO\" - NORWAY

    \n
  • \n
  • \n

    \"PA\" - PANAMA

    \n
  • \n
  • \n

    \"PY\" - PARAGUAY

    \n
  • \n
  • \n

    \"PE\" - PERU

    \n
  • \n
  • \n

    \"PL\" - POLAND

    \n
  • \n
  • \n

    \"PT\" - PORTUGAL

    \n
  • \n
  • \n

    \"RO\" - ROMANIA

    \n
  • \n
  • \n

    \"RU\" - RUSSIA

    \n
  • \n
  • \n

    \"RS\" - SERBIA

    \n
  • \n
  • \n

    \"SK\" - SLOVAKIA

    \n
  • \n
  • \n

    \"SI\" - SLOVENIA

    \n
  • \n
  • \n

    \"ZA\" - SOUTH AFRICA

    \n
  • \n
  • \n

    \"ES\" - SPAIN

    \n
  • \n
  • \n

    \"SE\" - SWEDEN

    \n
  • \n
  • \n

    \"CH\" - SWITZERLAND

    \n
  • \n
  • \n

    \"UA\" - UKRAINE

    \n
  • \n
  • \n

    \"AE\" - UNITED ARAB EMIRATES

    \n
  • \n
  • \n

    \"US\" - UNITED STATES

    \n
  • \n
  • \n

    \"UK\" - UNITED KINGDOM

    \n
  • \n
  • \n

    \"UY\" - URUGUAY

    \n
  • \n
  • \n

    \"VE\" - VENEZUELA

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

\n Weather Index\n

\n

To enable the Weather Index, do not specify a value for\n Configuration.

\n

\n Holidays\n

\n\n

\n Holidays\n

\n

To enable Holidays, set CountryCode to one of the following two-letter\n country codes:

\n
    \n
  • \n

    \"AL\" - ALBANIA

    \n
  • \n
  • \n

    \"AR\" - ARGENTINA

    \n
  • \n
  • \n

    \"AT\" - AUSTRIA

    \n
  • \n
  • \n

    \"AU\" - AUSTRALIA

    \n
  • \n
  • \n

    \"BA\" - BOSNIA HERZEGOVINA

    \n
  • \n
  • \n

    \"BE\" - BELGIUM

    \n
  • \n
  • \n

    \"BG\" - BULGARIA

    \n
  • \n
  • \n

    \"BO\" - BOLIVIA

    \n
  • \n
  • \n

    \"BR\" - BRAZIL

    \n
  • \n
  • \n

    \"BY\" - BELARUS

    \n
  • \n
  • \n

    \"CA\" - CANADA

    \n
  • \n
  • \n

    \"CL\" - CHILE

    \n
  • \n
  • \n

    \"CO\" - COLOMBIA

    \n
  • \n
  • \n

    \"CR\" - COSTA RICA

    \n
  • \n
  • \n

    \"HR\" - CROATIA

    \n
  • \n
  • \n

    \"CZ\" - CZECH REPUBLIC

    \n
  • \n
  • \n

    \"DK\" - DENMARK

    \n
  • \n
  • \n

    \"EC\" - ECUADOR

    \n
  • \n
  • \n

    \"EE\" - ESTONIA

    \n
  • \n
  • \n

    \"ET\" - ETHIOPIA

    \n
  • \n
  • \n

    \"FI\" - FINLAND

    \n
  • \n
  • \n

    \"FR\" - FRANCE

    \n
  • \n
  • \n

    \"DE\" - GERMANY

    \n
  • \n
  • \n

    \"GR\" - GREECE

    \n
  • \n
  • \n

    \"HU\" - HUNGARY

    \n
  • \n
  • \n

    \"IS\" - ICELAND

    \n
  • \n
  • \n

    \"IN\" - INDIA

    \n
  • \n
  • \n

    \"IE\" - IRELAND

    \n
  • \n
  • \n

    \"IT\" - ITALY

    \n
  • \n
  • \n

    \"JP\" - JAPAN

    \n
  • \n
  • \n

    \"KZ\" - KAZAKHSTAN

    \n
  • \n
  • \n

    \"KR\" - KOREA

    \n
  • \n
  • \n

    \"LV\" - LATVIA

    \n
  • \n
  • \n

    \"LI\" - LIECHTENSTEIN

    \n
  • \n
  • \n

    \"LT\" - LITHUANIA

    \n
  • \n
  • \n

    \"LU\" - LUXEMBOURG

    \n
  • \n
  • \n

    \"MK\" - MACEDONIA

    \n
  • \n
  • \n

    \"MT\" - MALTA

    \n
  • \n
  • \n

    \"MX\" - MEXICO

    \n
  • \n
  • \n

    \"MD\" - MOLDOVA

    \n
  • \n
  • \n

    \"ME\" - MONTENEGRO

    \n
  • \n
  • \n

    \"NL\" - NETHERLANDS

    \n
  • \n
  • \n

    \"NZ\" - NEW ZEALAND

    \n
  • \n
  • \n

    \"NI\" - NICARAGUA

    \n
  • \n
  • \n

    \"NG\" - NIGERIA

    \n
  • \n
  • \n

    \"NO\" - NORWAY

    \n
  • \n
  • \n

    \"PA\" - PANAMA

    \n
  • \n
  • \n

    \"PY\" - PARAGUAY

    \n
  • \n
  • \n

    \"PE\" - PERU

    \n
  • \n
  • \n

    \"PL\" - POLAND

    \n
  • \n
  • \n

    \"PT\" - PORTUGAL

    \n
  • \n
  • \n

    \"RO\" - ROMANIA

    \n
  • \n
  • \n

    \"RU\" - RUSSIA

    \n
  • \n
  • \n

    \"RS\" - SERBIA

    \n
  • \n
  • \n

    \"SK\" - SLOVAKIA

    \n
  • \n
  • \n

    \"SI\" - SLOVENIA

    \n
  • \n
  • \n

    \"ZA\" - SOUTH AFRICA

    \n
  • \n
  • \n

    \"ES\" - SPAIN

    \n
  • \n
  • \n

    \"SE\" - SWEDEN

    \n
  • \n
  • \n

    \"CH\" - SWITZERLAND

    \n
  • \n
  • \n

    \"UA\" - UKRAINE

    \n
  • \n
  • \n

    \"AE\" - UNITED ARAB EMIRATES

    \n
  • \n
  • \n

    \"US\" - UNITED STATES

    \n
  • \n
  • \n

    \"UK\" - UNITED KINGDOM

    \n
  • \n
  • \n

    \"UY\" - URUGUAY

    \n
  • \n
  • \n

    \"VE\" - VENEZUELA

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

Describes an additional dataset. This object is part of the DataConfig object. Forecast supports the Weather Index and Holidays additional datasets.

\n

\n Weather Index\n

\n

The Amazon Forecast Weather Index is a built-in dataset that incorporates historical and\n projected weather information into your model. The Weather Index supplements your\n datasets with over two years of historical weather data and up to 14 days of projected\n weather data. For more information, see Amazon Forecast\n Weather Index.

\n

\n Holidays\n

\n

Holidays is a built-in dataset that incorporates national holiday information into\n your model. It provides native support for the holiday calendars of 66 countries. To\n view the holiday calendars, refer to the Jollyday library. For more\n information, see Holidays\n Featurization.

" + "smithy.api#documentation": "

Describes an additional dataset. This object is part of the DataConfig object. Forecast supports the Weather Index and Holidays additional datasets.

\n

\n Weather Index\n

\n

The Amazon Forecast Weather Index is a built-in dataset that incorporates historical and\n projected weather information into your model. The Weather Index supplements your\n datasets with over two years of historical weather data and up to 14 days of projected\n weather data. For more information, see Amazon Forecast\n Weather Index.

\n

\n Holidays\n

\n

Holidays is a built-in dataset that incorporates national holiday information into\n your model. It provides native support for the holiday calendars of 66 countries. To\n view the holiday calendars, refer to the Jollyday library. For more\n information, see Holidays\n Featurization.

" } }, "com.amazonaws.forecast#AdditionalDatasets": { @@ -105,6 +105,9 @@ { "target": "com.amazonaws.forecast#CreateForecastExportJob" }, + { + "target": "com.amazonaws.forecast#CreateMonitor" + }, { "target": "com.amazonaws.forecast#CreatePredictor" }, @@ -132,6 +135,9 @@ { "target": "com.amazonaws.forecast#DeleteForecastExportJob" }, + { + "target": "com.amazonaws.forecast#DeleteMonitor" + }, { "target": "com.amazonaws.forecast#DeletePredictor" }, @@ -165,6 +171,9 @@ { "target": "com.amazonaws.forecast#DescribeForecastExportJob" }, + { + "target": "com.amazonaws.forecast#DescribeMonitor" + }, { "target": "com.amazonaws.forecast#DescribePredictor" }, @@ -195,6 +204,12 @@ { "target": "com.amazonaws.forecast#ListForecasts" }, + { + "target": "com.amazonaws.forecast#ListMonitorEvaluations" + }, + { + "target": "com.amazonaws.forecast#ListMonitors" + }, { "target": "com.amazonaws.forecast#ListPredictorBacktestExportJobs" }, @@ -204,6 +219,9 @@ { "target": "com.amazonaws.forecast#ListTagsForResource" }, + { + "target": "com.amazonaws.forecast#ResumeResource" + }, { "target": "com.amazonaws.forecast#StopResource" }, @@ -253,7 +271,7 @@ } }, "traits": { - "smithy.api#documentation": "

Provides information about the method used to transform attributes.

\n

The following is an example using the RETAIL domain:

\n

\n {\n

\n

\n \"AttributeName\": \"demand\",\n

\n

\n \"Transformations\": {\"aggregation\": \"sum\", \"middlefill\": \"zero\", \"backfill\":\n \"zero\"}\n

\n

\n }\n

" + "smithy.api#documentation": "

Provides information about the method used to transform attributes.

\n

The following is an example using the RETAIL domain:

\n

\n {\n

\n

\n \"AttributeName\": \"demand\",\n

\n

\n \"Transformations\": {\"aggregation\": \"sum\", \"middlefill\": \"zero\", \"backfill\":\n \"zero\"}\n

\n

\n }\n

" } }, "com.amazonaws.forecast#AttributeConfigs": { @@ -310,6 +328,46 @@ ] } }, + "com.amazonaws.forecast#Baseline": { + "type": "structure", + "members": { + "PredictorBaseline": { + "target": "com.amazonaws.forecast#PredictorBaseline", + "traits": { + "smithy.api#documentation": "

The initial accuracy metrics for the predictor you are monitoring. Use these metrics as a baseline for comparison purposes as you\n use your predictor and the metrics change.

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

Metrics you can use as a baseline for comparison purposes. Use these metrics when you interpret monitoring results for an auto predictor.

" + } + }, + "com.amazonaws.forecast#BaselineMetric": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.forecast#Name", + "traits": { + "smithy.api#documentation": "

The name of the metric.

" + } + }, + "Value": { + "target": "com.amazonaws.forecast#Double", + "traits": { + "smithy.api#documentation": "

The value for the metric.

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

An individual metric that you can use for comparison as you evaluate your monitoring results.

" + } + }, + "com.amazonaws.forecast#BaselineMetrics": { + "type": "list", + "member": { + "target": "com.amazonaws.forecast#BaselineMetric" + } + }, "com.amazonaws.forecast#Boolean": { "type": "boolean", "traits": { @@ -432,7 +490,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an Amazon Forecast predictor.

\n

Amazon Forecast creates predictors with AutoPredictor, which involves applying the\n optimal combination of algorithms to each time series in your datasets. You can use\n CreateAutoPredictor to create new predictors or upgrade/retrain existing\n predictors.

\n

\n Creating new predictors\n

\n

The following parameters are required when creating a new predictor:

\n
    \n
  • \n

    \n PredictorName - A unique name for the predictor.

    \n
  • \n
  • \n

    \n DatasetGroupArn - The ARN of the dataset group used to train the\n predictor.

    \n
  • \n
  • \n

    \n ForecastFrequency - The granularity of your forecasts (hourly,\n daily, weekly, etc).

    \n
  • \n
  • \n

    \n ForecastHorizon - The number of time steps being\n forecasted.

    \n
  • \n
\n

When creating a new predictor, do not specify a value for\n ReferencePredictorArn.

\n

\n Upgrading and retraining predictors\n

\n

The following parameters are required when retraining or upgrading a predictor:

\n
    \n
  • \n

    \n PredictorName - A unique name for the predictor.

    \n
  • \n
  • \n

    \n ReferencePredictorArn - The ARN of the predictor to retrain or\n upgrade.

    \n
  • \n
\n

When upgrading or retraining a predictor, only specify values for the\n ReferencePredictorArn and PredictorName.

" + "smithy.api#documentation": "

Creates an Amazon Forecast predictor.

\n

Amazon Forecast creates predictors with AutoPredictor, which involves applying the\n optimal combination of algorithms to each time series in your datasets. You can use\n CreateAutoPredictor to create new predictors or upgrade/retrain\n existing predictors.

\n\n

\n Creating new predictors\n

\n\n

The following parameters are required when creating a new predictor:

\n
    \n
  • \n

    \n PredictorName - A unique name for the predictor.

    \n
  • \n
  • \n

    \n DatasetGroupArn - The ARN of the dataset group used to train the\n predictor.

    \n
  • \n
  • \n

    \n ForecastFrequency - The granularity of your forecasts (hourly,\n daily, weekly, etc).

    \n
  • \n
  • \n

    \n ForecastHorizon - The number of time-steps that the model\n predicts. The forecast horizon is also called the prediction length.

    \n
  • \n
\n

When creating a new predictor, do not specify a value for\n ReferencePredictorArn.

\n

\n Upgrading and retraining predictors\n

\n

The following parameters are required when retraining or upgrading a predictor:

\n
    \n
  • \n

    \n PredictorName - A unique name for the predictor.

    \n
  • \n
  • \n

    \n ReferencePredictorArn - The ARN of the predictor to retrain or\n upgrade.

    \n
  • \n
\n

When upgrading or retraining a predictor, only specify values for the\n ReferencePredictorArn and PredictorName.

" } }, "com.amazonaws.forecast#CreateAutoPredictorRequest": { @@ -448,7 +506,7 @@ "ForecastHorizon": { "target": "com.amazonaws.forecast#Integer", "traits": { - "smithy.api#documentation": "

The number of time-steps that the model predicts. The forecast horizon is also called\n the prediction length.

" + "smithy.api#documentation": "

The number of time-steps that the model predicts. The forecast horizon is also called\n the prediction length.

\n

The maximum forecast horizon is the lesser of 500 time-steps or 1/4 of the\n TARGET_TIME_SERIES dataset length. If you are retraining an existing AutoPredictor, then\n the maximum forecast horizon is the lesser of 500 time-steps or 1/3 of the\n TARGET_TIME_SERIES dataset length.

\n

If you are upgrading to an AutoPredictor or retraining an existing AutoPredictor, you\n cannot update the forecast horizon parameter. You can meet this requirement by providing\n longer time-series in the dataset.

" } }, "ForecastTypes": { @@ -501,6 +559,18 @@ "traits": { "smithy.api#documentation": "

Optional metadata to help you categorize and organize your predictors. Each tag\n consists of a key and an optional value, both of which you define. Tag keys and values\n are case sensitive.

\n

The following restrictions apply to tags:

\n
    \n
  • \n

    For each resource, each tag key must be unique and each tag key must have one\n value.

    \n
  • \n
  • \n

    Maximum number of tags per resource: 50.

    \n
  • \n
  • \n

    Maximum key length: 128 Unicode characters in UTF-8.

    \n
  • \n
  • \n

    Maximum value length: 256 Unicode characters in UTF-8.

    \n
  • \n
  • \n

    Accepted characters: all letters and numbers, spaces representable in UTF-8,\n and + - = . _ : / @. If your tagging schema is used across other services and\n resources, the character restrictions of those services also apply.

    \n
  • \n
  • \n

    Key prefixes cannot include any upper or lowercase combination of\n aws: or AWS:. Values can have this prefix. If a\n tag value has aws as its prefix but the key does not, Forecast\n considers it to be a user tag and will count against the limit of 50 tags. Tags\n with only the key prefix of aws do not count against your tags per\n resource limit. You cannot edit or delete tag keys with this prefix.

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

The configuration details for predictor monitoring. Provide a name for the monitor resource to enable predictor monitoring.

\n

Predictor monitoring allows you to see how your predictor's performance changes over time.\n For more information, see Predictor Monitoring.

" + } + }, + "TimeAlignmentBoundary": { + "target": "com.amazonaws.forecast#TimeAlignmentBoundary", + "traits": { + "smithy.api#documentation": "

The time boundary Forecast uses to align and aggregate any data that doesn't align with your forecast frequency. Provide the unit of time and the time boundary as a key value pair. \n For more information on specifying a time boundary, see Specifying a Time Boundary.\n If you\n don't provide a time boundary, Forecast uses a set of Default Time Boundaries.

" + } } } }, @@ -535,7 +605,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an Amazon Forecast dataset. The information about the dataset that you provide helps\n Forecast understand how to consume the data for model training. This includes the\n following:

\n
    \n
  • \n

    \n \n DataFrequency\n - How frequently your historical\n time-series data is collected.

    \n
  • \n
  • \n

    \n \n Domain\n and\n \n DatasetType\n - Each dataset has an associated dataset\n domain and a type within the domain. Amazon Forecast provides a list of predefined domains and\n types within each domain. For each unique dataset domain and type within the domain,\n Amazon Forecast requires your data to include a minimum set of predefined fields.

    \n
  • \n
  • \n

    \n \n Schema\n - A schema specifies the fields in the dataset,\n including the field name and data type.

    \n
  • \n
\n

After creating a dataset, you import your training data into it and add the dataset to a\n dataset group. You use the dataset group to create a predictor. For more information, see\n howitworks-datasets-groups.

\n

To get a list of all your datasets, use the ListDatasets\n operation.

\n

For example Forecast datasets, see the Amazon Forecast Sample GitHub\n repository.

\n \n

The Status of a dataset must be ACTIVE before you can import\n training data. Use the DescribeDataset operation to get the status.

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

Creates an Amazon Forecast dataset. The information about the dataset that you provide helps\n Forecast understand how to consume the data for model training. This includes the\n following:

\n
    \n
  • \n

    \n \n DataFrequency\n - How frequently your historical\n time-series data is collected.

    \n
  • \n
  • \n

    \n \n Domain\n and\n \n DatasetType\n - Each dataset has an associated dataset\n domain and a type within the domain. Amazon Forecast provides a list of predefined domains and\n types within each domain. For each unique dataset domain and type within the domain,\n Amazon Forecast requires your data to include a minimum set of predefined fields.

    \n
  • \n
  • \n

    \n \n Schema\n - A schema specifies the fields in the dataset,\n including the field name and data type.

    \n
  • \n
\n

After creating a dataset, you import your training data into it and add the dataset to a\n dataset group. You use the dataset group to create a predictor. For more information, see\n Importing datasets.

\n

To get a list of all your datasets, use the ListDatasets operation.

\n

For example Forecast datasets, see the Amazon Forecast Sample GitHub\n repository.

\n \n

The Status of a dataset must be ACTIVE before you can import\n training data. Use the DescribeDataset operation to get\n the status.

\n
" } }, "com.amazonaws.forecast#CreateDatasetGroup": { @@ -564,7 +634,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a dataset group, which holds a collection of related datasets. You can add\n datasets to the dataset group when you create the dataset group, or later by using the UpdateDatasetGroup operation.

\n

After creating a dataset group and adding datasets, you use the dataset group when you\n create a predictor. For more information, see howitworks-datasets-groups.

\n

To get a list of all your datasets groups, use the ListDatasetGroups\n operation.

\n \n

The Status of a dataset group must be ACTIVE before you can\n use the dataset group to create a predictor. To get the status, use the DescribeDatasetGroup operation.

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

Creates a dataset group, which holds a collection of related datasets. You can add\n datasets to the dataset group when you create the dataset group, or later by using the UpdateDatasetGroup operation.

\n

After creating a dataset group and adding datasets, you use the dataset group when you\n create a predictor. For more information, see Dataset groups.

\n

To get a list of all your datasets groups, use the ListDatasetGroups\n operation.

\n \n

The Status of a dataset group must be ACTIVE before you can\n use the dataset group to create a predictor. To get the status, use the DescribeDatasetGroup operation.

\n
" } }, "com.amazonaws.forecast#CreateDatasetGroupRequest": { @@ -580,7 +650,7 @@ "Domain": { "target": "com.amazonaws.forecast#Domain", "traits": { - "smithy.api#documentation": "

The domain associated with the dataset group. When you add a dataset to a dataset group,\n this value and the value specified for the Domain parameter of the CreateDataset operation must match.

\n

The Domain and DatasetType that you choose determine the fields\n that must be present in training data that you import to a dataset. For example, if you choose\n the RETAIL domain and TARGET_TIME_SERIES as the\n DatasetType, Amazon Forecast requires that item_id,\n timestamp, and demand fields are present in your data. For more\n information, see howitworks-datasets-groups.

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

The domain associated with the dataset group. When you add a dataset to a dataset group,\n this value and the value specified for the Domain parameter of the CreateDataset\n operation must match.

\n

The Domain and DatasetType that you choose determine the fields\n that must be present in training data that you import to a dataset. For example, if you choose\n the RETAIL domain and TARGET_TIME_SERIES as the\n DatasetType, Amazon Forecast requires that item_id,\n timestamp, and demand fields are present in your data. For more\n information, see Dataset groups.

", "smithy.api#required": {} } }, @@ -635,7 +705,7 @@ } ], "traits": { - "smithy.api#documentation": "

Imports your training data to an Amazon Forecast dataset. You provide the location of your\n training data in an Amazon Simple Storage Service (Amazon S3) bucket and the Amazon Resource Name (ARN) of the dataset\n that you want to import the data to.

\n

You must specify a DataSource object that includes an AWS Identity and Access Management (IAM)\n role that Amazon Forecast can assume to access the data, as Amazon Forecast makes a copy of your data and\n processes it in an internal AWS system. For more information, see aws-forecast-iam-roles.

\n

The training data must be in CSV format. The delimiter must be a comma (,).

\n

You can specify the path to a specific CSV file, the S3 bucket, or to a folder in the S3\n bucket. For the latter two cases, Amazon Forecast imports all files up to the limit of 10,000\n files.

\n\n\n

Because dataset imports are not aggregated, your most recent dataset import is the one\n that is used when training a predictor or generating a forecast. Make sure that your most\n recent dataset import contains all of the data you want to model off of, and not just the new\n data collected since the previous import.

\n\n\n

To get a list of all your dataset import jobs, filtered by specified criteria, use the\n ListDatasetImportJobs operation.

" + "smithy.api#documentation": "

Imports your training data to an Amazon Forecast dataset. You provide the location of your\n training data in an Amazon Simple Storage Service (Amazon S3) bucket and the Amazon Resource Name (ARN) of the dataset\n that you want to import the data to.

\n

You must specify a DataSource object that includes an\n AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the data, as Amazon Forecast makes a copy\n of your data and processes it in an internal AWS system. For more information, see Set up\n permissions.

\n

The training data must be in CSV format. The delimiter must be a comma (,).

\n

You can specify the path to a specific CSV file, the S3 bucket, or to a folder in the S3\n bucket. For the latter two cases, Amazon Forecast imports all files up to the limit of 10,000\n files.

\n\n\n

Because dataset imports are not aggregated, your most recent dataset import is the one\n that is used when training a predictor or generating a forecast. Make sure that your most\n recent dataset import contains all of the data you want to model off of, and not just the new\n data collected since the previous import.

\n\n\n

To get a list of all your dataset import jobs, filtered by specified criteria, use the\n ListDatasetImportJobs operation.

" } }, "com.amazonaws.forecast#CreateDatasetImportJobRequest": { @@ -658,7 +728,7 @@ "DataSource": { "target": "com.amazonaws.forecast#DataSource", "traits": { - "smithy.api#documentation": "

The location of the training data to import and an AWS Identity and Access Management (IAM) role that Amazon Forecast\n can assume to access the data. The training data must be stored in an Amazon S3 bucket.

\n

If encryption is used, DataSource must include an AWS Key Management Service (KMS) key and the\n IAM role must allow Amazon Forecast permission to access the key. The KMS key and IAM role must\n match those specified in the EncryptionConfig parameter of the CreateDataset operation.

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

The location of the training data to import and an AWS Identity and Access Management (IAM) role that Amazon Forecast\n can assume to access the data. The training data must be stored in an Amazon S3 bucket.

\n

If encryption is used, DataSource must include an AWS Key Management Service (KMS) key and the\n IAM role must allow Amazon Forecast permission to access the key. The KMS key and IAM role must\n match those specified in the EncryptionConfig parameter of the CreateDataset\n operation.

", "smithy.api#required": {} } }, @@ -718,7 +788,7 @@ "Domain": { "target": "com.amazonaws.forecast#Domain", "traits": { - "smithy.api#documentation": "

The domain associated with the dataset. When you add a dataset to a dataset group, this\n value and the value specified for the Domain parameter of the CreateDatasetGroup operation must match.

\n

The Domain and DatasetType that you choose determine the fields\n that must be present in the training data that you import to the dataset. For example, if you\n choose the RETAIL domain and TARGET_TIME_SERIES as the\n DatasetType, Amazon Forecast requires item_id, timestamp,\n and demand fields to be present in your data. For more information, see howitworks-datasets-groups.

", + "smithy.api#documentation": "

The domain associated with the dataset. When you add a dataset to a dataset group, this\n value and the value specified for the Domain parameter of the CreateDatasetGroup operation must match.

\n

The Domain and DatasetType that you choose determine the fields\n that must be present in the training data that you import to the dataset. For example, if you\n choose the RETAIL domain and TARGET_TIME_SERIES as the\n DatasetType, Amazon Forecast requires item_id, timestamp,\n and demand fields to be present in your data. For more information, see Importing\n datasets.

", "smithy.api#required": {} } }, @@ -738,7 +808,7 @@ "Schema": { "target": "com.amazonaws.forecast#Schema", "traits": { - "smithy.api#documentation": "

The schema for the dataset. The schema attributes and their order must match the fields in\n your data. The dataset Domain and DatasetType that you choose\n determine the minimum required fields in your training data. For information about the\n required fields for a specific dataset domain and type, see howitworks-domains-ds-types.

", + "smithy.api#documentation": "

The schema for the dataset. The schema attributes and their order must match the fields in\n your data. The dataset Domain and DatasetType that you choose\n determine the minimum required fields in your training data. For information about the\n required fields for a specific dataset domain and type, see Dataset Domains and Dataset\n Types.

", "smithy.api#required": {} } }, @@ -793,7 +863,7 @@ } ], "traits": { - "smithy.api#documentation": "\n

Explainability is only available for Forecasts and Predictors generated from an\n AutoPredictor (CreateAutoPredictor)

\n
\n

Creates an Amazon Forecast Explainability.

\n

Explainability helps you better understand how the attributes in your datasets impact\n forecast. Amazon Forecast uses a metric called Impact scores to quantify the relative\n impact of each attribute and determine whether they increase or decrease forecast\n values.

\n

To enable Forecast Explainability, your predictor must include at least one of the\n following: related time series, item metadata, or additional datasets like Holidays and\n the Weather Index.

\n

CreateExplainability accepts either a Predictor ARN or Forecast ARN. To receive\n aggregated Impact scores for all time series and time points in your datasets, provide a\n Predictor ARN. To receive Impact scores for specific time series and time points,\n provide a Forecast ARN.

\n

\n CreateExplainability with a Predictor ARN\n

\n \n

You can only have one Explainability resource per predictor. If you already\n enabled ExplainPredictor in CreateAutoPredictor, that\n predictor already has an Explainability resource.

\n
\n

The following parameters are required when providing a Predictor ARN:

\n
    \n
  • \n

    \n ExplainabilityName - A unique name for the Explainability.

    \n
  • \n
  • \n

    \n ResourceArn - The Arn of the predictor.

    \n
  • \n
  • \n

    \n TimePointGranularity - Must be set to “ALL”.

    \n
  • \n
  • \n

    \n TimeSeriesGranularity - Must be set to “ALL”.

    \n
  • \n
\n

Do not specify a value for the following parameters:

\n
    \n
  • \n

    \n DataSource - Only valid when TimeSeriesGranularity is\n “SPECIFIC”.

    \n
  • \n
  • \n

    \n Schema - Only valid when TimeSeriesGranularity is\n “SPECIFIC”.

    \n
  • \n
  • \n

    \n StartDateTime - Only valid when TimePointGranularity is\n “SPECIFIC”.

    \n
  • \n
  • \n

    \n EndDateTime - Only valid when TimePointGranularity is\n “SPECIFIC”.

    \n
  • \n
\n

\n CreateExplainability with a Forecast ARN\n

\n \n

You can specify a maximum of 50 time series and 500 time points.

\n
\n

The following parameters are required when providing a Predictor ARN:

\n
    \n
  • \n

    \n ExplainabilityName - A unique name for the Explainability.

    \n
  • \n
  • \n

    \n ResourceArn - The Arn of the forecast.

    \n
  • \n
  • \n

    \n TimePointGranularity - Either “ALL” or “SPECIFIC”.

    \n
  • \n
  • \n

    \n TimeSeriesGranularity - Either “ALL” or “SPECIFIC”.

    \n
  • \n
\n

If you set TimeSeriesGranularity to “SPECIFIC”, you must also provide the\n following:

\n
    \n
  • \n

    \n DataSource - The S3 location of the CSV file specifying your time\n series.

    \n
  • \n
  • \n

    \n Schema - The Schema defines the attributes and attribute types\n listed in the Data Source.

    \n
  • \n
\n

If you set TimePointGranularity to “SPECIFIC”, you must also provide the\n following:

\n
    \n
  • \n

    \n StartDateTime - The first timestamp in the range of time\n points.

    \n
  • \n
  • \n

    \n EndDateTime - The last timestamp in the range of time\n points.

    \n
  • \n
" + "smithy.api#documentation": "\n

Explainability is only available for Forecasts and Predictors generated from an\n AutoPredictor (CreateAutoPredictor)

\n
\n

Creates an Amazon Forecast Explainability.

\n

Explainability helps you better understand how the attributes in your datasets impact\n forecast. Amazon Forecast uses a metric called Impact scores to quantify the relative\n impact of each attribute and determine whether they increase or decrease forecast\n values.

\n

To enable Forecast Explainability, your predictor must include at least one of the\n following: related time series, item metadata, or additional datasets like Holidays and\n the Weather Index.

\n

CreateExplainability accepts either a Predictor ARN or Forecast ARN. To receive\n aggregated Impact scores for all time series and time points in your datasets, provide a\n Predictor ARN. To receive Impact scores for specific time series and time points,\n provide a Forecast ARN.

\n

\n CreateExplainability with a Predictor ARN\n

\n \n

You can only have one Explainability resource per predictor. If you already\n enabled ExplainPredictor in CreateAutoPredictor, that\n predictor already has an Explainability resource.

\n
\n

The following parameters are required when providing a Predictor ARN:

\n
    \n
  • \n

    \n ExplainabilityName - A unique name for the Explainability.

    \n
  • \n
  • \n

    \n ResourceArn - The Arn of the predictor.

    \n
  • \n
  • \n

    \n TimePointGranularity - Must be set to “ALL”.

    \n
  • \n
  • \n

    \n TimeSeriesGranularity - Must be set to “ALL”.

    \n
  • \n
\n

Do not specify a value for the following parameters:

\n
    \n
  • \n

    \n DataSource - Only valid when TimeSeriesGranularity is\n “SPECIFIC”.

    \n
  • \n
  • \n

    \n Schema - Only valid when TimeSeriesGranularity is\n “SPECIFIC”.

    \n
  • \n
  • \n

    \n StartDateTime - Only valid when TimePointGranularity is\n “SPECIFIC”.

    \n
  • \n
  • \n

    \n EndDateTime - Only valid when TimePointGranularity is\n “SPECIFIC”.

    \n
  • \n
\n

\n CreateExplainability with a Forecast ARN\n

\n \n

You can specify a maximum of 50 time series and 500 time points.

\n
\n

The following parameters are required when providing a Predictor ARN:

\n
    \n
  • \n

    \n ExplainabilityName - A unique name for the Explainability.

    \n
  • \n
  • \n

    \n ResourceArn - The Arn of the forecast.

    \n
  • \n
  • \n

    \n TimePointGranularity - Either “ALL” or “SPECIFIC”.

    \n
  • \n
  • \n

    \n TimeSeriesGranularity - Either “ALL” or “SPECIFIC”.

    \n
  • \n
\n

If you set TimeSeriesGranularity to “SPECIFIC”, you must also provide the\n following:

\n
    \n
  • \n

    \n DataSource - The S3 location of the CSV file specifying your time\n series.

    \n
  • \n
  • \n

    \n Schema - The Schema defines the attributes and attribute types\n listed in the Data Source.

    \n
  • \n
\n

If you set TimePointGranularity to “SPECIFIC”, you must also provide the\n following:

\n
    \n
  • \n

    \n StartDateTime - The first timestamp in the range of time\n points.

    \n
  • \n
  • \n

    \n EndDateTime - The last timestamp in the range of time\n points.

    \n
  • \n
" } }, "com.amazonaws.forecast#CreateExplainabilityExport": { @@ -900,19 +970,19 @@ "EnableVisualization": { "target": "com.amazonaws.forecast#Boolean", "traits": { - "smithy.api#documentation": "

Create an Expainability visualization that is viewable within the AWS console.

" + "smithy.api#documentation": "

Create an Explainability visualization that is viewable within the AWS console.

" } }, "StartDateTime": { "target": "com.amazonaws.forecast#LocalDateTime", "traits": { - "smithy.api#documentation": "

If TimePointGranularity is set to SPECIFIC, define the first\n point for the Explainability.

\n

Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)

" + "smithy.api#documentation": "

If TimePointGranularity is set to SPECIFIC, define the first\n point for the Explainability.

\n

Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example:\n 2015-01-01T20:00:00)

" } }, "EndDateTime": { "target": "com.amazonaws.forecast#LocalDateTime", "traits": { - "smithy.api#documentation": "

If TimePointGranularity is set to SPECIFIC, define the last\n time point for the Explainability.

\n

Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)

" + "smithy.api#documentation": "

If TimePointGranularity is set to SPECIFIC, define the last\n time point for the Explainability.

\n

Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example:\n 2015-01-01T20:00:00)

" } }, "Tags": { @@ -1055,7 +1125,7 @@ "ForecastTypes": { "target": "com.amazonaws.forecast#ForecastTypes", "traits": { - "smithy.api#documentation": "

The quantiles at which probabilistic forecasts are generated. You\n can currently specify up to 5 quantiles per forecast. Accepted values include\n 0.01 to 0.99 (increments of .01 only) and mean. The mean forecast\n is different from the median (0.50) when the distribution is not symmetric (for example, Beta\n and Negative Binomial). The default value is [\"0.1\", \"0.5\", \"0.9\"].

" + "smithy.api#documentation": "

The quantiles at which probabilistic forecasts are generated. You\n can currently specify up to 5 quantiles per forecast. Accepted values include\n 0.01 to 0.99 (increments of .01 only) and mean. The mean forecast\n is different from the median (0.50) when the distribution is not symmetric (for example, Beta\n and Negative Binomial).\n

\n

The default quantiles are the quantiles you specified during predictor creation.\n If you didn't specify quantiles, the default values are [\"0.1\", \"0.5\", \"0.9\"].\n

" } }, "Tags": { @@ -1077,6 +1147,71 @@ } } }, + "com.amazonaws.forecast#CreateMonitor": { + "type": "operation", + "input": { + "target": "com.amazonaws.forecast#CreateMonitorRequest" + }, + "output": { + "target": "com.amazonaws.forecast#CreateMonitorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.forecast#InvalidInputException" + }, + { + "target": "com.amazonaws.forecast#LimitExceededException" + }, + { + "target": "com.amazonaws.forecast#ResourceAlreadyExistsException" + }, + { + "target": "com.amazonaws.forecast#ResourceInUseException" + }, + { + "target": "com.amazonaws.forecast#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a predictor monitor resource for an existing auto predictor. Predictor monitoring allows you to see how your predictor's performance changes over time.\n For more information, see Predictor Monitoring.\n

" + } + }, + "com.amazonaws.forecast#CreateMonitorRequest": { + "type": "structure", + "members": { + "MonitorName": { + "target": "com.amazonaws.forecast#Name", + "traits": { + "smithy.api#documentation": "

The name of the monitor resource.

", + "smithy.api#required": {} + } + }, + "ResourceArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor to monitor.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.forecast#Tags", + "traits": { + "smithy.api#documentation": "

A list of tags to apply to the monitor resource.

" + } + } + } + }, + "com.amazonaws.forecast#CreateMonitorResponse": { + "type": "structure", + "members": { + "MonitorArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource.

" + } + } + } + }, "com.amazonaws.forecast#CreatePredictor": { "type": "operation", "input": { @@ -1368,12 +1503,12 @@ "LastModificationTime": { "target": "com.amazonaws.forecast#Timestamp", "traits": { - "smithy.api#documentation": "

When the dataset group was created or last updated from a call to the UpdateDatasetGroup operation. While the dataset group is being updated,\n LastModificationTime is the current time of the ListDatasetGroups\n call.

" + "smithy.api#documentation": "

When the dataset group was created or last updated from a call to the UpdateDatasetGroup operation. While the dataset group is being updated,\n LastModificationTime is the current time of the ListDatasetGroups\n call.

" } } }, "traits": { - "smithy.api#documentation": "

Provides a summary of the dataset group properties used in the ListDatasetGroups operation. To get the complete set of properties, call the\n DescribeDatasetGroup operation, and provide the\n DatasetGroupArn.

" + "smithy.api#documentation": "

Provides a summary of the dataset group properties used in the ListDatasetGroups operation. To\n get the complete set of properties, call the DescribeDatasetGroup\n operation, and provide the DatasetGroupArn.

" } }, "com.amazonaws.forecast#DatasetGroups": { @@ -1429,7 +1564,7 @@ } }, "traits": { - "smithy.api#documentation": "

Provides a summary of the dataset import job properties used in the ListDatasetImportJobs operation. To get the complete set of properties, call the\n DescribeDatasetImportJob operation, and provide the\n DatasetImportJobArn.

" + "smithy.api#documentation": "

Provides a summary of the dataset import job properties used in the ListDatasetImportJobs operation. To get the complete set of properties, call the\n DescribeDatasetImportJob operation, and provide the\n DatasetImportJobArn.

" } }, "com.amazonaws.forecast#DatasetImportJobs": { @@ -1474,12 +1609,12 @@ "LastModificationTime": { "target": "com.amazonaws.forecast#Timestamp", "traits": { - "smithy.api#documentation": "

When you create a dataset, LastModificationTime is the same as\n CreationTime. While data is being imported to the dataset,\n LastModificationTime is the current time of the ListDatasets call.\n After a CreateDatasetImportJob operation has finished,\n LastModificationTime is when the import job completed or failed.

" + "smithy.api#documentation": "

When you create a dataset, LastModificationTime is the same as\n CreationTime. While data is being imported to the dataset,\n LastModificationTime is the current time of the ListDatasets call.\n After a CreateDatasetImportJob operation has finished, LastModificationTime is\n when the import job completed or failed.

" } } }, "traits": { - "smithy.api#documentation": "

Provides a summary of the dataset properties used in the ListDatasets\n operation. To get the complete set of properties, call the DescribeDataset\n operation, and provide the DatasetArn.

" + "smithy.api#documentation": "

Provides a summary of the dataset properties used in the ListDatasets operation. To get the\n complete set of properties, call the DescribeDataset operation, and\n provide the DatasetArn.

" } }, "com.amazonaws.forecast#DatasetType": { @@ -1507,11 +1642,59 @@ "target": "com.amazonaws.forecast#DatasetSummary" } }, + "com.amazonaws.forecast#DayOfMonth": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 28 + } + } + }, + "com.amazonaws.forecast#DayOfWeek": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "MONDAY", + "name": "MONDAY" + }, + { + "value": "TUESDAY", + "name": "TUESDAY" + }, + { + "value": "WEDNESDAY", + "name": "WEDNESDAY" + }, + { + "value": "THURSDAY", + "name": "THURSDAY" + }, + { + "value": "FRIDAY", + "name": "FRIDAY" + }, + { + "value": "SATURDAY", + "name": "SATURDAY" + }, + { + "value": "SUNDAY", + "name": "SUNDAY" + } + ] + } + }, "com.amazonaws.forecast#DeleteDataset": { "type": "operation", "input": { "target": "com.amazonaws.forecast#DeleteDatasetRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1524,7 +1707,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an Amazon Forecast dataset that was created using the CreateDataset\n operation. You can only delete datasets that have a status of ACTIVE or\n CREATE_FAILED. To get the status use the DescribeDataset\n operation.

\n \n

Forecast does not automatically update any dataset groups that contain the deleted dataset.\n In order to update the dataset group, use the \n operation, omitting the deleted dataset's ARN.

\n
", + "smithy.api#documentation": "

Deletes an Amazon Forecast dataset that was created using the CreateDataset operation. You can\n only delete datasets that have a status of ACTIVE or CREATE_FAILED.\n To get the status use the DescribeDataset operation.

\n \n

Forecast does not automatically update any dataset groups that contain the deleted dataset.\n In order to update the dataset group, use the UpdateDatasetGroup operation,\n omitting the deleted dataset's ARN.

\n
", "smithy.api#idempotent": {} } }, @@ -1533,6 +1716,9 @@ "input": { "target": "com.amazonaws.forecast#DeleteDatasetGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1545,7 +1731,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a dataset group created using the CreateDatasetGroup operation.\n You can only delete dataset groups that have a status of ACTIVE,\n CREATE_FAILED, or UPDATE_FAILED. To get the status, use the DescribeDatasetGroup operation.

\n

This operation deletes only the dataset group, not the datasets in the group.

", + "smithy.api#documentation": "

Deletes a dataset group created using the CreateDatasetGroup operation.\n You can only delete dataset groups that have a status of ACTIVE,\n CREATE_FAILED, or UPDATE_FAILED. To get the status, use the DescribeDatasetGroup operation.

\n

This operation deletes only the dataset group, not the datasets in the group.

", "smithy.api#idempotent": {} } }, @@ -1566,6 +1752,9 @@ "input": { "target": "com.amazonaws.forecast#DeleteDatasetImportJobRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1578,7 +1767,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a dataset import job created using the CreateDatasetImportJob\n operation. You can delete only dataset import jobs that have a status of ACTIVE\n or CREATE_FAILED. To get the status, use the DescribeDatasetImportJob operation.

", + "smithy.api#documentation": "

Deletes a dataset import job created using the CreateDatasetImportJob\n operation. You can delete only dataset import jobs that have a status of ACTIVE\n or CREATE_FAILED. To get the status, use the DescribeDatasetImportJob\n operation.

", "smithy.api#idempotent": {} } }, @@ -1611,6 +1800,9 @@ "input": { "target": "com.amazonaws.forecast#DeleteExplainabilityRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1632,6 +1824,9 @@ "input": { "target": "com.amazonaws.forecast#DeleteExplainabilityExportRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1677,6 +1872,9 @@ "input": { "target": "com.amazonaws.forecast#DeleteForecastRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1698,6 +1896,9 @@ "input": { "target": "com.amazonaws.forecast#DeleteForecastExportJobRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1738,11 +1939,50 @@ } } }, + "com.amazonaws.forecast#DeleteMonitor": { + "type": "operation", + "input": { + "target": "com.amazonaws.forecast#DeleteMonitorRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.forecast#InvalidInputException" + }, + { + "target": "com.amazonaws.forecast#ResourceInUseException" + }, + { + "target": "com.amazonaws.forecast#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a monitor resource. You can only delete a monitor resource with a status of ACTIVE, ACTIVE_STOPPED, CREATE_FAILED, or CREATE_STOPPED.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.forecast#DeleteMonitorRequest": { + "type": "structure", + "members": { + "MonitorArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource to delete.

", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.forecast#DeletePredictor": { "type": "operation", "input": { "target": "com.amazonaws.forecast#DeletePredictorRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1764,6 +2004,9 @@ "input": { "target": "com.amazonaws.forecast#DeletePredictorBacktestExportJobRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1809,6 +2052,9 @@ "input": { "target": "com.amazonaws.forecast#DeleteResourceTreeRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -1906,7 +2152,7 @@ "ForecastDimensions": { "target": "com.amazonaws.forecast#ForecastDimensions", "traits": { - "smithy.api#documentation": "

An array of dimension (field) names that specify the attributes used to group your time series.

" + "smithy.api#documentation": "

An array of dimension (field) names that specify the attributes used to group your\n time series.

" } }, "DatasetImportJobArns": { @@ -1939,7 +2185,7 @@ "Status": { "target": "com.amazonaws.forecast#Status", "traits": { - "smithy.api#documentation": "

The status of the predictor. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" + "smithy.api#documentation": "

The status of the predictor. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" } }, "Message": { @@ -1971,6 +2217,18 @@ "traits": { "smithy.api#documentation": "

Provides the status and ARN of the Predictor Explainability.

" } + }, + "MonitorInfo": { + "target": "com.amazonaws.forecast#MonitorInfo", + "traits": { + "smithy.api#documentation": "

A object with the Amazon Resource Name (ARN) and status of the monitor resource.

" + } + }, + "TimeAlignmentBoundary": { + "target": "com.amazonaws.forecast#TimeAlignmentBoundary", + "traits": { + "smithy.api#documentation": "

The time boundary Forecast uses when aggregating data.

" + } } } }, @@ -1991,7 +2249,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes an Amazon Forecast dataset created using the CreateDataset\n operation.

\n

In addition to listing the parameters specified in the CreateDataset request,\n this operation includes the following dataset properties:

\n
    \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
", + "smithy.api#documentation": "

Describes an Amazon Forecast dataset created using the CreateDataset operation.

\n

In addition to listing the parameters specified in the CreateDataset request,\n this operation includes the following dataset properties:

\n
    \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
", "smithy.api#idempotent": {} } }, @@ -2012,7 +2270,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes a dataset group created using the CreateDatasetGroup\n operation.

\n

In addition to listing the parameters provided in the CreateDatasetGroup\n request, this operation includes the following properties:

\n
    \n
  • \n

    \n DatasetArns - The datasets belonging to the group.

    \n
  • \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
", + "smithy.api#documentation": "

Describes a dataset group created using the CreateDatasetGroup\n operation.

\n

In addition to listing the parameters provided in the CreateDatasetGroup\n request, this operation includes the following properties:

\n
    \n
  • \n

    \n DatasetArns - The datasets belonging to the group.

    \n
  • \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
", "smithy.api#idempotent": {} } }, @@ -2058,7 +2316,7 @@ "Status": { "target": "com.amazonaws.forecast#Status", "traits": { - "smithy.api#documentation": "

The status of the dataset group. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
  • \n

    \n UPDATE_PENDING, UPDATE_IN_PROGRESS,\n UPDATE_FAILED\n

    \n
  • \n
\n

The UPDATE states apply when you call the UpdateDatasetGroup operation.

\n \n

The Status of the dataset group must be ACTIVE before you can\n use the dataset group to create a predictor.

\n
" + "smithy.api#documentation": "

The status of the dataset group. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
  • \n

    \n UPDATE_PENDING, UPDATE_IN_PROGRESS,\n UPDATE_FAILED\n

    \n
  • \n
\n

The UPDATE states apply when you call the UpdateDatasetGroup\n operation.

\n \n

The Status of the dataset group must be ACTIVE before you can\n use the dataset group to create a predictor.

\n
" } }, "CreationTime": { @@ -2070,7 +2328,7 @@ "LastModificationTime": { "target": "com.amazonaws.forecast#Timestamp", "traits": { - "smithy.api#documentation": "

When the dataset group was created or last updated from a call to the UpdateDatasetGroup operation. While the dataset group is being updated,\n LastModificationTime is the current time of the\n DescribeDatasetGroup call.

" + "smithy.api#documentation": "

When the dataset group was created or last updated from a call to the UpdateDatasetGroup operation. While the dataset group is being updated,\n LastModificationTime is the current time of the\n DescribeDatasetGroup call.

" } } } @@ -2092,7 +2350,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes a dataset import job created using the CreateDatasetImportJob\n operation.

\n

In addition to listing the parameters provided in the CreateDatasetImportJob\n request, this operation includes the following properties:

\n
    \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n DataSize\n

    \n
  • \n
  • \n

    \n FieldStatistics\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
  • \n

    \n Message - If an error occurred, information about the error.

    \n
  • \n
", + "smithy.api#documentation": "

Describes a dataset import job created using the CreateDatasetImportJob\n operation.

\n

In addition to listing the parameters provided in the CreateDatasetImportJob\n request, this operation includes the following properties:

\n
    \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n DataSize\n

    \n
  • \n
  • \n

    \n FieldStatistics\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
  • \n

    \n Message - If an error occurred, information about the error.

    \n
  • \n
", "smithy.api#idempotent": {} } }, @@ -2263,7 +2521,7 @@ "Status": { "target": "com.amazonaws.forecast#Status", "traits": { - "smithy.api#documentation": "

The status of the dataset. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
  • \n

    \n UPDATE_PENDING, UPDATE_IN_PROGRESS,\n UPDATE_FAILED\n

    \n
  • \n
\n

The UPDATE states apply while data is imported to the dataset from a call to\n the CreateDatasetImportJob operation and reflect the status of the dataset\n import job. For example, when the import job status is CREATE_IN_PROGRESS, the\n status of the dataset is UPDATE_IN_PROGRESS.

\n \n

The Status of the dataset must be ACTIVE before you can import\n training data.

\n
" + "smithy.api#documentation": "

The status of the dataset. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
  • \n

    \n UPDATE_PENDING, UPDATE_IN_PROGRESS,\n UPDATE_FAILED\n

    \n
  • \n
\n

The UPDATE states apply while data is imported to the dataset from a call to\n the CreateDatasetImportJob operation and reflect the status of the dataset import job.\n For example, when the import job status is CREATE_IN_PROGRESS, the status of the\n dataset is UPDATE_IN_PROGRESS.

\n \n

The Status of the dataset must be ACTIVE before you can import\n training data.

\n
" } }, "CreationTime": { @@ -2275,7 +2533,7 @@ "LastModificationTime": { "target": "com.amazonaws.forecast#Timestamp", "traits": { - "smithy.api#documentation": "

When you create a dataset, LastModificationTime is the same as\n CreationTime. While data is being imported to the dataset,\n LastModificationTime is the current time of the DescribeDataset\n call. After a CreateDatasetImportJob operation has finished,\n LastModificationTime is when the import job completed or failed.

" + "smithy.api#documentation": "

When you create a dataset, LastModificationTime is the same as\n CreationTime. While data is being imported to the dataset,\n LastModificationTime is the current time of the DescribeDataset\n call. After a CreateDatasetImportJob\n operation has finished, LastModificationTime is when the import job completed or\n failed.

" } } } @@ -2367,7 +2625,7 @@ "Status": { "target": "com.amazonaws.forecast#Status", "traits": { - "smithy.api#documentation": "

The status of the Explainability export. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" + "smithy.api#documentation": "

The status of the Explainability export. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" } }, "CreationTime": { @@ -2462,7 +2720,7 @@ "Status": { "target": "com.amazonaws.forecast#Status", "traits": { - "smithy.api#documentation": "

The status of the Explainability resource. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" + "smithy.api#documentation": "

The status of the Explainability resource. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" } }, "CreationTime": { @@ -2663,34 +2921,13 @@ } } }, - "com.amazonaws.forecast#DescribePredictor": { - "type": "operation", - "input": { - "target": "com.amazonaws.forecast#DescribePredictorRequest" - }, - "output": { - "target": "com.amazonaws.forecast#DescribePredictorResponse" - }, - "errors": [ - { - "target": "com.amazonaws.forecast#InvalidInputException" - }, - { - "target": "com.amazonaws.forecast#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "\n

This operation is only valid for legacy predictors created with CreatePredictor. If you\n are not using a legacy predictor, use DescribeAutoPredictor.

\n
\n

Describes a predictor created using the CreatePredictor\n operation.

\n

In addition to listing the properties provided in the CreatePredictor\n request, this operation lists the following properties:

\n
    \n
  • \n

    \n DatasetImportJobArns - The dataset import jobs used to import training\n data.

    \n
  • \n
  • \n

    \n AutoMLAlgorithmArns - If AutoML is performed, the algorithms that were\n evaluated.

    \n
  • \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
  • \n

    \n Message - If an error occurred, information about the error.

    \n
  • \n
", - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.forecast#DescribePredictorBacktestExportJob": { + "com.amazonaws.forecast#DescribeMonitor": { "type": "operation", "input": { - "target": "com.amazonaws.forecast#DescribePredictorBacktestExportJobRequest" + "target": "com.amazonaws.forecast#DescribeMonitorRequest" }, "output": { - "target": "com.amazonaws.forecast#DescribePredictorBacktestExportJobResponse" + "target": "com.amazonaws.forecast#DescribeMonitorResponse" }, "errors": [ { @@ -2701,77 +2938,202 @@ } ], "traits": { - "smithy.api#documentation": "

Describes a predictor backtest export job created using the CreatePredictorBacktestExportJob operation.

\n

In addition to listing the properties provided by the user in the\n CreatePredictorBacktestExportJob request, this operation lists the\n following properties:

\n
    \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
  • \n

    \n Message (if an error occurred)

    \n
  • \n
", + "smithy.api#documentation": "

Describes a monitor resource. In addition to listing the properties provided in the CreateMonitor request, this operation lists the following properties:

\n
    \n
  • \n

    \n Baseline\n

    \n
  • \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastEvaluationTime\n

    \n
  • \n
  • \n

    \n LastEvaluationState\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Message\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
", "smithy.api#idempotent": {} } }, - "com.amazonaws.forecast#DescribePredictorBacktestExportJobRequest": { + "com.amazonaws.forecast#DescribeMonitorRequest": { "type": "structure", "members": { - "PredictorBacktestExportJobArn": { + "MonitorArn": { "target": "com.amazonaws.forecast#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor backtest export job.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource to describe.

", "smithy.api#required": {} } } } }, - "com.amazonaws.forecast#DescribePredictorBacktestExportJobResponse": { + "com.amazonaws.forecast#DescribeMonitorResponse": { "type": "structure", "members": { - "PredictorBacktestExportJobArn": { - "target": "com.amazonaws.forecast#Arn", + "MonitorName": { + "target": "com.amazonaws.forecast#Name", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor backtest export job.

" + "smithy.api#documentation": "

The name of the monitor.

" } }, - "PredictorBacktestExportJobName": { - "target": "com.amazonaws.forecast#Name", + "MonitorArn": { + "target": "com.amazonaws.forecast#Arn", "traits": { - "smithy.api#documentation": "

The name of the predictor backtest export job.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource described.

" } }, - "PredictorArn": { + "ResourceArn": { "target": "com.amazonaws.forecast#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the auto predictor being monitored.

" } }, - "Destination": { - "target": "com.amazonaws.forecast#DataDestination" + "Status": { + "target": "com.amazonaws.forecast#Status", + "traits": { + "smithy.api#documentation": "

The status of the monitor resource.

" + } }, - "Message": { - "target": "com.amazonaws.forecast#Message", + "LastEvaluationTime": { + "target": "com.amazonaws.forecast#Timestamp", "traits": { - "smithy.api#documentation": "

Information about any errors that may have occurred during the backtest export.

" + "smithy.api#documentation": "

The timestamp of the latest evaluation completed by the monitor.

" } }, - "Status": { - "target": "com.amazonaws.forecast#Status", + "LastEvaluationState": { + "target": "com.amazonaws.forecast#EvaluationState", "traits": { - "smithy.api#documentation": "

The status of the predictor backtest export job. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" + "smithy.api#documentation": "

The state of the monitor's latest evaluation.

" + } + }, + "Baseline": { + "target": "com.amazonaws.forecast#Baseline", + "traits": { + "smithy.api#documentation": "

Metrics you can use as a baseline for comparison purposes. Use these values you interpret monitoring results for an auto predictor.

" + } + }, + "Message": { + "target": "com.amazonaws.forecast#Message", + "traits": { + "smithy.api#documentation": "

An error message, if any, for the monitor.

" } }, "CreationTime": { "target": "com.amazonaws.forecast#Timestamp", "traits": { - "smithy.api#documentation": "

When the predictor backtest export job was created.

" + "smithy.api#documentation": "

The timestamp for when the monitor resource was created.

" } }, "LastModificationTime": { "target": "com.amazonaws.forecast#Timestamp", "traits": { - "smithy.api#documentation": "

The last time the resource was modified. The timestamp depends on the status of the\n job:

\n
    \n
  • \n

    \n CREATE_PENDING - The CreationTime.

    \n
  • \n
  • \n

    \n CREATE_IN_PROGRESS - The current timestamp.

    \n
  • \n
  • \n

    \n CREATE_STOPPING - The current timestamp.

    \n
  • \n
  • \n

    \n CREATE_STOPPED - When the job stopped.

    \n
  • \n
  • \n

    \n ACTIVE or CREATE_FAILED - When the job finished or\n failed.

    \n
  • \n
" + "smithy.api#documentation": "

The timestamp of the latest modification to the monitor.

" + } + }, + "EstimatedEvaluationTimeRemainingInMinutes": { + "target": "com.amazonaws.forecast#Long", + "traits": { + "smithy.api#documentation": "

The estimated number of minutes remaining before the monitor resource finishes its current evaluation.

" } } } }, - "com.amazonaws.forecast#DescribePredictorRequest": { - "type": "structure", - "members": { - "PredictorArn": { - "target": "com.amazonaws.forecast#Arn", + "com.amazonaws.forecast#DescribePredictor": { + "type": "operation", + "input": { + "target": "com.amazonaws.forecast#DescribePredictorRequest" + }, + "output": { + "target": "com.amazonaws.forecast#DescribePredictorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.forecast#InvalidInputException" + }, + { + "target": "com.amazonaws.forecast#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "\n

This operation is only valid for legacy predictors created with CreatePredictor. If you\n are not using a legacy predictor, use DescribeAutoPredictor.

\n
\n

Describes a predictor created using the CreatePredictor\n operation.

\n

In addition to listing the properties provided in the CreatePredictor\n request, this operation lists the following properties:

\n
    \n
  • \n

    \n DatasetImportJobArns - The dataset import jobs used to import training\n data.

    \n
  • \n
  • \n

    \n AutoMLAlgorithmArns - If AutoML is performed, the algorithms that were\n evaluated.

    \n
  • \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
  • \n

    \n Message - If an error occurred, information about the error.

    \n
  • \n
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.forecast#DescribePredictorBacktestExportJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.forecast#DescribePredictorBacktestExportJobRequest" + }, + "output": { + "target": "com.amazonaws.forecast#DescribePredictorBacktestExportJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.forecast#InvalidInputException" + }, + { + "target": "com.amazonaws.forecast#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes a predictor backtest export job created using the CreatePredictorBacktestExportJob operation.

\n

In addition to listing the properties provided by the user in the\n CreatePredictorBacktestExportJob request, this operation lists the\n following properties:

\n
    \n
  • \n

    \n CreationTime\n

    \n
  • \n
  • \n

    \n LastModificationTime\n

    \n
  • \n
  • \n

    \n Status\n

    \n
  • \n
  • \n

    \n Message (if an error occurred)

    \n
  • \n
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.forecast#DescribePredictorBacktestExportJobRequest": { + "type": "structure", + "members": { + "PredictorBacktestExportJobArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor backtest export job.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.forecast#DescribePredictorBacktestExportJobResponse": { + "type": "structure", + "members": { + "PredictorBacktestExportJobArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor backtest export job.

" + } + }, + "PredictorBacktestExportJobName": { + "target": "com.amazonaws.forecast#Name", + "traits": { + "smithy.api#documentation": "

The name of the predictor backtest export job.

" + } + }, + "PredictorArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor.

" + } + }, + "Destination": { + "target": "com.amazonaws.forecast#DataDestination" + }, + "Message": { + "target": "com.amazonaws.forecast#Message", + "traits": { + "smithy.api#documentation": "

Information about any errors that may have occurred during the backtest export.

" + } + }, + "Status": { + "target": "com.amazonaws.forecast#Status", + "traits": { + "smithy.api#documentation": "

The status of the predictor backtest export job. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" + } + }, + "CreationTime": { + "target": "com.amazonaws.forecast#Timestamp", + "traits": { + "smithy.api#documentation": "

When the predictor backtest export job was created.

" + } + }, + "LastModificationTime": { + "target": "com.amazonaws.forecast#Timestamp", + "traits": { + "smithy.api#documentation": "

The last time the resource was modified. The timestamp depends on the status of the\n job:

\n
    \n
  • \n

    \n CREATE_PENDING - The CreationTime.

    \n
  • \n
  • \n

    \n CREATE_IN_PROGRESS - The current timestamp.

    \n
  • \n
  • \n

    \n CREATE_STOPPING - The current timestamp.

    \n
  • \n
  • \n

    \n CREATE_STOPPED - When the job stopped.

    \n
  • \n
  • \n

    \n ACTIVE or CREATE_FAILED - When the job finished or\n failed.

    \n
  • \n
" + } + } + } + }, + "com.amazonaws.forecast#DescribePredictorRequest": { + "type": "structure", + "members": { + "PredictorArn": { + "target": "com.amazonaws.forecast#Arn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor that you want information about.

", "smithy.api#required": {} @@ -2928,6 +3290,15 @@ } } }, + "com.amazonaws.forecast#Detail": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, "com.amazonaws.forecast#Domain": { "type": "string", "traits": { @@ -3078,6 +3449,15 @@ "smithy.api#documentation": "

The results of evaluating an algorithm. Returned as part of the GetAccuracyMetrics response.

" } }, + "com.amazonaws.forecast#EvaluationState": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, "com.amazonaws.forecast#EvaluationType": { "type": "string", "traits": { @@ -3118,7 +3498,7 @@ } }, "traits": { - "smithy.api#documentation": "

The ExplainabilityConfig data type defines the number of time series and time points\n included in CreateExplainability.

\n

If you provide a predictor ARN for ResourceArn, you must set both\n TimePointGranularity and TimeSeriesGranularity to “ALL”.\n When creating Predictor Explainability, Amazon Forecast considers all time series and\n time points.

\n

If you provide a forecast ARN for ResourceArn, you can set TimePointGranularity and\n TimeSeriesGranularity to either “ALL” or “Specific”.

" + "smithy.api#documentation": "

The ExplainabilityConfig data type defines the number of time series and time points\n included in CreateExplainability.

\n

If you provide a predictor ARN for ResourceArn, you must set both\n TimePointGranularity and TimeSeriesGranularity to “ALL”.\n When creating Predictor Explainability, Amazon Forecast considers all time series and\n time points.

\n

If you provide a forecast ARN for ResourceArn, you can set\n TimePointGranularity and TimeSeriesGranularity to either\n “ALL” or “Specific”.

" } }, "com.amazonaws.forecast#ExplainabilityExportSummary": { @@ -3142,7 +3522,7 @@ "Status": { "target": "com.amazonaws.forecast#Status", "traits": { - "smithy.api#documentation": "

The status of the Explainability export. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" + "smithy.api#documentation": "

The status of the Explainability export. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" } }, "Message": { @@ -3186,7 +3566,7 @@ "Status": { "target": "com.amazonaws.forecast#Status", "traits": { - "smithy.api#documentation": "

The status of the Explainability. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" + "smithy.api#documentation": "

The status of the Explainability. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" } } }, @@ -3224,7 +3604,7 @@ "Status": { "target": "com.amazonaws.forecast#Status", "traits": { - "smithy.api#documentation": "

The status of the Explainability. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" + "smithy.api#documentation": "

The status of the Explainability. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS,\n CREATE_FAILED\n

    \n
  • \n
  • \n

    \n CREATE_STOPPING, CREATE_STOPPED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS,\n DELETE_FAILED\n

    \n
  • \n
" } }, "Message": { @@ -3671,6 +4051,16 @@ } } }, + "com.amazonaws.forecast#Hour": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 23 + } + } + }, "com.amazonaws.forecast#HyperParameterTuningJobConfig": { "type": "structure", "members": { @@ -3822,7 +4212,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of dataset groups created using the CreateDatasetGroup\n operation. For each dataset group, this operation returns a summary of its properties,\n including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by\n using the dataset group ARN with the DescribeDatasetGroup operation.

", + "smithy.api#documentation": "

Returns a list of dataset groups created using the CreateDatasetGroup operation.\n For each dataset group, this operation returns a summary of its properties, including its\n Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the\n dataset group ARN with the DescribeDatasetGroup\n operation.

", "smithy.api#idempotent": {}, "smithy.api#paginated": { "inputToken": "NextToken", @@ -3883,7 +4273,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of dataset import jobs created using the CreateDatasetImportJob operation. For each import job, this operation returns a\n summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the\n complete set of properties by using the ARN with the DescribeDatasetImportJob operation. You can filter the list by providing an array of Filter\n objects.

", + "smithy.api#documentation": "

Returns a list of dataset import jobs created using the CreateDatasetImportJob\n operation. For each import job, this operation returns a summary of its properties, including\n its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the\n ARN with the DescribeDatasetImportJob\n operation. You can filter the list by providing an array of Filter objects.

", "smithy.api#idempotent": {}, "smithy.api#paginated": { "inputToken": "NextToken", @@ -3911,7 +4301,7 @@ "Filters": { "target": "com.amazonaws.forecast#Filters", "traits": { - "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to include\n or exclude the datasets that match the statement from the list, respectively. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n
    \n
  • \n

    \n Condition - The condition to apply. Valid values are IS and\n IS_NOT. To include the datasets that match the statement, specify\n IS. To exclude matching datasets, specify IS_NOT.

    \n
  • \n
  • \n

    \n Key - The name of the parameter to filter on. Valid values are\n DatasetArn and Status.

    \n
  • \n
  • \n

    \n Value - The value to match.

    \n
  • \n
\n

For example, to list all dataset import jobs whose status is ACTIVE, you specify the\n following filter:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" }\n ]\n

" + "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to include\n or exclude the datasets that match the statement from the list, respectively. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n
    \n
  • \n

    \n Condition - The condition to apply. Valid values are IS and\n IS_NOT. To include the datasets that match the statement, specify\n IS. To exclude matching datasets, specify IS_NOT.

    \n
  • \n
  • \n

    \n Key - The name of the parameter to filter on. Valid values are\n DatasetArn and Status.

    \n
  • \n
  • \n

    \n Value - The value to match.

    \n
  • \n
\n

For example, to list all dataset import jobs whose status is ACTIVE, you specify the\n following filter:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]\n

" } } } @@ -3947,7 +4337,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of datasets created using the CreateDataset operation.\n For each dataset, a summary of its properties, including its Amazon Resource Name (ARN), is\n returned. To retrieve the complete set of properties, use the ARN with the DescribeDataset operation.

", + "smithy.api#documentation": "

Returns a list of datasets created using the CreateDataset operation. For each\n dataset, a summary of its properties, including its Amazon Resource Name (ARN), is returned.\n To retrieve the complete set of properties, use the ARN with the DescribeDataset operation.

", "smithy.api#idempotent": {}, "smithy.api#paginated": { "inputToken": "NextToken", @@ -4009,7 +4399,13 @@ ], "traits": { "smithy.api#documentation": "

Returns a list of Explainability resources created using the CreateExplainability operation. This operation returns a summary for\n each Explainability. You can filter the list using an array of Filter\n objects.

\n

To retrieve the complete set of properties for a particular Explainability resource,\n use the ARN with the DescribeExplainability operation.

", - "smithy.api#idempotent": {} + "smithy.api#idempotent": {}, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Explainabilities", + "pageSize": "MaxResults" + } } }, "com.amazonaws.forecast#ListExplainabilitiesRequest": { @@ -4070,7 +4466,13 @@ ], "traits": { "smithy.api#documentation": "

Returns a list of Explainability exports created using the CreateExplainabilityExport operation. This operation returns a summary\n for each Explainability export. You can filter the list using an array of Filter objects.

\n

To retrieve the complete set of properties for a particular Explainability export, use\n the ARN with the DescribeExplainability operation.

", - "smithy.api#idempotent": {} + "smithy.api#idempotent": {}, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ExplainabilityExports", + "pageSize": "MaxResults" + } } }, "com.amazonaws.forecast#ListExplainabilityExportsRequest": { @@ -4247,13 +4649,13 @@ } } }, - "com.amazonaws.forecast#ListPredictorBacktestExportJobs": { + "com.amazonaws.forecast#ListMonitorEvaluations": { "type": "operation", "input": { - "target": "com.amazonaws.forecast#ListPredictorBacktestExportJobsRequest" + "target": "com.amazonaws.forecast#ListMonitorEvaluationsRequest" }, "output": { - "target": "com.amazonaws.forecast#ListPredictorBacktestExportJobsResponse" + "target": "com.amazonaws.forecast#ListMonitorEvaluationsResponse" }, "errors": [ { @@ -4261,66 +4663,76 @@ }, { "target": "com.amazonaws.forecast#InvalidNextTokenException" + }, + { + "target": "com.amazonaws.forecast#ResourceNotFoundException" } ], "traits": { - "smithy.api#documentation": "

Returns a list of predictor backtest export jobs created using the CreatePredictorBacktestExportJob operation. This operation returns a\n summary for each backtest export job. You can filter the list using an array of Filter objects.

\n

To retrieve the complete set of properties for a particular backtest export job, use\n the ARN with the DescribePredictorBacktestExportJob operation.

", + "smithy.api#documentation": "

Returns a list of the monitoring evaluation results and predictor events collected by\n the monitor resource during different windows of time.

\n

For information about monitoring see predictor-monitoring. For\n more information about retrieving monitoring results see Viewing Monitoring Results.

", "smithy.api#idempotent": {}, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "items": "PredictorBacktestExportJobs", + "items": "PredictorMonitorEvaluations", "pageSize": "MaxResults" } } }, - "com.amazonaws.forecast#ListPredictorBacktestExportJobsRequest": { + "com.amazonaws.forecast#ListMonitorEvaluationsRequest": { "type": "structure", "members": { "NextToken": { "target": "com.amazonaws.forecast#NextToken", "traits": { - "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next request.\n Tokens expire after 24 hours.

" + "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next\n request. Tokens expire after 24 hours.

" } }, "MaxResults": { "target": "com.amazonaws.forecast#MaxResults", "traits": { - "smithy.api#documentation": "

The number of items to return in the response.

" + "smithy.api#documentation": "

The maximum number of monitoring results to return.

" + } + }, + "MonitorArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource to get results from.

", + "smithy.api#required": {} } }, "Filters": { "target": "com.amazonaws.forecast#Filters", "traits": { - "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude the predictor backtest export jobs that match the statement from the\n list. The match statement consists of a key and a value.

\n

\n Filter properties\n

\n
    \n
  • \n

    \n Condition - The condition to apply. Valid values are\n IS and IS_NOT. To include the predictor backtest\n export jobs that match the statement, specify IS. To exclude\n matching predictor backtest export jobs, specify IS_NOT.

    \n
  • \n
  • \n

    \n Key - The name of the parameter to filter on. Valid values are\n PredictorArn and Status.

    \n
  • \n
  • \n

    \n Value - The value to match.

    \n
  • \n
" + "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude the resources that match the statement from the list. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n
    \n
  • \n

    \n Condition - The condition to apply. Valid values are\n IS and IS_NOT.

    \n
  • \n
  • \n

    \n Key - The name of the parameter to filter on. The only valid value is \n EvaluationState.

    \n
  • \n
  • \n

    \n Value - The value to match. Valid values are only SUCCESS or FAILURE.

    \n
  • \n
\n

For example, to list only successful monitor evaluations, you would specify:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"EvaluationState\", \"Value\": \"SUCCESS\" } ]\n

" } } } }, - "com.amazonaws.forecast#ListPredictorBacktestExportJobsResponse": { + "com.amazonaws.forecast#ListMonitorEvaluationsResponse": { "type": "structure", "members": { - "PredictorBacktestExportJobs": { - "target": "com.amazonaws.forecast#PredictorBacktestExportJobs", + "NextToken": { + "target": "com.amazonaws.forecast#NextToken", "traits": { - "smithy.api#documentation": "

An array of objects that summarize the properties of each predictor backtest export\n job.

" + "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request. Tokens expire after 24 hours.

" } }, - "NextToken": { - "target": "com.amazonaws.forecast#NextToken", + "PredictorMonitorEvaluations": { + "target": "com.amazonaws.forecast#PredictorMonitorEvaluations", "traits": { - "smithy.api#documentation": "

Returns this token if the response is truncated. To retrieve the next set of results,\n use the token in the next request.

" + "smithy.api#documentation": "

The monitoring results and predictor events collected by the monitor resource during different windows of time.

\n

For information about monitoring see Viewing Monitoring Results. For more information about retrieving monitoring results see Viewing Monitoring Results.

" } } } }, - "com.amazonaws.forecast#ListPredictors": { + "com.amazonaws.forecast#ListMonitors": { "type": "operation", "input": { - "target": "com.amazonaws.forecast#ListPredictorsRequest" + "target": "com.amazonaws.forecast#ListMonitorsRequest" }, "output": { - "target": "com.amazonaws.forecast#ListPredictorsResponse" + "target": "com.amazonaws.forecast#ListMonitorsResponse" }, "errors": [ { @@ -4331,105 +4743,239 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of predictors created using the CreateAutoPredictor or\n CreatePredictor operations. For each predictor, this operation returns a\n summary of its properties, including its Amazon Resource Name (ARN).

\n

You can retrieve the complete set of properties by using the ARN with the DescribeAutoPredictor and DescribePredictor operations. You\n can filter the list using an array of Filter objects.

", + "smithy.api#documentation": "

Returns a list of monitors created with the CreateMonitor operation and CreateAutoPredictor operation. For each monitor resource, this operation returns of a summary of its properties, including its Amazon Resource Name (ARN). You\n can retrieve a complete set of properties of a monitor resource by specify the monitor's ARN in the DescribeMonitor operation.

", "smithy.api#idempotent": {}, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "items": "Predictors", + "items": "Monitors", "pageSize": "MaxResults" } } }, - "com.amazonaws.forecast#ListPredictorsRequest": { + "com.amazonaws.forecast#ListMonitorsRequest": { "type": "structure", "members": { "NextToken": { "target": "com.amazonaws.forecast#NextToken", "traits": { - "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next\n request. Tokens expire after 24 hours.

" + "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next\n request. Tokens expire after 24 hours.

" } }, "MaxResults": { "target": "com.amazonaws.forecast#MaxResults", "traits": { - "smithy.api#documentation": "

The number of items to return in the response.

" + "smithy.api#documentation": "

The maximum number of monitors to include in the response.

" } }, "Filters": { "target": "com.amazonaws.forecast#Filters", "traits": { - "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to include\n or exclude the predictors that match the statement from the list, respectively. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n
    \n
  • \n

    \n Condition - The condition to apply. Valid values are IS and\n IS_NOT. To include the predictors that match the statement, specify\n IS. To exclude matching predictors, specify IS_NOT.

    \n
  • \n
  • \n

    \n Key - The name of the parameter to filter on. Valid values are\n DatasetGroupArn and Status.

    \n
  • \n
  • \n

    \n Value - The value to match.

    \n
  • \n
\n

For example, to list all predictors whose status is ACTIVE, you would specify:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" }\n ]\n

" + "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude the resources that match the statement from the list. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n
    \n
  • \n

    \n Condition - The condition to apply. Valid values are\n IS and IS_NOT.

    \n
  • \n
  • \n

    \n Key - The name of the parameter to filter on. The only valid value is \n Status.

    \n
  • \n
  • \n

    \n Value - The value to match.

    \n
  • \n
\n

For example, to list all monitors who's status is ACTIVE, you would specify:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]\n

" } } } }, - "com.amazonaws.forecast#ListPredictorsResponse": { + "com.amazonaws.forecast#ListMonitorsResponse": { "type": "structure", "members": { - "Predictors": { - "target": "com.amazonaws.forecast#Predictors", + "Monitors": { + "target": "com.amazonaws.forecast#Monitors", "traits": { - "smithy.api#documentation": "

An array of objects that summarize each predictor's properties.

" + "smithy.api#documentation": "

An array of objects that summarize each monitor's properties.

" } }, "NextToken": { "target": "com.amazonaws.forecast#NextToken", "traits": { - "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" + "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" } } } }, - "com.amazonaws.forecast#ListTagsForResource": { + "com.amazonaws.forecast#ListPredictorBacktestExportJobs": { "type": "operation", "input": { - "target": "com.amazonaws.forecast#ListTagsForResourceRequest" + "target": "com.amazonaws.forecast#ListPredictorBacktestExportJobsRequest" }, "output": { - "target": "com.amazonaws.forecast#ListTagsForResourceResponse" + "target": "com.amazonaws.forecast#ListPredictorBacktestExportJobsResponse" }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" }, { - "target": "com.amazonaws.forecast#ResourceNotFoundException" + "target": "com.amazonaws.forecast#InvalidNextTokenException" } ], "traits": { - "smithy.api#documentation": "

Lists the tags for an Amazon Forecast resource.

" + "smithy.api#documentation": "

Returns a list of predictor backtest export jobs created using the CreatePredictorBacktestExportJob operation. This operation returns a\n summary for each backtest export job. You can filter the list using an array of Filter objects.

\n

To retrieve the complete set of properties for a particular backtest export job, use\n the ARN with the DescribePredictorBacktestExportJob operation.

", + "smithy.api#idempotent": {}, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "PredictorBacktestExportJobs", + "pageSize": "MaxResults" + } } }, - "com.amazonaws.forecast#ListTagsForResourceRequest": { + "com.amazonaws.forecast#ListPredictorBacktestExportJobsRequest": { "type": "structure", "members": { - "ResourceArn": { - "target": "com.amazonaws.forecast#Arn", + "NextToken": { + "target": "com.amazonaws.forecast#NextToken", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) that identifies the resource for which to list the tags.\n

", - "smithy.api#required": {} + "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next request.\n Tokens expire after 24 hours.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.forecast#MaxResults", + "traits": { + "smithy.api#documentation": "

The number of items to return in the response.

" + } + }, + "Filters": { + "target": "com.amazonaws.forecast#Filters", + "traits": { + "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude the predictor backtest export jobs that match the statement from the\n list. The match statement consists of a key and a value.

\n

\n Filter properties\n

\n
    \n
  • \n

    \n Condition - The condition to apply. Valid values are\n IS and IS_NOT. To include the predictor backtest\n export jobs that match the statement, specify IS. To exclude\n matching predictor backtest export jobs, specify IS_NOT.

    \n
  • \n
  • \n

    \n Key - The name of the parameter to filter on. Valid values are\n PredictorArn and Status.

    \n
  • \n
  • \n

    \n Value - The value to match.

    \n
  • \n
" } } } }, - "com.amazonaws.forecast#ListTagsForResourceResponse": { + "com.amazonaws.forecast#ListPredictorBacktestExportJobsResponse": { "type": "structure", "members": { - "Tags": { - "target": "com.amazonaws.forecast#Tags", + "PredictorBacktestExportJobs": { + "target": "com.amazonaws.forecast#PredictorBacktestExportJobs", "traits": { - "smithy.api#documentation": "

The tags for the resource.

" + "smithy.api#documentation": "

An array of objects that summarize the properties of each predictor backtest export\n job.

" + } + }, + "NextToken": { + "target": "com.amazonaws.forecast#NextToken", + "traits": { + "smithy.api#documentation": "

Returns this token if the response is truncated. To retrieve the next set of results,\n use the token in the next request.

" } } } }, - "com.amazonaws.forecast#LocalDateTime": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 19 + "com.amazonaws.forecast#ListPredictors": { + "type": "operation", + "input": { + "target": "com.amazonaws.forecast#ListPredictorsRequest" + }, + "output": { + "target": "com.amazonaws.forecast#ListPredictorsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.forecast#InvalidInputException" + }, + { + "target": "com.amazonaws.forecast#InvalidNextTokenException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of predictors created using the CreateAutoPredictor or\n CreatePredictor operations. For each predictor, this operation returns a\n summary of its properties, including its Amazon Resource Name (ARN).

\n

You can retrieve the complete set of properties by using the ARN with the DescribeAutoPredictor and DescribePredictor operations. You\n can filter the list using an array of Filter objects.

", + "smithy.api#idempotent": {}, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Predictors", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.forecast#ListPredictorsRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.forecast#NextToken", + "traits": { + "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next\n request. Tokens expire after 24 hours.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.forecast#MaxResults", + "traits": { + "smithy.api#documentation": "

The number of items to return in the response.

" + } + }, + "Filters": { + "target": "com.amazonaws.forecast#Filters", + "traits": { + "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to include\n or exclude the predictors that match the statement from the list, respectively. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n
    \n
  • \n

    \n Condition - The condition to apply. Valid values are IS and\n IS_NOT. To include the predictors that match the statement, specify\n IS. To exclude matching predictors, specify IS_NOT.

    \n
  • \n
  • \n

    \n Key - The name of the parameter to filter on. Valid values are\n DatasetGroupArn and Status.

    \n
  • \n
  • \n

    \n Value - The value to match.

    \n
  • \n
\n

For example, to list all predictors whose status is ACTIVE, you would specify:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" }\n ]\n

" + } + } + } + }, + "com.amazonaws.forecast#ListPredictorsResponse": { + "type": "structure", + "members": { + "Predictors": { + "target": "com.amazonaws.forecast#Predictors", + "traits": { + "smithy.api#documentation": "

An array of objects that summarize each predictor's properties.

" + } + }, + "NextToken": { + "target": "com.amazonaws.forecast#NextToken", + "traits": { + "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" + } + } + } + }, + "com.amazonaws.forecast#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.forecast#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.forecast#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.forecast#InvalidInputException" + }, + { + "target": "com.amazonaws.forecast#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the tags for an Amazon Forecast resource.

" + } + }, + "com.amazonaws.forecast#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) that identifies the resource for which to list the tags.\n

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.forecast#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.forecast#Tags", + "traits": { + "smithy.api#documentation": "

The tags for the resource.

" + } + } + } + }, + "com.amazonaws.forecast#LocalDateTime": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 19 }, "smithy.api#pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$" } @@ -4453,6 +4999,41 @@ "com.amazonaws.forecast#Message": { "type": "string" }, + "com.amazonaws.forecast#MetricName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.forecast#MetricResult": { + "type": "structure", + "members": { + "MetricName": { + "target": "com.amazonaws.forecast#MetricName", + "traits": { + "smithy.api#documentation": "

The name of the metric.

" + } + }, + "MetricValue": { + "target": "com.amazonaws.forecast#Double", + "traits": { + "smithy.api#documentation": "

The value for the metric.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An individual metric Forecast calculated when monitoring predictor usage. You can compare the value for this metric to the metric's value in the Baseline to see how your predictor's performance is changing.

\n

For more information about metrics generated by Forecast see Evaluating Predictor Accuracy\n

" + } + }, + "com.amazonaws.forecast#MetricResults": { + "type": "list", + "member": { + "target": "com.amazonaws.forecast#MetricResult" + } + }, "com.amazonaws.forecast#Metrics": { "type": "structure", "members": { @@ -4488,6 +5069,172 @@ "smithy.api#documentation": "

Provides metrics that are used to evaluate the performance of a predictor. This object is\n part of the WindowSummary object.

" } }, + "com.amazonaws.forecast#MonitorConfig": { + "type": "structure", + "members": { + "MonitorName": { + "target": "com.amazonaws.forecast#Name", + "traits": { + "smithy.api#documentation": "

The name of the monitor resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration details for the predictor monitor.

" + } + }, + "com.amazonaws.forecast#MonitorDataSource": { + "type": "structure", + "members": { + "DatasetImportJobArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the dataset import job used to import the data that initiated the monitor evaluation.

" + } + }, + "ForecastArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the forecast the monitor used during the evaluation.

" + } + }, + "PredictorArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor resource you are monitoring.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The source of the data the monitor used during the evaluation.

" + } + }, + "com.amazonaws.forecast#MonitorInfo": { + "type": "structure", + "members": { + "MonitorArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource.

" + } + }, + "Status": { + "target": "com.amazonaws.forecast#Status", + "traits": { + "smithy.api#documentation": "

The status of the monitor. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n ACTIVE_STOPPING, ACTIVE_STOPPED\n

    \n
  • \n
  • \n

    \n UPDATE_IN_PROGRESS\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED\n

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides information about the monitor resource.

" + } + }, + "com.amazonaws.forecast#MonitorSummary": { + "type": "structure", + "members": { + "MonitorArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource.

" + } + }, + "MonitorName": { + "target": "com.amazonaws.forecast#Name", + "traits": { + "smithy.api#documentation": "

The name of the monitor resource.

" + } + }, + "ResourceArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor being monitored.

" + } + }, + "Status": { + "target": "com.amazonaws.forecast#Status", + "traits": { + "smithy.api#documentation": "

The status of the monitor. States include:

\n
    \n
  • \n

    \n ACTIVE\n

    \n
  • \n
  • \n

    \n ACTIVE_STOPPING, ACTIVE_STOPPED\n

    \n
  • \n
  • \n

    \n UPDATE_IN_PROGRESS\n

    \n
  • \n
  • \n

    \n CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED\n

    \n
  • \n
  • \n

    \n DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED\n

    \n
  • \n
" + } + }, + "CreationTime": { + "target": "com.amazonaws.forecast#Timestamp", + "traits": { + "smithy.api#documentation": "

When the monitor resource was created.

" + } + }, + "LastModificationTime": { + "target": "com.amazonaws.forecast#Timestamp", + "traits": { + "smithy.api#documentation": "

The last time the monitor resource was modified. The timestamp depends on the status of the\n job:

\n
    \n
  • \n

    \n CREATE_PENDING - The CreationTime.

    \n
  • \n
  • \n

    \n CREATE_IN_PROGRESS - The current timestamp.

    \n
  • \n
  • \n

    \n STOPPED - When the resource stopped.

    \n
  • \n
  • \n

    \n ACTIVE or CREATE_FAILED - When the monitor creation finished or\n failed.

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides a summary of the monitor properties used in the ListMonitors operation. To get a complete set of properties,\n call the DescribeMonitor operation, and provide the listed\n MonitorArn.

" + } + }, + "com.amazonaws.forecast#Monitors": { + "type": "list", + "member": { + "target": "com.amazonaws.forecast#MonitorSummary" + } + }, + "com.amazonaws.forecast#Month": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "JANUARY", + "name": "JANUARY" + }, + { + "value": "FEBRUARY", + "name": "FEBRUARY" + }, + { + "value": "MARCH", + "name": "MARCH" + }, + { + "value": "APRIL", + "name": "APRIL" + }, + { + "value": "MAY", + "name": "MAY" + }, + { + "value": "JUNE", + "name": "JUNE" + }, + { + "value": "JULY", + "name": "JULY" + }, + { + "value": "AUGUST", + "name": "AUGUST" + }, + { + "value": "SEPTEMBER", + "name": "SEPTEMBER" + }, + { + "value": "OCTOBER", + "name": "OCTOBER" + }, + { + "value": "NOVEMBER", + "name": "NOVEMBER" + }, + { + "value": "DECEMBER", + "name": "DECEMBER" + } + ] + } + }, "com.amazonaws.forecast#Name": { "type": "string", "traits": { @@ -4634,12 +5381,46 @@ "target": "com.amazonaws.forecast#PredictorBacktestExportJobSummary" } }, + "com.amazonaws.forecast#PredictorBaseline": { + "type": "structure", + "members": { + "BaselineMetrics": { + "target": "com.amazonaws.forecast#BaselineMetrics", + "traits": { + "smithy.api#documentation": "

The initial accuracy metrics for the predictor. Use these metrics as a baseline for comparison purposes as you\n use your predictor and the metrics change.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Metrics you can use as a baseline for comparison purposes. Use these metrics when you interpret monitoring results for an auto predictor.

" + } + }, "com.amazonaws.forecast#PredictorEvaluationResults": { "type": "list", "member": { "target": "com.amazonaws.forecast#EvaluationResult" } }, + "com.amazonaws.forecast#PredictorEvent": { + "type": "structure", + "members": { + "Detail": { + "target": "com.amazonaws.forecast#Detail", + "traits": { + "smithy.api#documentation": "

The type of event. For example, Retrain. A retraining event denotes the timepoint when a predictor was retrained. Any monitor results from before the Datetime are from the previous predictor. Any new metrics are for the newly retrained predictor.

" + } + }, + "Datetime": { + "target": "com.amazonaws.forecast#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the event occurred.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides details about a predictor event, such as a retraining.

" + } + }, "com.amazonaws.forecast#PredictorExecution": { "type": "structure", "members": { @@ -4686,6 +5467,86 @@ } } }, + "com.amazonaws.forecast#PredictorMonitorEvaluation": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource to monitor.

" + } + }, + "MonitorArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource.

" + } + }, + "EvaluationTime": { + "target": "com.amazonaws.forecast#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp that indicates when the monitor evaluation was started.

" + } + }, + "EvaluationState": { + "target": "com.amazonaws.forecast#EvaluationState", + "traits": { + "smithy.api#documentation": "

The status of the monitor evaluation. The state can be SUCCESS or FAILURE.

" + } + }, + "WindowStartDatetime": { + "target": "com.amazonaws.forecast#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp that indicates the start of the window that is used for monitor evaluation.

" + } + }, + "WindowEndDatetime": { + "target": "com.amazonaws.forecast#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp that indicates the end of the window that is used for monitor evaluation.

" + } + }, + "PredictorEvent": { + "target": "com.amazonaws.forecast#PredictorEvent", + "traits": { + "smithy.api#documentation": "

Provides details about a predictor event, such as a retraining.

" + } + }, + "MonitorDataSource": { + "target": "com.amazonaws.forecast#MonitorDataSource", + "traits": { + "smithy.api#documentation": "

The source of the data the monitor resource used during the evaluation.

" + } + }, + "MetricResults": { + "target": "com.amazonaws.forecast#MetricResults", + "traits": { + "smithy.api#documentation": "

A list of metrics Forecast calculated when monitoring a predictor. You can compare the value for each metric in the list to the metric's value in the Baseline to see how your predictor's performance is changing.

" + } + }, + "NumItemsEvaluated": { + "target": "com.amazonaws.forecast#Long", + "traits": { + "smithy.api#documentation": "

The number of items considered during the evaluation.

" + } + }, + "Message": { + "target": "com.amazonaws.forecast#Message", + "traits": { + "smithy.api#documentation": "

Information about any errors that may have occurred during the monitor evaluation.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the results of a monitor evaluation.

" + } + }, + "com.amazonaws.forecast#PredictorMonitorEvaluations": { + "type": "list", + "member": { + "target": "com.amazonaws.forecast#PredictorMonitorEvaluation" + } + }, "com.amazonaws.forecast#PredictorSummary": { "type": "structure", "members": { @@ -4813,6 +5674,45 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.forecast#ResumeResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.forecast#ResumeResourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.forecast#InvalidInputException" + }, + { + "target": "com.amazonaws.forecast#LimitExceededException" + }, + { + "target": "com.amazonaws.forecast#ResourceInUseException" + }, + { + "target": "com.amazonaws.forecast#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Resumes a stopped monitor resource.

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.forecast#ResumeResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.forecast#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource to resume.

", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.forecast#S3Config": { "type": "structure", "members": { @@ -4900,12 +5800,12 @@ "AttributeType": { "target": "com.amazonaws.forecast#AttributeType", "traits": { - "smithy.api#documentation": "

The data type of the field.

" + "smithy.api#documentation": "

The data type of the field.

\n

For a related time series dataset, other than date, item_id, and forecast dimensions attributes, all attributes should be of numerical type (integer/float).

" } } }, "traits": { - "smithy.api#documentation": "

An attribute of a schema, which defines a dataset field. A schema attribute is required\n for every field in a dataset. The Schema object contains an array of\n SchemaAttribute objects.

" + "smithy.api#documentation": "

An attribute of a schema, which defines a dataset field. A schema attribute is required\n for every field in a dataset. The Schema object contains an array of\n SchemaAttribute objects.

" } }, "com.amazonaws.forecast#SchemaAttributes": { @@ -4947,19 +5847,19 @@ "CountDistinct": { "target": "com.amazonaws.forecast#Integer", "traits": { - "smithy.api#documentation": "

The number of distinct values in the field. If the response value is -1, refer to\n CountDistinctLong.

" + "smithy.api#documentation": "

The number of distinct values in the field. If the response value is -1, refer to\n CountDistinctLong.

" } }, "CountNull": { "target": "com.amazonaws.forecast#Integer", "traits": { - "smithy.api#documentation": "

The number of null values in the field. If the response value is -1, refer to\n CountNullLong.

" + "smithy.api#documentation": "

The number of null values in the field. If the response value is -1, refer to\n CountNullLong.

" } }, "CountNan": { "target": "com.amazonaws.forecast#Integer", "traits": { - "smithy.api#documentation": "

The number of NAN (not a number) values in the field. If the response value is -1, refer to\n CountNanLong.

" + "smithy.api#documentation": "

The number of NAN (not a number) values in the field. If the response value is -1, refer\n to CountNanLong.

" } }, "Min": { @@ -5012,7 +5912,7 @@ } }, "traits": { - "smithy.api#documentation": "

Provides statistics for each data field imported into to an Amazon Forecast dataset with\n the CreateDatasetImportJob operation.

" + "smithy.api#documentation": "

Provides statistics for each data field imported into to an Amazon Forecast dataset with\n the CreateDatasetImportJob operation.

" } }, "com.amazonaws.forecast#Status": { @@ -5029,6 +5929,9 @@ "input": { "target": "com.amazonaws.forecast#StopResourceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.forecast#InvalidInputException" @@ -5259,6 +6162,38 @@ "target": "com.amazonaws.forecast#WindowSummary" } }, + "com.amazonaws.forecast#TimeAlignmentBoundary": { + "type": "structure", + "members": { + "Month": { + "target": "com.amazonaws.forecast#Month", + "traits": { + "smithy.api#documentation": "

The month to use for time alignment during aggregation. The month must be in uppercase.

" + } + }, + "DayOfMonth": { + "target": "com.amazonaws.forecast#DayOfMonth", + "traits": { + "smithy.api#documentation": "

The day of the month to use for time alignment during aggregation.

" + } + }, + "DayOfWeek": { + "target": "com.amazonaws.forecast#DayOfWeek", + "traits": { + "smithy.api#documentation": "

The day of week to use for time alignment during aggregation. The day must be in uppercase.

" + } + }, + "Hour": { + "target": "com.amazonaws.forecast#Hour", + "traits": { + "smithy.api#documentation": "

The hour of day to use for time alignment during aggregation.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The time boundary Forecast uses to align and aggregate your data to match your forecast frequency. Provide the unit of time and the time boundary as a key value pair. If you\n don't provide a time boundary, Forecast uses a set of Default Time Boundaries.\n

\n\n

For more information about aggregation,\n see Data Aggregation for Different Forecast Frequencies.\n For more information setting a custom time boundary,\n see Specifying a Time Boundary.\n \n

" + } + }, "com.amazonaws.forecast#TimePointGranularity": { "type": "string", "traits": { @@ -5405,7 +6340,7 @@ } ], "traits": { - "smithy.api#documentation": "

Replaces the datasets in a dataset group with the specified datasets.

\n \n

The Status of the dataset group must be ACTIVE before you can\n use the dataset group to create a predictor. Use the DescribeDatasetGroup\n operation to get the status.

\n
", + "smithy.api#documentation": "

Replaces the datasets in a dataset group with the specified datasets.

\n \n

The Status of the dataset group must be ACTIVE before you can\n use the dataset group to create a predictor. Use the DescribeDatasetGroup\n operation to get the status.

\n
", "smithy.api#idempotent": {} } }, diff --git a/aws/sdk/aws-models/fsx.json b/aws/sdk/aws-models/fsx.json index 95d1d84a198..a30a82df47d 100644 --- a/aws/sdk/aws-models/fsx.json +++ b/aws/sdk/aws-models/fsx.json @@ -1387,7 +1387,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new, empty Amazon FSx file system. You can create the following supported \n Amazon FSx file systems using the CreateFileSystem API operation:

\n
    \n
  • \n

    Amazon FSx for Lustre

    \n
  • \n
  • \n

    Amazon FSx for NetApp ONTAP

    \n
  • \n
  • \n

    Amazon FSx for OpenZFS

    \n
  • \n
  • \n

    Amazon FSx for Windows File Server

    \n
  • \n
\n

This operation requires a client request token in the request that Amazon FSx uses\n to ensure idempotent creation. This means that calling the operation multiple times with\n the same client request token has no effect. By using the idempotent operation, you can\n retry a CreateFileSystem operation without the risk of creating an extra\n file system. This approach can be useful when an initial call fails in a way that makes\n it unclear whether a file system was created. Examples are if a transport level timeout\n occurred, or your connection was reset. If you use the same client request token and the\n initial call created a file system, the client receives success as long as the\n parameters are the same.

\n

If a file system with the specified client request token exists and the parameters\n match, CreateFileSystem returns the description of the existing file\n system. If a file system with the specified client request token exists and the\n parameters don't match, this call returns IncompatibleParameterError. If a\n file system with the specified client request token doesn't exist,\n CreateFileSystem does the following:

\n
    \n
  • \n

    Creates a new, empty Amazon FSx file system with an assigned ID, and\n an initial lifecycle state of CREATING.

    \n
  • \n
  • \n

    Returns the description of the file system in JSON format.

    \n
  • \n
\n\n

This operation requires a client request token in the request that Amazon FSx\n uses to ensure idempotent creation. This means that calling the operation multiple times\n with the same client request token has no effect. By using the idempotent operation, you\n can retry a CreateFileSystem operation without the risk of creating an\n extra file system. This approach can be useful when an initial call fails in a way that\n makes it unclear whether a file system was created. Examples are if a transport-level\n timeout occurred, or your connection was reset. If you use the same client request token\n and the initial call created a file system, the client receives a success message as\n long as the parameters are the same.

\n \n

The CreateFileSystem call returns while the file system's lifecycle\n state is still CREATING. You can check the file-system creation status\n by calling the DescribeFileSystems operation, which returns the file system state\n along with other information.

\n
" + "smithy.api#documentation": "

Creates a new, empty Amazon FSx file system. You can create the following supported \n Amazon FSx file systems using the CreateFileSystem API operation:

\n
    \n
  • \n

    Amazon FSx for Lustre

    \n
  • \n
  • \n

    Amazon FSx for NetApp ONTAP

    \n
  • \n
  • \n

    Amazon FSx for OpenZFS

    \n
  • \n
  • \n

    Amazon FSx for Windows File Server

    \n
  • \n
\n

This operation requires a client request token in the request that Amazon FSx uses\n to ensure idempotent creation. This means that calling the operation multiple times with\n the same client request token has no effect. By using the idempotent operation, you can\n retry a CreateFileSystem operation without the risk of creating an extra\n file system. This approach can be useful when an initial call fails in a way that makes\n it unclear whether a file system was created. Examples are if a transport level timeout\n occurred, or your connection was reset. If you use the same client request token and the\n initial call created a file system, the client receives success as long as the\n parameters are the same.

\n

If a file system with the specified client request token exists and the parameters\n match, CreateFileSystem returns the description of the existing file\n system. If a file system with the specified client request token exists and the\n parameters don't match, this call returns IncompatibleParameterError. If a\n file system with the specified client request token doesn't exist,\n CreateFileSystem does the following:

\n
    \n
  • \n

    Creates a new, empty Amazon FSx file system with an assigned ID, and\n an initial lifecycle state of CREATING.

    \n
  • \n
  • \n

    Returns the description of the file system in JSON format.

    \n
  • \n
\n\n

This operation requires a client request token in the request that Amazon FSx\n uses to ensure idempotent creation. This means that calling the operation multiple times\n with the same client request token has no effect. By using the idempotent operation, you\n can retry a CreateFileSystem operation without the risk of creating an\n extra file system. This approach can be useful when an initial call fails in a way that\n makes it unclear whether a file system was created. Examples are if a transport-level\n timeout occurred, or your connection was reset. If you use the same client request token\n and the initial call created a file system, the client receives a success message as\n long as the parameters are the same.

\n \n

The CreateFileSystem call returns while the file system's lifecycle\n state is still CREATING. You can check the file-system creation status\n by calling the DescribeFileSystems operation, which returns the file system state\n along with other information.

\n
" } }, "com.amazonaws.fsx#CreateFileSystemFromBackup": { @@ -1589,6 +1589,12 @@ "traits": { "smithy.api#documentation": "

The Lustre logging configuration used when creating an Amazon FSx for Lustre\n file system. When logging is enabled, Lustre logs error and warning events for data repositories\n associated with your file system to Amazon CloudWatch Logs.

" } + }, + "RootSquashConfiguration": { + "target": "com.amazonaws.fsx#LustreRootSquashConfiguration", + "traits": { + "smithy.api#documentation": "

The Lustre root squash configuration used when creating an Amazon FSx for Lustre\n file system. When enabled, root squash restricts root-level access from clients that\n try to access your file system as a root user.

" + } } }, "traits": { @@ -1607,7 +1613,7 @@ "DeploymentType": { "target": "com.amazonaws.fsx#OntapDeploymentType", "traits": { - "smithy.api#documentation": "

Specifies the FSx for ONTAP file system deployment type to use in creating\n the file system.

\n
    \n
  • \n

    \n MULTI_AZ_1 - (Default) A high availability file system configured\n for Multi-AZ redundancy to tolerate temporary Availability Zone (AZ)\n unavailability.

    \n
  • \n
  • \n

    \n SINGLE_AZ_1 - A file system configured for Single-AZ\n redundancy.

    \n
  • \n
\n

For information about the use cases for Multi-AZ and Single-AZ deployments, refer to\n Choosing Multi-AZ or\n Single-AZ file system deployment.

", + "smithy.api#documentation": "

Specifies the FSx for ONTAP file system deployment type to use in creating\n the file system.

\n
    \n
  • \n

    \n MULTI_AZ_1 - (Default) A high availability file system configured\n for Multi-AZ redundancy to tolerate temporary Availability Zone (AZ)\n unavailability.

    \n
  • \n
  • \n

    \n SINGLE_AZ_1 - A file system configured for Single-AZ\n redundancy.

    \n
  • \n
\n

For information about the use cases for Multi-AZ and Single-AZ deployments, refer to\n Choosing a file system deployment type.

", "smithy.api#required": {} } }, @@ -4043,6 +4049,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "StorageVirtualMachines", "pageSize": "MaxResults" } } @@ -4108,6 +4115,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Volumes", "pageSize": "MaxResults" } } @@ -5212,7 +5220,7 @@ "WeeklyMaintenanceStartTime": { "target": "com.amazonaws.fsx#WeeklyTime", "traits": { - "smithy.api#documentation": "

The preferred start time to perform weekly maintenance, formatted d:HH:MM in the UTC\n time zone. Here, d is the weekday number, from 1 through 7, beginning with Monday and\n ending with Sunday.

" + "smithy.api#documentation": "

The preferred start time to perform weekly maintenance, formatted d:HH:MM in the UTC\n time zone. Here, d is the weekday number, from 1 through 7, beginning with Monday and\n ending with Sunday.

" } }, "DataRepositoryConfiguration": { @@ -5265,6 +5273,12 @@ "traits": { "smithy.api#documentation": "

The Lustre logging configuration. Lustre logging writes the enabled log\n events for your file system to Amazon CloudWatch Logs.

" } + }, + "RootSquashConfiguration": { + "target": "com.amazonaws.fsx#LustreRootSquashConfiguration", + "traits": { + "smithy.api#documentation": "

The Lustre root squash configuration for an Amazon FSx for Lustre\n file system. When enabled, root squash restricts root-level access from clients that\n try to access your file system as a root user.

" + } } }, "traits": { @@ -5323,6 +5337,58 @@ "smithy.api#documentation": "

The Lustre logging configuration used when creating or updating an\n Amazon FSx for Lustre file system. Lustre logging writes the enabled\n logging events for your file system to Amazon CloudWatch Logs.

\n

Error and warning events can be logged from the following data\n repository operations:

\n
    \n
  • \n

    Automatic export

    \n
  • \n
  • \n

    Data repository tasks

    \n
  • \n
\n

To learn more about Lustre logging, see \n Logging to Amazon CloudWatch Logs.

" } }, + "com.amazonaws.fsx#LustreNoSquashNid": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 11, + "max": 43 + }, + "smithy.api#pattern": "^([0-9\\[\\]\\-]*\\.){3}([0-9\\[\\]\\-]*)@tcp$" + } + }, + "com.amazonaws.fsx#LustreNoSquashNids": { + "type": "list", + "member": { + "target": "com.amazonaws.fsx#LustreNoSquashNid" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 64 + } + } + }, + "com.amazonaws.fsx#LustreRootSquash": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 21 + }, + "smithy.api#pattern": "^([0-9]{1,10}):([0-9]{1,10})$" + } + }, + "com.amazonaws.fsx#LustreRootSquashConfiguration": { + "type": "structure", + "members": { + "RootSquash": { + "target": "com.amazonaws.fsx#LustreRootSquash", + "traits": { + "smithy.api#documentation": "

You enable root squash by setting a user ID (UID) and group ID (GID) for the file\n system in the format UID:GID (for example, 365534:65534).\n The UID and GID values can range from 0 to 4294967294:

\n
    \n
  • \n

    A non-zero value for UID and GID enables root squash. The UID and GID\n values can be different, but each must be a non-zero value.

    \n
  • \n
  • \n

    A value of 0 (zero) for UID and GID indicates root,\n and therefore disables root squash.

    \n
  • \n
\n

When root squash is enabled, the user ID and group ID of a root user accessing\n the file system are re-mapped to the UID and GID you provide.

" + } + }, + "NoSquashNids": { + "target": "com.amazonaws.fsx#LustreNoSquashNids", + "traits": { + "smithy.api#documentation": "

When root squash is enabled, you can optionally specify an array of NIDs of clients\n for which root squash does not apply. A client NID is a Lustre Network Identifier used\n to uniquely identify a client. You can specify the NID as either a single address or a\n range of addresses:

\n
    \n
  • \n

    A single address is described in standard Lustre NID format by specifying\n the client’s IP address followed by the Lustre network ID (for example,\n 10.0.1.6@tcp).

    \n
  • \n
  • \n

    An address range is described using a dash to separate the range (for example,\n 10.0.[2-10].[1-255]@tcp).

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration for Lustre root squash used to restrict root-level access\n from clients that try to access your FSx for Lustre file system as root.\n Use the RootSquash parameter to enable root squash. To learn more\n about Lustre root squash,\n see Lustre root squash.

\n

You can also use the NoSquashNids parameter to provide an array of clients\n who are not affected by the root squash setting. These clients will access the file system as root,\n with unrestricted privileges.

" + } + }, "com.amazonaws.fsx#MaxResults": { "type": "integer", "traits": { @@ -7586,7 +7652,7 @@ } ], "traits": { - "smithy.api#documentation": "

Use this operation to update the configuration of an existing Amazon FSx file\n system. You can update multiple properties in a single request.

\n

For Amazon FSx for Windows File Server file systems, you can update the following\n properties:

\n
    \n
  • \n

    \n AuditLogConfiguration\n

    \n
  • \n
  • \n

    \n AutomaticBackupRetentionDays\n

    \n
  • \n
  • \n

    \n DailyAutomaticBackupStartTime\n

    \n
  • \n
  • \n

    \n SelfManagedActiveDirectoryConfiguration\n

    \n
  • \n
  • \n

    \n StorageCapacity\n

    \n
  • \n
  • \n

    \n ThroughputCapacity\n

    \n
  • \n
  • \n

    \n WeeklyMaintenanceStartTime\n

    \n
  • \n
\n

For Amazon FSx for Lustre file systems, you can update the following\n properties:

\n
    \n
  • \n

    \n AutoImportPolicy\n

    \n
  • \n
  • \n

    \n AutomaticBackupRetentionDays\n

    \n
  • \n
  • \n

    \n DailyAutomaticBackupStartTime\n

    \n
  • \n
  • \n

    \n DataCompressionType\n

    \n
  • \n
  • \n

    \n StorageCapacity\n

    \n
  • \n
  • \n

    \n WeeklyMaintenanceStartTime\n

    \n
  • \n
\n

For Amazon FSx for NetApp ONTAP file systems, you can update the following\n properties:

\n
    \n
  • \n

    \n AutomaticBackupRetentionDays\n

    \n
  • \n
  • \n

    \n DailyAutomaticBackupStartTime\n

    \n
  • \n
  • \n

    \n DiskIopsConfiguration\n

    \n
  • \n
  • \n

    \n FsxAdminPassword\n

    \n
  • \n
  • \n

    \n StorageCapacity\n

    \n
  • \n
  • \n

    \n ThroughputCapacity\n

    \n
  • \n
  • \n

    \n WeeklyMaintenanceStartTime\n

    \n
  • \n
\n

For the Amazon FSx for OpenZFS file systems, you can update the following\n properties:

\n
    \n
  • \n

    \n AutomaticBackupRetentionDays\n

    \n
  • \n
  • \n

    \n CopyTagsToBackups\n

    \n
  • \n
  • \n

    \n CopyTagsToVolumes\n

    \n
  • \n
  • \n

    \n DailyAutomaticBackupStartTime\n

    \n
  • \n
  • \n

    \n ThroughputCapacity\n

    \n
  • \n
  • \n

    \n WeeklyMaintenanceStartTime\n

    \n
  • \n
" + "smithy.api#documentation": "

Use this operation to update the configuration of an existing Amazon FSx file\n system. You can update multiple properties in a single request.

\n

For Amazon FSx for Windows File Server file systems, you can update the following\n properties:

\n
    \n
  • \n

    \n AuditLogConfiguration\n

    \n
  • \n
  • \n

    \n AutomaticBackupRetentionDays\n

    \n
  • \n
  • \n

    \n DailyAutomaticBackupStartTime\n

    \n
  • \n
  • \n

    \n SelfManagedActiveDirectoryConfiguration\n

    \n
  • \n
  • \n

    \n StorageCapacity\n

    \n
  • \n
  • \n

    \n ThroughputCapacity\n

    \n
  • \n
  • \n

    \n WeeklyMaintenanceStartTime\n

    \n
  • \n
\n

For Amazon FSx for Lustre file systems, you can update the following\n properties:

\n
    \n
  • \n

    \n AutoImportPolicy\n

    \n
  • \n
  • \n

    \n AutomaticBackupRetentionDays\n

    \n
  • \n
  • \n

    \n DailyAutomaticBackupStartTime\n

    \n
  • \n
  • \n

    \n DataCompressionType\n

    \n
  • \n
  • \n

    \n LustreRootSquashConfiguration\n

    \n
  • \n
  • \n

    \n StorageCapacity\n

    \n
  • \n
  • \n

    \n WeeklyMaintenanceStartTime\n

    \n
  • \n
\n

For Amazon FSx for NetApp ONTAP file systems, you can update the following\n properties:

\n
    \n
  • \n

    \n AutomaticBackupRetentionDays\n

    \n
  • \n
  • \n

    \n DailyAutomaticBackupStartTime\n

    \n
  • \n
  • \n

    \n DiskIopsConfiguration\n

    \n
  • \n
  • \n

    \n FsxAdminPassword\n

    \n
  • \n
  • \n

    \n StorageCapacity\n

    \n
  • \n
  • \n

    \n ThroughputCapacity\n

    \n
  • \n
  • \n

    \n WeeklyMaintenanceStartTime\n

    \n
  • \n
\n

For the Amazon FSx for OpenZFS file systems, you can update the following\n properties:

\n
    \n
  • \n

    \n AutomaticBackupRetentionDays\n

    \n
  • \n
  • \n

    \n CopyTagsToBackups\n

    \n
  • \n
  • \n

    \n CopyTagsToVolumes\n

    \n
  • \n
  • \n

    \n DailyAutomaticBackupStartTime\n

    \n
  • \n
  • \n

    \n ThroughputCapacity\n

    \n
  • \n
  • \n

    \n WeeklyMaintenanceStartTime\n

    \n
  • \n
" } }, "com.amazonaws.fsx#UpdateFileSystemLustreConfiguration": { @@ -7621,6 +7687,12 @@ "traits": { "smithy.api#documentation": "

The Lustre logging configuration used when updating an Amazon FSx for Lustre\n file system. When logging is enabled, Lustre logs error and warning events for\n data repositories associated with your file system to Amazon CloudWatch Logs.

" } + }, + "RootSquashConfiguration": { + "target": "com.amazonaws.fsx#LustreRootSquashConfiguration", + "traits": { + "smithy.api#documentation": "

The Lustre root squash configuration used when updating an Amazon FSx for Lustre\n file system. When enabled, root squash restricts root-level access from clients that\n try to access your file system as a root user.

" + } } }, "traits": { diff --git a/aws/sdk/aws-models/gamesparks.json b/aws/sdk/aws-models/gamesparks.json index 3b75c100323..5779d90749b 100644 --- a/aws/sdk/aws-models/gamesparks.json +++ b/aws/sdk/aws-models/gamesparks.json @@ -481,6 +481,26 @@ "smithy.api#pattern": "^\\S(.*\\S)?$" } }, + "com.amazonaws.gamesparks#DeploymentResult": { + "type": "structure", + "members": { + "ResultCode": { + "target": "com.amazonaws.gamesparks#ResultCode", + "traits": { + "smithy.api#documentation": "

The type of deployment result.

" + } + }, + "Message": { + "target": "com.amazonaws.gamesparks#Message", + "traits": { + "smithy.api#documentation": "

Details about the deployment result.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of the deployment.

" + } + }, "com.amazonaws.gamesparks#DeploymentState": { "type": "string", "traits": { @@ -2589,6 +2609,9 @@ } } }, + "com.amazonaws.gamesparks#Message": { + "type": "string" + }, "com.amazonaws.gamesparks#NextToken": { "type": "string", "traits": { @@ -2670,6 +2693,25 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.gamesparks#ResultCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SUCCESS", + "name": "SUCCESS" + }, + { + "value": "INVALID_ROLE_FAILURE", + "name": "INVALID_ROLE_FAILURE" + }, + { + "value": "UNSPECIFIED_FAILURE", + "name": "UNSPECIFIED_FAILURE" + } + ] + } + }, "com.amazonaws.gamesparks#RoleARN": { "type": "string", "traits": { @@ -2941,6 +2983,12 @@ "traits": { "smithy.api#documentation": "

The timestamp of when the deployment was last updated.

" } + }, + "DeploymentResult": { + "target": "com.amazonaws.gamesparks#DeploymentResult", + "traits": { + "smithy.api#documentation": "

The result of the deployment.

" + } } }, "traits": { @@ -2985,6 +3033,12 @@ "traits": { "smithy.api#documentation": "

The timestamp of when the deployment was last updated.

" } + }, + "DeploymentResult": { + "target": "com.amazonaws.gamesparks#DeploymentResult", + "traits": { + "smithy.api#documentation": "

The result of the deployment.

" + } } }, "traits": { diff --git a/aws/sdk/aws-models/glue.json b/aws/sdk/aws-models/glue.json index e05cd87b645..e55a4fa8a51 100644 --- a/aws/sdk/aws-models/glue.json +++ b/aws/sdk/aws-models/glue.json @@ -673,6 +673,15 @@ "target": "com.amazonaws.glue#Action" } }, + "com.amazonaws.glue#AdditionalOptions": { + "type": "map", + "key": { + "target": "com.amazonaws.glue#EnclosedInStringProperty" + }, + "value": { + "target": "com.amazonaws.glue#EnclosedInStringProperty" + } + }, "com.amazonaws.glue#AdditionalPlanOptionsMap": { "type": "map", "key": { @@ -682,6 +691,143 @@ "target": "com.amazonaws.glue#GenericString" } }, + "com.amazonaws.glue#AggFunction": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "avg", + "name": "avg" + }, + { + "value": "countDistinct", + "name": "countDistinct" + }, + { + "value": "count", + "name": "count" + }, + { + "value": "first", + "name": "first" + }, + { + "value": "last", + "name": "last" + }, + { + "value": "kurtosis", + "name": "kurtosis" + }, + { + "value": "max", + "name": "max" + }, + { + "value": "min", + "name": "min" + }, + { + "value": "skewness", + "name": "skewness" + }, + { + "value": "stddev_samp", + "name": "stddev_samp" + }, + { + "value": "stddev_pop", + "name": "stddev_pop" + }, + { + "value": "sum", + "name": "sum" + }, + { + "value": "sumDistinct", + "name": "sumDistinct" + }, + { + "value": "var_samp", + "name": "var_samp" + }, + { + "value": "var_pop", + "name": "var_pop" + } + ] + } + }, + "com.amazonaws.glue#Aggregate": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

Specifies the fields and rows to use as inputs for the aggregate transform.

", + "smithy.api#required": {} + } + }, + "Groups": { + "target": "com.amazonaws.glue#GlueStudioPathList", + "traits": { + "smithy.api#documentation": "

Specifies the fields to group by.

", + "smithy.api#required": {} + } + }, + "Aggs": { + "target": "com.amazonaws.glue#AggregateOperations", + "traits": { + "smithy.api#documentation": "

Specifies the aggregate functions to be performed on specified fields.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that groups rows by chosen fields and computes the aggregated value by specified function.

" + } + }, + "com.amazonaws.glue#AggregateOperation": { + "type": "structure", + "members": { + "Column": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

Specifies the column on the data set on which the aggregation function will be applied.

", + "smithy.api#required": {} + } + }, + "AggFunc": { + "target": "com.amazonaws.glue#AggFunction", + "traits": { + "smithy.api#documentation": "

Specifies the aggregation function to apply.

\n

Possible aggregation functions include: avg countDistinct, count, first, last, kurtosis, max, min, skewness, \n stddev_samp, stddev_pop, sum, sumDistinct, var_samp, var_pop

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the set of parameters needed to perform aggregation in the aggregate transform.

" + } + }, + "com.amazonaws.glue#AggregateOperations": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#AggregateOperation" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 30 + } + } + }, "com.amazonaws.glue#AlreadyExistsException": { "type": "structure", "members": { @@ -697,6 +843,90 @@ "smithy.api#error": "client" } }, + "com.amazonaws.glue#ApplyMapping": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "Mapping": { + "target": "com.amazonaws.glue#Mappings", + "traits": { + "smithy.api#documentation": "

Specifies the mapping of data property keys in the data source to data property keys in the data target.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that maps data property keys in the data source to data property keys in the data target. You can rename keys, modify the data types for keys, and choose which keys to drop from the dataset.

" + } + }, + "com.amazonaws.glue#AthenaConnectorSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "ConnectionName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the connection that is associated with the connector.

", + "smithy.api#required": {} + } + }, + "ConnectorName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of a connector that assists with accessing the data store in Glue Studio.

", + "smithy.api#required": {} + } + }, + "ConnectionType": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The type of connection, such as marketplace.athena or custom.athena, designating a connection to an Amazon Athena data store.

", + "smithy.api#required": {} + } + }, + "ConnectionTable": { + "target": "com.amazonaws.glue#EnclosedInStringPropertyWithQuote", + "traits": { + "smithy.api#documentation": "

The name of the table in the data source.

" + } + }, + "SchemaName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the Cloudwatch log group to read from. For example, /aws-glue/jobs/output.

", + "smithy.api#required": {} + } + }, + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", + "traits": { + "smithy.api#documentation": "

Specifies the data schema for the custom Athena source.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a connector to an Amazon Athena data source.

" + } + }, "com.amazonaws.glue#AttemptCount": { "type": "integer" }, @@ -800,6 +1030,42 @@ "target": "com.amazonaws.glue#BackfillError" } }, + "com.amazonaws.glue#BasicCatalogTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of your data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The database that contains the table you want to use as the target. This database must already exist in the Data Catalog.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The table that defines the schema of your output data. This table must already exist in the Data Catalog.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a target that uses a Glue Data Catalog table.

" + } + }, "com.amazonaws.glue#BatchCreatePartition": { "type": "operation", "input": { @@ -2271,6 +2537,55 @@ } } }, + "com.amazonaws.glue#BoxedBoolean": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.glue#BoxedDoubleFraction": { + "type": "double", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.glue#BoxedLong": { + "type": "long", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.glue#BoxedNonNegativeInt": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.glue#BoxedNonNegativeLong": { + "type": "long", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.glue#BoxedPositiveInt": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0 + } + } + }, "com.amazonaws.glue#CancelMLTaskRun": { "type": "operation", "input": { @@ -2489,48 +2804,206 @@ "smithy.api#documentation": "

A structure containing migration status information.

" } }, - "com.amazonaws.glue#CatalogTablesList": { - "type": "list", - "member": { - "target": "com.amazonaws.glue#NameString" - }, - "traits": { - "smithy.api#length": { - "min": 1 - } - } - }, - "com.amazonaws.glue#CatalogTarget": { + "com.amazonaws.glue#CatalogKafkaSource": { "type": "structure", "members": { - "DatabaseName": { - "target": "com.amazonaws.glue#NameString", + "Name": { + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

The name of the database to be synchronized.

", + "smithy.api#documentation": "

The name of the data store.

", "smithy.api#required": {} } }, - "Tables": { - "target": "com.amazonaws.glue#CatalogTablesList", + "WindowSize": { + "target": "com.amazonaws.glue#BoxedPositiveInt", "traits": { - "smithy.api#documentation": "

A list of the tables to be synchronized.

", + "smithy.api#box": {}, + "smithy.api#documentation": "

The amount of time to spend processing each micro batch.

" + } + }, + "DetectSchema": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

Whether to automatically determine the schema from the incoming data.

" + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to read from.

", "smithy.api#required": {} } }, - "ConnectionName": { - "target": "com.amazonaws.glue#ConnectionName", + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

The name of the connection for an Amazon S3-backed Data Catalog table to be a target of the crawl when using a Catalog connection type paired with a NETWORK Connection type.

" + "smithy.api#documentation": "

The name of the database to read from.

", + "smithy.api#required": {} + } + }, + "StreamingOptions": { + "target": "com.amazonaws.glue#KafkaStreamingSourceOptions", + "traits": { + "smithy.api#documentation": "

Specifies the streaming options.

" + } + }, + "DataPreviewOptions": { + "target": "com.amazonaws.glue#StreamingDataPreviewOptions", + "traits": { + "smithy.api#documentation": "

Specifies options related to data preview for viewing a sample of your data.

" } } }, "traits": { - "smithy.api#documentation": "

Specifies an Glue Data Catalog target.

" + "smithy.api#documentation": "

Specifies an Apache Kafka data store in the Data Catalog.

" } }, - "com.amazonaws.glue#CatalogTargetList": { - "type": "list", - "member": { + "com.amazonaws.glue#CatalogKinesisSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "WindowSize": { + "target": "com.amazonaws.glue#BoxedPositiveInt", + "traits": { + "smithy.api#documentation": "

The amount of time to spend processing each micro batch.

" + } + }, + "DetectSchema": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

Whether to automatically determine the schema from the incoming data.

" + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to read from.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to read from.

", + "smithy.api#required": {} + } + }, + "StreamingOptions": { + "target": "com.amazonaws.glue#KinesisStreamingSourceOptions", + "traits": { + "smithy.api#documentation": "

Additional options for the Kinesis streaming data source.

" + } + }, + "DataPreviewOptions": { + "target": "com.amazonaws.glue#StreamingDataPreviewOptions", + "traits": { + "smithy.api#documentation": "

Additional options for data preview.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a Kinesis data source in the Glue Data Catalog.

" + } + }, + "com.amazonaws.glue#CatalogSchemaChangePolicy": { + "type": "structure", + "members": { + "EnableUpdateCatalog": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Whether to use the specified update behavior when the crawler finds a changed schema.

" + } + }, + "UpdateBehavior": { + "target": "com.amazonaws.glue#UpdateCatalogBehavior", + "traits": { + "smithy.api#documentation": "

The update behavior when the crawler finds a changed schema.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A policy that specifies update behavior for the crawler.

" + } + }, + "com.amazonaws.glue#CatalogSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data store.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to read from.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a data store in the Glue Data Catalog.

" + } + }, + "com.amazonaws.glue#CatalogTablesList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NameString" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.glue#CatalogTarget": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the database to be synchronized.

", + "smithy.api#required": {} + } + }, + "Tables": { + "target": "com.amazonaws.glue#CatalogTablesList", + "traits": { + "smithy.api#documentation": "

A list of the tables to be synchronized.

", + "smithy.api#required": {} + } + }, + "ConnectionName": { + "target": "com.amazonaws.glue#ConnectionName", + "traits": { + "smithy.api#documentation": "

The name of the connection for an Amazon S3-backed Data Catalog table to be a target of the crawl when using a Catalog connection type paired with a NETWORK Connection type.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies an Glue Data Catalog target.

" + } + }, + "com.amazonaws.glue#CatalogTargetList": { + "type": "list", + "member": { "target": "com.amazonaws.glue#CatalogTarget" } }, @@ -2681,196 +3154,510 @@ "com.amazonaws.glue#CodeGenArgValue": { "type": "string" }, - "com.amazonaws.glue#CodeGenEdge": { + "com.amazonaws.glue#CodeGenConfigurationNode": { "type": "structure", "members": { - "Source": { - "target": "com.amazonaws.glue#CodeGenIdentifier", + "AthenaConnectorSource": { + "target": "com.amazonaws.glue#AthenaConnectorSource", "traits": { - "smithy.api#documentation": "

The ID of the node at which the edge starts.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies a connector to an Amazon Athena data source.

" } }, - "Target": { - "target": "com.amazonaws.glue#CodeGenIdentifier", + "JDBCConnectorSource": { + "target": "com.amazonaws.glue#JDBCConnectorSource", "traits": { - "smithy.api#documentation": "

The ID of the node at which the edge ends.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies a connector to a JDBC data source.

" } }, - "TargetParameter": { - "target": "com.amazonaws.glue#CodeGenArgName", + "SparkConnectorSource": { + "target": "com.amazonaws.glue#SparkConnectorSource", "traits": { - "smithy.api#documentation": "

The target of the edge.

" + "smithy.api#documentation": "

Specifies a connector to an Apache Spark data source.

" } - } - }, - "traits": { - "smithy.api#documentation": "

Represents a directional edge in a directed acyclic graph (DAG).

" - } - }, - "com.amazonaws.glue#CodeGenIdentifier": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 255 }, - "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]*$" - } - }, - "com.amazonaws.glue#CodeGenNode": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.glue#CodeGenIdentifier", + "CatalogSource": { + "target": "com.amazonaws.glue#CatalogSource", "traits": { - "smithy.api#documentation": "

A node identifier that is unique within the node's graph.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies a data store in the Glue Data Catalog.

" } }, - "NodeType": { - "target": "com.amazonaws.glue#CodeGenNodeType", + "RedshiftSource": { + "target": "com.amazonaws.glue#RedshiftSource", "traits": { - "smithy.api#documentation": "

The type of node that this is.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies an Amazon Redshift data store.

" } }, - "Args": { - "target": "com.amazonaws.glue#CodeGenNodeArgs", + "S3CatalogSource": { + "target": "com.amazonaws.glue#S3CatalogSource", "traits": { - "smithy.api#documentation": "

Properties of the node, in the form of name-value pairs.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies an Amazon S3 data store in the Glue Data Catalog.

" } }, - "LineNumber": { - "target": "com.amazonaws.glue#Integer", + "S3CsvSource": { + "target": "com.amazonaws.glue#S3CsvSource", "traits": { - "smithy.api#documentation": "

The line number of the node.

" + "smithy.api#documentation": "

Specifies a command-separated value (CSV) data store stored in Amazon S3.

" } - } - }, - "traits": { - "smithy.api#documentation": "

Represents a node in a directed acyclic graph (DAG)

" - } - }, - "com.amazonaws.glue#CodeGenNodeArg": { - "type": "structure", - "members": { - "Name": { - "target": "com.amazonaws.glue#CodeGenArgName", + }, + "S3JsonSource": { + "target": "com.amazonaws.glue#S3JsonSource", "traits": { - "smithy.api#documentation": "

The name of the argument or property.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies a JSON data store stored in Amazon S3.

" } }, - "Value": { - "target": "com.amazonaws.glue#CodeGenArgValue", + "S3ParquetSource": { + "target": "com.amazonaws.glue#S3ParquetSource", "traits": { - "smithy.api#documentation": "

The value of the argument or property.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies an Apache Parquet data store stored in Amazon S3.

" } }, - "Param": { - "target": "com.amazonaws.glue#Boolean", + "RelationalCatalogSource": { + "target": "com.amazonaws.glue#RelationalCatalogSource" + }, + "DynamoDBCatalogSource": { + "target": "com.amazonaws.glue#DynamoDBCatalogSource" + }, + "JDBCConnectorTarget": { + "target": "com.amazonaws.glue#JDBCConnectorTarget", "traits": { - "smithy.api#documentation": "

True if the value is used as a parameter.

" + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3 in Apache Parquet columnar storage.

" } - } - }, - "traits": { - "smithy.api#documentation": "

An argument or property of a node.

" - } - }, - "com.amazonaws.glue#CodeGenNodeArgs": { - "type": "list", - "member": { - "target": "com.amazonaws.glue#CodeGenNodeArg" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 50 - } - } - }, - "com.amazonaws.glue#CodeGenNodeType": { - "type": "string" - }, - "com.amazonaws.glue#Column": { - "type": "structure", - "members": { - "Name": { - "target": "com.amazonaws.glue#NameString", + }, + "SparkConnectorTarget": { + "target": "com.amazonaws.glue#SparkConnectorTarget", "traits": { - "smithy.api#documentation": "

The name of the Column.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies a target that uses an Apache Spark connector.

" } }, - "Type": { - "target": "com.amazonaws.glue#ColumnTypeString", + "CatalogTarget": { + "target": "com.amazonaws.glue#BasicCatalogTarget", "traits": { - "smithy.api#documentation": "

The data type of the Column.

" + "smithy.api#documentation": "

Specifies a target that uses a Glue Data Catalog table.

" } }, - "Comment": { - "target": "com.amazonaws.glue#CommentString", + "RedshiftTarget": { + "target": "com.amazonaws.glue#RedshiftTarget", "traits": { - "smithy.api#documentation": "

A free-form text comment.

" + "smithy.api#documentation": "

Specifies a target that uses Amazon Redshift.

" } }, - "Parameters": { - "target": "com.amazonaws.glue#ParametersMap", + "S3CatalogTarget": { + "target": "com.amazonaws.glue#S3CatalogTarget", "traits": { - "smithy.api#documentation": "

These key-value pairs define properties associated with the column.

" + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3 using the Glue Data Catalog.

" } - } - }, - "traits": { - "smithy.api#documentation": "

A column in a Table.

" - } - }, - "com.amazonaws.glue#ColumnError": { - "type": "structure", - "members": { - "ColumnName": { - "target": "com.amazonaws.glue#NameString", + }, + "S3GlueParquetTarget": { + "target": "com.amazonaws.glue#S3GlueParquetTarget", "traits": { - "smithy.api#documentation": "

The name of the column that failed.

" + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3 in Apache Parquet columnar storage.

" } }, - "Error": { - "target": "com.amazonaws.glue#ErrorDetail", + "S3DirectTarget": { + "target": "com.amazonaws.glue#S3DirectTarget", "traits": { - "smithy.api#documentation": "

An error message with the reason for the failure of an operation.

" + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3.

" } - } - }, - "traits": { - "smithy.api#documentation": "

Encapsulates a column name that failed and the reason for failure.

" - } - }, - "com.amazonaws.glue#ColumnErrors": { - "type": "list", - "member": { - "target": "com.amazonaws.glue#ColumnError" - } - }, - "com.amazonaws.glue#ColumnImportance": { - "type": "structure", - "members": { - "ColumnName": { - "target": "com.amazonaws.glue#NameString", + }, + "ApplyMapping": { + "target": "com.amazonaws.glue#ApplyMapping", "traits": { - "smithy.api#documentation": "

The name of a column.

" + "smithy.api#documentation": "

Specifies a transform that maps data property keys in the data source to data property keys in the data target. You can rename keys, modify the data types for keys, and choose which keys to drop from the dataset.

" } }, - "Importance": { - "target": "com.amazonaws.glue#GenericBoundedDouble", + "SelectFields": { + "target": "com.amazonaws.glue#SelectFields", "traits": { - "smithy.api#documentation": "

The column importance score for the column, as a decimal.

" + "smithy.api#documentation": "

Specifies a transform that chooses the data property keys that you want to keep.

" } - } + }, + "DropFields": { + "target": "com.amazonaws.glue#DropFields", + "traits": { + "smithy.api#documentation": "

Specifies a transform that chooses the data property keys that you want to drop.

" + } + }, + "RenameField": { + "target": "com.amazonaws.glue#RenameField", + "traits": { + "smithy.api#documentation": "

Specifies a transform that renames a single data property key.

" + } + }, + "Spigot": { + "target": "com.amazonaws.glue#Spigot", + "traits": { + "smithy.api#documentation": "

Specifies a transform that writes samples of the data to an Amazon S3 bucket.

" + } + }, + "Join": { + "target": "com.amazonaws.glue#Join", + "traits": { + "smithy.api#documentation": "

Specifies a transform that joins two datasets into one dataset using a comparison phrase on the specified data property keys. You can use inner, outer, left, right, left semi, and left anti joins.

" + } + }, + "SplitFields": { + "target": "com.amazonaws.glue#SplitFields", + "traits": { + "smithy.api#documentation": "

Specifies a transform that splits data property keys into two DynamicFrames. The output is a collection of DynamicFrames: one with selected data property keys, and one with the remaining data property keys.

" + } + }, + "SelectFromCollection": { + "target": "com.amazonaws.glue#SelectFromCollection", + "traits": { + "smithy.api#documentation": "

Specifies a transform that chooses one DynamicFrame from a collection of DynamicFrames. The output is the selected DynamicFrame\n

" + } + }, + "FillMissingValues": { + "target": "com.amazonaws.glue#FillMissingValues", + "traits": { + "smithy.api#documentation": "

Specifies a transform that locates records in the dataset that have missing values and adds a new field with a value determined by imputation. The input data set is used to train the machine learning model that determines what the missing value should be.

" + } + }, + "Filter": { + "target": "com.amazonaws.glue#Filter", + "traits": { + "smithy.api#documentation": "

Specifies a transform that splits a dataset into two, based on a filter condition.

" + } + }, + "CustomCode": { + "target": "com.amazonaws.glue#CustomCode", + "traits": { + "smithy.api#documentation": "

Specifies a transform that uses custom code you provide to perform the data transformation. The output is a collection of DynamicFrames.

" + } + }, + "SparkSQL": { + "target": "com.amazonaws.glue#SparkSQL", + "traits": { + "smithy.api#documentation": "

Specifies a transform where you enter a SQL query using Spark SQL syntax to transform the data. The output is a single DynamicFrame.

" + } + }, + "DirectKinesisSource": { + "target": "com.amazonaws.glue#DirectKinesisSource", + "traits": { + "smithy.api#documentation": "

Specifies a direct Amazon Kinesis data source.

" + } + }, + "DirectKafkaSource": { + "target": "com.amazonaws.glue#DirectKafkaSource", + "traits": { + "smithy.api#documentation": "

Specifies an Apache Kafka data store.

" + } + }, + "CatalogKinesisSource": { + "target": "com.amazonaws.glue#CatalogKinesisSource", + "traits": { + "smithy.api#documentation": "

Specifies a Kinesis data source in the Glue Data Catalog.

" + } + }, + "CatalogKafkaSource": { + "target": "com.amazonaws.glue#CatalogKafkaSource", + "traits": { + "smithy.api#documentation": "

Specifies an Apache Kafka data store in the Data Catalog.

" + } + }, + "DropNullFields": { + "target": "com.amazonaws.glue#DropNullFields", + "traits": { + "smithy.api#documentation": "

Specifies a transform that removes columns from the dataset if all values in the column are 'null'. By default, Glue Studio will recognize null objects, but some values such as empty strings, strings that are \"null\", -1 integers or other placeholders such as zeros, are not automatically recognized as nulls.

" + } + }, + "Merge": { + "target": "com.amazonaws.glue#Merge", + "traits": { + "smithy.api#documentation": "

Specifies a transform that merges a DynamicFrame with a staging DynamicFrame based on the specified primary keys to identify records. Duplicate records (records with the same primary keys) are not de-duplicated.

" + } + }, + "Union": { + "target": "com.amazonaws.glue#Union", + "traits": { + "smithy.api#documentation": "

Specifies a transform that combines the rows from two or more datasets into a single result.

" + } + }, + "PIIDetection": { + "target": "com.amazonaws.glue#PIIDetection", + "traits": { + "smithy.api#documentation": "

Specifies a transform that identifies, removes or masks PII data.

" + } + }, + "Aggregate": { + "target": "com.amazonaws.glue#Aggregate", + "traits": { + "smithy.api#documentation": "

Specifies a transform that groups rows by chosen fields and computes the aggregated value by specified function.

" + } + }, + "DropDuplicates": { + "target": "com.amazonaws.glue#DropDuplicates", + "traits": { + "smithy.api#documentation": "

Specifies a transform that removes rows of repeating data from a data set.

" + } + }, + "GovernedCatalogTarget": { + "target": "com.amazonaws.glue#GovernedCatalogTarget", + "traits": { + "smithy.api#documentation": "

Specifies a data target that writes to a goverened catalog.

" + } + }, + "GovernedCatalogSource": { + "target": "com.amazonaws.glue#GovernedCatalogSource", + "traits": { + "smithy.api#documentation": "

Specifies a data source in a goverened Data Catalog.

" + } + }, + "MicrosoftSQLServerCatalogSource": { + "target": "com.amazonaws.glue#MicrosoftSQLServerCatalogSource", + "traits": { + "smithy.api#documentation": "

Specifies a Microsoft SQL server data source in the Glue Data Catalog.

" + } + }, + "MySQLCatalogSource": { + "target": "com.amazonaws.glue#MySQLCatalogSource", + "traits": { + "smithy.api#documentation": "

Specifies a MySQL data source in the Glue Data Catalog.

" + } + }, + "OracleSQLCatalogSource": { + "target": "com.amazonaws.glue#OracleSQLCatalogSource", + "traits": { + "smithy.api#documentation": "

Specifies an Oracle data source in the Glue Data Catalog.

" + } + }, + "PostgreSQLCatalogSource": { + "target": "com.amazonaws.glue#PostgreSQLCatalogSource", + "traits": { + "smithy.api#documentation": "

Specifies a PostgresSQL data source in the Glue Data Catalog.

" + } + }, + "MicrosoftSQLServerCatalogTarget": { + "target": "com.amazonaws.glue#MicrosoftSQLServerCatalogTarget", + "traits": { + "smithy.api#documentation": "

Specifies a target that uses Microsoft SQL.

" + } + }, + "MySQLCatalogTarget": { + "target": "com.amazonaws.glue#MySQLCatalogTarget", + "traits": { + "smithy.api#documentation": "

Specifies a target that uses MySQL.

" + } + }, + "OracleSQLCatalogTarget": { + "target": "com.amazonaws.glue#OracleSQLCatalogTarget", + "traits": { + "smithy.api#documentation": "

Specifies a target that uses Oracle SQL.

" + } + }, + "PostgreSQLCatalogTarget": { + "target": "com.amazonaws.glue#PostgreSQLCatalogTarget", + "traits": { + "smithy.api#documentation": "

Specifies a target that uses Postgres SQL.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n CodeGenConfigurationNode enumerates all valid Node types. One and only one of its member variables can be populated.

" + } + }, + "com.amazonaws.glue#CodeGenConfigurationNodes": { + "type": "map", + "key": { + "target": "com.amazonaws.glue#NodeId" + }, + "value": { + "target": "com.amazonaws.glue#CodeGenConfigurationNode" + }, + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.glue#CodeGenEdge": { + "type": "structure", + "members": { + "Source": { + "target": "com.amazonaws.glue#CodeGenIdentifier", + "traits": { + "smithy.api#documentation": "

The ID of the node at which the edge starts.

", + "smithy.api#required": {} + } + }, + "Target": { + "target": "com.amazonaws.glue#CodeGenIdentifier", + "traits": { + "smithy.api#documentation": "

The ID of the node at which the edge ends.

", + "smithy.api#required": {} + } + }, + "TargetParameter": { + "target": "com.amazonaws.glue#CodeGenArgName", + "traits": { + "smithy.api#documentation": "

The target of the edge.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents a directional edge in a directed acyclic graph (DAG).

" + } + }, + "com.amazonaws.glue#CodeGenIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + } + }, + "com.amazonaws.glue#CodeGenNode": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.glue#CodeGenIdentifier", + "traits": { + "smithy.api#documentation": "

A node identifier that is unique within the node's graph.

", + "smithy.api#required": {} + } + }, + "NodeType": { + "target": "com.amazonaws.glue#CodeGenNodeType", + "traits": { + "smithy.api#documentation": "

The type of node that this is.

", + "smithy.api#required": {} + } + }, + "Args": { + "target": "com.amazonaws.glue#CodeGenNodeArgs", + "traits": { + "smithy.api#documentation": "

Properties of the node, in the form of name-value pairs.

", + "smithy.api#required": {} + } + }, + "LineNumber": { + "target": "com.amazonaws.glue#Integer", + "traits": { + "smithy.api#documentation": "

The line number of the node.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents a node in a directed acyclic graph (DAG)

" + } + }, + "com.amazonaws.glue#CodeGenNodeArg": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#CodeGenArgName", + "traits": { + "smithy.api#documentation": "

The name of the argument or property.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.glue#CodeGenArgValue", + "traits": { + "smithy.api#documentation": "

The value of the argument or property.

", + "smithy.api#required": {} + } + }, + "Param": { + "target": "com.amazonaws.glue#Boolean", + "traits": { + "smithy.api#documentation": "

True if the value is used as a parameter.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An argument or property of a node.

" + } + }, + "com.amazonaws.glue#CodeGenNodeArgs": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#CodeGenNodeArg" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.glue#CodeGenNodeType": { + "type": "string" + }, + "com.amazonaws.glue#Column": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the Column.

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.glue#ColumnTypeString", + "traits": { + "smithy.api#documentation": "

The data type of the Column.

" + } + }, + "Comment": { + "target": "com.amazonaws.glue#CommentString", + "traits": { + "smithy.api#documentation": "

A free-form text comment.

" + } + }, + "Parameters": { + "target": "com.amazonaws.glue#ParametersMap", + "traits": { + "smithy.api#documentation": "

These key-value pairs define properties associated with the column.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A column in a Table.

" + } + }, + "com.amazonaws.glue#ColumnError": { + "type": "structure", + "members": { + "ColumnName": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the column that failed.

" + } + }, + "Error": { + "target": "com.amazonaws.glue#ErrorDetail", + "traits": { + "smithy.api#documentation": "

An error message with the reason for the failure of an operation.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Encapsulates a column name that failed and the reason for failure.

" + } + }, + "com.amazonaws.glue#ColumnErrors": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#ColumnError" + } + }, + "com.amazonaws.glue#ColumnImportance": { + "type": "structure", + "members": { + "ColumnName": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of a column.

" + } + }, + "Importance": { + "target": "com.amazonaws.glue#GenericBoundedDouble", + "traits": { + "smithy.api#documentation": "

The column importance score for the column, as a decimal.

" + } + } }, "traits": { "smithy.api#documentation": "

A structure containing the column name and column importance score for a column.

\n\t\n\t

Column importance helps you understand how columns contribute to your model, by identifying which columns in your records are more important than others.

" @@ -3176,6 +3963,21 @@ ] } }, + "com.amazonaws.glue#CompressionType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "gzip", + "name": "GZIP" + }, + { + "value": "bzip2", + "name": "BZIP2" + } + ] + } + }, "com.amazonaws.glue#ConcurrentModificationException": { "type": "structure", "members": { @@ -5022,6 +5824,12 @@ "traits": { "smithy.api#documentation": "

The type of predefined worker that is allocated when a job runs. Accepts a value of Standard, G.1X, or G.2X.

\n\t
    \n
  • \n

    For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.

    \n
  • \n
  • \n

    For the G.1X worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.

    \n
  • \n
  • \n

    For the G.2X worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.

    \n
  • \n
" } + }, + "CodeGenConfigurationNodes": { + "target": "com.amazonaws.glue#CodeGenConfigurationNodes", + "traits": { + "smithy.api#documentation": "

The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.

" + } } } }, @@ -6359,6 +7167,48 @@ "smithy.api#pattern": "^[^\\r\\n]$" } }, + "com.amazonaws.glue#CustomCode": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#ManyInputs", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "Code": { + "target": "com.amazonaws.glue#ExtendedString", + "traits": { + "smithy.api#documentation": "

The custom code that is used to perform the data transformation.

", + "smithy.api#required": {} + } + }, + "ClassName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name defined for the custom code node class.

", + "smithy.api#required": {} + } + }, + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", + "traits": { + "smithy.api#documentation": "

Specifies the data schema for the custom code transform.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that uses custom code you provide to perform the data transformation. The output is a collection of DynamicFrames.

" + } + }, "com.amazonaws.glue#CustomEntityType": { "type": "structure", "members": { @@ -6620,6 +7470,28 @@ "com.amazonaws.glue#DatabaseName": { "type": "string" }, + "com.amazonaws.glue#Datatype": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.glue#GenericLimitedString", + "traits": { + "smithy.api#documentation": "

The datatype of the value.

", + "smithy.api#required": {} + } + }, + "Label": { + "target": "com.amazonaws.glue#GenericLimitedString", + "traits": { + "smithy.api#documentation": "

A label assigned to the datatype.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure representing the datatype of the value.

" + } + }, "com.amazonaws.glue#DateColumnStatisticsData": { "type": "structure", "members": { @@ -8281,46 +9153,280 @@ } } }, + "com.amazonaws.glue#DirectKafkaSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data store.

", + "smithy.api#required": {} + } + }, + "StreamingOptions": { + "target": "com.amazonaws.glue#KafkaStreamingSourceOptions", + "traits": { + "smithy.api#documentation": "

Specifies the streaming options.

" + } + }, + "WindowSize": { + "target": "com.amazonaws.glue#BoxedPositiveInt", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The amount of time to spend processing each micro batch.

" + } + }, + "DetectSchema": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

Whether to automatically determine the schema from the incoming data.

" + } + }, + "DataPreviewOptions": { + "target": "com.amazonaws.glue#StreamingDataPreviewOptions", + "traits": { + "smithy.api#documentation": "

Specifies options related to data preview for viewing a sample of your data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies an Apache Kafka data store.

" + } + }, + "com.amazonaws.glue#DirectKinesisSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "WindowSize": { + "target": "com.amazonaws.glue#BoxedPositiveInt", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

The amount of time to spend processing each micro batch.

" + } + }, + "DetectSchema": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

Whether to automatically determine the schema from the incoming data.

" + } + }, + "StreamingOptions": { + "target": "com.amazonaws.glue#KinesisStreamingSourceOptions", + "traits": { + "smithy.api#documentation": "

Additional options for the Kinesis streaming data source.

" + } + }, + "DataPreviewOptions": { + "target": "com.amazonaws.glue#StreamingDataPreviewOptions", + "traits": { + "smithy.api#documentation": "

Additional options for data preview.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a direct Amazon Kinesis data source.

" + } + }, + "com.amazonaws.glue#DirectSchemaChangePolicy": { + "type": "structure", + "members": { + "EnableUpdateCatalog": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Whether to use the specified update behavior when the crawler finds a changed schema.

" + } + }, + "UpdateBehavior": { + "target": "com.amazonaws.glue#UpdateCatalogBehavior", + "traits": { + "smithy.api#documentation": "

The update behavior when the crawler finds a changed schema.

" + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Specifies the table in the database that the schema change policy applies to.

" + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Specifies the database that the schema change policy applies to.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A policy that specifies update behavior for the crawler.

" + } + }, "com.amazonaws.glue#Double": { "type": "double" }, - "com.amazonaws.glue#DoubleColumnStatisticsData": { + "com.amazonaws.glue#DoubleColumnStatisticsData": { + "type": "structure", + "members": { + "MinimumValue": { + "target": "com.amazonaws.glue#Double", + "traits": { + "smithy.api#documentation": "

The lowest value in the column.

" + } + }, + "MaximumValue": { + "target": "com.amazonaws.glue#Double", + "traits": { + "smithy.api#documentation": "

The highest value in the column.

" + } + }, + "NumberOfNulls": { + "target": "com.amazonaws.glue#NonNegativeLong", + "traits": { + "smithy.api#documentation": "

The number of null values in the column.

", + "smithy.api#required": {} + } + }, + "NumberOfDistinctValues": { + "target": "com.amazonaws.glue#NonNegativeLong", + "traits": { + "smithy.api#documentation": "

The number of distinct values in a column.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Defines column statistics supported for floating-point number data columns.

" + } + }, + "com.amazonaws.glue#DoubleValue": { + "type": "double" + }, + "com.amazonaws.glue#DropDuplicates": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "Columns": { + "target": "com.amazonaws.glue#LimitedPathList", + "traits": { + "smithy.api#documentation": "

The name of the columns to be merged or removed if repeating.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that removes rows of repeating data from a data set.

" + } + }, + "com.amazonaws.glue#DropFields": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "Paths": { + "target": "com.amazonaws.glue#GlueStudioPathList", + "traits": { + "smithy.api#documentation": "

A JSON path to a variable in the data structure.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that chooses the data property keys that you want to drop.

" + } + }, + "com.amazonaws.glue#DropNullFields": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "NullCheckBoxList": { + "target": "com.amazonaws.glue#NullCheckBoxList", + "traits": { + "smithy.api#documentation": "

A structure that represents whether certain values are recognized as null values for removal.

" + } + }, + "NullTextList": { + "target": "com.amazonaws.glue#NullValueFields", + "traits": { + "smithy.api#documentation": "

A structure that specifies a list of NullValueField structures that represent a custom null value such as zero or other value being used as a null placeholder unique to the dataset.

\n\n

The DropNullFields transform removes custom null values only if both the value of the null placeholder and the datatype match the data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that removes columns from the dataset if all values in the column are 'null'. By default, Glue Studio will recognize null objects, but some values such as empty strings, strings that are \"null\", -1 integers or other placeholders such as zeros, are not automatically recognized as nulls.

" + } + }, + "com.amazonaws.glue#DynamoDBCatalogSource": { "type": "structure", "members": { - "MinimumValue": { - "target": "com.amazonaws.glue#Double", - "traits": { - "smithy.api#documentation": "

The lowest value in the column.

" - } - }, - "MaximumValue": { - "target": "com.amazonaws.glue#Double", + "Name": { + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

The highest value in the column.

" + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} } }, - "NumberOfNulls": { - "target": "com.amazonaws.glue#NonNegativeLong", + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

The number of null values in the column.

", + "smithy.api#documentation": "

The name of the database to read from.

", "smithy.api#required": {} } }, - "NumberOfDistinctValues": { - "target": "com.amazonaws.glue#NonNegativeLong", + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

The number of distinct values in a column.

", + "smithy.api#documentation": "

The name of the table in the database to read from.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Defines column statistics supported for floating-point number data columns.

" + "smithy.api#documentation": "

Specifies a DynamoDB data source in the Glue Data Catalog.

" } }, - "com.amazonaws.glue#DoubleValue": { - "type": "double" - }, "com.amazonaws.glue#DynamoDBTarget": { "type": "structure", "members": { @@ -8394,6 +9500,30 @@ ] } }, + "com.amazonaws.glue#EnclosedInStringProperties": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#EnclosedInStringProperty" + } + }, + "com.amazonaws.glue#EnclosedInStringPropertiesMinOne": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#EnclosedInStringProperty" + } + }, + "com.amazonaws.glue#EnclosedInStringProperty": { + "type": "string", + "traits": { + "smithy.api#pattern": "^([\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF]|[^\\S\\r\\n\"'])*$" + } + }, + "com.amazonaws.glue#EnclosedInStringPropertyWithQuote": { + "type": "string", + "traits": { + "smithy.api#pattern": "^([\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF]|[^\\S\\r\\n])*$" + } + }, "com.amazonaws.glue#EncryptionAtRest": { "type": "structure", "members": { @@ -8609,9 +9739,170 @@ "smithy.api#documentation": "

Specifies configuration properties for an exporting labels task run.

" } }, + "com.amazonaws.glue#ExtendedString": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[\\s\\S]*$" + } + }, "com.amazonaws.glue#FieldType": { "type": "string" }, + "com.amazonaws.glue#FillMissingValues": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "ImputedPath": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

A JSON path to a variable in the data structure for the dataset that is imputed.

", + "smithy.api#required": {} + } + }, + "FilledPath": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

A JSON path to a variable in the data structure for the dataset that is filled.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that locates records in the dataset that have missing values and adds a new field with a value determined by imputation. The input data set is used to train the machine learning model that determines what the missing value should be.

" + } + }, + "com.amazonaws.glue#Filter": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "LogicalOperator": { + "target": "com.amazonaws.glue#FilterLogicalOperator", + "traits": { + "smithy.api#documentation": "

The operator used to filter rows by comparing the key value to a specified value.

", + "smithy.api#required": {} + } + }, + "Filters": { + "target": "com.amazonaws.glue#FilterExpressions", + "traits": { + "smithy.api#documentation": "

Specifies a filter expression.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that splits a dataset into two, based on a filter condition.

" + } + }, + "com.amazonaws.glue#FilterExpression": { + "type": "structure", + "members": { + "Operation": { + "target": "com.amazonaws.glue#FilterOperation", + "traits": { + "smithy.api#documentation": "

The type of operation to perform in the expression.

", + "smithy.api#required": {} + } + }, + "Negated": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Whether the expression is to be negated.

" + } + }, + "Values": { + "target": "com.amazonaws.glue#FilterValues", + "traits": { + "smithy.api#documentation": "

A list of filter values.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a filter expression.

" + } + }, + "com.amazonaws.glue#FilterExpressions": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#FilterExpression" + } + }, + "com.amazonaws.glue#FilterLogicalOperator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AND", + "name": "AND" + }, + { + "value": "OR", + "name": "OR" + } + ] + } + }, + "com.amazonaws.glue#FilterOperation": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EQ", + "name": "EQ" + }, + { + "value": "LT", + "name": "LT" + }, + { + "value": "GT", + "name": "GT" + }, + { + "value": "LTE", + "name": "LTE" + }, + { + "value": "GTE", + "name": "GTE" + }, + { + "value": "REGEX", + "name": "REGEX" + }, + { + "value": "ISNULL", + "name": "ISNULL" + } + ] + } + }, "com.amazonaws.glue#FilterString": { "type": "string", "traits": { @@ -8622,6 +9913,49 @@ "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" } }, + "com.amazonaws.glue#FilterValue": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.glue#FilterValueType", + "traits": { + "smithy.api#documentation": "

The type of filter value.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

The value to be associated.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents a single entry in the list of values for a FilterExpression.

" + } + }, + "com.amazonaws.glue#FilterValueType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "COLUMNEXTRACTED", + "name": "COLUMNEXTRACTED" + }, + { + "value": "CONSTANT", + "name": "CONSTANT" + } + ] + } + }, + "com.amazonaws.glue#FilterValues": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#FilterValue" + } + }, "com.amazonaws.glue#FindMatchesMetrics": { "type": "structure", "members": { @@ -8753,6 +10087,12 @@ } } }, + "com.amazonaws.glue#GenericLimitedString": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[A-Za-z0-9_-]*$" + } + }, "com.amazonaws.glue#GenericMap": { "type": "map", "key": { @@ -13198,6 +14538,53 @@ "smithy.api#documentation": "

A structure for returning a resource policy.

" } }, + "com.amazonaws.glue#GlueRecordType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DATE", + "name": "DATE" + }, + { + "value": "STRING", + "name": "STRING" + }, + { + "value": "TIMESTAMP", + "name": "TIMESTAMP" + }, + { + "value": "INT", + "name": "INT" + }, + { + "value": "FLOAT", + "name": "FLOAT" + }, + { + "value": "LONG", + "name": "LONG" + }, + { + "value": "BIGDECIMAL", + "name": "BIGDECIMAL" + }, + { + "value": "BYTE", + "name": "BYTE" + }, + { + "value": "SHORT", + "name": "SHORT" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + } + ] + } + }, "com.amazonaws.glue#GlueResourceArn": { "type": "string", "traits": { @@ -13208,6 +14595,69 @@ "smithy.api#pattern": "^arn:(aws|aws-us-gov|aws-cn):glue:" } }, + "com.amazonaws.glue#GlueSchema": { + "type": "structure", + "members": { + "Columns": { + "target": "com.amazonaws.glue#GlueStudioSchemaColumnList", + "traits": { + "smithy.api#documentation": "

Specifies the column definitions that make up a Glue schema.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a user-defined schema when a schema cannot be determined by AWS Glue.

" + } + }, + "com.amazonaws.glue#GlueSchemas": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#GlueSchema" + } + }, + "com.amazonaws.glue#GlueStudioColumnNameString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" + } + }, + "com.amazonaws.glue#GlueStudioPathList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#EnclosedInStringProperties" + } + }, + "com.amazonaws.glue#GlueStudioSchemaColumn": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#GlueStudioColumnNameString", + "traits": { + "smithy.api#documentation": "

The name of the column in the Glue Studio schema.

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.glue#ColumnTypeString", + "traits": { + "smithy.api#documentation": "

The hive type for this column in the Glue Studio schema.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a single column in a Glue schema definition.

" + } + }, + "com.amazonaws.glue#GlueStudioSchemaColumnList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#GlueStudioSchemaColumn" + } + }, "com.amazonaws.glue#GlueTable": { "type": "structure", "members": { @@ -13264,6 +14714,95 @@ "smithy.api#pattern": "^\\w+\\.\\w+$" } }, + "com.amazonaws.glue#GovernedCatalogSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data store.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The database table to read from.

", + "smithy.api#required": {} + } + }, + "PartitionPredicate": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Partitions satisfying this predicate are deleted. Files within the retention period in these partitions are not deleted. Set to \"\" – empty by default.

" + } + }, + "AdditionalOptions": { + "target": "com.amazonaws.glue#S3SourceAdditionalOptions", + "traits": { + "smithy.api#documentation": "

Specifies additional connection options.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the data store in the governed Glue Data Catalog.

" + } + }, + "com.amazonaws.glue#GovernedCatalogTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "PartitionKeys": { + "target": "com.amazonaws.glue#GlueStudioPathList", + "traits": { + "smithy.api#documentation": "

Specifies native partitioning using a sequence of keys.

" + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to write to.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to write to.

", + "smithy.api#required": {} + } + }, + "SchemaChangePolicy": { + "target": "com.amazonaws.glue#CatalogSchemaChangePolicy", + "traits": { + "smithy.api#documentation": "

A policy that specifies update behavior for the governed catalog.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3 using the Glue Data Catalog.

" + } + }, "com.amazonaws.glue#GrokClassifier": { "type": "structure", "members": { @@ -13496,31 +15035,381 @@ "traits": { "smithy.api#documentation": "

A message describing the problem.

" } - } - }, - "traits": { - "smithy.api#documentation": "

The input provided was not valid.

", - "smithy.api#error": "client" + } + }, + "traits": { + "smithy.api#documentation": "

The input provided was not valid.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.glue#InvalidStateException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.glue#MessageString", + "traits": { + "smithy.api#documentation": "

A message describing the problem.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An error that indicates your data is in an invalid state.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.glue#IsVersionValid": { + "type": "boolean" + }, + "com.amazonaws.glue#JDBCConnectorOptions": { + "type": "structure", + "members": { + "FilterPredicate": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Extra condition clause to filter data from source. For example:

\n\t\n\t

\n BillingCity='Mountain View'\n

\n\t\n\t

When using a query instead of a table name, you should validate that the query works with the specified filterPredicate.

" + } + }, + "PartitionColumn": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of an integer column that is used for partitioning. This option works only when it's included with lowerBound, upperBound, and numPartitions. This option works the same way as in the Spark SQL JDBC reader.

" + } + }, + "LowerBound": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The minimum value of partitionColumn that is used to decide partition stride.

" + } + }, + "UpperBound": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The maximum value of partitionColumn that is used to decide partition stride.

" + } + }, + "NumPartitions": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The number of partitions. This value, along with lowerBound (inclusive) and upperBound (exclusive), form partition strides for generated WHERE clause expressions that are used to split the partitionColumn.

" + } + }, + "JobBookmarkKeys": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

The name of the job bookmark keys on which to sort.

" + } + }, + "JobBookmarkKeysSortOrder": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Specifies an ascending or descending sort order.

" + } + }, + "DataTypeMapping": { + "target": "com.amazonaws.glue#JDBCDataTypeMapping", + "traits": { + "smithy.api#documentation": "

Custom data type mapping that builds a mapping from a JDBC data type to an Glue data type. For example, the option \"dataTypeMapping\":{\"FLOAT\":\"STRING\"} maps data fields of JDBC type FLOAT into the Java String type by calling the ResultSet.getString() method of the driver, and uses it to build the Glue record. The ResultSet object is implemented by each driver, so the behavior is specific to the driver you use. Refer to the documentation for your JDBC driver to understand how the driver performs the conversions.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional connection options for the connector.

" + } + }, + "com.amazonaws.glue#JDBCConnectorSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "ConnectionName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the connection that is associated with the connector.

", + "smithy.api#required": {} + } + }, + "ConnectorName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of a connector that assists with accessing the data store in Glue Studio.

", + "smithy.api#required": {} + } + }, + "ConnectionType": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The type of connection, such as marketplace.jdbc or custom.jdbc, designating a connection to a JDBC data store.

", + "smithy.api#required": {} + } + }, + "AdditionalOptions": { + "target": "com.amazonaws.glue#JDBCConnectorOptions", + "traits": { + "smithy.api#documentation": "

Additional connection options for the connector.

" + } + }, + "ConnectionTable": { + "target": "com.amazonaws.glue#EnclosedInStringPropertyWithQuote", + "traits": { + "smithy.api#documentation": "

The name of the table in the data source.

" + } + }, + "Query": { + "target": "com.amazonaws.glue#SqlQuery", + "traits": { + "smithy.api#documentation": "

The table or SQL query to get the data from. You can specify either ConnectionTable or query, but not both.

" + } + }, + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", + "traits": { + "smithy.api#documentation": "

Specifies the data schema for the custom JDBC source.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a connector to a JDBC data source.

" + } + }, + "com.amazonaws.glue#JDBCConnectorTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "ConnectionName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the connection that is associated with the connector.

", + "smithy.api#required": {} + } + }, + "ConnectionTable": { + "target": "com.amazonaws.glue#EnclosedInStringPropertyWithQuote", + "traits": { + "smithy.api#documentation": "

The name of the table in the data target.

", + "smithy.api#required": {} + } + }, + "ConnectorName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of a connector that will be used.

", + "smithy.api#required": {} + } + }, + "ConnectionType": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The type of connection, such as marketplace.jdbc or custom.jdbc, designating a connection to a JDBC data target.

", + "smithy.api#required": {} + } + }, + "AdditionalOptions": { + "target": "com.amazonaws.glue#AdditionalOptions", + "traits": { + "smithy.api#documentation": "

Additional connection options for the connector.

" + } + }, + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", + "traits": { + "smithy.api#documentation": "

Specifies the data schema for the JDBC target.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3 in Apache Parquet columnar storage.

" + } + }, + "com.amazonaws.glue#JDBCDataType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ARRAY", + "name": "ARRAY" + }, + { + "value": "BIGINT", + "name": "BIGINT" + }, + { + "value": "BINARY", + "name": "BINARY" + }, + { + "value": "BIT", + "name": "BIT" + }, + { + "value": "BLOB", + "name": "BLOB" + }, + { + "value": "BOOLEAN", + "name": "BOOLEAN" + }, + { + "value": "CHAR", + "name": "CHAR" + }, + { + "value": "CLOB", + "name": "CLOB" + }, + { + "value": "DATALINK", + "name": "DATALINK" + }, + { + "value": "DATE", + "name": "DATE" + }, + { + "value": "DECIMAL", + "name": "DECIMAL" + }, + { + "value": "DISTINCT", + "name": "DISTINCT" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + }, + { + "value": "FLOAT", + "name": "FLOAT" + }, + { + "value": "INTEGER", + "name": "INTEGER" + }, + { + "value": "JAVA_OBJECT", + "name": "JAVA_OBJECT" + }, + { + "value": "LONGNVARCHAR", + "name": "LONGNVARCHAR" + }, + { + "value": "LONGVARBINARY", + "name": "LONGVARBINARY" + }, + { + "value": "LONGVARCHAR", + "name": "LONGVARCHAR" + }, + { + "value": "NCHAR", + "name": "NCHAR" + }, + { + "value": "NCLOB", + "name": "NCLOB" + }, + { + "value": "NULL", + "name": "NULL" + }, + { + "value": "NUMERIC", + "name": "NUMERIC" + }, + { + "value": "NVARCHAR", + "name": "NVARCHAR" + }, + { + "value": "OTHER", + "name": "OTHER" + }, + { + "value": "REAL", + "name": "REAL" + }, + { + "value": "REF", + "name": "REF" + }, + { + "value": "REF_CURSOR", + "name": "REF_CURSOR" + }, + { + "value": "ROWID", + "name": "ROWID" + }, + { + "value": "SMALLINT", + "name": "SMALLINT" + }, + { + "value": "SQLXML", + "name": "SQLXML" + }, + { + "value": "STRUCT", + "name": "STRUCT" + }, + { + "value": "TIME", + "name": "TIME" + }, + { + "value": "TIME_WITH_TIMEZONE", + "name": "TIME_WITH_TIMEZONE" + }, + { + "value": "TIMESTAMP", + "name": "TIMESTAMP" + }, + { + "value": "TIMESTAMP_WITH_TIMEZONE", + "name": "TIMESTAMP_WITH_TIMEZONE" + }, + { + "value": "TINYINT", + "name": "TINYINT" + }, + { + "value": "VARBINARY", + "name": "VARBINARY" + }, + { + "value": "VARCHAR", + "name": "VARCHAR" + } + ] } }, - "com.amazonaws.glue#InvalidStateException": { - "type": "structure", - "members": { - "Message": { - "target": "com.amazonaws.glue#MessageString", - "traits": { - "smithy.api#documentation": "

A message describing the problem.

" - } - } + "com.amazonaws.glue#JDBCDataTypeMapping": { + "type": "map", + "key": { + "target": "com.amazonaws.glue#JDBCDataType" }, - "traits": { - "smithy.api#documentation": "

An error that indicates your data is in an invalid state.

", - "smithy.api#error": "client" + "value": { + "target": "com.amazonaws.glue#GlueRecordType" } }, - "com.amazonaws.glue#IsVersionValid": { - "type": "boolean" - }, "com.amazonaws.glue#JdbcTarget": { "type": "structure", "members": { @@ -13678,6 +15567,12 @@ "traits": { "smithy.api#documentation": "

Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates the version supported for jobs of type Spark.

\n \n

For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.

\n\t \n\t

Jobs that are created without specifying a Glue version default to Glue 0.9.

" } + }, + "CodeGenConfigurationNodes": { + "target": "com.amazonaws.glue#CodeGenConfigurationNodes", + "traits": { + "smithy.api#documentation": "

The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.

" + } } }, "traits": { @@ -14121,12 +16016,119 @@ "traits": { "smithy.api#documentation": "

Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates the version supported for jobs of type Spark.

\n \n

For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.

" } + }, + "CodeGenConfigurationNodes": { + "target": "com.amazonaws.glue#CodeGenConfigurationNodes", + "traits": { + "smithy.api#documentation": "

The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.

" + } } }, "traits": { "smithy.api#documentation": "

Specifies information used to update an existing job definition. The previous job\n definition is completely overwritten by this information.

" } }, + "com.amazonaws.glue#Join": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#TwoInputs", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "JoinType": { + "target": "com.amazonaws.glue#JoinType", + "traits": { + "smithy.api#documentation": "

Specifies the type of join to be performed on the datasets.

", + "smithy.api#required": {} + } + }, + "Columns": { + "target": "com.amazonaws.glue#JoinColumns", + "traits": { + "smithy.api#documentation": "

A list of the two columns to be joined.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that joins two datasets into one dataset using a comparison phrase on the specified data property keys. You can use inner, outer, left, right, left semi, and left anti joins.

" + } + }, + "com.amazonaws.glue#JoinColumn": { + "type": "structure", + "members": { + "From": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The column to be joined.

", + "smithy.api#required": {} + } + }, + "Keys": { + "target": "com.amazonaws.glue#GlueStudioPathList", + "traits": { + "smithy.api#documentation": "

The key of the column to be joined.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a column to be joined.

" + } + }, + "com.amazonaws.glue#JoinColumns": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#JoinColumn" + }, + "traits": { + "smithy.api#length": { + "min": 2, + "max": 2 + } + } + }, + "com.amazonaws.glue#JoinType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "equijoin", + "name": "EQUIJOIN" + }, + { + "value": "left", + "name": "LEFT" + }, + { + "value": "right", + "name": "RIGHT" + }, + { + "value": "outer", + "name": "OUTER" + }, + { + "value": "leftsemi", + "name": "LEFT_SEMI" + }, + { + "value": "leftanti", + "name": "LEFT_ANTI" + } + ] + } + }, "com.amazonaws.glue#JsonClassifier": { "type": "structure", "members": { @@ -14173,6 +16175,104 @@ "com.amazonaws.glue#JsonValue": { "type": "string" }, + "com.amazonaws.glue#KafkaStreamingSourceOptions": { + "type": "structure", + "members": { + "BootstrapServers": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

A list of bootstrap server URLs, for example, as b-1.vpc-test-2.o4q88o.c6.kafka.us-east-1.amazonaws.com:9094. This option must be specified in the API call or defined in the table metadata in the Data Catalog.

" + } + }, + "SecurityProtocol": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The protocol used to communicate with brokers. The possible values are \"SSL\" or \"PLAINTEXT\".

" + } + }, + "ConnectionName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the connection.

" + } + }, + "TopicName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The topic name as specified in Apache Kafka. You must specify at least one of \"topicName\", \"assign\" or \"subscribePattern\".

" + } + }, + "Assign": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The specific TopicPartitions to consume. You must specify at least one of \"topicName\", \"assign\" or \"subscribePattern\".

" + } + }, + "SubscribePattern": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

A Java regex string that identifies the topic list to subscribe to. You must specify at least one of \"topicName\", \"assign\" or \"subscribePattern\".

" + } + }, + "Classification": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

An optional classification.

" + } + }, + "Delimiter": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Specifies the delimiter character.

" + } + }, + "StartingOffsets": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The starting position in the Kafka topic to read data from. The possible values are \"earliest\" or \"latest\". The default value is \"latest\".

" + } + }, + "EndingOffsets": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The end point when a batch query is ended. Possible values are either \"latest\" or a JSON string that specifies an ending offset for each TopicPartition.

" + } + }, + "PollTimeoutMs": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The timeout in milliseconds to poll data from Kafka in Spark job executors. The default value is 512.

" + } + }, + "NumRetries": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

The number of times to retry before failing to fetch Kafka offsets. The default value is 3.

" + } + }, + "RetryIntervalMs": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The time in milliseconds to wait before retrying to fetch Kafka offsets. The default value is 10.

" + } + }, + "MaxOffsetsPerTrigger": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The rate limit on the maximum number of offsets that are processed per trigger interval. The specified total number of offsets is proportionally split across topicPartitions of different volumes. The default value is null, which means that the consumer reads all offsets until the known latest offset.

" + } + }, + "MinPartitions": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

The desired minimum number of partitions to read from Kafka. The default value is null, which means that the number of spark partitions is equal to the number of Kafka partitions.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional options for streaming.

" + } + }, "com.amazonaws.glue#KeyList": { "type": "list", "member": { @@ -14227,6 +16327,122 @@ "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" } }, + "com.amazonaws.glue#KinesisStreamingSourceOptions": { + "type": "structure", + "members": { + "EndpointUrl": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The URL of the Kinesis endpoint.

" + } + }, + "StreamName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the Kinesis data stream.

" + } + }, + "Classification": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

An optional classification.

" + } + }, + "Delimiter": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Specifies the delimiter character.

" + } + }, + "StartingPosition": { + "target": "com.amazonaws.glue#StartingPosition", + "traits": { + "smithy.api#documentation": "

The starting position in the Kinesis data stream to read data from. The possible values are \"latest\", \"trim_horizon\", or \"earliest\". The default value is \"latest\".

" + } + }, + "MaxFetchTimeInMs": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The maximum time spent in the job executor to fetch a record from the Kinesis data stream per shard, specified in milliseconds (ms). The default value is 1000.

" + } + }, + "MaxFetchRecordsPerShard": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The maximum number of records to fetch per shard in the Kinesis data stream. The default value is 100000.

" + } + }, + "MaxRecordPerRead": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default value is 10000.

" + } + }, + "AddIdleTimeBetweenReads": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Adds a time delay between two consecutive getRecords operations. The default value is \"False\". This option is only configurable for Glue version 2.0 and above.

" + } + }, + "IdleTimeBetweenReadsInMs": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The minimum time delay between two consecutive getRecords operations, specified in ms. The default value is 1000. This option is only configurable for Glue version 2.0 and above.

" + } + }, + "DescribeShardInterval": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The minimum time interval between two ListShards API calls for your script to consider resharding. The default value is 1s.

" + } + }, + "NumRetries": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

The maximum number of retries for Kinesis Data Streams API requests. The default value is 3.

" + } + }, + "RetryIntervalMs": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value is 1000.

" + } + }, + "MaxRetryIntervalMs": { + "target": "com.amazonaws.glue#BoxedNonNegativeLong", + "traits": { + "smithy.api#documentation": "

The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call. The default value is 10000.

" + } + }, + "AvoidEmptyBatches": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Avoids creating an empty microbatch job by checking for unread data in the Kinesis data stream before the batch is started. The default value is \"False\".

" + } + }, + "StreamArn": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Kinesis data stream.

" + } + }, + "RoleArn": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role to assume using AWS Security Token Service (AWS STS). This role must have permissions for describe or read record operations for the Kinesis data stream. You must use this parameter when accessing a data stream in a different account. Used in conjunction with \"awsSTSSessionName\".

" + } + }, + "RoleSessionName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

An identifier for the session assuming the role using AWS STS. You must use this parameter when accessing a data stream in a different account. Used in conjunction with \"awsSTSRoleARN\".

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Additional options for the Amazon Kinesis streaming data source.

" + } + }, "com.amazonaws.glue#KmsKeyArn": { "type": "string", "traits": { @@ -14389,6 +16605,18 @@ "com.amazonaws.glue#LatestSchemaVersionBoolean": { "type": "boolean" }, + "com.amazonaws.glue#LimitedPathList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#LimitedStringList" + } + }, + "com.amazonaws.glue#LimitedStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#GenericLimitedString" + } + }, "com.amazonaws.glue#LineageConfiguration": { "type": "structure", "members": { @@ -15628,6 +17856,17 @@ ] } }, + "com.amazonaws.glue#ManyInputs": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NodeId" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, "com.amazonaws.glue#MapValue": { "type": "map", "key": { @@ -15643,6 +17882,50 @@ } } }, + "com.amazonaws.glue#Mapping": { + "type": "structure", + "members": { + "ToKey": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

After the apply mapping, what the name of the column should be. Can be the same as FromPath.

" + } + }, + "FromPath": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

The table or column to be modified.

" + } + }, + "FromType": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The type of the data to be modified.

" + } + }, + "ToType": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The data type that the data is to be modified to.

" + } + }, + "Dropped": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

If true, then the column is removed.

" + } + }, + "Children": { + "target": "com.amazonaws.glue#Mappings", + "traits": { + "smithy.api#documentation": "

Only applicable to nested data structures. If you want to change the parent structure, but also one of its children, you can fill out this data strucutre. It is also Mapping, but its FromPath will be the parent's FromPath plus the FromPath from this structure.

\n \n

For the children part, suppose you have the structure:

\n\t\n\t

\n {\n \"FromPath\": \"OuterStructure\",\n \"ToKey\": \"OuterStructure\",\n \"ToType\": \"Struct\",\n \"Dropped\": false,\n \"Chidlren\": [{\n \"FromPath\": \"inner\",\n \"ToKey\": \"inner\",\n \"ToType\": \"Double\",\n \"Dropped\": false,\n }]\n}\n

\n\n

You can specify a Mapping that looks like:

\n\t\n\t

\n {\n \"FromPath\": \"OuterStructure\",\n \"ToKey\": \"OuterStructure\",\n \"ToType\": \"Struct\",\n \"Dropped\": false,\n \"Chidlren\": [{\n \"FromPath\": \"inner\",\n \"ToKey\": \"inner\",\n \"ToType\": \"Double\",\n \"Dropped\": false,\n }]\n}\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the mapping of data property keys.

" + } + }, "com.amazonaws.glue#MappingEntry": { "type": "structure", "members": { @@ -15693,6 +17976,22 @@ "target": "com.amazonaws.glue#MappingEntry" } }, + "com.amazonaws.glue#Mappings": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#Mapping" + } + }, + "com.amazonaws.glue#MaskValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[*A-Za-z0-9_-]*$" + } + }, "com.amazonaws.glue#MatchCriteria": { "type": "list", "member": { @@ -15721,6 +18020,42 @@ "com.amazonaws.glue#MaxRetries": { "type": "integer" }, + "com.amazonaws.glue#Merge": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#TwoInputs", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "Source": { + "target": "com.amazonaws.glue#NodeId", + "traits": { + "smithy.api#documentation": "

The source DynamicFrame that will be merged with a staging DynamicFrame.

", + "smithy.api#required": {} + } + }, + "PrimaryKeys": { + "target": "com.amazonaws.glue#GlueStudioPathList", + "traits": { + "smithy.api#documentation": "

The list of primary key fields to match records from the source and staging dynamic frames.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that merges a DynamicFrame with a staging DynamicFrame based on the specified primary keys to identify records. Duplicate records (records with the same primary keys) are not de-duplicated.

" + } + }, "com.amazonaws.glue#MessagePrefix": { "type": "string", "traits": { @@ -15815,6 +18150,71 @@ "smithy.api#pattern": "^[a-zA-Z0-9+-=._./@]+$" } }, + "com.amazonaws.glue#MicrosoftSQLServerCatalogSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to read from.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a Microsoft SQL server data source in the Glue Data Catalog.

" + } + }, + "com.amazonaws.glue#MicrosoftSQLServerCatalogTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to write to.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to write to.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a target that uses Microsoft SQL.

" + } + }, "com.amazonaws.glue#MillisecondsCount": { "type": "long" }, @@ -15850,6 +18250,71 @@ "target": "com.amazonaws.glue#MongoDBTarget" } }, + "com.amazonaws.glue#MySQLCatalogSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to read from.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a MySQL data source in the Glue Data Catalog.

" + } + }, + "com.amazonaws.glue#MySQLCatalogTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to write to.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to write to.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a target that uses MySQL.

" + } + }, "com.amazonaws.glue#NameString": { "type": "string", "traits": { @@ -15925,6 +18390,12 @@ "smithy.api#documentation": "

A node represents an Glue component (trigger, crawler, or job) on a workflow graph.

" } }, + "com.amazonaws.glue#NodeId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[A-Za-z0-9_-]*$" + } + }, "com.amazonaws.glue#NodeIdList": { "type": "list", "member": { @@ -15937,6 +18408,12 @@ "target": "com.amazonaws.glue#Node" } }, + "com.amazonaws.glue#NodeName": { + "type": "string", + "traits": { + "smithy.api#pattern": "^([\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF]|[^\\r\\n])*$" + } + }, "com.amazonaws.glue#NodeType": { "type": "string", "traits": { @@ -15964,6 +18441,14 @@ } } }, + "com.amazonaws.glue#NonNegativeInt": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0 + } + } + }, "com.amazonaws.glue#NonNegativeInteger": { "type": "integer", "traits": { @@ -16003,6 +18488,66 @@ } } }, + "com.amazonaws.glue#NullCheckBoxList": { + "type": "structure", + "members": { + "IsEmpty": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Specifies that an empty string is considered as a null value.

" + } + }, + "IsNullString": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Specifies that a value spelling out the word 'null' is considered as a null value.

" + } + }, + "IsNegOne": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Specifies that an integer value of -1 is considered as a null value.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents whether certain values are recognized as null values for removal.

" + } + }, + "com.amazonaws.glue#NullValueField": { + "type": "structure", + "members": { + "Value": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The value of the null placeholder.

", + "smithy.api#required": {} + } + }, + "Datatype": { + "target": "com.amazonaws.glue#Datatype", + "traits": { + "smithy.api#documentation": "

The datatype of the value.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents a custom null value such as a zeros or other value being used as a null placeholder unique to the dataset.

" + } + }, + "com.amazonaws.glue#NullValueFields": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NullValueField" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, "com.amazonaws.glue#NullableBoolean": { "type": "boolean", "traits": { @@ -16018,22 +18563,99 @@ "com.amazonaws.glue#NullableInteger": { "type": "integer", "traits": { - "smithy.api#box": {} + "smithy.api#box": {} + } + }, + "com.amazonaws.glue#OneInput": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NodeId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.glue#OperationTimeoutException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.glue#MessageString", + "traits": { + "smithy.api#documentation": "

A message describing the problem.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The operation timed out.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.glue#OracleSQLCatalogSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to read from.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies an Oracle data source in the Glue Data Catalog.

" } }, - "com.amazonaws.glue#OperationTimeoutException": { + "com.amazonaws.glue#OracleSQLCatalogTarget": { "type": "structure", "members": { - "Message": { - "target": "com.amazonaws.glue#MessageString", + "Name": { + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

A message describing the problem.

" + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to write to.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to write to.

", + "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

The operation timed out.

", - "smithy.api#error": "client" + "smithy.api#documentation": "

Specifies a target that uses Oracle SQL.

" } }, "com.amazonaws.glue#OrchestrationArgumentsMap": { @@ -16179,6 +18801,66 @@ "smithy.api#documentation": "

A structure containing other metadata for a schema version belonging to the same metadata key.

" } }, + "com.amazonaws.glue#PIIDetection": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The node ID inputs to the transform.

", + "smithy.api#required": {} + } + }, + "PiiType": { + "target": "com.amazonaws.glue#PiiType", + "traits": { + "smithy.api#documentation": "

Indicates the type of PIIDetection transform.

", + "smithy.api#required": {} + } + }, + "EntityTypesToDetect": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

Indicates the types of entities the PIIDetection transform will identify as PII data.

\n

\n PII type entities include: PERSON_NAME, DATE, USA_SNN, EMAIL, USA_ITIN, USA_PASSPORT_NUMBER, PHONE_NUMBER, BANK_ACCOUNT,\n IP_ADDRESS, MAC_ADDRESS, USA_CPT_CODE, USA_HCPCS_CODE, USA_NATIONAL_DRUG_CODE, USA_MEDICARE_BENEFICIARY_IDENTIFIER,\n USA_HEALTH_INSURANCE_CLAIM_NUMBER,CREDIT_CARD,USA_NATIONAL_PROVIDER_IDENTIFIER,USA_DEA_NUMBER,USA_DRIVING_LICENSE\n

", + "smithy.api#required": {} + } + }, + "OutputColumnName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Indicates the output column name that will contain any entity type detected in that row.

" + } + }, + "SampleFraction": { + "target": "com.amazonaws.glue#BoxedDoubleFraction", + "traits": { + "smithy.api#documentation": "

Indicates the fraction of the data to sample when scanning for PII entities.

" + } + }, + "ThresholdFraction": { + "target": "com.amazonaws.glue#BoxedDoubleFraction", + "traits": { + "smithy.api#documentation": "

Indicates the fraction of the data that must be met in order for a column to be identified as PII data.

" + } + }, + "MaskValue": { + "target": "com.amazonaws.glue#MaskValue", + "traits": { + "smithy.api#documentation": "

Indicates the value that will replace the detected entity.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that identifies, removes or masks PII data.

" + } + }, "com.amazonaws.glue#PageSize": { "type": "integer", "traits": { @@ -16210,6 +18892,33 @@ } } }, + "com.amazonaws.glue#ParquetCompressionType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "snappy", + "name": "SNAPPY" + }, + { + "value": "lzo", + "name": "LZO" + }, + { + "value": "gzip", + "name": "GZIP" + }, + { + "value": "uncompressed", + "name": "UNCOMPRESSED" + }, + { + "value": "none", + "name": "NONE" + } + ] + } + }, "com.amazonaws.glue#Partition": { "type": "structure", "members": { @@ -16589,6 +19298,29 @@ "smithy.api#documentation": "

Specifies the physical requirements for a connection.

" } }, + "com.amazonaws.glue#PiiType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RowAudit", + "name": "RowAudit" + }, + { + "value": "RowMasking", + "name": "RowMasking" + }, + { + "value": "ColumnAudit", + "name": "ColumnAudit" + }, + { + "value": "ColumnMasking", + "name": "ColumnMasking" + } + ] + } + }, "com.amazonaws.glue#PolicyJsonString": { "type": "string", "traits": { @@ -16597,6 +19329,89 @@ } } }, + "com.amazonaws.glue#PollingTime": { + "type": "long", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 10 + } + } + }, + "com.amazonaws.glue#PositiveLong": { + "type": "long", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1 + } + } + }, + "com.amazonaws.glue#PostgreSQLCatalogSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to read from.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a PostgresSQL data source in the Glue Data Catalog.

" + } + }, + "com.amazonaws.glue#PostgreSQLCatalogTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to write to.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to write to.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a target that uses Postgres SQL.

" + } + }, "com.amazonaws.glue#Predecessor": { "type": "structure", "members": { @@ -16698,6 +19513,16 @@ ] } }, + "com.amazonaws.glue#Prob": { + "type": "double", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 1 + } + } + }, "com.amazonaws.glue#PropertyPredicate": { "type": "structure", "members": { @@ -17139,6 +19964,29 @@ } } }, + "com.amazonaws.glue#QuoteChar": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "quote", + "name": "QUOTE" + }, + { + "value": "quillemet", + "name": "QUILLEMET" + }, + { + "value": "single_quote", + "name": "SINGLE_QUOTE" + }, + { + "value": "disabled", + "name": "DISABLED" + } + ] + } + }, "com.amazonaws.glue#RecordsCount": { "type": "long", "traits": { @@ -17178,6 +20026,101 @@ "smithy.api#documentation": "

When crawling an Amazon S3 data source after the first crawl is complete, specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run. For more information, see Incremental Crawls in Glue in the developer guide.

" } }, + "com.amazonaws.glue#RedshiftSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon Redshift data store.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The database table to read from.

", + "smithy.api#required": {} + } + }, + "RedshiftTmpDir": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The Amazon S3 path where temporary data can be staged when copying out of the database.

" + } + }, + "TmpDirIAMRole": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The IAM role with permissions.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies an Amazon Redshift data store.

" + } + }, + "com.amazonaws.glue#RedshiftTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to write to.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to write to.

", + "smithy.api#required": {} + } + }, + "RedshiftTmpDir": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The Amazon S3 path where temporary data can be staged when copying out of the database.

" + } + }, + "TmpDirIAMRole": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The IAM role with permissions.

" + } + }, + "UpsertRedshiftOptions": { + "target": "com.amazonaws.glue#UpsertRedshiftTargetOptions", + "traits": { + "smithy.api#documentation": "

The set of options to configure an upsert operation when writing to a Redshift target.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a target that uses Amazon Redshift.

" + } + }, "com.amazonaws.glue#RegisterSchemaVersion": { "type": "operation", "input": { @@ -17337,6 +20280,35 @@ ] } }, + "com.amazonaws.glue#RelationalCatalogSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to read from.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a Relational database data source in the Glue Data Catalog.

" + } + }, "com.amazonaws.glue#RemoveSchemaVersionMetadata": { "type": "operation", "input": { @@ -17443,6 +20415,42 @@ } } }, + "com.amazonaws.glue#RenameField": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "SourcePath": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

A JSON path to a variable in the data structure for the source data.

", + "smithy.api#required": {} + } + }, + "TargetPath": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

A JSON path to a variable in the data structure for the target data.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that renames a single data property key.

" + } + }, "com.amazonaws.glue#ReplaceBoolean": { "type": "boolean" }, @@ -17635,133 +20643,434 @@ "Name": { "target": "com.amazonaws.glue#NameString", "traits": { - "smithy.api#documentation": "

The name of the workflow to resume.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The name of the workflow to resume.

", + "smithy.api#required": {} + } + }, + "RunId": { + "target": "com.amazonaws.glue#IdString", + "traits": { + "smithy.api#documentation": "

The ID of the workflow run to resume.

", + "smithy.api#required": {} + } + }, + "NodeIds": { + "target": "com.amazonaws.glue#NodeIdList", + "traits": { + "smithy.api#documentation": "

A list of the node IDs for the nodes you want to restart. The nodes that are to be restarted must have a run attempt in the original run.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.glue#ResumeWorkflowRunResponse": { + "type": "structure", + "members": { + "RunId": { + "target": "com.amazonaws.glue#IdString", + "traits": { + "smithy.api#documentation": "

The new ID assigned to the resumed workflow run. Each resume of a workflow run will have a new run ID.

" + } + }, + "NodeIds": { + "target": "com.amazonaws.glue#NodeIdList", + "traits": { + "smithy.api#documentation": "

A list of the node IDs for the nodes that were actually restarted.

" + } + } + } + }, + "com.amazonaws.glue#Role": { + "type": "string" + }, + "com.amazonaws.glue#RoleArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws:iam::\\d{12}:role/" + } + }, + "com.amazonaws.glue#RoleString": { + "type": "string" + }, + "com.amazonaws.glue#RowTag": { + "type": "string" + }, + "com.amazonaws.glue#RunId": { + "type": "string" + }, + "com.amazonaws.glue#RunStatement": { + "type": "operation", + "input": { + "target": "com.amazonaws.glue#RunStatementRequest" + }, + "output": { + "target": "com.amazonaws.glue#RunStatementResponse" + }, + "errors": [ + { + "target": "com.amazonaws.glue#AccessDeniedException" + }, + { + "target": "com.amazonaws.glue#EntityNotFoundException" + }, + { + "target": "com.amazonaws.glue#IllegalSessionStateException" + }, + { + "target": "com.amazonaws.glue#InternalServiceException" + }, + { + "target": "com.amazonaws.glue#InvalidInputException" + }, + { + "target": "com.amazonaws.glue#OperationTimeoutException" + }, + { + "target": "com.amazonaws.glue#ResourceNumberLimitExceededException" + }, + { + "target": "com.amazonaws.glue#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Executes the statement.

" + } + }, + "com.amazonaws.glue#RunStatementRequest": { + "type": "structure", + "members": { + "SessionId": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The Session Id of the statement to be run.

", + "smithy.api#required": {} + } + }, + "Code": { + "target": "com.amazonaws.glue#OrchestrationStatementCodeString", + "traits": { + "smithy.api#documentation": "

The statement code to be run.

", + "smithy.api#required": {} + } + }, + "RequestOrigin": { + "target": "com.amazonaws.glue#OrchestrationNameString", + "traits": { + "smithy.api#documentation": "

The origin of the request.

" + } + } + } + }, + "com.amazonaws.glue#RunStatementResponse": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.glue#IntegerValue", + "traits": { + "smithy.api#documentation": "

Returns the Id of the statement that was run.

" + } + } + } + }, + "com.amazonaws.glue#S3CatalogSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data store.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The database to read from.

", + "smithy.api#required": {} + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The database table to read from.

", + "smithy.api#required": {} + } + }, + "PartitionPredicate": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Partitions satisfying this predicate are deleted. Files within the retention period in these partitions are not deleted. Set to \"\" – empty by default.

" + } + }, + "AdditionalOptions": { + "target": "com.amazonaws.glue#S3SourceAdditionalOptions", + "traits": { + "smithy.api#documentation": "

Specifies additional connection options.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies an Amazon S3 data store in the Glue Data Catalog.

" + } + }, + "com.amazonaws.glue#S3CatalogTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "PartitionKeys": { + "target": "com.amazonaws.glue#GlueStudioPathList", + "traits": { + "smithy.api#documentation": "

Specifies native partitioning using a sequence of keys.

" + } + }, + "Table": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the table in the database to write to.

", + "smithy.api#required": {} + } + }, + "Database": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the database to write to.

", + "smithy.api#required": {} + } + }, + "SchemaChangePolicy": { + "target": "com.amazonaws.glue#CatalogSchemaChangePolicy", + "traits": { + "smithy.api#documentation": "

A policy that specifies update behavior for the crawler.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3 using the Glue Data Catalog.

" + } + }, + "com.amazonaws.glue#S3CsvSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data store.

", + "smithy.api#required": {} + } + }, + "Paths": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

A list of the Amazon S3 paths to read from.

", + "smithy.api#required": {} + } + }, + "CompressionType": { + "target": "com.amazonaws.glue#CompressionType", + "traits": { + "smithy.api#documentation": "

Specifies how the data is compressed. This is generally not necessary if the data has a standard file extension. Possible values are \"gzip\" and \"bzip\").

" + } + }, + "Exclusions": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

A string containing a JSON list of Unix-style glob patterns to exclude. For example, \"[\\\"**.pdf\\\"]\" excludes all PDF files.

" + } + }, + "GroupSize": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The target group size in bytes. The default is computed based on the input data size and the size of your cluster. When there are fewer than 50,000 input files, \"groupFiles\" must be set to \"inPartition\" for this to take effect.

" + } + }, + "GroupFiles": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Grouping files is turned on by default when the input contains more than 50,000 files. To turn on grouping with fewer than 50,000 files, set this parameter to \"inPartition\". To disable grouping when there are more than 50,000 files, set this parameter to \"none\".

" + } + }, + "Recurse": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

If set to true, recursively reads files in all subdirectories under the specified paths.

" + } + }, + "MaxBand": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

This option controls the duration in milliseconds after which the s3 listing is likely to be consistent. Files with modification timestamps falling within the last maxBand milliseconds are tracked specially when using JobBookmarks to account for Amazon S3 eventual consistency. Most users don't need to set this option. The default is 900000 milliseconds, or 15 minutes.

" + } + }, + "MaxFilesInBand": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

This option specifies the maximum number of files to save from the last maxBand seconds. If this number is exceeded, extra files are skipped and only processed in the next job run.

" + } + }, + "AdditionalOptions": { + "target": "com.amazonaws.glue#S3DirectSourceAdditionalOptions", + "traits": { + "smithy.api#documentation": "

Specifies additional connection options.

" + } + }, + "Separator": { + "target": "com.amazonaws.glue#Separator", + "traits": { + "smithy.api#documentation": "

Specifies the delimiter character. The default is a comma: \",\", but any other character can be specified.

", + "smithy.api#required": {} + } + }, + "Escaper": { + "target": "com.amazonaws.glue#EnclosedInStringPropertyWithQuote", + "traits": { + "smithy.api#documentation": "

Specifies a character to use for escaping. This option is used only when reading CSV files. The default value is none. If enabled, the character which immediately follows is used as-is, except for a small set of well-known escapes (\\n, \\r, \\t, and \\0).

" } }, - "RunId": { - "target": "com.amazonaws.glue#IdString", + "QuoteChar": { + "target": "com.amazonaws.glue#QuoteChar", "traits": { - "smithy.api#documentation": "

The ID of the workflow run to resume.

", + "smithy.api#documentation": "

Specifies the character to use for quoting. The default is a double quote: '\"'. Set this to -1 to turn off quoting entirely.

", "smithy.api#required": {} } }, - "NodeIds": { - "target": "com.amazonaws.glue#NodeIdList", + "Multiline": { + "target": "com.amazonaws.glue#BoxedBoolean", "traits": { - "smithy.api#documentation": "

A list of the node IDs for the nodes you want to restart. The nodes that are to be restarted must have a run attempt in the original run.

", - "smithy.api#required": {} + "smithy.api#documentation": "

A Boolean value that specifies whether a single record can span multiple lines. This can occur when a field contains a quoted new-line character. You must set this option to True if any record spans multiple lines. The default value is False, which allows for more aggressive file-splitting during parsing.

" } - } - } - }, - "com.amazonaws.glue#ResumeWorkflowRunResponse": { - "type": "structure", - "members": { - "RunId": { - "target": "com.amazonaws.glue#IdString", + }, + "WithHeader": { + "target": "com.amazonaws.glue#BoxedBoolean", "traits": { - "smithy.api#documentation": "

The new ID assigned to the resumed workflow run. Each resume of a workflow run will have a new run ID.

" + "smithy.api#documentation": "

A Boolean value that specifies whether to treat the first line as a header. The default value is False.

" } }, - "NodeIds": { - "target": "com.amazonaws.glue#NodeIdList", + "WriteHeader": { + "target": "com.amazonaws.glue#BoxedBoolean", "traits": { - "smithy.api#documentation": "

A list of the node IDs for the nodes that were actually restarted.

" + "smithy.api#documentation": "

A Boolean value that specifies whether to write the header to output. The default value is True.

" + } + }, + "SkipFirst": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

A Boolean value that specifies whether to skip the first data line. The default value is False.

" + } + }, + "OptimizePerformance": { + "target": "com.amazonaws.glue#BooleanValue", + "traits": { + "smithy.api#documentation": "

A Boolean value that specifies whether to use the advanced SIMD CSV reader along with Apache Arrow based columnar memory formats. Only available in Glue version 3.0.

" + } + }, + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", + "traits": { + "smithy.api#documentation": "

Specifies the data schema for the S3 CSV source.

" } } - } - }, - "com.amazonaws.glue#Role": { - "type": "string" - }, - "com.amazonaws.glue#RoleArn": { - "type": "string", + }, "traits": { - "smithy.api#pattern": "^arn:aws:iam::\\d{12}:role/" + "smithy.api#documentation": "

Specifies a command-separated value (CSV) data store stored in Amazon S3.

" } }, - "com.amazonaws.glue#RoleString": { - "type": "string" - }, - "com.amazonaws.glue#RowTag": { - "type": "string" - }, - "com.amazonaws.glue#RunId": { - "type": "string" - }, - "com.amazonaws.glue#RunStatement": { - "type": "operation", - "input": { - "target": "com.amazonaws.glue#RunStatementRequest" - }, - "output": { - "target": "com.amazonaws.glue#RunStatementResponse" - }, - "errors": [ - { - "target": "com.amazonaws.glue#AccessDeniedException" - }, - { - "target": "com.amazonaws.glue#EntityNotFoundException" - }, - { - "target": "com.amazonaws.glue#IllegalSessionStateException" - }, - { - "target": "com.amazonaws.glue#InternalServiceException" - }, - { - "target": "com.amazonaws.glue#InvalidInputException" + "com.amazonaws.glue#S3DirectSourceAdditionalOptions": { + "type": "structure", + "members": { + "BoundedSize": { + "target": "com.amazonaws.glue#BoxedLong", + "traits": { + "smithy.api#documentation": "

Sets the upper limit for the target size of the dataset in bytes that will be processed.

" + } }, - { - "target": "com.amazonaws.glue#OperationTimeoutException" + "BoundedFiles": { + "target": "com.amazonaws.glue#BoxedLong", + "traits": { + "smithy.api#documentation": "

Sets the upper limit for the target number of files that will be processed.

" + } }, - { - "target": "com.amazonaws.glue#ResourceNumberLimitExceededException" + "EnableSamplePath": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

Sets option to enable a sample path.

" + } }, - { - "target": "com.amazonaws.glue#ValidationException" + "SamplePath": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

If enabled, specifies the sample path.

" + } } - ], + }, "traits": { - "smithy.api#documentation": "

Executes the statement.

" + "smithy.api#documentation": "

Specifies additional connection options for the Amazon S3 data store.

" } }, - "com.amazonaws.glue#RunStatementRequest": { + "com.amazonaws.glue#S3DirectTarget": { "type": "structure", "members": { - "SessionId": { - "target": "com.amazonaws.glue#NameString", + "Name": { + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

The Session Id of the statement to be run.

", + "smithy.api#documentation": "

The name of the data target.

", "smithy.api#required": {} } }, - "Code": { - "target": "com.amazonaws.glue#OrchestrationStatementCodeString", + "Inputs": { + "target": "com.amazonaws.glue#OneInput", "traits": { - "smithy.api#documentation": "

The statement code to be run.

", + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", "smithy.api#required": {} } }, - "RequestOrigin": { - "target": "com.amazonaws.glue#OrchestrationNameString", + "PartitionKeys": { + "target": "com.amazonaws.glue#GlueStudioPathList", "traits": { - "smithy.api#documentation": "

The origin of the request.

" + "smithy.api#documentation": "

Specifies native partitioning using a sequence of keys.

" } - } - } - }, - "com.amazonaws.glue#RunStatementResponse": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.glue#IntegerValue", + }, + "Path": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

Returns the Id of the statement that was run.

" + "smithy.api#documentation": "

A single Amazon S3 path to write to.

", + "smithy.api#required": {} + } + }, + "Compression": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Specifies how the data is compressed. This is generally not necessary if the data has a standard file extension. Possible values are \"gzip\" and \"bzip\").

" + } + }, + "Format": { + "target": "com.amazonaws.glue#TargetFormat", + "traits": { + "smithy.api#documentation": "

Specifies the data output format for the target.

", + "smithy.api#required": {} + } + }, + "SchemaChangePolicy": { + "target": "com.amazonaws.glue#DirectSchemaChangePolicy", + "traits": { + "smithy.api#documentation": "

A policy that specifies update behavior for the crawler.

" } } + }, + "traits": { + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3.

" } }, "com.amazonaws.glue#S3Encryption": { @@ -17806,7 +21115,238 @@ "value": "SSE-S3", "name": "SSES3" } - ] + ] + } + }, + "com.amazonaws.glue#S3GlueParquetTarget": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} + } + }, + "PartitionKeys": { + "target": "com.amazonaws.glue#GlueStudioPathList", + "traits": { + "smithy.api#documentation": "

Specifies native partitioning using a sequence of keys.

" + } + }, + "Path": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

A single Amazon S3 path to write to.

", + "smithy.api#required": {} + } + }, + "Compression": { + "target": "com.amazonaws.glue#ParquetCompressionType", + "traits": { + "smithy.api#documentation": "

Specifies how the data is compressed. This is generally not necessary if the data has a standard file extension. Possible values are \"gzip\" and \"bzip\").

" + } + }, + "SchemaChangePolicy": { + "target": "com.amazonaws.glue#DirectSchemaChangePolicy", + "traits": { + "smithy.api#documentation": "

A policy that specifies update behavior for the crawler.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a data target that writes to Amazon S3 in Apache Parquet columnar storage.

" + } + }, + "com.amazonaws.glue#S3JsonSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data store.

", + "smithy.api#required": {} + } + }, + "Paths": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

A list of the Amazon S3 paths to read from.

", + "smithy.api#required": {} + } + }, + "CompressionType": { + "target": "com.amazonaws.glue#CompressionType", + "traits": { + "smithy.api#documentation": "

Specifies how the data is compressed. This is generally not necessary if the data has a standard file extension. Possible values are \"gzip\" and \"bzip\").

" + } + }, + "Exclusions": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

A string containing a JSON list of Unix-style glob patterns to exclude. For example, \"[\\\"**.pdf\\\"]\" excludes all PDF files.

" + } + }, + "GroupSize": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The target group size in bytes. The default is computed based on the input data size and the size of your cluster. When there are fewer than 50,000 input files, \"groupFiles\" must be set to \"inPartition\" for this to take effect.

" + } + }, + "GroupFiles": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Grouping files is turned on by default when the input contains more than 50,000 files. To turn on grouping with fewer than 50,000 files, set this parameter to \"inPartition\". To disable grouping when there are more than 50,000 files, set this parameter to \"none\".

" + } + }, + "Recurse": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

If set to true, recursively reads files in all subdirectories under the specified paths.

" + } + }, + "MaxBand": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

This option controls the duration in milliseconds after which the s3 listing is likely to be consistent. Files with modification timestamps falling within the last maxBand milliseconds are tracked specially when using JobBookmarks to account for Amazon S3 eventual consistency. Most users don't need to set this option. The default is 900000 milliseconds, or 15 minutes.

" + } + }, + "MaxFilesInBand": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

This option specifies the maximum number of files to save from the last maxBand seconds. If this number is exceeded, extra files are skipped and only processed in the next job run.

" + } + }, + "AdditionalOptions": { + "target": "com.amazonaws.glue#S3DirectSourceAdditionalOptions", + "traits": { + "smithy.api#documentation": "

Specifies additional connection options.

" + } + }, + "JsonPath": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

A JsonPath string defining the JSON data.

" + } + }, + "Multiline": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

A Boolean value that specifies whether a single record can span multiple lines. This can occur when a field contains a quoted new-line character. You must set this option to True if any record spans multiple lines. The default value is False, which allows for more aggressive file-splitting during parsing.

" + } + }, + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", + "traits": { + "smithy.api#documentation": "

Specifies the data schema for the S3 JSON source.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a JSON data store stored in Amazon S3.

" + } + }, + "com.amazonaws.glue#S3ParquetSource": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the data store.

", + "smithy.api#required": {} + } + }, + "Paths": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

A list of the Amazon S3 paths to read from.

", + "smithy.api#required": {} + } + }, + "CompressionType": { + "target": "com.amazonaws.glue#ParquetCompressionType", + "traits": { + "smithy.api#documentation": "

Specifies how the data is compressed. This is generally not necessary if the data has a standard file extension. Possible values are \"gzip\" and \"bzip\").

" + } + }, + "Exclusions": { + "target": "com.amazonaws.glue#EnclosedInStringProperties", + "traits": { + "smithy.api#documentation": "

A string containing a JSON list of Unix-style glob patterns to exclude. For example, \"[\\\"**.pdf\\\"]\" excludes all PDF files.

" + } + }, + "GroupSize": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The target group size in bytes. The default is computed based on the input data size and the size of your cluster. When there are fewer than 50,000 input files, \"groupFiles\" must be set to \"inPartition\" for this to take effect.

" + } + }, + "GroupFiles": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

Grouping files is turned on by default when the input contains more than 50,000 files. To turn on grouping with fewer than 50,000 files, set this parameter to \"inPartition\". To disable grouping when there are more than 50,000 files, set this parameter to \"none\".

" + } + }, + "Recurse": { + "target": "com.amazonaws.glue#BoxedBoolean", + "traits": { + "smithy.api#documentation": "

If set to true, recursively reads files in all subdirectories under the specified paths.

" + } + }, + "MaxBand": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

This option controls the duration in milliseconds after which the s3 listing is likely to be consistent. Files with modification timestamps falling within the last maxBand milliseconds are tracked specially when using JobBookmarks to account for Amazon S3 eventual consistency. Most users don't need to set this option. The default is 900000 milliseconds, or 15 minutes.

" + } + }, + "MaxFilesInBand": { + "target": "com.amazonaws.glue#BoxedNonNegativeInt", + "traits": { + "smithy.api#documentation": "

This option specifies the maximum number of files to save from the last maxBand seconds. If this number is exceeded, extra files are skipped and only processed in the next job run.

" + } + }, + "AdditionalOptions": { + "target": "com.amazonaws.glue#S3DirectSourceAdditionalOptions", + "traits": { + "smithy.api#documentation": "

Specifies additional connection options.

" + } + }, + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", + "traits": { + "smithy.api#documentation": "

Specifies the data schema for the S3 Parquet source.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies an Apache Parquet data store stored in Amazon S3.

" + } + }, + "com.amazonaws.glue#S3SourceAdditionalOptions": { + "type": "structure", + "members": { + "BoundedSize": { + "target": "com.amazonaws.glue#BoxedLong", + "traits": { + "smithy.api#documentation": "

Sets the upper limit for the target size of the dataset in bytes that will be processed.

" + } + }, + "BoundedFiles": { + "target": "com.amazonaws.glue#BoxedLong", + "traits": { + "smithy.api#documentation": "

Sets the upper limit for the target number of files that will be processed.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies additional connection options for the Amazon S3 data store.

" } }, "com.amazonaws.glue#S3Target": { @@ -18360,382 +21900,716 @@ "smithy.api#documentation": "

A continuation token, included if this is a continuation call.

" } }, - "Filters": { - "target": "com.amazonaws.glue#SearchPropertyPredicates", + "Filters": { + "target": "com.amazonaws.glue#SearchPropertyPredicates", + "traits": { + "smithy.api#documentation": "

A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.

\n\t\n\t

The Comparator member of the PropertyPredicate struct is used only for time fields, and can be omitted for other field types. Also, when comparing string values, such as when Key=Name, a fuzzy match algorithm is used. The Key field (for example, the value of the Name field) is split on certain punctuation characters, for example, -, :, #, etc. into tokens. Then each token is exact-match compared with the Value member of PropertyPredicate. For example, if Key=Name and Value=link, tables named customer-link and xx-link-yy are returned, but xxlinkyy is not returned.

" + } + }, + "SearchText": { + "target": "com.amazonaws.glue#ValueString", + "traits": { + "smithy.api#documentation": "

A string used for a text search.

\n\t

Specifying a value in quotes filters based on an exact match to the value.

" + } + }, + "SortCriteria": { + "target": "com.amazonaws.glue#SortCriteria", + "traits": { + "smithy.api#documentation": "

A list of criteria for sorting the results by a field name, in an ascending or descending order.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.glue#PageSize", + "traits": { + "smithy.api#documentation": "

The maximum number of tables to return in a single response.

" + } + }, + "ResourceShareType": { + "target": "com.amazonaws.glue#ResourceShareType", + "traits": { + "smithy.api#documentation": "

Allows you to specify that you want to search the tables shared with your account. The allowable values are FOREIGN or ALL.

\n\t\n\t
    \n
  • \n

    If set to FOREIGN, will search the tables shared with your account.

    \n
  • \n
  • \n

    If set to ALL, will search the tables shared with your account, as well as the tables in yor local account.

    \n
  • \n
" + } + } + } + }, + "com.amazonaws.glue#SearchTablesResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.glue#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, present if the current list segment is not the last.

" + } + }, + "TableList": { + "target": "com.amazonaws.glue#TableList", + "traits": { + "smithy.api#documentation": "

A list of the requested Table objects. The SearchTables response returns only the tables that you have access to.

" + } + } + } + }, + "com.amazonaws.glue#SecurityConfiguration": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The name of the security configuration.

" + } + }, + "CreatedTimeStamp": { + "target": "com.amazonaws.glue#TimestampValue", + "traits": { + "smithy.api#documentation": "

The time at which this security configuration was created.

" + } + }, + "EncryptionConfiguration": { + "target": "com.amazonaws.glue#EncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

The encryption configuration associated with this security configuration.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a security configuration.

" + } + }, + "com.amazonaws.glue#SecurityConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#SecurityConfiguration" + } + }, + "com.amazonaws.glue#SecurityGroupIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NameString" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.glue#Segment": { + "type": "structure", + "members": { + "SegmentNumber": { + "target": "com.amazonaws.glue#NonNegativeInteger", + "traits": { + "smithy.api#documentation": "

The zero-based index number of the segment. For example, if the total number of segments\n is 4, SegmentNumber values range from 0 through 3.

", + "smithy.api#required": {} + } + }, + "TotalSegments": { + "target": "com.amazonaws.glue#TotalSegmentsInteger", + "traits": { + "smithy.api#documentation": "

The total number of segments.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Defines a non-overlapping region of a table's partitions, allowing\n multiple requests to be run in parallel.

" + } + }, + "com.amazonaws.glue#SelectFields": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "Paths": { + "target": "com.amazonaws.glue#GlueStudioPathList", + "traits": { + "smithy.api#documentation": "

A JSON path to a variable in the data structure.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that chooses the data property keys that you want to keep.

" + } + }, + "com.amazonaws.glue#SelectFromCollection": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#OneInput", + "traits": { + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "Index": { + "target": "com.amazonaws.glue#NonNegativeInt", + "traits": { + "smithy.api#documentation": "

The index for the DynamicFrame to be selected.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that chooses one DynamicFrame from a collection of DynamicFrames. The output is the selected DynamicFrame\n

" + } + }, + "com.amazonaws.glue#Separator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "comma", + "name": "COMMA" + }, + { + "value": "ctrla", + "name": "CTRLA" + }, + { + "value": "pipe", + "name": "PIPE" + }, + { + "value": "semicolon", + "name": "SEMICOLON" + }, + { + "value": "tab", + "name": "TAB" + } + ] + } + }, + "com.amazonaws.glue#SerDeInfo": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

Name of the SerDe.

" + } + }, + "SerializationLibrary": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

Usually the class that implements the SerDe. An example is\n org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe.

" + } + }, + "Parameters": { + "target": "com.amazonaws.glue#ParametersMap", + "traits": { + "smithy.api#documentation": "

These key-value pairs define initialization parameters for the SerDe.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about a serialization/deserialization program (SerDe) that serves as an\n extractor and loader.

" + } + }, + "com.amazonaws.glue#Session": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.glue#NameString", + "traits": { + "smithy.api#documentation": "

The ID of the session.

" + } + }, + "CreatedOn": { + "target": "com.amazonaws.glue#TimestampValue", + "traits": { + "smithy.api#documentation": "

The time and date when the session was created.

" + } + }, + "Status": { + "target": "com.amazonaws.glue#SessionStatus", + "traits": { + "smithy.api#documentation": "

The session status.

" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.glue#DescriptionString", + "traits": { + "smithy.api#documentation": "

The error message displayed during the session.

" + } + }, + "Description": { + "target": "com.amazonaws.glue#DescriptionString", + "traits": { + "smithy.api#documentation": "

The description of the session.

" + } + }, + "Role": { + "target": "com.amazonaws.glue#OrchestrationRoleArn", + "traits": { + "smithy.api#documentation": "

The name or Amazon Resource Name (ARN) of the IAM role associated with the Session.

" + } + }, + "Command": { + "target": "com.amazonaws.glue#SessionCommand", + "traits": { + "smithy.api#documentation": "

The command object.See SessionCommand.

" + } + }, + "DefaultArguments": { + "target": "com.amazonaws.glue#OrchestrationArgumentsMap", + "traits": { + "smithy.api#documentation": "

A map array of key-value pairs. Max is 75 pairs.

" + } + }, + "Connections": { + "target": "com.amazonaws.glue#ConnectionsList", "traits": { - "smithy.api#documentation": "

A list of key-value pairs, and a comparator used to filter the search results. Returns all entities matching the predicate.

\n\t\n\t

The Comparator member of the PropertyPredicate struct is used only for time fields, and can be omitted for other field types. Also, when comparing string values, such as when Key=Name, a fuzzy match algorithm is used. The Key field (for example, the value of the Name field) is split on certain punctuation characters, for example, -, :, #, etc. into tokens. Then each token is exact-match compared with the Value member of PropertyPredicate. For example, if Key=Name and Value=link, tables named customer-link and xx-link-yy are returned, but xxlinkyy is not returned.

" + "smithy.api#documentation": "

The number of connections used for the session.

" } }, - "SearchText": { - "target": "com.amazonaws.glue#ValueString", + "Progress": { + "target": "com.amazonaws.glue#DoubleValue", "traits": { - "smithy.api#documentation": "

A string used for a text search.

\n\t

Specifying a value in quotes filters based on an exact match to the value.

" + "smithy.api#documentation": "

The code execution progress of the session.

" } }, - "SortCriteria": { - "target": "com.amazonaws.glue#SortCriteria", + "MaxCapacity": { + "target": "com.amazonaws.glue#NullableDouble", "traits": { - "smithy.api#documentation": "

A list of criteria for sorting the results by a field name, in an ascending or descending order.

" + "smithy.api#documentation": "

The number of AWS Glue data processing units (DPUs) that can be allocated when the job runs. \n A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.

" } }, - "MaxResults": { - "target": "com.amazonaws.glue#PageSize", + "SecurityConfiguration": { + "target": "com.amazonaws.glue#NameString", "traits": { - "smithy.api#documentation": "

The maximum number of tables to return in a single response.

" + "smithy.api#documentation": "

The name of the SecurityConfiguration structure to be used with the session.

" } }, - "ResourceShareType": { - "target": "com.amazonaws.glue#ResourceShareType", + "GlueVersion": { + "target": "com.amazonaws.glue#GlueVersionString", "traits": { - "smithy.api#documentation": "

Allows you to specify that you want to search the tables shared with your account. The allowable values are FOREIGN or ALL.

\n\t\n\t
    \n
  • \n

    If set to FOREIGN, will search the tables shared with your account.

    \n
  • \n
  • \n

    If set to ALL, will search the tables shared with your account, as well as the tables in yor local account.

    \n
  • \n
" + "smithy.api#documentation": "

The Glue version determines the versions of Apache Spark and Python that AWS Glue supports. \n The GlueVersion must be greater than 2.0.

" } } + }, + "traits": { + "smithy.api#documentation": "

The period in which a remote Spark runtime environment is running.

" } }, - "com.amazonaws.glue#SearchTablesResponse": { + "com.amazonaws.glue#SessionCommand": { "type": "structure", "members": { - "NextToken": { - "target": "com.amazonaws.glue#Token", + "Name": { + "target": "com.amazonaws.glue#NameString", "traits": { - "smithy.api#documentation": "

A continuation token, present if the current list segment is not the last.

" + "smithy.api#documentation": "

Specifies the name of the SessionCommand.Can be 'glueetl' or 'gluestreaming'.

" } }, - "TableList": { - "target": "com.amazonaws.glue#TableList", + "PythonVersion": { + "target": "com.amazonaws.glue#PythonVersionString", "traits": { - "smithy.api#documentation": "

A list of the requested Table objects. The SearchTables response returns only the tables that you have access to.

" + "smithy.api#documentation": "

Specifies the Python version. The Python version indicates the version supported for jobs of type Spark.

" } } + }, + "traits": { + "smithy.api#documentation": "

The SessionCommand that runs the job.

" } }, - "com.amazonaws.glue#SecurityConfiguration": { + "com.amazonaws.glue#SessionIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NameString" + } + }, + "com.amazonaws.glue#SessionList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#Session" + } + }, + "com.amazonaws.glue#SessionStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PROVISIONING", + "name": "PROVISIONING" + }, + { + "value": "READY", + "name": "READY" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "TIMEOUT", + "name": "TIMEOUT" + }, + { + "value": "STOPPING", + "name": "STOPPING" + }, + { + "value": "STOPPED", + "name": "STOPPED" + } + ] + } + }, + "com.amazonaws.glue#SkewedInfo": { "type": "structure", "members": { - "Name": { - "target": "com.amazonaws.glue#NameString", + "SkewedColumnNames": { + "target": "com.amazonaws.glue#NameStringList", "traits": { - "smithy.api#documentation": "

The name of the security configuration.

" + "smithy.api#documentation": "

A list of names of columns that contain skewed values.

" } }, - "CreatedTimeStamp": { - "target": "com.amazonaws.glue#TimestampValue", + "SkewedColumnValues": { + "target": "com.amazonaws.glue#ColumnValueStringList", "traits": { - "smithy.api#documentation": "

The time at which this security configuration was created.

" + "smithy.api#documentation": "

A list of values that appear so frequently as to be considered\n skewed.

" } }, - "EncryptionConfiguration": { - "target": "com.amazonaws.glue#EncryptionConfiguration", + "SkewedColumnValueLocationMaps": { + "target": "com.amazonaws.glue#LocationMap", "traits": { - "smithy.api#documentation": "

The encryption configuration associated with this security configuration.

" + "smithy.api#documentation": "

A mapping of skewed values to the columns that contain them.

" } } }, "traits": { - "smithy.api#documentation": "

Specifies a security configuration.

" + "smithy.api#documentation": "

Specifies skewed values in a table. Skewed values are those that occur with very high\n frequency.

" } }, - "com.amazonaws.glue#SecurityConfigurationList": { - "type": "list", - "member": { - "target": "com.amazonaws.glue#SecurityConfiguration" + "com.amazonaws.glue#Sort": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASC", + "name": "ASCENDING" + }, + { + "value": "DESC", + "name": "DESCENDING" + } + ] } }, - "com.amazonaws.glue#SecurityGroupIdList": { + "com.amazonaws.glue#SortCriteria": { "type": "list", "member": { - "target": "com.amazonaws.glue#NameString" + "target": "com.amazonaws.glue#SortCriterion" }, "traits": { "smithy.api#length": { "min": 0, - "max": 50 + "max": 1 } } }, - "com.amazonaws.glue#Segment": { + "com.amazonaws.glue#SortCriterion": { "type": "structure", "members": { - "SegmentNumber": { - "target": "com.amazonaws.glue#NonNegativeInteger", + "FieldName": { + "target": "com.amazonaws.glue#ValueString", "traits": { - "smithy.api#documentation": "

The zero-based index number of the segment. For example, if the total number of segments\n is 4, SegmentNumber values range from 0 through 3.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The name of the field on which to sort.

" } }, - "TotalSegments": { - "target": "com.amazonaws.glue#TotalSegmentsInteger", + "Sort": { + "target": "com.amazonaws.glue#Sort", "traits": { - "smithy.api#documentation": "

The total number of segments.

", - "smithy.api#required": {} + "smithy.api#documentation": "

An ascending or descending sort.

" } } }, "traits": { - "smithy.api#documentation": "

Defines a non-overlapping region of a table's partitions, allowing\n multiple requests to be run in parallel.

" + "smithy.api#documentation": "

Specifies a field to sort by and a sort order.

" } }, - "com.amazonaws.glue#SerDeInfo": { + "com.amazonaws.glue#SortDirectionType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DESCENDING", + "name": "DESCENDING" + }, + { + "value": "ASCENDING", + "name": "ASCENDING" + } + ] + } + }, + "com.amazonaws.glue#SparkConnectorSource": { "type": "structure", "members": { "Name": { - "target": "com.amazonaws.glue#NameString", + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

Name of the SerDe.

" + "smithy.api#documentation": "

The name of the data source.

", + "smithy.api#required": {} } }, - "SerializationLibrary": { - "target": "com.amazonaws.glue#NameString", + "ConnectionName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

Usually the class that implements the SerDe. An example is\n org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe.

" + "smithy.api#documentation": "

The name of the connection that is associated with the connector.

", + "smithy.api#required": {} } }, - "Parameters": { - "target": "com.amazonaws.glue#ParametersMap", + "ConnectorName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

These key-value pairs define initialization parameters for the SerDe.

" + "smithy.api#documentation": "

The name of a connector that assists with accessing the data store in Glue Studio.

", + "smithy.api#required": {} + } + }, + "ConnectionType": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The type of connection, such as marketplace.spark or custom.spark, designating a connection to an Apache Spark data store.

", + "smithy.api#required": {} + } + }, + "AdditionalOptions": { + "target": "com.amazonaws.glue#AdditionalOptions", + "traits": { + "smithy.api#documentation": "

Additional connection options for the connector.

" + } + }, + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", + "traits": { + "smithy.api#documentation": "

Specifies data schema for the custom spark source.

" } } }, "traits": { - "smithy.api#documentation": "

Information about a serialization/deserialization program (SerDe) that serves as an\n extractor and loader.

" + "smithy.api#documentation": "

Specifies a connector to an Apache Spark data source.

" } }, - "com.amazonaws.glue#Session": { + "com.amazonaws.glue#SparkConnectorTarget": { "type": "structure", "members": { - "Id": { - "target": "com.amazonaws.glue#NameString", - "traits": { - "smithy.api#documentation": "

The ID of the session.

" - } - }, - "CreatedOn": { - "target": "com.amazonaws.glue#TimestampValue", + "Name": { + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

The time and date when the session was created.

" + "smithy.api#documentation": "

The name of the data target.

", + "smithy.api#required": {} } }, - "Status": { - "target": "com.amazonaws.glue#SessionStatus", + "Inputs": { + "target": "com.amazonaws.glue#OneInput", "traits": { - "smithy.api#documentation": "

The session status.

" + "smithy.api#documentation": "

The nodes that are inputs to the data target.

", + "smithy.api#required": {} } }, - "ErrorMessage": { - "target": "com.amazonaws.glue#DescriptionString", + "ConnectionName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

The error message displayed during the session.

" + "smithy.api#documentation": "

The name of a connection for an Apache Spark connector.

", + "smithy.api#required": {} } }, - "Description": { - "target": "com.amazonaws.glue#DescriptionString", + "ConnectorName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

The description of the session.

" + "smithy.api#documentation": "

The name of an Apache Spark connector.

", + "smithy.api#required": {} } }, - "Role": { - "target": "com.amazonaws.glue#OrchestrationRoleArn", + "ConnectionType": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", "traits": { - "smithy.api#documentation": "

The name or Amazon Resource Name (ARN) of the IAM role associated with the Session.

" + "smithy.api#documentation": "

The type of connection, such as marketplace.spark or custom.spark, designating a connection to an Apache Spark data store.

", + "smithy.api#required": {} } }, - "Command": { - "target": "com.amazonaws.glue#SessionCommand", + "AdditionalOptions": { + "target": "com.amazonaws.glue#AdditionalOptions", "traits": { - "smithy.api#documentation": "

The command object.See SessionCommand.

" + "smithy.api#documentation": "

Additional connection options for the connector.

" } }, - "DefaultArguments": { - "target": "com.amazonaws.glue#OrchestrationArgumentsMap", + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", "traits": { - "smithy.api#documentation": "

A map array of key-value pairs. Max is 75 pairs.

" + "smithy.api#documentation": "

Specifies the data schema for the custom spark target.

" } - }, - "Connections": { - "target": "com.amazonaws.glue#ConnectionsList", + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a target that uses an Apache Spark connector.

" + } + }, + "com.amazonaws.glue#SparkSQL": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

The number of connections used for the session.

" + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} } }, - "Progress": { - "target": "com.amazonaws.glue#DoubleValue", + "Inputs": { + "target": "com.amazonaws.glue#ManyInputs", "traits": { - "smithy.api#documentation": "

The code execution progress of the session.

" + "smithy.api#documentation": "

The data inputs identified by their node names. You can associate a table name with each input node to use in the SQL query. The name you choose must meet the Spark SQL naming restrictions.

", + "smithy.api#required": {} } }, - "MaxCapacity": { - "target": "com.amazonaws.glue#NullableDouble", + "SqlQuery": { + "target": "com.amazonaws.glue#SqlQuery", "traits": { - "smithy.api#documentation": "

The number of AWS Glue data processing units (DPUs) that can be allocated when the job runs. \n A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.

" + "smithy.api#documentation": "

A SQL query that must use Spark SQL syntax and return a single data set.

", + "smithy.api#required": {} } }, - "SecurityConfiguration": { - "target": "com.amazonaws.glue#NameString", + "SqlAliases": { + "target": "com.amazonaws.glue#SqlAliases", "traits": { - "smithy.api#documentation": "

The name of the SecurityConfiguration structure to be used with the session.

" + "smithy.api#documentation": "

A list of aliases. An alias allows you to specify what name to use in the SQL for a given input. For example, you have a datasource named \"MyDataSource\". If you specify From as MyDataSource, and Alias as SqlName, then in your SQL you can do:

\n\n

\n select *\nfrom SqlName\n

\n\n

and that gets data from MyDataSource.

", + "smithy.api#required": {} } }, - "GlueVersion": { - "target": "com.amazonaws.glue#GlueVersionString", + "OutputSchemas": { + "target": "com.amazonaws.glue#GlueSchemas", "traits": { - "smithy.api#documentation": "

The Glue version determines the versions of Apache Spark and Python that AWS Glue supports. \n The GlueVersion must be greater than 2.0.

" + "smithy.api#documentation": "

Specifies the data schema for the SparkSQL transform.

" } } }, "traits": { - "smithy.api#documentation": "

The period in which a remote Spark runtime environment is running.

" + "smithy.api#documentation": "

Specifies a transform where you enter a SQL query using Spark SQL syntax to transform the data. The output is a single DynamicFrame.

" } }, - "com.amazonaws.glue#SessionCommand": { + "com.amazonaws.glue#Spigot": { "type": "structure", "members": { "Name": { - "target": "com.amazonaws.glue#NameString", + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

Specifies the name of the SessionCommand.Can be 'glueetl' or 'gluestreaming'.

" + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} } }, - "PythonVersion": { - "target": "com.amazonaws.glue#PythonVersionString", + "Inputs": { + "target": "com.amazonaws.glue#OneInput", "traits": { - "smithy.api#documentation": "

Specifies the Python version. The Python version indicates the version supported for jobs of type Spark.

" + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} + } + }, + "Path": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

A path in Amazon S3 where the transform will write a subset of records from the dataset to a JSON file in an Amazon S3 bucket.

", + "smithy.api#required": {} + } + }, + "Topk": { + "target": "com.amazonaws.glue#Topk", + "traits": { + "smithy.api#documentation": "

Specifies a number of records to write starting from the beginning of the dataset.

" + } + }, + "Prob": { + "target": "com.amazonaws.glue#Prob", + "traits": { + "smithy.api#documentation": "

The probability (a decimal value with a maximum value of 1) of picking any given record. A value of 1 indicates that each row read from the dataset should be included in the sample output.

" } } }, "traits": { - "smithy.api#documentation": "

The SessionCommand that runs the job.

" - } - }, - "com.amazonaws.glue#SessionIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.glue#NameString" - } - }, - "com.amazonaws.glue#SessionList": { - "type": "list", - "member": { - "target": "com.amazonaws.glue#Session" - } - }, - "com.amazonaws.glue#SessionStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PROVISIONING", - "name": "PROVISIONING" - }, - { - "value": "READY", - "name": "READY" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "TIMEOUT", - "name": "TIMEOUT" - }, - { - "value": "STOPPING", - "name": "STOPPING" - }, - { - "value": "STOPPED", - "name": "STOPPED" - } - ] + "smithy.api#documentation": "

Specifies a transform that writes samples of the data to an Amazon S3 bucket.

" } }, - "com.amazonaws.glue#SkewedInfo": { + "com.amazonaws.glue#SplitFields": { "type": "structure", "members": { - "SkewedColumnNames": { - "target": "com.amazonaws.glue#NameStringList", + "Name": { + "target": "com.amazonaws.glue#NodeName", "traits": { - "smithy.api#documentation": "

A list of names of columns that contain skewed values.

" + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} } }, - "SkewedColumnValues": { - "target": "com.amazonaws.glue#ColumnValueStringList", + "Inputs": { + "target": "com.amazonaws.glue#OneInput", "traits": { - "smithy.api#documentation": "

A list of values that appear so frequently as to be considered\n skewed.

" + "smithy.api#documentation": "

The data inputs identified by their node names.

", + "smithy.api#required": {} } }, - "SkewedColumnValueLocationMaps": { - "target": "com.amazonaws.glue#LocationMap", + "Paths": { + "target": "com.amazonaws.glue#GlueStudioPathList", "traits": { - "smithy.api#documentation": "

A mapping of skewed values to the columns that contain them.

" + "smithy.api#documentation": "

A JSON path to a variable in the data structure.

", + "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Specifies skewed values in a table. Skewed values are those that occur with very high\n frequency.

" - } - }, - "com.amazonaws.glue#Sort": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ASC", - "name": "ASCENDING" - }, - { - "value": "DESC", - "name": "DESCENDING" - } - ] - } - }, - "com.amazonaws.glue#SortCriteria": { - "type": "list", - "member": { - "target": "com.amazonaws.glue#SortCriterion" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 1 - } + "smithy.api#documentation": "

Specifies a transform that splits data property keys into two DynamicFrames. The output is a collection of DynamicFrames: one with selected data property keys, and one with the remaining data property keys.

" } }, - "com.amazonaws.glue#SortCriterion": { + "com.amazonaws.glue#SqlAlias": { "type": "structure", "members": { - "FieldName": { - "target": "com.amazonaws.glue#ValueString", + "From": { + "target": "com.amazonaws.glue#NodeId", "traits": { - "smithy.api#documentation": "

The name of the field on which to sort.

" + "smithy.api#documentation": "

A table, or a column in a table.

", + "smithy.api#required": {} } }, - "Sort": { - "target": "com.amazonaws.glue#Sort", + "Alias": { + "target": "com.amazonaws.glue#EnclosedInStringPropertyWithQuote", "traits": { - "smithy.api#documentation": "

An ascending or descending sort.

" + "smithy.api#documentation": "

A temporary name given to a table, or a column in a table.

", + "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Specifies a field to sort by and a sort order.

" + "smithy.api#documentation": "

Represents a single entry in the list of values for SqlAliases.

" } }, - "com.amazonaws.glue#SortDirectionType": { + "com.amazonaws.glue#SqlAliases": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#SqlAlias" + } + }, + "com.amazonaws.glue#SqlQuery": { "type": "string", "traits": { - "smithy.api#enum": [ - { - "value": "DESCENDING", - "name": "DESCENDING" - }, - { - "value": "ASCENDING", - "name": "ASCENDING" - } - ] + "smithy.api#pattern": "^([\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\s])*$" } }, "com.amazonaws.glue#StartBlueprintRun": { @@ -19373,6 +23247,25 @@ "smithy.api#documentation": "

The batch condition that started the workflow run. Either the number of events in the batch size arrived,\n in which case the BatchSize member is non-zero, or the batch window expired, in which case the BatchWindow\n member is non-zero.

" } }, + "com.amazonaws.glue#StartingPosition": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "latest", + "name": "LATEST" + }, + { + "value": "trim_horizon", + "name": "TRIM_HORIZON" + }, + { + "value": "earliest", + "name": "EARLIEST" + } + ] + } + }, "com.amazonaws.glue#Statement": { "type": "structure", "members": { @@ -19856,6 +23749,26 @@ "smithy.api#documentation": "

Describes the physical storage of table data.

" } }, + "com.amazonaws.glue#StreamingDataPreviewOptions": { + "type": "structure", + "members": { + "PollingTime": { + "target": "com.amazonaws.glue#PollingTime", + "traits": { + "smithy.api#documentation": "

The polling time in milliseconds.

" + } + }, + "RecordPollingLimit": { + "target": "com.amazonaws.glue#PositiveLong", + "traits": { + "smithy.api#documentation": "

The limit to the number of records polled.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies options related to data preview for viewing a sample of your data.

" + } + }, "com.amazonaws.glue#StringColumnStatisticsData": { "type": "structure", "members": { @@ -20336,6 +24249,33 @@ } } }, + "com.amazonaws.glue#TargetFormat": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "json", + "name": "JSON" + }, + { + "value": "csv", + "name": "CSV" + }, + { + "value": "avro", + "name": "AVRO" + }, + { + "value": "orc", + "name": "ORC" + }, + { + "value": "parquet", + "name": "PARQUET" + } + ] + } + }, "com.amazonaws.glue#TaskRun": { "type": "structure", "members": { @@ -20601,6 +24541,16 @@ "com.amazonaws.glue#Token": { "type": "string" }, + "com.amazonaws.glue#Topk": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.glue#TotalSegmentsInteger": { "type": "integer", "traits": { @@ -21026,6 +24976,18 @@ "smithy.api#documentation": "

A structure used to provide information used to update a trigger. This object updates the\n previous trigger definition by overwriting it completely.

" } }, + "com.amazonaws.glue#TwoInputs": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#NodeId" + }, + "traits": { + "smithy.api#length": { + "min": 2, + "max": 2 + } + } + }, "com.amazonaws.glue#TypeString": { "type": "string", "traits": { @@ -21066,6 +25028,50 @@ "target": "com.amazonaws.glue#UnfilteredPartition" } }, + "com.amazonaws.glue#Union": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.glue#NodeName", + "traits": { + "smithy.api#documentation": "

The name of the transform node.

", + "smithy.api#required": {} + } + }, + "Inputs": { + "target": "com.amazonaws.glue#TwoInputs", + "traits": { + "smithy.api#documentation": "

The node ID inputs to the transform.

", + "smithy.api#required": {} + } + }, + "UnionType": { + "target": "com.amazonaws.glue#UnionType", + "traits": { + "smithy.api#documentation": "

Indicates the type of Union transform.

\n\t\n\t

Specify ALL to join all rows from data sources to the resulting DynamicFrame. The resulting union does not remove duplicate rows.

\n\n

Specify DISTINCT to remove duplicate rows in the resulting DynamicFrame.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies a transform that combines the rows from two or more datasets into a single result.

" + } + }, + "com.amazonaws.glue#UnionType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ALL", + "name": "ALL" + }, + { + "value": "DISTINCT", + "name": "DISTINCT" + } + ] + } + }, "com.amazonaws.glue#UntagResource": { "type": "operation", "input": { @@ -21198,6 +25204,21 @@ } } }, + "com.amazonaws.glue#UpdateCatalogBehavior": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "UPDATE_IN_DATABASE", + "name": "UPDATE_IN_DATABASE" + }, + { + "value": "LOG", + "name": "LOG" + } + ] + } + }, "com.amazonaws.glue#UpdateClassifier": { "type": "operation", "input": { @@ -22595,6 +26616,32 @@ "com.amazonaws.glue#UpdatedTimestamp": { "type": "string" }, + "com.amazonaws.glue#UpsertRedshiftTargetOptions": { + "type": "structure", + "members": { + "TableLocation": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The physical location of the Redshift table.

" + } + }, + "ConnectionName": { + "target": "com.amazonaws.glue#EnclosedInStringProperty", + "traits": { + "smithy.api#documentation": "

The name of the connection to use to write to Redshift.

" + } + }, + "UpsertKeys": { + "target": "com.amazonaws.glue#EnclosedInStringPropertiesMinOne", + "traits": { + "smithy.api#documentation": "

The keys used to determine whether to perform an update or insert.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The options to configure an upsert operation when writing to a Redshift target .

" + } + }, "com.amazonaws.glue#UriString": { "type": "string" }, diff --git a/aws/sdk/aws-models/grafana.json b/aws/sdk/aws-models/grafana.json index 7012c34316b..109d90979ba 100644 --- a/aws/sdk/aws-models/grafana.json +++ b/aws/sdk/aws-models/grafana.json @@ -8,9 +8,7 @@ "aws.api#service": { "sdkId": "grafana", "arnNamespace": "grafana", - "cloudFormationName": "AWSGrafanaControlPlane", - "cloudTrailEventSource": "EVENT_SOURCE_VALUE", - "endpointPrefix": "grafana" + "cloudTrailEventSource": "EVENT_SOURCE_VALUE" }, "aws.auth#sigv4": { "name": "grafana" @@ -18,20 +16,21 @@ "aws.protocols#restJson1": {}, "smithy.api#cors": { "additionalAllowedHeaders": [ - "x-amz-content-sha256", - "x-amzn-trace-id", - "x-amz-user-agent", "*", "content-type", - "x-amzn-platform-id" + "x-amz-content-sha256", + "x-amz-user-agent", + "x-amzn-platform-id", + "x-amzn-trace-id" ], "additionalExposedHeaders": [ - "x-amzn-trace-id", + "cache-control", "x-amzn-errortype", "x-amzn-requestid", "x-amzn-errormessage", - "x-amz-apigw-id,date", - "cache-control" + "x-amzn-trace-id", + "x-amzn-requestid", + "x-amz-apigw-id,date" ] }, "smithy.api#documentation": "

Amazon Managed Grafana is a fully managed and secure data visualization service that you can use to \n instantly query, correlate, and visualize operational metrics, logs, and traces from multiple sources. \n Amazon Managed Grafana makes it easy to deploy, operate, and scale Grafana, a widely deployed data visualization tool \n that is popular for its extensible data support.

\n

With Amazon Managed Grafana, you create logically isolated Grafana servers called workspaces. In\n a workspace, you can create Grafana dashboards and visualizations to analyze your metrics, logs, and traces without having to\n build, package, or deploy any hardware to run Grafana servers.

", @@ -50,6 +49,9 @@ } ], "resources": [ + { + "target": "com.amazonaws.grafana#ApiKey" + }, { "target": "com.amazonaws.grafana#Authentication" }, @@ -85,13 +87,13 @@ "traits": { "smithy.api#enum": [ { - "value": "CURRENT_ACCOUNT", "name": "CURRENT_ACCOUNT", + "value": "CURRENT_ACCOUNT", "documentation": "Indicates that the customer is using Grafana to monitor resources in their current account." }, { - "value": "ORGANIZATION", "name": "ORGANIZATION", + "value": "ORGANIZATION", "documentation": "Indicates that the customer is using Grafana to monitor resources in organizational units." } ] @@ -112,6 +114,42 @@ "target": "com.amazonaws.grafana#AllowedOrganization" } }, + "com.amazonaws.grafana#ApiKey": { + "type": "resource", + "identifiers": { + "workspaceId": { + "target": "com.amazonaws.grafana#WorkspaceId" + } + }, + "operations": [ + { + "target": "com.amazonaws.grafana#CreateWorkspaceApiKey" + }, + { + "target": "com.amazonaws.grafana#DeleteWorkspaceApiKey" + } + ], + "traits": { + "aws.api#arn": { + "template": "workspaces/{workspaceId}/apikeys" + } + } + }, + "com.amazonaws.grafana#ApiKeyName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.grafana#ApiKeyToken": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, "com.amazonaws.grafana#AssertionAttribute": { "type": "string", "traits": { @@ -193,9 +231,9 @@ "traits": { "smithy.api#documentation": "

Assigns a Grafana Enterprise license to a workspace. Upgrading to Grafana Enterprise\n incurs additional fees. For more information, see Upgrade a workspace to\n Grafana Enterprise.

", "smithy.api#http": { + "code": 202, "method": "POST", - "uri": "/workspaces/{workspaceId}/licenses/{licenseType}", - "code": 202 + "uri": "/workspaces/{workspaceId}/licenses/{licenseType}" } } }, @@ -249,10 +287,7 @@ ], "traits": { "aws.api#arn": { - "template": "workspaces/{workspaceId}/authentication", - "absolute": false, - "noAccount": false, - "noRegion": false + "template": "workspaces/{workspaceId}/authentication" } } }, @@ -288,13 +323,13 @@ "traits": { "smithy.api#enum": [ { - "value": "AWS_SSO", "name": "AWS_SSO", + "value": "AWS_SSO", "documentation": "Indicates that AMG workspace has AWS SSO enabled as its authentication provider." }, { - "value": "SAML", "name": "SAML", + "value": "SAML", "documentation": "Indicates that the AMG workspace has SAML enabled as its authentication provider." } ] @@ -409,13 +444,117 @@ "traits": { "smithy.api#documentation": "

Creates a workspace. In a workspace, you can create Grafana\n dashboards and visualizations to analyze your metrics, logs, and traces. You don't have to\n build, package, or deploy any hardware to run the Grafana server.

\n

Don't use CreateWorkspace to modify an existing workspace. Instead, \n use UpdateWorkspace.

", "smithy.api#http": { + "code": 202, "method": "POST", - "uri": "/workspaces", - "code": 202 + "uri": "/workspaces" }, "smithy.api#idempotent": {} } }, + "com.amazonaws.grafana#CreateWorkspaceApiKey": { + "type": "operation", + "input": { + "target": "com.amazonaws.grafana#CreateWorkspaceApiKeyRequest" + }, + "output": { + "target": "com.amazonaws.grafana#CreateWorkspaceApiKeyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.grafana#AccessDeniedException" + }, + { + "target": "com.amazonaws.grafana#ConflictException" + }, + { + "target": "com.amazonaws.grafana#InternalServerException" + }, + { + "target": "com.amazonaws.grafana#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.grafana#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.grafana#ThrottlingException" + }, + { + "target": "com.amazonaws.grafana#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an API key for the workspace. This key can be used to authenticate \n requests sent to the workspace's HTTP API. See \n https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html \n for available APIs and example requests.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/workspaces/{workspaceId}/apikeys" + } + } + }, + "com.amazonaws.grafana#CreateWorkspaceApiKeyRequest": { + "type": "structure", + "members": { + "keyName": { + "target": "com.amazonaws.grafana#ApiKeyName", + "traits": { + "smithy.api#documentation": "

Specifies the name of the key to create. Key names must be unique to the workspace.

", + "smithy.api#required": {} + } + }, + "keyRole": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Specifies the permission level of the key.

\n

Valid Values: VIEWER | EDITOR | ADMIN\n

", + "smithy.api#required": {} + } + }, + "secondsToLive": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Specifies the time in seconds until the key expires. Keys can be valid for up to 30 days.

", + "smithy.api#range": { + "min": 1, + "max": 2592000 + }, + "smithy.api#required": {} + } + }, + "workspaceId": { + "target": "com.amazonaws.grafana#WorkspaceId", + "traits": { + "smithy.api#documentation": "

The ID of the workspace in which to create an API key.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.grafana#CreateWorkspaceApiKeyResponse": { + "type": "structure", + "members": { + "keyName": { + "target": "com.amazonaws.grafana#ApiKeyName", + "traits": { + "smithy.api#documentation": "

The name of the key that was created.

", + "smithy.api#required": {} + } + }, + "key": { + "target": "com.amazonaws.grafana#ApiKeyToken", + "traits": { + "smithy.api#documentation": "

The key token that was created. Use this value as a bearer token to \n authenticate HTTP requests to the workspace.

", + "smithy.api#required": {} + } + }, + "workspaceId": { + "target": "com.amazonaws.grafana#WorkspaceId", + "traits": { + "smithy.api#documentation": "

The ID of the workspace that the key is valid for.

", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.grafana#CreateWorkspaceRequest": { "type": "structure", "members": { @@ -520,43 +659,43 @@ "traits": { "smithy.api#enum": [ { - "value": "AMAZON_OPENSEARCH_SERVICE", "name": "AMAZON_OPENSEARCH_SERVICE", + "value": "AMAZON_OPENSEARCH_SERVICE", "documentation": "Amazon OpenSearch Service" }, { - "value": "CLOUDWATCH", "name": "CLOUDWATCH", + "value": "CLOUDWATCH", "documentation": "CloudWatch Logs" }, { - "value": "PROMETHEUS", "name": "PROMETHEUS", + "value": "PROMETHEUS", "documentation": "Managed Prometheus" }, { - "value": "XRAY", "name": "XRAY", + "value": "XRAY", "documentation": "X-Ray" }, { - "value": "TIMESTREAM", "name": "TIMESTREAM", + "value": "TIMESTREAM", "documentation": "Timestream" }, { - "value": "SITEWISE", "name": "SITEWISE", + "value": "SITEWISE", "documentation": "IoT SiteWise" }, { - "value": "ATHENA", "name": "ATHENA", + "value": "ATHENA", "documentation": "Amazon Athena" }, { - "value": "REDSHIFT", "name": "REDSHIFT", + "value": "REDSHIFT", "documentation": "Redshift" } ] @@ -599,13 +738,90 @@ "traits": { "smithy.api#documentation": "

Deletes an Amazon Managed Grafana workspace.

", "smithy.api#http": { + "code": 202, "method": "DELETE", - "uri": "/workspaces/{workspaceId}", - "code": 202 + "uri": "/workspaces/{workspaceId}" }, "smithy.api#idempotent": {} } }, + "com.amazonaws.grafana#DeleteWorkspaceApiKey": { + "type": "operation", + "input": { + "target": "com.amazonaws.grafana#DeleteWorkspaceApiKeyRequest" + }, + "output": { + "target": "com.amazonaws.grafana#DeleteWorkspaceApiKeyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.grafana#AccessDeniedException" + }, + { + "target": "com.amazonaws.grafana#ConflictException" + }, + { + "target": "com.amazonaws.grafana#InternalServerException" + }, + { + "target": "com.amazonaws.grafana#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.grafana#ThrottlingException" + }, + { + "target": "com.amazonaws.grafana#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an API key for a workspace.

", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/workspaces/{workspaceId}/apikeys/{keyName}" + } + } + }, + "com.amazonaws.grafana#DeleteWorkspaceApiKeyRequest": { + "type": "structure", + "members": { + "keyName": { + "target": "com.amazonaws.grafana#ApiKeyName", + "traits": { + "smithy.api#documentation": "

The name of the API key to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workspaceId": { + "target": "com.amazonaws.grafana#WorkspaceId", + "traits": { + "smithy.api#documentation": "

The ID of the workspace to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.grafana#DeleteWorkspaceApiKeyResponse": { + "type": "structure", + "members": { + "keyName": { + "target": "com.amazonaws.grafana#ApiKeyName", + "traits": { + "smithy.api#documentation": "

The name of the API key that was deleted.

", + "smithy.api#required": {} + } + }, + "workspaceId": { + "target": "com.amazonaws.grafana#WorkspaceId", + "traits": { + "smithy.api#documentation": "

The ID of the workspace where the key was deleted.

", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.grafana#DeleteWorkspaceRequest": { "type": "structure", "members": { @@ -659,9 +875,9 @@ "traits": { "smithy.api#documentation": "

Displays information about one Amazon Managed Grafana workspace.

", "smithy.api#http": { + "code": 200, "method": "GET", - "uri": "/workspaces/{workspaceId}", - "code": 200 + "uri": "/workspaces/{workspaceId}" }, "smithy.api#readonly": {} } @@ -694,9 +910,9 @@ "traits": { "smithy.api#documentation": "

Displays information about the authentication methods used in one Amazon Managed Grafana workspace.

", "smithy.api#http": { + "code": 200, "method": "GET", - "uri": "/workspaces/{workspaceId}/authentication", - "code": 200 + "uri": "/workspaces/{workspaceId}/authentication" }, "smithy.api#readonly": {} } @@ -789,9 +1005,9 @@ "traits": { "smithy.api#documentation": "

Removes the Grafana Enterprise license from a workspace.

", "smithy.api#http": { + "code": 202, "method": "DELETE", - "uri": "/workspaces/{workspaceId}/licenses/{licenseType}", - "code": 202 + "uri": "/workspaces/{workspaceId}/licenses/{licenseType}" } } }, @@ -933,10 +1149,7 @@ ], "traits": { "aws.api#arn": { - "template": "workspaces/{workspaceId}/licenses/{licenseType}", - "absolute": false, - "noAccount": false, - "noRegion": false + "template": "workspaces/{workspaceId}/licenses/{licenseType}" } } }, @@ -945,13 +1158,13 @@ "traits": { "smithy.api#enum": [ { - "value": "ENTERPRISE", "name": "ENTERPRISE", + "value": "ENTERPRISE", "documentation": "Grafana Enterprise License." }, { - "value": "ENTERPRISE_FREE_TRIAL", "name": "ENTERPRISE_FREE_TRIAL", + "value": "ENTERPRISE_FREE_TRIAL", "documentation": "Grafana Enterprise Free Trial License." } ] @@ -985,15 +1198,15 @@ "traits": { "smithy.api#documentation": "

Lists the users and groups who have the Grafana Admin and \n Editor roles in this workspace. If you use this \n operation without specifying userId or groupId, the operation returns\n the roles of all users\n and groups. If you specify a userId or a groupId, only the roles\n for that user or group are returned. If you do this, you can specify only one userId or \n one groupId.

", "smithy.api#http": { + "code": 200, "method": "GET", - "uri": "/workspaces/{workspaceId}/permissions", - "code": 200 + "uri": "/workspaces/{workspaceId}/permissions" }, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "permissions", - "pageSize": "maxResults" + "pageSize": "maxResults", + "items": "permissions" }, "smithy.api#readonly": {} } @@ -1097,8 +1310,7 @@ "smithy.api#documentation": "

The ListTagsForResource operation returns the tags that \n are associated with the Amazon Managed Service for Grafana resource specified by the resourceArn. \n Currently, the only resource that can be tagged is a workspace.

", "smithy.api#http": { "method": "GET", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" }, "smithy.api#readonly": {} } @@ -1149,15 +1361,15 @@ "traits": { "smithy.api#documentation": "

Returns a list of Amazon Managed Grafana workspaces in the account, with some information\n about each workspace. For more complete information about one workspace, use DescribeWorkspace.

", "smithy.api#http": { + "code": 200, "method": "GET", - "uri": "/workspaces", - "code": 200 + "uri": "/workspaces" }, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "workspaces", - "pageSize": "maxResults" + "pageSize": "maxResults", + "items": "workspaces" }, "smithy.api#readonly": {} } @@ -1211,8 +1423,8 @@ "traits": { "smithy.api#enum": [ { - "value": "SNS", "name": "SNS", + "value": "SNS", "documentation": "AWS Simple Notification Service" } ] @@ -1269,10 +1481,7 @@ ], "traits": { "aws.api#arn": { - "template": "workspaces/{workspaceId}/permissions/{permissionId}", - "absolute": false, - "noAccount": false, - "noRegion": false + "template": "workspaces/{workspaceId}/permissions/{permissionId}" } } }, @@ -1309,13 +1518,13 @@ "traits": { "smithy.api#enum": [ { - "value": "CUSTOMER_MANAGED", "name": "CUSTOMER_MANAGED", + "value": "CUSTOMER_MANAGED", "documentation": "Customer Managed" }, { - "value": "SERVICE_MANAGED", "name": "SERVICE_MANAGED", + "value": "SERVICE_MANAGED", "documentation": "Service Managed" } ] @@ -1357,14 +1566,19 @@ "traits": { "smithy.api#enum": [ { - "value": "ADMIN", "name": "ADMIN", + "value": "ADMIN", "documentation": "Role Admin." }, { - "value": "EDITOR", "name": "EDITOR", + "value": "EDITOR", "documentation": "Role Editor." + }, + { + "name": "VIEWER", + "value": "VIEWER", + "documentation": "Role Viewer." } ] } @@ -1472,13 +1686,13 @@ "traits": { "smithy.api#enum": [ { - "value": "CONFIGURED", "name": "CONFIGURED", + "value": "CONFIGURED", "documentation": "Indicates that SAML on an AMG workspace is enabled and has been configured." }, { - "value": "NOT_CONFIGURED", "name": "NOT_CONFIGURED", + "value": "NOT_CONFIGURED", "documentation": "Indicates that SAML on an AMG workspace is enabled but has not been configured." } ] @@ -1599,8 +1813,7 @@ "smithy.api#documentation": "

The TagResource operation associates tags with an Amazon Managed Grafana resource. \n Currently, the only resource that can be tagged is workspaces.

\n

If you specify a new tag key for the resource, this tag is appended to the list of tags associated\n with the resource. If you specify a tag key that is already associated with the resource, the new tag \n value that you specify replaces the previous value for that tag.

", "smithy.api#http": { "method": "POST", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" } } }, @@ -1703,8 +1916,7 @@ "smithy.api#documentation": "

The UntagResource operation removes the association of the tag with the Amazon Managed Grafana resource. \n

", "smithy.api#http": { "method": "DELETE", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" }, "smithy.api#idempotent": {} } @@ -1739,13 +1951,13 @@ "traits": { "smithy.api#enum": [ { - "value": "ADD", "name": "ADD", + "value": "ADD", "documentation": "Add permissions." }, { - "value": "REVOKE", "name": "REVOKE", + "value": "REVOKE", "documentation": "Revoke permissions." } ] @@ -1859,9 +2071,9 @@ "traits": { "smithy.api#documentation": "

Updates which users in a workspace have the Grafana Admin or Editor roles.

", "smithy.api#http": { + "code": 200, "method": "PATCH", - "uri": "/workspaces/{workspaceId}/permissions", - "code": 200 + "uri": "/workspaces/{workspaceId}/permissions" } } }, @@ -1928,9 +2140,9 @@ "traits": { "smithy.api#documentation": "

Modifies an existing Amazon Managed Grafana workspace. If you use this operation and omit any \n optional parameters, the existing values of those parameters are not changed.

\n

To modify the user authentication methods that the workspace uses, such as SAML or Amazon Web Services SSO, \n use UpdateWorkspaceAuthentication.

\n

To modify which users in the workspace have the Admin and Editor Grafana roles, \n use UpdatePermissions.

", "smithy.api#http": { + "code": 202, "method": "PUT", - "uri": "/workspaces/{workspaceId}", - "code": 202 + "uri": "/workspaces/{workspaceId}" } } }, @@ -1965,9 +2177,9 @@ "traits": { "smithy.api#documentation": "

Use this operation to define the identity provider (IdP) that this workspace\n authenticates users from, using SAML. You can also map SAML assertion attributes to\n workspace user information and define which groups in the assertion attribute are to have\n the Admin and Editor roles in the workspace.

", "smithy.api#http": { + "code": 200, "method": "POST", - "uri": "/workspaces/{workspaceId}/authentication", - "code": 200 + "uri": "/workspaces/{workspaceId}/authentication" } } }, @@ -2127,13 +2339,13 @@ "traits": { "smithy.api#enum": [ { - "value": "SSO_USER", "name": "SSO_USER", + "value": "SSO_USER", "documentation": "SSO user." }, { - "value": "SSO_GROUP", "name": "SSO_GROUP", + "value": "SSO_GROUP", "documentation": "SSO group." } ] @@ -2202,20 +2414,20 @@ "traits": { "smithy.api#enum": [ { - "value": "UNKNOWN_OPERATION", - "name": "UNKNOWN_OPERATION" + "name": "UNKNOWN_OPERATION", + "value": "UNKNOWN_OPERATION" }, { - "value": "CANNOT_PARSE", - "name": "CANNOT_PARSE" + "name": "CANNOT_PARSE", + "value": "CANNOT_PARSE" }, { - "value": "FIELD_VALIDATION_FAILED", - "name": "FIELD_VALIDATION_FAILED" + "name": "FIELD_VALIDATION_FAILED", + "value": "FIELD_VALIDATION_FAILED" }, { - "value": "OTHER", - "name": "OTHER" + "name": "OTHER", + "value": "OTHER" } ] } @@ -2244,10 +2456,7 @@ }, "traits": { "aws.api#arn": { - "template": "workspaces/{workspaceId}", - "absolute": false, - "noAccount": false, - "noRegion": false + "template": "workspaces/{workspaceId}" } } }, @@ -2423,58 +2632,58 @@ "traits": { "smithy.api#enum": [ { - "value": "ACTIVE", "name": "ACTIVE", + "value": "ACTIVE", "documentation": "Workspace is active." }, { - "value": "CREATING", "name": "CREATING", + "value": "CREATING", "documentation": "Workspace is being created." }, { - "value": "DELETING", "name": "DELETING", + "value": "DELETING", "documentation": "Workspace is being deleted." }, { - "value": "FAILED", "name": "FAILED", + "value": "FAILED", "documentation": "Workspace is in an invalid state, it can only and should be deleted." }, { - "value": "UPDATING", "name": "UPDATING", + "value": "UPDATING", "documentation": "Workspace is being updated." }, { - "value": "UPGRADING", "name": "UPGRADING", + "value": "UPGRADING", "documentation": "Workspace is being upgraded to enterprise." }, { - "value": "DELETION_FAILED", "name": "DELETION_FAILED", + "value": "DELETION_FAILED", "documentation": "Workspace deletion failed." }, { - "value": "CREATION_FAILED", "name": "CREATION_FAILED", + "value": "CREATION_FAILED", "documentation": "Workspace creation failed." }, { - "value": "UPDATE_FAILED", "name": "UPDATE_FAILED", + "value": "UPDATE_FAILED", "documentation": "Workspace update failed." }, { - "value": "UPGRADE_FAILED", "name": "UPGRADE_FAILED", + "value": "UPGRADE_FAILED", "documentation": "Workspace upgrade failed." }, { - "value": "LICENSE_REMOVAL_FAILED", "name": "LICENSE_REMOVAL_FAILED", + "value": "LICENSE_REMOVAL_FAILED", "documentation": "Failed to remove enterprise license from workspace." } ] diff --git a/aws/sdk/aws-models/greengrassv2.json b/aws/sdk/aws-models/greengrassv2.json index be660326920..1913fa941ab 100644 --- a/aws/sdk/aws-models/greengrassv2.json +++ b/aws/sdk/aws-models/greengrassv2.json @@ -105,7 +105,7 @@ }, "traits": { "smithy.api#length": { - "min": 1, + "min": 0, "max": 100 } } @@ -432,24 +432,36 @@ "componentState": { "target": "com.amazonaws.greengrassv2#CloudComponentState", "traits": { - "smithy.api#documentation": "

The state of the component.

" + "smithy.api#documentation": "

The state of the component version.

" } }, "message": { "target": "com.amazonaws.greengrassv2#NonEmptyString", "traits": { - "smithy.api#documentation": "

A message that communicates details, such as errors, about the status of the component.

" + "smithy.api#documentation": "

A message that communicates details, such as errors, about the status of the component\n version.

" } }, "errors": { "target": "com.amazonaws.greengrassv2#StringMap", "traits": { - "smithy.api#documentation": "

A dictionary of errors that communicate why the component is in an error state. For\n example, if IoT Greengrass can't access an artifact for the component, then errors contains\n the artifact's URI as a key, and the error message as the value for that key.

" + "smithy.api#documentation": "

A dictionary of errors that communicate why the component version is in an error state.\n For example, if IoT Greengrass can't access an artifact for the component version, then\n errors contains the artifact's URI as a key, and the error message as the value\n for that key.

" + } + }, + "vendorGuidance": { + "target": "com.amazonaws.greengrassv2#VendorGuidance", + "traits": { + "smithy.api#documentation": "

The vendor guidance state for the component version. This state indicates whether\n the component version has any issues that you should consider before you deploy it. The vendor guidance state can be:

\n
    \n
  • \n

    \n ACTIVE – This component version is available and recommended for use.

    \n
  • \n
  • \n

    \n DISCONTINUED – This component version has been discontinued by its publisher.\n You can deploy this component version, but we recommend that you use a different version of this component.

    \n
  • \n
  • \n

    \n DELETED – This component version has been deleted by its publisher, so you can't\n deploy it. If you have any existing deployments that specify this component version, those deployments will fail.

    \n
  • \n
" + } + }, + "vendorGuidanceMessage": { + "target": "com.amazonaws.greengrassv2#NonEmptyString", + "traits": { + "smithy.api#documentation": "

A message that communicates details about the vendor guidance state\n of the component version. This message communicates why a component version is discontinued or deleted.

" } } }, "traits": { - "smithy.api#documentation": "

Contains the status of a component in the IoT Greengrass service.

" + "smithy.api#documentation": "

Contains the status of a component version in the IoT Greengrass service.

" } }, "com.amazonaws.greengrassv2#Component": { @@ -481,7 +493,7 @@ "com.amazonaws.greengrassv2#ComponentARN": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):components:[^:]+$" + "smithy.api#pattern": "^arn:[^:]*:greengrass:[^:]*:(aws|[0-9]+):components:[^:]+$" } }, "com.amazonaws.greengrassv2#ComponentCandidate": { @@ -536,7 +548,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 65536 + "max": 10485760 } } }, @@ -695,8 +707,7 @@ "smithy.api#length": { "min": 1, "max": 128 - }, - "smithy.api#pattern": "^[a-zA-Z0-9-_.]+$" + } } }, "com.amazonaws.greengrassv2#ComponentPlatform": { @@ -754,7 +765,7 @@ "com.amazonaws.greengrassv2#ComponentVersionARN": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):components:[^:]+:versions:[^:]+$" + "smithy.api#pattern": "^arn:[^:]*:greengrass:[^:]*:(aws|[0-9]+):components:[^:]+:versions:[^:]+$" } }, "com.amazonaws.greengrassv2#ComponentVersionList": { @@ -804,8 +815,7 @@ "smithy.api#length": { "min": 1, "max": 64 - }, - "smithy.api#pattern": "^[0-9a-zA-Z-.+]+$" + } } }, "com.amazonaws.greengrassv2#ComponentVisibilityScope": { @@ -995,7 +1005,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a component. Components are software that run on Greengrass core devices. After you\n develop and test a component on your core device, you can use this operation to upload your\n component to IoT Greengrass. Then, you can deploy the component to other core devices.

\n

You can use this operation to do the following:

\n
    \n
  • \n

    \n Create components from recipes\n

    \n

    Create a component from a recipe, which is a file that defines the component's\n metadata, parameters, dependencies, lifecycle, artifacts, and platform capability. For\n more information, see IoT Greengrass component recipe\n reference in the IoT Greengrass V2 Developer Guide.

    \n

    To create a component from a recipe, specify inlineRecipe when you call\n this operation.

    \n
  • \n
  • \n

    \n Create components from Lambda functions\n

    \n

    Create a component from an Lambda function that runs on IoT Greengrass. This creates a recipe\n and artifacts from the Lambda function's deployment package. You can use this operation to\n migrate Lambda functions from IoT Greengrass V1 to IoT Greengrass V2.

    \n

    This function only accepts Lambda functions that use the following runtimes:

    \n
      \n
    • \n

      Python 2.7 – python2.7\n

      \n
    • \n
    • \n

      Python 3.7 – python3.7\n

      \n
    • \n
    • \n

      Python 3.8 – python3.8\n

      \n
    • \n
    • \n

      Java 8 – java8\n

      \n
    • \n
    • \n

      Node.js 10 – nodejs10.x\n

      \n
    • \n
    • \n

      Node.js 12 – nodejs12.x\n

      \n
    • \n
    \n

    To create a component from a Lambda function, specify lambdaFunction\n when you call this operation.

    \n \n

    IoT Greengrass currently supports Lambda functions on only Linux core devices.

    \n
    \n
  • \n
", + "smithy.api#documentation": "

Creates a component. Components are software that run on Greengrass core devices. After you\n develop and test a component on your core device, you can use this operation to upload your\n component to IoT Greengrass. Then, you can deploy the component to other core devices.

\n

You can use this operation to do the following:

\n
    \n
  • \n

    \n Create components from recipes\n

    \n

    Create a component from a recipe, which is a file that defines the component's\n metadata, parameters, dependencies, lifecycle, artifacts, and platform capability. For\n more information, see IoT Greengrass component recipe\n reference in the IoT Greengrass V2 Developer Guide.

    \n

    To create a component from a recipe, specify inlineRecipe when you call\n this operation.

    \n
  • \n
  • \n

    \n Create components from Lambda functions\n

    \n

    Create a component from an Lambda function that runs on IoT Greengrass. This creates a recipe\n and artifacts from the Lambda function's deployment package. You can use this operation to\n migrate Lambda functions from IoT Greengrass V1 to IoT Greengrass V2.

    \n

    This function only accepts Lambda functions that use the following runtimes:

    \n
      \n
    • \n

      Python 2.7 – python2.7\n

      \n
    • \n
    • \n

      Python 3.7 – python3.7\n

      \n
    • \n
    • \n

      Python 3.8 – python3.8\n

      \n
    • \n
    • \n

      Python 3.9 – python3.9\n

      \n
    • \n
    • \n

      Java 8 – java8\n

      \n
    • \n
    • \n

      Java 11 – java11\n

      \n
    • \n
    • \n

      Node.js 10 – nodejs10.x\n

      \n
    • \n
    • \n

      Node.js 12 – nodejs12.x\n

      \n
    • \n
    • \n

      Node.js 14 – nodejs14.x\n

      \n
    • \n
    \n

    To create a component from a Lambda function, specify lambdaFunction\n when you call this operation.

    \n \n

    IoT Greengrass currently supports Lambda functions on only Linux core devices.

    \n
    \n
  • \n
", "smithy.api#http": { "method": "POST", "uri": "/greengrass/v2/createComponentVersion", @@ -1084,6 +1094,9 @@ { "target": "com.amazonaws.greengrassv2#AccessDeniedException" }, + { + "target": "com.amazonaws.greengrassv2#ConflictException" + }, { "target": "com.amazonaws.greengrassv2#InternalServerException" }, @@ -1195,6 +1208,9 @@ "input": { "target": "com.amazonaws.greengrassv2#DeleteComponentRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.greengrassv2#AccessDeniedException" @@ -1242,6 +1258,9 @@ "input": { "target": "com.amazonaws.greengrassv2#DeleteCoreDeviceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.greengrassv2#AccessDeniedException" @@ -1284,6 +1303,56 @@ } } }, + "com.amazonaws.greengrassv2#DeleteDeployment": { + "type": "operation", + "input": { + "target": "com.amazonaws.greengrassv2#DeleteDeploymentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.greengrassv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.greengrassv2#ConflictException" + }, + { + "target": "com.amazonaws.greengrassv2#InternalServerException" + }, + { + "target": "com.amazonaws.greengrassv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.greengrassv2#ThrottlingException" + }, + { + "target": "com.amazonaws.greengrassv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a deployment. To delete an active deployment, you must first cancel it. For more\n information, see CancelDeployment.

\n

Deleting a deployment doesn't affect core devices that run that deployment, because core\n devices store the deployment's configuration on the device. Additionally, core devices can\n roll back to a previous deployment that has been deleted.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/greengrass/v2/deployments/{deploymentId}", + "code": 204 + } + } + }, + "com.amazonaws.greengrassv2#DeleteDeploymentRequest": { + "type": "structure", + "members": { + "deploymentId": { + "target": "com.amazonaws.greengrassv2#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The ID of the deployment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.greengrassv2#Deployment": { "type": "structure", "members": { @@ -1684,7 +1753,7 @@ }, "traits": { "smithy.api#length": { - "min": 1, + "min": 0, "max": 100 } } @@ -1857,7 +1926,7 @@ "com.amazonaws.greengrassv2#GenericV2ARN": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):(components|deployments|coreDevices):.+$" + "smithy.api#pattern": "^arn:[^:]*:greengrass:[^:]*:(aws|[0-9]+):(components|deployments|coreDevices):" } }, "com.amazonaws.greengrassv2#GetComponent": { @@ -1965,7 +2034,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the pre-signed URL to download a public component artifact. Core devices call this\n operation to identify the URL that they can use to download an artifact to install.

", + "smithy.api#documentation": "

Gets the pre-signed URL to download a public or a Lambda component artifact. Core devices call this\n operation to identify the URL that they can use to download an artifact to install.

", "smithy.api#http": { "method": "GET", "uri": "/greengrass/v2/components/{arn}/artifacts/{artifactName+}", @@ -1979,7 +2048,7 @@ "arn": { "target": "com.amazonaws.greengrassv2#ComponentVersionARN", "traits": { - "smithy.api#documentation": "

The ARN of the component version. Specify the ARN of a public component version.

", + "smithy.api#documentation": "

The ARN of the component version. Specify the ARN of a public or a Lambda component version.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2089,7 +2158,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves metadata for a Greengrass core device.

", + "smithy.api#documentation": "

Retrieves metadata for a Greengrass core device.

\n \n

IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core\n software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then\n the reported status of that device might not reflect its current status. The status timestamp\n indicates when the device status was last updated.

\n

Core devices send status updates at the following times:

\n
    \n
  • \n

    When the IoT Greengrass Core software starts

    \n
  • \n
  • \n

    When the core device receives a deployment from the Amazon Web Services Cloud

    \n
  • \n
  • \n

    When the status of any component on the core device becomes BROKEN\n

    \n
  • \n
  • \n

    At a regular interval\n that you can configure, which defaults to 24 hours

    \n
  • \n
\n
", "smithy.api#http": { "method": "GET", "uri": "/greengrass/v2/coreDevices/{coreDeviceThingName}", @@ -2375,6 +2444,9 @@ { "target": "com.amazonaws.greengrassv2#DeleteCoreDevice" }, + { + "target": "com.amazonaws.greengrassv2#DeleteDeployment" + }, { "target": "com.amazonaws.greengrassv2#DescribeComponent" }, @@ -2546,7 +2618,7 @@ "com.amazonaws.greengrassv2#IoTJobARN": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:iot:[^:]+:[0-9]+:job/.+$" + "smithy.api#pattern": "^arn:[^:]*:iot:[^:]+:[0-9]+:job/.+$" } }, "com.amazonaws.greengrassv2#IoTJobAbortAction": { @@ -3037,7 +3109,7 @@ "com.amazonaws.greengrassv2#LambdaFunctionARNWithVersionNumber": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:lambda:[^:]+:[0-9]+:function:[a-zA-Z0-9-_]+:[0-9]+$" + "smithy.api#pattern": "^arn:[^:]*:lambda:[^:]+:[0-9]+:function:[a-zA-Z0-9-_]+:[0-9]+$" } }, "com.amazonaws.greengrassv2#LambdaFunctionRecipeSource": { @@ -3220,6 +3292,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "associatedClientDevices", "pageSize": "maxResults" } } @@ -3304,6 +3377,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "componentVersions", "pageSize": "maxResults" } } @@ -3314,7 +3388,7 @@ "arn": { "target": "com.amazonaws.greengrassv2#ComponentARN", "traits": { - "smithy.api#documentation": "

The ARN of the component version.

", + "smithy.api#documentation": "

The ARN of the component.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3368,6 +3442,9 @@ { "target": "com.amazonaws.greengrassv2#InternalServerException" }, + { + "target": "com.amazonaws.greengrassv2#ResourceNotFoundException" + }, { "target": "com.amazonaws.greengrassv2#ThrottlingException" }, @@ -3385,6 +3462,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "components", "pageSize": "maxResults" } } @@ -3456,7 +3534,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a paginated list of Greengrass core devices.

", + "smithy.api#documentation": "

Retrieves a paginated list of Greengrass core devices.

\n \n

IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core\n software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then\n the reported status of that device might not reflect its current status. The status timestamp\n indicates when the device status was last updated.

\n

Core devices send status updates at the following times:

\n
    \n
  • \n

    When the IoT Greengrass Core software starts

    \n
  • \n
  • \n

    When the core device receives a deployment from the Amazon Web Services Cloud

    \n
  • \n
  • \n

    When the status of any component on the core device becomes BROKEN\n

    \n
  • \n
  • \n

    At a regular interval\n that you can configure, which defaults to 24 hours

    \n
  • \n
\n
", "smithy.api#http": { "method": "GET", "uri": "/greengrass/v2/coreDevices", @@ -3465,6 +3543,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "coreDevices", "pageSize": "maxResults" } } @@ -3475,7 +3554,7 @@ "thingGroupArn": { "target": "com.amazonaws.greengrassv2#ThingGroupARN", "traits": { - "smithy.api#documentation": "

The ARN of the IoT thing group by which to filter. If you specify this parameter, the\n list includes only core devices that are members of this thing group.

", + "smithy.api#documentation": "

The ARN of the IoT thing group by which to filter. If you specify this parameter,\n the list includes only core devices that have successfully deployed a deployment that targets\n the thing group. When you remove a core device from a thing group, the list continues to\n include that core device.

", "smithy.api#httpQuery": "thingGroupArn" } }, @@ -3552,6 +3631,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "deployments", "pageSize": "maxResults" } } @@ -3642,6 +3722,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "effectiveDeployments", "pageSize": "maxResults" } } @@ -3717,7 +3798,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a paginated list of the components that a Greengrass core device runs.

", + "smithy.api#documentation": "

Retrieves a paginated list of the components that a Greengrass core device runs.\n This list doesn't include components that are deployed from local deployments or\n components that are deployed as dependencies of other components.

\n \n

IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core\n software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then\n the reported status of that device might not reflect its current status. The status timestamp\n indicates when the device status was last updated.

\n

Core devices send status updates at the following times:

\n
    \n
  • \n

    When the IoT Greengrass Core software starts

    \n
  • \n
  • \n

    When the core device receives a deployment from the Amazon Web Services Cloud

    \n
  • \n
  • \n

    When the status of any component on the core device becomes BROKEN\n

    \n
  • \n
  • \n

    At a regular interval\n that you can configure, which defaults to 24 hours

    \n
  • \n
\n
", "smithy.api#http": { "method": "GET", "uri": "/greengrass/v2/coreDevices/{coreDeviceThingName}/installedComponents", @@ -3726,6 +3807,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "installedComponents", "pageSize": "maxResults" } } @@ -3957,15 +4039,13 @@ "platform": { "target": "com.amazonaws.greengrassv2#ComponentPlatform", "traits": { - "smithy.api#documentation": "

The platform to use to resolve compatible components.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The platform to use to resolve compatible components.

" } }, "componentCandidates": { "target": "com.amazonaws.greengrassv2#ComponentCandidateList", "traits": { - "smithy.api#documentation": "

The list of components to resolve.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The list of components to resolve.

" } } } @@ -4007,6 +4087,18 @@ "traits": { "smithy.api#documentation": "

The recipe of the component version.

" } + }, + "vendorGuidance": { + "target": "com.amazonaws.greengrassv2#VendorGuidance", + "traits": { + "smithy.api#documentation": "

The vendor guidance state for the component version. This state indicates whether\n the component version has any issues that you should consider before you deploy it. The vendor guidance state can be:

\n
    \n
  • \n

    \n ACTIVE – This component version is available and recommended for use.

    \n
  • \n
  • \n

    \n DISCONTINUED – This component version has been discontinued by its publisher.\n You can deploy this component version, but we recommend that you use a different version of this component.

    \n
  • \n
  • \n

    \n DELETED – This component version has been deleted by its publisher, so you can't\n deploy it. If you have any existing deployments that specify this component version, those deployments will fail.

    \n
  • \n
" + } + }, + "message": { + "target": "com.amazonaws.greengrassv2#NonEmptyString", + "traits": { + "smithy.api#documentation": "

A message that communicates details about the vendor guidance state\n of the component version. This message communicates why a component version is discontinued or deleted.

" + } } }, "traits": { @@ -4132,8 +4224,7 @@ "smithy.api#length": { "min": 1, "max": 128 - }, - "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } } }, "com.amazonaws.greengrassv2#TagKeyList": { @@ -4144,7 +4235,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 50 + "max": 200 } } }, @@ -4159,7 +4250,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 50 + "max": 200 } } }, @@ -4227,13 +4318,13 @@ "com.amazonaws.greengrassv2#TargetARN": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:iot:[^:]+:[0-9]+:(thing|thinggroup)/.+$" + "smithy.api#pattern": "^arn:[^:]*:iot:[^:]*:[0-9]+:(thing|thinggroup)/.+$" } }, "com.amazonaws.greengrassv2#ThingGroupARN": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:iot:[^:]+:[0-9]+:thinggroup/.+$" + "smithy.api#pattern": "^arn:[^:]*:iot:[^:]*:[0-9]+:thinggroup/.+$" } }, "com.amazonaws.greengrassv2#ThrottlingException": { @@ -4475,6 +4566,25 @@ ] } }, + "com.amazonaws.greengrassv2#VendorGuidance": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DISCONTINUED", + "name": "DISCONTINUED" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, "com.amazonaws.greengrassv2#connectivityInfoList": { "type": "list", "member": { diff --git a/aws/sdk/aws-models/iot.json b/aws/sdk/aws-models/iot.json index c81d9142977..68e0a0cfff2 100644 --- a/aws/sdk/aws-models/iot.json +++ b/aws/sdk/aws-models/iot.json @@ -848,6 +848,9 @@ "input": { "target": "com.amazonaws.iot#AcceptCertificateTransferRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -1711,6 +1714,9 @@ "input": { "target": "com.amazonaws.iot#AttachPolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -1768,6 +1774,9 @@ "input": { "target": "com.amazonaws.iot#AttachPrincipalPolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -3738,6 +3747,9 @@ "input": { "target": "com.amazonaws.iot#CancelCertificateTransferRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -3873,6 +3885,9 @@ "input": { "target": "com.amazonaws.iot#CancelJobExecutionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InvalidRequestException" @@ -5817,7 +5832,7 @@ "targetSelection": { "target": "com.amazonaws.iot#TargetSelection", "traits": { - "smithy.api#documentation": "

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things\n specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing\n when a change is detected in a target. For example, a job will run on a thing when the thing is added to a\n target group, even after the job was completed by all things originally in the group.

" + "smithy.api#documentation": "

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things\n specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing\n when a change is detected in a target. For example, a job will run on a thing when the thing is added to a\n target group, even after the job was completed by all things originally in the group.

\n \n

We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. \n By using continuous jobs, devices that join the group receive the job execution even after the job has\n been created.

\n
" } }, "jobExecutionsRolloutConfig": { @@ -5865,7 +5880,7 @@ "documentParameters": { "target": "com.amazonaws.iot#ParameterMap", "traits": { - "smithy.api#documentation": "

Parameters of a managed template that you can specify to create the job document.

" + "smithy.api#documentation": "

Parameters of an Amazon Web Services managed template that you can specify to create the job document.

\n \n

\n documentParameters can only be used when creating jobs from Amazon Web Services \n managed templates. This parameter can't be used with custom job templates or to \n create jobs from them.

\n
" } } } @@ -7502,6 +7517,9 @@ "input": { "target": "com.amazonaws.iot#CreateTopicRuleRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#ConflictingResourceUpdateException" @@ -7653,13 +7671,13 @@ "hashAlgorithm": { "target": "com.amazonaws.iot#HashAlgorithm", "traits": { - "smithy.api#documentation": "

The hash algorithm used to code sign the file.

" + "smithy.api#documentation": "

The hash algorithm used to code sign the file. You can use a string as the algorithm name if the target over-the-air (OTA) update devices are able to verify the signature that was generated using the same signature algorithm. For example, FreeRTOS uses SHA256 or SHA1, so you can pass either of them based on which was used for generating the signature.

" } }, "signatureAlgorithm": { "target": "com.amazonaws.iot#SignatureAlgorithm", "traits": { - "smithy.api#documentation": "

The signature algorithm used to code sign the file.

" + "smithy.api#documentation": "

The signature algorithm used to code sign the file. You can use a string as the algorithm name if the target over-the-air (OTA) update devices are able to verify the signature that was generated using the same signature algorithm. For example, FreeRTOS uses ECDSA or RSA, so you can pass either of them based on which was used for generating the signature.

" } } }, @@ -8051,6 +8069,9 @@ "input": { "target": "com.amazonaws.iot#DeleteCertificateRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#CertificateStateException" @@ -8329,6 +8350,9 @@ "input": { "target": "com.amazonaws.iot#DeleteFleetMetricRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -8383,6 +8407,9 @@ "input": { "target": "com.amazonaws.iot#DeleteJobRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InvalidRequestException" @@ -8417,6 +8444,9 @@ "input": { "target": "com.amazonaws.iot#DeleteJobExecutionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InvalidRequestException" @@ -8518,6 +8548,9 @@ "input": { "target": "com.amazonaws.iot#DeleteJobTemplateRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -8675,6 +8708,9 @@ "input": { "target": "com.amazonaws.iot#DeletePolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#DeleteConflictException" @@ -8728,6 +8764,9 @@ "input": { "target": "com.amazonaws.iot#DeletePolicyVersionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#DeleteConflictException" @@ -9367,6 +9406,9 @@ "input": { "target": "com.amazonaws.iot#DeleteTopicRuleRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#ConflictingResourceUpdateException" @@ -9465,6 +9507,9 @@ "input": { "target": "com.amazonaws.iot#DeleteV2LoggingLevelRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalException" @@ -11266,7 +11311,7 @@ "documentParameters": { "target": "com.amazonaws.iot#DocumentParameters", "traits": { - "smithy.api#documentation": "

A map of key-value pairs that you can use as guidance to specify the inputs for creating \n a job from a managed template.

" + "smithy.api#documentation": "

A map of key-value pairs that you can use as guidance to specify the inputs for creating \n a job from a managed template.

\n \n

\n documentParameters can only be used when creating jobs from Amazon Web Services \n managed templates. This parameter can't be used with custom job templates or to \n create jobs from them.

\n
" } }, "document": { @@ -12344,6 +12389,9 @@ "input": { "target": "com.amazonaws.iot#DetachPolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -12398,6 +12446,9 @@ "input": { "target": "com.amazonaws.iot#DetachPrincipalPolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -12968,6 +13019,9 @@ "input": { "target": "com.amazonaws.iot#DisableTopicRuleRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#ConflictingResourceUpdateException" @@ -13048,7 +13102,7 @@ } }, "traits": { - "smithy.api#documentation": "

A map of key-value pairs containing the patterns that need to be replaced in a managed\n template job document schema. You can use the description of each key as a guidance to specify \n the inputs during runtime when creating a job.

" + "smithy.api#documentation": "

A map of key-value pairs containing the patterns that need to be replaced in a managed\n template job document schema. You can use the description of each key as a guidance to specify \n the inputs during runtime when creating a job.

\n \n

\n documentParameters can only be used when creating jobs from Amazon Web Services \n managed templates. This parameter can't be used with custom job templates or to \n create jobs from them.

\n
" } }, "com.amazonaws.iot#DocumentParameters": { @@ -13406,6 +13460,9 @@ "input": { "target": "com.amazonaws.iot#EnableTopicRuleRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#ConflictingResourceUpdateException" @@ -15813,7 +15870,7 @@ "targetSelection": { "target": "com.amazonaws.iot#TargetSelection", "traits": { - "smithy.api#documentation": "

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things\n specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing\n when a change is detected in a target. For example, a job will run on a device when the thing representing\n the device is added to a target group, even after the job was completed by all things originally in the \n group.

" + "smithy.api#documentation": "

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things\n specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing\n when a change is detected in a target. For example, a job will run on a device when the thing representing\n the device is added to a target group, even after the job was completed by all things originally in the \n group.

\n \n

We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. \n By using continuous jobs, devices that join the group receive the job execution even after the job has\n been created.

\n
" } }, "status": { @@ -15921,7 +15978,7 @@ "documentParameters": { "target": "com.amazonaws.iot#ParameterMap", "traits": { - "smithy.api#documentation": "

A key-value map that pairs the patterns that need to be replaced in a managed \n template job document schema. You can use the description of each key as a guidance \n to specify the inputs during runtime when creating a job.

" + "smithy.api#documentation": "

A key-value map that pairs the patterns that need to be replaced in a managed \n template job document schema. You can use the description of each key as a guidance \n to specify the inputs during runtime when creating a job.

\n \n

\n documentParameters can only be used when creating jobs from Amazon Web Services \n managed templates. This parameter can't be used with custom job templates or to \n create jobs from them.

\n
" } }, "isConcurrent": { @@ -16363,7 +16420,7 @@ "targetSelection": { "target": "com.amazonaws.iot#TargetSelection", "traits": { - "smithy.api#documentation": "

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things\n specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing\n when a change is detected in a target. For example, a job will run on a thing when the thing is added to a\n target group, even after the job was completed by all things originally in the group.

" + "smithy.api#documentation": "

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things\n specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing\n when a change is detected in a target. For example, a job will run on a thing when the thing is added to a\n target group, even after the job was completed by all things originally in the group.

\n \n

We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. \n By using continuous jobs, devices that join the group receive the job execution even after the job has\n been created.

\n
" } }, "status": { @@ -18645,7 +18702,7 @@ "targetSelection": { "target": "com.amazonaws.iot#TargetSelection", "traits": { - "smithy.api#documentation": "

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things\n specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing\n when a change is detected in a target. For example, a job will run on a thing when the thing is added to a\n target group, even after the job was completed by all things originally in the group.

", + "smithy.api#documentation": "

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things\n specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing\n when a change is detected in a target. For example, a job will run on a thing when the thing is added to a\n target group, even after the job was completed by all things originally in the group.

\n \n

We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. \n By using continuous jobs, devices that join the group receive the job execution even after the job has\n been created.

\n
", "smithy.api#httpQuery": "targetSelection" } }, @@ -23960,6 +24017,9 @@ "input": { "target": "com.amazonaws.iot#RejectCertificateTransferRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -24221,6 +24281,9 @@ "input": { "target": "com.amazonaws.iot#ReplaceTopicRuleRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#ConflictingResourceUpdateException" @@ -25314,6 +25377,9 @@ "input": { "target": "com.amazonaws.iot#SetDefaultPolicyVersionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -25372,6 +25438,9 @@ "input": { "target": "com.amazonaws.iot#SetLoggingOptionsRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalException" @@ -25413,6 +25482,9 @@ "input": { "target": "com.amazonaws.iot#SetV2LoggingLevelRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalException" @@ -25463,6 +25535,9 @@ "input": { "target": "com.amazonaws.iot#SetV2LoggingOptionsRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalException" @@ -28625,6 +28700,9 @@ "input": { "target": "com.amazonaws.iot#UpdateCACertificateRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InternalFailureException" @@ -28716,6 +28794,9 @@ "input": { "target": "com.amazonaws.iot#UpdateCertificateRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#CertificateStateException" @@ -29199,6 +29280,9 @@ "input": { "target": "com.amazonaws.iot#UpdateFleetMetricRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#IndexNotReadyException" @@ -29368,6 +29452,9 @@ "input": { "target": "com.amazonaws.iot#UpdateJobRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.iot#InvalidRequestException" diff --git a/aws/sdk/aws-models/iotevents-data.json b/aws/sdk/aws-models/iotevents-data.json index c92b999a362..d85a489a769 100644 --- a/aws/sdk/aws-models/iotevents-data.json +++ b/aws/sdk/aws-models/iotevents-data.json @@ -356,6 +356,92 @@ "smithy.api#documentation": "

Contains error messages associated with one of the following requests:

\n " } }, + "com.amazonaws.ioteventsdata#BatchDeleteDetector": { + "type": "operation", + "input": { + "target": "com.amazonaws.ioteventsdata#BatchDeleteDetectorRequest" + }, + "output": { + "target": "com.amazonaws.ioteventsdata#BatchDeleteDetectorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ioteventsdata#InternalFailureException" + }, + { + "target": "com.amazonaws.ioteventsdata#InvalidRequestException" + }, + { + "target": "com.amazonaws.ioteventsdata#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.ioteventsdata#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes one or more detectors that were created. When a detector is deleted, its state will be cleared and the detector will be removed from the list of detectors. The deleted detector will no longer appear if referenced in the ListDetectors API call.

", + "smithy.api#http": { + "method": "POST", + "uri": "/detectors/delete", + "code": 200 + } + } + }, + "com.amazonaws.ioteventsdata#BatchDeleteDetectorErrorEntries": { + "type": "list", + "member": { + "target": "com.amazonaws.ioteventsdata#BatchDeleteDetectorErrorEntry" + } + }, + "com.amazonaws.ioteventsdata#BatchDeleteDetectorErrorEntry": { + "type": "structure", + "members": { + "messageId": { + "target": "com.amazonaws.ioteventsdata#MessageId", + "traits": { + "smithy.api#documentation": "

The ID of the message that caused the error. (See the value of the \"messageId\" in the detectors object of the DeleteDetectorRequest.)

" + } + }, + "errorCode": { + "target": "com.amazonaws.ioteventsdata#ErrorCode", + "traits": { + "smithy.api#documentation": "

The error code.

" + } + }, + "errorMessage": { + "target": "com.amazonaws.ioteventsdata#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A message that describes the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains error messages associated with the deletion request.

" + } + }, + "com.amazonaws.ioteventsdata#BatchDeleteDetectorRequest": { + "type": "structure", + "members": { + "detectors": { + "target": "com.amazonaws.ioteventsdata#DeleteDetectorRequests", + "traits": { + "smithy.api#documentation": "

The list of one or more detectors to be deleted.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ioteventsdata#BatchDeleteDetectorResponse": { + "type": "structure", + "members": { + "batchDeleteDetectorErrorEntries": { + "target": "com.amazonaws.ioteventsdata#BatchDeleteDetectorErrorEntries", + "traits": { + "smithy.api#documentation": "

A list of errors associated with the request, or an empty array ([]) if there are no errors. Each error entry contains a messageId that helps you identify the entry that failed.

" + } + } + } + }, "com.amazonaws.ioteventsdata#BatchDisableAlarm": { "type": "operation", "input": { @@ -846,6 +932,45 @@ ] } }, + "com.amazonaws.ioteventsdata#DeleteDetectorRequest": { + "type": "structure", + "members": { + "messageId": { + "target": "com.amazonaws.ioteventsdata#MessageId", + "traits": { + "smithy.api#documentation": "

The ID to assign to the DeleteDetectorRequest. Each \"messageId\" must be unique within each batch sent.

", + "smithy.api#required": {} + } + }, + "detectorModelName": { + "target": "com.amazonaws.ioteventsdata#DetectorModelName", + "traits": { + "smithy.api#documentation": "

The name of the detector model that was used to create the detector instance.

", + "smithy.api#required": {} + } + }, + "keyValue": { + "target": "com.amazonaws.ioteventsdata#KeyValue", + "traits": { + "smithy.api#documentation": "

The value of the key used to identify the detector.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information used to delete the detector model.

" + } + }, + "com.amazonaws.ioteventsdata#DeleteDetectorRequests": { + "type": "list", + "member": { + "target": "com.amazonaws.ioteventsdata#DeleteDetectorRequest" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, "com.amazonaws.ioteventsdata#DescribeAlarm": { "type": "operation", "input": { @@ -1397,6 +1522,9 @@ { "target": "com.amazonaws.ioteventsdata#BatchAcknowledgeAlarm" }, + { + "target": "com.amazonaws.ioteventsdata#BatchDeleteDetector" + }, { "target": "com.amazonaws.ioteventsdata#BatchDisableAlarm" }, diff --git a/aws/sdk/aws-models/ivschat.json b/aws/sdk/aws-models/ivschat.json index c8938e1a7ab..e8edc22818e 100644 --- a/aws/sdk/aws-models/ivschat.json +++ b/aws/sdk/aws-models/ivschat.json @@ -24,8 +24,7 @@ "sdkId": "ivschat", "arnNamespace": "ivschat", "cloudFormationName": "IVSChat", - "cloudTrailEventSource": "REPLACE_WITH_EVENT_SOURCE", - "endpointPrefix": "ivschat" + "cloudTrailEventSource": "REPLACE_WITH_EVENT_SOURCE" }, "aws.auth#sigv4": { "name": "ivschat" @@ -33,23 +32,24 @@ "aws.protocols#restJson1": {}, "smithy.api#cors": { "additionalAllowedHeaders": [ - "amz-sdk-invocation-id", - "amz-sdk-request", + "Content-Type", "X-Api-Key", "X-Amz-Content-Sha256", - "Content-Type", - "X-Amz-User-Agent" + "X-Amz-User-Agent", + "amz-sdk-invocation-id", + "amz-sdk-request" ], "additionalExposedHeaders": [ - "date", - "x-amz-apigw-id", - "x-amzn-trace-id", "x-amzn-errortype", "x-amzn-requestid", - "x-amzn-errormessage" + "x-amzn-errormessage", + "x-amzn-trace-id", + "x-amzn-requestid", + "x-amz-apigw-id", + "date" ] }, - "smithy.api#documentation": "

\n Introduction\n

\n

The Amazon IVS Chat control-plane API enables you to create and manage Amazon IVS Chat\n resources. You also need to integrate with the Amazon IVS Chat Messaging\n API, to enable users to interact with chat rooms in real time.

\n

The API is an AWS regional service. For a list of supported regions and Amazon IVS Chat\n HTTPS service endpoints, see the Amazon IVS Chat information on the Amazon IVS page in the\n AWS General Reference.

\n

\n Notes on terminology:\n

\n
    \n
  • \n

    You create service applications using the Amazon IVS Chat API. We refer to these as\n applications.

    \n
  • \n
  • \n

    You create front-end client applications (browser and Android/iOS apps) using the\n Amazon IVS Chat Messaging API. We refer to these as clients.

    \n
  • \n
\n\n

\n Resources\n

\n

The following resource is part of Amazon IVS Chat:

\n
    \n
  • \n

    \n Room — The central Amazon IVS Chat resource through\n which clients connect to and exchange chat messages. See the Room endpoints for more\n information.

    \n
  • \n
\n\n

\n API Access Security\n

\n

Your Amazon IVS Chat applications (service applications and clients) must be authenticated\n and authorized to access Amazon IVS Chat resources. Note the differences between these\n concepts:

\n
    \n
  • \n

    \n Authentication is about verifying identity. Requests to the\n Amazon IVS Chat API must be signed to verify your identity.

    \n
  • \n
  • \n

    \n Authorization is about granting permissions. Your IAM roles need\n to have permissions for Amazon IVS Chat API requests.

    \n
  • \n
\n

Users (viewers) connect to a room using secure access tokens that you create using the\n CreateChatToken endpoint through the AWS SDK. You call CreateChatToken for\n every user’s chat session, passing identity and authorization information about the\n user.

\n

\n Signing API Requests\n

\n

HTTP API requests must be signed with an AWS SigV4 signature using your AWS security\n credentials. The AWS Command Line Interface (CLI) and the AWS SDKs take care of signing the\n underlying API calls for you. However, if your application calls the Amazon IVS Chat HTTP API\n directly, it’s your responsibility to sign the requests.

\n\n\n\n\n

You generate a signature using valid AWS credentials for an IAM role that has permission\n to perform the requested action. For example, DeleteMessage requests must be made using an IAM\n role that has the ivschat:DeleteMessage permission.

\n

For more information:

\n \n\n

\n Messaging Endpoints\n

\n
    \n
  • \n

    \n DeleteMessage — Sends an event to a specific room which\n directs clients to delete a specific message; that is, unrender it from view and delete it\n from the client’s chat history. This event’s EventName is\n aws:DELETE_MESSAGE. This replicates the DeleteMessage WebSocket operation\n in the Amazon IVS Chat Messaging API.

    \n
  • \n
  • \n

    \n DisconnectUser — Disconnects all connections using a specified\n user ID from a room. This replicates the DisconnectUser WebSocket operation\n in the Amazon IVS Chat Messaging API.

    \n
  • \n
  • \n

    \n SendEvent — Sends an event to a room. Use this within your\n application’s business logic to send events to clients of a room; e.g., to notify clients\n to change the way the chat UI is rendered.

    \n
  • \n
\n

\n Chat Token Endpoint\n

\n
    \n
  • \n

    \n CreateChatToken — Creates an encrypted token that is used to\n establish an individual WebSocket connection to a room. The token is valid for one minute,\n and a connection (session) established with the token is valid for the specified\n duration.

    \n
  • \n
\n\n\n

\n Room Endpoints\n

\n
    \n
  • \n

    \n CreateRoom — Creates a room that allows clients to connect and\n pass messages.

    \n
  • \n
  • \n

    \n DeleteRoom — Deletes the specified room.

    \n
  • \n
  • \n

    \n GetRoom — Gets the specified room.

    \n
  • \n
  • \n

    \n ListRooms — Gets summary information about all your rooms in\n the AWS region where the API request is processed.

    \n
  • \n
  • \n

    \n UpdateRoom — Updates a room’s configuration.

    \n
  • \n
\n\n

\n Tags Endpoints\n

\n
    \n
  • \n

    \n ListTagsForResource — Gets information about AWS tags for the\n specified ARN.

    \n
  • \n
  • \n

    \n TagResource — Adds or updates tags for the AWS resource with\n the specified ARN.

    \n
  • \n
  • \n

    \n UntagResource — Removes tags from the resource with the\n specified ARN.

    \n
  • \n
\n\n\n

All the above are HTTP operations. There is a separate messaging API\n for managing Chat resources; see the Amazon IVS Chat Messaging API\n Reference.

", + "smithy.api#documentation": "

\n Introduction\n

\n

The Amazon IVS Chat control-plane API enables you to create and manage Amazon IVS Chat\n resources. You also need to integrate with the Amazon IVS Chat Messaging\n API, to enable users to interact with chat rooms in real time.

\n

The API is an AWS regional service. For a list of supported regions and Amazon IVS Chat\n HTTPS service endpoints, see the Amazon IVS Chat information on the Amazon IVS page in the\n AWS General Reference.

\n

\n Notes on terminology:\n

\n
    \n
  • \n

    You create service applications using the Amazon IVS Chat API. We refer to these as\n applications.

    \n
  • \n
  • \n

    You create front-end client applications (browser and Android/iOS apps) using the\n Amazon IVS Chat Messaging API. We refer to these as clients.

    \n
  • \n
\n

\n Resources\n

\n

The following resource is part of Amazon IVS Chat:

\n
    \n
  • \n

    \n Room — The central Amazon IVS Chat resource through\n which clients connect to and exchange chat messages. See the Room endpoints for more\n information.

    \n
  • \n
\n

\n API Access Security\n

\n

Your Amazon IVS Chat applications (service applications and clients) must be authenticated\n and authorized to access Amazon IVS Chat resources. Note the differences between these\n concepts:

\n
    \n
  • \n

    \n Authentication is about verifying identity. Requests to the\n Amazon IVS Chat API must be signed to verify your identity.

    \n
  • \n
  • \n

    \n Authorization is about granting permissions. Your IAM roles need\n to have permissions for Amazon IVS Chat API requests.

    \n
  • \n
\n

Users (viewers) connect to a room using secure access tokens that you create using the\n CreateChatToken endpoint through the AWS SDK. You call CreateChatToken for\n every user’s chat session, passing identity and authorization information about the\n user.

\n

\n Signing API Requests\n

\n

HTTP API requests must be signed with an AWS SigV4 signature using your AWS security\n credentials. The AWS Command Line Interface (CLI) and the AWS SDKs take care of signing the\n underlying API calls for you. However, if your application calls the Amazon IVS Chat HTTP API\n directly, it’s your responsibility to sign the requests.

\n

You generate a signature using valid AWS credentials for an IAM role that has permission\n to perform the requested action. For example, DeleteMessage requests must be made using an IAM\n role that has the ivschat:DeleteMessage permission.

\n

For more information:

\n \n

\n Messaging Endpoints\n

\n
    \n
  • \n

    \n DeleteMessage — Sends an event to a specific room which\n directs clients to delete a specific message; that is, unrender it from view and delete it\n from the client’s chat history. This event’s EventName is\n aws:DELETE_MESSAGE. This replicates the \n DeleteMessage WebSocket operation in the Amazon IVS Chat Messaging API.

    \n
  • \n
  • \n

    \n DisconnectUser — Disconnects all connections using a specified\n user ID from a room. This replicates the \n DisconnectUser WebSocket operation in the Amazon IVS Chat Messaging API.

    \n
  • \n
  • \n

    \n SendEvent — Sends an event to a room. Use this within your\n application’s business logic to send events to clients of a room; e.g., to notify clients\n to change the way the chat UI is rendered.

    \n
  • \n
\n

\n Chat Token Endpoint\n

\n
    \n
  • \n

    \n CreateChatToken — Creates an encrypted token that is used to\n establish an individual WebSocket connection to a room. The token is valid for one minute,\n and a connection (session) established with the token is valid for the specified\n duration.

    \n
  • \n
\n

\n Room Endpoints\n

\n
    \n
  • \n

    \n CreateRoom — Creates a room that allows clients to connect and\n pass messages.

    \n
  • \n
  • \n

    \n DeleteRoom — Deletes the specified room.

    \n
  • \n
  • \n

    \n GetRoom — Gets the specified room.

    \n
  • \n
  • \n

    \n ListRooms — Gets summary information about all your rooms in\n the AWS region where the API request is processed.

    \n
  • \n
  • \n

    \n UpdateRoom — Updates a room’s configuration.

    \n
  • \n
\n

\n Tags Endpoints\n

\n
    \n
  • \n

    \n ListTagsForResource — Gets information about AWS tags for the\n specified ARN.

    \n
  • \n
  • \n

    \n TagResource — Adds or updates tags for the AWS resource with\n the specified ARN.

    \n
  • \n
  • \n

    \n UntagResource — Removes tags from the resource with the\n specified ARN.

    \n
  • \n
\n

All the above are HTTP operations. There is a separate messaging API\n for managing Chat resources; see the Amazon IVS Chat Messaging API\n Reference.

", "smithy.api#title": "Amazon Interactive Video Service Chat" }, "version": "2020-07-14", @@ -185,8 +185,7 @@ "smithy.api#documentation": "

Creates an encrypted token that is used to establish an individual WebSocket connection\n to a room. The token is valid for one minute, and a connection (session) established with\n the token is valid for the specified duration.

\n

Encryption keys are owned by Amazon IVS Chat and never used directly by your\n application.

", "smithy.api#http": { "method": "POST", - "uri": "/CreateChatToken", - "code": 200 + "uri": "/CreateChatToken" } } }, @@ -282,8 +281,7 @@ "smithy.api#documentation": "

Creates a room that allows clients to connect and pass messages.

", "smithy.api#http": { "method": "POST", - "uri": "/CreateRoom", - "code": 200 + "uri": "/CreateRoom" } } }, @@ -299,7 +297,7 @@ "maximumMessageRatePerSecond": { "target": "com.amazonaws.ivschat#RoomMaxMessageRatePerSecond", "traits": { - "smithy.api#documentation": "

Maximum number of messages per second that a client can send to the room. Default:\n 10.

" + "smithy.api#documentation": "

Maximum number of messages per second that can be sent to the room (by all clients).\n Default: 10.

" } }, "maximumMessageLength": { @@ -358,7 +356,7 @@ "maximumMessageRatePerSecond": { "target": "com.amazonaws.ivschat#RoomMaxMessageRatePerSecond", "traits": { - "smithy.api#documentation": "

Maximum number of messages per second that a client can send to the room, from the\n request.

" + "smithy.api#documentation": "

Maximum number of messages per second that can be sent to the room (by all clients),\n from the request.

" } }, "maximumMessageLength": { @@ -404,11 +402,10 @@ } ], "traits": { - "smithy.api#documentation": "

Sends an event to a specific room which directs clients to delete a specific message;\n that is, unrender it from view and delete it from the client’s chat history. This event’s\n EventName is aws:DELETE_MESSAGE. This replicates the DeleteMessage WebSocket operation\n in the Amazon IVS Chat Messaging API.

", + "smithy.api#documentation": "

Sends an event to a specific room which directs clients to delete a specific message;\n that is, unrender it from view and delete it from the client’s chat history. This event’s\n EventName is aws:DELETE_MESSAGE. This replicates the \n DeleteMessage WebSocket operation in the Amazon IVS Chat Messaging API.

", "smithy.api#http": { "method": "POST", - "uri": "/DeleteMessage", - "code": 200 + "uri": "/DeleteMessage" } } }, @@ -460,6 +457,9 @@ { "target": "com.amazonaws.ivschat#AccessDeniedException" }, + { + "target": "com.amazonaws.ivschat#PendingVerification" + }, { "target": "com.amazonaws.ivschat#ResourceNotFoundException" }, @@ -511,11 +511,10 @@ } ], "traits": { - "smithy.api#documentation": "

Disconnects all connections using a specified user ID from a room. This replicates the DisconnectUser WebSocket operation\n in the Amazon IVS Chat Messaging API.

", + "smithy.api#documentation": "

Disconnects all connections using a specified user ID from a room. This replicates the\n \n DisconnectUser WebSocket operation in the Amazon IVS Chat Messaging API.

", "smithy.api#http": { "method": "POST", - "uri": "/DisconnectUser", - "code": 200 + "uri": "/DisconnectUser" } } }, @@ -610,8 +609,7 @@ "smithy.api#documentation": "

Gets the specified room.

", "smithy.api#http": { "method": "POST", - "uri": "/GetRoom", - "code": 200 + "uri": "/GetRoom" }, "smithy.api#readonly": {} } @@ -664,7 +662,7 @@ "maximumMessageRatePerSecond": { "target": "com.amazonaws.ivschat#RoomMaxMessageRatePerSecond", "traits": { - "smithy.api#documentation": "

Maximum number of messages per second that a client can send to the room. Default:\n 10.

" + "smithy.api#documentation": "

Maximum number of messages per second that can be sent to the room (by all clients). Default:\n 10.

" } }, "maximumMessageLength": { @@ -749,8 +747,7 @@ "smithy.api#documentation": "

Gets summary information about all your rooms in the AWS region where the API request is\n processed. Results are sorted in descending order of updateTime.

", "smithy.api#http": { "method": "POST", - "uri": "/ListRooms", - "code": 200 + "uri": "/ListRooms" }, "smithy.api#paginated": { "inputToken": "nextToken", @@ -830,8 +827,7 @@ "smithy.api#documentation": "

Gets information about AWS tags for the specified ARN.

", "smithy.api#http": { "method": "GET", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" }, "smithy.api#readonly": {} } @@ -892,7 +888,7 @@ "fallbackResult": { "target": "com.amazonaws.ivschat#FallbackResult", "traits": { - "smithy.api#documentation": "

Specifies the fallback behavior (whether the message is allowed or denied) if the handler\n does not return a valid response, encounters an error or times out. If allowed, the message is\n delivered with returned content to all users connected to the room. If denied, the message is\n not delivered to any user. Default: ALLOW.

" + "smithy.api#documentation": "

Specifies the fallback behavior (whether the message is allowed or denied) if the handler\n does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is\n delivered with returned content to all users connected to the room. If denied, the message is\n not delivered to any user. Default: ALLOW.

" } } }, @@ -1130,8 +1126,7 @@ "smithy.api#documentation": "

Sends an event to a room. Use this within your application’s business logic to send\n events to clients of a room; e.g., to notify clients to change the way the chat UI is\n rendered.

", "smithy.api#http": { "method": "POST", - "uri": "/SendEvent", - "code": 200 + "uri": "/SendEvent" } } }, @@ -1264,8 +1259,7 @@ "smithy.api#documentation": "

Adds or updates tags for the AWS resource with the specified ARN.

", "smithy.api#http": { "method": "POST", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" } } }, @@ -1383,8 +1377,7 @@ "smithy.api#documentation": "

Removes tags from the resource with the specified ARN.

", "smithy.api#http": { "method": "DELETE", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" }, "smithy.api#idempotent": {} } @@ -1426,6 +1419,9 @@ { "target": "com.amazonaws.ivschat#AccessDeniedException" }, + { + "target": "com.amazonaws.ivschat#PendingVerification" + }, { "target": "com.amazonaws.ivschat#ResourceNotFoundException" }, @@ -1437,8 +1433,7 @@ "smithy.api#documentation": "

Updates a room’s configuration.

", "smithy.api#http": { "method": "POST", - "uri": "/UpdateRoom", - "code": 200 + "uri": "/UpdateRoom" } } }, @@ -1461,7 +1456,7 @@ "maximumMessageRatePerSecond": { "target": "com.amazonaws.ivschat#RoomMaxMessageRatePerSecond", "traits": { - "smithy.api#documentation": "

The maximum number of messages per second that a client can send to the room. Default:\n 10.

" + "smithy.api#documentation": "

Maximum number of messages per second that can be sent to the room (by all clients). Default:\n 10.

" } }, "maximumMessageLength": { @@ -1473,7 +1468,7 @@ "messageReviewHandler": { "target": "com.amazonaws.ivschat#MessageReviewHandler", "traits": { - "smithy.api#documentation": "

Configuration information for optional review of messages. Specify an empty uri string to disassociate a message review handler from the specified room.

" + "smithy.api#documentation": "

Configuration information for optional review of messages. Specify an empty\n uri string to disassociate a message review handler from the specified\n room.

" } } } @@ -1508,13 +1503,13 @@ "updateTime": { "target": "com.amazonaws.ivschat#Time", "traits": { - "smithy.api#documentation": "

Time of the room’s last update. This is an ISO 8601 timestamp; note\n that this is returned as a string.

" + "smithy.api#documentation": "

Time of the room’s last update. This is an ISO 8601 timestamp; note that this\n is returned as a string.

" } }, "maximumMessageRatePerSecond": { "target": "com.amazonaws.ivschat#RoomMaxMessageRatePerSecond", "traits": { - "smithy.api#documentation": "

Maximum number of messages per second that a client can send to the room, from the\n request.

" + "smithy.api#documentation": "

Maximum number of messages per second that can be sent to the room (by all clients), from the request.

" } }, "maximumMessageLength": { diff --git a/aws/sdk/aws-models/kendra.json b/aws/sdk/aws-models/kendra.json index 1b629f5081a..77759625425 100644 --- a/aws/sdk/aws-models/kendra.json +++ b/aws/sdk/aws-models/kendra.json @@ -2669,6 +2669,12 @@ "traits": { "smithy.api#documentation": "

Provides the configuration information to connect to Quip as your \n data source.

" } + }, + "JiraConfiguration": { + "target": "com.amazonaws.kendra#JiraConfiguration", + "traits": { + "smithy.api#documentation": "

Provides the configuration information to connect to Jira as your \n data source.

" + } } }, "traits": { @@ -3134,6 +3140,10 @@ { "value": "QUIP", "name": "QUIP" + }, + { + "value": "JIRA", + "name": "JIRA" } ] } @@ -6742,6 +6752,43 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.kendra#IssueSubEntity": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "COMMENTS", + "name": "COMMENTS" + }, + { + "value": "ATTACHMENTS", + "name": "ATTACHMENTS" + }, + { + "value": "WORKLOGS", + "name": "WORKLOGS" + } + ] + } + }, + "com.amazonaws.kendra#IssueSubEntityFilter": { + "type": "list", + "member": { + "target": "com.amazonaws.kendra#IssueSubEntity" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "com.amazonaws.kendra#IssueType": { + "type": "list", + "member": { + "target": "com.amazonaws.kendra#String" + } + }, "com.amazonaws.kendra#Issuer": { "type": "string", "traits": { @@ -6752,6 +6799,119 @@ "smithy.api#pattern": "^\\P{C}*$" } }, + "com.amazonaws.kendra#JiraAccountUrl": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^https:\\/\\/[a-zA-Z0-9_\\-\\.]+(\\.atlassian\\.net\\/)$" + } + }, + "com.amazonaws.kendra#JiraConfiguration": { + "type": "structure", + "members": { + "JiraAccountUrl": { + "target": "com.amazonaws.kendra#JiraAccountUrl", + "traits": { + "smithy.api#documentation": "

The URL of the Jira account. For example, company.attlassian.net or \n https://jira.company.com. You can find your Jira account URL in the URL of \n your profile page for Jira desktop.

", + "smithy.api#required": {} + } + }, + "SecretArn": { + "target": "com.amazonaws.kendra#SecretArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an Secrets Manager secret that \n contains the key-value pairs required to connect to your Jira \n data source. The secret must \n contain a JSON structure with the following keys:

\n
    \n
  • \n

    jira-id—The Active Directory user name, along with the \n Domain Name System (DNS) domain name. For example, \n user@corp.example.com.

    \n
  • \n
  • \n

    jiraCredentials—The password of the Jira account user.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "UseChangeLog": { + "target": "com.amazonaws.kendra#Boolean", + "traits": { + "smithy.api#documentation": "

Specify to use the change log option to update your index.

" + } + }, + "Project": { + "target": "com.amazonaws.kendra#Project", + "traits": { + "smithy.api#documentation": "

Specify which projects to crawl in your Jira data source. You can specify \n one or more Jira project IDs.

" + } + }, + "IssueType": { + "target": "com.amazonaws.kendra#IssueType", + "traits": { + "smithy.api#documentation": "

Specify which issue types to crawl in your Jira data source. \n You can specify one or more of these options to crawl.

" + } + }, + "Status": { + "target": "com.amazonaws.kendra#JiraStatus", + "traits": { + "smithy.api#documentation": "

Specify which statuses to crawl in your Jira data source. \n You can specify one or more of these options to crawl.

" + } + }, + "IssueSubEntityFilter": { + "target": "com.amazonaws.kendra#IssueSubEntityFilter", + "traits": { + "smithy.api#documentation": "

Specify whether to crawl comments,\n attachments,\n and work logs. You can specify one or more of these options.

" + } + }, + "AttachmentFieldMappings": { + "target": "com.amazonaws.kendra#DataSourceToIndexFieldMappingList", + "traits": { + "smithy.api#documentation": "

A list of DataSourceToIndexFieldMapping objects that map attributes \n or field names of Jira attachments to Amazon Kendra index field names. \n To create custom fields, use the UpdateIndex API before you map to Jira \n fields. For\n more information, see \n Mapping data source fields. The Jira data source field names \n must exist in your Jira custom metadata.

" + } + }, + "CommentFieldMappings": { + "target": "com.amazonaws.kendra#DataSourceToIndexFieldMappingList", + "traits": { + "smithy.api#documentation": "

A list of DataSourceToIndexFieldMapping objects that map attributes \n or field names of Jira comments to Amazon Kendra index field names. \n To create custom fields, use the UpdateIndex API before you map to Jira \n fields. For\n more information, see \n Mapping data source fields. The Jira data source field names \n must exist in your Jira custom metadata.

" + } + }, + "IssueFieldMappings": { + "target": "com.amazonaws.kendra#DataSourceToIndexFieldMappingList", + "traits": { + "smithy.api#documentation": "

A list of DataSourceToIndexFieldMapping objects that map attributes \n or field names of Jira issues to Amazon Kendra index field names. \n To create custom fields, use the UpdateIndex API before you map to Jira \n fields. For\n more information, see \n Mapping data source fields. The Jira data source field names \n must exist in your Jira custom metadata.

" + } + }, + "ProjectFieldMappings": { + "target": "com.amazonaws.kendra#DataSourceToIndexFieldMappingList", + "traits": { + "smithy.api#documentation": "

A list of DataSourceToIndexFieldMapping objects that map attributes \n or field names of Jira projects to Amazon Kendra index field names. \n To create custom fields, use the UpdateIndex API before you map to Jira \n fields. For\n more information, see \n Mapping data source fields. The Jira data source field names \n must exist in your Jira custom metadata.

" + } + }, + "WorkLogFieldMappings": { + "target": "com.amazonaws.kendra#DataSourceToIndexFieldMappingList", + "traits": { + "smithy.api#documentation": "

A list of DataSourceToIndexFieldMapping objects that map attributes \n or field names of Jira work logs to Amazon Kendra index field names. \n To create custom fields, use the UpdateIndex API before you map to Jira \n fields. For\n more information, see \n Mapping data source fields. The Jira data source field names \n must exist in your Jira custom metadata.

" + } + }, + "InclusionPatterns": { + "target": "com.amazonaws.kendra#DataSourceInclusionsExclusionsStrings", + "traits": { + "smithy.api#documentation": "

A list of regular expression patterns to include certain file paths,\n file\n names, and\n file types in your Jira data source. Files that match the patterns are included in the\n index. Files that don't match the patterns are excluded from the index. If a file\n matches both an inclusion pattern and an exclusion pattern, the exclusion pattern takes\n precedence and the file isn't included in the index.

" + } + }, + "ExclusionPatterns": { + "target": "com.amazonaws.kendra#DataSourceInclusionsExclusionsStrings", + "traits": { + "smithy.api#documentation": "

A list of regular expression patterns to exclude certain file paths,\n file names, and file types\n in your Jira data source. Files that match the patterns \n are excluded from the index. Files that don’t match the patterns are \n included in the index. If a file matches both an inclusion pattern \n and an exclusion pattern, the exclusion pattern takes precedence \n and the file isn't included in the index.

" + } + }, + "VpcConfiguration": { + "target": "com.amazonaws.kendra#DataSourceVpcConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration information for an \n Amazon Virtual Private Cloud to connect to your Jira. Your Jira \n account must reside inside your VPC.

" + } + } + } + }, + "com.amazonaws.kendra#JiraStatus": { + "type": "list", + "member": { + "target": "com.amazonaws.kendra#String" + } + }, "com.amazonaws.kendra#JsonTokenTypeConfiguration": { "type": "structure", "members": { @@ -8310,6 +8470,12 @@ "target": "com.amazonaws.kendra#String" } }, + "com.amazonaws.kendra#Project": { + "type": "list", + "member": { + "target": "com.amazonaws.kendra#String" + } + }, "com.amazonaws.kendra#ProxyConfiguration": { "type": "structure", "members": { diff --git a/aws/sdk/aws-models/kms.json b/aws/sdk/aws-models/kms.json index 6808c455634..7bf7edf0d02 100644 --- a/aws/sdk/aws-models/kms.json +++ b/aws/sdk/aws-models/kms.json @@ -601,7 +601,7 @@ "Operations": { "target": "com.amazonaws.kms#GrantOperationList", "traits": { - "smithy.api#documentation": "

A list of operations that the grant permits.

\n

This list must include only operations that are permitted in a grant. Also, the operation\n must be supported on the KMS key. For example, you cannot create a grant for a symmetric encryption KMS key that allows the Sign operation, or a grant for an asymmetric KMS key\n that allows the GenerateDataKey operation. If you try, KMS returns a\n ValidationError exception. For details, see Grant operations in the\n Key Management Service Developer Guide.

", + "smithy.api#documentation": "

A list of operations that the grant permits.

\n

This list must include only operations that are permitted in a grant. Also, the operation\n must be supported on the KMS key. For example, you cannot create a grant for a symmetric encryption KMS key that allows the Sign operation, or a grant for an\n asymmetric KMS key that allows the GenerateDataKey operation. If you try,\n KMS returns a ValidationError exception. For details, see Grant\n operations in the Key Management Service Developer Guide.

", "smithy.api#required": {} } }, @@ -683,7 +683,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a unique customer managed KMS key in your Amazon Web Services account and\n Region.

\n

In addition to the required parameters, you can use the optional parameters to specify a key policy, description, tags, and other useful elements for any key type.

\n \n

KMS is replacing the term customer master key (CMK) with KMS key and KMS key. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.

\n
\n\n \n

To create different types of KMS keys, use the following guidance:

\n\n
\n
Symmetric encryption KMS key
\n
\n

To create a symmetric encryption KMS key, you aren't required to specify any parameters. The default value for\n KeySpec, SYMMETRIC_DEFAULT, and the default value for\n KeyUsage, ENCRYPT_DECRYPT, create a symmetric encryption KMS key.

\n

If you need a key for basic encryption and decryption or you \n are creating a KMS key to protect your resources in an Amazon Web Services service, create a symmetric encryption KMS key. The key material in a symmetric encryption key never leaves KMS unencrypted. You can use a symmetric encryption KMS key to encrypt and decrypt data up to 4,096 bytes, but they are typically used to generate data keys and data keys pairs. For details, see GenerateDataKey and GenerateDataKeyPair.

\n

\n
\n
Asymmetric KMS keys
\n
\n

To create an asymmetric KMS key, use the KeySpec parameter to specify\n the type of key material in the KMS key. Then, use the KeyUsage parameter\n to determine whether the KMS key will be used to encrypt and decrypt or sign and verify.\n You can't change these properties after the KMS key is created.

\n

Asymmetric KMS keys contain an RSA key pair or an Elliptic Curve (ECC) key pair. The private key in an asymmetric \n KMS key never leaves AWS KMS unencrypted. However, you can use the GetPublicKey operation to download the public key\n so it can be used outside of AWS KMS. KMS keys with RSA key pairs can be used to encrypt or decrypt data or sign and verify messages (but not both). \n KMS keys with ECC key pairs can be used only to sign and verify messages. \n For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

\n
\n
HMAC KMS key
\n
\n

To create an HMAC KMS key, set the KeySpec parameter to a\n key spec value for HMAC KMS keys. Then set the KeyUsage parameter to\n GENERATE_VERIFY_MAC. You must set the key usage even though\n GENERATE_VERIFY_MAC is the only valid key usage value for HMAC KMS keys.\n You can't change these properties after the KMS key is created.

\n

HMAC KMS keys are symmetric keys that never leave KMS unencrypted. You can use\n HMAC keys to generate (GenerateMac) and verify (VerifyMac) HMAC codes for messages up to 4096 bytes.

\n

HMAC KMS keys are not supported in all Amazon Web Services Regions. If you try to create an HMAC\n KMS key in an Amazon Web Services Region in which HMAC keys are not supported, the\n CreateKey operation returns an\n UnsupportedOperationException. For a list of Regions in which HMAC KMS keys\n are supported, see HMAC keys in\n KMS in the Key Management Service Developer Guide.

\n

\n
\n
Multi-Region primary keys
\n
Imported key material
\n
\n

To create a multi-Region primary key in the local Amazon Web Services Region,\n use the MultiRegion parameter with a value of True. To create\n a multi-Region replica key, that is, a KMS key with the same key ID\n and key material as a primary key, but in a different Amazon Web Services Region, use the ReplicateKey operation. To change a replica key to a primary key, and its\n primary key to a replica key, use the UpdatePrimaryRegion\n operation.

\n

You can create multi-Region KMS keys for all supported KMS key types: symmetric\n encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys, and asymmetric\n signing KMS keys. You can also create multi-Region keys with imported key material.\n However, you can't create multi-Region keys in a custom key store.

\n

This operation supports multi-Region keys, an KMS feature that lets you create multiple\n interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key\n material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt\n it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

\n
\n
\n

To import your own key material, begin by creating a symmetric encryption KMS key with no key\n material. To do this, use the Origin parameter of CreateKey\n with a value of EXTERNAL. Next, use GetParametersForImport operation to get a public key and import token, and use the public key to encrypt\n your key material. Then, use ImportKeyMaterial with your import token\n to import the key material. For step-by-step instructions, see Importing Key Material in the \n Key Management Service Developer Guide\n .

\n

This feature supports only symmetric encryption KMS keys, including multi-Region symmetric encryption KMS keys. You cannot import key\n material into any other type of KMS key.

\n

To create a multi-Region primary key with imported key material, use the\n Origin parameter of CreateKey with a value of\n EXTERNAL and the MultiRegion parameter with a value of\n True. To create replicas of the multi-Region primary key, use the ReplicateKey operation. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

\n
\n
Custom key store
\n
\n

To create a symmetric encryption KMS key in a custom key store, use the\n CustomKeyStoreId parameter to specify the custom key store. You must also\n use the Origin parameter with a value of AWS_CLOUDHSM. The\n CloudHSM cluster that is associated with the custom key store must have at least two active\n HSMs in different Availability Zones in the Amazon Web Services Region.

\n

Custom key stores support only symmetric encryption KMS keys. You cannot create an\n HMAC KMS key or an asymmetric KMS key in a custom key store. For information about\n custom key stores in KMS see Custom key stores in KMS in\n the \n Key Management Service Developer Guide\n .

\n
\n
\n

\n Cross-account use: No. You cannot use this operation to\n create a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:CreateKey (IAM policy). To use the\n Tags parameter, kms:TagResource (IAM policy). For examples and information about related\n permissions, see Allow a user to create\n KMS keys in the Key Management Service Developer Guide.

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Creates a unique customer managed KMS key in your Amazon Web Services account and\n Region.

\n

In addition to the required parameters, you can use the optional parameters to specify a key policy, description, tags, and other useful elements for any key type.

\n \n

KMS is replacing the term customer master key (CMK) with KMS key and KMS key. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.

\n
\n\n

To create different types of KMS keys, use the following guidance:

\n\n
\n
Symmetric encryption KMS key
\n
\n

To create a symmetric encryption KMS key, you aren't required to specify any parameters. The default value for\n KeySpec, SYMMETRIC_DEFAULT, and the default value for\n KeyUsage, ENCRYPT_DECRYPT, create a symmetric encryption KMS key.

\n

If you need a key for basic encryption and decryption or you \n are creating a KMS key to protect your resources in an Amazon Web Services service, create a symmetric encryption KMS key. The key material in a symmetric encryption key never leaves KMS unencrypted. You can use a symmetric encryption KMS key to encrypt and decrypt data up to 4,096 bytes, but they are typically used to generate data keys and data keys pairs. For details, see GenerateDataKey and GenerateDataKeyPair.

\n

\n
\n
Asymmetric KMS keys
\n
\n

To create an asymmetric KMS key, use the KeySpec parameter to specify\n the type of key material in the KMS key. Then, use the KeyUsage parameter\n to determine whether the KMS key will be used to encrypt and decrypt or sign and verify.\n You can't change these properties after the KMS key is created.

\n

Asymmetric KMS keys contain an RSA key pair or an Elliptic Curve (ECC) key pair. The private key in an asymmetric \n KMS key never leaves KMS unencrypted. However, you can use the GetPublicKey operation to download the public key\n so it can be used outside of KMS. KMS keys with RSA key pairs can be used to encrypt or decrypt data or sign and verify messages (but not both). \n KMS keys with ECC key pairs can be used only to sign and verify messages. \n For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

\n
\n
HMAC KMS key
\n
\n

To create an HMAC KMS key, set the KeySpec parameter to a\n key spec value for HMAC KMS keys. Then set the KeyUsage parameter to\n GENERATE_VERIFY_MAC. You must set the key usage even though\n GENERATE_VERIFY_MAC is the only valid key usage value for HMAC KMS keys.\n You can't change these properties after the KMS key is created.

\n

HMAC KMS keys are symmetric keys that never leave KMS unencrypted. You can use\n HMAC keys to generate (GenerateMac) and verify (VerifyMac) HMAC codes for messages up to 4096 bytes.

\n

HMAC KMS keys are not supported in all Amazon Web Services Regions. If you try to create an HMAC\n KMS key in an Amazon Web Services Region in which HMAC keys are not supported, the\n CreateKey operation returns an\n UnsupportedOperationException. For a list of Regions in which HMAC KMS keys\n are supported, see HMAC keys in\n KMS in the Key Management Service Developer Guide.

\n

\n
\n
Multi-Region primary keys
\n
Imported key material
\n
\n

To create a multi-Region primary key in the local Amazon Web Services Region,\n use the MultiRegion parameter with a value of True. To create\n a multi-Region replica key, that is, a KMS key with the same key ID\n and key material as a primary key, but in a different Amazon Web Services Region, use the ReplicateKey operation. To change a replica key to a primary key, and its\n primary key to a replica key, use the UpdatePrimaryRegion\n operation.

\n

You can create multi-Region KMS keys for all supported KMS key types: symmetric\n encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys, and asymmetric\n signing KMS keys. You can also create multi-Region keys with imported key material.\n However, you can't create multi-Region keys in a custom key store.

\n

This operation supports multi-Region keys, an KMS feature that lets you create multiple\n interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key\n material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt\n it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

\n
\n
\n

To import your own key material, begin by creating a symmetric encryption KMS key with no key\n material. To do this, use the Origin parameter of CreateKey\n with a value of EXTERNAL. Next, use GetParametersForImport operation to get a public key and import token, and use the public key to encrypt\n your key material. Then, use ImportKeyMaterial with your import token\n to import the key material. For step-by-step instructions, see Importing Key Material in the \n Key Management Service Developer Guide\n .

\n

This feature supports only symmetric encryption KMS keys, including multi-Region symmetric encryption KMS keys. You cannot import key\n material into any other type of KMS key.

\n

To create a multi-Region primary key with imported key material, use the\n Origin parameter of CreateKey with a value of\n EXTERNAL and the MultiRegion parameter with a value of\n True. To create replicas of the multi-Region primary key, use the ReplicateKey operation. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

\n
\n
Custom key store
\n
\n

To create a symmetric encryption KMS key in a custom key store, use the\n CustomKeyStoreId parameter to specify the custom key store. You must also\n use the Origin parameter with a value of AWS_CLOUDHSM. The\n CloudHSM cluster that is associated with the custom key store must have at least two active\n HSMs in different Availability Zones in the Amazon Web Services Region.

\n

Custom key stores support only symmetric encryption KMS keys. You cannot create an\n HMAC KMS key or an asymmetric KMS key in a custom key store. For information about\n custom key stores in KMS see Custom key stores in KMS in\n the \n Key Management Service Developer Guide\n .

\n
\n
\n

\n Cross-account use: No. You cannot use this operation to\n create a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:CreateKey (IAM policy). To use the\n Tags parameter, kms:TagResource (IAM policy). For examples and information about related\n permissions, see Allow a user to create\n KMS keys in the Key Management Service Developer Guide.

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#CreateKeyRequest": { @@ -692,7 +692,7 @@ "Policy": { "target": "com.amazonaws.kms#PolicyType", "traits": { - "smithy.api#documentation": "

The key policy to attach to the KMS key.

\n

If you provide a key policy, it must meet the following criteria:

\n
    \n
  • \n

    If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy\n must allow the principal that is making the CreateKey request to make a\n subsequent PutKeyPolicy request on the KMS key. This reduces the risk\n that the KMS key becomes unmanageable. For more information, refer to the scenario in the\n Default Key Policy section of the \n Key Management Service Developer Guide\n .

    \n
  • \n
  • \n

    Each statement in the key policy must contain one or more principals. The principals\n in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services\n principal (for example, an IAM user or role), you might need to enforce a delay before\n including the new principal in a key policy because the new principal might not be\n immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services\n Identity and Access Management User Guide.

    \n
  • \n
\n

If you do not provide a key policy, KMS attaches a default key policy to the KMS key.\n For more information, see Default Key Policy in the\n Key Management Service Developer Guide.

\n

The key policy size quota is 32 kilobytes (32768 bytes).

\n

For help writing and formatting a JSON policy document, see the IAM JSON Policy Reference in the \n Identity and Access Management User Guide\n .

" + "smithy.api#documentation": "

The key policy to attach to the KMS key. If you do not specify a key policy, KMS attaches a default key policy to the KMS key.\n For more information, see Default key policy in the\n Key Management Service Developer Guide.

\n

If you provide a key policy, it must meet the following criteria:

\n
    \n
  • \n

    If you don't set BypassPolicyLockoutSafetyCheck to True, the key policy\n must allow the principal that is making the CreateKey request to make a\n subsequent PutKeyPolicy request on the KMS key. This reduces the risk\n that the KMS key becomes unmanageable. For more information, refer to the scenario in the\n Default Key Policy section of the \n Key Management Service Developer Guide\n .

    \n
  • \n
  • \n

    Each statement in the key policy must contain one or more principals. The principals\n in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services\n principal (for example, an IAM user or role), you might need to enforce a delay before\n including the new principal in a key policy because the new principal might not be\n immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services\n Identity and Access Management User Guide.

    \n
  • \n
\n \n

A key policy document must conform to the following rules.

\n
    \n
  • \n

    Up to 32 kilobytes (32768 bytes)

    \n
  • \n
  • \n

    Must be UTF-8 encoded

    \n
  • \n
  • \n

    The only Unicode characters that are permitted in a key policy document are the horizontal tab (U+0009), linefeed (U+000A), carriage return (U+000D), and characters in the range U+0020 to U+00FF.

    \n
  • \n
  • \n

    The Sid element in a key policy statement can include spaces. (Spaces are\n prohibited in the Sid element of an IAM policy document.)

    \n
  • \n
\n

For help writing and formatting a JSON policy document, see the IAM JSON Policy Reference in the \n Identity and Access Management User Guide\n .

" } }, "Description": { @@ -704,7 +704,7 @@ "KeyUsage": { "target": "com.amazonaws.kms#KeyUsageType", "traits": { - "smithy.api#documentation": "

Determines the cryptographic operations for which you can use the KMS key. The default value is\n ENCRYPT_DECRYPT. This parameter is optional when you are creating a symmetric\n encryption KMS key; otherwise, it is required. You\n can't change the KeyUsage value after the KMS key is created.

\n

Select only one valid value.

\n
    \n
  • \n

    For symmetric encryption KMS keys, omit the parameter or specify\n ENCRYPT_DECRYPT.

    \n
  • \n
  • \n

    For HMAC KMS keys (symmetric), specify GENERATE_VERIFY_MAC.

    \n
  • \n
  • \n

    For asymmetric KMS keys with RSA key material, specify ENCRYPT_DECRYPT or\n SIGN_VERIFY.

    \n
  • \n
  • \n

    For asymmetric KMS keys with ECC key material, specify\n SIGN_VERIFY.

    \n
  • \n
" + "smithy.api#documentation": "

Determines the cryptographic operations for which you can use the KMS key. The default value is\n ENCRYPT_DECRYPT. This parameter is optional when you are creating a symmetric\n encryption KMS key; otherwise, it is required. You\n can't change the KeyUsage value after the KMS key is created.

\n

Select only one valid value.

\n
    \n
  • \n

    For symmetric encryption KMS keys, omit the parameter or specify\n ENCRYPT_DECRYPT.

    \n
  • \n
  • \n

    For HMAC KMS keys (symmetric), specify GENERATE_VERIFY_MAC.

    \n
  • \n
  • \n

    For asymmetric KMS keys with RSA key material, specify ENCRYPT_DECRYPT or\n SIGN_VERIFY.

    \n
  • \n
  • \n

    For asymmetric KMS keys with ECC key material, specify\n SIGN_VERIFY.

    \n
  • \n
" } }, "CustomerMasterKeySpec": { @@ -719,7 +719,7 @@ "KeySpec": { "target": "com.amazonaws.kms#KeySpec", "traits": { - "smithy.api#documentation": "

Specifies the type of KMS key to create. The default value,\n SYMMETRIC_DEFAULT, creates a KMS key with a 256-bit symmetric key for encryption\n and decryption. For help choosing a key spec for your KMS key, see Choosing a KMS key type in\n the \n Key Management Service Developer Guide\n .

\n

The KeySpec determines whether the KMS key contains a symmetric key or an\n asymmetric key pair. It also determines the algorithms that the KMS key supports. You can't\n change the KeySpec after the KMS key is created. To further restrict the\n algorithms that can be used with the KMS key, use a condition key in its key policy or IAM\n policy. For more information, see kms:EncryptionAlgorithm, kms:MacAlgorithm or kms:Signing Algorithm in the \n Key Management Service Developer Guide\n .

\n \n

\n Amazon Web Services services that\n are integrated with KMS use symmetric encryption KMS keys to protect your data.\n These services do not support asymmetric KMS keys or HMAC KMS keys.

\n
\n

KMS supports the following key specs for KMS keys:

\n
    \n
  • \n

    Symmetric encryption key (default)

    \n
      \n
    • \n

      \n SYMMETRIC_DEFAULT (AES-256-GCM)

      \n
    • \n
    \n
  • \n
  • \n

    HMAC keys (symmetric)

    \n
      \n
    • \n

      \n HMAC_224\n

      \n
    • \n
    • \n

      \n HMAC_256\n

      \n
    • \n
    • \n

      \n HMAC_384\n

      \n
    • \n
    • \n

      \n HMAC_512\n

      \n
    • \n
    \n
  • \n
  • \n

    Asymmetric RSA key pairs

    \n
      \n
    • \n

      \n RSA_2048\n

      \n
    • \n
    • \n

      \n RSA_3072\n

      \n
    • \n
    • \n

      \n RSA_4096\n

      \n
    • \n
    \n
  • \n
  • \n

    Asymmetric NIST-recommended elliptic curve key pairs

    \n
      \n
    • \n

      \n ECC_NIST_P256 (secp256r1)

      \n
    • \n
    • \n

      \n ECC_NIST_P384 (secp384r1)

      \n
    • \n
    • \n

      \n ECC_NIST_P521 (secp521r1)

      \n
    • \n
    \n
  • \n
  • \n

    Other asymmetric elliptic curve key pairs

    \n
      \n
    • \n

      \n ECC_SECG_P256K1 (secp256k1), commonly used for\n cryptocurrencies.

      \n
    • \n
    \n
  • \n
" + "smithy.api#documentation": "

Specifies the type of KMS key to create. The default value,\n SYMMETRIC_DEFAULT, creates a KMS key with a 256-bit symmetric key for encryption\n and decryption. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the \n Key Management Service Developer Guide\n .

\n

The KeySpec determines whether the KMS key contains a symmetric key or an\n asymmetric key pair. It also determines the cryptographic algorithms that the KMS key supports. You can't\n change the KeySpec after the KMS key is created.\n To further restrict the algorithms that can be used with the KMS key, use a condition key in\n its key policy or IAM policy. For more information, see kms:EncryptionAlgorithm, kms:MacAlgorithm or kms:Signing Algorithm in the \n Key Management Service Developer Guide\n .

\n \n

\n Amazon Web Services services that\n are integrated with KMS use symmetric encryption KMS keys to protect your data.\n These services do not support asymmetric KMS keys or HMAC KMS keys.

\n
\n

KMS supports the following key specs for KMS keys:

\n
    \n
  • \n

    Symmetric encryption key (default)

    \n
      \n
    • \n

      \n SYMMETRIC_DEFAULT (AES-256-GCM)

      \n
    • \n
    \n
  • \n
  • \n

    HMAC keys (symmetric)

    \n
      \n
    • \n

      \n HMAC_224\n

      \n
    • \n
    • \n

      \n HMAC_256\n

      \n
    • \n
    • \n

      \n HMAC_384\n

      \n
    • \n
    • \n

      \n HMAC_512\n

      \n
    • \n
    \n
  • \n
  • \n

    Asymmetric RSA key pairs

    \n
      \n
    • \n

      \n RSA_2048\n

      \n
    • \n
    • \n

      \n RSA_3072\n

      \n
    • \n
    • \n

      \n RSA_4096\n

      \n
    • \n
    \n
  • \n
  • \n

    Asymmetric NIST-recommended elliptic curve key pairs

    \n
      \n
    • \n

      \n ECC_NIST_P256 (secp256r1)

      \n
    • \n
    • \n

      \n ECC_NIST_P384 (secp384r1)

      \n
    • \n
    • \n

      \n ECC_NIST_P521 (secp521r1)

      \n
    • \n
    \n
  • \n
  • \n

    Other asymmetric elliptic curve key pairs

    \n
      \n
    • \n

      \n ECC_SECG_P256K1 (secp256k1), commonly used for\n cryptocurrencies.

      \n
    • \n
    \n
  • \n
" } }, "Origin": { @@ -749,7 +749,7 @@ "MultiRegion": { "target": "com.amazonaws.kms#NullableBooleanType", "traits": { - "smithy.api#documentation": "

Creates a multi-Region primary key that you can replicate into other Amazon Web Services Regions. You\n cannot change this value after you create the KMS key.

\n

For a multi-Region key, set this parameter to True. For a single-Region KMS\n key, omit this parameter or set it to False. The default value is\n False.

\n

This operation supports multi-Region keys, an KMS feature that lets you create multiple\n interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key\n material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt\n it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

This value creates a primary key, not a replica. To create a\n replica key, use the ReplicateKey operation.

\n

You can create a symmetric or asymmetric multi-Region key, and you can create a\n multi-Region key with imported key material. However, you cannot create a multi-Region key in\n a custom key store.

" + "smithy.api#documentation": "

Creates a multi-Region primary key that you can replicate into other Amazon Web Services Regions. You\n cannot change this value after you create the KMS key.

\n

For a multi-Region key, set this parameter to True. For a single-Region KMS\n key, omit this parameter or set it to False. The default value is\n False.

\n

This operation supports multi-Region keys, an KMS feature that lets you create multiple\n interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key\n material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt\n it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

This value creates a primary key, not a replica. To create a\n replica key, use the ReplicateKey operation.

\n

You can create a multi-Region version of a symmetric encryption KMS key, an HMAC KMS key, an asymmetric KMS key, or a\n KMS key with imported key material. However, you cannot create a multi-Region key in\n a custom key store.

" } } } @@ -1059,7 +1059,7 @@ } ], "traits": { - "smithy.api#documentation": "

Decrypts ciphertext that was encrypted by a KMS key using any of the following\n operations:

\n \n

You can use this operation to decrypt ciphertext that was encrypted under a symmetric encryption KMS key or an\n asymmetric encryption KMS key. When the KMS key is asymmetric, you must specify the KMS key and the\n encryption algorithm that was used to encrypt the ciphertext. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

The Decrypt operation also decrypts ciphertext that was encrypted outside of KMS by the\n public key in an KMS asymmetric KMS key. However, it cannot decrypt symmetric ciphertext produced by\n other libraries, such as the Amazon Web Services\n Encryption SDK or Amazon S3 client-side encryption.\n These libraries return a ciphertext format that is incompatible with KMS.

\n

If the ciphertext was encrypted under a symmetric encryption KMS key, the KeyId\n parameter is optional. KMS can get this information from metadata that it adds to the\n symmetric ciphertext blob. This feature adds durability to your implementation by ensuring\n that authorized users can decrypt ciphertext decades after it was encrypted, even if they've\n lost track of the key ID. However, specifying the KMS key is always recommended as a best\n practice. When you use the KeyId parameter to specify a KMS key, KMS only uses\n the KMS key you specify. If the ciphertext was encrypted under a different KMS key, the\n Decrypt operation fails. This practice ensures that you use the KMS key that\n you intend.

\n

Whenever possible, use key policies to give users permission to call the\n Decrypt operation on a particular KMS key, instead of using IAM policies.\n Otherwise, you might create an IAM user policy that gives the user Decrypt\n permission on all KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys\n in other accounts if the key policy for the cross-account KMS key permits it. If you must use\n an IAM policy for Decrypt permissions, limit the user to particular KMS keys or\n particular trusted accounts. For details, see Best practices for IAM\n policies in the Key Management Service Developer Guide.

\n

Applications in Amazon Web Services Nitro Enclaves can call this operation by using the Amazon Web Services Nitro Enclaves Development Kit. For information about the supporting parameters, see How Amazon Web Services Nitro Enclaves use KMS in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:Decrypt (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Decrypts ciphertext that was encrypted by a KMS key using any of the following\n operations:

\n \n

You can use this operation to decrypt ciphertext that was encrypted under a symmetric encryption KMS key or an\n asymmetric encryption KMS key. When the KMS key is asymmetric, you must specify the KMS key and the\n encryption algorithm that was used to encrypt the ciphertext. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

The Decrypt operation also decrypts ciphertext that was encrypted outside of KMS by the\n public key in an KMS asymmetric KMS key. However, it cannot decrypt ciphertext produced by\n other libraries, such as the Amazon Web Services\n Encryption SDK or Amazon S3 client-side encryption.\n These libraries return a ciphertext format that is incompatible with KMS.

\n

If the ciphertext was encrypted under a symmetric encryption KMS key, the KeyId\n parameter is optional. KMS can get this information from metadata that it adds to the\n symmetric ciphertext blob. This feature adds durability to your implementation by ensuring\n that authorized users can decrypt ciphertext decades after it was encrypted, even if they've\n lost track of the key ID. However, specifying the KMS key is always recommended as a best\n practice. When you use the KeyId parameter to specify a KMS key, KMS only uses\n the KMS key you specify. If the ciphertext was encrypted under a different KMS key, the\n Decrypt operation fails. This practice ensures that you use the KMS key that\n you intend.

\n

Whenever possible, use key policies to give users permission to call the\n Decrypt operation on a particular KMS key, instead of using IAM policies.\n Otherwise, you might create an IAM user policy that gives the user Decrypt\n permission on all KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys\n in other accounts if the key policy for the cross-account KMS key permits it. If you must use\n an IAM policy for Decrypt permissions, limit the user to particular KMS keys or\n particular trusted accounts. For details, see Best practices for IAM\n policies in the Key Management Service Developer Guide.

\n

Applications in Amazon Web Services Nitro Enclaves can call this operation by using the Amazon Web Services Nitro Enclaves Development Kit. For information about the supporting parameters, see How Amazon Web Services Nitro Enclaves use KMS in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:Decrypt (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#DecryptRequest": { @@ -1087,7 +1087,7 @@ "KeyId": { "target": "com.amazonaws.kms#KeyIdType", "traits": { - "smithy.api#documentation": "

Specifies the KMS key that KMS uses to decrypt the ciphertext.

\n \n

Enter a key ID of the KMS\n key that was used to encrypt the ciphertext. If you identify a different KMS key, the Decrypt operation throws an IncorrectKeyException.

\n\n

This parameter is required only when the ciphertext was encrypted under an asymmetric KMS\n key. If you used a symmetric encryption KMS key, KMS can get the KMS key from metadata that it adds to\n the symmetric ciphertext blob. However, it is always recommended as a best practice. This\n practice ensures that you use the KMS key that you intend.

\n \n

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

" + "smithy.api#documentation": "

Specifies the KMS key that KMS uses to decrypt the ciphertext.

\n

Enter a key ID of the KMS\n key that was used to encrypt the ciphertext. If you identify a different KMS key, the Decrypt operation throws an IncorrectKeyException.

\n

This parameter is required only when the ciphertext was encrypted under an asymmetric KMS\n key. If you used a symmetric encryption KMS key, KMS can get the KMS key from metadata that it adds to\n the symmetric ciphertext blob. However, it is always recommended as a best practice. This\n practice ensures that you use the KMS key that you intend.

\n \n

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

" } }, "EncryptionAlgorithm": { @@ -1474,7 +1474,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disables automatic\n rotation of the key material for the specified symmetric encryption KMS key.

\n

You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:DisableKeyRotation (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Disables automatic\n rotation of the key material of the specified symmetric encryption KMS key.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable or disable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. The key rotation status of these KMS keys is always false.\nTo enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

You can enable (EnableKeyRotation) and disable automatic rotation of the\n key material in customer managed KMS keys. Key material rotation of Amazon Web Services managed KMS keys is not\n configurable. KMS always rotates the key material for every year. Rotation of Amazon Web Services owned KMS\n keys varies.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every\n three years to every year. For details, see EnableKeyRotation.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:DisableKeyRotation (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#DisableKeyRotationRequest": { @@ -1621,7 +1621,7 @@ } ], "traits": { - "smithy.api#documentation": "

Enables automatic rotation\n of the key material for the specified symmetric encryption KMS key.

\n

You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:EnableKeyRotation (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Enables automatic rotation\n of the key material of the specified symmetric encryption KMS key.

\n

When you enable automatic rotation of acustomer managed KMS key, KMS\n rotates the key material of the KMS key one year (approximately 365 days) from the enable date\n and every year thereafter. You can monitor rotation of the key material for your KMS keys in\n CloudTrail and Amazon CloudWatch. To disable rotation of the key material in a customer\n managed KMS key, use the DisableKeyRotation operation.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable or disable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. The key rotation status of these KMS keys is always false.\nTo enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

You cannot enable or disable automatic rotation Amazon Web Services managed KMS keys. KMS\n always rotates the key material of Amazon Web Services managed keys every year. Rotation of Amazon Web Services owned KMS\n keys varies.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three\n years (approximately 1,095 days) to every year (approximately 365 days).

\n

New Amazon Web Services managed keys are automatically rotated one year after they\n are created, and approximately every year thereafter.

\n

Existing Amazon Web Services managed keys are automatically rotated one year after\n their most recent rotation, and every year thereafter.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:EnableKeyRotation (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#EnableKeyRotationRequest": { @@ -1630,7 +1630,7 @@ "KeyId": { "target": "com.amazonaws.kms#KeyIdType", "traits": { - "smithy.api#documentation": "

Identifies a symmetric encryption KMS key. You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

Specify the key ID or key ARN of the KMS key.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

", + "smithy.api#documentation": "

Identifies a symmetric encryption KMS key. You cannot enable or disable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. The key rotation status of these KMS keys is always false.\nTo enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n \n

Specify the key ID or key ARN of the KMS key.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

", "smithy.api#required": {} } } @@ -1671,7 +1671,7 @@ } ], "traits": { - "smithy.api#documentation": "

Encrypts plaintext of up to 4,096 bytes using a KMS key. You can use a symmetric or\n asymmetric KMS key with a KeyUsage of ENCRYPT_DECRYPT.

\n

You can use this operation to encrypt small amounts of arbitrary data, such as a personal identifier or\n database password, or other sensitive information. You don't need to use the Encrypt operation to encrypt a data key. The GenerateDataKey and GenerateDataKeyPair operations return a\n plaintext data key and an encrypted copy of that data key.

\n\n

If you use a symmetric encryption KMS key, you can use an encryption context to add additional\n security to your encryption operation. If you specify an EncryptionContext when\n encrypting data, you must specify the same encryption context (a case-sensitive exact match)\n when decrypting the data. Otherwise, the request to decrypt fails with an\n InvalidCiphertextException. For more information, see Encryption\n Context in the Key Management Service Developer Guide.

\n

If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The\n algorithm must be compatible with the KMS key type.

\n \n

When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.

\n

You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.

\n
\n\n\n

The maximum size of the data that you can encrypt varies with the type of KMS key and the\n encryption algorithm that you choose.

\n
    \n
  • \n

    Symmetric encryption KMS keys

    \n
      \n
    • \n

      \n SYMMETRIC_DEFAULT: 4096 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_2048\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 214 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 190 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_3072\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 342 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 318 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_4096\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 470 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 446 bytes

      \n
    • \n
    \n
  • \n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes.\n To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:Encrypt (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Encrypts plaintext of up to 4,096 bytes using a KMS key. You can use a symmetric or\n asymmetric KMS key with a KeyUsage of ENCRYPT_DECRYPT.

\n

You can use this operation to encrypt small amounts of arbitrary data, such as a personal identifier or\n database password, or other sensitive information. You don't need to use the Encrypt operation to encrypt a data key. The GenerateDataKey and GenerateDataKeyPair operations return a\n plaintext data key and an encrypted copy of that data key.

\n\n

If you use a symmetric encryption KMS key, you can use an encryption context to add additional\n security to your encryption operation. If you specify an EncryptionContext when\n encrypting data, you must specify the same encryption context (a case-sensitive exact match)\n when decrypting the data. Otherwise, the request to decrypt fails with an\n InvalidCiphertextException. For more information, see Encryption\n Context in the Key Management Service Developer Guide.

\n

If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The\n algorithm must be compatible with the KMS key type.

\n \n

When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.

\n

You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.

\n
\n\n\n

The maximum size of the data that you can encrypt varies with the type of KMS key and the\n encryption algorithm that you choose.

\n
    \n
  • \n

    Symmetric encryption KMS keys

    \n
      \n
    • \n

      \n SYMMETRIC_DEFAULT: 4096 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_2048\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 214 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 190 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_3072\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 342 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 318 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_4096\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 470 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 446 bytes

      \n
    • \n
    \n
  • \n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes.\n To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:Encrypt (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#EncryptRequest": { @@ -1844,7 +1844,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique symmetric data key for use outside of KMS. This operation returns a\n plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS\n key that you specify. The bytes in the plaintext key are random; they are not related to the caller or the KMS\n key. You can use the plaintext key to encrypt your data outside of KMS and store the\n encrypted data key with the encrypted data.

\n\n

To generate a data key, specify the symmetric encryption KMS key that will be used to\n encrypt the data key. You cannot use an asymmetric KMS key to encrypt data keys. To get the\n type of your KMS key, use the DescribeKey operation. You must also specify\n the length of the data key. Use either the KeySpec or NumberOfBytes\n parameters (but not both). For 128-bit and 256-bit data keys, use the KeySpec\n parameter.

\n\n

To get only an encrypted copy of the data key, use GenerateDataKeyWithoutPlaintext. To generate an asymmetric data key pair, use\n the GenerateDataKeyPair or GenerateDataKeyPairWithoutPlaintext operation. To get a cryptographically secure\n random byte string, use GenerateRandom.

\n\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

Applications in Amazon Web Services Nitro Enclaves can call this operation by using the Amazon Web Services Nitro Enclaves Development Kit. For information about the supporting parameters, see How Amazon Web Services Nitro Enclaves use KMS in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n How to use your data\n key\n

\n

We recommend that you use the following pattern to encrypt data locally in your\n application. You can write your own code or use a client-side encryption library, such as the\n Amazon Web Services Encryption SDK, the\n Amazon DynamoDB Encryption Client,\n or Amazon S3\n client-side encryption to do these tasks for you.

\n

To encrypt data outside of KMS:

\n
    \n
  1. \n

    Use the GenerateDataKey operation to get a data key.

    \n
  2. \n
  3. \n

    Use the plaintext data key (in the Plaintext field of the response) to\n encrypt your data outside of KMS. Then erase the plaintext data key from memory.

    \n
  4. \n
  5. \n

    Store the encrypted data key (in the CiphertextBlob field of the\n response) with the encrypted data.

    \n
  6. \n
\n

To decrypt data outside of KMS:

\n
    \n
  1. \n

    Use the Decrypt operation to decrypt the encrypted data key. The\n operation returns a plaintext copy of the data key.

    \n
  2. \n
  3. \n

    Use the plaintext data key to decrypt data outside of KMS, then erase the plaintext\n data key from memory.

    \n
  4. \n
\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GenerateDataKey (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns a unique symmetric data key for use outside of KMS. This operation returns a\n plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS\n key that you specify. The bytes in the plaintext key are random; they are not related to the caller or the KMS\n key. You can use the plaintext key to encrypt your data outside of KMS and store the encrypted\n data key with the encrypted data.

\n\n

To generate a data key, specify the symmetric encryption KMS key that will be used to\n encrypt the data key. You cannot use an asymmetric KMS key to encrypt data keys. To get the\n type of your KMS key, use the DescribeKey operation. You must also specify the length of\n the data key. Use either the KeySpec or NumberOfBytes parameters\n (but not both). For 128-bit and 256-bit data keys, use the KeySpec parameter.

\n\n

To get only an encrypted copy of the data key, use GenerateDataKeyWithoutPlaintext. To generate an asymmetric data key pair, use\n the GenerateDataKeyPair or GenerateDataKeyPairWithoutPlaintext operation. To get a cryptographically secure\n random byte string, use GenerateRandom.

\n\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

Applications in Amazon Web Services Nitro Enclaves can call this operation by using the Amazon Web Services Nitro Enclaves Development Kit. For information about the supporting parameters, see How Amazon Web Services Nitro Enclaves use KMS in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n How to use your data\n key\n

\n

We recommend that you use the following pattern to encrypt data locally in your\n application. You can write your own code or use a client-side encryption library, such as the\n Amazon Web Services Encryption SDK, the\n Amazon DynamoDB Encryption Client,\n or Amazon S3\n client-side encryption to do these tasks for you.

\n

To encrypt data outside of KMS:

\n
    \n
  1. \n

    Use the GenerateDataKey operation to get a data key.

    \n
  2. \n
  3. \n

    Use the plaintext data key (in the Plaintext field of the response) to\n encrypt your data outside of KMS. Then erase the plaintext data key from memory.

    \n
  4. \n
  5. \n

    Store the encrypted data key (in the CiphertextBlob field of the\n response) with the encrypted data.

    \n
  6. \n
\n

To decrypt data outside of KMS:

\n
    \n
  1. \n

    Use the Decrypt operation to decrypt the encrypted data key. The\n operation returns a plaintext copy of the data key.

    \n
  2. \n
  3. \n

    Use the plaintext data key to decrypt data outside of KMS, then erase the plaintext\n data key from memory.

    \n
  4. \n
\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GenerateDataKey (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#GenerateDataKeyPair": { @@ -1885,7 +1885,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique asymmetric data key pair for use outside of KMS. This operation returns\n a plaintext public key, a plaintext private key, and a copy of the private key that is\n encrypted under the symmetric encryption KMS key you specify. You can use the data key pair to\n perform asymmetric cryptography and implement digital signatures outside of KMS. The bytes\n in the keys are random; they not related to the caller or to the KMS key that is used to encrypt the\n private key.

\n\n

You can use the public key that GenerateDataKeyPair returns to encrypt data\n or verify a signature outside of KMS. Then, store the encrypted private key with the data.\n When you are ready to decrypt data or sign a message, you can use the Decrypt operation to decrypt the encrypted private key.

\n\n

To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt\n the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a\n custom key store. To get the type and origin of your KMS key, use the DescribeKey operation.

\n

Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data\n key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs for\n either encryption or signing, but not both. However, KMS cannot enforce any restrictions on\n the use of data key pairs outside of KMS.

\n\n

If you are using the data key pair to encrypt data, or for any operation where you don't\n immediately need a private key, consider using the GenerateDataKeyPairWithoutPlaintext operation.\n GenerateDataKeyPairWithoutPlaintext returns a plaintext public key and an\n encrypted private key, but omits the plaintext private key that you need only to decrypt\n ciphertext or sign a message. Later, when you need to decrypt the data or sign a message, use\n the Decrypt operation to decrypt the encrypted private key in the data key\n pair.

\n\n

\n GenerateDataKeyPair returns a unique data key pair for each request. The\n bytes in the keys are random; they are not related to the caller or the KMS key that is used to encrypt the\n private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in\n RFC 5280. The private key is a\n DER-encoded PKCS8 PrivateKeyInfo, as specified in RFC 5958.

\n\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GenerateDataKeyPair (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns a unique asymmetric data key pair for use outside of KMS. This operation returns\n a plaintext public key, a plaintext private key, and a copy of the private key that is\n encrypted under the symmetric encryption KMS key you specify. You can use the data key pair to\n perform asymmetric cryptography and implement digital signatures outside of KMS. The bytes\n in the keys are random; they not related to the caller or to the KMS key that is used to encrypt the\n private key.

\n\n

You can use the public key that GenerateDataKeyPair returns to encrypt data\n or verify a signature outside of KMS. Then, store the encrypted private key with the data.\n When you are ready to decrypt data or sign a message, you can use the Decrypt operation to decrypt the encrypted private key.

\n\n

To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt\n the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a\n custom key store. To get the type and origin of your KMS key, use the DescribeKey\n operation.

\n

Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data\n key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs for\n either encryption or signing, but not both. However, KMS cannot enforce any restrictions on\n the use of data key pairs outside of KMS.

\n\n

If you are using the data key pair to encrypt data, or for any operation where you don't\n immediately need a private key, consider using the GenerateDataKeyPairWithoutPlaintext operation.\n GenerateDataKeyPairWithoutPlaintext returns a plaintext public key and an\n encrypted private key, but omits the plaintext private key that you need only to decrypt\n ciphertext or sign a message. Later, when you need to decrypt the data or sign a message, use\n the Decrypt operation to decrypt the encrypted private key in the data key\n pair.

\n\n

\n GenerateDataKeyPair returns a unique data key pair for each request. The\n bytes in the keys are random; they are not related to the caller or the KMS key that is used to encrypt the\n private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in\n RFC 5280. The private key is a\n DER-encoded PKCS8 PrivateKeyInfo, as specified in RFC 5958.

\n\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GenerateDataKeyPair (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#GenerateDataKeyPairRequest": { @@ -1992,7 +1992,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique asymmetric data key pair for use outside of KMS. This operation returns\n a plaintext public key and a copy of the private key that is encrypted under the symmetric\n encryption KMS key you specify. Unlike GenerateDataKeyPair, this operation\n does not return a plaintext private key. The bytes in the keys are random; they are not related to the caller\n or to the KMS key that is used to encrypt the private key.

\n

You can use the public key that GenerateDataKeyPairWithoutPlaintext returns\n to encrypt data or verify a signature outside of KMS. Then, store the encrypted private key\n with the data. When you are ready to decrypt data or sign a message, you can use the Decrypt operation to decrypt the encrypted private key.

\n

To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt\n the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a\n custom key store. To get the type and origin of your KMS key, use the DescribeKey operation.

\n

Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data\n key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs for\n either encryption or signing, but not both. However, KMS cannot enforce any restrictions on\n the use of data key pairs outside of KMS.

\n

\n GenerateDataKeyPairWithoutPlaintext returns a unique data key pair for each\n request. The bytes in the key are not related to the caller or KMS key that is used to encrypt\n the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in\n RFC 5280.

\n\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GenerateDataKeyPairWithoutPlaintext (key\n policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns a unique asymmetric data key pair for use outside of KMS. This operation returns\n a plaintext public key and a copy of the private key that is encrypted under the symmetric\n encryption KMS key you specify. Unlike GenerateDataKeyPair, this operation\n does not return a plaintext private key. The bytes in the keys are random; they are not related to the caller\n or to the KMS key that is used to encrypt the private key.

\n

You can use the public key that GenerateDataKeyPairWithoutPlaintext returns\n to encrypt data or verify a signature outside of KMS. Then, store the encrypted private key\n with the data. When you are ready to decrypt data or sign a message, you can use the Decrypt operation to decrypt the encrypted private key.

\n

To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt\n the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a\n custom key store. To get the type and origin of your KMS key, use the DescribeKey\n operation.

\n

Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data\n key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs for\n either encryption or signing, but not both. However, KMS cannot enforce any restrictions on\n the use of data key pairs outside of KMS.

\n

\n GenerateDataKeyPairWithoutPlaintext returns a unique data key pair for each\n request. The bytes in the key are not related to the caller or KMS key that is used to encrypt\n the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in\n RFC 5280.

\n\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GenerateDataKeyPairWithoutPlaintext (key\n policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#GenerateDataKeyPairWithoutPlaintextRequest": { @@ -2007,7 +2007,7 @@ "KeyId": { "target": "com.amazonaws.kms#KeyIdType", "traits": { - "smithy.api#documentation": "

Specifies the symmetric encryption KMS key that encrypts the private key in the data key\n pair. You cannot specify an asymmetric KMS key or a KMS key in a custom key store. To get the\n type and origin of your KMS key, use the DescribeKey operation.

\n

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

", + "smithy.api#documentation": "

Specifies the symmetric encryption KMS key that encrypts the private key in the data key\n pair. You cannot specify an asymmetric KMS key or a KMS key in a custom key store. To get the\n type and origin of your KMS key, use the DescribeKey operation.\n

\n

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

", "smithy.api#required": {} } }, @@ -2149,7 +2149,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique symmetric data key for use outside of KMS. This operation returns a\n data key that is encrypted under a symmetric encryption KMS key that you specify. The bytes in\n the key are random; they are not related to the caller or to the KMS key.

\n

\n GenerateDataKeyWithoutPlaintext is identical to the GenerateDataKey operation except that it does not return a plaintext copy of the\n data key.

\n

This operation is useful for systems that need to encrypt data at some point, but not\n immediately. When you need to encrypt the data, you call the Decrypt\n operation on the encrypted copy of the key. It's also useful in distributed systems with\n different levels of trust. For example, you might store encrypted data in containers. One\n component of your system creates new containers and stores an encrypted data key with each\n container. Then, a different component puts the data into the containers. That component first\n decrypts the data key, uses the plaintext data key to encrypt data, puts the encrypted data\n into the container, and then destroys the plaintext data key. In this system, the component\n that creates the containers never sees the plaintext data key.

\n

To request an asymmetric data key pair, use the GenerateDataKeyPair or\n GenerateDataKeyPairWithoutPlaintext operations.

\n\n

To generate a data key, you must specify the symmetric encryption KMS key that is used to\n encrypt the data key. You cannot use an asymmetric KMS key or a key in a custom key store to generate a data key. To get the\n type of your KMS key, use the DescribeKey operation.

\n

If the operation succeeds, you will find the encrypted copy of the data key in the\n CiphertextBlob field.

\n\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GenerateDataKeyWithoutPlaintext (key\n policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns a unique symmetric data key for use outside of KMS. This operation returns a\n data key that is encrypted under a symmetric encryption KMS key that you specify. The bytes in\n the key are random; they are not related to the caller or to the KMS key.

\n

\n GenerateDataKeyWithoutPlaintext is identical to the GenerateDataKey operation except that it does not return a plaintext copy of the\n data key.

\n

This operation is useful for systems that need to encrypt data at some point, but not\n immediately. When you need to encrypt the data, you call the Decrypt\n operation on the encrypted copy of the key.

\n

It's also useful in distributed systems with different levels of trust. For example, you\n might store encrypted data in containers. One component of your system creates new containers\n and stores an encrypted data key with each container. Then, a different component puts the\n data into the containers. That component first decrypts the data key, uses the plaintext data\n key to encrypt data, puts the encrypted data into the container, and then destroys the\n plaintext data key. In this system, the component that creates the containers never sees the\n plaintext data key.

\n

To request an asymmetric data key pair, use the GenerateDataKeyPair or\n GenerateDataKeyPairWithoutPlaintext operations.

\n\n

To generate a data key, you must specify the symmetric encryption KMS key that is used to\n encrypt the data key. You cannot use an asymmetric KMS key or a key in a custom key store to generate a data key. To get the\n type of your KMS key, use the DescribeKey operation.

\n\n

If the operation succeeds, you will find the encrypted copy of the data key in the\n CiphertextBlob field.

\n\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GenerateDataKeyWithoutPlaintext (key\n policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#GenerateDataKeyWithoutPlaintextRequest": { @@ -2237,7 +2237,7 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a hash-based message authentication code (HMAC) for a message using an HMAC KMS\n key and a MAC algorithm that the key supports. The MAC algorithm computes the HMAC for the\n message and the key as described in RFC 2104.

\n

You can use the HMAC that this operation generates with the VerifyMac\n operation to demonstrate that the original message has not changed. Also, because a secret key\n is used to create the hash, you can verify that the party that generated the hash has the\n required secret key. This operation is part of KMS support for HMAC KMS keys.\n For details, see HMAC keys in KMS in the \n Key Management Service Developer Guide\n .

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateMac (key policy)

\n

\n Related operations: VerifyMac\n

" + "smithy.api#documentation": "

Generates a hash-based message authentication code (HMAC) for a message using an HMAC KMS\n key and a MAC algorithm that the key supports. The MAC algorithm computes the HMAC for the\n message and the key as described in RFC 2104.

\n

You can use the HMAC that this operation generates with the VerifyMac\n operation to demonstrate that the original message has not changed. Also, because a secret key\n is used to create the hash, you can verify that the party that generated the hash has the\n required secret key. This operation is part of KMS support for HMAC KMS keys.\n For details, see HMAC keys in KMS in the \n Key Management Service Developer Guide\n .

\n \n

Best practices recommend that you limit the time during which any signing mechanism,\n including an HMAC, is effective. This deters an attack where the actor uses a signed\n message to establish validity repeatedly or long after the message is superseded. HMAC\n tags do not include a timestamp, but you can include a timestamp in the token or message\n to help you detect when its time to refresh the HMAC.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account\n use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateMac (key policy)

\n

\n Related operations: VerifyMac\n

" } }, "com.amazonaws.kms#GenerateMacRequest": { @@ -2437,7 +2437,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a Boolean value that indicates whether automatic rotation of the key material is\n enabled for the specified KMS key.

\n

You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key. The key rotation status for these KMS keys is always\n false.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n
    \n
  • \n

    Disabled: The key rotation status does not change when you disable a KMS key. However,\n while the KMS key is disabled, KMS does not rotate the key material.

    \n
  • \n
  • \n

    Pending deletion: While a KMS key is pending deletion, its key rotation status is\n false and KMS does not rotate the key material. If you cancel the\n deletion, the original key rotation status is restored.

    \n
  • \n
\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GetKeyRotationStatus (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Gets a Boolean value that indicates whether automatic rotation of the key material is\n enabled for the specified KMS key.

\n

When you enable automatic rotation for customer managed KMS keys, KMS\n rotates the key material of the KMS key one year (approximately 365 days) from the enable date\n and every year thereafter. You can monitor rotation of the key material for your KMS keys in\n CloudTrail and Amazon CloudWatch.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable or disable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. The key rotation status of these KMS keys is always false.\nTo enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key..

\n

You can enable (EnableKeyRotation) and disable automatic rotation (DisableKeyRotation) of the key material in customer managed KMS keys. Key\n material rotation of Amazon Web Services managed KMS keys is not\n configurable. KMS always rotates the key material in Amazon Web Services managed KMS keys every year. The\n key rotation status for Amazon Web Services managed KMS keys is always true.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three years to every year. For details, see EnableKeyRotation.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n
    \n
  • \n

    Disabled: The key rotation status does not change when you disable a KMS key. However,\n while the KMS key is disabled, KMS does not rotate the key material. When you re-enable\n the KMS key, rotation resumes. If the key material in the re-enabled KMS key hasn't been\n rotated in one year, KMS rotates it immediately, and every year thereafter. If it's been\n less than a year since the key material in the re-enabled KMS key was rotated, the KMS key\n resumes its prior rotation schedule.

    \n
  • \n
  • \n

    Pending deletion: While a KMS key is pending deletion, its key rotation status is\n false and KMS does not rotate the key material. If you cancel the\n deletion, the original key rotation status returns to true.

    \n
  • \n
\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:GetKeyRotationStatus (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#GetKeyRotationStatusRequest": { @@ -2492,7 +2492,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the items you need to import key material into a symmetric encryption KMS key. For\n more information about importing key material into KMS, see Importing key material in the\n Key Management Service Developer Guide.

\n

This operation returns a public key and an import token. Use the public key to encrypt the\n symmetric key material. Store the import token to send with a subsequent ImportKeyMaterial request.

\n

You must specify the key ID of the symmetric encryption KMS key into which you will import\n key material. This KMS key's Origin must be EXTERNAL. You must also\n specify the wrapping algorithm and type of wrapping key (public key) that you will use to\n encrypt the key material. You cannot perform this operation on an asymmetric KMS key, an HMAC KMS key, or on any KMS key in a different Amazon Web Services account.

\n

To import key material, you must use the public key and import token from the same\n response. These items are valid for 24 hours. The expiration date and time appear in the\n GetParametersForImport response. You cannot use an expired token in an ImportKeyMaterial request. If your key and token expire, send another\n GetParametersForImport request.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:GetParametersForImport (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns the items you need to import key material into a symmetric encryption KMS key. For\n more information about importing key material into KMS, see Importing key material\n in the Key Management Service Developer Guide.

\n

This operation returns a public key and an import token. Use the public key to encrypt the\n symmetric key material. Store the import token to send with a subsequent ImportKeyMaterial request.

\n

You must specify the key ID of the symmetric encryption KMS key into which you will import\n key material. This KMS key's Origin must be EXTERNAL. You must also\n specify the wrapping algorithm and type of wrapping key (public key) that you will use to\n encrypt the key material. You cannot perform this operation on an asymmetric KMS key, an HMAC KMS key, or on any KMS key in a different Amazon Web Services account.

\n

To import key material, you must use the public key and import token from the same\n response. These items are valid for 24 hours. The expiration date and time appear in the\n GetParametersForImport response. You cannot use an expired token in an ImportKeyMaterial request. If your key and token expire, send another\n GetParametersForImport request.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:GetParametersForImport (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#GetParametersForImportRequest": { @@ -2908,7 +2908,7 @@ } ], "traits": { - "smithy.api#documentation": "

Imports key material into an existing symmetric encryption KMS key that was created\n without key material. After you successfully import key material into a KMS key, you can\n reimport the same key material into that KMS key, but you cannot import different\n key material.

\n

You cannot perform this operation on an asymmetric KMS key, an HMAC KMS key, or on any KMS key in a different Amazon Web Services account. For more information about\n creating KMS keys with no key material and then importing key material, see Importing Key Material\n in the Key Management Service Developer Guide.

\n

Before using this operation, call GetParametersForImport. Its response\n includes a public key and an import token. Use the public key to encrypt the key material.\n Then, submit the import token from the same GetParametersForImport\n response.

\n

When calling this operation, you must specify the following values:

\n
    \n
  • \n

    The key ID or key ARN of a KMS key with no key material. Its Origin must\n be EXTERNAL.

    \n

    To create a KMS key with no key material, call CreateKey and set the\n value of its Origin parameter to EXTERNAL. To get the\n Origin of a KMS key, call DescribeKey.)

    \n
  • \n
  • \n

    The encrypted key material. To get the public key to encrypt the key material, call\n GetParametersForImport.

    \n
  • \n
  • \n

    The import token that GetParametersForImport returned. You must use\n a public key and token from the same GetParametersForImport response.

    \n
  • \n
  • \n

    Whether the key material expires and if so, when. If you set an expiration date, KMS\n deletes the key material from the KMS key on the specified date, and the KMS key becomes\n unusable. To use the KMS key again, you must reimport the same key material. The only way\n to change an expiration date is by reimporting the same key material and specifying a new\n expiration date.

    \n
  • \n
\n

When this operation is successful, the key state of the KMS key changes from\n PendingImport to Enabled, and you can use the KMS key.

\n

If this operation fails, use the exception to help determine the problem. If the error is\n related to the key material, the import token, or wrapping key, use GetParametersForImport to get a new public key and import token for the KMS key\n and repeat the import procedure. For help, see How To Import Key\n Material in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:ImportKeyMaterial (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Imports key material into an existing symmetric encryption KMS key that was created\n without key material. After you successfully import key material into a KMS key, you can\n reimport\n the same key material into that KMS key, but you cannot import different key\n material.

\n

You cannot perform this operation on an asymmetric KMS key, an HMAC KMS key, or on any KMS key in a different Amazon Web Services account. For more information about creating KMS keys with no key material\n and then importing key material, see Importing Key Material in the\n Key Management Service Developer Guide.

\n

Before using this operation, call GetParametersForImport. Its response\n includes a public key and an import token. Use the public key to encrypt the key material.\n Then, submit the import token from the same GetParametersForImport\n response.

\n

When calling this operation, you must specify the following values:

\n
    \n
  • \n

    The key ID or key ARN of a KMS key with no key material. Its Origin must\n be EXTERNAL.

    \n

    To create a KMS key with no key material, call CreateKey and set the\n value of its Origin parameter to EXTERNAL. To get the\n Origin of a KMS key, call DescribeKey.)

    \n
  • \n
  • \n

    The encrypted key material. To get the public key to encrypt the key material, call\n GetParametersForImport.

    \n
  • \n
  • \n

    The import token that GetParametersForImport returned. You must use\n a public key and token from the same GetParametersForImport response.

    \n
  • \n
  • \n

    Whether the key material expires and if so, when. If you set an expiration date, KMS\n deletes the key material from the KMS key on the specified date, and the KMS key becomes\n unusable. To use the KMS key again, you must reimport the same key material. The only way\n to change an expiration date is by reimporting the same key material and specifying a new\n expiration date.

    \n
  • \n
\n

When this operation is successful, the key state of the KMS key changes from\n PendingImport to Enabled, and you can use the KMS key.

\n

If this operation fails, use the exception to help determine the problem. If the error is\n related to the key material, the import token, or wrapping key, use GetParametersForImport to get a new public key and import token for the KMS key\n and repeat the import procedure. For help, see How To Import Key\n Material in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n\n

\n Required permissions: kms:ImportKeyMaterial (key policy)

\n

\n Related operations:\n

\n " } }, "com.amazonaws.kms#ImportKeyMaterialRequest": { @@ -2917,7 +2917,7 @@ "KeyId": { "target": "com.amazonaws.kms#KeyIdType", "traits": { - "smithy.api#documentation": "

The identifier of the symmetric encryption KMS key that receives the imported key\n material. This must be the same KMS key specified in the KeyID parameter of the\n corresponding GetParametersForImport request. The Origin of the\n KMS key must be EXTERNAL. You cannot perform this operation on an asymmetric KMS\n key, an HMAC KMS key, a KMS key in a custom key store, or on a KMS key in a different\n Amazon Web Services account

\n

Specify the key ID or key ARN of the KMS key.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

", + "smithy.api#documentation": "

The identifier of the symmetric encryption KMS key that receives the imported key\n material. This must be the same KMS key specified in the KeyID parameter of the corresponding GetParametersForImport request. The Origin of the\n KMS key must be EXTERNAL. You cannot perform this operation on an asymmetric KMS\n key, an HMAC KMS key, a KMS key in a custom key store, or on a KMS key in a different\n Amazon Web Services account

\n

Specify the key ID or key ARN of the KMS key.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

", "smithy.api#required": {} } }, @@ -2965,7 +2965,7 @@ "code": "IncorrectKeyException", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The request was rejected because the specified KMS key cannot decrypt the data. The\n KeyId in a Decrypt request and the SourceKeyId\n in a ReEncrypt request must identify the same KMS key that was used to\n encrypt the ciphertext.

", + "smithy.api#documentation": "

The request was rejected because the specified KMS key cannot decrypt the data. The\n KeyId in a Decrypt request and the SourceKeyId\n in a ReEncrypt request must identify the same KMS key that was used to\n encrypt the ciphertext.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -3118,7 +3118,7 @@ "code": "InvalidKeyUsage", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The request was rejected for one of the following reasons:

\n
    \n
  • \n

    The KeyUsage value of the KMS key is incompatible with the API\n operation.

    \n
  • \n
  • \n

    The encryption algorithm or signing algorithm specified for the operation is\n incompatible with the type of key material in the KMS key (KeySpec).

    \n
  • \n
\n

For encrypting, decrypting, re-encrypting, and generating data keys, the\n KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying\n messages, the KeyUsage must be SIGN_VERIFY. For generating and\n verifying message authentication codes (MACs), the KeyUsage must be\n GENERATE_VERIFY_MAC. To find the KeyUsage of a KMS key, use the\n DescribeKey operation.

\n

To find the encryption or signing algorithms supported for a particular KMS key, use the\n DescribeKey operation.

", + "smithy.api#documentation": "

The request was rejected for one of the following reasons:

\n
    \n
  • \n

    The KeyUsage value of the KMS key is incompatible with the API\n operation.

    \n
  • \n
  • \n

    The encryption algorithm or signing algorithm specified for the operation is\n incompatible with the type of key material in the KMS key (KeySpec).

    \n
  • \n
\n

For encrypting, decrypting, re-encrypting, and generating data keys, the\n KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying\n messages, the KeyUsage must be SIGN_VERIFY. For generating and\n verifying message authentication codes (MACs), the KeyUsage must be\n GENERATE_VERIFY_MAC. To find the KeyUsage of\n a KMS key, use the DescribeKey operation.

\n

To find the encryption or signing algorithms supported for a particular KMS key, use the\n DescribeKey operation.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -4346,7 +4346,7 @@ "Policy": { "target": "com.amazonaws.kms#PolicyType", "traits": { - "smithy.api#documentation": "

The key policy to attach to the KMS key.

\n

The key policy must meet the following criteria:

\n
    \n
  • \n

    If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy\n must allow the principal that is making the PutKeyPolicy request to make a\n subsequent PutKeyPolicy request on the KMS key. This reduces the risk that\n the KMS key becomes unmanageable. For more information, refer to the scenario in the\n Default Key Policy section of the Key Management Service Developer Guide.

    \n
  • \n
  • \n

    Each statement in the key policy must contain one or more principals. The principals\n in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services\n principal (for example, an IAM user or role), you might need to enforce a delay before\n including the new principal in a key policy because the new principal might not be\n immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services\n Identity and Access Management User Guide.

    \n
  • \n
\n

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the\n Key Management Service Developer Guide.

", + "smithy.api#documentation": "

The key policy to attach to the KMS key.

\n

The key policy must meet the following criteria:

\n
    \n
  • \n

    If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy\n must allow the principal that is making the PutKeyPolicy request to make a\n subsequent PutKeyPolicy request on the KMS key. This reduces the risk that\n the KMS key becomes unmanageable. For more information, refer to the scenario in the\n Default Key Policy section of the Key Management Service Developer Guide.

    \n
  • \n
  • \n

    Each statement in the key policy must contain one or more principals. The principals\n in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services\n principal (for example, an IAM user or role), you might need to enforce a delay before\n including the new principal in a key policy because the new principal might not be\n immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services\n Identity and Access Management User Guide.

    \n
  • \n
\n \n

A key policy document must conform to the following rules.

\n
    \n
  • \n

    Up to 32 kilobytes (32768 bytes)

    \n
  • \n
  • \n

    Must be UTF-8 encoded

    \n
  • \n
  • \n

    The only Unicode characters that are permitted in a key policy document are the horizontal tab (U+0009), linefeed (U+000A), carriage return (U+000D), and characters in the range U+0020 to U+00FF.

    \n
  • \n
  • \n

    The Sid element in a key policy statement can include spaces. (Spaces are\n prohibited in the Sid element of an IAM policy document.)

    \n
  • \n
", "smithy.api#required": {} } }, @@ -4421,7 +4421,7 @@ "SourceKeyId": { "target": "com.amazonaws.kms#KeyIdType", "traits": { - "smithy.api#documentation": "

Specifies the KMS key that KMS will use to decrypt the ciphertext before it is\n re-encrypted.

\n

Enter a key ID of the KMS key that was used to encrypt the ciphertext. If you identify a different KMS key, the ReEncrypt operation throws an IncorrectKeyException.

\n

This parameter is required only when the ciphertext was encrypted under an asymmetric KMS\n key. If you used a symmetric encryption KMS key, KMS can get the KMS key from metadata that\n it adds to the symmetric ciphertext blob. However, it is always recommended as a best\n practice. This practice ensures that you use the KMS key that you intend.

\n \n

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

" + "smithy.api#documentation": "

Specifies the KMS key that KMS will use to decrypt the ciphertext before it is\n re-encrypted.

\n

Enter a key ID of the KMS key that was used to encrypt the ciphertext. If you identify a different KMS key, the ReEncrypt operation throws an IncorrectKeyException.

\n

This parameter is required only when the ciphertext was encrypted under an asymmetric KMS\n key. If you used a symmetric encryption KMS key, KMS can get the KMS key from metadata that it adds to\n the symmetric ciphertext blob. However, it is always recommended as a best practice. This\n practice ensures that you use the KMS key that you intend.

\n \n

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
\n

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

" } }, "DestinationKeyId": { @@ -4566,7 +4566,7 @@ "Policy": { "target": "com.amazonaws.kms#PolicyType", "traits": { - "smithy.api#documentation": "

The key policy to attach to the KMS key. This parameter is optional. If you do not provide\n a key policy, KMS attaches the default key policy to the\n KMS key.

\n

The key policy is not a shared property of multi-Region keys. You can specify the same key\n policy or a different key policy for each key in a set of related multi-Region keys. KMS\n does not synchronize this property.

\n

If you provide a key policy, it must meet the following criteria:

\n
    \n
  • \n

    If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy\n must give the caller kms:PutKeyPolicy permission on the replica key. This\n reduces the risk that the KMS key becomes unmanageable. For more information, refer to the\n scenario in the Default Key Policy section of the \n Key Management Service Developer Guide\n .

    \n
  • \n
  • \n

    Each statement in the key policy must contain one or more principals. The principals\n in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services\n principal (for example, an IAM user or role), you might need to enforce a delay before\n including the new principal in a key policy because the new principal might not be\n immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the\n \n Identity and Access Management User Guide\n .

    \n
  • \n
  • \n

    The key policy size quota is 32 kilobytes (32768 bytes).

    \n
  • \n
" + "smithy.api#documentation": "

The key policy to attach to the KMS key. This parameter is optional. If you do not provide\n a key policy, KMS attaches the default key policy to the\n KMS key.

\n

The key policy is not a shared property of multi-Region keys. You can specify the same key\n policy or a different key policy for each key in a set of related multi-Region keys. KMS\n does not synchronize this property.

\n

If you provide a key policy, it must meet the following criteria:

\n
    \n
  • \n

    If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy\n must give the caller kms:PutKeyPolicy permission on the replica key. This\n reduces the risk that the KMS key becomes unmanageable. For more information, refer to the\n scenario in the Default Key Policy section of the \n Key Management Service Developer Guide\n .

    \n
  • \n
  • \n

    Each statement in the key policy must contain one or more principals. The principals\n in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services\n principal (for example, an IAM user or role), you might need to enforce a delay before\n including the new principal in a key policy because the new principal might not be\n immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the\n \n Identity and Access Management User Guide\n .

    \n
  • \n
\n \n \n

A key policy document must conform to the following rules.

\n
    \n
  • \n

    Up to 32 kilobytes (32768 bytes)

    \n
  • \n
  • \n

    Must be UTF-8 encoded

    \n
  • \n
  • \n

    The only Unicode characters that are permitted in a key policy document are the horizontal tab (U+0009), linefeed (U+000A), carriage return (U+000D), and characters in the range U+0020 to U+00FF.

    \n
  • \n
  • \n

    The Sid element in a key policy statement can include spaces. (Spaces are\n prohibited in the Sid element of an IAM policy document.)

    \n
  • \n
" } }, "BypassPolicyLockoutSafetyCheck": { @@ -4763,7 +4763,7 @@ "PendingWindowInDays": { "target": "com.amazonaws.kms#PendingWindowInDaysType", "traits": { - "smithy.api#documentation": "

The waiting period, specified in number of days. After the waiting period ends, KMS\n deletes the KMS key.

\n

If the KMS key is a multi-Region primary key with replicas, the waiting period begins when\n the last of its replica keys is deleted. Otherwise, the waiting period begins\n immediately.

\n

This value is optional. If you include a value, it must be between 7 and 30, inclusive. If\n you do not include a value, it defaults to 30.

" + "smithy.api#documentation": "

The waiting period, specified in number of days. After the waiting period ends, KMS\n deletes the KMS key.

\n

If the KMS key is a multi-Region primary key with replica keys, the waiting period begins when\n the last of its replica keys is deleted. Otherwise, the waiting period begins\n immediately.

\n

This value is optional. If you include a value, it must be between 7 and 30, inclusive. If\n you do not include a value, it defaults to 30.

" } } } @@ -4832,7 +4832,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a digital\n signature for a message or message digest by using the private key in an asymmetric\n signing KMS key. To verify the signature, use the Verify operation, or use\n the public key in the same asymmetric KMS key outside of KMS. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

Digital signatures are generated and verified by using asymmetric key pair, such as an RSA\n or ECC pair that is represented by an asymmetric KMS key. The key owner (or an authorized\n user) uses their private key to sign a message. Anyone with the public key can verify that the\n message was signed with that particular private key and that the message hasn't changed since\n it was signed.

\n

To use the Sign operation, provide the following information:

\n
    \n
  • \n

    Use the KeyId parameter to identify an asymmetric KMS key with a\n KeyUsage value of SIGN_VERIFY. To get the\n KeyUsage value of a KMS key, use the DescribeKey\n operation. The caller must have kms:Sign permission on the KMS key.

    \n
  • \n
  • \n

    Use the Message parameter to specify the message or message digest to\n sign. You can submit messages of up to 4096 bytes. To sign a larger message, generate a\n hash digest of the message, and then provide the hash digest in the Message\n parameter. To indicate whether the message is a full message or a digest, use the\n MessageType parameter.

    \n
  • \n
  • \n

    Choose a signing algorithm that is compatible with the KMS key.

    \n
  • \n
\n \n

When signing a message, be sure to record the KMS key and the signing algorithm. This\n information is required to verify the signature.

\n
\n

To verify the signature that this operation generates, use the Verify\n operation. Or use the GetPublicKey operation to download the public key and\n then use the public key to verify the signature outside of KMS.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:Sign (key policy)

\n

\n Related operations: Verify\n

" + "smithy.api#documentation": "

Creates a digital\n signature for a message or message digest by using the private key in an asymmetric\n signing KMS key. To verify the signature, use the Verify operation, or use the\n public key in the same asymmetric KMS key outside of KMS. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

Digital signatures are generated and verified by using asymmetric key pair, such as an RSA\n or ECC pair that is represented by an asymmetric KMS key. The key owner (or an authorized\n user) uses their private key to sign a message. Anyone with the public key can verify that the\n message was signed with that particular private key and that the message hasn't changed since\n it was signed.

\n

To use the Sign operation, provide the following information:

\n
    \n
  • \n

    Use the KeyId parameter to identify an asymmetric KMS key with a\n KeyUsage value of SIGN_VERIFY. To get the\n KeyUsage value of a KMS key, use the DescribeKey\n operation. The caller must have kms:Sign permission on the KMS key.

    \n
  • \n
  • \n

    Use the Message parameter to specify the message or message digest to\n sign. You can submit messages of up to 4096 bytes. To sign a larger message, generate a\n hash digest of the message, and then provide the hash digest in the Message\n parameter. To indicate whether the message is a full message or a digest, use the\n MessageType parameter.

    \n
  • \n
  • \n

    Choose a signing algorithm that is compatible with the KMS key.

    \n
  • \n
\n \n

When signing a message, be sure to record the KMS key and the signing algorithm. This\n information is required to verify the signature.

\n
\n \n

Best practices recommend that you limit the time during which any signature is effective. This deters an attack where the actor uses a signed\n message to establish validity repeatedly or long after the message is superseded. Signatures do not include a timestamp, but you can include a timestamp in the signed message\n to help you detect when its time to refresh the signature.

\n
\n

To verify the signature that this operation generates, use the Verify\n operation. Or use the GetPublicKey operation to download the public key and\n then use the public key to verify the signature outside of KMS.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n\n

\n Required permissions: kms:Sign (key policy)

\n

\n Related operations: Verify\n

" } }, "com.amazonaws.kms#SignRequest": { @@ -5079,7 +5079,7 @@ "name": "kms" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Key Management Service\n

Key Management Service (KMS) is an encryption and key management web service. This guide describes\n the KMS operations that you can call programmatically. For general information about KMS,\n see the \n Key Management Service Developer Guide\n .

\n \n

KMS is replacing the term customer master key (CMK) with KMS key and KMS key. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.

\n

Amazon Web Services provides SDKs that consist of libraries and sample code for various programming\n languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a\n convenient way to create programmatic access to KMS and other Amazon Web Services services. For example,\n the SDKs take care of tasks such as signing requests (see below), managing errors, and\n retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to\n download and install them, see Tools for Amazon Web\n Services.

\n
\n

We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.

\n

If you need to use FIPS 140-2 validated cryptographic modules when communicating with\n Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the\n available FIPS endpoints, see Service endpoints in the Key Management Service topic of the Amazon Web Services General Reference.

\n

Clients must support TLS (Transport Layer Security) 1.0. We recommend TLS 1.2. Clients\n must also support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral\n Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems\n such as Java 7 and later support these modes.

\n

\n Signing Requests\n

\n

Requests must be signed by using an access key ID and a secret access key. We strongly\n recommend that you do not use your Amazon Web Services account (root) access key ID and\n secret key for everyday work with KMS. Instead, use the access key ID and secret access key\n for an IAM user. You can also use the Amazon Web Services Security Token Service to generate temporary\n security credentials that you can use to sign requests.

\n

All KMS operations require Signature Version 4.

\n

\n Logging API Requests\n

\n

KMS supports CloudTrail, a service that logs Amazon Web Services API calls and related events for your\n Amazon Web Services account and delivers them to an Amazon S3 bucket that you specify. By using the\n information collected by CloudTrail, you can determine what requests were made to KMS, who made\n the request, when it was made, and so on. To learn more about CloudTrail, including how to turn it\n on and find your log files, see the CloudTrail User Guide.

\n

\n Additional Resources\n

\n

For more information about credentials and request signing, see the following:

\n \n

\n Commonly Used API Operations\n

\n

Of the API operations discussed in this guide, the following will prove the most useful\n for most applications. You will likely perform operations other than these, such as creating\n keys and assigning policies, by using the console.

\n ", + "smithy.api#documentation": "Key Management Service\n

Key Management Service (KMS) is an encryption and key management web service. This guide describes\n the KMS operations that you can call programmatically. For general information about KMS,\n see the \n Key Management Service Developer Guide\n .

\n \n

KMS is replacing the term customer master key (CMK) with KMS key and KMS key. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.

\n

Amazon Web Services provides SDKs that consist of libraries and sample code for various programming\n languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a\n convenient way to create programmatic access to KMS and other Amazon Web Services services. For example,\n the SDKs take care of tasks such as signing requests (see below), managing errors, and\n retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to\n download and install them, see Tools for Amazon Web\n Services.

\n
\n

We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.

\n

If you need to use FIPS 140-2 validated cryptographic modules when communicating with\n Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the\n available FIPS endpoints, see Service endpoints in the Key Management Service topic of the Amazon Web Services General Reference.

\n

All KMS API calls must be signed and be transmitted using Transport Layer Security (TLS). \n KMS recommends you always use the latest supported TLS version. Clients\n must also support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral\n Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems\n such as Java 7 and later support these modes.

\n

\n Signing Requests\n

\n

Requests must be signed by using an access key ID and a secret access key. We strongly\n recommend that you do not use your Amazon Web Services account (root) access key ID and\n secret key for everyday work with KMS. Instead, use the access key ID and secret access key\n for an IAM user. You can also use the Amazon Web Services Security Token Service to generate temporary\n security credentials that you can use to sign requests.

\n

All KMS operations require Signature Version 4.

\n

\n Logging API Requests\n

\n

KMS supports CloudTrail, a service that logs Amazon Web Services API calls and related events for your\n Amazon Web Services account and delivers them to an Amazon S3 bucket that you specify. By using the\n information collected by CloudTrail, you can determine what requests were made to KMS, who made\n the request, when it was made, and so on. To learn more about CloudTrail, including how to turn it\n on and find your log files, see the CloudTrail User Guide.

\n

\n Additional Resources\n

\n

For more information about credentials and request signing, see the following:

\n \n

\n Commonly Used API Operations\n

\n

Of the API operations discussed in this guide, the following will prove the most useful\n for most applications. You will likely perform operations other than these, such as creating\n keys and assigning policies, by using the console.

\n ", "smithy.api#title": "AWS Key Management Service", "smithy.api#xmlNamespace": { "uri": "https://trent.amazonaws.com/doc/2014-11-01/" diff --git a/aws/sdk/aws-models/lambda.json b/aws/sdk/aws-models/lambda.json index 3a2f7bc0eae..df2327634db 100644 --- a/aws/sdk/aws-models/lambda.json +++ b/aws/sdk/aws-models/lambda.json @@ -1168,7 +1168,7 @@ "BatchSize": { "target": "com.amazonaws.lambda#BatchSize", "traits": { - "smithy.api#documentation": "

The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).

\n
    \n
  • \n

    \n Amazon Kinesis - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon DynamoDB Streams - Default 100. Max 1,000.

    \n
  • \n
  • \n

    \n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

    \n
  • \n
  • \n

    \n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Self-Managed Apache Kafka - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.

    \n
  • \n
" + "smithy.api#documentation": "

The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).

\n
    \n
  • \n

    \n Amazon Kinesis - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon DynamoDB Streams - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

    \n
  • \n
  • \n

    \n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Self-Managed Apache Kafka - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.

    \n
  • \n
" } }, "FilterCriteria": { @@ -1577,6 +1577,9 @@ "input": { "target": "com.amazonaws.lambda#DeleteAliasRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -1721,6 +1724,9 @@ "input": { "target": "com.amazonaws.lambda#DeleteFunctionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -1752,6 +1758,9 @@ "input": { "target": "com.amazonaws.lambda#DeleteFunctionCodeSigningConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#CodeSigningConfigNotFoundException" @@ -1799,6 +1808,9 @@ "input": { "target": "com.amazonaws.lambda#DeleteFunctionConcurrencyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -1843,6 +1855,9 @@ "input": { "target": "com.amazonaws.lambda#DeleteFunctionEventInvokeConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -1914,6 +1929,9 @@ "input": { "target": "com.amazonaws.lambda#DeleteFunctionUrlConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#ResourceConflictException" @@ -1962,6 +1980,9 @@ "input": { "target": "com.amazonaws.lambda#DeleteLayerVersionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#ServiceException" @@ -2005,6 +2026,9 @@ "input": { "target": "com.amazonaws.lambda#DeleteProvisionedConcurrencyConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -2518,7 +2542,7 @@ "FunctionResponseTypes": { "target": "com.amazonaws.lambda#FunctionResponseTypeList", "traits": { - "smithy.api#documentation": "

(Streams only) A list of current response type enums applied to the event source mapping.

" + "smithy.api#documentation": "

(Streams and Amazon SQS) A list of current response type enums applied to the event source mapping.

" } } }, @@ -7110,6 +7134,9 @@ "input": { "target": "com.amazonaws.lambda#RemoveLayerVersionPermissionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -7177,6 +7204,9 @@ "input": { "target": "com.amazonaws.lambda#RemovePermissionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -7383,6 +7413,10 @@ "value": "nodejs14.x", "name": "nodejs14x" }, + { + "value": "nodejs16.x", + "name": "nodejs16x" + }, { "value": "java8", "name": "java8" @@ -7789,6 +7823,9 @@ "input": { "target": "com.amazonaws.lambda#TagResourceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -8027,6 +8064,9 @@ "input": { "target": "com.amazonaws.lambda#UntagResourceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.lambda#InvalidParameterValueException" @@ -8290,7 +8330,7 @@ "BatchSize": { "target": "com.amazonaws.lambda#BatchSize", "traits": { - "smithy.api#documentation": "

The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).

\n
    \n
  • \n

    \n Amazon Kinesis - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon DynamoDB Streams - Default 100. Max 1,000.

    \n
  • \n
  • \n

    \n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

    \n
  • \n
  • \n

    \n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Self-Managed Apache Kafka - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.

    \n
  • \n
" + "smithy.api#documentation": "

The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).

\n
    \n
  • \n

    \n Amazon Kinesis - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon DynamoDB Streams - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

    \n
  • \n
  • \n

    \n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Self-Managed Apache Kafka - Default 100. Max 10,000.

    \n
  • \n
  • \n

    \n Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.

    \n
  • \n
" } }, "FilterCriteria": { diff --git a/aws/sdk/aws-models/lightsail.json b/aws/sdk/aws-models/lightsail.json index 595901aa36e..a048a8afa8c 100644 --- a/aws/sdk/aws-models/lightsail.json +++ b/aws/sdk/aws-models/lightsail.json @@ -2344,6 +2344,12 @@ "traits": { "smithy.api#documentation": "

The publicly accessible URL of the container service.

\n\n

If no public endpoint is specified in the currentDeployment, this URL returns\n a 404 response.

" } + }, + "privateRegistryAccess": { + "target": "com.amazonaws.lightsail#PrivateRegistryAccess", + "traits": { + "smithy.api#documentation": "

An object that describes the configuration for the container service to access private\n container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private\n repositories.

\n\n

For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.

" + } } }, "traits": { @@ -2437,6 +2443,40 @@ ] } }, + "com.amazonaws.lightsail#ContainerServiceECRImagePullerRole": { + "type": "structure", + "members": { + "isActive": { + "target": "com.amazonaws.lightsail#boolean", + "traits": { + "smithy.api#documentation": "

A Boolean value that indicates whether the role is activated.

" + } + }, + "principalArn": { + "target": "com.amazonaws.lightsail#string", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role, if it is activated.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the activation status of the role that you can use to grant an Amazon Lightsail container service access to Amazon Elastic Container Registry (Amazon ECR)\n private repositories.

\n\n

When activated, Lightsail creates an Identity and Access Management (IAM) role\n for the specified Lightsail container service. You can use the ARN of the role to create a\n trust relationship between your Lightsail container service and an Amazon ECR private repository in your Amazon Web Services account. This allows your container\n service to pull images from Amazon ECR private repositories. For more information, see\n Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.

" + } + }, + "com.amazonaws.lightsail#ContainerServiceECRImagePullerRoleRequest": { + "type": "structure", + "members": { + "isActive": { + "target": "com.amazonaws.lightsail#boolean", + "traits": { + "smithy.api#documentation": "

A Boolean value that indicates whether to activate the role.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a request to activate or deactivate the role that you can use to grant an\n Amazon Lightsail container service access to Amazon Elastic Container Registry (Amazon ECR) private repositories.

\n\n

When activated, Lightsail creates an Identity and Access Management (IAM) role\n for the specified Lightsail container service. You can use the ARN of the role to create a\n trust relationship between your Lightsail container service and an Amazon ECR private repository in your Amazon Web Services account. This allows your container\n service to pull images from Amazon ECR private repositories. For more information, see\n Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.

" + } + }, "com.amazonaws.lightsail#ContainerServiceEndpoint": { "type": "structure", "members": { @@ -3511,6 +3551,12 @@ "traits": { "smithy.api#documentation": "

An object that describes a deployment for the container service.

\n\n

A deployment specifies the containers that will be launched on the container service and\n their settings, such as the ports to open, the environment variables to apply, and the launch\n command to run. It also specifies the container that will serve as the public endpoint of the\n deployment and its settings, such as the HTTP or HTTPS port to use, and the health check\n configuration.

" } + }, + "privateRegistryAccess": { + "target": "com.amazonaws.lightsail#PrivateRegistryAccessRequest", + "traits": { + "smithy.api#documentation": "

An object to describe the configuration for the container service to access private\n container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private\n repositories.

\n\n

For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.

" + } } } }, @@ -7929,7 +7975,7 @@ "includeInactive": { "target": "com.amazonaws.lightsail#boolean", "traits": { - "smithy.api#documentation": "

A Boolean value indicating whether to include inactive results in your request.

" + "smithy.api#documentation": "

A Boolean value that indicates whether to include inactive (unavailable) blueprints in the\n response of your request.

" } }, "pageToken": { @@ -8051,7 +8097,7 @@ "includeInactive": { "target": "com.amazonaws.lightsail#boolean", "traits": { - "smithy.api#documentation": "

A Boolean value that indicates whether to include inactive (unavailable) bundles in the\n response.

" + "smithy.api#documentation": "

A Boolean value that indicates whether to include inactive (unavailable) bundles in the\n response of your request.

" } } } @@ -8284,7 +8330,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the list of bundles that are available for purchase. A bundle describes the specs\n for your virtual private server (or instance).

", + "smithy.api#documentation": "

Returns the bundles that you can apply to an Amazon Lightsail instance when you create\n it.

\n\n

A bundle describes the specifications of an instance, such as the monthly cost, amount of\n memory, the number of vCPUs, amount of storage space, and monthly network data transfer\n quota.

\n\n \n

Bundles are referred to as instance plans in the Lightsail\n console.

\n
", "smithy.api#http": { "method": "POST", "uri": "/ls/api/2016-11-28/GetBundles", @@ -8298,7 +8344,7 @@ "includeInactive": { "target": "com.amazonaws.lightsail#boolean", "traits": { - "smithy.api#documentation": "

A Boolean value that indicates whether to include inactive bundle results in your\n request.

" + "smithy.api#documentation": "

A Boolean value that indicates whether to include inactive (unavailable) bundles in the\n response of your request.

" } }, "pageToken": { @@ -11245,6 +11291,12 @@ "traits": { "smithy.api#documentation": "

The token to advance to the next page of results from your request.

\n

To get a page token, perform an initial GetRelationalDatabaseBundles request.\n If your results are paginated, the response will return a next page token that you can specify\n as the page token in a subsequent request.

" } + }, + "includeInactive": { + "target": "com.amazonaws.lightsail#boolean", + "traits": { + "smithy.api#documentation": "

A Boolean value that indicates whether to include inactive (unavailable) bundles in the\n response of your request.

" + } } } }, @@ -16009,6 +16061,34 @@ ] } }, + "com.amazonaws.lightsail#PrivateRegistryAccess": { + "type": "structure", + "members": { + "ecrImagePullerRole": { + "target": "com.amazonaws.lightsail#ContainerServiceECRImagePullerRole", + "traits": { + "smithy.api#documentation": "

An object that describes the activation status of the role that you can use to grant a\n Lightsail container service access to Amazon ECR private\n repositories. If the role is activated, the Amazon Resource Name (ARN) of the role is also\n listed.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the configuration for an Amazon Lightsail container service to\n access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.

\n\n

For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.

" + } + }, + "com.amazonaws.lightsail#PrivateRegistryAccessRequest": { + "type": "structure", + "members": { + "ecrImagePullerRole": { + "target": "com.amazonaws.lightsail#ContainerServiceECRImagePullerRoleRequest", + "traits": { + "smithy.api#documentation": "

An object to describe a request to activate or deactivate the role that you can use to\n grant an Amazon Lightsail container service access to Amazon Elastic Container Registry\n (Amazon ECR) private repositories.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a request to configure an Amazon Lightsail container service to\n access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.

\n\n

For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.

" + } + }, "com.amazonaws.lightsail#PutAlarm": { "type": "operation", "input": { @@ -18730,6 +18810,12 @@ "traits": { "smithy.api#documentation": "

The public domain names to use with the container service, such as\n example.com and www.example.com.

\n\n

You can specify up to four public domain names for a container service. The domain names\n that you specify are used when you create a deployment with a container configured as the\n public endpoint of your container service.

\n\n

If you don't specify public domain names, then you can use the default domain of the\n container service.

\n\n \n

You must create and validate an SSL/TLS certificate before you can use public domain\n names with your container service. Use the CreateCertificate action to create a\n certificate for the public domain names you want to use with your container service.

\n
\n\n

You can specify public domain names using a string to array map as shown in the example\n later on this page.

" } + }, + "privateRegistryAccess": { + "target": "com.amazonaws.lightsail#PrivateRegistryAccessRequest", + "traits": { + "smithy.api#documentation": "

An object to describe the configuration for the container service to access private\n container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private\n repositories.

\n\n

For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide.

" + } } } }, diff --git a/aws/sdk/aws-models/logs.json b/aws/sdk/aws-models/logs.json index d29784bab3c..b1c88ea1e07 100644 --- a/aws/sdk/aws-models/logs.json +++ b/aws/sdk/aws-models/logs.json @@ -45,6 +45,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#AssociateKmsKeyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -87,6 +90,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#CancelExportTaskRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidOperationException" @@ -146,7 +152,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an export task, which allows you to efficiently export data from a\n log group to an Amazon S3 bucket. When you perform a CreateExportTask\n operation, you must use credentials that have permission to write to the S3 bucket \n that you specify as the destination.

\n

This is an asynchronous call. If all the required information is provided, this \n operation initiates an export task and responds with the ID of the task. After the task has started,\n you can use DescribeExportTasks to get the status of the export task. Each account can\n only have one active (RUNNING or PENDING) export task at a time.\n To cancel an export task, use CancelExportTask.

\n

You can export logs from multiple log groups or multiple time ranges to the same S3\n bucket. To separate out log data for each export task, you can specify a prefix to be used as\n the Amazon S3 key prefix for all exported objects.

\n

Exporting to S3 buckets that are encrypted with AES-256 is supported. Exporting to S3 buckets \n encrypted with SSE-KMS is not supported.

" + "smithy.api#documentation": "

Creates an export task, which allows you to efficiently export data from a\n log group to an Amazon S3 bucket. When you perform a CreateExportTask\n operation, you must use credentials that have permission to write to the S3 bucket \n that you specify as the destination.

\n \n

Exporting log data to Amazon S3 buckets that are encrypted by KMS is not \n supported. Exporting\n log data to Amazon S3 buckets that have S3 Object Lock enabled with a retention period is not supported.

\n

Exporting to S3 buckets that are encrypted with AES-256 is supported.

\n
\n

This is an asynchronous call. If all the required information is provided, this \n operation initiates an export task and responds with the ID of the task. After the task has started,\n you can use DescribeExportTasks to get the status of the export task. Each account can\n only have one active (RUNNING or PENDING) export task at a time.\n To cancel an export task, use CancelExportTask.

\n

You can export logs from multiple log groups or multiple time ranges to the same S3\n bucket. To separate out log data for each export task, you can specify a prefix to be used as\n the Amazon S3 key prefix for all exported objects.

\n \n \n

Time-based sorting on chunks of log data inside an exported file is not guaranteed. You can sort the \n exported log fild data by using Linux utilities.

\n
" } }, "com.amazonaws.cloudwatchlogs#CreateExportTaskRequest": { @@ -181,7 +187,7 @@ "to": { "target": "com.amazonaws.cloudwatchlogs#Timestamp", "traits": { - "smithy.api#documentation": "

The end time of the range for the request, expreswatchlogsdocused as the number of milliseconds\n after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not\n exported.

", + "smithy.api#documentation": "

The end time of the range for the request, expressed as the number of milliseconds\n after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not\n exported.

", "smithy.api#required": {} } }, @@ -216,6 +222,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#CreateLogGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -266,6 +275,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#CreateLogStreamRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -322,7 +334,7 @@ "type": "integer", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "

The number of days to retain the log events in the specified log group.\n Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.

\n

To set a log group to never have log events expire, use\n DeleteRetentionPolicy.\n

" + "smithy.api#documentation": "

The number of days to retain the log events in the specified log group.\n Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 2192, 2557, 2922, 3288, and 3653.

\n

To set a log group to never have log events expire, use\n DeleteRetentionPolicy.\n

" } }, "com.amazonaws.cloudwatchlogs#DefaultValue": { @@ -336,6 +348,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#DeleteDestinationRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -371,6 +386,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#DeleteLogGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -406,6 +424,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#DeleteLogStreamRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -448,6 +469,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#DeleteMetricFilterRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -536,6 +560,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#DeleteResourcePolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -567,6 +594,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#DeleteRetentionPolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -602,6 +632,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#DeleteSubscriptionFilterRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -836,7 +869,7 @@ "logGroups": { "target": "com.amazonaws.cloudwatchlogs#LogGroups", "traits": { - "smithy.api#documentation": "

The log groups.

\n

If the retentionInDays value if not included for a log group, then that log group\n is set to have its events never expire.

" + "smithy.api#documentation": "

The log groups.

\n

If the retentionInDays value is not included for a log group, then that log group\n is set to have its events never expire.

" } }, "nextToken": { @@ -1361,6 +1394,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#DisassociateKmsKeyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -2419,6 +2455,24 @@ }, "com.amazonaws.cloudwatchlogs#Logs_20140328": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "CloudWatch Logs", + "arnNamespace": "logs", + "cloudFormationName": "Logs", + "cloudTrailEventSource": "cloudwatchlogs.amazonaws.com", + "endpointPrefix": "logs" + }, + "aws.auth#sigv4": { + "name": "logs" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from\n EC2 instances, CloudTrail, and other sources. You can then retrieve the associated\n log data from CloudWatch Logs using the CloudWatch console, CloudWatch Logs commands in the\n Amazon Web Services CLI, CloudWatch Logs API, or CloudWatch Logs SDK.

\n

You can use CloudWatch Logs to:

\n
    \n
  • \n

    \n Monitor logs from EC2 instances in real-time: You\n can use CloudWatch Logs to monitor applications and systems using log data. For example,\n CloudWatch Logs can track the number of errors that occur in your application logs and\n send you a notification whenever the rate of errors exceeds a threshold that you specify.\n CloudWatch Logs uses your log data for monitoring so no code changes are required. For\n example, you can monitor application logs for specific literal terms (such as\n \"NullReferenceException\") or count the number of occurrences of a literal term at a\n particular position in log data (such as \"404\" status codes in an Apache access log). When\n the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch\n metric that you specify.

    \n
  • \n
  • \n

    \n Monitor CloudTrail logged events: You can\n create alarms in CloudWatch and receive notifications of particular API activity as\n captured by CloudTrail. You can use the notification to perform troubleshooting.

    \n
  • \n
  • \n

    \n Archive log data: You can use CloudWatch Logs to\n store your log data in highly durable storage. You can change the log retention setting so\n that any log events older than this setting are automatically deleted. The CloudWatch Logs\n agent makes it easy to quickly send both rotated and non-rotated log data off of a host\n and into the log service. You can then access the raw log data when you need it.

    \n
  • \n
", + "smithy.api#title": "Amazon CloudWatch Logs", + "smithy.api#xmlNamespace": { + "uri": "http://monitoring.amazonaws.com/doc/2014-03-28/" + } + }, "version": "2014-03-28", "operations": [ { @@ -2547,25 +2601,7 @@ { "target": "com.amazonaws.cloudwatchlogs#UntagLogGroup" } - ], - "traits": { - "aws.api#service": { - "sdkId": "CloudWatch Logs", - "arnNamespace": "logs", - "cloudFormationName": "Logs", - "cloudTrailEventSource": "cloudwatchlogs.amazonaws.com", - "endpointPrefix": "logs" - }, - "aws.auth#sigv4": { - "name": "logs" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from\n EC2 instances, CloudTrail, and other sources. You can then retrieve the associated\n log data from CloudWatch Logs using the CloudWatch console, CloudWatch Logs commands in the\n Amazon Web Services CLI, CloudWatch Logs API, or CloudWatch Logs SDK.

\n

You can use CloudWatch Logs to:

\n
    \n
  • \n

    \n Monitor logs from EC2 instances in real-time: You\n can use CloudWatch Logs to monitor applications and systems using log data. For example,\n CloudWatch Logs can track the number of errors that occur in your application logs and\n send you a notification whenever the rate of errors exceeds a threshold that you specify.\n CloudWatch Logs uses your log data for monitoring so no code changes are required. For\n example, you can monitor application logs for specific literal terms (such as\n \"NullReferenceException\") or count the number of occurrences of a literal term at a\n particular position in log data (such as \"404\" status codes in an Apache access log). When\n the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch\n metric that you specify.

    \n
  • \n
  • \n

    \n Monitor CloudTrail logged events: You can\n create alarms in CloudWatch and receive notifications of particular API activity as\n captured by CloudTrail. You can use the notification to perform troubleshooting.

    \n
  • \n
  • \n

    \n Archive log data: You can use CloudWatch Logs to\n store your log data in highly durable storage. You can change the log retention setting so\n that any log events older than this setting are automatically deleted. The CloudWatch Logs\n agent makes it easy to quickly send both rotated and non-rotated log data off of a host\n and into the log service. You can then access the raw log data when you need it.

    \n
  • \n
", - "smithy.api#title": "Amazon CloudWatch Logs", - "smithy.api#xmlNamespace": { - "uri": "http://monitoring.amazonaws.com/doc/2014-03-28/" - } - } + ] }, "com.amazonaws.cloudwatchlogs#MalformedQueryException": { "type": "structure", @@ -2765,7 +2801,7 @@ } }, "traits": { - "smithy.api#documentation": "

Multiple requests to update the same resource were in conflict.

", + "smithy.api#documentation": "

Multiple concurrent requests to update the same resource were in conflict.

", "smithy.api#error": "client" } }, @@ -2865,6 +2901,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#PutDestinationPolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -3028,6 +3067,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#PutMetricFilterRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -3206,6 +3248,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#PutRetentionPolicyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -3247,6 +3292,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#PutSubscriptionFilterRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -4065,6 +4113,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#TagLogGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" @@ -4219,6 +4270,9 @@ "input": { "target": "com.amazonaws.cloudwatchlogs#UntagLogGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.cloudwatchlogs#ResourceNotFoundException" diff --git a/aws/sdk/aws-models/lookoutmetrics.json b/aws/sdk/aws-models/lookoutmetrics.json index adcc54b2102..a644cd40935 100644 --- a/aws/sdk/aws-models/lookoutmetrics.json +++ b/aws/sdk/aws-models/lookoutmetrics.json @@ -728,6 +728,106 @@ "smithy.api#pattern": "^arn:([a-z\\d-]+):.*:.*:.*:.+$" } }, + "com.amazonaws.lookoutmetrics#AthenaDataCatalog": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$" + } + }, + "com.amazonaws.lookoutmetrics#AthenaDatabaseName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_]+$" + } + }, + "com.amazonaws.lookoutmetrics#AthenaS3ResultsPath": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^s3://[a-z0-9].+$" + } + }, + "com.amazonaws.lookoutmetrics#AthenaSourceConfig": { + "type": "structure", + "members": { + "RoleArn": { + "target": "com.amazonaws.lookoutmetrics#Arn", + "traits": { + "smithy.api#documentation": "

An IAM role that gives Amazon Lookout for Metrics permission to access the data.

" + } + }, + "DatabaseName": { + "target": "com.amazonaws.lookoutmetrics#AthenaDatabaseName", + "traits": { + "smithy.api#documentation": "

The database's name.

" + } + }, + "DataCatalog": { + "target": "com.amazonaws.lookoutmetrics#AthenaDataCatalog", + "traits": { + "smithy.api#documentation": "

The database's data catalog.

" + } + }, + "TableName": { + "target": "com.amazonaws.lookoutmetrics#AthenaTableName", + "traits": { + "smithy.api#documentation": "

The database's table name.

" + } + }, + "WorkGroupName": { + "target": "com.amazonaws.lookoutmetrics#AthenaWorkGroupName", + "traits": { + "smithy.api#documentation": "

The database's work group name.

" + } + }, + "S3ResultsPath": { + "target": "com.amazonaws.lookoutmetrics#AthenaS3ResultsPath", + "traits": { + "smithy.api#documentation": "

The database's results path.

" + } + }, + "BackTestConfiguration": { + "target": "com.amazonaws.lookoutmetrics#BackTestConfiguration", + "traits": { + "smithy.api#documentation": "

Settings for backtest mode.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about an Amazon Athena datasource.

" + } + }, + "com.amazonaws.lookoutmetrics#AthenaTableName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_]+$" + } + }, + "com.amazonaws.lookoutmetrics#AthenaWorkGroupName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9._-]{1,128}$" + } + }, "com.amazonaws.lookoutmetrics#AttributeValue": { "type": "structure", "members": { @@ -856,6 +956,21 @@ "type": "structure", "members": {} }, + "com.amazonaws.lookoutmetrics#BackTestConfiguration": { + "type": "structure", + "members": { + "RunBackTestMode": { + "target": "com.amazonaws.lookoutmetrics#Boolean", + "traits": { + "smithy.api#documentation": "

Run a backtest instead of monitoring new data.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Settings for backtest mode.

" + } + }, "com.amazonaws.lookoutmetrics#BinaryAttributeValue": { "type": "string" }, @@ -3618,30 +3733,36 @@ "AppFlowConfig": { "target": "com.amazonaws.lookoutmetrics#AppFlowConfig", "traits": { - "smithy.api#documentation": "

An object containing information about the AppFlow configuration.

" + "smithy.api#documentation": "

Details about an AppFlow datasource.

" } }, "CloudWatchConfig": { "target": "com.amazonaws.lookoutmetrics#CloudWatchConfig", "traits": { - "smithy.api#documentation": "

An object containing information about the Amazon CloudWatch monitoring configuration.

" + "smithy.api#documentation": "

Details about an Amazon CloudWatch monitoring datasource.

" } }, "RDSSourceConfig": { "target": "com.amazonaws.lookoutmetrics#RDSSourceConfig", "traits": { - "smithy.api#documentation": "

An object containing information about the Amazon Relational Database Service (RDS) configuration.

" + "smithy.api#documentation": "

Details about an Amazon Relational Database Service (RDS) datasource.

" } }, "RedshiftSourceConfig": { "target": "com.amazonaws.lookoutmetrics#RedshiftSourceConfig", "traits": { - "smithy.api#documentation": "

An object containing information about the Amazon Redshift database configuration.

" + "smithy.api#documentation": "

Details about an Amazon Redshift database datasource.

" + } + }, + "AthenaSourceConfig": { + "target": "com.amazonaws.lookoutmetrics#AthenaSourceConfig", + "traits": { + "smithy.api#documentation": "

Details about an Amazon Athena datasource.

" } } }, "traits": { - "smithy.api#documentation": "

Contains information about source data used to generate a metric.

" + "smithy.api#documentation": "

Contains information about source data used to generate metrics.

" } }, "com.amazonaws.lookoutmetrics#MetricValue": { @@ -4025,6 +4146,12 @@ "smithy.api#documentation": "

The ARN of the target SNS topic.

", "smithy.api#required": {} } + }, + "SnsFormat": { + "target": "com.amazonaws.lookoutmetrics#SnsFormat", + "traits": { + "smithy.api#documentation": "

The format of the SNS topic.

" + } } }, "traits": { @@ -4154,6 +4281,25 @@ "smithy.api#httpError": 402 } }, + "com.amazonaws.lookoutmetrics#SnsFormat": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "LONG_TEXT", + "name": "LONG_TEXT" + }, + { + "value": "SHORT_TEXT", + "name": "SHORT_TEXT" + }, + { + "value": "JSON", + "name": "JSON" + } + ] + } + }, "com.amazonaws.lookoutmetrics#StringAttributeValue": { "type": "string" }, diff --git a/aws/sdk/aws-models/mediaconvert.json b/aws/sdk/aws-models/mediaconvert.json index ff375cb30b3..9c476617857 100644 --- a/aws/sdk/aws-models/mediaconvert.json +++ b/aws/sdk/aws-models/mediaconvert.json @@ -599,6 +599,35 @@ "smithy.api#documentation": "Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AIFF." } }, + "com.amazonaws.mediaconvert#AllowedRenditionSize": { + "type": "structure", + "members": { + "Height": { + "target": "com.amazonaws.mediaconvert#__integerMin32Max8192", + "traits": { + "smithy.api#documentation": "Use Height to define the video resolution height, in pixels, for this rule.", + "smithy.api#jsonName": "height" + } + }, + "Required": { + "target": "com.amazonaws.mediaconvert#RequiredFlag", + "traits": { + "smithy.api#documentation": "Set to ENABLED to force a rendition to be included.", + "smithy.api#jsonName": "required" + } + }, + "Width": { + "target": "com.amazonaws.mediaconvert#__integerMin32Max8192", + "traits": { + "smithy.api#documentation": "Use Width to define the video resolution width, in pixels, for this rule.", + "smithy.api#jsonName": "width" + } + } + }, + "traits": { + "smithy.api#documentation": "Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions." + } + }, "com.amazonaws.mediaconvert#AlphaBehavior": { "type": "string", "traits": { @@ -1345,6 +1374,49 @@ ] } }, + "com.amazonaws.mediaconvert#AutomatedAbrRule": { + "type": "structure", + "members": { + "AllowedRenditions": { + "target": "com.amazonaws.mediaconvert#__listOfAllowedRenditionSize", + "traits": { + "smithy.api#documentation": "When customer adds the allowed renditions rule for auto ABR ladder, they are required to add at leat one rendition to allowedRenditions list", + "smithy.api#jsonName": "allowedRenditions" + } + }, + "ForceIncludeRenditions": { + "target": "com.amazonaws.mediaconvert#__listOfForceIncludeRenditionSize", + "traits": { + "smithy.api#documentation": "When customer adds the force include renditions rule for auto ABR ladder, they are required to add at leat one rendition to forceIncludeRenditions list", + "smithy.api#jsonName": "forceIncludeRenditions" + } + }, + "MinBottomRenditionSize": { + "target": "com.amazonaws.mediaconvert#MinBottomRenditionSize", + "traits": { + "smithy.api#documentation": "Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size.", + "smithy.api#jsonName": "minBottomRenditionSize" + } + }, + "MinTopRenditionSize": { + "target": "com.amazonaws.mediaconvert#MinTopRenditionSize", + "traits": { + "smithy.api#documentation": "Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution.", + "smithy.api#jsonName": "minTopRenditionSize" + } + }, + "Type": { + "target": "com.amazonaws.mediaconvert#RuleType", + "traits": { + "smithy.api#documentation": "Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution. Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size. Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting. Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * (Required) The number of resolutions that you specify must be equal to, or greater than, the Max renditions setting. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions.", + "smithy.api#jsonName": "type" + } + } + }, + "traits": { + "smithy.api#documentation": "Specify one or more Automated ABR rule types. Note: Force include and Allowed renditions are mutually exclusive." + } + }, "com.amazonaws.mediaconvert#AutomatedAbrSettings": { "type": "structure", "members": { @@ -1368,6 +1440,13 @@ "smithy.api#documentation": "Optional. The minimum target bitrate used in your automated ABR stack. Use this value to set a lower limit on the bitrate of video delivered to viewers with slow internet connections. If you don't specify a value, MediaConvert uses 600,000 (600 kb/s) by default.", "smithy.api#jsonName": "minAbrBitrate" } + }, + "Rules": { + "target": "com.amazonaws.mediaconvert#__listOfAutomatedAbrRule", + "traits": { + "smithy.api#documentation": "Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create in your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements, but you still want MediaConvert to optimize for video quality and overall file size.", + "smithy.api#jsonName": "rules" + } } }, "traits": { @@ -1492,7 +1571,7 @@ } }, "traits": { - "smithy.api#documentation": "Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode)." + "smithy.api#documentation": "Settings for quality-defined variable bitrate encoding with the AV1 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode)." } }, "com.amazonaws.mediaconvert#Av1RateControlMode": { @@ -3427,7 +3506,7 @@ "com.amazonaws.mediaconvert#CmfcKlvMetadata": { "type": "string", "traits": { - "smithy.api#documentation": "Applies to CMAF outputs. Use this setting to specify whether the service inserts the KLV metadata from the input in this output.", + "smithy.api#documentation": "To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.", "smithy.api#enum": [ { "value": "PASSTHROUGH", @@ -3520,7 +3599,7 @@ "KlvMetadata": { "target": "com.amazonaws.mediaconvert#CmfcKlvMetadata", "traits": { - "smithy.api#documentation": "Applies to CMAF outputs. Use this setting to specify whether the service inserts the KLV metadata from the input in this output.", + "smithy.api#documentation": "To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.", "smithy.api#jsonName": "klvMetadata" } }, @@ -5248,20 +5327,20 @@ "Mapping": { "target": "com.amazonaws.mediaconvert#DolbyVisionMapping", "traits": { - "smithy.api#documentation": "Required when you set Dolby Vision Profile (Profile) to Profile 8.1 (PROFILE_8_1). When you set Content mapping (Mapping) to None (HDR10_NOMAP), content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to Static (HDR10_1000), the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.", + "smithy.api#documentation": "Required when you set Dolby Vision Profile to Profile 8.1. When you set Content mapping to None, content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to HDR10 1000, the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.", "smithy.api#jsonName": "mapping" } }, "Profile": { "target": "com.amazonaws.mediaconvert#DolbyVisionProfile", "traits": { - "smithy.api#documentation": "Required when you use Dolby Vision (DolbyVision) processing. Set Profile (DolbyVisionProfile) to Profile 5 (Profile_5) to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 (Profile_8_1) to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.", + "smithy.api#documentation": "Required when you use Dolby Vision processing. Set Profile to Profile 5 to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.", "smithy.api#jsonName": "profile" } } }, "traits": { - "smithy.api#documentation": "With AWS Elemental MediaConvert, you can create profile 5 Dolby Vision outputs from MXF and IMF sources that contain mastering information as frame-interleaved Dolby Vision metadata." + "smithy.api#documentation": "With AWS Elemental MediaConvert, you can create profile 5 or 8.1 Dolby Vision outputs from MXF and IMF sources." } }, "com.amazonaws.mediaconvert#DolbyVisionLevel6Metadata": { @@ -5309,7 +5388,7 @@ "com.amazonaws.mediaconvert#DolbyVisionMapping": { "type": "string", "traits": { - "smithy.api#documentation": "Required when you set Dolby Vision Profile (Profile) to Profile 8.1 (PROFILE_8_1). When you set Content mapping (Mapping) to None (HDR10_NOMAP), content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to Static (HDR10_1000), the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.", + "smithy.api#documentation": "Required when you set Dolby Vision Profile to Profile 8.1. When you set Content mapping to None, content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to HDR10 1000, the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.", "smithy.api#enum": [ { "value": "HDR10_NOMAP", @@ -5325,7 +5404,7 @@ "com.amazonaws.mediaconvert#DolbyVisionProfile": { "type": "string", "traits": { - "smithy.api#documentation": "Required when you use Dolby Vision (DolbyVision) processing. Set Profile (DolbyVisionProfile) to Profile 5 (Profile_5) to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 (Profile_8_1) to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.", + "smithy.api#documentation": "Required when you use Dolby Vision processing. Set Profile to Profile 5 to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.", "smithy.api#enum": [ { "value": "PROFILE_5", @@ -7062,6 +7141,28 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.mediaconvert#ForceIncludeRenditionSize": { + "type": "structure", + "members": { + "Height": { + "target": "com.amazonaws.mediaconvert#__integerMin32Max8192", + "traits": { + "smithy.api#documentation": "Use Height to define the video resolution height, in pixels, for this rule.", + "smithy.api#jsonName": "height" + } + }, + "Width": { + "target": "com.amazonaws.mediaconvert#__integerMin32Max8192", + "traits": { + "smithy.api#documentation": "Use Width to define the video resolution width, in pixels, for this rule.", + "smithy.api#jsonName": "width" + } + } + }, + "traits": { + "smithy.api#documentation": "Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting." + } + }, "com.amazonaws.mediaconvert#FrameCaptureSettings": { "type": "structure", "members": { @@ -7773,7 +7874,7 @@ } }, "traits": { - "smithy.api#documentation": "Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode)." + "smithy.api#documentation": "Settings for quality-defined variable bitrate encoding with the H.264 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode)." } }, "com.amazonaws.mediaconvert#H264RateControlMode": { @@ -10183,7 +10284,7 @@ "com.amazonaws.mediaconvert#ImscAccessibilitySubs": { "type": "string", "traits": { - "smithy.api#documentation": "Set Accessibility subtitles (Accessibility) to Enabled (ENABLED) if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS=\"public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound\" and AUTOSELECT=\"YES\". Keep the default value, Disabled (DISABLED), if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.", + "smithy.api#documentation": "Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS=\"public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound\" and AUTOSELECT=\"YES\". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.", "smithy.api#enum": [ { "value": "DISABLED", @@ -10202,7 +10303,7 @@ "Accessibility": { "target": "com.amazonaws.mediaconvert#ImscAccessibilitySubs", "traits": { - "smithy.api#documentation": "Set Accessibility subtitles (Accessibility) to Enabled (ENABLED) if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS=\"public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound\" and AUTOSELECT=\"YES\". Keep the default value, Disabled (DISABLED), if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.", + "smithy.api#documentation": "Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS=\"public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound\" and AUTOSELECT=\"YES\". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.", "smithy.api#jsonName": "accessibility" } }, @@ -12901,7 +13002,7 @@ "com.amazonaws.mediaconvert#M2tsKlvMetadata": { "type": "string", "traits": { - "smithy.api#documentation": "Applies to MPEG-TS outputs. Use this setting to specify whether the service inserts the KLV metadata from the input in this output.", + "smithy.api#documentation": "To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and passes it through to the output transport stream. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.", "smithy.api#enum": [ { "value": "PASSTHROUGH", @@ -13166,7 +13267,7 @@ "KlvMetadata": { "target": "com.amazonaws.mediaconvert#M2tsKlvMetadata", "traits": { - "smithy.api#documentation": "Applies to MPEG-TS outputs. Use this setting to specify whether the service inserts the KLV metadata from the input in this output.", + "smithy.api#documentation": "To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and passes it through to the output transport stream. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.", "smithy.api#jsonName": "klvMetadata" } }, @@ -13299,7 +13400,7 @@ "TimedMetadataPid": { "target": "com.amazonaws.mediaconvert#__integerMin32Max8182", "traits": { - "smithy.api#documentation": "Specify the packet identifier (PID) for timed metadata in this output. Default is 502.", + "smithy.api#documentation": "Packet Identifier (PID) of the ID3 metadata stream in the transport stream.", "smithy.api#jsonName": "timedMetadataPid" } }, @@ -13648,6 +13749,50 @@ } ] }, + "com.amazonaws.mediaconvert#MinBottomRenditionSize": { + "type": "structure", + "members": { + "Height": { + "target": "com.amazonaws.mediaconvert#__integerMin32Max8192", + "traits": { + "smithy.api#documentation": "Use Height to define the video resolution height, in pixels, for this rule.", + "smithy.api#jsonName": "height" + } + }, + "Width": { + "target": "com.amazonaws.mediaconvert#__integerMin32Max8192", + "traits": { + "smithy.api#documentation": "Use Width to define the video resolution width, in pixels, for this rule.", + "smithy.api#jsonName": "width" + } + } + }, + "traits": { + "smithy.api#documentation": "Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size." + } + }, + "com.amazonaws.mediaconvert#MinTopRenditionSize": { + "type": "structure", + "members": { + "Height": { + "target": "com.amazonaws.mediaconvert#__integerMin32Max8192", + "traits": { + "smithy.api#documentation": "Use Height to define the video resolution height, in pixels, for this rule.", + "smithy.api#jsonName": "height" + } + }, + "Width": { + "target": "com.amazonaws.mediaconvert#__integerMin32Max8192", + "traits": { + "smithy.api#documentation": "Use Width to define the video resolution width, in pixels, for this rule.", + "smithy.api#jsonName": "width" + } + } + }, + "traits": { + "smithy.api#documentation": "Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution." + } + }, "com.amazonaws.mediaconvert#MotionImageInserter": { "type": "structure", "members": { @@ -14134,7 +14279,7 @@ "com.amazonaws.mediaconvert#MpdKlvMetadata": { "type": "string", "traits": { - "smithy.api#documentation": "Applies to DASH ISO outputs. Use this setting to specify whether the service inserts the KLV metadata from the input in this output.", + "smithy.api#documentation": "To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.", "smithy.api#enum": [ { "value": "NONE", @@ -14206,7 +14351,7 @@ "KlvMetadata": { "target": "com.amazonaws.mediaconvert#MpdKlvMetadata", "traits": { - "smithy.api#documentation": "Applies to DASH ISO outputs. Use this setting to specify whether the service inserts the KLV metadata from the input in this output.", + "smithy.api#documentation": "To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.", "smithy.api#jsonName": "klvMetadata" } }, @@ -16601,6 +16746,22 @@ ] } }, + "com.amazonaws.mediaconvert#RequiredFlag": { + "type": "string", + "traits": { + "smithy.api#documentation": "Set to ENABLED to force a rendition to be included.", + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + } + ] + } + }, "com.amazonaws.mediaconvert#ReservationPlan": { "type": "structure", "members": { @@ -16741,6 +16902,30 @@ ] } }, + "com.amazonaws.mediaconvert#RuleType": { + "type": "string", + "traits": { + "smithy.api#documentation": "Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution. Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size. Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting. Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * (Required) The number of resolutions that you specify must be equal to, or greater than, the Max renditions setting. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions.", + "smithy.api#enum": [ + { + "value": "MIN_TOP_RENDITION_SIZE", + "name": "MIN_TOP_RENDITION_SIZE" + }, + { + "value": "MIN_BOTTOM_RENDITION_SIZE", + "name": "MIN_BOTTOM_RENDITION_SIZE" + }, + { + "value": "FORCE_INCLUDE_RENDITIONS", + "name": "FORCE_INCLUDE_RENDITIONS" + }, + { + "value": "ALLOWED_RENDITIONS", + "name": "ALLOWED_RENDITIONS" + } + ] + } + }, "com.amazonaws.mediaconvert#S3DestinationAccessControl": { "type": "structure", "members": { @@ -19004,7 +19189,7 @@ "com.amazonaws.mediaconvert#WebvttAccessibilitySubs": { "type": "string", "traits": { - "smithy.api#documentation": "Set Accessibility subtitles (Accessibility) to Enabled (ENABLED) if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS=\"public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound\" and AUTOSELECT=\"YES\". Keep the default value, Disabled (DISABLED), if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.", + "smithy.api#documentation": "Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS=\"public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound\" and AUTOSELECT=\"YES\". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.", "smithy.api#enum": [ { "value": "DISABLED", @@ -19023,7 +19208,7 @@ "Accessibility": { "target": "com.amazonaws.mediaconvert#WebvttAccessibilitySubs", "traits": { - "smithy.api#documentation": "Set Accessibility subtitles (Accessibility) to Enabled (ENABLED) if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS=\"public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound\" and AUTOSELECT=\"YES\". Keep the default value, Disabled (DISABLED), if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.", + "smithy.api#documentation": "Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS=\"public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound\" and AUTOSELECT=\"YES\". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.", "smithy.api#jsonName": "accessibility" } }, @@ -20652,12 +20837,24 @@ } } }, + "com.amazonaws.mediaconvert#__listOfAllowedRenditionSize": { + "type": "list", + "member": { + "target": "com.amazonaws.mediaconvert#AllowedRenditionSize" + } + }, "com.amazonaws.mediaconvert#__listOfAudioDescription": { "type": "list", "member": { "target": "com.amazonaws.mediaconvert#AudioDescription" } }, + "com.amazonaws.mediaconvert#__listOfAutomatedAbrRule": { + "type": "list", + "member": { + "target": "com.amazonaws.mediaconvert#AutomatedAbrRule" + } + }, "com.amazonaws.mediaconvert#__listOfCaptionDescription": { "type": "list", "member": { @@ -20688,6 +20885,12 @@ "target": "com.amazonaws.mediaconvert#Endpoint" } }, + "com.amazonaws.mediaconvert#__listOfForceIncludeRenditionSize": { + "type": "list", + "member": { + "target": "com.amazonaws.mediaconvert#ForceIncludeRenditionSize" + } + }, "com.amazonaws.mediaconvert#__listOfHlsAdMarkers": { "type": "list", "member": { diff --git a/aws/sdk/aws-models/networkmanager.json b/aws/sdk/aws-models/networkmanager.json index 8577ac57744..109dd30698d 100644 --- a/aws/sdk/aws-models/networkmanager.json +++ b/aws/sdk/aws-models/networkmanager.json @@ -35,7 +35,8 @@ "smithy.api#length": { "min": 12, "max": 12 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#AWSLocation": { @@ -135,6 +136,41 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.networkmanager#AccountId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#AccountStatus": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.networkmanager#AccountId" + }, + "SLRDeploymentStatus": { + "target": "com.amazonaws.networkmanager#SLRDeploymentStatus" + } + } + }, + "com.amazonaws.networkmanager#AccountStatusList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#AccountStatus" + } + }, + "com.amazonaws.networkmanager#Action": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, "com.amazonaws.networkmanager#AssociateConnectPeer": { "type": "operation", "input": { @@ -251,7 +287,7 @@ } ], "traits": { - "smithy.api#documentation": "

Associates a customer gateway with a device and optionally, with a link. If you\n specify a link, it must be associated with the specified device.

\n

You can only associate customer gateways that are connected to a VPN attachment on a\n transit gateway. The transit gateway must be registered in your global network. When\n you register a transit gateway, customer gateways that are connected to the transit\n gateway are automatically included in the global network. To list customer gateways\n that are connected to a transit gateway, use the DescribeVpnConnections EC2 API and filter by\n transit-gateway-id.

\n

You cannot associate a customer gateway with more than one device and link.

", + "smithy.api#documentation": "

Associates a customer gateway with a device and optionally, with a link. If you\n specify a link, it must be associated with the specified device.

\n

You can only associate customer gateways that are connected to a VPN attachment on a\n transit gateway or core network registered in your global network. When you register a\n transit gateway or core network, customer gateways that are connected to the transit\n gateway are automatically included in the global network. To list customer gateways\n that are connected to a transit gateway, use the DescribeVpnConnections EC2 API and filter by\n transit-gateway-id.

\n

You cannot associate a customer gateway with more than one device and link.

", "smithy.api#http": { "method": "POST", "uri": "/global-networks/{GlobalNetworkId}/customer-gateway-associations", @@ -755,7 +791,8 @@ "smithy.api#length": { "min": 0, "max": 256 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#ConflictException": { @@ -1202,7 +1239,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#ConnectionHealth": { @@ -1237,7 +1275,8 @@ "smithy.api#length": { "min": 0, "max": 50 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#ConnectionIdList": { @@ -1311,7 +1350,8 @@ "smithy.api#length": { "min": 0, "max": 256 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#ConstrainedStringList": { @@ -1388,7 +1428,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#CoreNetworkChange": { @@ -1599,7 +1640,14 @@ } }, "com.amazonaws.networkmanager#CoreNetworkPolicyDocument": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10000000 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } }, "com.amazonaws.networkmanager#CoreNetworkPolicyError": { "type": "structure", @@ -1967,7 +2015,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a core network connect peer for a specified core network connect attachment between a core network and an appliance.\n The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).

", + "smithy.api#documentation": "

Creates a core network Connect peer for a specified core network connect attachment between a core network and an appliance.\n The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).

", "smithy.api#http": { "method": "POST", "uri": "/connect-peers", @@ -2620,7 +2668,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a site-to-site VPN attachment on an edge location of a core network.

", + "smithy.api#documentation": "

Creates an Amazon Web Services site-to-site VPN attachment on an edge location of a core network.

", "smithy.api#http": { "method": "POST", "uri": "/site-to-site-vpn-attachments", @@ -2770,7 +2818,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#CustomerGatewayArnList": { @@ -3268,7 +3317,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an existing global network. You must first delete all global network objects\n (devices, links, and sites) and deregister all transit gateways.

", + "smithy.api#documentation": "

Deletes an existing global network. You must first delete all global network objects\n (devices, links, and sites), deregister all transit gateways, and delete any core networks.

", "smithy.api#http": { "method": "DELETE", "uri": "/global-networks/{GlobalNetworkId}", @@ -3738,7 +3787,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#DeviceId": { @@ -3747,7 +3797,8 @@ "smithy.api#length": { "min": 0, "max": 50 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#DeviceIdList": { @@ -4152,7 +4203,8 @@ "smithy.api#length": { "min": 1, "max": 63 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#ExternalRegionCodeList": { @@ -4528,7 +4580,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about a core network. By default it returns the LIVE policy.

", + "smithy.api#documentation": "

Returns information about the LIVE policy for a core network.

", "smithy.api#http": { "method": "GET", "uri": "/core-networks/{CoreNetworkId}", @@ -6271,7 +6323,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes a global network. This is a single private network acting as a high-level container for your network objects, including an Amazon Web Services-manged Core Network.

" + "smithy.api#documentation": "

Describes a global network. This is a single private network acting as a high-level container for your network objects, including an Amazon Web Services-managed Core Network.

" } }, "com.amazonaws.networkmanager#GlobalNetworkArn": { @@ -6280,7 +6332,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#GlobalNetworkId": { @@ -6289,7 +6342,8 @@ "smithy.api#length": { "min": 0, "max": 50 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#GlobalNetworkIdList": { @@ -6333,7 +6387,8 @@ "smithy.api#length": { "min": 1, "max": 50 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#Integer": { @@ -6445,7 +6500,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#LinkAssociation": { @@ -6515,7 +6571,8 @@ "smithy.api#length": { "min": 0, "max": 50 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#LinkIdList": { @@ -6894,6 +6951,50 @@ } } }, + "com.amazonaws.networkmanager#ListOrganizationServiceAccessStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#ListOrganizationServiceAccessStatusRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#ListOrganizationServiceAccessStatusResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/organizations/service-access", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#ListOrganizationServiceAccessStatusRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#ListOrganizationServiceAccessStatusResponse": { + "type": "structure", + "members": { + "OrganizationStatus": { + "target": "com.amazonaws.networkmanager#OrganizationStatus" + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken" + } + } + }, "com.amazonaws.networkmanager#ListTagsForResource": { "type": "operation", "input": { @@ -7009,7 +7110,7 @@ "name": "networkmanager" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your\n Amazon Web Services and on-premises networks that are built around transit gateways.

", + "smithy.api#documentation": "

Amazon Web Services enables you to centrally manage your Amazon Web Services Cloud WAN core network and your Transit Gateway network across Amazon Web Services accounts, Regions, and on-premises locations.

", "smithy.api#title": "AWS Network Manager" }, "version": "2019-07-05", @@ -7191,6 +7292,9 @@ { "target": "com.amazonaws.networkmanager#ListCoreNetworks" }, + { + "target": "com.amazonaws.networkmanager#ListOrganizationServiceAccessStatus" + }, { "target": "com.amazonaws.networkmanager#ListTagsForResource" }, @@ -7209,6 +7313,9 @@ { "target": "com.amazonaws.networkmanager#RestoreCoreNetworkPolicyVersion" }, + { + "target": "com.amazonaws.networkmanager#StartOrganizationServiceAccessUpdate" + }, { "target": "com.amazonaws.networkmanager#StartRouteAnalysis" }, @@ -7571,6 +7678,46 @@ "smithy.api#length": { "min": 0, "max": 2048 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } + }, + "com.amazonaws.networkmanager#OrganizationAwsServiceAccessStatus": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#OrganizationId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + }, + "smithy.api#pattern": "^o-([0-9a-f]{8,17})$" + } + }, + "com.amazonaws.networkmanager#OrganizationStatus": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.networkmanager#OrganizationId" + }, + "OrganizationAwsServiceAccessStatus": { + "target": "com.amazonaws.networkmanager#OrganizationAwsServiceAccessStatus" + }, + "SLRDeploymentStatus": { + "target": "com.amazonaws.networkmanager#SLRDeploymentStatus" + }, + "AccountStatusList": { + "target": "com.amazonaws.networkmanager#AccountStatusList", + "traits": { + "smithy.api#xmlName": "OrganizationStatus" + } } } }, @@ -7784,7 +7931,14 @@ "members": {} }, "com.amazonaws.networkmanager#ReasonContextKey": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10000000 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } }, "com.amazonaws.networkmanager#ReasonContextMap": { "type": "map", @@ -7796,7 +7950,14 @@ } }, "com.amazonaws.networkmanager#ReasonContextValue": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10000000 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } }, "com.amazonaws.networkmanager#RegisterTransitGateway": { "type": "operation", @@ -7959,7 +8120,8 @@ "smithy.api#length": { "min": 0, "max": 1500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#ResourceNotFoundException": { @@ -8401,8 +8563,24 @@ "target": "com.amazonaws.networkmanager#RouteType" } }, + "com.amazonaws.networkmanager#SLRDeploymentStatus": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, "com.amazonaws.networkmanager#ServerSideString": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10000000 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } }, "com.amazonaws.networkmanager#ServiceQuotaExceededException": { "type": "structure", @@ -8509,7 +8687,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#SiteId": { @@ -8518,7 +8697,8 @@ "smithy.api#length": { "min": 0, "max": 50 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#SiteIdList": { @@ -8576,6 +8756,61 @@ "smithy.api#documentation": "

Creates a site-to-site VPN attachment.

" } }, + "com.amazonaws.networkmanager#StartOrganizationServiceAccessUpdate": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#StartOrganizationServiceAccessUpdateRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#StartOrganizationServiceAccessUpdateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/organizations/service-access", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#StartOrganizationServiceAccessUpdateRequest": { + "type": "structure", + "members": { + "Action": { + "target": "com.amazonaws.networkmanager#Action", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#StartOrganizationServiceAccessUpdateResponse": { + "type": "structure", + "members": { + "OrganizationStatus": { + "target": "com.amazonaws.networkmanager#OrganizationStatus" + } + } + }, "com.amazonaws.networkmanager#StartRouteAnalysis": { "type": "operation", "input": { @@ -8670,7 +8905,7 @@ "min": 0, "max": 500 }, - "smithy.api#pattern": "^arn:[^:]{1,63}:ec2:[^:]{0,63}:[^:]{0,63}:subnet\\/subnet-[0-9a-f]{8,17}$" + "smithy.api#pattern": "^arn:[^:]{1,63}:ec2:[^:]{0,63}:[^:]{0,63}:subnet\\/subnet-[0-9a-f]{8,17}$|^$" } }, "com.amazonaws.networkmanager#SubnetArnList": { @@ -8682,13 +8917,23 @@ "com.amazonaws.networkmanager#SynthesizedJsonCoreNetworkPolicyDocument": { "type": "string", "traits": { - "smithy.api#mediaType": "application/json" + "smithy.api#length": { + "min": 0, + "max": 10000000 + }, + "smithy.api#mediaType": "application/json", + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#SynthesizedJsonResourcePolicyDocument": { "type": "string", "traits": { - "smithy.api#mediaType": "application/json" + "smithy.api#length": { + "min": 0, + "max": 10000000 + }, + "smithy.api#mediaType": "application/json", + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#Tag": { @@ -8712,7 +8957,14 @@ } }, "com.amazonaws.networkmanager#TagKey": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10000000 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } }, "com.amazonaws.networkmanager#TagKeyList": { "type": "list", @@ -8791,7 +9043,14 @@ "members": {} }, "com.amazonaws.networkmanager#TagValue": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10000000 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } }, "com.amazonaws.networkmanager#ThrottlingException": { "type": "structure", @@ -8822,7 +9081,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#TransitGatewayArnList": { @@ -8837,7 +9097,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#TransitGatewayAttachmentId": { @@ -8846,7 +9107,8 @@ "smithy.api#length": { "min": 0, "max": 50 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#TransitGatewayConnectPeerArn": { @@ -8855,7 +9117,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#TransitGatewayConnectPeerArnList": { @@ -9016,7 +9279,8 @@ "smithy.api#length": { "min": 0, "max": 500 - } + }, + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.networkmanager#TunnelProtocol": { diff --git a/aws/sdk/aws-models/outposts.json b/aws/sdk/aws-models/outposts.json index 0ae67eb74d6..5e7878c3d92 100644 --- a/aws/sdk/aws-models/outposts.json +++ b/aws/sdk/aws-models/outposts.json @@ -670,7 +670,7 @@ "SiteId": { "target": "com.amazonaws.outposts#SiteId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#required": {} } }, @@ -828,7 +828,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -879,7 +879,7 @@ "SiteId": { "target": "com.amazonaws.outposts#SiteId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1111,7 +1111,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1160,7 +1160,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1191,7 +1191,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { - "smithy.api#documentation": "

\n The ID of the Outpost.\n

" + "smithy.api#documentation": "

\n The ID of the Outpost.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
" } }, "OutpostArn": { @@ -1275,7 +1275,7 @@ "SiteId": { "target": "com.amazonaws.outposts#SiteId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1316,7 +1316,7 @@ "SiteId": { "target": "com.amazonaws.outposts#SiteId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1568,7 +1568,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Lists the hardware assets in an Outpost. If you are using Dedicated Hosts on \n Amazon Web Services Outposts, you can filter your request by host ID to return a list of hardware\n assets that allocate resources for Dedicated Hosts. \n

", + "smithy.api#documentation": "

\n Lists the hardware assets in an Outpost. If you are using Dedicated Hosts on \n Amazon Web Services Outposts, you can filter your request by host ID to return a list of hardware\n assets that allocate resources for Dedicated Hosts. \n

", "smithy.api#http": { "method": "GET", "uri": "/outposts/{OutpostIdentifier}/assets", @@ -3135,7 +3135,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3236,7 +3236,7 @@ "SiteId": { "target": "com.amazonaws.outposts#SiteId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3280,7 +3280,7 @@ "SiteId": { "target": "com.amazonaws.outposts#SiteId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3347,7 +3347,7 @@ "SiteId": { "target": "com.amazonaws.outposts#SiteId", "traits": { - "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

", + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the site.\n

\n \n

In requests, Amazon Web Services Outposts accepts the Amazon Resource Name (ARN) or an ID for Outposts and\n sites throughout the Outposts Query API. To address backwards compatibility, the parameter names\n OutpostID or SiteID remain in use. Despite the parameter name, \n you can make the request with an ARN.

\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } diff --git a/aws/sdk/aws-models/personalize.json b/aws/sdk/aws-models/personalize.json index d83c69b6779..7e2e23f7cc6 100644 --- a/aws/sdk/aws-models/personalize.json +++ b/aws/sdk/aws-models/personalize.json @@ -1837,6 +1837,9 @@ { "target": "com.amazonaws.personalize#ResourceAlreadyExistsException" }, + { + "target": "com.amazonaws.personalize#ResourceInUseException" + }, { "target": "com.amazonaws.personalize#ResourceNotFoundException" }, @@ -1845,7 +1848,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a recommender with the recipe (a Domain dataset group use case) you specify. \n You create recommenders for a Domain dataset group and specify the recommender's Amazon Resource Name (ARN) when you make a\n GetRecommendations\n request.\n

\n \n

\n Minimum recommendation requests per second\n

\n \n

When you create a recommender, you can configure the recommender's minimum recommendation requests per second. The minimum recommendation requests per second\n (minRecommendationRequestsPerSecond) specifies the baseline recommendation request throughput provisioned by\n Amazon Personalize. The default minRecommendationRequestsPerSecond is 1. A recommendation request is a single GetRecommendations operation.\n Request throughput is measured in requests per second and Amazon Personalize uses your requests per second to derive\n your requests per hour and the price of your recommender usage.\n

\n

\n If your requests per second increases beyond\n minRecommendationRequestsPerSecond, Amazon Personalize auto-scales the provisioned capacity up and down,\n but never below minRecommendationRequestsPerSecond.\n There's a short time delay while the capacity is increased that might cause loss of\n requests.

\n

\n Your bill is the greater of either the minimum requests per hour (based on minRecommendationRequestsPerSecond)\n or the actual number of requests. The actual request throughput used is calculated as the average requests/second within a one-hour window.\n \n We recommend starting with the default minRecommendationRequestsPerSecond, track\n your usage using Amazon CloudWatch metrics, and then increase the minRecommendationRequestsPerSecond\n as necessary.\n

\n \n

\n Status\n

\n

A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
\n

To get the recommender status, call DescribeRecommender.

\n \n

Wait until the status of the recommender\n is ACTIVE before asking the recommender for recommendations.

\n
\n

\n Related APIs\n

\n ", + "smithy.api#documentation": "

Creates a recommender with the recipe (a Domain dataset group use case) you specify. \n You create recommenders for a Domain dataset group and specify the recommender's Amazon Resource Name (ARN) when you make a\n GetRecommendations\n request.\n

\n \n

\n Minimum recommendation requests per second\n

\n \n

When you create a recommender, you can configure the recommender's minimum recommendation requests per second. The minimum recommendation requests per second\n (minRecommendationRequestsPerSecond) specifies the baseline recommendation request throughput provisioned by\n Amazon Personalize. The default minRecommendationRequestsPerSecond is 1. A recommendation request is a single GetRecommendations operation.\n Request throughput is measured in requests per second and Amazon Personalize uses your requests per second to derive\n your requests per hour and the price of your recommender usage.\n

\n

\n If your requests per second increases beyond\n minRecommendationRequestsPerSecond, Amazon Personalize auto-scales the provisioned capacity up and down,\n but never below minRecommendationRequestsPerSecond.\n There's a short time delay while the capacity is increased that might cause loss of\n requests.

\n

\n Your bill is the greater of either the minimum requests per hour (based on minRecommendationRequestsPerSecond)\n or the actual number of requests. The actual request throughput used is calculated as the average requests/second within a one-hour window.\n \n We recommend starting with the default minRecommendationRequestsPerSecond, track\n your usage using Amazon CloudWatch metrics, and then increase the minRecommendationRequestsPerSecond\n as necessary.\n

\n \n

\n Status\n

\n

A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
\n

To get the recommender status, call DescribeRecommender.

\n \n

Wait until the status of the recommender\n is ACTIVE before asking the recommender for recommendations.

\n
\n

\n Related APIs\n

\n ", "smithy.api#idempotent": {} } }, @@ -3704,7 +3707,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the given recommender, including its status.

\n

A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
\n

When the status is CREATE FAILED, the response includes the\n failureReason key, which describes why.

\n

For more information on recommenders, see CreateRecommender.

", + "smithy.api#documentation": "

Describes the given recommender, including its status.

\n

A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
\n

When the status is CREATE FAILED, the response includes the\n failureReason key, which describes why.

\n

The modelMetrics key is null when\n the recommender is being created or deleted.

\n

For more information on recommenders, see CreateRecommender.

", "smithy.api#idempotent": {} } }, @@ -4269,7 +4272,7 @@ "metrics": { "target": "com.amazonaws.personalize#Metrics", "traits": { - "smithy.api#documentation": "

The metrics for the solution version.

" + "smithy.api#documentation": "

The metrics for the solution version. For more information, see\n \n Evaluating a solution version with metrics\n .

" } } } @@ -5835,7 +5838,7 @@ "status": { "target": "com.amazonaws.personalize#Status", "traits": { - "smithy.api#documentation": "

The status of the recommender.

\n

A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
" + "smithy.api#documentation": "

The status of the recommender.

\n

A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
" } }, "failureReason": { @@ -5849,6 +5852,12 @@ "traits": { "smithy.api#documentation": "

Provides a summary of the latest updates to the recommender.

" } + }, + "modelMetrics": { + "target": "com.amazonaws.personalize#Metrics", + "traits": { + "smithy.api#documentation": "

Provides evaluation metrics that help you determine the performance\n of a recommender. For more information, see\n \n Evaluating a recommender.

" + } } }, "traits": { @@ -5911,7 +5920,7 @@ "status": { "target": "com.amazonaws.personalize#Status", "traits": { - "smithy.api#documentation": "

The status of the recommender. A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
" + "smithy.api#documentation": "

The status of the recommender. A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
" } }, "creationDateTime": { @@ -5955,7 +5964,7 @@ "status": { "target": "com.amazonaws.personalize#Status", "traits": { - "smithy.api#documentation": "

The status of the recommender update.

\n

A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
" + "smithy.api#documentation": "

The status of the recommender update.

\n

A recommender can be in one of the following states:

\n
    \n
  • \n

    CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

    \n
  • \n
  • \n

    STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE

    \n
  • \n
  • \n

    DELETE PENDING > DELETE IN_PROGRESS

    \n
  • \n
" } }, "failureReason": { diff --git a/aws/sdk/aws-models/quicksight.json b/aws/sdk/aws-models/quicksight.json index 958e2b406ee..72f3cd20e83 100644 --- a/aws/sdk/aws-models/quicksight.json +++ b/aws/sdk/aws-models/quicksight.json @@ -94,6 +94,12 @@ "traits": { "smithy.api#documentation": "

The main notification email for your Amazon QuickSight subscription.

" } + }, + "PublicSharingEnabled": { + "target": "com.amazonaws.quicksight#Boolean", + "traits": { + "smithy.api#documentation": "

A boolean that indicates whether or not public sharing is enabled on an Amazon QuickSight account. For more information about enabling public sharing, see UpdatePublicSharingSettings.

" + } } }, "traits": { @@ -9137,7 +9143,7 @@ } ], "traits": { - "smithy.api#documentation": "

Generates an embed URL that you can use to embed an Amazon QuickSight dashboard in your website, without having to register any reader users. Before you use this action, make sure that you have configured the dashboards and permissions.

\n

The following rules apply to the generated URL:

\n
    \n
  • \n

    It contains a temporary bearer token. It is valid for 5 minutes after it is generated. Once redeemed within this period, it cannot be re-used again.

    \n
  • \n
  • \n

    The URL validity period should not be confused with the actual session lifetime\n that can be customized using the \n SessionLifetimeInMinutes\n parameter.

    \n

    The resulting user session is valid for 15 minutes (default) to 10 hours (maximum).

    \n
  • \n
  • \n

    You are charged only when the URL is used or there is interaction with Amazon QuickSight.

    \n
  • \n
\n

For more information, see Embedded Analytics in the Amazon QuickSight User\n Guide.

\n

For more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the Amazon QuickSight Developer Portal.

", + "smithy.api#documentation": "

Generates an embed URL that you can use to embed an Amazon QuickSight dashboard in your website, without having to register any reader users. Before you use this action, make sure that you have configured the dashboards and permissions.

\n

The following rules apply to the generated URL:

\n
    \n
  • \n

    It contains a temporary bearer token. It is valid for 5 minutes after it is generated. Once redeemed within this period, it cannot be re-used again.

    \n
  • \n
  • \n

    The URL validity period should not be confused with the actual session lifetime\n that can be customized using the \n SessionLifetimeInMinutes\n parameter.

    \n

    The resulting user session is valid for 15 minutes (minimum) to 10 hours (maximum). The default session duration is 10 hours.

    \n
  • \n
  • \n

    You are charged only when the URL is used or there is interaction with Amazon QuickSight.

    \n
  • \n
\n

For more information, see Embedded Analytics in the Amazon QuickSight User\n Guide.

\n

For more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the Amazon QuickSight Developer Portal.

", "smithy.api#http": { "method": "POST", "uri": "/accounts/{AwsAccountId}/embed-url/anonymous-user", @@ -9178,7 +9184,7 @@ "AuthorizedResourceArns": { "target": "com.amazonaws.quicksight#ArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names for the Amazon QuickSight resources that the user is authorized to access during the lifetime of the session. If you choose Dashboard embedding experience, pass the list of dashboard ARNs in the account that you want the user to be able to view.

", + "smithy.api#documentation": "

The Amazon Resource Names for the Amazon QuickSight resources that the user is authorized to access during the lifetime of the session. If you choose Dashboard embedding experience, pass the list of dashboard ARNs in the account that you want the user to be able to view. Currently, you can pass up to 25 dashboard ARNs in each API call.

", "smithy.api#required": {} } }, @@ -9256,7 +9262,7 @@ } ], "traits": { - "smithy.api#documentation": "

Generates an embed URL that you can use to embed an Amazon QuickSight experience in your website. This action can be used for any type of user registered in an Amazon QuickSight account. Before you use this action, make sure that you have configured the relevant Amazon QuickSight resource and permissions.

\n

The following rules apply to the generated URL:

\n
    \n
  • \n

    It contains a temporary bearer token. It is valid for 5 minutes after it is generated. Once redeemed within this period, it cannot be re-used again.

    \n
  • \n
  • \n

    The URL validity period should not be confused with the actual session lifetime\n that can be customized using the \n SessionLifetimeInMinutes\n parameter.

    \n

    The resulting user session is valid for 15 minutes (default) to 10 hours (maximum).

    \n
  • \n
  • \n

    You are charged only when the URL is used or there is interaction with Amazon QuickSight.

    \n
  • \n
\n

For more information, see Embedded Analytics in the Amazon QuickSight User\n Guide.

\n

For more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the Amazon QuickSight Developer Portal.

", + "smithy.api#documentation": "

Generates an embed URL that you can use to embed an Amazon QuickSight experience in your website. This action can be used for any type of user registered in an Amazon QuickSight account. Before you use this action, make sure that you have configured the relevant Amazon QuickSight resource and permissions.

\n

The following rules apply to the generated URL:

\n
    \n
  • \n

    It contains a temporary bearer token. It is valid for 5 minutes after it is generated. Once redeemed within this period, it cannot be re-used again.

    \n
  • \n
  • \n

    The URL validity period should not be confused with the actual session lifetime\n that can be customized using the \n SessionLifetimeInMinutes\n parameter.

    \n

    The resulting user session is valid for 15 minutes (minimum) to 10 hours (maximum). The default session duration is 10 hours.

    \n
  • \n
  • \n

    You are charged only when the URL is used or there is interaction with Amazon QuickSight.

    \n
  • \n
\n

For more information, see Embedded Analytics in the Amazon QuickSight User\n Guide.

\n

For more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the Amazon QuickSight Developer Portal.

", "smithy.api#http": { "method": "POST", "uri": "/accounts/{AwsAccountId}/embed-url/registered-user", @@ -10722,6 +10728,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "AnalysisSummaryList", "pageSize": "MaxResults" } } @@ -10822,6 +10829,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "DashboardVersionSummaryList", "pageSize": "MaxResults" } } @@ -10924,6 +10932,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "DashboardSummaryList", "pageSize": "MaxResults" } } @@ -11021,6 +11030,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "DataSetSummaries", "pageSize": "MaxResults" } } @@ -11118,6 +11128,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "DataSources", "pageSize": "MaxResults" } } @@ -11874,6 +11885,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Ingestions", "pageSize": "MaxResults" } } @@ -11988,6 +12000,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Namespaces", "pageSize": "MaxResults" } } @@ -12156,6 +12169,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "TemplateAliasList", "pageSize": "MaxResults" } } @@ -12264,6 +12278,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "TemplateVersionSummaryList", "pageSize": "MaxResults" } } @@ -12372,6 +12387,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "TemplateSummaryList", "pageSize": "MaxResults" } } @@ -12581,6 +12597,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "ThemeVersionSummaryList", "pageSize": "MaxResults" } } @@ -12692,6 +12709,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "ThemeSummaryList", "pageSize": "MaxResults" } } @@ -14082,6 +14100,9 @@ { "target": "com.amazonaws.quicksight#UpdateIpRestriction" }, + { + "target": "com.amazonaws.quicksight#UpdatePublicSharingSettings" + }, { "target": "com.amazonaws.quicksight#UpdateTemplate" }, @@ -15037,6 +15058,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "AnalysisSummaryList", "pageSize": "MaxResults" } } @@ -15142,6 +15164,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "DashboardSummaryList", "pageSize": "MaxResults" } } @@ -18882,6 +18905,80 @@ } } }, + "com.amazonaws.quicksight#UpdatePublicSharingSettings": { + "type": "operation", + "input": { + "target": "com.amazonaws.quicksight#UpdatePublicSharingSettingsRequest" + }, + "output": { + "target": "com.amazonaws.quicksight#UpdatePublicSharingSettingsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.quicksight#AccessDeniedException" + }, + { + "target": "com.amazonaws.quicksight#InternalFailureException" + }, + { + "target": "com.amazonaws.quicksight#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.quicksight#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.quicksight#ThrottlingException" + }, + { + "target": "com.amazonaws.quicksight#UnsupportedPricingPlanException" + } + ], + "traits": { + "smithy.api#documentation": "

Use the UpdatePublicSharingSettings operation to enable or disable the public sharing settings of an Amazon QuickSight dashboard.

\n

To use this operation, enable session capacity pricing on your Amazon QuickSight account.

\n

Before you can enable public sharing on your account, you need to allow public sharing permissions to an administrative user in the IAM console. For more information on using IAM with Amazon QuickSight, see Using Amazon QuickSight with IAM.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/accounts/{AwsAccountId}/public-sharing-settings", + "code": 200 + } + } + }, + "com.amazonaws.quicksight#UpdatePublicSharingSettingsRequest": { + "type": "structure", + "members": { + "AwsAccountId": { + "target": "com.amazonaws.quicksight#AwsAccountId", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services account ID associated with your Amazon QuickSight subscription.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PublicSharingEnabled": { + "target": "com.amazonaws.quicksight#Boolean", + "traits": { + "smithy.api#documentation": "

A boolean that indicates whether or not public sharing is enabled on a Amazon QuickSight account.

" + } + } + } + }, + "com.amazonaws.quicksight#UpdatePublicSharingSettingsResponse": { + "type": "structure", + "members": { + "RequestId": { + "target": "com.amazonaws.quicksight#String", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services request ID for this operation.

" + } + }, + "Status": { + "target": "com.amazonaws.quicksight#StatusCode", + "traits": { + "smithy.api#documentation": "

The HTTP status of the request.

", + "smithy.api#httpResponseCode": {} + } + } + } + }, "com.amazonaws.quicksight#UpdateResourcePermissionList": { "type": "list", "member": { diff --git a/aws/sdk/aws-models/rekognition.json b/aws/sdk/aws-models/rekognition.json index 5ce8b082068..65cef0d4686 100644 --- a/aws/sdk/aws-models/rekognition.json +++ b/aws/sdk/aws-models/rekognition.json @@ -1039,7 +1039,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new version of a model and begins training. \n Models are managed as part of an Amazon Rekognition Custom Labels project. \n The response from CreateProjectVersion\n is an Amazon Resource Name (ARN) for the version of the model.

\n \n \n

Training uses the training and test datasets associated with the project. \n For more information, see Creating training and test dataset in the Amazon Rekognition Custom Labels Developer Guide.\n

\n \n \n \n

You can train a modelin a project that doesn't have associated datasets by specifying manifest files in the\n TrainingData and TestingData fields.\n

\n

If you open the console after training a model with manifest files, Amazon Rekognition Custom Labels creates\n the datasets for you using the most recent manifest files. You can no longer train\n a model version for the project by specifying manifest files.

\n

Instead of training with a project without associated datasets,\n we recommend that you use the manifest\n files to create training and test datasets for the project.

\n
\n \n \n

Training takes a while to complete. You can get the current status by calling\n DescribeProjectVersions. Training completed successfully if\n the value of the Status field is TRAINING_COMPLETED.

\n \n

If training \n fails, see Debugging a failed model training in the Amazon Rekognition Custom Labels developer guide.

\n \n \n

Once training has successfully completed, call DescribeProjectVersions to\n get the training results and evaluate the model. For more information, see Improving a trained Amazon Rekognition Custom Labels model\n in the Amazon Rekognition Custom Labels developers guide.\n

\n \n

After evaluating the model, you start the model\n by calling StartProjectVersion.

\n

This operation requires permissions to perform the rekognition:CreateProjectVersion action.

" + "smithy.api#documentation": "

Creates a new version of a model and begins training. \n Models are managed as part of an Amazon Rekognition Custom Labels project. \n The response from CreateProjectVersion\n is an Amazon Resource Name (ARN) for the version of the model.

\n \n \n

Training uses the training and test datasets associated with the project. \n For more information, see Creating training and test dataset in the Amazon Rekognition Custom Labels Developer Guide.\n

\n \n \n \n

You can train a model in a project that doesn't have associated datasets by specifying manifest files in the\n TrainingData and TestingData fields.\n

\n

If you open the console after training a model with manifest files, Amazon Rekognition Custom Labels creates\n the datasets for you using the most recent manifest files. You can no longer train\n a model version for the project by specifying manifest files.

\n

Instead of training with a project without associated datasets,\n we recommend that you use the manifest\n files to create training and test datasets for the project.

\n
\n \n \n

Training takes a while to complete. You can get the current status by calling\n DescribeProjectVersions. Training completed successfully if\n the value of the Status field is TRAINING_COMPLETED.

\n \n

If training \n fails, see Debugging a failed model training in the Amazon Rekognition Custom Labels developer guide.

\n \n \n

Once training has successfully completed, call DescribeProjectVersions to\n get the training results and evaluate the model. For more information, see Improving a trained Amazon Rekognition Custom Labels model\n in the Amazon Rekognition Custom Labels developers guide.\n

\n \n

After evaluating the model, you start the model\n by calling StartProjectVersion.

\n

This operation requires permissions to perform the rekognition:CreateProjectVersion action.

" } }, "com.amazonaws.rekognition#CreateProjectVersionRequest": { @@ -6943,7 +6943,7 @@ "name": "rekognition" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

This is the API Reference for Amazon Rekognition Image, \n Amazon Rekognition Custom Labels,\n Amazon Rekognition Stored Video, \n Amazon Rekognition Streaming Video.\n It provides descriptions of actions, data types, common parameters,\n and common errors.

\n\n

\n Amazon Rekognition Image \n

\n\n
    \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
\n \n \n \n\n\n

\n Amazon Rekognition Custom Labels \n

\n
    \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
\n \n

\n Amazon Rekognition Video Stored Video \n

\n\n
    \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
\n \n

\n Amazon Rekognition Video Streaming Video \n

\n\n
    \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
  • \n

    \n
  • \n
", + "smithy.api#documentation": "

This is the API Reference for Amazon Rekognition Image, \n Amazon Rekognition Custom Labels,\n Amazon Rekognition Stored Video, \n Amazon Rekognition Streaming Video.\n It provides descriptions of actions, data types, common parameters,\n and common errors.

\n\n

\n Amazon Rekognition Image \n

\n\n \n\n \n \n \n

\n Amazon Rekognition Custom Labels \n

\n \n\n \n

\n Amazon Rekognition Video Stored Video \n

\n\n \n \n

\n Amazon Rekognition Video Streaming Video \n

\n\n ", "smithy.api#title": "Amazon Rekognition" }, "version": "2016-06-27", diff --git a/aws/sdk/aws-models/resiliencehub.json b/aws/sdk/aws-models/resiliencehub.json index 4d5384cfa1b..63b0c42be15 100644 --- a/aws/sdk/aws-models/resiliencehub.json +++ b/aws/sdk/aws-models/resiliencehub.json @@ -57,7 +57,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -76,7 +76,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -162,6 +162,18 @@ "target": "com.amazonaws.resiliencehub#AlarmRecommendation" } }, + "com.amazonaws.resiliencehub#AlarmReferenceIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.resiliencehub#String500" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, "com.amazonaws.resiliencehub#AlarmType": { "type": "string", "traits": { @@ -195,7 +207,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -215,7 +227,7 @@ "policyArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:dcps:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "creationTime": { @@ -260,6 +272,12 @@ "traits": { "smithy.api#documentation": "

The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. \nEach tag consists of a key/value pair.

" } + }, + "assessmentSchedule": { + "target": "com.amazonaws.resiliencehub#AppAssessmentScheduleType", + "traits": { + "smithy.api#documentation": "

\n Assessment execution schedule with 'Daily' or 'Disabled' values.\n

" + } } }, "traits": { @@ -272,7 +290,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "appVersion": { @@ -346,7 +364,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -361,19 +379,40 @@ "traits": { "smithy.api#documentation": "

The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. \nEach tag consists of a key/value pair.

" } + }, + "resourceErrorsDetails": { + "target": "com.amazonaws.resiliencehub#ResourceErrorsDetails", + "traits": { + "smithy.api#documentation": "

\n A resource error object containing a list of errors retrieving an application's resources.\n

" + } } }, "traits": { "smithy.api#documentation": "

Defines an application assessment.

" } }, + "com.amazonaws.resiliencehub#AppAssessmentScheduleType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Disabled", + "name": "DISABLED" + }, + { + "value": "Daily", + "name": "DAILY" + } + ] + } + }, "com.amazonaws.resiliencehub#AppAssessmentSummary": { "type": "structure", "members": { "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "appVersion": { @@ -422,7 +461,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -571,7 +610,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -606,6 +645,12 @@ "traits": { "smithy.api#documentation": "

The current resiliency score for the application.

" } + }, + "assessmentSchedule": { + "target": "com.amazonaws.resiliencehub#AppAssessmentScheduleType", + "traits": { + "smithy.api#documentation": "

\n Assessment execution schedule with 'Daily' or 'Disabled' values.\n

" + } } }, "traits": { @@ -623,7 +668,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 5000 + "max": 51200 }, "smithy.api#pattern": "^[\\w\\s:,-\\.'{}\\[\\]:\"]+$" } @@ -733,7 +778,6 @@ "sdkId": "resiliencehub", "arnNamespace": "resiliencehub", "cloudFormationName": "Resiliencehub", - "cloudTrailEventSource": "resiliencehub.amazonaws.com", "endpointPrefix": "resiliencehub" }, "aws.auth#sigv4": { @@ -1181,7 +1225,7 @@ "policyArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:dcps:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "tags": { @@ -1196,6 +1240,12 @@ "smithy.api#documentation": "

Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. \nYou should not reuse the same client token for other API requests.

", "smithy.api#idempotencyToken": {} } + }, + "assessmentSchedule": { + "target": "com.amazonaws.resiliencehub#AppAssessmentScheduleType", + "traits": { + "smithy.api#documentation": "

\n Assessment execution schedule with 'Daily' or 'Disabled' values.\n

" + } } } }, @@ -1272,7 +1322,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -1526,7 +1576,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -1545,7 +1595,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -1564,7 +1614,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -1589,7 +1639,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -1710,7 +1760,7 @@ "policyArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:dcps:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -1729,7 +1779,7 @@ "policyArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:dcps:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -1809,7 +1859,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -1833,7 +1883,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -1891,7 +1941,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -1916,7 +1966,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -1989,7 +2039,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -2008,7 +2058,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -2068,7 +2118,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -2080,7 +2130,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -2153,7 +2203,7 @@ "policyArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:dcps:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -2326,6 +2376,15 @@ "smithy.api#pattern": "^\\S{1,50}$" } }, + "com.amazonaws.resiliencehub#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, "com.amazonaws.resiliencehub#EstimatedCostTier": { "type": "string", "traits": { @@ -2441,15 +2500,20 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, "sourceArns": { "target": "com.amazonaws.resiliencehub#ArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the resources that you want to import.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the resources that you want to import.

" + } + }, + "terraformSources": { + "target": "com.amazonaws.resiliencehub#TerraformSourceList", + "traits": { + "smithy.api#documentation": "

\n A list of terraform file s3 URLs you need to import.\n

" } } } @@ -2460,7 +2524,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -2474,8 +2538,7 @@ "sourceArns": { "target": "com.amazonaws.resiliencehub#ArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the resources that you imported.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the resources that you imported.

" } }, "status": { @@ -2484,6 +2547,12 @@ "smithy.api#documentation": "

The status of the action.

", "smithy.api#required": {} } + }, + "terraformSources": { + "target": "com.amazonaws.resiliencehub#TerraformSourceList", + "traits": { + "smithy.api#documentation": "

\n A list of terraform file s3 URLs you need to import.\n

" + } } } }, @@ -2534,7 +2603,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -2544,7 +2614,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -2614,7 +2684,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" }, "smithy.api#readonly": {} } @@ -2625,7 +2696,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#httpQuery": "appArn" } }, @@ -2732,7 +2803,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -2754,7 +2826,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -2812,7 +2884,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -2822,7 +2895,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -2892,7 +2965,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -2902,7 +2976,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -2982,7 +3056,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -2992,7 +3067,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -3079,7 +3154,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -3089,7 +3165,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -3156,7 +3232,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" }, "smithy.api#readonly": {} } @@ -3188,7 +3265,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#httpQuery": "appArn" } } @@ -3243,7 +3320,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" }, "smithy.api#readonly": {} } @@ -3254,7 +3332,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#httpQuery": "assessmentArn", "smithy.api#required": {} } @@ -3354,7 +3432,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" }, "smithy.api#readonly": {} } @@ -3440,7 +3519,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -3462,7 +3542,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -3520,7 +3600,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" }, "smithy.api#readonly": {} } @@ -3658,7 +3739,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -3680,7 +3762,7 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -3741,7 +3823,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "maxResults": "maxResults" } } }, @@ -3751,7 +3834,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -3828,6 +3911,12 @@ "traits": { "smithy.api#documentation": "

The name of the resource group that this resource belongs to.

" } + }, + "terraformSourceName": { + "target": "com.amazonaws.resiliencehub#String255", + "traits": { + "smithy.api#documentation": "

\n The name of the Terraform S3 state file this resource belongs to. \n

" + } } }, "traits": { @@ -3989,7 +4078,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } } @@ -4001,7 +4090,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -4056,7 +4145,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -4075,7 +4164,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "appVersion": { @@ -4215,14 +4304,14 @@ "assessmentArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:dcps:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the assessment. The format for this ARN is: \narn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "recommendationIds": { @@ -4385,7 +4474,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -4412,6 +4501,12 @@ "traits": { "smithy.api#documentation": "

The names of the resource groups to remove from the resource mappings.

" } + }, + "terraformSourceNames": { + "target": "com.amazonaws.resiliencehub#String255List", + "traits": { + "smithy.api#documentation": "

\n \n

" + } } } }, @@ -4421,7 +4516,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "appVersion": { @@ -4475,7 +4570,7 @@ "policyArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:dcps:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "policyName": { @@ -4623,7 +4718,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -4642,7 +4737,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -4669,6 +4764,58 @@ } } }, + "com.amazonaws.resiliencehub#ResourceError": { + "type": "structure", + "members": { + "logicalResourceId": { + "target": "com.amazonaws.resiliencehub#String255", + "traits": { + "smithy.api#documentation": "

\n This is the identifier of the resource.\n

" + } + }, + "physicalResourceId": { + "target": "com.amazonaws.resiliencehub#String255", + "traits": { + "smithy.api#documentation": "

\n This is the identifier of the physical resource.\n

" + } + }, + "reason": { + "target": "com.amazonaws.resiliencehub#ErrorMessage", + "traits": { + "smithy.api#documentation": "

\n This is the error message.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Defines application resource errors.\n

" + } + }, + "com.amazonaws.resiliencehub#ResourceErrorList": { + "type": "list", + "member": { + "target": "com.amazonaws.resiliencehub#ResourceError" + } + }, + "com.amazonaws.resiliencehub#ResourceErrorsDetails": { + "type": "structure", + "members": { + "resourceErrors": { + "target": "com.amazonaws.resiliencehub#ResourceErrorList", + "traits": { + "smithy.api#documentation": "

\n A list of errors retrieving an application's resources.\n

" + } + }, + "hasMoreErrors": { + "target": "com.amazonaws.resiliencehub#BooleanOptional", + "traits": { + "smithy.api#documentation": "

\n This indicates if there are more errors not listed in the resourceErrors list.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n A list of errors retrieving an application's resources.\n

" + } + }, "com.amazonaws.resiliencehub#ResourceId": { "type": "string", "traits": { @@ -4680,20 +4827,20 @@ "traits": { "smithy.api#enum": [ { - "value": "Pending", - "name": "PENDING" + "name": "PENDING", + "value": "Pending" }, { - "value": "InProgress", - "name": "IN_PROGRESS" + "name": "IN_PROGRESS", + "value": "InProgress" }, { - "value": "Failed", - "name": "FAILED" + "name": "FAILED", + "value": "Failed" }, { - "value": "Success", - "name": "SUCCESS" + "name": "SUCCESS", + "value": "Success" } ] } @@ -4738,6 +4885,12 @@ "smithy.api#documentation": "

The identifier of this resource.

", "smithy.api#required": {} } + }, + "terraformSourceName": { + "target": "com.amazonaws.resiliencehub#String255", + "traits": { + "smithy.api#documentation": "

\n The short name of the Terraform source.\n

" + } } }, "traits": { @@ -4769,6 +4922,10 @@ { "value": "ResourceGroup", "name": "RESOURCE_GROUP" + }, + { + "value": "Terraform", + "name": "TERRAFORM" } ] } @@ -4853,6 +5010,15 @@ "smithy.api#documentation": "

The location of the Amazon S3 bucket.

" } }, + "com.amazonaws.resiliencehub#S3Url": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2000 + }, + "smithy.api#pattern": "^((https://([^/]+)\\.s3((-|\\.)[^/]+)?\\.amazonaws\\.com(.cn)?)|(s3://([^/]+)))/\\S{1,2000}$" + } + }, "com.amazonaws.resiliencehub#Seconds": { "type": "integer", "traits": { @@ -5005,7 +5171,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -5087,7 +5253,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "^(?!aws:).+$" + "smithy.api#pattern": "^(?!aws:)[^\\x00-\\x1f\\x22]+$" } }, "com.amazonaws.resiliencehub#TagKeyList": { @@ -5183,7 +5349,8 @@ "smithy.api#length": { "min": 0, "max": 256 - } + }, + "smithy.api#pattern": "^[^\\x00-\\x1f\\x22]*$" } }, "com.amazonaws.resiliencehub#TemplateFormat": { @@ -5201,6 +5368,27 @@ ] } }, + "com.amazonaws.resiliencehub#TerraformSource": { + "type": "structure", + "members": { + "s3StateFileUrl": { + "target": "com.amazonaws.resiliencehub#S3Url", + "traits": { + "smithy.api#documentation": "

\n The Terraform s3 state file you need to import.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The Terraform s3 state file you need to import.\n

" + } + }, + "com.amazonaws.resiliencehub#TerraformSourceList": { + "type": "list", + "member": { + "target": "com.amazonaws.resiliencehub#TerraformSource" + } + }, "com.amazonaws.resiliencehub#TestRecommendation": { "type": "structure", "members": { @@ -5264,6 +5452,12 @@ "traits": { "smithy.api#documentation": "

The prerequisite of the test recommendation.

" } + }, + "dependsOnAlarms": { + "target": "com.amazonaws.resiliencehub#AlarmReferenceIdList", + "traits": { + "smithy.api#documentation": "

\n A list of recommended alarms that are used in the test and must be exported before or with the test.\n

" + } } }, "traits": { @@ -5477,7 +5671,7 @@ "appArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:dcps:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the application. The format for this ARN is: \narn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, @@ -5490,7 +5684,7 @@ "policyArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:dcps:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

" } }, "clearResiliencyPolicyArn": { @@ -5498,6 +5692,12 @@ "traits": { "smithy.api#documentation": "

Specifies if the resiliency policy ARN should be cleared.

" } + }, + "assessmentSchedule": { + "target": "com.amazonaws.resiliencehub#AppAssessmentScheduleType", + "traits": { + "smithy.api#documentation": "

\n Assessment execution schedule with 'Daily' or 'Disabled' values.\n

" + } } } }, @@ -5556,7 +5756,7 @@ "policyArn": { "target": "com.amazonaws.resiliencehub#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:dcps:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: \narn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n AWS General Reference.

", "smithy.api#required": {} } }, diff --git a/aws/sdk/aws-models/sagemaker.json b/aws/sdk/aws-models/sagemaker.json index ab53c7f483c..3772900647b 100644 --- a/aws/sdk/aws-models/sagemaker.json +++ b/aws/sdk/aws-models/sagemaker.json @@ -454,13 +454,13 @@ "TrainingImage": { "target": "com.amazonaws.sagemaker#AlgorithmImage", "traits": { - "smithy.api#documentation": "

The registry path of the Docker image\n that contains the training algorithm.\n For information about docker registry paths for built-in algorithms, see Algorithms\n Provided by Amazon SageMaker: Common Parameters. SageMaker supports both\n registry/repository[:tag] and registry/repository[@digest]\n image path formats. For more information, see Using Your Own Algorithms with Amazon\n SageMaker.

" + "smithy.api#documentation": "

The registry path of the Docker image\n that contains the training algorithm.\n For information about docker registry paths for SageMaker built-in algorithms, see Docker Registry Paths and Example Code in the Amazon SageMaker developer guide. \n SageMaker supports both registry/repository[:tag] and registry/repository[@digest]\n image path formats. For more information about using your custom training container, see Using Your Own Algorithms with Amazon SageMaker.

\n \n

You must specify either the algorithm name to the AlgorithmName parameter \n or the image URI of the algorithm container \n to the TrainingImage parameter.

\n

For more information, see the note in the AlgorithmName parameter description.

\n
" } }, "AlgorithmName": { "target": "com.amazonaws.sagemaker#ArnOrName", "traits": { - "smithy.api#documentation": "

The name of the algorithm resource to use for the training job. This must be an\n algorithm resource that you created or subscribe to on Amazon Web Services Marketplace. If you specify a value for\n this parameter, you can't specify a value for TrainingImage.

" + "smithy.api#documentation": "

The name of the algorithm resource to use for the training job. This must be an\n algorithm resource that you created or subscribe to on Amazon Web Services Marketplace.

\n \n

You must specify either the algorithm name to the AlgorithmName parameter \n or the image URI of the algorithm container \n to the TrainingImage parameter.

\n

Note that the AlgorithmName parameter is mutually exclusive \n with the TrainingImage parameter. \n If you specify a value for the AlgorithmName parameter,\n you can't specify a value for TrainingImage, and vice versa.

\n

If you specify values for both parameters, the training job might break; if you don't specify\n any value for both parameters, the training job might raise a null error.

\n
" } }, "TrainingInputMode": { @@ -1028,6 +1028,38 @@ { "value": "ml.r5.24xlarge", "name": "ML_R5_24XLARGE" + }, + { + "value": "ml.g5.xlarge", + "name": "ML_G5_XLARGE" + }, + { + "value": "ml.g5.2xlarge", + "name": "ML_G5_2XLARGE" + }, + { + "value": "ml.g5.4xlarge", + "name": "ML_G5_4XLARGE" + }, + { + "value": "ml.g5.8xlarge", + "name": "ML_G5_8XLARGE" + }, + { + "value": "ml.g5.16xlarge", + "name": "ML_G5_16XLARGE" + }, + { + "value": "ml.g5.12xlarge", + "name": "ML_G5_12XLARGE" + }, + { + "value": "ml.g5.24xlarge", + "name": "ML_G5_24XLARGE" + }, + { + "value": "ml.g5.48xlarge", + "name": "ML_G5_48XLARGE" } ] } @@ -1842,6 +1874,20 @@ "smithy.api#documentation": "

Information about a candidate produced by an AutoML training job, including its status,\n steps, and other properties.

" } }, + "com.amazonaws.sagemaker#AutoMLCandidateGenerationConfig": { + "type": "structure", + "members": { + "FeatureSpecificationS3Uri": { + "target": "com.amazonaws.sagemaker#S3Uri", + "traits": { + "smithy.api#documentation": "

A URL to the Amazon S3 data source containing selected features from the input data source to\n run an Autopilot job (optional). This file should be in json format as shown below:

\n

\n { \"FeatureAttributeNames\":[\"col1\", \"col2\", ...] }.

\n

The key name FeatureAttributeNames is fixed. The values listed in\n [\"col1\", \"col2\", ...] is case sensitive and should be a list of strings\n containing unique values that are a subset of the column names in the input data. The list\n of columns provided must not include the target column.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Stores the config information for how a candidate is generated (optional).

" + } + }, "com.amazonaws.sagemaker#AutoMLCandidateStep": { "type": "structure", "members": { @@ -1909,12 +1955,12 @@ "ChannelType": { "target": "com.amazonaws.sagemaker#AutoMLChannelType", "traits": { - "smithy.api#documentation": "

The channel type (optional) is an enum string. The default value is\n training. Channels for training and validation must share the same\n ContentType and TargetAttributeName.

" + "smithy.api#documentation": "

The channel type (optional) is an enum string. The default value is\n training. Channels for training and validation must share the same\n ContentType and TargetAttributeName. For information on\n specifying training and validation channel types, see \n How to specify training and validation datasets\n .

" } } }, "traits": { - "smithy.api#documentation": "

A channel is a named input source that training algorithms can consume. The\n validation dataset size is limited to less than 2 GB. The training dataset size must be\n less than 100 GB. For more information, see .

\n \n

A validation dataset must contain the same headers as the training dataset.

\n
\n

" + "smithy.api#documentation": "

A channel is a named input source that training algorithms can consume. The validation\n dataset size is limited to less than 2 GB. The training dataset size must be less than 100\n GB. For more information, see .

\n \n

A validation dataset must contain the same headers as the training dataset.

\n
\n

" } }, "com.amazonaws.sagemaker#AutoMLChannelType": { @@ -1993,7 +2039,7 @@ "ValidationFraction": { "target": "com.amazonaws.sagemaker#ValidationFraction", "traits": { - "smithy.api#documentation": "

The validation fraction (optional) is a float that specifies the portion of the training\n dataset to be used for validation. The default value is 0.2, and values can range from 0 to\n 1. We recommend setting this value to be less than 0.5.

" + "smithy.api#documentation": "

The validation fraction (optional) is a float that specifies the portion of the training\n dataset to be used for validation. The default value is 0.2, and values must be greater\n than 0 and less than 1. We recommend setting this value to be less than 0.5.

" } } }, @@ -2018,7 +2064,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 20 + "max": 2 } } }, @@ -2098,6 +2144,12 @@ "traits": { "smithy.api#documentation": "

The configuration for splitting the input training dataset.

\n

Type: AutoMLDataSplitConfig

" } + }, + "CandidateGenerationConfig": { + "target": "com.amazonaws.sagemaker#AutoMLCandidateGenerationConfig", + "traits": { + "smithy.api#documentation": "

The configuration for generating a candidate for an AutoML job (optional).

" + } } }, "traits": { @@ -3102,18 +3154,18 @@ "CsvContentTypes": { "target": "com.amazonaws.sagemaker#CsvContentTypes", "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

The list of all content type headers that SageMaker will treat as CSV and capture accordingly.

" } }, "JsonContentTypes": { "target": "com.amazonaws.sagemaker#JsonContentTypes", "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

The list of all content type headers that SageMaker will treat as JSON and capture accordingly.

" } } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

Configuration specifying how to treat different headers. If no headers are specified SageMaker \n will by default base64 encode when capturing the data.

" } }, "com.amazonaws.sagemaker#CaptureMode": { @@ -3137,13 +3189,13 @@ "CaptureMode": { "target": "com.amazonaws.sagemaker#CaptureMode", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

Specify the boundary of data to capture.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

Specifies data Model Monitor will capture.

" } }, "com.amazonaws.sagemaker#CaptureOptionList": { @@ -4747,7 +4799,7 @@ "InputDataConfig": { "target": "com.amazonaws.sagemaker#AutoMLInputDataConfig", "traits": { - "smithy.api#documentation": "

An array of channel objects that describes the input data and its location. Each channel\n is a named input source. Similar to InputDataConfig supported by . Format(s) supported: CSV. Minimum\n of 500 rows.

", + "smithy.api#documentation": "

An array of channel objects that describes the input data and its location. Each channel\n is a named input source. Similar to InputDataConfig supported by . Format(s) supported: CSV, Parquet.\n A minimum of 500 rows is required for the training dataset. There is not a minimum number\n of rows required for the validation dataset.

", "smithy.api#required": {} } }, @@ -4761,7 +4813,7 @@ "ProblemType": { "target": "com.amazonaws.sagemaker#ProblemType", "traits": { - "smithy.api#documentation": "

Defines the type of supervised learning available for the candidates. Options include:\n BinaryClassification, MulticlassClassification, and\n Regression. For more information, see \n Amazon SageMaker Autopilot problem types and algorithm support.

" + "smithy.api#documentation": "

Defines the type of supervised learning available for the candidates. For more\n information, see \n Amazon SageMaker Autopilot problem types and algorithm support.

" } }, "AutoMLJobObjective": { @@ -4773,7 +4825,7 @@ "AutoMLJobConfig": { "target": "com.amazonaws.sagemaker#AutoMLJobConfig", "traits": { - "smithy.api#documentation": "

Contains CompletionCriteria and SecurityConfig settings for\n the AutoML job.

" + "smithy.api#documentation": "

A collection of settings used to configure an AutoML job.

" } }, "RoleArn": { @@ -6639,7 +6691,7 @@ "Task": { "target": "com.amazonaws.sagemaker#String", "traits": { - "smithy.api#documentation": "

The machine learning task your model package accomplishes. Common machine \n learning tasks include object detection and image classification.

" + "smithy.api#documentation": "

The machine learning task your model package accomplishes. Common machine \n learning tasks include object detection and image classification. The following \n tasks are supported by Inference Recommender: \n \"IMAGE_CLASSIFICATION\" | \"OBJECT_DETECTION\" | \"TEXT_GENERATION\" |\"IMAGE_SEGMENTATION\" | \n \"FILL_MASK\" | \"CLASSIFICATION\" | \"REGRESSION\" | \"OTHER\".

\n

Specify \"OTHER\" if none of the tasks listed fit your use case.

" } }, "SamplePayloadUrl": { @@ -6935,6 +6987,12 @@ "traits": { "smithy.api#documentation": "

The platform identifier of the notebook instance runtime environment.

" } + }, + "InstanceMetadataServiceConfiguration": { + "target": "com.amazonaws.sagemaker#InstanceMetadataServiceConfiguration", + "traits": { + "smithy.api#documentation": "

Information on the IMDS configuration of the notebook instance

" + } } } }, @@ -7615,7 +7673,7 @@ } ], "traits": { - "smithy.api#documentation": "

Starts a transform job. A transform job uses a trained model to get inferences on a\n dataset and saves these results to an Amazon S3 location that you specify.

\n

To perform batch transformations, you create a transform job and use the data that you\n have readily available.

\n

In the request body, you provide the following:

\n
    \n
  • \n

    \n TransformJobName - Identifies the transform job. The name must be\n unique within an Amazon Web Services Region in an Amazon Web Services account.

    \n
  • \n
  • \n

    \n ModelName - Identifies the model to use. ModelName\n must be the name of an existing Amazon SageMaker model in the same Amazon Web Services Region and Amazon Web Services\n account. For information on creating a model, see CreateModel.

    \n
  • \n
  • \n

    \n TransformInput - Describes the dataset to be transformed and the\n Amazon S3 location where it is stored.

    \n
  • \n
  • \n

    \n TransformOutput - Identifies the Amazon S3 location where you want\n Amazon SageMaker to save the results from the transform job.

    \n
  • \n
  • \n

    \n TransformResources - Identifies the ML compute instances for the\n transform job.

    \n
  • \n
\n

For more information about how batch transformation works, see Batch\n Transform.

" + "smithy.api#documentation": "

Starts a transform job. A transform job uses a trained model to get inferences on a\n dataset and saves these results to an Amazon S3 location that you specify.

\n

To perform batch transformations, you create a transform job and use the data that you\n have readily available.

\n

In the request body, you provide the following:

\n
    \n
  • \n

    \n TransformJobName - Identifies the transform job. The name must be\n unique within an Amazon Web Services Region in an Amazon Web Services account.

    \n
  • \n
  • \n

    \n ModelName - Identifies the model to use. ModelName\n must be the name of an existing Amazon SageMaker model in the same Amazon Web Services Region and Amazon Web Services\n\t\t account. For information on creating a model, see CreateModel.

    \n
  • \n
  • \n

    \n TransformInput - Describes the dataset to be transformed and the\n Amazon S3 location where it is stored.

    \n
  • \n
  • \n

    \n TransformOutput - Identifies the Amazon S3 location where you want\n Amazon SageMaker to save the results from the transform job.

    \n
  • \n
  • \n

    \n TransformResources - Identifies the ML compute instances for the\n transform job.

    \n
  • \n
\n

For more information about how batch transformation works, see Batch\n Transform.

" } }, "com.amazonaws.sagemaker#CreateTransformJobRequest": { @@ -8190,45 +8248,45 @@ "EnableCapture": { "target": "com.amazonaws.sagemaker#EnableCapture", "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

Whether data capture should be enabled or disabled (defaults to enabled).

" } }, "InitialSamplingPercentage": { "target": "com.amazonaws.sagemaker#SamplingPercentage", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

The percentage of requests SageMaker will capture. A lower value is recommended for \n Endpoints with high traffic.

", "smithy.api#required": {} } }, "DestinationS3Uri": { "target": "com.amazonaws.sagemaker#DestinationS3Uri", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

The Amazon S3 location used to capture the data.

", "smithy.api#required": {} } }, "KmsKeyId": { "target": "com.amazonaws.sagemaker#KmsKeyId", "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on\n the storage volume attached to the ML compute instance that hosts the endpoint.

\n

The KmsKeyId can be any of the following formats:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN:\n arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias name ARN:\n arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
" } }, "CaptureOptions": { "target": "com.amazonaws.sagemaker#CaptureOptionList", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

Specifies data Model Monitor will capture. You can configure whether to \n collect only input, only output, or both

", "smithy.api#required": {} } }, "CaptureContentTypeHeader": { "target": "com.amazonaws.sagemaker#CaptureContentTypeHeader", "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

Configuration specifying how to treat different headers. If no headers are specified SageMaker will \n by default base64 encode when capturing the data.

" } } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

Configuration to control how SageMaker captures inference data.

" } }, "com.amazonaws.sagemaker#DataCaptureConfigSummary": { @@ -8237,41 +8295,41 @@ "EnableCapture": { "target": "com.amazonaws.sagemaker#EnableCapture", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

Whether data capture is enabled or disabled.

", "smithy.api#required": {} } }, "CaptureStatus": { "target": "com.amazonaws.sagemaker#CaptureStatus", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

Whether data capture is currently functional.

", "smithy.api#required": {} } }, "CurrentSamplingPercentage": { "target": "com.amazonaws.sagemaker#SamplingPercentage", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

The percentage of requests being captured by your Endpoint.

", "smithy.api#required": {} } }, "DestinationS3Uri": { "target": "com.amazonaws.sagemaker#DestinationS3Uri", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

The Amazon S3 location being used to capture the data.

", "smithy.api#required": {} } }, "KmsKeyId": { "target": "com.amazonaws.sagemaker#KmsKeyId", "traits": { - "smithy.api#documentation": "

", + "smithy.api#documentation": "

The KMS key being used to encrypt the data in Amazon S3.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

The currently active data capture configuration used by your Endpoint.

" } }, "com.amazonaws.sagemaker#DataCatalogConfig": { @@ -14038,6 +14096,12 @@ "traits": { "smithy.api#documentation": "

The platform identifier of the notebook instance runtime environment.

" } + }, + "InstanceMetadataServiceConfiguration": { + "target": "com.amazonaws.sagemaker#InstanceMetadataServiceConfiguration", + "traits": { + "smithy.api#documentation": "

Information on the IMDS configuration of the notebook instance

" + } } } }, @@ -20394,6 +20458,21 @@ } } }, + "com.amazonaws.sagemaker#InstanceMetadataServiceConfiguration": { + "type": "structure", + "members": { + "MinimumInstanceMetadataServiceVersion": { + "target": "com.amazonaws.sagemaker#MinimumInstanceMetadataServiceVersion", + "traits": { + "smithy.api#documentation": "

Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Information on the IMDS configuration of the notebook instance

" + } + }, "com.amazonaws.sagemaker#InstanceType": { "type": "string", "traits": { @@ -27166,7 +27245,7 @@ "StandardMetricName": { "target": "com.amazonaws.sagemaker#AutoMLMetricExtendedEnum", "traits": { - "smithy.api#documentation": "

The name of the standard metric.

" + "smithy.api#documentation": "

The name of the standard metric.

\n \n

For definitions of the standard metrics, see \n Autopilot candidate metrics\n .

\n
" } } }, @@ -27278,6 +27357,16 @@ "smithy.api#documentation": "

" } }, + "com.amazonaws.sagemaker#MinimumInstanceMetadataServiceVersion": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1 + }, + "smithy.api#pattern": "^1|2$" + } + }, "com.amazonaws.sagemaker#ModelApprovalStatus": { "type": "string", "traits": { @@ -39696,7 +39785,7 @@ "KmsKeyId": { "target": "com.amazonaws.sagemaker#KmsKeyId", "traits": { - "smithy.api#documentation": "

The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using\n Amazon S3 server-side encryption. The KmsKeyId can be any of the following\n formats:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN:\n arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias name ARN:\n arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
\n \n \n

If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your\n role's account. For more information, see KMS-Managed Encryption Keys in the\n Amazon Simple Storage Service\n Developer Guide.\n

\n

The KMS key policy must grant permission to the IAM role that you specify in your\n CreateModel request. For more information, see Using\n Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer\n Guide.

" + "smithy.api#documentation": "

The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using\n Amazon S3 server-side encryption. The KmsKeyId can be any of the following\n formats:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Key ARN:\n arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\n

    \n
  • \n
  • \n

    Alias name: alias/ExampleAlias\n

    \n
  • \n
  • \n

    Alias name ARN:\n arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias\n

    \n
  • \n
\n \n \n

If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your\n role's account. For more information, see KMS-Managed Encryption Keys in the\n Amazon Simple Storage Service\n Developer Guide.\n

\n

The KMS key policy must grant permission to the IAM role that you specify in your\n\tCreateModel\n\t\trequest. For more information, see Using\n Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer\n Guide.

" } } }, @@ -41433,6 +41522,12 @@ "traits": { "smithy.api#documentation": "

Whether root access is enabled or disabled for users of the notebook instance. The\n default value is Enabled.

\n \n

If you set this to Disabled, users don't have root access on the\n notebook instance, but lifecycle configuration scripts still run with root\n permissions.

\n
" } + }, + "InstanceMetadataServiceConfiguration": { + "target": "com.amazonaws.sagemaker#InstanceMetadataServiceConfiguration", + "traits": { + "smithy.api#documentation": "

Information on the IMDS configuration of the notebook instance

" + } } } }, diff --git a/aws/sdk/aws-models/secretsmanager.json b/aws/sdk/aws-models/secretsmanager.json index 1fd9745d41d..c9bdd76b9d9 100644 --- a/aws/sdk/aws-models/secretsmanager.json +++ b/aws/sdk/aws-models/secretsmanager.json @@ -1342,7 +1342,7 @@ "target": "com.amazonaws.secretsmanager#BooleanType", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "

Specifies whether to block resource-based policies that allow broad access to the secret. By default, Secrets Manager blocks policies that allow broad access, for example those that use a wildcard for the principal.

" + "smithy.api#documentation": "

Specifies whether to block resource-based policies that allow broad access to the secret, for example those that use a wildcard for the principal.

" } } } diff --git a/aws/sdk/aws-models/servicecatalog.json b/aws/sdk/aws-models/servicecatalog.json index 3eee5f9c081..5eb2424df33 100644 --- a/aws/sdk/aws-models/servicecatalog.json +++ b/aws/sdk/aws-models/servicecatalog.json @@ -4303,7 +4303,7 @@ "Name": { "target": "com.amazonaws.servicecatalog#PortfolioName", "traits": { - "smithy.api#documentation": "

The name of the portfolio to which the user was assigned.

" + "smithy.api#documentation": "

The name of the portfolio that contains the product.

" } } }, @@ -4346,7 +4346,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all portfolios for which sharing was accepted by this account.

", + "smithy.api#documentation": "

Lists all imported portfolios for which account-to-account shares were accepted by\n this account. By specifying the PortfolioShareType, you can list portfolios for which\n organizational shares were accepted by this account.

", "smithy.api#paginated": { "inputToken": "PageToken", "outputToken": "NextPageToken", @@ -4378,7 +4378,7 @@ "PortfolioShareType": { "target": "com.amazonaws.servicecatalog#PortfolioShareType", "traits": { - "smithy.api#documentation": "

The type of shared portfolios to list. The default is to list imported portfolios.

\n
    \n
  • \n

    \n AWS_ORGANIZATIONS - List portfolios shared by the management\n account of your organization

    \n
  • \n
  • \n

    \n AWS_SERVICECATALOG - List default portfolios

    \n
  • \n
  • \n

    \n IMPORTED - List imported portfolios

    \n
  • \n
" + "smithy.api#documentation": "

The type of shared portfolios to list. The default is to list imported portfolios.

\n
    \n
  • \n

    \n AWS_ORGANIZATIONS - List portfolios accepted and shared via organizational sharing by the management account or delegated administrator of your organization.

    \n
  • \n
  • \n

    \n AWS_SERVICECATALOG - Deprecated type.

    \n
  • \n
  • \n

    \n IMPORTED - List imported portfolios that have been accepted and\n shared through account-to-account sharing.

    \n
  • \n
" } } } diff --git a/aws/sdk/aws-models/ssm-incidents.json b/aws/sdk/aws-models/ssm-incidents.json index 4f17f574a6b..76f836aaead 100644 --- a/aws/sdk/aws-models/ssm-incidents.json +++ b/aws/sdk/aws-models/ssm-incidents.json @@ -135,7 +135,7 @@ "chatbotSns": { "target": "com.amazonaws.ssmincidents#ChatbotSnsConfigurationSet", "traits": { - "smithy.api#documentation": "

The Amazon SNS targets that Chatbot uses to notify the chat channel\n of updates to an incident. You can also make updates to the incident through the chat\n channel\n by\n using the Amazon SNS topics.

" + "smithy.api#documentation": "

The Amazon SNS targets that Chatbot uses to notify the chat channel\n of updates to an incident. You can also make updates to the incident through the chat\n channel by using the Amazon SNS topics.

" } } }, @@ -501,7 +501,7 @@ "eventData": { "target": "com.amazonaws.ssmincidents#EventData", "traits": { - "smithy.api#documentation": "

A short description of the event as a valid JSON string. There is no other schema\n imposed.

", + "smithy.api#documentation": "

A short description of the event.

", "smithy.api#required": {} } } @@ -832,6 +832,44 @@ "type": "structure", "members": {} }, + "com.amazonaws.ssmincidents#DynamicSsmParameterValue": { + "type": "union", + "members": { + "variable": { + "target": "com.amazonaws.ssmincidents#VariableType", + "traits": { + "smithy.api#documentation": "

Variable dynamic parameters. A parameter value is determined when an incident is created.

", + "smithy.api#tags": [ + "logs_investigations" + ] + } + } + }, + "traits": { + "smithy.api#documentation": "

The dynamic SSM parameter value.

" + } + }, + "com.amazonaws.ssmincidents#DynamicSsmParameters": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "value": { + "target": "com.amazonaws.ssmincidents#DynamicSsmParameterValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, "com.amazonaws.ssmincidents#EmptyChatChannel": { "type": "structure", "members": {}, @@ -939,7 +977,7 @@ "condition": { "target": "com.amazonaws.ssmincidents#Condition", "traits": { - "smithy.api#documentation": "

The condition accepts before or after a specified time, equal to a string, or equal to an integer.

", + "smithy.api#documentation": "

The condition accepts before or after a specified time, equal to a string, or equal to\n an integer.

", "smithy.api#required": {} } } @@ -1525,7 +1563,7 @@ "dedupeString": { "target": "com.amazonaws.ssmincidents#DedupeString", "traits": { - "smithy.api#documentation": "

The string Incident Manager uses to prevent duplicate incidents from being created by the same incident in the same account.

", + "smithy.api#documentation": "

The string Incident Manager uses to prevent duplicate incidents from being created by the\n same incident in the same account.

", "smithy.api#required": {} } }, @@ -1562,7 +1600,7 @@ "invokedBy": { "target": "com.amazonaws.ssmincidents#ServicePrincipal", "traits": { - "smithy.api#documentation": "

The principal the assumed the role specified of the createdBy.

", + "smithy.api#documentation": "

The service principal that assumed the role specified in createdBy. If no\n service principal assumed the role this will be left blank.

", "smithy.api#tags": [ "logs_investigations" ] @@ -1716,7 +1754,7 @@ "dedupeString": { "target": "com.amazonaws.ssmincidents#DedupeString", "traits": { - "smithy.api#documentation": "

Used to stop Incident Manager from creating multiple incident records for the same incident.

", + "smithy.api#documentation": "

Used to stop Incident Manager from creating multiple incident records for the same incident.\n

", "smithy.api#tags": [ "logs_investigations" ] @@ -1730,7 +1768,7 @@ } }, "traits": { - "smithy.api#documentation": "

Basic details used in creating a response plan. The response plan is then used to create an incident record.

" + "smithy.api#documentation": "

Basic details used in creating a response plan. The response plan is then used to create\n an incident record.

" } }, "com.amazonaws.ssmincidents#IncidentTitle": { @@ -1786,7 +1824,7 @@ "type": { "target": "com.amazonaws.ssmincidents#ItemType", "traits": { - "smithy.api#documentation": "

The type of related item. Incident Manager supports the following types:

\n
    \n
  • \n

    \n ANALYSIS\n

    \n
  • \n
  • \n

    \n INCIDENT\n

    \n
  • \n
  • \n

    \n METRIC\n

    \n
  • \n
  • \n

    \n PARENT\n

    \n
  • \n
  • \n

    \n ATTACHMENT\n

    \n
  • \n
  • \n

    \n OTHER\n

    \n
  • \n
", + "smithy.api#documentation": "

The type of related item.

", "smithy.api#required": {}, "smithy.api#tags": [ "logs_investigations" @@ -1829,6 +1867,10 @@ { "value": "AUTOMATION", "name": "AUTOMATION" + }, + { + "value": "INVOLVED_RESOURCE", + "name": "INVOLVED_RESOURCE" } ] } @@ -2467,7 +2509,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a resource policy to the specified response plan.

", + "smithy.api#documentation": "

Adds a resource policy to the specified response plan. The resource policy is used to\n share the response plan using Resource Access Manager (RAM). For more\n information about cross-account sharing, see Setting up\n cross-account functionality.

", "smithy.api#http": { "code": 200, "method": "POST", @@ -2842,7 +2884,7 @@ } }, "traits": { - "smithy.api#documentation": "

The resource policy that allows Incident Manager to perform actions on resources on your behalf.

" + "smithy.api#documentation": "

The resource policy that allows Incident Manager to perform actions on resources on your\n behalf.

" } }, "com.amazonaws.ssmincidents#ResourcePolicyList": { @@ -3168,7 +3210,7 @@ "roleArn": { "target": "com.amazonaws.ssmincidents#RoleArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role that the automation document will assume when running commands.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role that the automation document will assume when\n running commands.

", "smithy.api#required": {}, "smithy.api#tags": [ "logs_investigations" @@ -3201,7 +3243,7 @@ "targetAccount": { "target": "com.amazonaws.ssmincidents#SsmTargetAccount", "traits": { - "smithy.api#documentation": "

The account that the automation document will be run in. This can be in either the management account or an application account.

", + "smithy.api#documentation": "

The account that the automation document will be run in. This can be in either the\n management account or an application account.

", "smithy.api#tags": [ "logs_investigations" ] @@ -3212,6 +3254,12 @@ "traits": { "smithy.api#documentation": "

The key-value pair parameters to use when running the automation document.

" } + }, + "dynamicParameters": { + "target": "com.amazonaws.ssmincidents#DynamicSsmParameters", + "traits": { + "smithy.api#documentation": "

The key-value pair to resolve dynamic parameter values when processing a Systems Manager Automation runbook.

" + } } }, "traits": { @@ -3224,7 +3272,7 @@ "smithy.api#length": { "max": 2048 }, - "smithy.api#pattern": "^arn:[-\\w+=/,.@]+:ssm-contacts:[-\\w+=/,.@]*:[0-9]+:([\\w+=/,.@:-]+)*$" + "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:ssm-contacts:[a-z0-9-]*:([0-9]{12}):contact/[a-z0-9_-]+$" } }, "com.amazonaws.ssmincidents#SsmParameterValues": { @@ -4009,6 +4057,9 @@ { "target": "com.amazonaws.ssmincidents#AccessDeniedException" }, + { + "target": "com.amazonaws.ssmincidents#ConflictException" + }, { "target": "com.amazonaws.ssmincidents#InternalServerException" }, @@ -4339,6 +4390,21 @@ "smithy.api#error": "client", "smithy.api#httpError": 400 } + }, + "com.amazonaws.ssmincidents#VariableType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "INCIDENT_RECORD_ARN", + "name": "INCIDENT_RECORD_ARN" + }, + { + "value": "INVOLVED_RESOURCES", + "name": "INVOLVED_RESOURCES" + } + ] + } } } } diff --git a/aws/sdk/aws-models/sts.json b/aws/sdk/aws-models/sts.json index a1cb802e727..8436979b512 100644 --- a/aws/sdk/aws-models/sts.json +++ b/aws/sdk/aws-models/sts.json @@ -800,7 +800,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The\n credentials consist of an access key ID, a secret access key, and a security token.\n Typically, you use GetSessionToken if you want to use MFA to protect\n programmatic calls to specific Amazon Web Services API operations like Amazon EC2 StopInstances.\n MFA-enabled IAM users would need to call GetSessionToken and submit an MFA\n code that is associated with their MFA device. Using the temporary security credentials\n that are returned from the call, IAM users can then make programmatic calls to API\n operations that require MFA authentication. If you do not supply a correct MFA code, then\n the API returns an access denied error. For a comparison of GetSessionToken\n with the other API operations that produce temporary credentials, see Requesting\n Temporary Security Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

\n Session Duration\n

\n

The GetSessionToken operation must be called by using the long-term Amazon Web Services\n security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are\n created by IAM users are valid for the duration that you specify. This duration can range\n from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.

\n

\n Permissions\n

\n

The temporary security credentials created by GetSessionToken can be used\n to make API calls to any Amazon Web Services service with the following exceptions:

\n
    \n
  • \n

    You cannot call any IAM API operations unless MFA authentication information is\n included in the request.

    \n
  • \n
  • \n

    You cannot call any STS API except\n AssumeRole or GetCallerIdentity.

    \n
  • \n
\n \n

We recommend that you do not call GetSessionToken with Amazon Web Services account\n root user credentials. Instead, follow our best practices by\n creating one or more IAM users, giving them the necessary permissions, and using IAM\n users for everyday interaction with Amazon Web Services.

\n
\n

The credentials that are returned by GetSessionToken are based on\n permissions associated with the user whose credentials were used to call the operation. If\n GetSessionToken is called using Amazon Web Services account root user credentials, the\n temporary credentials have root user permissions. Similarly, if\n GetSessionToken is called using the credentials of an IAM user, the\n temporary credentials have the same permissions as the IAM user.

\n

For more information about using GetSessionToken to create temporary\n credentials, go to Temporary\n Credentials for Users in Untrusted Environments in the\n IAM User Guide.

" + "smithy.api#documentation": "

Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The\n credentials consist of an access key ID, a secret access key, and a security token.\n Typically, you use GetSessionToken if you want to use MFA to protect\n programmatic calls to specific Amazon Web Services API operations like Amazon EC2 StopInstances.\n MFA-enabled IAM users would need to call GetSessionToken and submit an MFA\n code that is associated with their MFA device. Using the temporary security credentials\n that are returned from the call, IAM users can then make programmatic calls to API\n operations that require MFA authentication. If you do not supply a correct MFA code, then\n the API returns an access denied error. For a comparison of GetSessionToken\n with the other API operations that produce temporary credentials, see Requesting\n Temporary Security Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n \n

No permissions are required for users to perform this operation. The purpose of the\n sts:GetSessionToken operation is to authenticate the user using MFA. You\n cannot use policies to control authentication operations. For more information, see\n Permissions for GetSessionToken in the\n IAM User Guide.

\n
\n

\n Session Duration\n

\n

The GetSessionToken operation must be called by using the long-term Amazon Web Services\n security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are\n created by IAM users are valid for the duration that you specify. This duration can range\n from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.

\n

\n Permissions\n

\n

The temporary security credentials created by GetSessionToken can be used\n to make API calls to any Amazon Web Services service with the following exceptions:

\n
    \n
  • \n

    You cannot call any IAM API operations unless MFA authentication information is\n included in the request.

    \n
  • \n
  • \n

    You cannot call any STS API except\n AssumeRole or GetCallerIdentity.

    \n
  • \n
\n \n

We recommend that you do not call GetSessionToken with Amazon Web Services account\n root user credentials. Instead, follow our best practices by\n creating one or more IAM users, giving them the necessary permissions, and using IAM\n users for everyday interaction with Amazon Web Services.

\n
\n

The credentials that are returned by GetSessionToken are based on\n permissions associated with the user whose credentials were used to call the operation. If\n GetSessionToken is called using Amazon Web Services account root user credentials, the\n temporary credentials have root user permissions. Similarly, if\n GetSessionToken is called using the credentials of an IAM user, the\n temporary credentials have the same permissions as the IAM user.

\n

For more information about using GetSessionToken to create temporary\n credentials, go to Temporary\n Credentials for Users in Untrusted Environments in the\n IAM User Guide.

" } }, "com.amazonaws.sts#GetSessionTokenRequest": { diff --git a/aws/sdk/aws-models/transfer.json b/aws/sdk/aws-models/transfer.json index 227dddd6133..5788da18e90 100644 --- a/aws/sdk/aws-models/transfer.json +++ b/aws/sdk/aws-models/transfer.json @@ -340,7 +340,7 @@ "ProtocolDetails": { "target": "com.amazonaws.transfer#ProtocolDetails", "traits": { - "smithy.api#documentation": "

The protocol settings that are configured for your server.

\n

\n Use the PassiveIp parameter to indicate passive mode (for FTP and FTPS protocols).\n Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.\n

\n

Use the TlsSessionResumptionMode parameter to determine whether or not your Transfer server\n resumes recent, negotiated sessions through a unique session ID.

" + "smithy.api#documentation": "

The protocol settings that are configured for your server.

\n
    \n
  • \n

    \n Use the PassiveIp parameter to indicate passive mode (for FTP and FTPS protocols).\n Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.\n

    \n
  • \n
  • \n

    Use the SetStatOption to ignore the error that is generated when the client attempts to use SETSTAT on a file you are uploading to an S3 bucket.\n Set the value to ENABLE_NO_OP to have the Transfer Family server ignore the SETSTAT command, and upload files without needing to make any changes to your SFTP client.\n Note that with SetStatOption set to ENABLE_NO_OP, Transfer generates a log entry to CloudWatch Logs, so you can determine when the client\n is making a SETSTAT call.

    \n
  • \n
  • \n

    Use the TlsSessionResumptionMode parameter to determine whether or not your Transfer server\n resumes recent, negotiated sessions through a unique session ID.

    \n
  • \n
" } }, "SecurityPolicyName": { @@ -3236,6 +3236,12 @@ "traits": { "smithy.api#documentation": "

A property used with Transfer servers that use the FTPS protocol. TLS Session Resumption provides a mechanism to resume or share a negotiated secret\n key between the control and data connection for an FTPS session. TlsSessionResumptionMode determines whether or not the server resumes recent,\n negotiated sessions through a unique session ID. This property is available during CreateServer and UpdateServer calls.\n If a TlsSessionResumptionMode value is not specified during CreateServer, it is set to ENFORCED by default.

\n
    \n
  • \n

    \n DISABLED: the server does not process TLS session resumption client requests and creates a new TLS session for each request.

    \n
  • \n
  • \n

    \n ENABLED: the server processes and accepts clients that are performing TLS session resumption.\n The server doesn't reject client data connections that do not perform the TLS session resumption client processing.

    \n
  • \n
  • \n

    \n ENFORCED: the server processes and accepts clients that are performing TLS session resumption.\n The server rejects client data connections that do not perform the TLS session resumption client processing.\n Before you set the value to ENFORCED, test your clients.

    \n \n

    Not all FTPS clients perform TLS session resumption. So, if you choose to enforce\n TLS session resumption, you prevent any connections from FTPS clients that don't perform\n the protocol negotiation. To determine whether or not you can use the\n ENFORCED value, you need to test your clients.

    \n
    \n
  • \n
" } + }, + "SetStatOption": { + "target": "com.amazonaws.transfer#SetStatOption", + "traits": { + "smithy.api#documentation": "

Use the SetStatOption to ignore the error that is generated when the client attempts to use SETSTAT on a file you are uploading to an S3 bucket.

\n

Some SFTP file transfer clients can attempt to change the attributes of remote files, including timestamp and permissions, using commands, such as SETSTAT when uploading the file.\n However, these commands are not compatible with object storage systems, such as Amazon S3. Due to this incompatibility, file uploads from these clients can result in errors even when \n the file is otherwise successfully uploaded.

\n

Set the value to ENABLE_NO_OP to have the Transfer Family server ignore the SETSTAT command, and upload files without needing to make any changes to your SFTP client.\n While the SetStatOption \n ENABLE_NO_OP setting ignores the error, it does generate a log entry in CloudWatch Logs, so you can determine when the client is making a SETSTAT call.

\n \n

If you want to preserve the original timestamp for your file, and modify other file attributes using SETSTAT, you can use Amazon EFS as backend storage with Transfer Family.

\n
" + } } }, "traits": { @@ -3661,6 +3667,21 @@ "smithy.api#pattern": "^[\\w-]*$" } }, + "com.amazonaws.transfer#SetStatOption": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DEFAULT", + "name": "DEFAULT" + }, + { + "value": "ENABLE_NO_OP", + "name": "ENABLE_NO_OP" + } + ] + } + }, "com.amazonaws.transfer#SourceFileLocation": { "type": "string", "traits": { @@ -4459,7 +4480,7 @@ "ProtocolDetails": { "target": "com.amazonaws.transfer#ProtocolDetails", "traits": { - "smithy.api#documentation": "

\n The protocol settings that are configured for your server.\n

\n

\n Use the PassiveIp parameter to indicate passive mode (for FTP and FTPS protocols).\n Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.\n

\n

Use the TlsSessionResumptionMode parameter to determine whether or not your Transfer server\n resumes recent, negotiated sessions through a unique session ID.

" + "smithy.api#documentation": "

The protocol settings that are configured for your server.

\n
    \n
  • \n

    \n Use the PassiveIp parameter to indicate passive mode (for FTP and FTPS protocols).\n Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.\n

    \n
  • \n
  • \n

    Use the SetStatOption to ignore the error that is generated when the client attempts to use SETSTAT on a file you are uploading to an S3 bucket.\n Set the value to ENABLE_NO_OP to have the Transfer Family server ignore the SETSTAT command, and upload files without needing to make any changes to your SFTP client.\n Note that with SetStatOption set to ENABLE_NO_OP, Transfer generates a log entry to CloudWatch Logs, so you can determine when the client\n is making a SETSTAT call.

    \n
  • \n
  • \n

    Use the TlsSessionResumptionMode parameter to determine whether or not your Transfer server\n resumes recent, negotiated sessions through a unique session ID.

    \n
  • \n
" } }, "EndpointDetails": { diff --git a/aws/sdk/aws-models/voice-id.json b/aws/sdk/aws-models/voice-id.json index 83f58b52388..3b7f6448ee6 100644 --- a/aws/sdk/aws-models/voice-id.json +++ b/aws/sdk/aws-models/voice-id.json @@ -72,6 +72,10 @@ { "value": "SPEAKER_ID_NOT_PROVIDED", "name": "SPEAKER_ID_NOT_PROVIDED" + }, + { + "value": "SPEAKER_EXPIRED", + "name": "SPEAKER_EXPIRED" } ] } @@ -231,8 +235,7 @@ "smithy.api#documentation": "

Creates a domain that contains all Amazon Connect Voice ID data, such as speakers, fraudsters, customer \n audio, and voiceprints.\n

", "smithy.api#http": { "method": "POST", - "uri": "/domains", - "code": 200 + "uri": "/domains" }, "smithy.api#idempotent": {} } @@ -302,6 +305,9 @@ "input": { "target": "com.amazonaws.voiceid#DeleteDomainRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.voiceid#AccessDeniedException" @@ -349,6 +355,9 @@ "input": { "target": "com.amazonaws.voiceid#DeleteFraudsterRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.voiceid#AccessDeniedException" @@ -401,6 +410,9 @@ "input": { "target": "com.amazonaws.voiceid#DeleteSpeakerRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.voiceid#AccessDeniedException" @@ -480,8 +492,7 @@ "smithy.api#documentation": "

Describes the specified domain.

", "smithy.api#http": { "method": "GET", - "uri": "/domains/{DomainId}", - "code": 200 + "uri": "/domains/{DomainId}" } } }, @@ -538,8 +549,7 @@ "smithy.api#documentation": "

Describes the specified fraudster.

", "smithy.api#http": { "method": "GET", - "uri": "/domains/{DomainId}/fraudsters/{FraudsterId}", - "code": 200 + "uri": "/domains/{DomainId}/fraudsters/{FraudsterId}" } } }, @@ -572,8 +582,7 @@ "smithy.api#documentation": "

Describes the specified fraudster registration job.

", "smithy.api#http": { "method": "GET", - "uri": "/domains/{DomainId}/fraudster-registration-jobs/{JobId}", - "code": 200 + "uri": "/domains/{DomainId}/fraudster-registration-jobs/{JobId}" } } }, @@ -670,8 +679,7 @@ "smithy.api#documentation": "

Describes the specified speaker.

", "smithy.api#http": { "method": "GET", - "uri": "/domains/{DomainId}/speakers/{SpeakerId}", - "code": 200 + "uri": "/domains/{DomainId}/speakers/{SpeakerId}" } } }, @@ -704,8 +712,7 @@ "smithy.api#documentation": "

Describes the specified speaker enrollment job.

", "smithy.api#http": { "method": "GET", - "uri": "/domains/{DomainId}/speaker-enrollment-jobs/{JobId}", - "code": 200 + "uri": "/domains/{DomainId}/speaker-enrollment-jobs/{JobId}" } } }, @@ -1026,8 +1033,7 @@ "smithy.api#documentation": "

Evaluates a specified session based on audio data accumulated during a streaming Amazon Connect Voice \n ID call.

", "smithy.api#http": { "method": "PUT", - "uri": "/sessions/{SessionNameOrId}/evaluate", - "code": 200 + "uri": "/sessions/{SessionNameOrId}/evaluate" } } }, @@ -1626,12 +1632,12 @@ "smithy.api#documentation": "

Lists all the domains in the Amazon Web Services account.\n

", "smithy.api#http": { "method": "GET", - "uri": "/domains", - "code": 200 + "uri": "/domains" }, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "DomainSummaries", "pageSize": "MaxResults" } } @@ -1701,12 +1707,12 @@ "smithy.api#documentation": "

Lists all the fraudster registration jobs in the domain with the given JobStatus.\n If JobStatus is not provided, this lists all fraudster registration jobs in the given\n domain.\n

", "smithy.api#http": { "method": "GET", - "uri": "/domains/{DomainId}/fraudster-registration-jobs", - "code": 200 + "uri": "/domains/{DomainId}/fraudster-registration-jobs" }, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "JobSummaries", "pageSize": "MaxResults" } } @@ -1791,12 +1797,12 @@ "smithy.api#documentation": "

Lists all the speaker enrollment jobs in the domain with the specified JobStatus. If\n JobStatus is not provided, this lists all jobs with all possible speaker enrollment job\n statuses.

", "smithy.api#http": { "method": "GET", - "uri": "/domains/{DomainId}/speaker-enrollment-jobs", - "code": 200 + "uri": "/domains/{DomainId}/speaker-enrollment-jobs" }, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "JobSummaries", "pageSize": "MaxResults" } } @@ -1881,12 +1887,12 @@ "smithy.api#documentation": "

Lists all speakers in a specified domain.

", "smithy.api#http": { "method": "GET", - "uri": "/domains/{DomainId}/speakers", - "code": 200 + "uri": "/domains/{DomainId}/speakers" }, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "SpeakerSummaries", "pageSize": "MaxResults" } } @@ -1963,9 +1969,8 @@ "traits": { "smithy.api#documentation": "

Lists all tags associated with a specified Voice ID resource.

", "smithy.api#http": { - "method": "GET", "uri": "/tags/{ResourceArn}", - "code": 200 + "method": "GET" } } }, @@ -2055,8 +2060,7 @@ "smithy.api#documentation": "

Opts out a speaker from Voice ID system. A speaker can be opted out regardless of whether or not they\n already exist in the system. If they don't yet exist, a new speaker is created in an opted out state.\n If they already exist, their existing status is overridden and they are opted out. Enrollment and\n evaluation authentication requests are rejected for opted out speakers, and opted out speakers have\n no voice embeddings stored in the system.

", "smithy.api#http": { "method": "PUT", - "uri": "/domains/{DomainId}/speakers/{SpeakerId}/optout", - "code": 200 + "uri": "/domains/{DomainId}/speakers/{SpeakerId}/optout" } } }, @@ -2299,6 +2303,12 @@ "traits": { "smithy.api#documentation": "

A timestamp showing the speaker's last update.

" } + }, + "LastAccessedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.

" + } } }, "traits": { @@ -2552,6 +2562,12 @@ "traits": { "smithy.api#documentation": "

A timestamp showing the speaker's last update.

" } + }, + "LastAccessedAt": { + "target": "com.amazonaws.voiceid#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.

" + } } }, "traits": { @@ -2593,8 +2609,7 @@ "smithy.api#documentation": "

Starts a new batch fraudster registration job using provided details.

", "smithy.api#http": { "method": "POST", - "uri": "/domains/{DomainId}/fraudster-registration-jobs", - "code": 200 + "uri": "/domains/{DomainId}/fraudster-registration-jobs" }, "smithy.api#idempotent": {} } @@ -2698,8 +2713,7 @@ "smithy.api#documentation": "

Starts a new batch speaker enrollment job using specified details.

", "smithy.api#http": { "method": "POST", - "uri": "/domains/{DomainId}/speaker-enrollment-jobs", - "code": 200 + "uri": "/domains/{DomainId}/speaker-enrollment-jobs" }, "smithy.api#idempotent": {} } @@ -2883,9 +2897,8 @@ "traits": { "smithy.api#documentation": "

Tags an Amazon Connect Voice ID resource with the provided list of tags.

", "smithy.api#http": { - "method": "POST", "uri": "/tags/{ResourceArn}", - "code": 200 + "method": "POST" } } }, @@ -2981,8 +2994,8 @@ "traits": { "smithy.api#documentation": "

Removes specified tags from a specified Amazon Connect Voice ID resource.

", "smithy.api#http": { - "method": "DELETE", "uri": "/tags/{ResourceArn}", + "method": "DELETE", "code": 204 } } @@ -3044,8 +3057,7 @@ "smithy.api#documentation": "

Updates the specified domain. This API has clobber behavior, and clears and replaces all attributes.\n If an optional field, such as 'Description' is not provided, it is removed from the domain.

", "smithy.api#http": { "method": "PUT", - "uri": "/domains/{DomainId}", - "code": 200 + "uri": "/domains/{DomainId}" } } }, @@ -3108,6 +3120,21 @@ }, "com.amazonaws.voiceid#VoiceID": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Voice ID", + "arnNamespace": "voiceid", + "cloudFormationName": "VoiceID", + "cloudTrailEventSource": "voiceid.amazonaws.com", + "endpointPrefix": "voiceid" + }, + "aws.auth#sigv4": { + "name": "voiceid" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "

Amazon Connect Voice ID provides real-time caller authentication and fraud screening. This guide\n describes the APIs used for this service.\n

", + "smithy.api#title": "Amazon Voice ID" + }, "version": "2021-09-27", "operations": [ { @@ -3173,22 +3200,7 @@ { "target": "com.amazonaws.voiceid#UpdateDomain" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Voice ID", - "arnNamespace": "voiceid", - "cloudFormationName": "VoiceID", - "cloudTrailEventSource": "voiceid.amazonaws.com", - "endpointPrefix": "voiceid" - }, - "aws.auth#sigv4": { - "name": "voiceid" - }, - "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "

Amazon Connect Voice ID provides real-time caller authentication and fraud screening. This guide\n describes the APIs used for this service.\n

", - "smithy.api#title": "Amazon Voice ID" - } + ] } } } diff --git a/aws/sdk/aws-models/workspaces-web.json b/aws/sdk/aws-models/workspaces-web.json index 6c48f08d58b..2f48ae915c9 100644 --- a/aws/sdk/aws-models/workspaces-web.json +++ b/aws/sdk/aws-models/workspaces-web.json @@ -499,7 +499,8 @@ "min": 2, "max": 131072 }, - "smithy.api#pattern": "\\{[\\S\\s]*\\}\\s*" + "smithy.api#pattern": "\\{[\\S\\s]*\\}\\s*", + "smithy.api#sensitive": {} } }, "com.amazonaws.workspacesweb#BrowserSettings": { @@ -827,6 +828,9 @@ { "target": "com.amazonaws.workspacesweb#ResourceNotFoundException" }, + { + "target": "com.amazonaws.workspacesweb#ServiceQuotaExceededException" + }, { "target": "com.amazonaws.workspacesweb#ThrottlingException" }, @@ -870,7 +874,7 @@ "identityProviderDetails": { "target": "com.amazonaws.workspacesweb#IdentityProviderDetails", "traits": { - "smithy.api#documentation": "

The identity provider details. The following list describes the provider detail keys for\n each identity provider type.

\n
    \n
  • \n

    For Google and Login with Amazon:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    \n
  • \n
  • \n

    For Facebook:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    • \n

      \n api_version\n

      \n
    • \n
    \n
  • \n
  • \n

    For Sign in with Apple:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n team_id\n

      \n
    • \n
    • \n

      \n key_id\n

      \n
    • \n
    • \n

      \n private_key\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    \n
  • \n
  • \n

    For OIDC providers:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n attributes_request_method\n

      \n
    • \n
    • \n

      \n oidc_issuer\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    • \n

      \n authorize_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n token_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n attributes_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n jwks_uri\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    \n
  • \n
  • \n

    For SAML providers:

    \n
      \n
    • \n

      \n MetadataFile OR MetadataURL\n

      \n
    • \n
    • \n

      \n IDPSignout\n optional\n

      \n
    • \n
    \n
  • \n
", + "smithy.api#documentation": "

The identity provider details. The following list describes the provider detail keys for\n each identity provider type.

\n
    \n
  • \n

    For Google and Login with Amazon:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    \n
  • \n
  • \n

    For Facebook:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    • \n

      \n api_version\n

      \n
    • \n
    \n
  • \n
  • \n

    For Sign in with Apple:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n team_id\n

      \n
    • \n
    • \n

      \n key_id\n

      \n
    • \n
    • \n

      \n private_key\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    \n
  • \n
  • \n

    For OIDC providers:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n attributes_request_method\n

      \n
    • \n
    • \n

      \n oidc_issuer\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    • \n

      \n authorize_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n token_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n attributes_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n jwks_uri\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    \n
  • \n
  • \n

    For SAML providers:

    \n
      \n
    • \n

      \n MetadataFile OR MetadataURL\n

      \n
    • \n
    • \n

      \n IDPSignout (boolean) \n optional\n

      \n
    • \n
    \n
  • \n
", "smithy.api#required": {} } }, @@ -1233,6 +1237,18 @@ "smithy.api#documentation": "

The tags to add to the user settings resource. A tag is a key-value pair.

" } }, + "disconnectTimeoutInMinutes": { + "target": "com.amazonaws.workspacesweb#DisconnectTimeoutInMinutes", + "traits": { + "smithy.api#documentation": "

The amount of time that a streaming session remains active after users disconnect.

" + } + }, + "idleDisconnectTimeoutInMinutes": { + "target": "com.amazonaws.workspacesweb#IdleDisconnectTimeoutInMinutes", + "traits": { + "smithy.api#documentation": "

The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.

" + } + }, "clientToken": { "target": "com.amazonaws.workspacesweb#ClientToken", "traits": { @@ -1774,6 +1790,16 @@ "type": "structure", "members": {} }, + "com.amazonaws.workspacesweb#DisconnectTimeoutInMinutes": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 600 + } + } + }, "com.amazonaws.workspacesweb#DisplayName": { "type": "string", "traits": { @@ -1781,7 +1807,8 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "^.+$" + "smithy.api#pattern": "^.+$", + "smithy.api#sensitive": {} } }, "com.amazonaws.workspacesweb#EnabledType": { @@ -2347,6 +2374,9 @@ }, "value": { "target": "com.amazonaws.workspacesweb#StringType" + }, + "traits": { + "smithy.api#sensitive": {} } }, "com.amazonaws.workspacesweb#IdentityProviderList": { @@ -2362,7 +2392,8 @@ "min": 1, "max": 32 }, - "smithy.api#pattern": "^[^_][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_]+$" + "smithy.api#pattern": "^[^_][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_]+$", + "smithy.api#sensitive": {} } }, "com.amazonaws.workspacesweb#IdentityProviderSummary": { @@ -2422,6 +2453,16 @@ ] } }, + "com.amazonaws.workspacesweb#IdleDisconnectTimeoutInMinutes": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 60 + } + } + }, "com.amazonaws.workspacesweb#InternalServerException": { "type": "structure", "members": { @@ -3491,7 +3532,8 @@ } }, "traits": { - "smithy.api#documentation": "

The tag.

" + "smithy.api#documentation": "

The tag.

", + "smithy.api#sensitive": {} } }, "com.amazonaws.workspacesweb#TagExceptionMessage": { @@ -3504,7 +3546,8 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + "smithy.api#sensitive": {} } }, "com.amazonaws.workspacesweb#TagKeyList": { @@ -3606,7 +3649,8 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + "smithy.api#sensitive": {} } }, "com.amazonaws.workspacesweb#ThrottlingException": { @@ -3861,7 +3905,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the identity provider.

", + "smithy.api#documentation": "

Updates the identity provider.

", "smithy.api#http": { "method": "PATCH", "uri": "/identityProviders/{identityProviderArn+}", @@ -3895,7 +3939,7 @@ "identityProviderDetails": { "target": "com.amazonaws.workspacesweb#IdentityProviderDetails", "traits": { - "smithy.api#documentation": "

The details of the identity provider.

" + "smithy.api#documentation": "

The details of the identity provider. The following list describes the provider detail keys for\n each identity provider type.

\n
    \n
  • \n

    For Google and Login with Amazon:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    \n
  • \n
  • \n

    For Facebook:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    • \n

      \n api_version\n

      \n
    • \n
    \n
  • \n
  • \n

    For Sign in with Apple:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n team_id\n

      \n
    • \n
    • \n

      \n key_id\n

      \n
    • \n
    • \n

      \n private_key\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    \n
  • \n
  • \n

    For OIDC providers:

    \n
      \n
    • \n

      \n client_id\n

      \n
    • \n
    • \n

      \n client_secret\n

      \n
    • \n
    • \n

      \n attributes_request_method\n

      \n
    • \n
    • \n

      \n oidc_issuer\n

      \n
    • \n
    • \n

      \n authorize_scopes\n

      \n
    • \n
    • \n

      \n authorize_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n token_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n attributes_url\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    • \n

      \n jwks_uri\n if not available from discovery URL specified by\n oidc_issuer key\n

      \n
    • \n
    \n
  • \n
  • \n

    For SAML providers:

    \n
      \n
    • \n

      \n MetadataFile OR MetadataURL\n

      \n
    • \n
    • \n

      \n IDPSignout (boolean) \n optional\n

      \n
    • \n
    \n
  • \n
" } }, "clientToken": { @@ -4224,6 +4268,18 @@ "smithy.api#documentation": "

Specifies whether the user can print to the local device.

" } }, + "disconnectTimeoutInMinutes": { + "target": "com.amazonaws.workspacesweb#DisconnectTimeoutInMinutes", + "traits": { + "smithy.api#documentation": "

The amount of time that a streaming session remains active after users disconnect.

" + } + }, + "idleDisconnectTimeoutInMinutes": { + "target": "com.amazonaws.workspacesweb#IdleDisconnectTimeoutInMinutes", + "traits": { + "smithy.api#documentation": "

The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.

" + } + }, "clientToken": { "target": "com.amazonaws.workspacesweb#ClientToken", "traits": { @@ -4290,6 +4346,18 @@ "traits": { "smithy.api#documentation": "

Specifies whether the user can print to the local device.

" } + }, + "disconnectTimeoutInMinutes": { + "target": "com.amazonaws.workspacesweb#DisconnectTimeoutInMinutes", + "traits": { + "smithy.api#documentation": "

The amount of time that a streaming session remains active after users disconnect.

" + } + }, + "idleDisconnectTimeoutInMinutes": { + "target": "com.amazonaws.workspacesweb#IdleDisconnectTimeoutInMinutes", + "traits": { + "smithy.api#documentation": "

The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.

" + } } }, "traits": { @@ -4340,6 +4408,18 @@ "traits": { "smithy.api#documentation": "

Specifies whether the user can print to the local device.

" } + }, + "disconnectTimeoutInMinutes": { + "target": "com.amazonaws.workspacesweb#DisconnectTimeoutInMinutes", + "traits": { + "smithy.api#documentation": "

The amount of time that a streaming session remains active after users disconnect.

" + } + }, + "idleDisconnectTimeoutInMinutes": { + "target": "com.amazonaws.workspacesweb#IdleDisconnectTimeoutInMinutes", + "traits": { + "smithy.api#documentation": "

The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.

" + } } }, "traits": { diff --git a/aws/sdk/aws-models/workspaces.json b/aws/sdk/aws-models/workspaces.json index 08cf7d68748..600d5c1647d 100644 --- a/aws/sdk/aws-models/workspaces.json +++ b/aws/sdk/aws-models/workspaces.json @@ -475,7 +475,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 600 + "max": 850 }, "smithy.api#pattern": "^.*$" } diff --git a/gradle.properties b/gradle.properties index 28617090026..fb4504bf4b5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,10 +10,10 @@ org.gradle.jvmargs=-Xmx1024M # Version number to use for the generated SDK # Note: these must always be full 3-segment semver versions -aws.sdk.version=0.12.0 +aws.sdk.version=0.13.0 # Version number to use for the generated runtime crates -smithy.rs.runtime.crate.version=0.42.0 +smithy.rs.runtime.crate.version=0.43.0 kotlin.code.style=official From f8867814ba3461d192113cf4aabba2bd087a4747 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Tue, 31 May 2022 17:07:49 -0700 Subject: [PATCH 11/49] Refactor `sdk-versioner` to operate off the versions manifest (#1420) --- aws/sdk/build.gradle.kts | 15 +- tools/sdk-versioner/src/main.rs | 239 +++++++++++++++++++++----------- 2 files changed, 167 insertions(+), 87 deletions(-) diff --git a/aws/sdk/build.gradle.kts b/aws/sdk/build.gradle.kts index 2ba2b2cb1da..d1df765a428 100644 --- a/aws/sdk/build.gradle.kts +++ b/aws/sdk/build.gradle.kts @@ -56,7 +56,6 @@ val awsServices: AwsServices by lazy { discoverServices(loadServiceMembership()) val eventStreamAllowList: Set by lazy { eventStreamAllowList() } fun getSdkVersion(): String = properties.get("aws.sdk.version") ?: throw Exception("SDK version missing") -fun getSmithyRsVersion(): String = properties.get("smithy.rs.runtime.crate.version") ?: throw Exception("smithy-rs version missing") fun getRustMSRV(): String = properties.get("rust.msrv") ?: throw Exception("Rust MSRV missing") fun getPreviousReleaseVersionManifestPath(): String? = properties.get("aws.sdk.previous.release.versions.manifest") @@ -206,14 +205,14 @@ tasks.register("fixExampleManifests") { toolPath = sdkVersionerToolPath binaryName = "sdk-versioner" arguments = listOf( - outputDir.resolve("examples").absolutePath, + "use-path-and-version-dependencies", "--sdk-path", "../../sdk", - "--sdk-version", getSdkVersion(), - "--smithy-version", getSmithyRsVersion() + "--versions-toml", outputDir.resolve("versions.toml").absolutePath, + outputDir.resolve("examples").absolutePath ) outputs.dir(outputDir) - dependsOn("relocateExamples") + dependsOn("relocateExamples", "generateVersionManifest") } /** @@ -307,7 +306,6 @@ tasks.register("fixManifests") { dependsOn("relocateRuntime") dependsOn("relocateAwsRuntime") dependsOn("relocateExamples") - dependsOn("fixExampleManifests") } tasks.register("hydrateReadme") { @@ -369,9 +367,10 @@ tasks.register("finalizeSdk") { "relocateExamples", "generateIndexMd", "fixManifests", + "generateVersionManifest", + "fixExampleManifests", "hydrateReadme", - "relocateChangelog", - "generateVersionManifest" + "relocateChangelog" ) } diff --git a/tools/sdk-versioner/src/main.rs b/tools/sdk-versioner/src/main.rs index 248167a488e..0e12f791d7e 100644 --- a/tools/sdk-versioner/src/main.rs +++ b/tools/sdk-versioner/src/main.rs @@ -3,9 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -use anyhow::bail; +use anyhow::{bail, Result}; use clap::Parser; use smithy_rs_tool_common::package::{PackageCategory, SDK_PREFIX}; +use smithy_rs_tool_common::versions_manifest::VersionsManifest; use std::ffi::OsStr; use std::fs; use std::path::{Path, PathBuf}; @@ -18,56 +19,102 @@ use toml::value::{Table, Value}; about = "CLI tool to recursively update SDK/Smithy crate references in Cargo.toml files", version )] -struct Args { - /// Path(s) to recursively update Cargo.toml files in - #[clap()] - crate_paths: Vec, - - /// SDK version to point to - #[clap(long)] - sdk_version: Option, - /// Smithy version to point to - #[clap(long)] - smithy_version: Option, - - /// Path to generated SDK to point to - #[clap(long)] - sdk_path: Option, +#[allow(clippy::enum_variant_names)] // Want the "use" prefix in the CLI subcommand names for clarity +enum Args { + /// Revise crates to use paths in dependencies + UsePathDependencies { + /// Root SDK path the path dependencies will be based off of + #[clap(long)] + sdk_path: PathBuf, + /// Path(s) to recursively update Cargo.toml files in + #[clap()] + crate_paths: Vec, + }, + /// Revise crates to use version numbers in dependencies + UseVersionDependencies { + /// Path to a `versions.toml` file with crate versions to use + #[clap(long)] + versions_toml: PathBuf, + /// Path(s) to recursively update Cargo.toml files in + #[clap()] + crate_paths: Vec, + }, + /// Revise crates to use version numbers AND paths in dependencies + UsePathAndVersionDependencies { + /// Root SDK path the path dependencies will be based off of + #[clap(long)] + sdk_path: PathBuf, + /// Path to a `versions.toml` file with crate versions to use + #[clap(long)] + versions_toml: PathBuf, + /// Path(s) to recursively update Cargo.toml files in + #[clap()] + crate_paths: Vec, + }, } impl Args { - fn validate(self) -> anyhow::Result { - if self.crate_paths.is_empty() { - bail!("Must provide at least one crate path to recursively update"); - } - if self.sdk_version.is_none() && self.sdk_path.is_none() { - bail!("Must provide either an SDK version or an SDK path to update to"); + fn crate_paths(&self) -> &[PathBuf] { + match self { + Self::UsePathDependencies { crate_paths, .. } => crate_paths, + Self::UseVersionDependencies { crate_paths, .. } => crate_paths, + Self::UsePathAndVersionDependencies { crate_paths, .. } => crate_paths, } - if self.sdk_version.is_some() != self.smithy_version.is_some() { - bail!("Must provide a Smithy version when providing an SDK version to update to"); + } + + fn validate(self) -> Result { + if self.crate_paths().is_empty() { + bail!("Must provide at least one crate path to recursively update"); } Ok(self) } } -fn main() -> anyhow::Result<()> { - let opt = Args::parse().validate()?; +struct DependencyContext<'a> { + sdk_path: Option<&'a Path>, + versions_manifest: Option, +} + +fn main() -> Result<()> { + let args = Args::parse().validate()?; + + let dependency_context = match &args { + Args::UsePathDependencies { sdk_path, .. } => DependencyContext { + sdk_path: Some(sdk_path), + versions_manifest: None, + }, + Args::UseVersionDependencies { versions_toml, .. } => DependencyContext { + sdk_path: None, + versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), + }, + Args::UsePathAndVersionDependencies { + sdk_path, + versions_toml, + .. + } => DependencyContext { + sdk_path: Some(sdk_path), + versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), + }, + }; let start_time = Instant::now(); let mut manifest_paths = Vec::new(); - for crate_path in &opt.crate_paths { + for crate_path in args.crate_paths() { discover_manifests(&mut manifest_paths, crate_path)?; } for manifest_path in manifest_paths { - update_manifest(&manifest_path, &opt)?; + update_manifest(&manifest_path, &dependency_context)?; } println!("Finished in {:?}", start_time.elapsed()); Ok(()) } -fn update_manifest(manifest_path: &Path, opt: &Args) -> anyhow::Result<()> { +fn update_manifest( + manifest_path: &Path, + dependency_context: &DependencyContext, +) -> anyhow::Result<()> { println!("Updating {:?}...", manifest_path); let mut metadata: Value = toml::from_slice(&fs::read(manifest_path)?)?; @@ -81,7 +128,9 @@ fn update_manifest(manifest_path: &Path, opt: &Args) -> anyhow::Result<()> { manifest_path ); } - changed = update_dependencies(dependencies.as_table_mut().unwrap(), opt)? || changed; + changed = + update_dependencies(dependencies.as_table_mut().unwrap(), dependency_context)? + || changed; } } @@ -92,7 +141,10 @@ fn update_manifest(manifest_path: &Path, opt: &Args) -> anyhow::Result<()> { Ok(()) } -fn update_dependencies(dependencies: &mut Table, opt: &Args) -> anyhow::Result { +fn update_dependencies( + dependencies: &mut Table, + dependency_context: &DependencyContext, +) -> Result { let mut changed = false; for (key, value) in dependencies.iter_mut() { let category = PackageCategory::from_package_name(key); @@ -100,7 +152,7 @@ fn update_dependencies(dependencies: &mut Table, opt: &Args) -> anyhow::Result &str { } } -fn update_dependency_value(crate_name: &str, value: &mut Table, opt: &Args) { - let is_sdk_crate = matches!( - PackageCategory::from_package_name(crate_name), - PackageCategory::AwsSdk | PackageCategory::AwsRuntime, - ); - +fn update_dependency_value( + crate_name: &str, + value: &mut Table, + dependency_context: &DependencyContext, +) -> Result<()> { // Remove keys that will be replaced value.remove("git"); value.remove("branch"); @@ -131,7 +182,7 @@ fn update_dependency_value(crate_name: &str, value: &mut Table, opt: &Args) { value.remove("path"); // Set the `path` if one was given - if let Some(path) = &opt.sdk_path { + if let Some(path) = &dependency_context.sdk_path { let crate_path = path.join(crate_path_name(crate_name)); value.insert( "path".to_string(), @@ -146,20 +197,21 @@ fn update_dependency_value(crate_name: &str, value: &mut Table, opt: &Args) { } // Set the `version` if one was given - if opt.sdk_version.is_some() { - value.insert( - "version".to_string(), - Value::String( - if is_sdk_crate { - &opt.sdk_version - } else { - &opt.smithy_version - } - .clone() - .unwrap(), - ), - ); + if let Some(manifest) = &dependency_context.versions_manifest { + if let Some(crate_metadata) = manifest.crates.get(crate_name) { + value.insert( + "version".to_string(), + Value::String(crate_metadata.version.clone()), + ); + } else { + bail!( + "Crate `{}` was missing from the `versions.toml`", + crate_name + ); + } } + + Ok(()) } /// Recursively discovers Cargo.toml files in the given `path` and adds them to `manifests`. @@ -182,10 +234,35 @@ fn discover_manifests(manifests: &mut Vec, path: impl AsRef) -> a #[cfg(test)] mod tests { - use crate::{update_manifest, Args}; + use crate::{update_manifest, DependencyContext}; use pretty_assertions::assert_eq; + use smithy_rs_tool_common::package::PackageCategory; + use smithy_rs_tool_common::versions_manifest::{CrateVersion, VersionsManifest}; + use std::path::PathBuf; use toml::Value; + fn versions_toml_for(crates: &[(&str, &str)]) -> VersionsManifest { + VersionsManifest { + smithy_rs_revision: "doesntmatter".into(), + aws_doc_sdk_examples_revision: "doesntmatter".into(), + crates: crates + .iter() + .map(|&(name, version)| { + ( + name.to_string(), + CrateVersion { + category: PackageCategory::from_package_name(name), + version: version.into(), + source_hash: "doesntmatter".into(), + model_hash: None, + }, + ) + }) + .collect(), + release: None, + } + } + const TEST_MANIFEST: &[u8] = br#" [package] name = "test" @@ -200,12 +277,12 @@ mod tests { "#; #[track_caller] - fn test_with_opt(opt: Args, expected: &[u8]) { + fn test_with_context(context: DependencyContext, expected: &[u8]) { let manifest_file = tempfile::NamedTempFile::new().unwrap(); let manifest_path = manifest_file.into_temp_path(); std::fs::write(&manifest_path, TEST_MANIFEST).unwrap(); - update_manifest(&manifest_path, &opt).expect("success"); + update_manifest(&manifest_path, &context).expect("success"); let actual = toml::from_slice(&std::fs::read(&manifest_path).expect("read tmp file")) .expect("valid toml"); @@ -215,12 +292,15 @@ mod tests { #[test] fn update_dependencies_with_versions() { - test_with_opt( - Args { - crate_paths: Vec::new(), + test_with_context( + DependencyContext { sdk_path: None, - sdk_version: Some("0.5.0".to_string()), - smithy_version: Some("0.35.0".to_string()), + versions_manifest: Some(versions_toml_for(&[ + ("aws-config", "0.5.0"), + ("aws-sdk-s3", "0.13.0"), + ("aws-smithy-types", "0.10.0"), + ("aws-smithy-http", "0.9.0"), + ])), }, br#" [package] @@ -229,9 +309,9 @@ mod tests { [dependencies] aws-config = { version = "0.5.0" } - aws-sdk-s3 = { version = "0.5.0" } - aws-smithy-types = { version = "0.35.0" } - aws-smithy-http = { version = "0.35.0", features = ["test-util"] } + aws-sdk-s3 = { version = "0.13.0" } + aws-smithy-types = { version = "0.10.0" } + aws-smithy-http = { version = "0.9.0", features = ["test-util"] } something-else = "0.1" "#, ); @@ -239,12 +319,10 @@ mod tests { #[test] fn update_dependencies_with_paths() { - test_with_opt( - Args { - crate_paths: Vec::new(), - sdk_path: Some("/foo/asdf/".into()), - sdk_version: None, - smithy_version: None, + test_with_context( + DependencyContext { + sdk_path: Some(&PathBuf::from("/foo/asdf/")), + versions_manifest: None, }, br#" [package] @@ -263,23 +341,26 @@ mod tests { #[test] fn update_dependencies_with_versions_and_paths() { - test_with_opt( - Args { - crate_paths: Vec::new(), - sdk_path: Some("/foo/asdf/".into()), - sdk_version: Some("0.5.0".to_string()), - smithy_version: Some("0.35.0".to_string()), + test_with_context( + DependencyContext { + sdk_path: Some(&PathBuf::from("/foo/asdf/")), + versions_manifest: Some(versions_toml_for(&[ + ("aws-config", "0.5.0"), + ("aws-sdk-s3", "0.13.0"), + ("aws-smithy-types", "0.10.0"), + ("aws-smithy-http", "0.9.0"), + ])), }, - br#" + br#" [package] name = "test" version = "0.1.0" [dependencies] aws-config = { version = "0.5.0", path = "/foo/asdf/aws-config" } - aws-sdk-s3 = { version = "0.5.0", path = "/foo/asdf/s3" } - aws-smithy-types = { version = "0.35.0", path = "/foo/asdf/aws-smithy-types" } - aws-smithy-http = { version = "0.35.0", path = "/foo/asdf/aws-smithy-http", features = ["test-util"] } + aws-sdk-s3 = { version = "0.13.0", path = "/foo/asdf/s3" } + aws-smithy-types = { version = "0.10.0", path = "/foo/asdf/aws-smithy-types" } + aws-smithy-http = { version = "0.9.0", path = "/foo/asdf/aws-smithy-http", features = ["test-util"] } something-else = "0.1" "# ); From 8ef9a8580b0bfb30bd4062ab2bec3fb29e4cd18e Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Wed, 1 Jun 2022 10:03:23 -0500 Subject: [PATCH 12/49] add: article on difficulties Zelda encountered while implementing streaming checksums (#1427) * add: contributing docs overview page add: article on difficulties Zelda encountered while implementing streaming checksums update: SUMMARY.md table of contents add: link to contributor design docs in CONTRIBUTING.md --- CONTRIBUTING.md | 5 + design/src/SUMMARY.md | 3 + design/src/contributing/overview.md | 5 + ...a_low-level_feature_that_relies_on_HTTP.md | 353 ++++++++++++++++++ 4 files changed, 366 insertions(+) create mode 100644 design/src/contributing/overview.md create mode 100644 design/src/contributing/writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4b6a1c5081..e151b5afe8b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,3 +57,8 @@ If you discover a potential security issue in this project we ask that you notif ## Licensing See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. + +## More helpful information for contributors + +Part of our [design docs](./design/src/overview.md) are dedicated to helpful information for contributors. +[Take a look](./design/src/contributing/overview.md). diff --git a/design/src/SUMMARY.md b/design/src/SUMMARY.md index 6b1ebe20a54..787c6c4046d 100644 --- a/design/src/SUMMARY.md +++ b/design/src/SUMMARY.md @@ -29,3 +29,6 @@ - [RFC-0013: Body Callback APIs](./rfcs/rfc0013_body_callback_apis.md) - [RFC-0014: Fine-grained timeout configuration](./rfcs/rfc00014_timeout_config.md) - [RFC-0015: How Cargo "features" should be used in the SDK and runtime crates](./rfcs/rfc00015_using_features_responsibly.md) + +- [Contributing](./contributing/overview.md) + - [Writing and debugging a low-level feature that relies on HTTP](./contributing/writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md) diff --git a/design/src/contributing/overview.md b/design/src/contributing/overview.md new file mode 100644 index 00000000000..ab5498fbda8 --- /dev/null +++ b/design/src/contributing/overview.md @@ -0,0 +1,5 @@ +# Contributing + +This is a collection of written resources for smithy-rs and SDK contributors. + +- [Writing and debugging a low-level feature that relies on HTTP](./contributing/writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md) diff --git a/design/src/contributing/writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md b/design/src/contributing/writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md new file mode 100644 index 00000000000..8a15f29f4c9 --- /dev/null +++ b/design/src/contributing/writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md @@ -0,0 +1,353 @@ +# Writing and debugging a low-level feature that relies on HTTP + +## Background + +This article came about as a result of all the difficulties I encountered while developing the request checksums feature +laid out in the internal-only Flexible Checksums spec _(the feature is also highlighted in [this public blog post][S3 Flexible Checksums].)_ +I spent much more time developing the feature than I had anticipated. In this article, I'll talk about: + +- How the SDK sends requests with a body +- How the SDK sends requests with a streaming body +- The various issues I encountered and how I addressed them +- Key takeaways for contributors developing similar low-level features + +## How the SDK sends requests with a body + +All interactions between the SDK and a service are modeled as ["operations"][HTTP-based operations]. Operations contain: + +- A base HTTP request (with a potentially streaming body) +- A typed property bag of configuration options +- A fully generic response handler + +Users create operations piecemeal with a fluent builder. The options set in the builder are then used to create the +inner HTTP request, becoming headers or triggering specific request-building functionality (In this case, calculating a +checksum and attaching it either as a header or a trailer.) + +Here's [an example from the QLDB SDK of creating a body] from inputs and inserting it into the request to be sent: + +```rust +let body = aws_smithy_http::body::SdkBody::from( + crate::operation_ser::serialize_operation_crate_operation_send_command(&self)?, +); + +if let Some(content_length) = body.content_length() { + request = aws_smithy_http::header::set_request_header_if_absent( + request, + http::header::CONTENT_LENGTH, + content_length, + ); +} +let request = request.body(body).expect("should be valid request"); +``` + +Most all request body creation in the SDKs looks like that. Note how it automatically sets the `Content-Length` header +whenever the size of the body is known; It'll be relevant later. The body is read into memory and can be inspected +before the request is sent. This allows for things like calculating a checksum and then inserting it into the request +as a header. + +## How the SDK sends requests with a streaming body + +Often, sending a request with a streaming body looks much the same. However, it's not possible to read a streaming +body until you've sent the request. Any metadata that needs to be calculated by inspecting the body must be sent as +trailers. Additionally, some metadata, like `Content-Length`, can't be sent as a trailer at all. +[MDN maintains a helpful list] of metadata that can only be sent as a header. + +```rust +// When trailers are set, we must send an AWS-specific header that lists them named `x-amz-trailer`. +// For example, when sending a SHA256 checksum as a trailer, +// we have to send an `x-amz-trailer` header telling the service to watch out for it: +request + .headers_mut() + .insert( + http::header::HeaderName::from_static("x-amz-trailer"), + http::header::HeaderValue::from_static("x-amz-checksum-sha256"), + ); +``` + +## The issues I encountered while implementing checksums for streaming request bodies + +### `Content-Encoding: aws-chunked` + +When sending a request body with trailers, we must use an AWS-specific content encoding called `aws-chunked`. To encode +a request body for `aws-chunked` requires us to know the length of each chunk we're going to send before we send it. We +have to prefix each chunk with its size in bytes, represented by one or more [hexadecimal] digits. To close the body, we +send a final chunk with a zero. For example, the body "Hello world" would look like this when encoded: + +``` +B\r\n +Hello world\r\n +0\r\n +``` + +When sending a request body encoded in this way, we need to set two length headers: + +- `Content-Length` is the length of the entire request body, including the chunk size prefix and zero terminator. In the + example above, this would be 19. +- `x-amz-decoded-content-length` is the length of the decoded request body. In the example above, this would be 11. + +_**NOTE:** [`Content-Encoding`][Content-Encoding] is distinct from [`Transfer-Encoding`][Transfer-Encoding]. It's possible to +construct a request with both `Content-Encoding: chunked` AND `Transfer-Encoding: chunked`, although we don't ever need +to do that for SDK requests._ + +### S3 requires a `Content-Length` unless you also set `Transfer-Encoding: chunked` + +S3 does not require you to send a `Content-Length` header if you set the `Transfer-Encoding: chunked` header. That's +very helpful because it's not always possible to know the total length of a stream of bytes if that's what you're +constructing your request body from. However, when sending trailers, this part of the spec can be misleading. + +1. When sending a streaming request, we must send metadata like checksums as trailers +2. To send a request body with trailers, we must set the `Content-Encoding: aws-chunked` header +3. When using `aws-chunked` encoding for a request body, we must set the `x-amz-decoded-content-length` header with the + pre-encoding length of the request body. + +This means that we can't actually avoid having to know and specify the length of the request body when sending a request +to S3. This turns out to not be much of a problem for common use of the SDKs because most streaming request bodies are +constructed from files. In these cases we can ask the operating system for the file size before sending the request. So +long as that size doesn't change during sending of the request, all is well. In any other case, the request will fail. + +### Adding trailers to a request changes the size of that request + +Headers don't count towards the size of a request body, but trailers do. That means we need to take trailers (which +aren't sent until after the body) into account when setting the `Content-Length` header (which are sent before the +body.) This means that without setting `Transfer-Encoding: chunked`, the SDKs only support trailers of known length. +In the case of checksums, we're lucky because they're always going to be the same size. We must also take into account +the fact that checksum values are base64 encoded before being set (this lengthens them.) + +### `hyper` supports HTTP request trailers but isn't compatible with `Content-Encoding: aws-chunked` + +This was a big source of confusion for me, and I only figured out what was happening with the help of [@seanmonstar]. +When using `aws-chunked` encoding, the trailers have to be appended to the body as part of `poll_data` instead of +relying on the `poll_trailers` method. The working `http_body::Body` implementation of an `aws-chunked` encoded body +looked like this: + +```rust +impl Body for AwsChunkedBody { + type Data = Bytes; + type Error = aws_smithy_http::body::Error; + + fn poll_data( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>> { + let this = self.project(); + if *this.already_wrote_trailers { + return Poll::Ready(None); + } + + if *this.already_wrote_chunk_terminator { + return match this.inner.poll_trailers(cx) { + Poll::Ready(Ok(trailers)) => { + *this.already_wrote_trailers = true; + let total_length_of_trailers_in_bytes = this.options.trailer_lens.iter().sum(); + + Poll::Ready(Some(Ok(trailers_as_aws_chunked_bytes( + total_length_of_trailers_in_bytes, + trailers, + )))) + } + Poll::Pending => Poll::Pending, + Poll::Ready(err) => Poll::Ready(Some(err)), + }; + }; + + match this.inner.poll_data(cx) { + Poll::Ready(Some(Ok(mut data))) => { + let bytes = if *this.already_wrote_chunk_size_prefix { + data.copy_to_bytes(data.len()) + } else { + // A chunk must be prefixed by chunk size in hexadecimal + *this.already_wrote_chunk_size_prefix = true; + let total_chunk_size = this + .options + .chunk_length + .or(this.options.stream_length) + .unwrap_or_default(); + prefix_with_total_chunk_size(data, total_chunk_size) + }; + + Poll::Ready(Some(Ok(bytes))) + } + Poll::Ready(None) => { + *this.already_wrote_chunk_terminator = true; + Poll::Ready(Some(Ok(Bytes::from("\r\n0\r\n")))) + } + Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), + Poll::Pending => Poll::Pending, + } + } + + fn poll_trailers( + self: Pin<&mut Self>, + _cx: &mut Context<'_>, + ) -> Poll>, Self::Error>> { + // When using aws-chunked content encoding, trailers have to be appended to the body + Poll::Ready(Ok(None)) + } + + fn is_end_stream(&self) -> bool { + self.already_wrote_trailers + } + + fn size_hint(&self) -> SizeHint { + SizeHint::with_exact( + self.encoded_length() + .expect("Requests made with aws-chunked encoding must have known size") + as u64, + ) + } +} +``` + +### "The stream is closing early, and I don't know why" + +In my early implementation of `http_body::Body` for an `aws-chunked` encoded body, the body wasn't being completely read +out. The problem turned out to be that I was delegating to the `is_end_stream` trait method of the inner body. Because +the innermost body had no knowledge of the trailers I needed to send, it was reporting that the stream had ended. +The fix was to instead rely on the outermost body's knowledge of its own state in order to determine if all data had +been read. + +## What helped me to understand the problems and their solutions + +- **Reaching out to others that had specific knowledge of a problem:** Talking to a developer that had tackled this + feature for another SDK was a big help. Special thanks is due to [@jasdel] and the Go v2 SDK team. + [Their implementation][Go v2 SDK newUnsignedAWSChunkedEncoding] of an `aws-chunked` encoded body was the basis for + my own implementation. +- **Avoiding codegen**: The process of updating codegen code and then running codegen for each new change you make is + slow compared to running codegen once at the beginning of development and then just manually editing the generated SDK + as necessary. I still needed to run `./gradlew :aws:sdk:relocateAwsRuntime :aws:sdk:relocateRuntime` whenever I made + changes to a runtime crate but that was quick because it's just copying the files. Keep as much code out of codegen as + possible. It's much easier to modify/debug Rust than it is to write a working codegen module that does the same thing. + Whenever possible, write the codegen modules later, once the design has settled. +- **Using the `Display` impl for errors:** The `Display` impl for an error can ofter contain helpful info that might not + be visible when printing with the `Debug` impl. Case in point was an error I was getting because of the + `is_end_stream` issue. When `Debug` printed, the error looked like this: + + ``` + DispatchFailure(ConnectorError { err: hyper::Error(User(Body), hyper::Error(BodyWriteAborted)), kind: User }) + ``` + + That wasn't too helpful for me on its own. I looked into the `hyper` source code and found that the `Display` impl + contained a helpful message, so I matched into the error and printed the `hyper::Error` with the `Display` impl: + + ``` + user body write aborted: early end, expected 2 more bytes' + ``` + + This helped me understand that I wasn't encoding things correctly and was missing a CRLF. + +- **Echo Server**: I first used netcat and then later a small echo server written in Rust to see the raw HTTP request + being sent out by the SDK as I was working on it. The Rust SDK supports setting endpoints for request. This is often + used to send requests to something like [LocalStack], but I used it to send request to `localhost` instead: + + ```rust + #[tokio::test] + async fn test_checksum_on_streaming_request_against_s3() { + let sdk_config = aws_config::from_env() + .endpoint_resolver(Endpoint::immutable("http://localhost:8080".parse().expect("valid URI"))) + .load().await; + let s3_client = aws_sdk_s3::Client::new(&sdk_config); + + let input_text = b"Hello world"; + let _res = s3_client + .put_object() + .bucket("some-real-bucket") + .key("test.txt") + .body(aws_sdk_s3::types::ByteStream::from_static(input_text)) + .checksum_algorithm(ChecksumAlgorithm::Sha256) + .send() + .await + .unwrap(); + } + ``` + + The echo server was based off of an [axum] example and looked like this: + + ```rust + use axum::{ + body::{Body, Bytes}, + http::{request::Parts, Request, StatusCode}, + middleware::{self, Next}, + response::IntoResponse, + routing::put, + Router, + }; + use std::net::SocketAddr; + use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; + + #[tokio::main] + async fn main() { + tracing_subscriber::registry().with(tracing_subscriber::EnvFilter::new( + std::env::var("RUST_LOG").unwrap_or_else(|_| "trace".into()), + )) + .with(tracing_subscriber::fmt::layer()) + .init(); + + let app = Router::new() + .route("/", put(|| async move { "200 OK" })) + .layer(middleware::from_fn(print_request_response)); + + let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); + tracing::debug!("listening on {}", addr); + axum::Server::bind(&addr) + .serve(app.into_make_service()) + .await + .unwrap(); + } + + async fn print_request_response( + req: Request, + next: Next, + ) -> Result { + let (parts, body) = req.into_parts(); + + print_parts(&parts).await; + let bytes = buffer_and_print("request", body).await?; + let req = Request::from_parts(parts, Body::from(bytes)); + + let res = next.run(req).await; + + Ok(res) + } + + async fn print_parts(parts: &Parts) { + tracing::debug!("{:#?}", parts); + } + + async fn buffer_and_print(direction: &str, body: B) -> Result + where + B: axum::body::HttpBody, + B::Error: std::fmt::Display, + { + let bytes = match hyper::body::to_bytes(body).await { + Ok(bytes) => bytes, + Err(err) => { + return Err(( + StatusCode::BAD_REQUEST, + format!("failed to read {} body: {}", direction, err), + )); + } + }; + + if let Ok(body) = std::str::from_utf8(&bytes) { + tracing::debug!("{} body = {:?}", direction, body); + } + + Ok(bytes) + } + ``` + ## + +[S3 Flexible Checksums]: https://aws.amazon.com/blogs/aws/new-additional-checksum-algorithms-for-amazon-s3/ +[hyper::error::User::BodyWriteAborted]: https://github.com/hyperium/hyper/blob/740654e55d2bb2f50709f20fb4054a5504d8c2fb/src/error.rs#L98 +[HTTP-based operations]: ../transport/operation.md +[an example from the QLDB SDK of creating a body]: https://github.com/awslabs/aws-sdk-rust/blob/1bdfba7f53e77a478f60a1a387e4d9d31fd918fc/sdk/qldbsession/src/input.rs#L197 +[MDN maintains a helpful list]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer#directives +[hexadecimal]: https://en.wikipedia.org/wiki/Hexadecimal +[Content-Encoding]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding +[Transfer-Encoding]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding +[Go v2 SDK newUnsignedAWSChunkedEncoding]: https://github.com/aws/aws-sdk-go-v2/blob/c214cb61990441aa165e216a3f7e845c50d21939/service/internal/checksum/aws_chunked_encoding.go#L90 +[@seanmonstar]: https://github.com/seanmonstar +[@jasdel]: https://github.com/jasdel +[LocalStack]: https://localstack.cloud/ +[axum]: https://github.com/tokio-rs/axum +](writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md) From 4194333c8820dd634d15d5746ac4d28de735bf3e Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Wed, 1 Jun 2022 10:41:29 -0500 Subject: [PATCH 13/49] add: rfc template (#1428) add: info about RFC process update: CONTRIBUTING.md to mention RFCs --- CONTRIBUTING.md | 3 ++- design/src/rfcs/overview.md | 10 +++++++++ design/src/rfcs/rfc_template.md | 37 +++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 design/src/rfcs/rfc_template.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e151b5afe8b..7e9a0ce8154 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,8 @@ Contributions via pull requests are much appreciated. Before sending us a pull r 1. You are working against the latest source on the *main* branch. 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your time to be wasted. +3. **You open an issue to discuss any significant work** - we would hate for your time to be wasted. Alternatively, you + may submit an RFC. You can learn about our RFC process [here](./design/src/rfcs/overview.md). To send us a pull request, please: diff --git a/design/src/rfcs/overview.md b/design/src/rfcs/overview.md index 5955227b5f2..6243df804e6 100644 --- a/design/src/rfcs/overview.md +++ b/design/src/rfcs/overview.md @@ -1,5 +1,15 @@ # RFCs +**What is an RFC?:** An RFC is a document that proposes a change to `smithy-rs` or the AWS Rust SDK. Request for Comments means a request for discussion and oversight about the future of the project from maintainers, contributors and users. + +**When should I write an RFC?:** The AWS Rust SDK team proactively decides to write RFCs for major features or complex changes that we feel require extra scrutiny. However, the process can be used to request feedback on any change. Even changes that seem obvious and simple at first glance can be improved once a group of interested and experienced people have a chance to weigh in. + +**Who can submit an RFC?:** An RFC can be submitted by anyone. In most cases, RFCs are authored by SDK maintainers, but everyone is welcome to submit RFCs. + +**Where do I start?:** If you're ready to write and submit an RFC, please start a GitHub discussion with a summary of what you're trying to accomplish first. That way, the AWS Rust SDK team can ensure they have the bandwidth to review and shepherd the RFC through the whole process before you've expended effort in writing it. Once you've gotten the go-ahead, start with the [RFC template](./rfc_template.md). + +## Previously Submitted RFCs + - [RFC-0001: AWS Configuration](./rfc0001_shared_config.md) - [RFC-0002: Supporting multiple HTTP versions for SDKs that use Event Stream](./rfc0002_http_versions.md) - [RFC-0003: API for Presigned URLs](./rfc0003_presigning_api.md) diff --git a/design/src/rfcs/rfc_template.md b/design/src/rfcs/rfc_template.md new file mode 100644 index 00000000000..c6d511358f9 --- /dev/null +++ b/design/src/rfcs/rfc_template.md @@ -0,0 +1,37 @@ + +RFC: Your RFC +============= + + +> Status: RFC + + +For a summarized list of proposed changes, see the [Changes Checklist](#changes-checklist) section. + + +This RFC defines how... + + +Terminology +----------- + +- **Some Term**: A definition for that term + + +The user experience if this RFC is implemented +---------------------------------------------- + +In the current version of the SDK, users do X like this... +Once this RFC is implemented, users will do X like this instead... + + +How to actually implement this RFC +---------------------------------- + +In order to implement this feature, we need to add X and update Y... + + +Changes checklist +----------------- + +- [x] Create new struct `NewFeature` From 3df09cc1d26e638b0132dfc208216c24c3ab3bb7 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Thu, 2 Jun 2022 06:16:36 -0700 Subject: [PATCH 14/49] Fix release issues by introducing backwards compat into `sdk-versioner` (#1434) The `sdk-sync` tool is running into issues during release due to the `sdk-versioner` refactor commit since it is using a Docker build image with the tools precompiled into it. Either the `sdk-versioner` binary is too new and can't code generate the old commits, or it's too old and can't generate the new commits. This reintroduces the old `sdk-versioner` behavior so that it can succeed against both sets of commits to get a release out. --- tools/sdk-versioner/src/main.rs | 73 ++++---- tools/sdk-versioner/src/v1.rs | 286 ++++++++++++++++++++++++++++++++ 2 files changed, 329 insertions(+), 30 deletions(-) create mode 100644 tools/sdk-versioner/src/v1.rs diff --git a/tools/sdk-versioner/src/main.rs b/tools/sdk-versioner/src/main.rs index 0e12f791d7e..fd730fe9aec 100644 --- a/tools/sdk-versioner/src/main.rs +++ b/tools/sdk-versioner/src/main.rs @@ -13,6 +13,9 @@ use std::path::{Path, PathBuf}; use std::time::Instant; use toml::value::{Table, Value}; +// TODO(https://github.com/awslabs/smithy-rs/issues/1433): Remove this v1 impl +mod v1; + #[derive(Parser, Debug)] #[clap( name = "sdk-versioner", @@ -76,38 +79,48 @@ struct DependencyContext<'a> { } fn main() -> Result<()> { - let args = Args::parse().validate()?; - - let dependency_context = match &args { - Args::UsePathDependencies { sdk_path, .. } => DependencyContext { - sdk_path: Some(sdk_path), - versions_manifest: None, - }, - Args::UseVersionDependencies { versions_toml, .. } => DependencyContext { - sdk_path: None, - versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), - }, - Args::UsePathAndVersionDependencies { - sdk_path, - versions_toml, - .. - } => DependencyContext { - sdk_path: Some(sdk_path), - versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), - }, - }; - - let start_time = Instant::now(); - let mut manifest_paths = Vec::new(); - for crate_path in args.crate_paths() { - discover_manifests(&mut manifest_paths, crate_path)?; - } + match Args::try_parse() { + Ok(args) => { + let args = args.validate()?; + let dependency_context = match &args { + Args::UsePathDependencies { sdk_path, .. } => DependencyContext { + sdk_path: Some(sdk_path), + versions_manifest: None, + }, + Args::UseVersionDependencies { versions_toml, .. } => DependencyContext { + sdk_path: None, + versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), + }, + Args::UsePathAndVersionDependencies { + sdk_path, + versions_toml, + .. + } => DependencyContext { + sdk_path: Some(sdk_path), + versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), + }, + }; + + let start_time = Instant::now(); + let mut manifest_paths = Vec::new(); + for crate_path in args.crate_paths() { + discover_manifests(&mut manifest_paths, crate_path)?; + } - for manifest_path in manifest_paths { - update_manifest(&manifest_path, &dependency_context)?; - } + for manifest_path in manifest_paths { + update_manifest(&manifest_path, &dependency_context)?; + } - println!("Finished in {:?}", start_time.elapsed()); + println!("Finished in {:?}", start_time.elapsed()); + } + Err(err) => { + println!( + "WARN: failed to parse args: {}\nAttempting v1 arg format...", + err + ); + v1::main()?; + } + } Ok(()) } diff --git a/tools/sdk-versioner/src/v1.rs b/tools/sdk-versioner/src/v1.rs new file mode 100644 index 00000000000..c2a0e4b03f1 --- /dev/null +++ b/tools/sdk-versioner/src/v1.rs @@ -0,0 +1,286 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +//! This is all deprecated code kept around so that older commits can be code generated with the latest tools +//! to unblock a release. It can be deleted after the first successful release after this file was introduced. + +use anyhow::bail; +use clap::Parser; +use smithy_rs_tool_common::package::{PackageCategory, SDK_PREFIX}; +use std::ffi::OsStr; +use std::fs; +use std::path::{Path, PathBuf}; +use std::time::Instant; +use toml::value::{Table, Value}; + +#[derive(Parser, Debug)] +#[clap( + name = "sdk-versioner", + about = "CLI tool to recursively update SDK/Smithy crate references in Cargo.toml files", + version +)] +pub struct Args { + /// Path(s) to recursively update Cargo.toml files in + #[clap()] + crate_paths: Vec, + + /// SDK version to point to + #[clap(long)] + sdk_version: Option, + /// Smithy version to point to + #[clap(long)] + smithy_version: Option, + + /// Path to generated SDK to point to + #[clap(long)] + sdk_path: Option, +} + +impl Args { + fn validate(self) -> anyhow::Result { + if self.crate_paths.is_empty() { + bail!("Must provide at least one crate path to recursively update"); + } + if self.sdk_version.is_none() && self.sdk_path.is_none() { + bail!("Must provide either an SDK version or an SDK path to update to"); + } + if self.sdk_version.is_some() != self.smithy_version.is_some() { + bail!("Must provide a Smithy version when providing an SDK version to update to"); + } + Ok(self) + } +} + +pub fn main() -> anyhow::Result<()> { + let opt = Args::parse().validate()?; + + let start_time = Instant::now(); + let mut manifest_paths = Vec::new(); + for crate_path in &opt.crate_paths { + discover_manifests(&mut manifest_paths, crate_path)?; + } + + for manifest_path in manifest_paths { + update_manifest(&manifest_path, &opt)?; + } + + println!("Finished in {:?}", start_time.elapsed()); + Ok(()) +} + +fn update_manifest(manifest_path: &Path, opt: &Args) -> anyhow::Result<()> { + println!("Updating {:?}...", manifest_path); + + let mut metadata: Value = toml::from_slice(&fs::read(manifest_path)?)?; + let mut changed = false; + for set in ["dependencies", "dev-dependencies", "build-dependencies"] { + if let Some(dependencies) = metadata.get_mut(set) { + if !dependencies.is_table() { + bail!( + "Unexpected non-table value named `{}` in {:?}", + set, + manifest_path + ); + } + changed = update_dependencies(dependencies.as_table_mut().unwrap(), opt)? || changed; + } + } + + if changed { + fs::write(manifest_path, &toml::to_vec(&metadata)?)?; + } + + Ok(()) +} + +fn update_dependencies(dependencies: &mut Table, opt: &Args) -> anyhow::Result { + let mut changed = false; + for (key, value) in dependencies.iter_mut() { + let category = PackageCategory::from_package_name(key); + if !matches!(category, PackageCategory::Unknown) { + if !value.is_table() { + *value = Value::Table(Table::new()); + } + update_dependency_value(key, value.as_table_mut().unwrap(), opt); + changed = true; + } + } + Ok(changed) +} + +fn crate_path_name(name: &str) -> &str { + if matches!( + PackageCategory::from_package_name(name), + PackageCategory::AwsSdk + ) { + &name[SDK_PREFIX.len()..] + } else { + name + } +} + +fn update_dependency_value(crate_name: &str, value: &mut Table, opt: &Args) { + let is_sdk_crate = matches!( + PackageCategory::from_package_name(crate_name), + PackageCategory::AwsSdk | PackageCategory::AwsRuntime, + ); + + // Remove keys that will be replaced + value.remove("git"); + value.remove("branch"); + value.remove("version"); + value.remove("path"); + + // Set the `path` if one was given + if let Some(path) = &opt.sdk_path { + let crate_path = path.join(crate_path_name(crate_name)); + value.insert( + "path".to_string(), + Value::String( + crate_path + .as_os_str() + .to_str() + .expect("valid utf-8 path") + .to_string(), + ), + ); + } + + // Set the `version` if one was given + if opt.sdk_version.is_some() { + value.insert( + "version".to_string(), + Value::String( + if is_sdk_crate { + &opt.sdk_version + } else { + &opt.smithy_version + } + .clone() + .unwrap(), + ), + ); + } +} + +/// Recursively discovers Cargo.toml files in the given `path` and adds them to `manifests`. +fn discover_manifests(manifests: &mut Vec, path: impl AsRef) -> anyhow::Result<()> { + let path = path.as_ref(); + + for entry in fs::read_dir(path)? { + let entry = entry?; + if entry.path().is_dir() { + discover_manifests(manifests, entry.path())?; + } else if entry.path().is_file() + && entry.path().file_name() == Some(OsStr::new("Cargo.toml")) + { + manifests.push(entry.path()); + } + } + + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::{update_manifest, Args}; + use pretty_assertions::assert_eq; + use toml::Value; + + const TEST_MANIFEST: &[u8] = br#" + [package] + name = "test" + version = "0.1.0" + [dependencies] + aws-config = "0.4.1" + aws-sdk-s3 = "0.4.1" + aws-smithy-types = "0.34.1" + aws-smithy-http = { version = "0.34.1", features = ["test-util"] } + something-else = "0.1" + "#; + + #[track_caller] + fn test_with_opt(opt: Args, expected: &[u8]) { + let manifest_file = tempfile::NamedTempFile::new().unwrap(); + let manifest_path = manifest_file.into_temp_path(); + std::fs::write(&manifest_path, TEST_MANIFEST).unwrap(); + + update_manifest(&manifest_path, &opt).expect("success"); + + let actual = toml::from_slice(&std::fs::read(&manifest_path).expect("read tmp file")) + .expect("valid toml"); + let expected: Value = toml::from_slice(expected).unwrap(); + assert_eq!(expected, actual); + } + + #[test] + fn update_dependencies_with_versions() { + test_with_opt( + Args { + crate_paths: Vec::new(), + sdk_path: None, + sdk_version: Some("0.5.0".to_string()), + smithy_version: Some("0.35.0".to_string()), + }, + br#" + [package] + name = "test" + version = "0.1.0" + [dependencies] + aws-config = { version = "0.5.0" } + aws-sdk-s3 = { version = "0.5.0" } + aws-smithy-types = { version = "0.35.0" } + aws-smithy-http = { version = "0.35.0", features = ["test-util"] } + something-else = "0.1" + "#, + ); + } + + #[test] + fn update_dependencies_with_paths() { + test_with_opt( + Args { + crate_paths: Vec::new(), + sdk_path: Some("/foo/asdf/".into()), + sdk_version: None, + smithy_version: None, + }, + br#" + [package] + name = "test" + version = "0.1.0" + [dependencies] + aws-config = { path = "/foo/asdf/aws-config" } + aws-sdk-s3 = { path = "/foo/asdf/s3" } + aws-smithy-types = { path = "/foo/asdf/aws-smithy-types" } + aws-smithy-http = { path = "/foo/asdf/aws-smithy-http", features = ["test-util"] } + something-else = "0.1" + "#, + ); + } + + #[test] + fn update_dependencies_with_versions_and_paths() { + test_with_opt( + Args { + crate_paths: Vec::new(), + sdk_path: Some("/foo/asdf/".into()), + sdk_version: Some("0.5.0".to_string()), + smithy_version: Some("0.35.0".to_string()), + }, + br#" + [package] + name = "test" + version = "0.1.0" + [dependencies] + aws-config = { version = "0.5.0", path = "/foo/asdf/aws-config" } + aws-sdk-s3 = { version = "0.5.0", path = "/foo/asdf/s3" } + aws-smithy-types = { version = "0.35.0", path = "/foo/asdf/aws-smithy-types" } + aws-smithy-http = { version = "0.35.0", path = "/foo/asdf/aws-smithy-http", features = ["test-util"] } + something-else = "0.1" + "# + ); + } +} From b72c807f8409cd76cae2785d449e01e8fc11831c Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Thu, 2 Jun 2022 11:25:11 -0500 Subject: [PATCH 15/49] add: echo-server tool w/ README (#1432) --- tools/echo-server/Cargo.lock | 839 ++++++++++++++++++++++++++++++++++ tools/echo-server/Cargo.toml | 14 + tools/echo-server/README.md | 44 ++ tools/echo-server/src/main.rs | 83 ++++ 4 files changed, 980 insertions(+) create mode 100644 tools/echo-server/Cargo.lock create mode 100644 tools/echo-server/Cargo.toml create mode 100644 tools/echo-server/README.md create mode 100644 tools/echo-server/src/main.rs diff --git a/tools/echo-server/Cargo.lock b/tools/echo-server/Cargo.lock new file mode 100644 index 00000000000..db2c6d4e696 --- /dev/null +++ b/tools/echo-server/Cargo.lock @@ -0,0 +1,839 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "async-trait" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "axum" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2504b827a8bef941ba3dd64bdffe9cf56ca182908a147edd6189c95fbcae7d" +dependencies = [ + "async-trait", + "axum-core", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da31c0ed7b4690e2c78fe4b880d21cd7db04a346ebc658b4270251b695437f17" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bytes" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "echo-server" +version = "0.1.0" +dependencies = [ + "axum", + "hyper", + "tokio", + "tower", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +dependencies = [ + "matches", + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" + +[[package]] +name = "futures-sink" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" + +[[package]] +name = "futures-task" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" + +[[package]] +name = "futures-util" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "h2" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "http" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + +[[package]] +name = "httparse" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "indexmap" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" + +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matches" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" + +[[package]] +name = "matchit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "mio" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys", +] + +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "once_cell" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pin-project" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "proc-macro2" +version = "1.0.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" + +[[package]] +name = "ryu" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "serde" +version = "1.0.137" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" + +[[package]] +name = "serde_json" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" + +[[package]] +name = "smallvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" + +[[package]] +name = "socket2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "syn" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" + +[[package]] +name = "thread_local" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tokio" +version = "1.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +dependencies = [ + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "once_cell", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "winapi", +] + +[[package]] +name = "tokio-macros" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-util" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tower" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a89fd63ad6adf737582df5db40d286574513c69a11dac5214dc3b5603d6713e" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d342c6d58709c0a6d48d48dabbb62d4ef955cf5f0f3bbfd845838e7ae88dbae" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" + +[[package]] +name = "tower-service" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" + +[[package]] +name = "tracing" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +dependencies = [ + "lazy_static", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596" +dependencies = [ + "ansi_term", + "lazy_static", + "matchers", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" diff --git a/tools/echo-server/Cargo.toml b/tools/echo-server/Cargo.toml new file mode 100644 index 00000000000..a7ff79d2594 --- /dev/null +++ b/tools/echo-server/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "echo-server" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +axum = "0.5.6" +tokio = { version = "1.18.2", features = ["full"] } +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tower = { version = "0.4", features = ["util", "filter"] } +hyper = { version = "0.14", features = ["full"] } diff --git a/tools/echo-server/README.md b/tools/echo-server/README.md new file mode 100644 index 00000000000..4bc0b9a3c78 --- /dev/null +++ b/tools/echo-server/README.md @@ -0,0 +1,44 @@ +# echo-server + +This is a tool that Zelda created while [implementing the flexible checksums feature]. It's a simple echo server that +will log the requests it receives. + +## How to use it + +First, start the echo server: + +```shell +cargo run +``` + +Then, configure the SDK to send requests to this server by setting an immutable endpoint when building the `SdkConfig`: + +```rust + #[tokio::test] + async fn test_checksum_on_streaming_request_against_s3() { + let sdk_config = aws_config::from_env() + .endpoint_resolver(Endpoint::immutable("http://localhost:3000".parse().expect("valid URI"))) + .load().await; + let s3_client = aws_sdk_s3::Client::new(&sdk_config); + + let _res = s3_client + .put_object() + .bucket("some-real-bucket") + .key("test.txt") + .body(aws_sdk_s3::types::ByteStream::from_static(b"Hello world")) + .checksum_algorithm(ChecksumAlgorithm::Sha256) + .send() + .await + .unwrap(); + } +``` + +Once you run your app and start making requests, those requests will be logged by the echo server. The echo server doesn't return valid responses, so you'll have to account for that. + +## Acknowledgements + +This server is based on the [print-request-response] example from the [axum repo] + +[implementing the flexible checksums feature]: ../../design/src/contributing/writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md +[print-request-response]: https://github.com/tokio-rs/axum/tree/main/examples/print-request-response +[axum repo]: https://github.com/tokio-rs/axum diff --git a/tools/echo-server/src/main.rs b/tools/echo-server/src/main.rs new file mode 100644 index 00000000000..0e0f50982f6 --- /dev/null +++ b/tools/echo-server/src/main.rs @@ -0,0 +1,83 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +use axum::{ + body::{Body, Bytes}, + http::{request::Parts, Request, StatusCode}, + middleware::{self, Next}, + response::IntoResponse, + routing::put, + Router, +}; +use std::net::SocketAddr; +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; + +#[tokio::main] +async fn main() { + tracing_subscriber::registry() + .with(tracing_subscriber::EnvFilter::new( + std::env::var("RUST_LOG").unwrap_or_else(|_| "trace".into()), + )) + .with(tracing_subscriber::fmt::layer()) + .init(); + + let app = Router::new() + .route("/*path", put(|| async move { "200 OK" })) + .layer(middleware::from_fn(print_request_response)); + + let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); + tracing::debug!("listening on {}", addr); + axum::Server::bind(&addr) + .serve(app.into_make_service()) + .await + .unwrap(); +} + +async fn print_request_response( + req: Request, + next: Next, +) -> Result { + let (parts, body) = req.into_parts(); + + print_parts(&parts).await; + let bytes = buffer_and_print("request", body).await?; + let req = Request::from_parts(parts, Body::from(bytes)); + + let res = next.run(req).await; + + // // Looking at the response from the echo server is generally unnecessary but + // // if you need to do that, then uncomment this. + // let (parts, body) = res.into_parts(); + // let bytes = buffer_and_print("response", body).await?; + // let res = Response::from_parts(parts, Body::from(bytes)); + + Ok(res) +} + +async fn print_parts(parts: &Parts) { + tracing::debug!("{:#?}", parts); +} + +async fn buffer_and_print(direction: &str, body: B) -> Result +where + B: axum::body::HttpBody, + B::Error: std::fmt::Display, +{ + let bytes = match hyper::body::to_bytes(body).await { + Ok(bytes) => bytes, + Err(err) => { + return Err(( + StatusCode::BAD_REQUEST, + format!("failed to read {} body: {}", direction, err), + )); + } + }; + + if let Ok(body) = std::str::from_utf8(&bytes) { + tracing::debug!("{} body = {:?}", direction, body); + } + + Ok(bytes) +} From f0568e1f188019b4f28fef54164ac62d5f63cc7f Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 2 Jun 2022 13:30:10 -0400 Subject: [PATCH 16/49] remove parallelism from the sync tool (#1436) smithy-build actually utilizes `ForkJoinPool.common()` when executing build projections. Because each service is its own projection, the build internally is _already_ running in parallel. Because of this, running the sync in parallel produces uneccessary memory pressure. This change: - removes parallelism - runs gradle `--no-daemon --info` for better log output --- tools/sdk-sync/Cargo.lock | 96 ---------------------------------- tools/sdk-sync/Cargo.toml | 2 - tools/sdk-sync/src/main.rs | 18 ------- tools/sdk-sync/src/sync.rs | 4 +- tools/sdk-sync/src/sync/gen.rs | 2 + 5 files changed, 3 insertions(+), 119 deletions(-) diff --git a/tools/sdk-sync/Cargo.lock b/tools/sdk-sync/Cargo.lock index 933bda6888c..0e34ee0d455 100644 --- a/tools/sdk-sync/Cargo.lock +++ b/tools/sdk-sync/Cargo.lock @@ -102,51 +102,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "crossbeam-channel" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" -dependencies = [ - "cfg-if", - "lazy_static", -] - [[package]] name = "ctor" version = "0.1.21" @@ -305,15 +260,6 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "mockall" version = "0.11.0" @@ -365,16 +311,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "once_cell" version = "1.10.0" @@ -489,30 +425,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rayon" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221" -dependencies = [ - "autocfg", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - [[package]] name = "redox_syscall" version = "0.2.13" @@ -557,12 +469,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - [[package]] name = "sdk-sync" version = "0.1.0" @@ -571,10 +477,8 @@ dependencies = [ "clap", "gitignore", "mockall", - "num_cpus", "once_cell", "pretty_assertions", - "rayon", "regex", "serde", "smithy-rs-tool-common", diff --git a/tools/sdk-sync/Cargo.toml b/tools/sdk-sync/Cargo.toml index f803884a1d7..752ab84e870 100644 --- a/tools/sdk-sync/Cargo.toml +++ b/tools/sdk-sync/Cargo.toml @@ -18,8 +18,6 @@ opt-level = 0 anyhow = "1.0.56" clap = { version = "3.1.8", features = ["derive"] } gitignore = "1.0.7" -num_cpus = "1.13.1" -rayon = "1.5.2" serde = { version = "1.0.136", features = ["derive"] } smithy-rs-tool-common = { version = "0.1", path = "../smithy-rs-tool-common" } sysinfo = { version = "0.23.11", default-features = false } diff --git a/tools/sdk-sync/src/main.rs b/tools/sdk-sync/src/main.rs index f9efea53f1e..4cba8bbda2d 100644 --- a/tools/sdk-sync/src/main.rs +++ b/tools/sdk-sync/src/main.rs @@ -9,10 +9,6 @@ use sdk_sync::init_tracing; use sdk_sync::sync::Sync; use smithy_rs_tool_common::macros::here; use std::path::PathBuf; -use sysinfo::{System, SystemExt}; -use tracing::info; - -const CODEGEN_MIN_RAM_REQUIRED_GB: usize = 2; /// A CLI tool to replay commits from smithy-rs, generate code, and commit that code to aws-rust-sdk. #[derive(Parser, Debug)] @@ -50,20 +46,6 @@ fn main() -> Result<()> { init_tracing(); let args = Args::parse(); - let sys = System::new_all(); - let available_ram_gb = (sys.available_memory() / 1024 / 1024) as usize; - let num_cpus = num_cpus::get_physical(); - let threads = (available_ram_gb / CODEGEN_MIN_RAM_REQUIRED_GB) - .max(1) // Must use at least 1 thread - .min(num_cpus); // Don't exceed the number of physical CPUs - info!("Available RAM (GB): {available_ram_gb}"); - info!("Num physical CPUs: {num_cpus}"); - info!("Thread pool size: {threads}"); - rayon::ThreadPoolBuilder::new() - .num_threads(threads) - .build_global() - .unwrap(); - let sync = Sync::new( &args.aws_doc_sdk_examples.canonicalize().context(here!())?, &args.aws_sdk_rust.canonicalize().context(here!())?, diff --git a/tools/sdk-sync/src/sync.rs b/tools/sdk-sync/src/sync.rs index b7158216116..896c7f6fd20 100644 --- a/tools/sdk-sync/src/sync.rs +++ b/tools/sdk-sync/src/sync.rs @@ -180,8 +180,6 @@ impl Sync { /// Run through all commits made to `smithy-rs` since last sync and "replay" them onto `aws-sdk-rust`. #[instrument(skip(self, versions))] fn sync_smithy_rs(&self, versions: &VersionsManifest) -> Result<()> { - use rayon::prelude::*; - info!( "Checking for smithy-rs commits in range HEAD..{}", versions.smithy_rs_revision @@ -208,7 +206,7 @@ impl Sync { let fs = self.fs.clone(); commits - .par_iter() + .iter() .enumerate() .map(move |(commit_num, commit_hash)| { let span = info_span!( diff --git a/tools/sdk-sync/src/sync/gen.rs b/tools/sdk-sync/src/sync/gen.rs index de8cb778294..3e79e90d388 100644 --- a/tools/sdk-sync/src/sync/gen.rs +++ b/tools/sdk-sync/src/sync/gen.rs @@ -112,6 +112,8 @@ impl DefaultSdkGenerator { fn aws_sdk_assemble(&self) -> Result<()> { info!("Generating the SDK..."); let mut command = Command::new("./gradlew"); + command.arg("--no-daemon"); // Don't let Gradle continue running after the build + command.arg("--info"); // Increase logging verbosity for failure debugging command.arg("-Paws.fullsdk=true"); command.arg(format!( "-Paws.sdk.previous.release.versions.manifest={}", From 242e6bcd677b5600f27106f8bc45f411c3c429da Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 2 Jun 2022 15:20:31 -0400 Subject: [PATCH 17/49] make build image commit has configurable (#1437) --- tools/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/Dockerfile b/tools/Dockerfile index 5c06697de7d..f95982a3f0c 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -50,9 +50,6 @@ ARG rust_nightly_version=nightly-2022-03-29 ARG cargo_udeps_version=0.1.27 ARG cargo_hack_version=0.5.12 ARG cargo_minimal_versions_version=0.1.3 -# If the `checkout_smithy_rs_tools` arg is set to true, then the Dockerfile will acquire the tools -# source code by checking out awslabs/smithy-rs/main rather than copying them from the local directory. -ARG checkout_smithy_rs_tools=false ENV RUSTUP_HOME=/opt/rustup \ CARGO_HOME=/opt/cargo \ PATH=/opt/cargo/bin/:${PATH} \ @@ -90,6 +87,11 @@ RUN set -eux; \ cargo --version; \ cargo +${rust_nightly_version} --version; COPY . tools/ +# when `checkout_smithy_rs_tools` is set to true, this commit will be checked out +ARG smithy_rs_commit_hash=main +# If the `checkout_smithy_rs_tools` arg is set to true, then the Dockerfile will acquire the tools +# source code by checking out awslabs/smithy-rs/main rather than copying them from the local directory. +ARG checkout_smithy_rs_tools=false RUN set -eux; \ cargo +${rust_nightly_version} install cargo-udeps --version ${cargo_udeps_version}; \ cargo install cargo-hack --version ${cargo_hack_version}; \ @@ -97,6 +99,7 @@ RUN set -eux; \ if [[ "${checkout_smithy_rs_tools}" == "true" ]]; then \ git clone https://github.com/awslabs/smithy-rs.git; \ cd smithy-rs; \ + git checkout ${smithy_rs_commit_hash}; \ fi; \ cargo install --path tools/publisher; \ cargo +${rust_nightly_version} install --path tools/api-linter; \ From a49076a1e4f3d280ef1f7e95df13f03b270e49c1 Mon Sep 17 00:00:00 2001 From: david-perez Date: Fri, 3 Jun 2022 18:53:50 +0200 Subject: [PATCH 18/49] `#[allow(clippy::type_complexity)]` globally (#1440) Because some models have shapes that generate complex Rust types (e.g. nested collection and map shapes). I've also taken the opportunity to homogenize the comments in `AllowLintsGenerator.kt`. --- codegen-test/model/misc.smithy | 104 ++++++++++-------- .../customizations/AllowLintsGenerator.kt | 17 +-- 2 files changed, 69 insertions(+), 52 deletions(-) diff --git a/codegen-test/model/misc.smithy b/codegen-test/model/misc.smithy index a954d135089..f32b892a15b 100644 --- a/codegen-test/model/misc.smithy +++ b/codegen-test/model/misc.smithy @@ -13,26 +13,52 @@ use smithy.test#httpResponseTests @title("MiscService") service MiscService { operations: [ - OperationWithInnerRequiredShape, - ResponseCodeRequired, - ResponseCodeHttpFallback, - ResponseCodeDefault, + TypeComplexityOperation, + InnerRequiredShapeOperation, + ResponseCodeRequiredOperation, + ResponseCodeHttpFallbackOperation, + ResponseCodeDefaultOperation, ], } -/// This operation tests that (de)serializing required values from a nested -/// shape works correctly. -@http(uri: "/operation", method: "GET") -operation OperationWithInnerRequiredShape { - input: OperationWithInnerRequiredShapeInput, - output: OperationWithInnerRequiredShapeOutput, +/// An operation whose shapes generate complex Rust types. +/// See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity. +@http(uri: "/typeComplexityOperation", method: "GET") +operation TypeComplexityOperation { + input: TypeComplexityOperationInputOutput, + output: TypeComplexityOperationInputOutput, } -structure OperationWithInnerRequiredShapeInput { - inner: InnerShape +structure TypeComplexityOperationInputOutput { + list: ListA +} + +list ListA { + member: ListB +} + +list ListB { + member: ListC +} + +list ListC { + member: MapA +} + +map MapA { + key: String, + value: EmptyStructure +} + +/// This operation tests that (de)serializing required values from a nested +/// shape works correctly. +@http(uri: "/innerRequiredShapeOperation", method: "GET") +operation InnerRequiredShapeOperation { + input: InnerRequiredShapeOperationInputOutput, + output: InnerRequiredShapeOperationInputOutput, } -structure OperationWithInnerRequiredShapeOutput { +structure InnerRequiredShapeOperationInputOutput { inner: InnerShape } @@ -114,65 +140,53 @@ union AUnion { time: Timestamp, } -/// This operation tests that the response code defaults to 200 when no other code is set +/// This operation tests that the response code defaults to 200 when no other +/// code is set. @httpResponseTests([ { - id: "ResponseCodeDefault", + id: "ResponseCodeDefaultOperation", protocol: "aws.protocols#restJson1", code: 200, } ]) -@http(method: "GET", uri: "/responseCodeDefault") -operation ResponseCodeDefault { - input: ResponseCodeDefaultInput, - output: ResponseCodeDefaultOutput, +@http(method: "GET", uri: "/responseCodeDefaultOperation") +operation ResponseCodeDefaultOperation { + input: EmptyStructure, + output: EmptyStructure, } -@input -structure ResponseCodeDefaultInput {} - -@output -structure ResponseCodeDefaultOutput {} - -/// This operation tests that the response code defaults to @http's code +/// This operation tests that the response code defaults to `@http`'s code. @httpResponseTests([ { - id: "ResponseCodeHttpFallback", + id: "ResponseCodeHttpFallbackOperation", protocol: "aws.protocols#restJson1", code: 418, } ]) -@http(method: "GET", uri: "/responseCodeHttpFallback", code: 418) -operation ResponseCodeHttpFallback { - input: ResponseCodeHttpFallbackInput, - output: ResponseCodeHttpFallbackOutput, +@http(method: "GET", uri: "/responseCodeHttpFallbackOperation", code: 418) +operation ResponseCodeHttpFallbackOperation { + input: EmptyStructure, + output: EmptyStructure, } -@input -structure ResponseCodeHttpFallbackInput {} +structure EmptyStructure {} -@output -structure ResponseCodeHttpFallbackOutput {} - -/// This operation tests that @httpResponseCode is @required -/// and is used over @http's code +/// This operation tests that `@httpResponseCode` is `@required` +/// and is used over `@http's` code. @httpResponseTests([ { - id: "ResponseCodeRequired", + id: "ResponseCodeRequiredOperation", protocol: "aws.protocols#restJson1", code: 201, params: {"responseCode": 201} } ]) -@http(method: "GET", uri: "/responseCodeRequired", code: 200) -operation ResponseCodeRequired { - input: ResponseCodeRequiredInput, +@http(method: "GET", uri: "/responseCodeRequiredOperation", code: 200) +operation ResponseCodeRequiredOperation { + input: EmptyStructure, output: ResponseCodeRequiredOutput, } -@input -structure ResponseCodeRequiredInput {} - @output structure ResponseCodeRequiredOutput { @required diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/AllowLintsGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/AllowLintsGenerator.kt index 8c758ec098b..89140ea7f84 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/AllowLintsGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/AllowLintsGenerator.kt @@ -11,26 +11,29 @@ import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.smithy.generators.LibRsSection val ClippyAllowLints = listOf( - // Sometimes operations are named the same as our module e.g. output leading to `output::output` + // Sometimes operations are named the same as our module e.g. output leading to `output::output`. "module_inception", - // Currently, we don't recase acronyms in models, e.g. SSEVersion + // Currently, we don't recase acronyms in models, e.g. `SSEVersion`. "upper_case_acronyms", - // Large errors trigger this warning, we are unlikely to optimize this case currently + // Large errors trigger this warning, we are unlikely to optimize this case currently. "large_enum_variant", - // Some models have members with `is` in the name, which leads to builder functions with the wrong self convention + // Some models have members with `is` in the name, which leads to builder functions with the wrong self convention. "wrong_self_convention", - // models like ecs use method names like "add()" which confuses clippy + // Models like ecs use method names like `add()` which confuses Clippy. "should_implement_trait", - // protocol tests use silly names like `baz`, don't flag that + // Protocol tests use silly names like `baz`, don't flag that. "blacklisted_name", - // Forcing use of `vec![]` can make codegen harder in some cases + // Forcing use of `vec![]` can make codegen harder in some cases. "vec_init_then_push", + + // Some models have shapes that generate complex Rust types (e.g. nested collection and map shapes). + "type_complexity", ) val AllowDocsLints = listOf( From f1a4782614ebb5e33b11c702b602e9a2c978087b Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Mon, 6 Jun 2022 12:17:31 -0700 Subject: [PATCH 19/49] Reintroduce `sdk-sync` parallelism by disabling Smithy parallelism (#1443) * Revert "remove parallelism from the sync tool (#1436)" This reverts commit f0568e1f188019b4f28fef54164ac62d5f63cc7f. * Reintroduce `sdk-sync` parallelism by disabling Smithy parallelism * Make the Smithy parallelism configurable --- tools/sdk-sync/Cargo.lock | 96 ++++++++++++++++++++++++++++++++ tools/sdk-sync/Cargo.toml | 2 + tools/sdk-sync/src/main.rs | 35 ++++++++++++ tools/sdk-sync/src/sync.rs | 12 +++- tools/sdk-sync/src/sync/gen.rs | 9 +++ tools/sdk-sync/tests/e2e_test.rs | 2 + 6 files changed, 155 insertions(+), 1 deletion(-) diff --git a/tools/sdk-sync/Cargo.lock b/tools/sdk-sync/Cargo.lock index 0e34ee0d455..933bda6888c 100644 --- a/tools/sdk-sync/Cargo.lock +++ b/tools/sdk-sync/Cargo.lock @@ -102,6 +102,51 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +[[package]] +name = "crossbeam-channel" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +dependencies = [ + "cfg-if", + "lazy_static", +] + [[package]] name = "ctor" version = "0.1.21" @@ -260,6 +305,15 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + [[package]] name = "mockall" version = "0.11.0" @@ -311,6 +365,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "once_cell" version = "1.10.0" @@ -425,6 +489,30 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rayon" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221" +dependencies = [ + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + [[package]] name = "redox_syscall" version = "0.2.13" @@ -469,6 +557,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + [[package]] name = "sdk-sync" version = "0.1.0" @@ -477,8 +571,10 @@ dependencies = [ "clap", "gitignore", "mockall", + "num_cpus", "once_cell", "pretty_assertions", + "rayon", "regex", "serde", "smithy-rs-tool-common", diff --git a/tools/sdk-sync/Cargo.toml b/tools/sdk-sync/Cargo.toml index 752ab84e870..f803884a1d7 100644 --- a/tools/sdk-sync/Cargo.toml +++ b/tools/sdk-sync/Cargo.toml @@ -18,6 +18,8 @@ opt-level = 0 anyhow = "1.0.56" clap = { version = "3.1.8", features = ["derive"] } gitignore = "1.0.7" +num_cpus = "1.13.1" +rayon = "1.5.2" serde = { version = "1.0.136", features = ["derive"] } smithy-rs-tool-common = { version = "0.1", path = "../smithy-rs-tool-common" } sysinfo = { version = "0.23.11", default-features = false } diff --git a/tools/sdk-sync/src/main.rs b/tools/sdk-sync/src/main.rs index 4cba8bbda2d..3de674b9879 100644 --- a/tools/sdk-sync/src/main.rs +++ b/tools/sdk-sync/src/main.rs @@ -9,6 +9,10 @@ use sdk_sync::init_tracing; use sdk_sync::sync::Sync; use smithy_rs_tool_common::macros::here; use std::path::PathBuf; +use sysinfo::{System, SystemExt}; +use tracing::info; + +const CODEGEN_MIN_RAM_REQUIRED_GB: usize = 2; /// A CLI tool to replay commits from smithy-rs, generate code, and commit that code to aws-rust-sdk. #[derive(Parser, Debug)] @@ -23,6 +27,15 @@ struct Args { /// Path to the aws-doc-sdk-examples repository. #[clap(long, parse(from_os_str))] aws_doc_sdk_examples: PathBuf, + + /// Number of threads that `sdk-sync` will use. Defaults to the physical number of CPUs, + /// or the available RAM divided by the RAM required for codegen. Whichever is smaller. + #[clap(long)] + sync_threads: Option, + /// The Java parallelism (corresponding to the `java.util.concurrent.ForkJoinPool.common.parallelism` + /// system property) to use for Smithy codegen. Defaults to 1. + #[clap(long)] + smithy_parallelism: Option, } /// This tool syncs codegen changes from smithy-rs, examples changes from aws-doc-sdk-examples, @@ -46,10 +59,32 @@ fn main() -> Result<()> { init_tracing(); let args = Args::parse(); + let sys = System::new_all(); + let available_ram_gb = (sys.available_memory() / 1024 / 1024) as usize; + let num_cpus = num_cpus::get_physical(); + info!("Available RAM (GB): {available_ram_gb}"); + info!("Num physical CPUs: {num_cpus}"); + + let smithy_parallelism = args.smithy_parallelism.unwrap_or(1); + let sync_threads = if let Some(sync_threads) = args.sync_threads { + sync_threads + } else { + (available_ram_gb / CODEGEN_MIN_RAM_REQUIRED_GB) + .max(1) // Must use at least 1 thread + .min(num_cpus) // Don't exceed the number of physical CPUs + }; + info!("Sync thread pool size: {sync_threads}"); + + rayon::ThreadPoolBuilder::new() + .num_threads(sync_threads) + .build_global() + .unwrap(); + let sync = Sync::new( &args.aws_doc_sdk_examples.canonicalize().context(here!())?, &args.aws_sdk_rust.canonicalize().context(here!())?, &args.smithy_rs.canonicalize().context(here!())?, + smithy_parallelism, )?; sync.sync().map_err(|e| e.context("The sync failed")) diff --git a/tools/sdk-sync/src/sync.rs b/tools/sdk-sync/src/sync.rs index 896c7f6fd20..6558b41ddd5 100644 --- a/tools/sdk-sync/src/sync.rs +++ b/tools/sdk-sync/src/sync.rs @@ -28,6 +28,7 @@ pub struct Sync { fs: Arc, versions: Arc, previous_versions_manifest: Arc, + smithy_parallelism: usize, // Keep a reference to the temp directory so that it doesn't get cleaned up until the sync is complete _temp_dir: Arc, } @@ -37,6 +38,7 @@ impl Sync { aws_doc_sdk_examples_path: &Path, aws_sdk_rust_path: &Path, smithy_rs_path: &Path, + smithy_parallelism: usize, ) -> Result { let _temp_dir = Arc::new(tempfile::tempdir().context(here!("create temp dir"))?); let aws_sdk_rust = Arc::new(GitCLI::new(aws_sdk_rust_path)?); @@ -56,6 +58,7 @@ impl Sync { fs, versions: Arc::new(DefaultVersions::new()), previous_versions_manifest, + smithy_parallelism, _temp_dir, }) } @@ -75,6 +78,7 @@ impl Sync { fs: Arc::new(fs), versions: Arc::new(versions), previous_versions_manifest: Arc::new(PathBuf::from("doesnt-matter-for-tests")), + smithy_parallelism: 1, _temp_dir: Arc::new(tempfile::tempdir().unwrap()), } } @@ -158,6 +162,7 @@ impl Sync { self.fs.clone(), None, self.smithy_rs.path(), + self.smithy_parallelism, ) .context(here!())?; let generated_sdk = sdk_gen.generate_sdk().context(here!())?; @@ -180,6 +185,8 @@ impl Sync { /// Run through all commits made to `smithy-rs` since last sync and "replay" them onto `aws-sdk-rust`. #[instrument(skip(self, versions))] fn sync_smithy_rs(&self, versions: &VersionsManifest) -> Result<()> { + use rayon::prelude::*; + info!( "Checking for smithy-rs commits in range HEAD..{}", versions.smithy_rs_revision @@ -204,9 +211,10 @@ impl Sync { let examples_revision = versions.aws_doc_sdk_examples_revision.clone(); let examples_path = self.aws_sdk_rust.path().join("examples"); let fs = self.fs.clone(); + let smithy_parallelism = self.smithy_parallelism; commits - .iter() + .par_iter() .enumerate() .map(move |(commit_num, commit_hash)| { let span = info_span!( @@ -227,6 +235,7 @@ impl Sync { fs.clone(), Some(commit.hash.clone()), smithy_rs.path(), + smithy_parallelism, ) .context(here!())?; let sdk_path = sdk_gen.generate_sdk().context(here!())?; @@ -278,6 +287,7 @@ impl Sync { self.fs.clone(), None, self.smithy_rs.path(), + self.smithy_parallelism, ) .context(here!())?; let generated_sdk = sdk_gen.generate_sdk().context(here!())?; diff --git a/tools/sdk-sync/src/sync/gen.rs b/tools/sdk-sync/src/sync/gen.rs index 3e79e90d388..ee374db0104 100644 --- a/tools/sdk-sync/src/sync/gen.rs +++ b/tools/sdk-sync/src/sync/gen.rs @@ -48,6 +48,7 @@ pub struct DefaultSdkGenerator { examples_path: PathBuf, fs: Arc, smithy_rs: Box, + smithy_parallelism: usize, temp_dir: Arc, } @@ -60,6 +61,7 @@ impl DefaultSdkGenerator { fs: Arc, reset_to_commit: Option, original_smithy_rs_path: &Path, + smithy_parallelism: usize, ) -> Result { let temp_dir = tempfile::tempdir().context(here!("create temp dir"))?; GitCLI::new(original_smithy_rs_path) @@ -80,6 +82,7 @@ impl DefaultSdkGenerator { examples_path: examples_path.into(), fs, smithy_rs: Box::new(smithy_rs) as Box, + smithy_parallelism, temp_dir: Arc::new(temp_dir), }) } @@ -114,6 +117,12 @@ impl DefaultSdkGenerator { let mut command = Command::new("./gradlew"); command.arg("--no-daemon"); // Don't let Gradle continue running after the build command.arg("--info"); // Increase logging verbosity for failure debugging + + // Disable Smithy's codegen parallelism in favor of sdk-sync parallelism + command.arg(format!( + "-Djava.util.concurrent.ForkJoinPool.common.parallelism={}", + self.smithy_parallelism + )); command.arg("-Paws.fullsdk=true"); command.arg(format!( "-Paws.sdk.previous.release.versions.manifest={}", diff --git a/tools/sdk-sync/tests/e2e_test.rs b/tools/sdk-sync/tests/e2e_test.rs index 981abf8643e..28e9d8699e7 100644 --- a/tools/sdk-sync/tests/e2e_test.rs +++ b/tools/sdk-sync/tests/e2e_test.rs @@ -92,6 +92,7 @@ fn test_without_model_changes() { &tmp_dir.as_ref().join("aws-doc-sdk-examples"), &tmp_dir.as_ref().join("aws-sdk-rust"), &tmp_dir.as_ref().join("smithy-rs"), + 1, ) .expect("create sync success"); sync.sync().expect("sync success"); @@ -210,6 +211,7 @@ fn test_with_model_changes() { &tmp_dir.as_ref().join("aws-doc-sdk-examples"), &tmp_dir.as_ref().join("aws-sdk-rust"), &tmp_dir.as_ref().join("smithy-rs"), + 1, ) .expect("create sync success"); sync.sync().expect("sync success"); From 1875448dbb0dd0b7680f2fa19ab49e4594347663 Mon Sep 17 00:00:00 2001 From: Harry Barber <106155934+hlbarber@users.noreply.github.com> Date: Tue, 7 Jun 2022 10:58:19 +0100 Subject: [PATCH 20/49] Use Vec for route resolution when number of routes <15 (#1429) * Add `TinyMap` collection, which is a map backed by either `Vec` or `HashMap` depending on the number of entries. * Replace `HashMap` with `TinyMap` for `Routes::AwsJson10` and `Routes::AwsJson11`. --- .../aws-smithy-http-server/src/routing/mod.rs | 14 +- .../src/routing/tiny_map.rs | 193 ++++++++++++++++++ 2 files changed, 203 insertions(+), 4 deletions(-) create mode 100644 rust-runtime/aws-smithy-http-server/src/routing/tiny_map.rs diff --git a/rust-runtime/aws-smithy-http-server/src/routing/mod.rs b/rust-runtime/aws-smithy-http-server/src/routing/mod.rs index 1fbcedba574..2f4fa6c94f1 100644 --- a/rust-runtime/aws-smithy-http-server/src/routing/mod.rs +++ b/rust-runtime/aws-smithy-http-server/src/routing/mod.rs @@ -9,13 +9,13 @@ use self::future::RouterFuture; use self::request_spec::RequestSpec; +use self::tiny_map::TinyMap; use crate::body::{boxed, Body, BoxBody, HttpBody}; use crate::error::BoxError; use crate::protocols::Protocol; use crate::response::IntoResponse; use crate::runtime_error::{RuntimeError, RuntimeErrorKind}; use http::{Request, Response, StatusCode}; -use std::collections::HashMap; use std::{ convert::Infallible, task::{Context, Poll}, @@ -32,6 +32,7 @@ mod into_make_service; pub mod request_spec; mod route; +mod tiny_map; pub use self::{into_make_service::IntoMakeService, route::Route}; @@ -60,6 +61,11 @@ pub struct Router { routes: Routes, } +// This constant determines when the `TinyMap` implementation switches from being a `Vec` to a +// `HashMap`. This is chosen to be 15 as a result of the discussion around +// https://github.com/awslabs/smithy-rs/pull/1429#issuecomment-1147516546 +const ROUTE_CUTOFF: usize = 15; + /// Protocol-aware routes types. /// /// RestJson1 and RestXml routes are stored in a `Vec` because there can be multiple matches on the @@ -71,8 +77,8 @@ pub struct Router { enum Routes { RestXml(Vec<(Route, RequestSpec)>), RestJson1(Vec<(Route, RequestSpec)>), - AwsJson10(HashMap>), - AwsJson11(HashMap>), + AwsJson10(TinyMap, ROUTE_CUTOFF>), + AwsJson11(TinyMap, ROUTE_CUTOFF>), } impl Clone for Router { @@ -343,7 +349,7 @@ where // Find the `x-amz-target` header. if let Some(target) = req.headers().get("x-amz-target") { if let Ok(target) = target.to_str() { - // Lookup in the `HashMap` for a route for the target. + // Lookup in the `TinyMap` for a route for the target. let route = routes.get(target); if let Some(route) = route { return RouterFuture::from_oneshot(route.clone().oneshot(req)); diff --git a/rust-runtime/aws-smithy-http-server/src/routing/tiny_map.rs b/rust-runtime/aws-smithy-http-server/src/routing/tiny_map.rs new file mode 100644 index 00000000000..625bd2d4f68 --- /dev/null +++ b/rust-runtime/aws-smithy-http-server/src/routing/tiny_map.rs @@ -0,0 +1,193 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +use std::{borrow::Borrow, collections::HashMap, hash::Hash}; + +/// A map implementation with fast iteration which switches backing storage from [`Vec`] to +/// [`HashMap`] when the number of entries exceeds `CUTOFF`. +#[derive(Clone, Debug)] +pub struct TinyMap { + inner: TinyMapInner, +} + +#[derive(Clone, Debug)] +enum TinyMapInner { + Vec(Vec<(K, V)>), + HashMap(HashMap), +} + +enum OrIterator { + Left(Left), + Right(Right), +} + +impl Iterator for OrIterator +where + Left: Iterator, + Right: Iterator, +{ + type Item = Left::Item; + + fn next(&mut self) -> Option { + match self { + Self::Left(left) => left.next(), + Self::Right(right) => right.next(), + } + } +} + +/// An owning iterator over the entries of a `TinyMap`. +/// +/// This struct is created by the [`into_iter`](IntoIterator::into_iter) method on [`TinyMap`] ( +/// provided by the [`IntoIterator`] trait). See its documentation for more. +pub struct IntoIter { + inner: OrIterator, std::collections::hash_map::IntoIter>, +} + +impl Iterator for IntoIter { + type Item = (K, V); + + fn next(&mut self) -> Option { + self.inner.next() + } +} + +impl IntoIterator for TinyMap { + type Item = (K, V); + + type IntoIter = IntoIter; + + fn into_iter(self) -> Self::IntoIter { + let inner = match self.inner { + TinyMapInner::Vec(vec) => OrIterator::Left(vec.into_iter()), + TinyMapInner::HashMap(hash_map) => OrIterator::Right(hash_map.into_iter()), + }; + IntoIter { inner } + } +} + +impl FromIterator<(K, V)> for TinyMap +where + K: Hash + Eq, +{ + fn from_iter>(iter: T) -> Self { + let mut vec = Vec::with_capacity(CUTOFF); + let mut iter = iter.into_iter().enumerate(); + + // Populate the `Vec` + while let Some((index, pair)) = iter.next() { + // If overflow `CUTOFF` then return a `HashMap` instead + if index == CUTOFF { + let inner = TinyMapInner::HashMap(vec.into_iter().chain(iter.map(|(_, pair)| pair)).collect()); + return TinyMap { inner }; + } + + vec.push(pair); + } + + TinyMap { + inner: TinyMapInner::Vec(vec), + } + } +} + +impl TinyMap +where + K: Eq + Hash, +{ + /// Returns a reference to the value corresponding to the key. + /// + /// The key may be borrowed form of map's key type, but [`Hash`] and [`Eq`] on the borrowed + /// form _must_ match those for the key type. + pub fn get(&self, key: &Q) -> Option<&V> + where + K: Borrow, + Q: Hash + Eq, + { + match &self.inner { + TinyMapInner::Vec(vec) => vec + .iter() + .find(|(key_inner, _)| key_inner.borrow() == key) + .map(|(_, value)| value), + TinyMapInner::HashMap(hash_map) => hash_map.get(key), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + const CUTOFF: usize = 5; + + const SMALL_VALUES: [(&'static str, usize); 3] = [("a", 0), ("b", 1), ("c", 2)]; + const MEDIUM_VALUES: [(&'static str, usize); 5] = [("a", 0), ("b", 1), ("c", 2), ("d", 3), ("e", 4)]; + const LARGE_VALUES: [(&'static str, usize); 10] = [ + ("a", 0), + ("b", 1), + ("c", 2), + ("d", 3), + ("e", 4), + ("f", 5), + ("g", 6), + ("h", 7), + ("i", 8), + ("j", 9), + ]; + + #[test] + fn collect_small() { + let tiny_map: TinyMap<_, _, CUTOFF> = SMALL_VALUES.into_iter().collect(); + assert!(matches!(tiny_map.inner, TinyMapInner::Vec(_))) + } + + #[test] + fn collect_medium() { + let tiny_map: TinyMap<_, _, CUTOFF> = MEDIUM_VALUES.into_iter().collect(); + assert!(matches!(tiny_map.inner, TinyMapInner::Vec(_))) + } + + #[test] + fn collect_large() { + let tiny_map: TinyMap<_, _, CUTOFF> = LARGE_VALUES.into_iter().collect(); + assert!(matches!(tiny_map.inner, TinyMapInner::HashMap(_))) + } + + #[test] + fn get_small_success() { + let tiny_map: TinyMap<_, _, CUTOFF> = SMALL_VALUES.into_iter().collect(); + assert_eq!(tiny_map.get("a"), Some(&0)) + } + + #[test] + fn get_medium_success() { + let tiny_map: TinyMap<_, _, CUTOFF> = MEDIUM_VALUES.into_iter().collect(); + assert_eq!(tiny_map.get("d"), Some(&3)) + } + + #[test] + fn get_large_success() { + let tiny_map: TinyMap<_, _, CUTOFF> = LARGE_VALUES.into_iter().collect(); + assert_eq!(tiny_map.get("h"), Some(&7)) + } + + #[test] + fn get_small_fail() { + let tiny_map: TinyMap<_, _, CUTOFF> = SMALL_VALUES.into_iter().collect(); + assert_eq!(tiny_map.get("x"), None) + } + + #[test] + fn get_medium_fail() { + let tiny_map: TinyMap<_, _, CUTOFF> = MEDIUM_VALUES.into_iter().collect(); + assert_eq!(tiny_map.get("y"), None) + } + + #[test] + fn get_large_fail() { + let tiny_map: TinyMap<_, _, CUTOFF> = LARGE_VALUES.into_iter().collect(); + assert_eq!(tiny_map.get("z"), None) + } +} From 2d5bf6fc2ceab0d91a2f13ded5e0f937107b3a4c Mon Sep 17 00:00:00 2001 From: david-perez Date: Wed, 8 Jun 2022 20:01:20 +0200 Subject: [PATCH 21/49] Only generate `@error` `message` getter when defined in the model (#1441) We are currently generating a useless `message` getter that returns `None` even when the `message` field is not defined in the model. Granted, in the client this field is _almost always_ there, because the `AddErrorMessage` model transformer is applied unless the user opts out in their `smithy-build.json`. --- .../smithy/generators/error/ErrorGenerator.kt | 27 ++++++++++--------- .../smithy/transformers/AddErrorMessage.kt | 6 ++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/ErrorGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/ErrorGenerator.kt index da4c699f496..c3e495827e1 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/ErrorGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/ErrorGenerator.kt @@ -69,13 +69,6 @@ class ErrorGenerator( val symbol = symbolProvider.toSymbol(shape) val messageShape = shape.errorMessageMember() val errorKindT = RuntimeType.errorKind(symbolProvider.config().runtimeConfig) - val (returnType, message) = messageShape?.let { - if (symbolProvider.toSymbol(messageShape).isOptional()) { - "Option<&str>" to "self.${symbolProvider.toMemberName(it)}.as_deref()" - } else { - "&str" to "self.${symbolProvider.toMemberName(it)}.as_ref()" - } - } ?: "Option<&str>" to "None" writer.rustBlock("impl ${symbol.name}") { val retryKindWriteable = shape.modeledRetryKind(error)?.writable(symbolProvider.config().runtimeConfig) if (retryKindWriteable != null) { @@ -84,12 +77,20 @@ class ErrorGenerator( retryKindWriteable(this) } } - rust( - """ - /// Returns the error message. - pub fn message(&self) -> $returnType { $message } - """ - ) + if (messageShape != null) { + val (returnType, message) = if (symbolProvider.toSymbol(messageShape).isOptional()) { + "Option<&str>" to "self.${symbolProvider.toMemberName(messageShape)}.as_deref()" + } else { + "&str" to "self.${symbolProvider.toMemberName(messageShape)}.as_ref()" + } + + rust( + """ + /// Returns the error message. + pub fn message(&self) -> $returnType { $message } + """ + ) + } /* * If we're generating for a server, the `name` method is added to enable diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/AddErrorMessage.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/AddErrorMessage.kt index 797884d86af..834a9313f51 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/AddErrorMessage.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/AddErrorMessage.kt @@ -18,11 +18,11 @@ import java.util.logging.Logger fun StructureShape.errorMessageMember(): MemberShape? = this.getMember("message").or { this.getMember("Message") }.orNull() /** - * Ensure that all errors have error messages + * Ensure that all errors have error messages. * * Not all errors are modeled with an error message field. However, in many cases, the server can still send an error. * If an error, specifically, a structure shape with the error trait does not have a member `message` or `Message`, - * this transformer will add a `message` member targetting a string. + * this transformer will add a `message` member targeting a string. * * This ensures that we always generate a modeled error message field enabling end users to easily extract the error * message when present. @@ -33,7 +33,7 @@ object AddErrorMessage { private val logger = Logger.getLogger("AddErrorMessage") /** - * Ensure that all errors have error messages + * Ensure that all errors have error messages. */ fun transform(model: Model): Model { return ModelTransformer.create().mapShapes(model) { shape -> From 2986c93b0d7616c6f0ed54760b33477ba02991f7 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Wed, 8 Jun 2022 13:40:55 -0700 Subject: [PATCH 22/49] Configure Gradle parallelism and Kotlin compiler in `sdk-sync` (#1448) --- tools/sdk-sync/src/sync/gen.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/sdk-sync/src/sync/gen.rs b/tools/sdk-sync/src/sync/gen.rs index ee374db0104..bab5bb81a00 100644 --- a/tools/sdk-sync/src/sync/gen.rs +++ b/tools/sdk-sync/src/sync/gen.rs @@ -114,15 +114,36 @@ impl DefaultSdkGenerator { #[instrument(skip(self))] fn aws_sdk_assemble(&self) -> Result<()> { info!("Generating the SDK..."); + let mut command = Command::new("./gradlew"); command.arg("--no-daemon"); // Don't let Gradle continue running after the build + command.arg("--no-parallel"); // Disable Gradle parallelism + command.arg("--max-workers=1"); // Cap the Gradle workers at 1 command.arg("--info"); // Increase logging verbosity for failure debugging + // Customize the Gradle daemon JVM args (these are required even with `--no-daemon` + // since Gradle still forks out a daemon process that gets terminated at the end) + command.arg(format!( + "-Dorg.gradle.jvmargs={}", + [ + // Retain default Gradle JVM args + "-Xmx512m", + "-XX:MaxMetaspaceSize=256m", + // Disable incremental compilation and caching since we're compiling exactly once per commit + "-Dkotlin.incremental=false", + "-Dkotlin.caching.enabled=false", + // Run the compiler in the gradle daemon process to avoid more forking thrash + "-Dkotlin.compiler.execution.strategy=in-process" + ] + .join(" ") + )); + // Disable Smithy's codegen parallelism in favor of sdk-sync parallelism command.arg(format!( "-Djava.util.concurrent.ForkJoinPool.common.parallelism={}", self.smithy_parallelism )); + command.arg("-Paws.fullsdk=true"); command.arg(format!( "-Paws.sdk.previous.release.versions.manifest={}", From 8cefacffa87b9aa1a2a2c23dc25d890aaab8b3ff Mon Sep 17 00:00:00 2001 From: Harry Barber <106155934+hlbarber@users.noreply.github.com> Date: Thu, 9 Jun 2022 15:10:54 +0100 Subject: [PATCH 23/49] Temporarily disable benchmarking in CI (#1447) --- .github/workflows/pull-request-bot.yml | 78 +------------------------- 1 file changed, 1 insertion(+), 77 deletions(-) diff --git a/.github/workflows/pull-request-bot.yml b/.github/workflows/pull-request-bot.yml index c424d08dac2..148a08c21a2 100644 --- a/.github/workflows/pull-request-bot.yml +++ b/.github/workflows/pull-request-bot.yml @@ -120,85 +120,10 @@ jobs: run: | aws s3 cp target/doc "s3://${S3_BUCKET_NAME}/docs/${{ github.event.pull_request.head.sha }}" --recursive - generate-server-benchmark: - name: Generate server benchmark - runs-on: ubuntu-latest - outputs: - bot-message: ${{ steps.run-benchmark.outputs.bot-message }} - steps: - - name: Checkout PR - uses: actions/checkout@v3 - with: - path: pull-request - - name: Checkout origin/main - uses: actions/checkout@v3 - with: - repository: awslabs/smithy-rs - path: origin-main - ref: main - - name: Checkout wrk - uses: actions/checkout@v3 - with: - repository: wg/wrk - path: wrk-build - ref: 4.2.0 - - uses: actions/cache@v2 - name: Gradle Cache - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - # Pinned to the commit hash of v1.3.0 - - name: Rust Cache - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 - with: - sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }} - target-dir: ./target - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: ${{ env.java_version }} - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.rust_version }} - components: ${{ env.rust_toolchain_components }} - default: true - - name: Install benchmarks dependencies - run: sudo apt-get update && sudo apt-get install -y ${{ env.apt_dependencies }} - # Ubuntu 20.04 doesn't have wrk packaged, hence we need to build it 🤦 - # This will go away as soon as GitHub supports Ubuntu 21.10. - - name: Install wrk - run: cd wrk-build && make -j8 wrk && sudo cp wrk /usr/local/bin - - name: Run benchmark - id: run-benchmark - run: | - mkdir -p ~/.wrk-api-bench - # run the benchmark on origin/main - pushd origin-main/rust-runtime/aws-smithy-http-server/examples - make && RUN_BENCHMARKS=1 cargo test --release - popd - - # run the benchmark on current ref - pushd pull-request/rust-runtime/aws-smithy-http-server/examples - make && RUN_BENCHMARKS=1 cargo test --release - popd - # Uncomment this for debugging purposes. It will print out the - # content of all the benchmarks found in the cache + the last one - # produced by the current run. - # for x in ~/.wrk-api-bench/*; do echo "Benchmark $x content:"; jq . "$x"; echo; done - - # Ensure the output is available for the PR bot. - echo "::set-output name=bot-message::$(cat /tmp/smithy_rs_benchmark_deviation.txt)" - post-bot-comment: needs: - generate-diff - generate-doc-preview - - generate-server-benchmark runs-on: ubuntu-latest name: Post bot comment permissions: @@ -226,6 +151,5 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, body: '${{ steps.bot-messages.outputs.codegen-diff }}\n\n' + - '${{ needs.generate-doc-preview.outputs.bot-message }}\n\n' + - '${{ needs.generate-server-benchmark.outputs.bot-message }}\n\n' + '${{ needs.generate-doc-preview.outputs.bot-message }}\n\n' }) From 336c1a29254cc59830b6b5e39268dddab6061267 Mon Sep 17 00:00:00 2001 From: david-perez Date: Thu, 9 Jun 2022 18:14:04 +0200 Subject: [PATCH 24/49] Add the ability to generate `pub(crate)` values (#1444) A small commit adding the ability to generate `pub(crate)` values. Currently we don't need to, but this is used in #1342. It's also nicer to use an enum instead of passing around a boolean. --- .../smithy/rustsdk/AwsRuntimeDependency.kt | 5 +++-- .../smithy/rustsdk/InlineAwsDependency.kt | 5 +++-- .../ServerCombinedErrorGenerator.kt | 3 ++- .../protocol/ServerProtocolTestGenerator.kt | 5 +++-- .../rust/codegen/rustlang/CargoDependency.kt | 6 +++--- .../rust/codegen/rustlang/RustModule.kt | 8 ++++---- .../smithy/rust/codegen/rustlang/RustTypes.kt | 20 ++++++++++++++----- .../rust/codegen/rustlang/RustWriter.kt | 3 ++- .../rust/codegen/smithy/CodegenDelegator.kt | 3 ++- .../codegen/smithy/SymbolMetadataProvider.kt | 6 +++--- .../generators/NestedAccessorGenerator.kt | 3 ++- .../smithy/generators/PaginatorGenerator.kt | 3 ++- .../client/FluentClientDecorator.kt | 3 ++- .../error/CombinedErrorGenerator.kt | 3 ++- .../error/TopLevelErrorGenerator.kt | 5 +++-- .../protocol/ProtocolTestGenerator.kt | 3 ++- .../generators/StructureGeneratorTest.kt | 8 ++++++-- .../generators/EndpointTraitBindingsTest.kt | 3 ++- 18 files changed, 61 insertions(+), 34 deletions(-) diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsRuntimeDependency.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsRuntimeDependency.kt index 0391ab23655..07d82399115 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsRuntimeDependency.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsRuntimeDependency.kt @@ -7,6 +7,7 @@ package software.amazon.smithy.rustsdk import software.amazon.smithy.codegen.core.CodegenException import software.amazon.smithy.rust.codegen.rustlang.CargoDependency +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeCrateLocation import software.amazon.smithy.rust.codegen.smithy.RuntimeType @@ -43,12 +44,12 @@ fun RuntimeConfig.awsRoot(): RuntimeCrateLocation { object AwsRuntimeType { val S3Errors by lazy { RuntimeType.forInlineDependency(InlineAwsDependency.forRustFile("s3_errors")) } val Presigning by lazy { - RuntimeType.forInlineDependency(InlineAwsDependency.forRustFile("presigning", public = true)) + RuntimeType.forInlineDependency(InlineAwsDependency.forRustFile("presigning", visibility = Visibility.PUBLIC)) } fun RuntimeConfig.defaultMiddleware() = RuntimeType.forInlineDependency( InlineAwsDependency.forRustFile( - "middleware", public = true, + "middleware", visibility = Visibility.PUBLIC, CargoDependency.SmithyHttp(this), CargoDependency.SmithyHttpTower(this), CargoDependency.SmithyClient(this), diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/InlineAwsDependency.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/InlineAwsDependency.kt index f128a066b36..298ba02fd1a 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/InlineAwsDependency.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/InlineAwsDependency.kt @@ -7,8 +7,9 @@ package software.amazon.smithy.rustsdk import software.amazon.smithy.rust.codegen.rustlang.InlineDependency import software.amazon.smithy.rust.codegen.rustlang.RustDependency +import software.amazon.smithy.rust.codegen.rustlang.Visibility object InlineAwsDependency { - fun forRustFile(file: String, public: Boolean = false, vararg additionalDependency: RustDependency): InlineDependency = - InlineDependency.Companion.forRustFile(file, "aws-inlineable", public, *additionalDependency) + fun forRustFile(file: String, visibility: Visibility = Visibility.PRIVATE, vararg additionalDependency: RustDependency): InlineDependency = + InlineDependency.Companion.forRustFile(file, "aws-inlineable", visibility, *additionalDependency) } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGenerator.kt index b550bf68811..edb7a891403 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGenerator.kt @@ -11,6 +11,7 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.documentShape import software.amazon.smithy.rust.codegen.rustlang.rust @@ -37,7 +38,7 @@ class ServerCombinedErrorGenerator( val symbol = operation.errorSymbol(symbolProvider) val meta = RustMetadata( derives = Attribute.Derives(setOf(RuntimeType.Debug)), - public = true + visibility = Visibility.PUBLIC ) writer.rust("/// Error type for the `${operationSymbol.name}` operation.") diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt index f4a4c4b8f62..7eaf6fb3a2a 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt @@ -25,6 +25,7 @@ import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.escape import software.amazon.smithy.rust.codegen.rustlang.rust @@ -132,11 +133,11 @@ class ServerProtocolTestGenerator( val operationName = operationSymbol.name val testModuleName = "server_${operationName.toSnakeCase()}_test" val moduleMeta = RustMetadata( - public = false, additionalAttributes = listOf( Attribute.Cfg("test"), Attribute.Custom("allow(unreachable_code, unused_variables)") - ) + ), + visibility = Visibility.PRIVATE ) writer.withModule(testModuleName, moduleMeta) { renderAllTestCases(allTests) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt index 43b7e1baeec..9189492aba0 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt @@ -74,15 +74,15 @@ class InlineDependency( name: String, baseDir: String, vararg additionalDependencies: RustDependency - ): InlineDependency = forRustFile(name, baseDir, public = false, *additionalDependencies) + ): InlineDependency = forRustFile(name, baseDir, visibility = Visibility.PRIVATE, *additionalDependencies) fun forRustFile( name: String, baseDir: String, - public: Boolean, + visibility: Visibility, vararg additionalDependencies: RustDependency ): InlineDependency { - val module = RustModule.default(name, public) + val module = RustModule.default(name, visibility) val filename = "$name.rs" // The inline crate is loaded as a dependency on the runtime classpath val rustFile = this::class.java.getResource("/$baseDir/src/$filename") diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustModule.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustModule.kt index 1672076513e..624f1049038 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustModule.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustModule.kt @@ -13,15 +13,15 @@ data class RustModule(val name: String, val rustMetadata: RustMetadata, val docu } companion object { - fun default(name: String, public: Boolean, documentation: String? = null): RustModule { - return RustModule(name, RustMetadata(public = public), documentation) + fun default(name: String, visibility: Visibility, documentation: String? = null): RustModule { + return RustModule(name, RustMetadata(visibility = visibility), documentation) } fun public(name: String, documentation: String? = null): RustModule = - default(name, public = true, documentation = documentation) + default(name, visibility = Visibility.PUBLIC, documentation = documentation) fun private(name: String, documentation: String? = null): RustModule = - default(name, public = false, documentation = documentation) + default(name, visibility = Visibility.PRIVATE, documentation = documentation) val Config = public("config", documentation = "Configuration for the service.") val Error = public("error", documentation = "Errors that can occur when calling the service.") diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustTypes.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustTypes.kt index efe48bfb352..430e9ae5361 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustTypes.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustTypes.kt @@ -269,13 +269,19 @@ fun RustType.isCopy(): Boolean = when (this) { else -> false } +enum class Visibility { + PRIVATE, + PUBCRATE, + PUBLIC +} + /** - * Meta information about a Rust construction (field, struct, or enum) + * Meta information about a Rust construction (field, struct, or enum). */ data class RustMetadata( val derives: Attribute.Derives = Attribute.Derives.Empty, val additionalAttributes: List = listOf(), - val public: Boolean + val visibility: Visibility = Visibility.PRIVATE ) { fun withDerives(vararg newDerive: RuntimeType): RustMetadata = this.copy(derives = derives.copy(derives = derives.derives + newDerive)) @@ -293,9 +299,13 @@ data class RustMetadata( } fun renderVisibility(writer: RustWriter): RustMetadata { - if (public) { - writer.writeInline("pub ") - } + writer.writeInline( + when (visibility) { + Visibility.PRIVATE -> "" + Visibility.PUBCRATE -> "pub(crate) " + Visibility.PUBLIC -> "pub " + } + ) return this } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt index 0e945dbda93..9e8dd8b0610 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt @@ -11,6 +11,7 @@ import org.jsoup.nodes.Element import software.amazon.smithy.codegen.core.CodegenException import software.amazon.smithy.codegen.core.Symbol import software.amazon.smithy.codegen.core.SymbolWriter +import software.amazon.smithy.codegen.core.SymbolWriter.Factory import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.BooleanShape import software.amazon.smithy.model.shapes.CollectionShape @@ -416,7 +417,7 @@ class RustWriter private constructor( */ fun withModule( moduleName: String, - rustMetadata: RustMetadata = RustMetadata(public = true), + rustMetadata: RustMetadata = RustMetadata(visibility = Visibility.PUBLIC), moduleWriter: RustWriter.() -> Unit ): RustWriter { // In Rust, modules must specify their own imports—they don't have access to the parent scope. diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenDelegator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenDelegator.kt index c1d853ecf7b..d1dd52665e8 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenDelegator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenDelegator.kt @@ -16,6 +16,7 @@ import software.amazon.smithy.rust.codegen.rustlang.InlineDependency import software.amazon.smithy.rust.codegen.rustlang.RustDependency import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.smithy.generators.CargoTomlGenerator import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.smithy.generators.LibRsGenerator @@ -94,7 +95,7 @@ open class RustCrate( ) { injectInlineDependencies() val modules = inner.writers.values.mapNotNull { it.module() }.filter { it != "lib" } - .map { modules[it] ?: RustModule.default(it, false) } + .map { modules[it] ?: RustModule.default(it, visibility = Visibility.PRIVATE) } inner.finalize( settings, model, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolMetadataProvider.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolMetadataProvider.kt index e03e2c713b4..6521efaca11 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolMetadataProvider.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolMetadataProvider.kt @@ -16,7 +16,7 @@ import software.amazon.smithy.model.traits.EnumDefinition import software.amazon.smithy.model.traits.EnumTrait import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.RustMetadata -import software.amazon.smithy.rust.codegen.smithy.RuntimeType.Companion.PartialEq +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.util.hasTrait /** @@ -78,11 +78,11 @@ class BaseSymbolMetadataProvider( private val containerDefault = RustMetadata( Attribute.Derives(defaultDerives.toSet()), additionalAttributes = additionalAttributes, - public = true + visibility = Visibility.PUBLIC ) override fun memberMeta(memberShape: MemberShape): RustMetadata { - return RustMetadata(public = true) + return RustMetadata(visibility = Visibility.PUBLIC) } override fun structureMeta(structureShape: StructureShape): RustMetadata { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/NestedAccessorGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/NestedAccessorGenerator.kt index c155af6a37c..b9967ed5ea8 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/NestedAccessorGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/NestedAccessorGenerator.kt @@ -10,6 +10,7 @@ import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.rust.codegen.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustType +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate @@ -23,7 +24,7 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.lensName /** Generator for accessing nested fields through optional values **/ class NestedAccessorGenerator(private val symbolProvider: RustSymbolProvider) { - private val module = RustModule("lens", RustMetadata(public = false), "Generated accessors for nested fields") + private val module = RustModule("lens", RustMetadata(visibility = Visibility.PUBLIC), "Generated accessors for nested fields") /** * Generate an accessor on [root] that consumes [root] and returns an `Option` for the nested item */ diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/PaginatorGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/PaginatorGenerator.kt index 8fa118ebfcc..fe4f0571f6a 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/PaginatorGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/PaginatorGenerator.kt @@ -15,6 +15,7 @@ import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustType +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.render @@ -76,7 +77,7 @@ class PaginatorGenerator private constructor( idx.getPaginationInfo(service, operation).orNull() ?: PANIC("failed to load pagination info") private val module = RustModule( "paginator", - RustMetadata(public = true), + RustMetadata(visibility = Visibility.PUBLIC), documentation = "Paginators for the service" ) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt index dee8208300a..2884ceb381e 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt @@ -20,6 +20,7 @@ import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustReservedWords import software.amazon.smithy.rust.codegen.rustlang.RustType import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.asArgumentType import software.amazon.smithy.rust.codegen.rustlang.asOptional @@ -297,7 +298,7 @@ class FluentClientGenerator( val clientModule = RustModule( "client", - RustMetadata(public = true), + RustMetadata(visibility = Visibility.PUBLIC), documentation = "Client and fluent builders for calling the service." ) } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/CombinedErrorGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/CombinedErrorGenerator.kt index 55dcbbe7ca8..88049b89e9a 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/CombinedErrorGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/CombinedErrorGenerator.kt @@ -15,6 +15,7 @@ import software.amazon.smithy.model.traits.RetryableTrait import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.documentShape import software.amazon.smithy.rust.codegen.rustlang.rust @@ -62,7 +63,7 @@ class CombinedErrorGenerator( val meta = RustMetadata( derives = Attribute.Derives(setOf(RuntimeType.Debug)), additionalAttributes = listOf(Attribute.NonExhaustive), - public = true + visibility = Visibility.PUBLIC ) writer.rust("/// Error type for the `${operationSymbol.name}` operation.") diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/TopLevelErrorGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/TopLevelErrorGenerator.kt index afd00f66ecd..26f7321da6a 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/TopLevelErrorGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/TopLevelErrorGenerator.kt @@ -12,6 +12,7 @@ import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.documentShape import software.amazon.smithy.rust.codegen.rustlang.rust @@ -46,7 +47,7 @@ class TopLevelErrorGenerator(codegenContext: CodegenContext, private val operati private val sdkError = CargoDependency.SmithyHttp(codegenContext.runtimeConfig).asType().member("result::SdkError") fun render(crate: RustCrate) { - crate.withModule(RustModule.default("error_meta", false)) { writer -> + crate.withModule(RustModule.default("error_meta", visibility = Visibility.PRIVATE)) { writer -> writer.renderDefinition() writer.renderImplDisplay() // Every operation error can be converted into service::Error @@ -102,7 +103,7 @@ class TopLevelErrorGenerator(codegenContext: CodegenContext, private val operati rust("/// All possible error types for this service.") RustMetadata( additionalAttributes = listOf(Attribute.NonExhaustive), - public = true + visibility = Visibility.PUBLIC ).withDerives(RuntimeType.Debug).render(this) rustBlock("enum Error") { allErrors.forEach { error -> diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt index b8191b0d3a0..abb9a680541 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt @@ -23,6 +23,7 @@ import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.escape import software.amazon.smithy.rust.codegen.rustlang.rust @@ -108,7 +109,7 @@ class ProtocolTestGenerator( val operationName = operationSymbol.name val testModuleName = "${operationName.toSnakeCase()}_request_test" val moduleMeta = RustMetadata( - public = false, + visibility = Visibility.PRIVATE, additionalAttributes = listOf( Attribute.Cfg("test"), Attribute.Custom("allow(unreachable_code, unused_variables)") diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/generators/StructureGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/generators/StructureGeneratorTest.kt index 0bccabf92d8..a893e9bba44 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/generators/StructureGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/generators/StructureGeneratorTest.kt @@ -11,6 +11,7 @@ import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.docs import software.amazon.smithy.rust.codegen.rustlang.raw import software.amazon.smithy.rust.codegen.rustlang.rust @@ -179,8 +180,11 @@ class StructureGeneratorTest { writer .withModule( "model", - // By attaching this lint, any missing documentation becomes a compiler error - RustMetadata(additionalAttributes = listOf(Attribute.Custom("deny(missing_docs)")), public = true) + RustMetadata( + // By attaching this lint, any missing documentation becomes a compiler error. + additionalAttributes = listOf(Attribute.Custom("deny(missing_docs)")), + visibility = Visibility.PUBLIC + ) ) { StructureGenerator(model, provider, this, model.lookup("com.test#Inner")).render() StructureGenerator(model, provider, this, model.lookup("com.test#MyStruct")).render() diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EndpointTraitBindingsTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EndpointTraitBindingsTest.kt index cb2d45fb7b3..bfc182ffd2e 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EndpointTraitBindingsTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EndpointTraitBindingsTest.kt @@ -10,6 +10,7 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.traits.EndpointTrait import software.amazon.smithy.rust.codegen.rustlang.RustModule +import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.smithy.CodegenContext @@ -61,7 +62,7 @@ internal class EndpointTraitBindingsTest { operationShape.expectTrait(EndpointTrait::class.java) ) val project = TestWorkspace.testProject() - project.withModule(RustModule.default("test", false)) { + project.withModule(RustModule.default("test", visibility = Visibility.PRIVATE)) { it.rust( """ struct GetStatusInput { From 7b5954ed8f58fca358ed39dd4b37e68a5becfa40 Mon Sep 17 00:00:00 2001 From: AWS SDK Rust Bot Date: Thu, 9 Jun 2022 22:53:53 +0000 Subject: [PATCH 25/49] Update changelogs --- CHANGELOG.md | 13 +++++++++++++ CHANGELOG.next.toml | 44 +------------------------------------------- aws/SDK_CHANGELOG.md | 12 ++++++++++++ 3 files changed, 26 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 032f195b456..9738dfac20e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,17 @@ +v0.43.0 (June 9th, 2022) +======================== +**New this release:** +- 🎉 ([smithy-rs#1381](https://github.com/awslabs/smithy-rs/issues/1381), @alonlud) Add ability to sign a request with all headers, or to change which headers are excluded from signing +- 🎉 ([smithy-rs#1390](https://github.com/awslabs/smithy-rs/issues/1390)) Add method `ByteStream::into_async_read`. This makes it easy to convert `ByteStream`s into a struct implementing `tokio:io::AsyncRead`. Available on **crate feature** `rt-tokio` only. +- ([smithy-rs#1404](https://github.com/awslabs/smithy-rs/issues/1404), @petrosagg) Add ability to specify a different rust crate name than the one derived from the package name +- ([smithy-rs#1404](https://github.com/awslabs/smithy-rs/issues/1404), @petrosagg) Switch to [RustCrypto](https://github.com/RustCrypto)'s implementation of MD5. + +**Contributors** +Thank you for your contributions! ❤ +- @alonlud ([smithy-rs#1381](https://github.com/awslabs/smithy-rs/issues/1381)) +- @petrosagg ([smithy-rs#1404](https://github.com/awslabs/smithy-rs/issues/1404)) + v0.42.0 (May 13th, 2022) ======================== **Breaking Changes:** diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 41969384624..1dffbf7f636 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -9,46 +9,4 @@ # message = "Fix typos in module documentation for generated crates" # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false } -# author = "rcoh" - -[[smithy-rs]] -message = "Add ability to sign a request with all headers, or to change which headers are excluded from signing" -references = ["smithy-rs#1381"] -meta = { "breaking" = false, "tada" = true, "bug" = false } -author = "alonlud" - - [[aws-sdk-rust]] - message = "Add method `ByteStream::into_async_read`. This makes it easy to convert `ByteStream`s into a struct implementing `tokio:io::AsyncRead`. Available on **crate feature** `rt-tokio` only." - references = ["smithy-rs#1390"] - meta = { "breaking" = false, "tada" = true, "bug" = false } - author = "Velfi" - - [[smithy-rs]] - message = "Add method `ByteStream::into_async_read`. This makes it easy to convert `ByteStream`s into a struct implementing `tokio:io::AsyncRead`. Available on **crate feature** `rt-tokio` only." - references = ["smithy-rs#1390"] - meta = { "breaking" = false, "tada" = true, "bug" = false } - author = "Velfi" - -[[smithy-rs]] -message = "Add ability to specify a different rust crate name than the one derived from the package name" -references = ["smithy-rs#1404"] -meta = { "breaking" = false, "tada" = false, "bug" = false } -author = "petrosagg" - -[[smithy-rs]] -message = "Switch to [RustCrypto](https://github.com/RustCrypto)'s implementation of MD5." -references = ["smithy-rs#1404"] -meta = { "breaking" = false, "tada" = false, "bug" = false } -author = "petrosagg" - -[[aws-sdk-rust]] -message = "Switch to [RustCrypto](https://github.com/RustCrypto)'s implementation of MD5." -references = ["smithy-rs#1404"] -meta = { "breaking" = false, "tada" = false, "bug" = false } -author = "petrosagg" - -[[aws-sdk-rust]] -message = "Add support for `credential_process` in AWS configs for fetching credentials from an external process." -references = ["smithy-rs#1356"] -meta = { "breaking" = false, "tada" = true, "bug" = false } -author = "jszwedko" +# author = "rcoh" \ No newline at end of file diff --git a/aws/SDK_CHANGELOG.md b/aws/SDK_CHANGELOG.md index 905b6a40f1c..41d82c5d31d 100644 --- a/aws/SDK_CHANGELOG.md +++ b/aws/SDK_CHANGELOG.md @@ -1,4 +1,16 @@ +v0.13.0 (June 9th, 2022) +======================== +**New this release:** +- 🎉 ([smithy-rs#1390](https://github.com/awslabs/smithy-rs/issues/1390)) Add method `ByteStream::into_async_read`. This makes it easy to convert `ByteStream`s into a struct implementing `tokio:io::AsyncRead`. Available on **crate feature** `rt-tokio` only. +- 🎉 ([smithy-rs#1356](https://github.com/awslabs/smithy-rs/issues/1356), @jszwedko) Add support for `credential_process` in AWS configs for fetching credentials from an external process. +- ([smithy-rs#1404](https://github.com/awslabs/smithy-rs/issues/1404), @petrosagg) Switch to [RustCrypto](https://github.com/RustCrypto)'s implementation of MD5. + +**Contributors** +Thank you for your contributions! ❤ +- @jszwedko ([smithy-rs#1356](https://github.com/awslabs/smithy-rs/issues/1356)) +- @petrosagg ([smithy-rs#1404](https://github.com/awslabs/smithy-rs/issues/1404)) + v0.12.0 (May 13th, 2022) ======================== **New this release:** From 4d4f91a00713bcbb2612dd4132a2608f1031d4b3 Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Fri, 10 Jun 2022 15:32:43 -0500 Subject: [PATCH 26/49] add: RFC for supporting flexible checksums (#1451) * add: RFC for supporting flexible checksums add: link to RFC0016 in SUMMARY.md fix: too many zeroes in RFC filenames * update: sigv4 update section language * update: RFC overview remove: arbitrary chunk size limit * update: RFC code to be safe from num conversion panics --- design/src/SUMMARY.md | 5 +- design/src/rfcs/overview.md | 3 + ...ut_config.md => rfc0014_timeout_config.md} | 0 ... => rfc0015_using_features_responsibly.md} | 0 .../rfcs/rfc0016_flexible_checksum_support.md | 1452 +++++++++++++++++ 5 files changed, 1458 insertions(+), 2 deletions(-) rename design/src/rfcs/{rfc00014_timeout_config.md => rfc0014_timeout_config.md} (100%) rename design/src/rfcs/{rfc00015_using_features_responsibly.md => rfc0015_using_features_responsibly.md} (100%) create mode 100644 design/src/rfcs/rfc0016_flexible_checksum_support.md diff --git a/design/src/SUMMARY.md b/design/src/SUMMARY.md index 787c6c4046d..c14450431a2 100644 --- a/design/src/SUMMARY.md +++ b/design/src/SUMMARY.md @@ -27,8 +27,9 @@ - [RFC-0011: Publishing Alpha to Crates.io](./rfcs/rfc0011_crates_io_alpha_publishing.md) - [RFC-0012: Independent Crate Versioning](./rfcs/rfc0012_independent_crate_versioning.md) - [RFC-0013: Body Callback APIs](./rfcs/rfc0013_body_callback_apis.md) - - [RFC-0014: Fine-grained timeout configuration](./rfcs/rfc00014_timeout_config.md) - - [RFC-0015: How Cargo "features" should be used in the SDK and runtime crates](./rfcs/rfc00015_using_features_responsibly.md) + - [RFC-0014: Fine-grained timeout configuration](./rfcs/rfc0014_timeout_config.md) + - [RFC-0015: How Cargo "features" should be used in the SDK and runtime crates](./rfcs/rfc0015_using_features_responsibly.md) + - [RFC-0016: Supporting Flexible Checksums](./rfcs/rfc0016_flexible_checksum_support.md) - [Contributing](./contributing/overview.md) - [Writing and debugging a low-level feature that relies on HTTP](./contributing/writing_and_debugging_a_low-level_feature_that_relies_on_HTTP.md) diff --git a/design/src/rfcs/overview.md b/design/src/rfcs/overview.md index 6243df804e6..b4224c6439b 100644 --- a/design/src/rfcs/overview.md +++ b/design/src/rfcs/overview.md @@ -23,3 +23,6 @@ - [RFC-0011: Publishing Alpha to Crates.io](./rfc0011_crates_io_alpha_publishing.md) - [RFC-0012: Independent Crate Versioning](./rfc0012_independent_crate_versioning.md) - [RFC-0013: Body Callback APIs](./rfc0013_body_callback_apis.md) +- [RFC-0014: Fine-grained timeout configuration](./rfcs/rfc0014_timeout_config.md) +- [RFC-0015: How Cargo "features" should be used in the SDK and runtime crates](./rfcs/rfc0015_using_features_responsibly.md) +- [RFC-0016: Supporting Flexible Checksums](./rfcs/rfc0016_flexible_checksum_support.md) diff --git a/design/src/rfcs/rfc00014_timeout_config.md b/design/src/rfcs/rfc0014_timeout_config.md similarity index 100% rename from design/src/rfcs/rfc00014_timeout_config.md rename to design/src/rfcs/rfc0014_timeout_config.md diff --git a/design/src/rfcs/rfc00015_using_features_responsibly.md b/design/src/rfcs/rfc0015_using_features_responsibly.md similarity index 100% rename from design/src/rfcs/rfc00015_using_features_responsibly.md rename to design/src/rfcs/rfc0015_using_features_responsibly.md diff --git a/design/src/rfcs/rfc0016_flexible_checksum_support.md b/design/src/rfcs/rfc0016_flexible_checksum_support.md new file mode 100644 index 00000000000..dc95696d836 --- /dev/null +++ b/design/src/rfcs/rfc0016_flexible_checksum_support.md @@ -0,0 +1,1452 @@ +RFC: Supporting Flexible Checksums +================================== + +> Status: RFC + +We can't currently update the S3 SDK because we don't support the new "Flexible Checksums" feature. This RFC describes this new feature and details how we should implement it in `smithy-rs`. + +## What is the "Flexible Checksums" feature? + +S3 has previously supported MD5 checksum validation of data. Now, it supports more checksum algorithms like CRC32, CRC32C, SHA-1, and SHA-256. This validation is available when putting objects to S3 and when getting them from S3. For more information, see [this AWS News Blog post][1]. + +## Implementing Checksums + +Checksum callbacks were introduced as a result of the acceptance of [RFC0013] and this RFC proposes a refactor to those callbacks, as well as several new wrappers for `SdkBody` that will provide new functionality. + +### Refactoring aws-smithy-checksums + +TLDR; This refactor of aws-smithy-checksums: +- **Removes the "callback" terminology:** As a word, "callback" doesn't carry any useful information, and doesn't aid in understanding. +- **Removes support for the `BodyCallback` API:** Instead of adding checksum callbacks to a body, we're going to use a "body wrapping" instead. "Body wrapping" is demonstrated in the [`ChecksumBody`](#checksumbody), [`AwsChunkedBody`](#awschunkedbody-and-awschunkedbodyoptions), and [`ChecksumValidatedBody`](#checksumvalidatedbody) sections. + + *NOTE: This doesn't remove the `BodyCallback` trait. That will still exist, we just won't use it.* +- **Updates terminology to focus on "headers" instead of "trailers":** Because the types we deal with in this module are named for HTTP headers, I chose to use that terminology instead. My hope is that this will be less strange to people reading this code. +- **Adds `fn checksum_algorithm_to_checksum_header_name`:** a function that's used in generated code to set a checksum request header. +- **Adds `fn checksum_header_name_to_checksum_algorithm`:** a function that's used in generated code when creating a checksum-validating response body. +- **Add new checksum-related "body wrapping" HTTP body types**: These are defined in the `body` module and will be shown later in this RFC. + +```rust +// In aws-smithy-checksums/src/lib.rs +//! Checksum calculation and verification callbacks + +use aws_smithy_types::base64; + +use bytes::Bytes; +use http::header::{HeaderMap, HeaderName, HeaderValue}; +use sha1::Digest; +use std::io::Write; + +pub mod body; + +// Valid checksum algorithm names +pub const CRC_32_NAME: &str = "crc32"; +pub const CRC_32_C_NAME: &str = "crc32c"; +pub const SHA_1_NAME: &str = "sha1"; +pub const SHA_256_NAME: &str = "sha256"; + +pub const CRC_32_HEADER_NAME: HeaderName = HeaderName::from_static("x-amz-checksum-crc32"); +pub const CRC_32_C_HEADER_NAME: HeaderName = HeaderName::from_static("x-amz-checksum-crc32c"); +pub const SHA_1_HEADER_NAME: HeaderName = HeaderName::from_static("x-amz-checksum-sha1"); +pub const SHA_256_HEADER_NAME: HeaderName = HeaderName::from_static("x-amz-checksum-sha256"); + +// Preserved for compatibility purposes. This should never be used by users, only within smithy-rs +const MD5_NAME: &str = "md5"; +const MD5_HEADER_NAME: HeaderName = HeaderName::from_static("content-md5"); + +/// Given a `&str` representing a checksum algorithm, return the corresponding `HeaderName` +/// for that checksum algorithm. +pub fn checksum_algorithm_to_checksum_header_name(checksum_algorithm: &str) -> HeaderName { + if checksum_algorithm.eq_ignore_ascii_case(CRC_32_NAME) { + CRC_32_HEADER_NAME + } else if checksum_algorithm.eq_ignore_ascii_case(CRC_32_C_NAME) { + CRC_32_C_HEADER_NAME + } else if checksum_algorithm.eq_ignore_ascii_case(SHA_1_NAME) { + SHA_1_HEADER_NAME + } else if checksum_algorithm.eq_ignore_ascii_case(SHA_256_NAME) { + SHA_256_HEADER_NAME + } else if checksum_algorithm.eq_ignore_ascii_case(MD5_NAME) { + MD5_HEADER_NAME + } else { + // TODO what's the best way to handle this case? + HeaderName::from_static("x-amz-checksum-unknown") + } +} + +/// Given a `HeaderName` representing a checksum algorithm, return the name of that algorithm +/// as a `&'static str`. +pub fn checksum_header_name_to_checksum_algorithm( + checksum_header_name: &HeaderName, +) -> &'static str { + if checksum_header_name == CRC_32_HEADER_NAME { + CRC_32_NAME + } else if checksum_header_name == CRC_32_C_HEADER_NAME { + CRC_32_C_NAME + } else if checksum_header_name == SHA_1_HEADER_NAME { + SHA_1_NAME + } else if checksum_header_name == SHA_256_HEADER_NAME { + SHA_256_NAME + } else if checksum_header_name == MD5_HEADER_NAME { + MD5_NAME + } else { + // TODO what's the best way to handle this case? + "unknown-checksum-algorithm" + } +} + +/// When a response has to be checksum-verified, we have to check possible headers until we find the +/// header with the precalculated checksum. Because a service may send back multiple headers, we have +/// to check them in order based on how fast each checksum is to calculate. +pub const CHECKSUM_HEADERS_IN_PRIORITY_ORDER: [HeaderName; 4] = [ + CRC_32_C_HEADER_NAME, + CRC_32_HEADER_NAME, + SHA_1_HEADER_NAME, + SHA_256_HEADER_NAME, +]; + +type BoxError = Box; + +/// Checksum algorithms are use to validate the integrity of data. Structs that implement this trait +/// can be used as checksum calculators. This trait requires Send + Sync because these checksums are +/// often used in a threaded context. +pub trait Checksum: Send + Sync { + /// Given a slice of bytes, update this checksum's internal state. + fn update(&mut self, bytes: &[u8]) -> Result<(), BoxError>; + /// Either return this checksum as a `HeaderMap` containing one HTTP header, or return an error + /// describing why checksum calculation failed. + fn headers(&self) -> Result>, BoxError>; + /// Return the `HeaderName` used to represent this checksum algorithm + fn header_name(&self) -> HeaderName; + /// "Finalize" this checksum, returning the calculated value as `Bytes` or an error that + /// occurred during checksum calculation. To print this value in a human-readable hexadecimal + /// format, you can print it using Rust's builtin [formatter]. + /// + /// _**NOTE:** typically, "finalizing" a checksum in Rust will take ownership of the checksum + /// struct. In this method, we clone the checksum's state before finalizing because checksums + /// may be used in a situation where taking ownership is not possible._ + /// + /// [formatter]: https://doc.rust-lang.org/std/fmt/trait.UpperHex.html + fn finalize(&self) -> Result; + /// Return the size of this checksum algorithms resulting checksum, in bytes. For example, the + /// CRC32 checksum algorithm calculates a 32 bit checksum, so a CRC32 checksum struct + /// implementing this trait method would return 4. + fn size(&self) -> u64; +} + +/// Create a new `Box` from an algorithm name. Valid algorithm names are defined as +/// `const`s in this module. +pub fn new_checksum(checksum_algorithm: &str) -> Box { + if checksum_algorithm.eq_ignore_ascii_case(CRC_32_NAME) { + Box::new(Crc32::default()) + } else if checksum_algorithm.eq_ignore_ascii_case(CRC_32_C_NAME) { + Box::new(Crc32c::default()) + } else if checksum_algorithm.eq_ignore_ascii_case(SHA_1_NAME) { + Box::new(Sha1::default()) + } else if checksum_algorithm.eq_ignore_ascii_case(SHA_256_NAME) { + Box::new(Sha256::default()) + } else if checksum_algorithm.eq_ignore_ascii_case(MD5_NAME) { + // It's possible to create an MD5 and we do this in some situations for compatibility. + // We deliberately hide this from users so that they don't go using it. + Box::new(Md5::default()) + } else { + panic!("unsupported checksum algorithm '{}'", checksum_algorithm) + } +} + +#[derive(Debug, Default)] +struct Crc32 { + hasher: crc32fast::Hasher, +} + +impl Crc32 { + fn update(&mut self, bytes: &[u8]) -> Result<(), BoxError> { + self.hasher.update(bytes); + + Ok(()) + } + + fn headers(&self) -> Result>, BoxError> { + let mut header_map = HeaderMap::new(); + header_map.insert(Self::header_name(), self.header_value()); + + Ok(Some(header_map)) + } + + fn finalize(&self) -> Result { + Ok(Bytes::copy_from_slice( + &self.hasher.clone().finalize().to_be_bytes(), + )) + } + + // Size of the checksum in bytes + fn size() -> u64 { + 4 + } + + fn header_name() -> HeaderName { + CRC_32_HEADER_NAME + } + + fn header_value(&self) -> HeaderValue { + // We clone the hasher because `Hasher::finalize` consumes `self` + let hash = self.hasher.clone().finalize(); + HeaderValue::from_str(&base64::encode(u32::to_be_bytes(hash))) + .expect("will always produce a valid header value from a CRC32 checksum") + } +} + +impl Checksum for Crc32 { + fn update( + &mut self, + bytes: &[u8], + ) -> Result<(), Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::update(self, bytes) + } + fn headers( + &self, + ) -> Result, Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::headers(self) + } + fn header_name(&self) -> HeaderName { + Self::header_name() + } + fn finalize(&self) -> Result { + Self::finalize(self) + } + fn size(&self) -> u64 { + Self::size() + } +} + +#[derive(Debug, Default)] +struct Crc32c { + state: Option, +} + +impl Crc32c { + fn update(&mut self, bytes: &[u8]) -> Result<(), BoxError> { + self.state = match self.state { + Some(crc) => Some(crc32c::crc32c_append(crc, bytes)), + None => Some(crc32c::crc32c(bytes)), + }; + + Ok(()) + } + + fn headers(&self) -> Result>, BoxError> { + let mut header_map = HeaderMap::new(); + header_map.insert(Self::header_name(), self.header_value()); + + Ok(Some(header_map)) + } + + fn finalize(&self) -> Result { + Ok(Bytes::copy_from_slice( + &self.state.unwrap_or_default().to_be_bytes(), + )) + } + + // Size of the checksum in bytes + fn size() -> u64 { + 4 + } + + fn header_name() -> HeaderName { + CRC_32_C_HEADER_NAME + } + + fn header_value(&self) -> HeaderValue { + // If no data was provided to this callback and no CRC was ever calculated, return zero as the checksum. + let hash = self.state.unwrap_or_default(); + HeaderValue::from_str(&base64::encode(u32::to_be_bytes(hash))) + .expect("will always produce a valid header value from a CRC32C checksum") + } +} + +impl Checksum for Crc32c { + fn update( + &mut self, + bytes: &[u8], + ) -> Result<(), Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::update(self, bytes) + } + fn headers( + &self, + ) -> Result, Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::headers(self) + } + fn header_name(&self) -> HeaderName { + Self::header_name() + } + fn finalize(&self) -> Result { + Self::finalize(self) + } + fn size(&self) -> u64 { + Self::size() + } +} + +#[derive(Debug, Default)] +struct Sha1 { + hasher: sha1::Sha1, +} + +impl Sha1 { + fn update(&mut self, bytes: &[u8]) -> Result<(), BoxError> { + self.hasher.write_all(bytes)?; + + Ok(()) + } + + fn headers(&self) -> Result>, BoxError> { + let mut header_map = HeaderMap::new(); + header_map.insert(Self::header_name(), self.header_value()); + + Ok(Some(header_map)) + } + + fn finalize(&self) -> Result { + Ok(Bytes::copy_from_slice( + self.hasher.clone().finalize().as_slice(), + )) + } + + // Size of the checksum in bytes + fn size() -> u64 { + 20 + } + + fn header_name() -> HeaderName { + SHA_1_HEADER_NAME + } + + fn header_value(&self) -> HeaderValue { + // We clone the hasher because `Hasher::finalize` consumes `self` + let hash = self.hasher.clone().finalize(); + HeaderValue::from_str(&base64::encode(&hash[..])) + .expect("will always produce a valid header value from a SHA-1 checksum") + } +} + +impl Checksum for Sha1 { + fn update( + &mut self, + bytes: &[u8], + ) -> Result<(), Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::update(self, bytes) + } + fn headers( + &self, + ) -> Result, Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::headers(self) + } + fn header_name(&self) -> HeaderName { + Self::header_name() + } + fn finalize(&self) -> Result { + Self::finalize(self) + } + fn size(&self) -> u64 { + Self::size() + } +} + +#[derive(Debug, Default)] +struct Sha256 { + hasher: sha2::Sha256, +} + +impl Sha256 { + fn update(&mut self, bytes: &[u8]) -> Result<(), BoxError> { + self.hasher.write_all(bytes)?; + + Ok(()) + } + + fn headers(&self) -> Result>, BoxError> { + let mut header_map = HeaderMap::new(); + header_map.insert(Self::header_name(), self.header_value()); + + Ok(Some(header_map)) + } + + fn finalize(&self) -> Result { + Ok(Bytes::copy_from_slice( + self.hasher.clone().finalize().as_slice(), + )) + } + + // Size of the checksum in bytes + fn size() -> u64 { + 32 + } + + fn header_name() -> HeaderName { + SHA_256_HEADER_NAME + } + + fn header_value(&self) -> HeaderValue { + // We clone the hasher because `Hasher::finalize` consumes `self` + let hash = self.hasher.clone().finalize(); + HeaderValue::from_str(&base64::encode(&hash[..])) + .expect("will always produce a valid header value from a SHA-256 checksum") + } +} + +impl Checksum for Sha256 { + fn update( + &mut self, + bytes: &[u8], + ) -> Result<(), Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::update(self, bytes) + } + fn headers( + &self, + ) -> Result, Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::headers(self) + } + fn header_name(&self) -> HeaderName { + Self::header_name() + } + fn finalize(&self) -> Result { + Self::finalize(self) + } + fn size(&self) -> u64 { + Self::size() + } +} + +#[derive(Debug, Default)] +struct Md5 { + hasher: md5::Md5, +} + +impl Md5 { + fn update(&mut self, bytes: &[u8]) -> Result<(), BoxError> { + self.hasher.write_all(bytes)?; + + Ok(()) + } + + fn headers(&self) -> Result>, BoxError> { + let mut header_map = HeaderMap::new(); + header_map.insert(Self::header_name(), self.header_value()); + + Ok(Some(header_map)) + } + + fn finalize(&self) -> Result { + Ok(Bytes::copy_from_slice( + self.hasher.clone().finalize().as_slice(), + )) + } + + // Size of the checksum in bytes + fn size() -> u64 { + 16 + } + + fn header_name() -> HeaderName { + MD5_HEADER_NAME + } + + fn header_value(&self) -> HeaderValue { + // We clone the hasher because `Hasher::finalize` consumes `self` + let hash = self.hasher.clone().finalize(); + HeaderValue::from_str(&base64::encode(&hash[..])) + .expect("will always produce a valid header value from an MD5 checksum") + } +} + +impl Checksum for Md5 { + fn update( + &mut self, + bytes: &[u8], + ) -> Result<(), Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::update(self, bytes) + } + fn headers( + &self, + ) -> Result, Box<(dyn std::error::Error + Send + Sync + 'static)>> { + Self::headers(self) + } + fn header_name(&self) -> HeaderName { + Self::header_name() + } + fn finalize(&self) -> Result { + Self::finalize(self) + } + fn size(&self) -> u64 { + Self::size() + } +} + +// We have existing tests for the checksums, those don't require an update +``` + +### `ChecksumBody` + +When creating a checksum-validated request with an in-memory request body, we can read the body, calculate a checksum, and insert the checksum header, all before sending the request. When creating a checksum-validated request with a streaming request body, we don't have that luxury. Instead, we must calculate a checksum while sending the body, and append that checksum as a [trailer][2]. + +We will accomplish this by wrapping the `SdkBody` that requires validation within a `ChecksumBody`. Afterwards, we'll need to wrap the `ChecksumBody` in yet another layer which we'll discuss in the [`AwsChunkedBody` and `AwsChunkedBodyOptions`](#awschunkedbody-and-awschunkedbodyoptions) section. + +```rust +// In aws-smithy-checksums/src/body.rs +use crate::{new_checksum, Checksum}; + +use aws_smithy_http::body::SdkBody; +use aws_smithy_http::header::append_merge_header_maps; +use aws_smithy_types::base64; + +use bytes::{Buf, Bytes}; +use http::header::HeaderName; +use http::{HeaderMap, HeaderValue}; +use http_body::{Body, SizeHint}; +use pin_project::pin_project; + +use std::fmt::Display; +use std::pin::Pin; +use std::task::{Context, Poll}; + +/// A `ChecksumBody` will read and calculate a request body as it's being sent. Once the body has +/// been completely read, it'll append a trailer with the calculated checksum. +#[pin_project] +pub struct ChecksumBody { + #[pin] + inner: InnerBody, + #[pin] + checksum: Box, +} + +impl ChecksumBody { + /// Given an `SdkBody` and the name of a checksum algorithm as a `&str`, create a new + /// `ChecksumBody`. Valid checksum algorithm names are defined in this crate's + /// [root module](super). + /// + /// # Panics + /// + /// This will panic if the given checksum algorithm is not supported. + pub fn new(body: SdkBody, checksum_algorithm: &str) -> Self { + Self { + checksum: new_checksum(checksum_algorithm), + inner: body, + } + } + + /// Return the name of the trailer that will be emitted by this `ChecksumBody` + pub fn trailer_name(&self) -> HeaderName { + self.checksum.header_name() + } + + /// Calculate and return the sum of the: + /// - checksum when base64 encoded + /// - trailer name + /// - trailer separator + /// + /// This is necessary for calculating the true size of the request body for certain + /// content-encodings. + pub fn trailer_length(&self) -> u64 { + let trailer_name_size_in_bytes = self.checksum.header_name().as_str().len() as u64; + let base64_encoded_checksum_size_in_bytes = base64::encoded_length(self.checksum.size()); + + (trailer_name_size_in_bytes + // HTTP trailer names and values may be separated by either a single colon or a single + // colon and a whitespace. In the AWS Rust SDK, we use a single colon. + + ":".len() as u64 + + base64_encoded_checksum_size_in_bytes) + } + + fn poll_inner( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>> { + let this = self.project(); + let inner = this.inner; + let mut checksum = this.checksum; + + match inner.poll_data(cx) { + Poll::Ready(Some(Ok(mut data))) => { + let len = data.chunk().len(); + let bytes = data.copy_to_bytes(len); + + if let Err(e) = checksum.update(&bytes) { + return Poll::Ready(Some(Err(e))); + } + + Poll::Ready(Some(Ok(bytes))) + } + Poll::Ready(None) => Poll::Ready(None), + Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), + Poll::Pending => Poll::Pending, + } + } +} + +impl http_body::Body for ChecksumBody { + type Data = Bytes; + type Error = aws_smithy_http::body::Error; + + fn poll_data( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>> { + self.poll_inner(cx) + } + + fn poll_trailers( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>, Self::Error>> { + let this = self.project(); + match ( + this.checksum.headers(), + http_body::Body::poll_trailers(this.inner, cx), + ) { + // If everything is ready, return trailers, merging them if we have more than one map + (Ok(outer_trailers), Poll::Ready(Ok(inner_trailers))) => { + let trailers = match (outer_trailers, inner_trailers) { + // Values from the inner trailer map take precedent over values from the outer map + (Some(outer), Some(inner)) => Some(append_merge_header_maps(inner, outer)), + // If only one or neither produced trailers, just combine the `Option`s with `or` + (outer, inner) => outer.or(inner), + }; + Poll::Ready(Ok(trailers)) + } + // If the inner poll is Ok but the outer body's checksum callback encountered an error, + // return the error + (Err(e), Poll::Ready(Ok(_))) => Poll::Ready(Err(e)), + // Otherwise return the result of the inner poll. + // It may be pending or it may be ready with an error. + (_, inner_poll) => inner_poll, + } + } + + fn is_end_stream(&self) -> bool { + self.inner.is_end_stream() + } + + fn size_hint(&self) -> SizeHint { + let body_size_hint = self.inner.size_hint(); + match body_size_hint.exact() { + Some(size) => { + let checksum_size_hint = self.checksum.size(); + SizeHint::with_exact(size + checksum_size_hint) + } + // TODO is this the right behavior? + None => { + let checksum_size_hint = self.checksum.size(); + let mut summed_size_hint = SizeHint::new(); + summed_size_hint.set_lower(body_size_hint.lower() + checksum_size_hint); + + if let Some(body_size_hint_upper) = body_size_hint.upper() { + summed_size_hint.set_upper(body_size_hint_upper + checksum_size_hint); + } + + summed_size_hint + } + } + } +} + +// The tests I have written are omitted from this RFC for brevity. The request body checksum calculation and trailer size calculations are all tested. +``` + +### `ChecksumValidatedBody` + +Users may request checksum validation for response bodies. That capability is provided by `ChecksumValidatedBody`, which will calculate a checksum as the response body is being read. Once all data has been read, the calculated checksum is compared to a precalculated checksum set during body creation. If the checksums don't match, then the body will emit an error. + +```rust +// In aws-smithy-checksums/src/body.rs +/// A response body that will calculate a checksum as it is read. If all data is read and the +/// calculated checksum doesn't match a precalculated checksum, this body will emit an +/// [asw_smithy_http::body::Error]. +#[pin_project] +pub struct ChecksumValidatedBody { + #[pin] + inner: InnerBody, + #[pin] + checksum: Box, + precalculated_checksum: Bytes, +} + +impl ChecksumValidatedBody { + /// Given an `SdkBody`, the name of a checksum algorithm as a `&str`, and a precalculated + /// checksum represented as `Bytes`, create a new `ChecksumValidatedBody`. + /// Valid checksum algorithm names are defined in this crate's [root module](super). + /// + /// # Panics + /// + /// This will panic if the given checksum algorithm is not supported. + pub fn new(body: SdkBody, checksum_algorithm: &str, precalculated_checksum: Bytes) -> Self { + Self { + checksum: new_checksum(checksum_algorithm), + inner: body, + precalculated_checksum, + } + } + + fn poll_inner( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>> { + let this = self.project(); + let inner = this.inner; + let mut checksum = this.checksum; + + match inner.poll_data(cx) { + Poll::Ready(Some(Ok(mut data))) => { + let len = data.chunk().len(); + let bytes = data.copy_to_bytes(len); + + if let Err(e) = checksum.update(&bytes) { + return Poll::Ready(Some(Err(e))); + } + + Poll::Ready(Some(Ok(bytes))) + } + // Once the inner body has stopped returning data, check the checksum + // and return an error if it doesn't match. + Poll::Ready(None) => { + let actual_checksum = { + match checksum.finalize() { + Ok(checksum) => checksum, + Err(err) => { + return Poll::Ready(Some(Err(err))); + } + } + }; + if *this.precalculated_checksum == actual_checksum { + Poll::Ready(None) + } else { + // So many parens it's starting to look like LISP + Poll::Ready(Some(Err(Box::new(Error::checksum_mismatch( + this.precalculated_checksum.clone(), + actual_checksum, + ))))) + } + } + Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), + Poll::Pending => Poll::Pending, + } + } +} + +/// Errors related to checksum calculation and validation +#[derive(Debug, Eq, PartialEq)] +#[non_exhaustive] +pub enum Error { + /// The actual checksum didn't match the expected checksum. The checksummed data has been + /// altered since the expected checksum was calculated. + ChecksumMismatch { expected: Bytes, actual: Bytes }, +} + +impl Error { + /// Given an expected checksum and an actual checksum in `Bytes` form, create a new + /// `Error::ChecksumMismatch`. + pub fn checksum_mismatch(expected: Bytes, actual: Bytes) -> Self { + Self::ChecksumMismatch { expected, actual } + } +} + +impl Display for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + match self { + Error::ChecksumMismatch { expected, actual } => write!( + f, + "body checksum mismatch. expected body checksum to be {:x} but it was {:x}", + expected, actual + ), + } + } +} + +impl std::error::Error for Error {} + +impl http_body::Body for ChecksumValidatedBody { + type Data = Bytes; + type Error = aws_smithy_http::body::Error; + + fn poll_data( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>> { + self.poll_inner(cx) + } + + fn poll_trailers( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>, Self::Error>> { + self.project().inner.poll_trailers(cx) + } + + // Once the inner body returns true for is_end_stream, we still need to + // verify the checksum; Therefore, we always return false here. + fn is_end_stream(&self) -> bool { + false + } + + fn size_hint(&self) -> SizeHint { + self.inner.size_hint() + } +} + +// The tests I have written are omitted from this RFC for brevity. The response body checksum verification is tested. +``` + +### `AwsChunkedBody` and `AwsChunkedBodyOptions` + +In order to send a request with checksum trailers, we must use an AWS-specific content encoding called `aws-chunked`. This encoding requires that we: +- Divide the original body content into one or more chunks. For our purposes we only ever use one chunk. +- Append a hexadecimal chunk size header to each chunk. +- Suffix each chunk with a [CRLF (carriage return line feed)][3]. +- Send a 0 and CRLF to close the original body content section. +- Send trailers as part of the request body, suffixing each with a CRLF. +- Send a final CRLF to close the request body. + +As an example, Sending a regular request body with a SHA-256 checksum would look similar to this: + +```HTTP +PUT SOMEURL HTTP/1.1 +x-amz-checksum-sha256: ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw= +Content-Length: 11 +... + +Hello world +``` + +and the `aws-chunked` version would look like this: + +```HTTP +PUT SOMEURL HTTP/1.1 +x-amz-trailer: x-amz-checksum-sha256 +x-amz-decoded-content-length: 11 +Content-Encoding: aws-chunked +Content-Length: 87 +... + +B\r\n +Hello world\r\n +0\r\n +x-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n +\r\n +``` + +_**NOTES:**_ +- *In the second example, `B` is the hexadecimal representation of 11.* +- *Authorization and other headers are omitted from the examples above for brevity.* +- *When using `aws-chunked` content encoding, S3 requires that we send the `x-amz-decoded-content-length` with the length of the original body content.* + +This encoding scheme is performed by `AwsChunkedBody` and configured with `AwsChunkedBodyOptions`. + +```rust +// In aws-http/src/content_encoding.rs +use aws_smithy_checksums::body::ChecksumBody; +use aws_smithy_http::body::SdkBody; + +use bytes::{Buf, Bytes, BytesMut}; +use http::{HeaderMap, HeaderValue}; +use http_body::{Body, SizeHint}; +use pin_project::pin_project; + +use std::pin::Pin; +use std::task::{Context, Poll}; + +const CRLF: &str = "\r\n"; +const CHUNK_TERMINATOR: &str = "0\r\n"; + +/// Content encoding header value constants +pub mod header_value { + /// Header value denoting "aws-chunked" encoding + pub const AWS_CHUNKED: &str = "aws-chunked"; +} + +/// Options used when constructing an [`AwsChunkedBody`][AwsChunkedBody]. +#[derive(Debug, Default)] +#[non_exhaustive] +pub struct AwsChunkedBodyOptions { + /// The total size of the stream. For unsigned encoding this implies that + /// there will only be a single chunk containing the underlying payload, + /// unless ChunkLength is also specified. + pub stream_length: Option, + /// The maximum size of each chunk to be sent. + /// + /// If ChunkLength and stream_length are both specified, the stream will be + /// broken up into chunk_length chunks. The encoded length of the aws-chunked + /// encoding can still be determined as long as all trailers, if any, have a + /// fixed length. + pub chunk_length: Option, + /// The length of each trailer sent within an `AwsChunkedBody`. Necessary in + /// order to correctly calculate the total size of the body accurately. + pub trailer_lens: Vec, +} + +impl AwsChunkedBodyOptions { + /// Create a new [`AwsChunkedBodyOptions`][AwsChunkedBodyOptions] + pub fn new() -> Self { + Self::default() + } + + /// Set stream length + pub fn with_stream_length(mut self, stream_length: u64) -> Self { + self.stream_length = Some(stream_length); + self + } + + /// Set chunk length + pub fn with_chunk_length(mut self, chunk_length: u64) -> Self { + self.chunk_length = Some(chunk_length); + self + } + + /// Set a trailer len + pub fn with_trailer_len(mut self, trailer_len: u64) -> Self { + self.trailer_lens.push(trailer_len); + self + } +} + +#[derive(Debug, PartialEq, Eq)] +enum AwsChunkedBodyState { + WritingChunkSize, + WritingChunk, + WritingTrailers, + Closed, +} + +/// A request body compatible with `Content-Encoding: aws-chunked` +/// +/// Chunked-Body grammar is defined in [ABNF] as: +/// +/// ```txt +/// Chunked-Body = *chunk +/// last-chunk +/// chunked-trailer +/// CRLF +/// +/// chunk = chunk-size CRLF chunk-data CRLF +/// chunk-size = 1*HEXDIG +/// last-chunk = 1*("0") CRLF +/// chunked-trailer = *( entity-header CRLF ) +/// entity-header = field-name ":" OWS field-value OWS +/// ``` +/// For more info on what the abbreviations mean, see https://datatracker.ietf.org/doc/html/rfc7230#section-1.2 +/// +/// [ABNF]:https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form +#[derive(Debug)] +#[pin_project] +pub struct AwsChunkedBody { + #[pin] + inner: InnerBody, + #[pin] + state: AwsChunkedBodyState, + options: AwsChunkedBodyOptions, +} + +// Currently, we only use this in terms of a streaming request body with checksum trailers +type Inner = ChecksumBody; + +impl AwsChunkedBody { + /// Wrap the given body in an outer body compatible with `Content-Encoding: aws-chunked` + pub fn new(body: Inner, options: AwsChunkedBodyOptions) -> Self { + Self { + inner: body, + state: AwsChunkedBodyState::WritingChunkSize, + options, + } + } + + fn encoded_length(&self) -> Option { + if self.options.chunk_length.is_none() && self.options.stream_length.is_none() { + return None; + } + + let mut length = 0; + let stream_length = self.options.stream_length.unwrap_or_default(); + if stream_length != 0 { + if let Some(chunk_length) = self.options.chunk_length { + let num_chunks = stream_length / chunk_length; + length += num_chunks * get_unsigned_chunk_bytes_length(chunk_length); + let remainder = stream_length % chunk_length; + if remainder != 0 { + length += get_unsigned_chunk_bytes_length(remainder); + } + } else { + length += get_unsigned_chunk_bytes_length(stream_length); + } + } + + // End chunk + length += CHUNK_TERMINATOR.len() as u64; + + // Trailers + for len in self.options.trailer_lens.iter() { + length += len + CRLF.len() as u64; + } + + // Encoding terminator + length += CRLF.len() as u64; + + Some(length) + } +} + +fn prefix_with_chunk_size(data: Bytes, chunk_size: u64) -> Bytes { + // Len is the size of the entire chunk as defined in `AwsChunkedBodyOptions` + let mut prefixed_data = BytesMut::from(format!("{:X?}\r\n", chunk_size).as_bytes()); + prefixed_data.extend_from_slice(&data); + + prefixed_data.into() +} + +fn get_unsigned_chunk_bytes_length(payload_length: u64) -> u64 { + let hex_repr_len = int_log16(payload_length); + hex_repr_len + CRLF.len() as u64 + payload_length + CRLF.len() as u64 +} + +fn trailers_as_aws_chunked_bytes( + total_length_of_trailers_in_bytes: u64, + trailer_map: Option, +) -> Bytes { + use std::fmt::Write; + + // On 32-bit operating systems, we might not be able to convert the u64 to a usize, so we just + // use `String::new` in that case. + let mut trailers = match usize::try_from(total_length_of_trailers_in_bytes) { + Ok(total_length_of_trailers_in_bytes) => { + String::with_capacity(total_length_of_trailers_in_bytes) + } + Err(_) => String::new(), + }; + let mut already_wrote_first_trailer = false; + + if let Some(trailer_map) = trailer_map { + for (header_name, header_value) in trailer_map.into_iter() { + match header_name { + // New name, new value + Some(header_name) => { + if already_wrote_first_trailer { + // First trailer shouldn't have a preceding CRLF, but every trailer after it should + trailers.write_str(CRLF).unwrap(); + } else { + already_wrote_first_trailer = true; + } + + trailers.write_str(header_name.as_str()).unwrap(); + trailers.write_char(':').unwrap(); + } + // Same name, new value + None => { + trailers.write_char(',').unwrap(); + } + } + trailers.write_str(header_value.to_str().unwrap()).unwrap(); + } + } + + // Write CRLF to end the body + trailers.write_str(CRLF).unwrap(); + // If we wrote at least one trailer, we need to write an extra CRLF + if total_length_of_trailers_in_bytes != 0 { + trailers.write_str(CRLF).unwrap(); + } + + trailers.into() +} + +impl Body for AwsChunkedBody { + type Data = Bytes; + type Error = aws_smithy_http::body::Error; + + fn poll_data( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>> { + tracing::info!("polling AwsChunkedBody"); + let mut this = self.project(); + + match *this.state { + AwsChunkedBodyState::WritingChunkSize => match this.inner.poll_data(cx) { + Poll::Ready(Some(Ok(data))) => { + // A chunk must be prefixed by chunk size in hexadecimal + tracing::info!("writing chunk size and start of chunk"); + *this.state = AwsChunkedBodyState::WritingChunk; + let total_chunk_size = this + .options + .chunk_length + .or(this.options.stream_length) + .unwrap_or_default(); + Poll::Ready(Some(Ok(prefix_with_chunk_size(data, total_chunk_size)))) + } + Poll::Ready(None) => { + tracing::info!("chunk was empty, writing last-chunk"); + *this.state = AwsChunkedBodyState::WritingTrailers; + Poll::Ready(Some(Ok(Bytes::from("0\r\n")))) + } + Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), + Poll::Pending => Poll::Pending, + }, + AwsChunkedBodyState::WritingChunk => match this.inner.poll_data(cx) { + Poll::Ready(Some(Ok(mut data))) => { + tracing::info!("writing rest of chunk data"); + Poll::Ready(Some(Ok(data.copy_to_bytes(data.len())))) + } + Poll::Ready(None) => { + tracing::info!("no more chunk data, writing CRLF and last-chunk"); + *this.state = AwsChunkedBodyState::WritingTrailers; + Poll::Ready(Some(Ok(Bytes::from("\r\n0\r\n")))) + } + Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), + Poll::Pending => Poll::Pending, + }, + AwsChunkedBodyState::WritingTrailers => { + return match this.inner.poll_trailers(cx) { + Poll::Ready(Ok(trailers)) => { + *this.state = AwsChunkedBodyState::Closed; + let total_length_of_trailers_in_bytes = + this.options.trailer_lens.iter().fold(0, |acc, n| acc + n); + + Poll::Ready(Some(Ok(trailers_as_aws_chunked_bytes( + total_length_of_trailers_in_bytes, + trailers, + )))) + } + Poll::Pending => Poll::Pending, + Poll::Ready(Err(e)) => Poll::Ready(Some(Err(e))), + }; + } + AwsChunkedBodyState::Closed => { + return Poll::Ready(None); + } + } + } + + fn poll_trailers( + self: Pin<&mut Self>, + _cx: &mut Context<'_>, + ) -> Poll>, Self::Error>> { + // Trailers were already appended to the body because of the content encoding scheme + Poll::Ready(Ok(None)) + } + + fn is_end_stream(&self) -> bool { + self.state == AwsChunkedBodyState::Closed + } + + fn size_hint(&self) -> SizeHint { + SizeHint::with_exact( + self.encoded_length() + .expect("Requests made with aws-chunked encoding must have known size") + as u64, + ) + } +} + +// Used for finding how many hexadecimal digits it takes to represent a base 10 integer +fn int_log16(mut i: T) -> u64 +where + T: std::ops::DivAssign + PartialOrd + From + Copy, +{ + let mut len = 0; + let zero = T::from(0); + let sixteen = T::from(16); + + while i > zero { + i /= sixteen; + len += 1; + } + + len +} + +#[cfg(test)] +mod tests { + use super::AwsChunkedBody; + use crate::content_encoding::AwsChunkedBodyOptions; + use aws_smithy_checksums::body::ChecksumBody; + use aws_smithy_http::body::SdkBody; + use bytes::Buf; + use bytes_utils::SegmentedBuf; + use http_body::Body; + use std::io::Read; + + #[tokio::test] + async fn test_aws_chunked_encoded_body() { + let input_text = "Hello world"; + let sdk_body = SdkBody::from(input_text); + let checksum_body = ChecksumBody::new(sdk_body, "sha256"); + let aws_chunked_body_options = AwsChunkedBodyOptions { + stream_length: Some(input_text.len() as u64), + chunk_length: None, + trailer_lens: vec![ + "x-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=".len() as u64, + ], + }; + let mut aws_chunked_body = AwsChunkedBody::new(checksum_body, aws_chunked_body_options); + + let mut output = SegmentedBuf::new(); + while let Some(buf) = aws_chunked_body.data().await { + output.push(buf.unwrap()); + } + + let mut actual_output = String::new(); + output + .reader() + .read_to_string(&mut actual_output) + .expect("Doesn't cause IO errors"); + + let expected_output = "B\r\nHello world\r\n0\r\nx-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n\r\n"; + + // Verify data is complete and correctly encoded + assert_eq!(expected_output, actual_output); + + assert!( + aws_chunked_body + .trailers() + .await + .expect("checksum generation was without error") + .is_none(), + "aws-chunked encoded bodies don't have normal HTTP trailers" + ); + } + + #[tokio::test] + async fn test_empty_aws_chunked_encoded_body() { + let sdk_body = SdkBody::from(""); + let checksum_body = ChecksumBody::new(sdk_body, "sha256"); + let aws_chunked_body_options = AwsChunkedBodyOptions { + stream_length: Some(0), + chunk_length: None, + trailer_lens: vec![ + "x-amz-checksum-sha256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=".len() as u64, + ], + }; + let mut aws_chunked_body = AwsChunkedBody::new(checksum_body, aws_chunked_body_options); + + let mut output = SegmentedBuf::new(); + while let Some(buf) = aws_chunked_body.data().await { + output.push(buf.unwrap()); + } + + let mut actual_output = String::new(); + output + .reader() + .read_to_string(&mut actual_output) + .expect("Doesn't cause IO errors"); + + let expected_output = + "0\r\nx-amz-checksum-sha256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\r\n\r\n"; + + // Verify data is complete and correctly encoded + assert_eq!(expected_output, actual_output); + + assert!( + aws_chunked_body + .trailers() + .await + .expect("checksum generation was without error") + .is_none(), + "aws-chunked encoded bodies don't have normal HTTP trailers" + ); + } +} +``` + +### Sigv4 Update + +When sending checksum-verified requests with a streaming body, we must update the usual signing process. Instead of signing the request based on the request body's checksum, we must sign it with a special header instead: + +```HTTP +Authorization: +x-amz-content-sha256: STREAMING-UNSIGNED-PAYLOAD-TRAILER +``` + +Setting `STREAMING-UNSIGNED-PAYLOAD-TRAILER` tells the signer that we're sending an unsigned streaming body that will be followed by trailers. + +We can achieve this by: +- Adding a new variant to `SignableBody`: + ```rust + /// A signable HTTP request body + #[derive(Debug, Clone, Eq, PartialEq)] + #[non_exhaustive] + pub enum SignableBody<'a> { + // existing variants have been omitted for brevity... + + /// An unsigned payload with trailers + /// + /// StreamingUnsignedPayloadTrailer is used for streaming requests where the contents of the + /// body cannot be known prior to signing **AND** which include HTTP trailers. + StreamingUnsignedPayloadTrailer, + } + ``` +- Updating the `CanonicalRequest::payload_hash` method to include the new `SignableBody` variant: + ```rust + fn payload_hash<'b>(body: &'b SignableBody<'b>) -> Cow<'b, str> { + // Payload hash computation + // + // Based on the input body, set the payload_hash of the canonical request: + // Either: + // - compute a hash + // - use the precomputed hash + // - use `UnsignedPayload` + // - use `StreamingUnsignedPayloadTrailer` + match body { + SignableBody::Bytes(data) => Cow::Owned(sha256_hex_string(data)), + SignableBody::Precomputed(digest) => Cow::Borrowed(digest.as_str()), + SignableBody::UnsignedPayload => Cow::Borrowed(UNSIGNED_PAYLOAD), + SignableBody::StreamingUnsignedPayloadTrailer => { + Cow::Borrowed(STREAMING_UNSIGNED_PAYLOAD_TRAILER) + } + } + } + ``` +- *(in generated code)* Inserting the `SignableBody` into the request property bag when making a checksum-verified streaming request: + ```rust + if self.checksum_algorithm.is_some() { + request + .properties_mut() + .insert(aws_sig_auth::signer::SignableBody::StreamingUnsignedPayloadTrailer); + } + ``` + +It's possible to send `aws-chunked` requests where each chunk is signed individually. Because this feature isn't strictly necessary for flexible checksums, I've avoided implementing it. + +### Inlineables + +In order to avoid writing lots of Rust in Kotlin, I have implemented request and response building functions as inlineables: + +- Building checksum-validated requests with in-memory request bodies: + ```rust + // In aws/rust-runtime/aws-inlineable/src/streaming_body_with_checksum.rs + /// Given a `&mut http::request::Request`, and checksum algorithm name, calculate a checksum and + /// then modify the request to include the checksum as a header. + pub fn build_checksum_validated_request( + request: &mut http::request::Request, + checksum_algorithm: &str, + ) -> Result<(), aws_smithy_http::operation::BuildError> { + let data = request.body().bytes().unwrap_or_default(); + + let mut checksum = aws_smithy_checksums::new_checksum(checksum_algorithm); + checksum + .update(data) + .map_err(|err| aws_smithy_http::operation::BuildError::Other(err))?; + let checksum = checksum + .finalize() + .map_err(|err| aws_smithy_http::operation::BuildError::Other(err))?; + + request.headers_mut().insert( + aws_smithy_checksums::checksum_algorithm_to_checksum_header_name(checksum_algorithm), + aws_smithy_types::base64::encode(&checksum[..]) + .parse() + .expect("base64-encoded checksums are always valid header values"), + ); + + Ok(()) + } + ``` +- Building checksum-validated requests with streaming request bodies: + ```rust + /// Given an `http::request::Builder`, `SdkBody`, and a checksum algorithm name, return a + /// `Request` with checksum trailers where the content is `aws-chunked` encoded. + pub fn build_checksum_validated_request_with_streaming_body( + request_builder: http::request::Builder, + body: aws_smithy_http::body::SdkBody, + checksum_algorithm: &str, + ) -> Result, aws_smithy_http::operation::BuildError> { + use http_body::Body; + + let original_body_size = body + .size_hint() + .exact() + .expect("body must be sized if checksum is requested"); + let body = aws_smithy_checksums::body::ChecksumBody::new(body, checksum_algorithm); + let checksum_trailer_name = body.trailer_name(); + let aws_chunked_body_options = aws_http::content_encoding::AwsChunkedBodyOptions::new() + .with_stream_length(original_body_size as usize) + .with_trailer_len(body.trailer_length() as usize); + + let body = aws_http::content_encoding::AwsChunkedBody::new(body, aws_chunked_body_options); + let encoded_content_length = body + .size_hint() + .exact() + .expect("encoded_length must return known size"); + let request_builder = request_builder + .header( + http::header::CONTENT_LENGTH, + http::HeaderValue::from(encoded_content_length), + ) + .header( + http::header::HeaderName::from_static("x-amz-decoded-content-length"), + http::HeaderValue::from(original_body_size), + ) + .header( + http::header::HeaderName::from_static("x-amz-trailer"), + checksum_trailer_name, + ) + .header( + http::header::CONTENT_ENCODING, + aws_http::content_encoding::header_value::AWS_CHUNKED.as_bytes(), + ); + + let body = aws_smithy_http::body::SdkBody::from_dyn(http_body::combinators::BoxBody::new(body)); + + request_builder + .body(body) + .map_err(|err| aws_smithy_http::operation::BuildError::Other(Box::new(err))) + } + ``` +- Building checksum-validated responses: + ```rust + /// Given a `Response`, checksum algorithm name, and pre-calculated checksum, return a + /// `Response` where the body will processed with the checksum algorithm and checked + /// against the pre-calculated checksum. + pub fn build_checksum_validated_sdk_body( + body: aws_smithy_http::body::SdkBody, + checksum_algorithm: &str, + precalculated_checksum: bytes::Bytes, + ) -> aws_smithy_http::body::SdkBody { + let body = aws_smithy_checksums::body::ChecksumValidatedBody::new( + body, + checksum_algorithm, + precalculated_checksum.clone(), + ); + aws_smithy_http::body::SdkBody::from_dyn(http_body::combinators::BoxBody::new(body)) + } + + /// Given the name of a checksum algorithm and a `HeaderMap`, extract the checksum value from the + /// corresponding header as `Some(Bytes)`. If the header is unset, return `None`. + pub fn check_headers_for_precalculated_checksum( + headers: &http::HeaderMap, + ) -> Option<(&'static str, bytes::Bytes)> { + for header_name in aws_smithy_checksums::CHECKSUM_HEADERS_IN_PRIORITY_ORDER { + if let Some(precalculated_checksum) = headers.get(&header_name) { + let checksum_algorithm = + aws_smithy_checksums::checksum_header_name_to_checksum_algorithm(&header_name); + let precalculated_checksum = + bytes::Bytes::copy_from_slice(precalculated_checksum.as_bytes()); + + return Some((checksum_algorithm, precalculated_checksum)); + } + } + + None + } + ``` + +## Codegen + +Codegen will be updated to insert the appropriate inlineable functions for operations that are tagged with the `@httpchecksum` trait. Some operations will require an MD5 checksum fallback if the user hasn't set a checksum themselves. + +Users also have the option of supplying a precalculated checksum of their own. This is already handled by our current header insertion logic and won't require updating the existing implementation. Because this checksum validation behavior is AWS-specific, it will be defined in SDK codegen. + +## Implementation Checklist + +- [ ] Implement codegen for building checksum-validated requests: + - [ ] In-memory request bodies + - [ ] Support MD5 fallback behavior for services that enable it. + - [ ] Streaming request bodies +- [ ] Implement codegen for building checksum-validated responses: + +[1]: https://aws.amazon.com/blogs/aws/new-additional-checksum-algorithms-for-amazon-s3/ +[2]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer +[3]: https://developer.mozilla.org/en-US/docs/Glossary/CRLF +[RFC0013]: ./rfc0013_body_callback_apis.md From b7506ec2e56ef1540d9fe35ec12784aa13d2e003 Mon Sep 17 00:00:00 2001 From: Chris Morin Date: Sun, 12 Jun 2022 17:28:31 -0700 Subject: [PATCH 27/49] Fix typo in documentation (#1455) --- rust-runtime/aws-smithy-client/src/test_connection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-runtime/aws-smithy-client/src/test_connection.rs b/rust-runtime/aws-smithy-client/src/test_connection.rs index dbd175508c4..d82720025d0 100644 --- a/rust-runtime/aws-smithy-client/src/test_connection.rs +++ b/rust-runtime/aws-smithy-client/src/test_connection.rs @@ -153,7 +153,7 @@ impl ValidateRequest { /// TestConnection for use with a [`Client`](crate::Client). /// /// A basic test connection. It will: -/// - Response to requests with a preloaded series of responses +/// - Respond to requests with a preloaded series of responses /// - Record requests for future examination /// /// The generic parameter `B` is the type of the response body. From c78c67e3fea4279c2519e4b29e78d3306a74f8db Mon Sep 17 00:00:00 2001 From: 82marbag <69267416+82marbag@users.noreply.github.com> Date: Mon, 13 Jun 2022 05:17:02 -0400 Subject: [PATCH 28/49] Comply with content types for the accept header (#1424) * Verify accept header for payloads with `@mediaType` Comply with content-types as described in the documentation [0] [0] https://awslabs.github.io/smithy/1.0/spec/aws/aws-restjson1-protocol.html#content-type Signed-off-by: Daniele Ahmed --- .../protocol/ServerProtocolTestGenerator.kt | 2 -- .../ServerHttpBoundProtocolGenerator.kt | 26 +++++++++++++++++-- .../rust/codegen/smithy/protocols/RestJson.kt | 25 +++++++++++++++--- .../src/runtime_error.rs | 6 +++-- 4 files changed, 50 insertions(+), 9 deletions(-) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt index 7eaf6fb3a2a..d3b61ded7b8 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt @@ -661,9 +661,7 @@ class ServerProtocolTestGenerator( FailingTest(RestJson, "RestJsonHttpWithEmptyStructurePayload", TestType.Request), FailingTest(RestJson, "RestJsonHttpResponseCodeDefaultsToModeledCode", TestType.Response), - FailingTest(RestJson, "RestJsonWithBodyExpectsApplicationJsonAccept", TestType.MalformedRequest), FailingTest(RestJson, "RestJsonWithPayloadExpectsImpliedAccept", TestType.MalformedRequest), - FailingTest(RestJson, "RestJsonWithPayloadExpectsModeledAccept", TestType.MalformedRequest), FailingTest(RestJson, "RestJsonBodyMalformedBlobInvalidBase64_case1", TestType.MalformedRequest), FailingTest(RestJson, "RestJsonBodyMalformedBlobInvalidBase64_case2", TestType.MalformedRequest), FailingTest(RestJson, "RestJsonBodyByteMalformedValueRejected_case2", TestType.MalformedRequest), diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt index a8e5e4917fc..c6f7d9832f5 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt @@ -159,6 +159,26 @@ private class ServerHttpBoundProtocolTraitImplGenerator( val operationName = symbolProvider.toSymbol(operationShape).name val inputName = "${operationName}${ServerHttpBoundProtocolGenerator.OPERATION_INPUT_WRAPPER_SUFFIX}" + val verifyResponseContentType = writable { + httpBindingResolver.responseContentType(operationShape)?.also { contentType -> + rustTemplate( + """ + if let Some(headers) = req.headers() { + if let Some(accept) = headers.get(#{http}::header::ACCEPT) { + if accept != "$contentType" { + return Err(Self::Rejection { + protocol: #{SmithyHttpServer}::protocols::Protocol::${codegenContext.protocol.name.toPascalCase()}, + kind: #{SmithyHttpServer}::runtime_error::RuntimeErrorKind::NotAcceptable, + }) + } + } + } + """, + *codegenScope, + ) + } + } + // Implement `FromRequest` trait for input types. rustTemplate( """ @@ -173,6 +193,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( { type Rejection = #{RuntimeError}; async fn from_request(req: &mut #{SmithyHttpServer}::request::RequestParts) -> Result { + #{verify_response_content_type:W} #{parse_request}(req) .await .map($inputName) @@ -187,7 +208,8 @@ private class ServerHttpBoundProtocolTraitImplGenerator( """.trimIndent(), *codegenScope, "I" to inputSymbol, - "parse_request" to serverParseRequest(operationShape) + "parse_request" to serverParseRequest(operationShape), + "verify_response_content_type" to verifyResponseContentType, ) // Implement `IntoResponse` for output types. @@ -227,7 +249,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( } } } - """.trimIndent() + """ rustTemplate( """ diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestJson.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestJson.kt index 86aa4eaa8c7..596880dc414 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestJson.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestJson.kt @@ -9,7 +9,10 @@ import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.MemberShape import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.StructureShape +import software.amazon.smithy.model.traits.HttpPayloadTrait import software.amazon.smithy.model.traits.JsonNameTrait +import software.amazon.smithy.model.traits.MediaTypeTrait +import software.amazon.smithy.model.traits.StreamingTrait import software.amazon.smithy.model.traits.TimestampFormatTrait import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustModule @@ -23,6 +26,8 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.parse.StructuredData import software.amazon.smithy.rust.codegen.smithy.protocols.serialize.JsonSerializerGenerator import software.amazon.smithy.rust.codegen.smithy.protocols.serialize.StructuredDataSerializerGenerator import software.amazon.smithy.rust.codegen.util.getTrait +import software.amazon.smithy.rust.codegen.util.hasTrait +import software.amazon.smithy.rust.codegen.util.outputShape class RestJsonFactory : ProtocolGeneratorFactory { override fun protocol(codegenContext: CodegenContext): Protocol = RestJson(codegenContext) @@ -56,15 +61,29 @@ class RestJsonFactory : ProtocolGeneratorFactory { * `application/json` if not overridden. */ class RestJsonHttpBindingResolver( - model: Model, + private val model: Model, contentTypes: ProtocolContentTypes, ) : HttpTraitHttpBindingResolver(model, contentTypes) { /** * In the RestJson1 protocol, HTTP responses have a default `Content-Type: application/json` header if it is not * overridden by a specific mechanism e.g. an output shape member is targeted with `httpPayload` or `mediaType` traits. */ - override fun responseContentType(operationShape: OperationShape): String = - super.responseContentType(operationShape) ?: "application/json" + override fun responseContentType(operationShape: OperationShape): String? { + val members = operationShape + .outputShape(model) + .members() + // TODO(https://github.com/awslabs/smithy/issues/1259) + // Temporary fix for https://github.com/awslabs/smithy/blob/df456a514f72f4e35f0fb07c7e26006ff03b2071/smithy-model/src/main/java/software/amazon/smithy/model/knowledge/HttpBindingIndex.java#L352 + for (member in members) { + if (member.hasTrait()) { + val target = model.expectShape(member.target) + if (!target.hasTrait() && !target.hasTrait() && target.isBlobShape) { + return null + } + } + } + return super.responseContentType(operationShape) ?: "application/json" + } } class RestJson(private val codegenContext: CodegenContext) : Protocol { diff --git a/rust-runtime/aws-smithy-http-server/src/runtime_error.rs b/rust-runtime/aws-smithy-http-server/src/runtime_error.rs index 0cd0d094c64..162b638945a 100644 --- a/rust-runtime/aws-smithy-http-server/src/runtime_error.rs +++ b/rust-runtime/aws-smithy-http-server/src/runtime_error.rs @@ -36,7 +36,7 @@ pub enum RuntimeErrorKind { /// [`crate::extension::Extension`] from the request. InternalFailure(crate::Error), // UnsupportedMediaType, - // NotAcceptable, + NotAcceptable, } /// String representation of the runtime error type. @@ -47,7 +47,8 @@ impl RuntimeErrorKind { match self { RuntimeErrorKind::Serialization(_) => "SerializationException", RuntimeErrorKind::InternalFailure(_) => "InternalFailureException", - RuntimeErrorKind::UnknownOperation => "UnknownOperation", + RuntimeErrorKind::UnknownOperation => "UnknownOperationException", + RuntimeErrorKind::NotAcceptable => "NotAcceptableException", } } } @@ -64,6 +65,7 @@ impl IntoResponse for RuntimeError { RuntimeErrorKind::Serialization(_) => http::StatusCode::BAD_REQUEST, RuntimeErrorKind::InternalFailure(_) => http::StatusCode::INTERNAL_SERVER_ERROR, RuntimeErrorKind::UnknownOperation => http::StatusCode::NOT_FOUND, + RuntimeErrorKind::NotAcceptable => http::StatusCode::NOT_ACCEPTABLE, }; let body = crate::body::to_boxed(match self.protocol { From 6e3e010e912874262b37727d900d7fae170efaed Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Mon, 13 Jun 2022 10:47:59 -0400 Subject: [PATCH 29/49] Relax behavior of profile parser (#1458) - Fixes aws-sdk-rust#547 Previously, if no default profile was defined and no explicit profile was selected, the profile file provider would return an error. This relaxes that behavior to allow provider chains to move onto the next provider when that is the case. --- CHANGELOG.next.toml | 8 +- .../src/default_provider/credentials.rs | 1 + .../src/profile/credentials/repr.rs | 20 ++++- .../ecs_credentials_invalid_profile/env.json | 5 ++ .../fs/home/.aws/config | 3 + .../http-traffic.json | 87 +++++++++++++++++++ .../test-case.json | 12 +++ 7 files changed, 133 insertions(+), 3 deletions(-) create mode 100644 aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/env.json create mode 100644 aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/fs/home/.aws/config create mode 100644 aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/http-traffic.json create mode 100644 aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/test-case.json diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 1dffbf7f636..be06f2737d2 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -9,4 +9,10 @@ # message = "Fix typos in module documentation for generated crates" # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false } -# author = "rcoh" \ No newline at end of file +# author = "rcoh" + +[[aws-sdk-rust]] +message = "Fix bug in profile file credential provider where a missing `default` profile lead to an unintended error." +references = ["aws-sdk-rust#547", "smithy-rs#1458"] +meta = { "breaking" = false, "tada" = false, "bug" = true } +author = "rcoh" diff --git a/aws/rust-runtime/aws-config/src/default_provider/credentials.rs b/aws/rust-runtime/aws-config/src/default_provider/credentials.rs index 91f2febdeaf..64ba80a1184 100644 --- a/aws/rust-runtime/aws-config/src/default_provider/credentials.rs +++ b/aws/rust-runtime/aws-config/src/default_provider/credentials.rs @@ -333,6 +333,7 @@ mod test { make_test!(ecs_assume_role); make_test!(ecs_credentials); + make_test!(ecs_credentials_invalid_profile); make_test!(sso_assume_role); make_test!(sso_no_token_file); diff --git a/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs b/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs index a14d3e3bc6e..c641ecbb717 100644 --- a/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs +++ b/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs @@ -112,9 +112,24 @@ pub(super) fn resolve_chain<'a>( profile_set: &'a ProfileSet, profile_override: Option<&str>, ) -> Result, ProfileFileError> { + // If there are no profiles, allow flowing into the next provider if profile_set.is_empty() { return Err(ProfileFileError::NoProfilesDefined); } + + // If: + // - There is no explicit profile override + // - We're looking for the default profile (no configuration) + // - There is not default profile + // Then: + // - Treat this situation as if no profiles were defined + if profile_override == None + && profile_set.selected_profile() == "default" + && profile_set.get_profile("default") == None + { + tracing::debug!("No default profile defined"); + return Err(ProfileFileError::NoProfilesDefined); + } let mut source_profile_name = profile_override.unwrap_or_else(|| profile_set.selected_profile()); let mut visited_profiles = vec![]; @@ -221,6 +236,7 @@ mod static_credentials { mod credential_process { pub const CREDENTIAL_PROCESS: &str = "credential_process"; } + const PROVIDER_NAME: &str = "ProfileFile"; fn base_provider(profile: &Profile) -> Result { @@ -254,8 +270,8 @@ fn chain_provider(profile: &Profile) -> Result { (None, None) => Err(ProfileFileError::InvalidCredentialSource { profile: profile.name().to_string(), message: - "profile must contain `source_profile` or `credential_source` but neither were defined" - .into(), + "profile must contain `source_profile` or `credential_source` but neither were defined" + .into(), }), (Some(source_profile), None) if source_profile == profile.name() => { Ok(NextProfile::SelfReference) diff --git a/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/env.json b/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/env.json new file mode 100644 index 00000000000..e8c4070c682 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/env.json @@ -0,0 +1,5 @@ +{ + "HOME": "/home", + "AWS_REGION": "us-east-1", + "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI": "/v2/credentials/52b19262-e7aa-4f56-a1cd-b958dcde8f3b" +} diff --git a/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/fs/home/.aws/config b/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/fs/home/.aws/config new file mode 100644 index 00000000000..ee7716ed067 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/fs/home/.aws/config @@ -0,0 +1,3 @@ +# a profile that isn't the `default` profile +[profile notdefault] +a = b diff --git a/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/http-traffic.json b/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/http-traffic.json new file mode 100644 index 00000000000..46d4cb66167 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/http-traffic.json @@ -0,0 +1,87 @@ +{ + "events": [ + { + "connection_id": 0, + "action": { + "Request": { + "request": { + "uri": "http://169.254.170.2/v2/credentials/52b19262-e7aa-4f56-a1cd-b958dcde8f3b", + "headers": { + "accept": [ + "application/json" + ] + }, + "method": "GET" + } + } + } + }, + { + "connection_id": 0, + "action": { + "Eof": { + "ok": true, + "direction": "Request" + } + } + }, + { + "connection_id": 0, + "action": { + "Response": { + "response": { + "Ok": { + "status": 200, + "version": "HTTP/1.1", + "headers": { + "content-type": [ + "application/json" + ], + "x-rate-limit-duration": [ + "1" + ], + "x-rate-limit-limit": [ + "40" + ], + "x-rate-limit-request-forwarded-for": [ + "" + ], + "x-rate-limit-request-remote-addr": [ + "169.254.172.2:35484" + ], + "date": [ + "Fri, 15 Oct 2021 15:23:49 GMT" + ], + "content-length": [ + "1231" + ] + } + } + } + } + } + }, + { + "connection_id": 0, + "action": { + "Data": { + "data": { + "Utf8": "{\"RoleArn\":\"arn:aws:iam::123456789:role/ecs-task-role\",\"AccessKeyId\":\"ASIARCORRECT\",\"SecretAccessKey\":\"secretkeycorrect\",\"Token\":\"tokencorrect\",\"Expiration\" : \"2009-02-13T23:31:30Z\"}" + }, + "direction": "Response" + } + } + }, + { + "connection_id": 0, + "action": { + "Eof": { + "ok": true, + "direction": "Response" + } + } + } + ], + "docs": "Load ECS credentials", + "version": "V0" +} diff --git a/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/test-case.json b/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/test-case.json new file mode 100644 index 00000000000..a401eea0aa4 --- /dev/null +++ b/aws/rust-runtime/aws-config/test-data/default-provider-chain/ecs_credentials_invalid_profile/test-case.json @@ -0,0 +1,12 @@ +{ + "name": "ecs-credentials", + "docs": "load credentials directly from ECS", + "result": { + "Ok": { + "access_key_id": "ASIARCORRECT", + "secret_access_key": "secretkeycorrect", + "session_token": "tokencorrect", + "expiry": 1234567890 + } + } +} From 3c1b71f3b96b2dc115b09794998104a05154816d Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Mon, 13 Jun 2022 12:55:33 -0700 Subject: [PATCH 30/49] Fix deprecation warnings in `aws-smithy-http-server` examples (#1462) --- .../examples/pokemon_service/Cargo.toml | 2 +- .../examples/pokemon_service/src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust-runtime/aws-smithy-http-server/examples/pokemon_service/Cargo.toml b/rust-runtime/aws-smithy-http-server/examples/pokemon_service/Cargo.toml index 32093067baa..a503537f431 100644 --- a/rust-runtime/aws-smithy-http-server/examples/pokemon_service/Cargo.toml +++ b/rust-runtime/aws-smithy-http-server/examples/pokemon_service/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Smithy-rs Server Team "] description = "A smithy Rust service to retrieve information about Pokémon." [dependencies] -clap = { version = "3", features = ["derive"] } +clap = { version = "3.2.1", features = ["derive"] } hyper = {version = "0.14", features = ["server"] } tokio = "1" tower = "0.4" diff --git a/rust-runtime/aws-smithy-http-server/examples/pokemon_service/src/main.rs b/rust-runtime/aws-smithy-http-server/examples/pokemon_service/src/main.rs index aa26a4f108c..e84559daa38 100644 --- a/rust-runtime/aws-smithy-http-server/examples/pokemon_service/src/main.rs +++ b/rust-runtime/aws-smithy-http-server/examples/pokemon_service/src/main.rs @@ -17,10 +17,10 @@ use tower_http::trace::TraceLayer; #[clap(author, version, about, long_about = None)] struct Args { /// Hyper server bind address. - #[clap(short, long, default_value = "127.0.0.1")] + #[clap(short, long, action, default_value = "127.0.0.1")] address: String, /// Hyper server bind port. - #[clap(short, long, default_value = "13734")] + #[clap(short, long, action, default_value = "13734")] port: u16, } From ea2ae7bfc6d8ba1daf7a4648a4027b7268f56283 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Mon, 13 Jun 2022 13:34:11 -0700 Subject: [PATCH 31/49] Add lints to `aws-config` (#1421) * Add `unreachable_pub` lint to `aws-config` * Add `missing_debug_implementations` lint to `aws-config` * Add `rust_2018_idioms` lint to `aws-config` * Update changelog --- CHANGELOG.next.toml | 6 +++ aws/rust-runtime/aws-config/src/cache.rs | 6 +-- .../aws-config/src/credential_process.rs | 2 +- .../src/default_provider/app_name.rs | 2 +- .../src/default_provider/credentials.rs | 2 +- .../aws-config/src/default_provider/region.rs | 4 +- .../src/default_provider/retry_config.rs | 2 +- .../src/default_provider/timeout_config.rs | 2 +- aws/rust-runtime/aws-config/src/ecs.rs | 2 +- .../aws-config/src/environment/region.rs | 2 +- aws/rust-runtime/aws-config/src/fs_util.rs | 2 +- .../src/http_credential_provider.rs | 4 +- .../aws-config/src/imds/client.rs | 10 ++--- .../aws-config/src/imds/credentials.rs | 2 +- .../aws-config/src/imds/region.rs | 4 +- .../aws-config/src/json_credentials.rs | 2 +- aws/rust-runtime/aws-config/src/lib.rs | 9 +++- .../aws-config/src/meta/credentials/chain.rs | 2 +- .../src/meta/credentials/lazy_caching.rs | 4 +- .../aws-config/src/meta/region.rs | 15 +++---- .../aws-config/src/profile/app_name.rs | 2 +- .../aws-config/src/profile/credentials.rs | 2 +- .../src/profile/credentials/exec.rs | 36 ++++++++-------- .../src/profile/credentials/repr.rs | 42 +++++++++---------- .../aws-config/src/profile/mod.rs | 8 +++- .../src/profile/parser/normalize.rs | 8 ++-- .../aws-config/src/profile/parser/parse.rs | 6 +-- .../aws-config/src/profile/parser/source.rs | 18 ++++---- .../aws-config/src/profile/region.rs | 4 +- .../aws-config/src/profile/retry_config.rs | 2 +- .../aws-config/src/profile/timeout_config.rs | 2 +- .../aws-config/src/sts/assume_role.rs | 3 +- aws/rust-runtime/aws-config/src/test_case.rs | 24 ++++++----- .../aws-config/src/web_identity_token.rs | 4 +- 34 files changed, 135 insertions(+), 110 deletions(-) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index be06f2737d2..16c847df7fb 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -16,3 +16,9 @@ message = "Fix bug in profile file credential provider where a missing `default` references = ["aws-sdk-rust#547", "smithy-rs#1458"] meta = { "breaking" = false, "tada" = false, "bug" = true } author = "rcoh" + +[[aws-sdk-rust]] +message = "Add `Debug` implementation to several types in `aws-config`" +references = ["smithy-rs#1421"] +meta = { "breaking" = false, "tada" = false, "bug" = false } +author = "jdisanti" \ No newline at end of file diff --git a/aws/rust-runtime/aws-config/src/cache.rs b/aws/rust-runtime/aws-config/src/cache.rs index 9ad535d723d..b98b1d6b8e0 100644 --- a/aws/rust-runtime/aws-config/src/cache.rs +++ b/aws/rust-runtime/aws-config/src/cache.rs @@ -38,7 +38,7 @@ impl ExpiringCache where T: Clone, { - pub fn new(buffer_time: Duration) -> Self { + pub(crate) fn new(buffer_time: Duration) -> Self { ExpiringCache { buffer_time, value: Arc::new(RwLock::new(OnceCell::new())), @@ -64,7 +64,7 @@ where /// and the others will await that thread's result rather than multiple refreshes occurring. /// The function given to acquire a value future, `f`, will not be called /// if another thread is chosen to load the value. - pub async fn get_or_load(&self, f: F) -> Result + pub(crate) async fn get_or_load(&self, f: F) -> Result where F: FnOnce() -> Fut, Fut: Future>, @@ -75,7 +75,7 @@ where } /// If the value is expired, clears the cache. Otherwise, yields the current value. - pub async fn yield_or_clear_if_expired(&self, now: SystemTime) -> Option { + pub(crate) async fn yield_or_clear_if_expired(&self, now: SystemTime) -> Option { // Short-circuit if the value is not expired if let Some((value, expiry)) = self.value.read().await.get() { if !expired(*expiry, self.buffer_time, now) { diff --git a/aws/rust-runtime/aws-config/src/credential_process.rs b/aws/rust-runtime/aws-config/src/credential_process.rs index 77c8b224f75..5a75089ac45 100644 --- a/aws/rust-runtime/aws-config/src/credential_process.rs +++ b/aws/rust-runtime/aws-config/src/credential_process.rs @@ -178,7 +178,7 @@ impl CredentialProcessProvider { /// Keys are case insensitive. pub(crate) fn parse_credential_process_json_credentials( credentials_response: &str, -) -> Result { +) -> Result, InvalidJsonCredentials> { let mut version = None; let mut access_key_id = None; let mut secret_access_key = None; diff --git a/aws/rust-runtime/aws-config/src/default_provider/app_name.rs b/aws/rust-runtime/aws-config/src/default_provider/app_name.rs index 05a73051de0..af8dcfa00e9 100644 --- a/aws/rust-runtime/aws-config/src/default_provider/app_name.rs +++ b/aws/rust-runtime/aws-config/src/default_provider/app_name.rs @@ -18,7 +18,7 @@ pub fn default_provider() -> Builder { } /// Default provider builder for [`AppName`] -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { env_provider: EnvironmentVariableAppNameProvider, profile_file: app_name::Builder, diff --git a/aws/rust-runtime/aws-config/src/default_provider/credentials.rs b/aws/rust-runtime/aws-config/src/default_provider/credentials.rs index 64ba80a1184..ec6885694be 100644 --- a/aws/rust-runtime/aws-config/src/default_provider/credentials.rs +++ b/aws/rust-runtime/aws-config/src/default_provider/credentials.rs @@ -85,7 +85,7 @@ impl ProvideCredentials for DefaultCredentialsChain { } /// Builder for [`DefaultCredentialsChain`](DefaultCredentialsChain) -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { profile_file_builder: crate::profile::credentials::Builder, web_identity_builder: crate::web_identity_token::Builder, diff --git a/aws/rust-runtime/aws-config/src/default_provider/region.rs b/aws/rust-runtime/aws-config/src/default_provider/region.rs index f4d15b17a6d..f7b882446e8 100644 --- a/aws/rust-runtime/aws-config/src/default_provider/region.rs +++ b/aws/rust-runtime/aws-config/src/default_provider/region.rs @@ -37,7 +37,7 @@ impl DefaultRegionChain { } /// Builder for [DefaultRegionChain] -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { env_provider: EnvironmentVariableRegionProvider, profile_file: profile::region::Builder, @@ -73,7 +73,7 @@ impl Builder { } impl ProvideRegion for DefaultRegionChain { - fn region(&self) -> crate::meta::region::future::ProvideRegion { + fn region(&self) -> crate::meta::region::future::ProvideRegion<'_> { ProvideRegion::region(&self.0) } } diff --git a/aws/rust-runtime/aws-config/src/default_provider/retry_config.rs b/aws/rust-runtime/aws-config/src/default_provider/retry_config.rs index 7314c28505a..4e8a4c00ad6 100644 --- a/aws/rust-runtime/aws-config/src/default_provider/retry_config.rs +++ b/aws/rust-runtime/aws-config/src/default_provider/retry_config.rs @@ -50,7 +50,7 @@ pub fn default_provider() -> Builder { } /// Builder for RetryConfig that checks the environment and aws profile for configuration -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { env_provider: EnvironmentVariableRetryConfigProvider, profile_file: profile::retry_config::Builder, diff --git a/aws/rust-runtime/aws-config/src/default_provider/timeout_config.rs b/aws/rust-runtime/aws-config/src/default_provider/timeout_config.rs index 7b5563ed1c8..868d6866061 100644 --- a/aws/rust-runtime/aws-config/src/default_provider/timeout_config.rs +++ b/aws/rust-runtime/aws-config/src/default_provider/timeout_config.rs @@ -45,7 +45,7 @@ pub fn default_provider() -> Builder { } /// Builder for [`timeout::Config`](aws_smithy_types::timeout::Config) that checks the environment variables and AWS profile files for configuration -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { env_provider: EnvironmentVariableTimeoutConfigProvider, profile_file: profile::timeout_config::Builder, diff --git a/aws/rust-runtime/aws-config/src/ecs.rs b/aws/rust-runtime/aws-config/src/ecs.rs index 1f491cea8de..8b642b55406 100644 --- a/aws/rust-runtime/aws-config/src/ecs.rs +++ b/aws/rust-runtime/aws-config/src/ecs.rs @@ -154,7 +154,7 @@ impl Provider { } } - pub async fn make(builder: Builder) -> Self { + async fn make(builder: Builder) -> Self { let provider_config = builder.provider_config.unwrap_or_default(); let env = provider_config.env(); let uri = match Self::uri(env, builder.dns).await { diff --git a/aws/rust-runtime/aws-config/src/environment/region.rs b/aws/rust-runtime/aws-config/src/environment/region.rs index c7395e8715c..48859cbe4c7 100644 --- a/aws/rust-runtime/aws-config/src/environment/region.rs +++ b/aws/rust-runtime/aws-config/src/environment/region.rs @@ -32,7 +32,7 @@ impl EnvironmentVariableRegionProvider { } impl ProvideRegion for EnvironmentVariableRegionProvider { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { let region = self .env .get("AWS_REGION") diff --git a/aws/rust-runtime/aws-config/src/fs_util.rs b/aws/rust-runtime/aws-config/src/fs_util.rs index 74927188da6..89af426d89c 100644 --- a/aws/rust-runtime/aws-config/src/fs_util.rs +++ b/aws/rust-runtime/aws-config/src/fs_util.rs @@ -12,7 +12,7 @@ pub(crate) enum Os { } impl Os { - pub fn real() -> Self { + pub(crate) fn real() -> Self { match std::env::consts::OS { "windows" => Os::Windows, _ => Os::NotWindows, diff --git a/aws/rust-runtime/aws-config/src/http_credential_provider.rs b/aws/rust-runtime/aws-config/src/http_credential_provider.rs index d77037522c3..d77aa81ca62 100644 --- a/aws/rust-runtime/aws-config/src/http_credential_provider.rs +++ b/aws/rust-runtime/aws-config/src/http_credential_provider.rs @@ -42,11 +42,11 @@ pub(crate) struct HttpCredentialProvider { } impl HttpCredentialProvider { - pub fn builder() -> Builder { + pub(crate) fn builder() -> Builder { Builder::default() } - pub async fn credentials(&self, auth: Option) -> credentials::Result { + pub(crate) async fn credentials(&self, auth: Option) -> credentials::Result { let credentials = self.client.call(self.operation(auth)).await; match credentials { Ok(creds) => Ok(creds), diff --git a/aws/rust-runtime/aws-config/src/imds/client.rs b/aws/rust-runtime/aws-config/src/imds/client.rs index cd61d7fc206..a279c15a620 100644 --- a/aws/rust-runtime/aws-config/src/imds/client.rs +++ b/aws/rust-runtime/aws-config/src/imds/client.rs @@ -132,7 +132,7 @@ pub(super) struct LazyClient { } impl LazyClient { - pub fn from_ready_client(client: Client) -> Self { + pub(super) fn from_ready_client(client: Client) -> Self { Self { client: OnceCell::from(Ok(client)), // the builder will never be used in this case @@ -575,13 +575,13 @@ impl Builder { } mod env { - pub const ENDPOINT: &str = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; - pub const ENDPOINT_MODE: &str = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; + pub(super) const ENDPOINT: &str = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; + pub(super) const ENDPOINT_MODE: &str = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; } mod profile_keys { - pub const ENDPOINT: &str = "ec2_metadata_service_endpoint"; - pub const ENDPOINT_MODE: &str = "ec2_metadata_service_endpoint_mode"; + pub(super) const ENDPOINT: &str = "ec2_metadata_service_endpoint"; + pub(super) const ENDPOINT_MODE: &str = "ec2_metadata_service_endpoint_mode"; } /// Endpoint Configuration Abstraction diff --git a/aws/rust-runtime/aws-config/src/imds/credentials.rs b/aws/rust-runtime/aws-config/src/imds/credentials.rs index 28f4d4b22f5..9161b3496e9 100644 --- a/aws/rust-runtime/aws-config/src/imds/credentials.rs +++ b/aws/rust-runtime/aws-config/src/imds/credentials.rs @@ -155,7 +155,7 @@ impl ImdsCredentialsProvider { )); } tracing::debug!("loading credentials from IMDS"); - let profile: Cow = match &self.profile { + let profile: Cow<'_, str> = match &self.profile { Some(profile) => profile.into(), None => self.get_profile_uncached().await?.into(), }; diff --git a/aws/rust-runtime/aws-config/src/imds/region.rs b/aws/rust-runtime/aws-config/src/imds/region.rs index 88f5945ac8a..e8516a446b9 100644 --- a/aws/rust-runtime/aws-config/src/imds/region.rs +++ b/aws/rust-runtime/aws-config/src/imds/region.rs @@ -65,7 +65,7 @@ impl ImdsRegionProvider { } impl ProvideRegion for ImdsRegionProvider { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { future::ProvideRegion::new( self.region() .instrument(tracing::debug_span!("imds_load_region")), @@ -74,7 +74,7 @@ impl ProvideRegion for ImdsRegionProvider { } /// Builder for [`ImdsRegionProvider`] -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { provider_config: Option, imds_client_override: Option, diff --git a/aws/rust-runtime/aws-config/src/json_credentials.rs b/aws/rust-runtime/aws-config/src/json_credentials.rs index fb3cdecc12c..8e0650ac7a7 100644 --- a/aws/rust-runtime/aws-config/src/json_credentials.rs +++ b/aws/rust-runtime/aws-config/src/json_credentials.rs @@ -121,7 +121,7 @@ pub(crate) enum JsonCredentials<'a> { /// Keys are case insensitive. pub(crate) fn parse_json_credentials( credentials_response: &str, -) -> Result { +) -> Result, InvalidJsonCredentials> { let mut code = None; let mut access_key_id = None; let mut secret_access_key = None; diff --git a/aws/rust-runtime/aws-config/src/lib.rs b/aws/rust-runtime/aws-config/src/lib.rs index 5b0655c7a9e..edb602843ac 100644 --- a/aws/rust-runtime/aws-config/src/lib.rs +++ b/aws/rust-runtime/aws-config/src/lib.rs @@ -2,7 +2,14 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ -#![warn(missing_docs)] + +#![warn( + missing_debug_implementations, + missing_docs, + rust_2018_idioms, + rustdoc::missing_crate_level_docs, + unreachable_pub +)] //! `aws-config` provides implementations of region, credential resolution. //! diff --git a/aws/rust-runtime/aws-config/src/meta/credentials/chain.rs b/aws/rust-runtime/aws-config/src/meta/credentials/chain.rs index 08d83e0eef0..229e054f81a 100644 --- a/aws/rust-runtime/aws-config/src/meta/credentials/chain.rs +++ b/aws/rust-runtime/aws-config/src/meta/credentials/chain.rs @@ -98,7 +98,7 @@ impl CredentialsProviderChain { } impl ProvideCredentials for CredentialsProviderChain { - fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials + fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'_> where Self: 'a, { diff --git a/aws/rust-runtime/aws-config/src/meta/credentials/lazy_caching.rs b/aws/rust-runtime/aws-config/src/meta/credentials/lazy_caching.rs index d3d6280e07b..457d6b91891 100644 --- a/aws/rust-runtime/aws-config/src/meta/credentials/lazy_caching.rs +++ b/aws/rust-runtime/aws-config/src/meta/credentials/lazy_caching.rs @@ -63,7 +63,7 @@ impl LazyCachingCredentialsProvider { } impl ProvideCredentials for LazyCachingCredentialsProvider { - fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials + fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'_> where Self: 'a, { @@ -141,7 +141,7 @@ mod builder { /// })) /// .build(); /// ``` - #[derive(Default)] + #[derive(Debug, Default)] pub struct Builder { sleep: Option>, time_source: Option, diff --git a/aws/rust-runtime/aws-config/src/meta/region.rs b/aws/rust-runtime/aws-config/src/meta/region.rs index 29a712f8c41..737f7949fd5 100644 --- a/aws/rust-runtime/aws-config/src/meta/region.rs +++ b/aws/rust-runtime/aws-config/src/meta/region.rs @@ -76,13 +76,13 @@ impl RegionProviderChain { } impl ProvideRegion for Option { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { future::ProvideRegion::ready(self.clone()) } } impl ProvideRegion for RegionProviderChain { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { future::ProvideRegion::new(RegionProviderChain::region(self)) } } @@ -104,6 +104,7 @@ pub mod future { /// /// - When wrapping an already loaded region, use [`ready`](ProvideRegion::ready). /// - When wrapping an asynchronously loaded region, use [`new`](ProvideRegion::new). + #[derive(Debug)] pub struct ProvideRegion<'a>(NowOrLater, BoxFuture<'a>>); impl<'a> ProvideRegion<'a> { /// A future that wraps the given future @@ -132,29 +133,29 @@ pub mod future { /// a standard provider chain. pub trait ProvideRegion: Send + Sync + Debug { /// Load a region from this provider - fn region(&self) -> future::ProvideRegion; + fn region(&self) -> future::ProvideRegion<'_>; } impl ProvideRegion for Region { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { future::ProvideRegion::ready(Some(self.clone())) } } impl<'a> ProvideRegion for &'a Region { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { future::ProvideRegion::ready(Some((*self).clone())) } } impl ProvideRegion for Box { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { self.as_ref().region() } } impl ProvideRegion for &'static str { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { future::ProvideRegion::ready(Some(Region::new(Cow::Borrowed(*self)))) } } diff --git a/aws/rust-runtime/aws-config/src/profile/app_name.rs b/aws/rust-runtime/aws-config/src/profile/app_name.rs index 7ad3e777245..0b4dfba2d69 100644 --- a/aws/rust-runtime/aws-config/src/profile/app_name.rs +++ b/aws/rust-runtime/aws-config/src/profile/app_name.rs @@ -79,7 +79,7 @@ impl ProfileFileAppNameProvider { } /// Builder for [ProfileFileAppNameProvider] -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { config: Option, profile_override: Option, diff --git a/aws/rust-runtime/aws-config/src/profile/credentials.rs b/aws/rust-runtime/aws-config/src/profile/credentials.rs index 78a2d47696c..7889bb6e1fc 100644 --- a/aws/rust-runtime/aws-config/src/profile/credentials.rs +++ b/aws/rust-runtime/aws-config/src/profile/credentials.rs @@ -340,7 +340,7 @@ impl Error for ProfileFileError { } /// Builder for [`ProfileFileCredentialsProvider`] -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { provider_config: Option, profile_override: Option, diff --git a/aws/rust-runtime/aws-config/src/profile/credentials/exec.rs b/aws/rust-runtime/aws-config/src/profile/credentials/exec.rs index b7aa76c849c..ea497339c92 100644 --- a/aws/rust-runtime/aws-config/src/profile/credentials/exec.rs +++ b/aws/rust-runtime/aws-config/src/profile/credentials/exec.rs @@ -24,20 +24,20 @@ use aws_types::credentials::{self, CredentialsError, ProvideCredentials}; use std::fmt::Debug; #[derive(Debug)] -pub struct AssumeRoleProvider { +pub(super) struct AssumeRoleProvider { role_arn: String, external_id: Option, session_name: Option, } #[derive(Debug)] -pub struct ClientConfiguration { - pub(crate) sts_client: aws_smithy_client::Client, - pub(crate) region: Option, +pub(super) struct ClientConfiguration { + pub(super) sts_client: aws_smithy_client::Client, + pub(super) region: Option, } impl AssumeRoleProvider { - pub async fn credentials( + pub(super) async fn credentials( &self, input_credentials: Credentials, client_config: &ClientConfiguration, @@ -77,19 +77,19 @@ pub(super) struct ProviderChain { } impl ProviderChain { - pub fn base(&self) -> &dyn ProvideCredentials { + pub(crate) fn base(&self) -> &dyn ProvideCredentials { self.base.as_ref() } - pub fn chain(&self) -> &[AssumeRoleProvider] { + pub(crate) fn chain(&self) -> &[AssumeRoleProvider] { self.chain.as_slice() } } impl ProviderChain { - pub fn from_repr( + pub(super) fn from_repr( provider_config: &ProviderConfig, - repr: repr::ProfileChain, + repr: repr::ProfileChain<'_>, factory: &named::NamedProviderFactory, ) -> Result { let base = match repr.base() { @@ -153,7 +153,7 @@ impl ProviderChain { } } -pub mod named { +pub(super) mod named { use std::collections::HashMap; use std::sync::Arc; @@ -161,19 +161,21 @@ pub mod named { use std::borrow::Cow; #[derive(Debug)] - pub struct NamedProviderFactory { + pub(crate) struct NamedProviderFactory { providers: HashMap, Arc>, } - fn lower_cow(mut inp: Cow) -> Cow { - if !inp.chars().all(|c| c.is_ascii_lowercase()) { - inp.to_mut().make_ascii_lowercase(); + fn lower_cow(mut input: Cow<'_, str>) -> Cow<'_, str> { + if !input.chars().all(|c| c.is_ascii_lowercase()) { + input.to_mut().make_ascii_lowercase(); } - inp + input } impl NamedProviderFactory { - pub fn new(providers: HashMap, Arc>) -> Self { + pub(crate) fn new( + providers: HashMap, Arc>, + ) -> Self { let providers = providers .into_iter() .map(|(k, v)| (lower_cow(k), v)) @@ -181,7 +183,7 @@ pub mod named { Self { providers } } - pub fn provider(&self, name: &str) -> Option> { + pub(crate) fn provider(&self, name: &str) -> Option> { self.providers.get(&lower_cow(Cow::Borrowed(name))).cloned() } } diff --git a/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs b/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs index c641ecbb717..98968806e7f 100644 --- a/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs +++ b/aws/rust-runtime/aws-config/src/profile/credentials/repr.rs @@ -208,38 +208,38 @@ pub(super) fn resolve_chain<'a>( } mod role { - pub const ROLE_ARN: &str = "role_arn"; - pub const EXTERNAL_ID: &str = "external_id"; - pub const SESSION_NAME: &str = "role_session_name"; + pub(super) const ROLE_ARN: &str = "role_arn"; + pub(super) const EXTERNAL_ID: &str = "external_id"; + pub(super) const SESSION_NAME: &str = "role_session_name"; - pub const CREDENTIAL_SOURCE: &str = "credential_source"; - pub const SOURCE_PROFILE: &str = "source_profile"; + pub(super) const CREDENTIAL_SOURCE: &str = "credential_source"; + pub(super) const SOURCE_PROFILE: &str = "source_profile"; } mod sso { - pub const ACCOUNT_ID: &str = "sso_account_id"; - pub const REGION: &str = "sso_region"; - pub const ROLE_NAME: &str = "sso_role_name"; - pub const START_URL: &str = "sso_start_url"; + pub(super) const ACCOUNT_ID: &str = "sso_account_id"; + pub(super) const REGION: &str = "sso_region"; + pub(super) const ROLE_NAME: &str = "sso_role_name"; + pub(super) const START_URL: &str = "sso_start_url"; } mod web_identity_token { - pub const TOKEN_FILE: &str = "web_identity_token_file"; + pub(super) const TOKEN_FILE: &str = "web_identity_token_file"; } mod static_credentials { - pub const AWS_ACCESS_KEY_ID: &str = "aws_access_key_id"; - pub const AWS_SECRET_ACCESS_KEY: &str = "aws_secret_access_key"; - pub const AWS_SESSION_TOKEN: &str = "aws_session_token"; + pub(super) const AWS_ACCESS_KEY_ID: &str = "aws_access_key_id"; + pub(super) const AWS_SECRET_ACCESS_KEY: &str = "aws_secret_access_key"; + pub(super) const AWS_SESSION_TOKEN: &str = "aws_session_token"; } mod credential_process { - pub const CREDENTIAL_PROCESS: &str = "credential_process"; + pub(super) const CREDENTIAL_PROCESS: &str = "credential_process"; } const PROVIDER_NAME: &str = "ProfileFile"; -fn base_provider(profile: &Profile) -> Result { +fn base_provider(profile: &Profile) -> Result, ProfileFileError> { // the profile must define either a `CredentialsSource` or a concrete set of access keys match profile.get(role::CREDENTIAL_SOURCE) { Some(source) => Ok(BaseProvider::NamedSource(source)), @@ -255,7 +255,7 @@ enum NextProfile<'a> { Named(&'a str), } -fn chain_provider(profile: &Profile) -> Result { +fn chain_provider(profile: &Profile) -> Result, ProfileFileError> { let (source_profile, credential_source) = ( profile.get(role::SOURCE_PROFILE), profile.get(role::CREDENTIAL_SOURCE), @@ -282,7 +282,7 @@ fn chain_provider(profile: &Profile) -> Result { } } -fn role_arn_from_profile(profile: &Profile) -> Option { +fn role_arn_from_profile(profile: &Profile) -> Option> { // Web Identity Tokens are root providers, not chained roles if profile.get(web_identity_token::TOKEN_FILE).is_some() { return None; @@ -297,7 +297,7 @@ fn role_arn_from_profile(profile: &Profile) -> Option { }) } -fn sso_from_profile(profile: &Profile) -> Option> { +fn sso_from_profile(profile: &Profile) -> Option, ProfileFileError>> { /* Sample: [profile sample-profile] @@ -334,7 +334,7 @@ fn sso_from_profile(profile: &Profile) -> Option Option> { +) -> Option, ProfileFileError>> { let session_name = profile.get(role::SESSION_NAME); match ( profile.get(role::ROLE_ARN), @@ -401,7 +401,7 @@ fn static_creds_from_profile(profile: &Profile) -> Result Option> { +) -> Option, ProfileFileError>> { profile .get(credential_process::CREDENTIAL_PROCESS) .map(|credential_process| { @@ -467,7 +467,7 @@ mod tests { selected_profile: String, } - fn to_test_output(profile_chain: ProfileChain) -> Vec { + fn to_test_output(profile_chain: ProfileChain<'_>) -> Vec { let mut output = vec![]; match profile_chain.base { BaseProvider::NamedSource(name) => output.push(Provider::NamedSource(name.into())), diff --git a/aws/rust-runtime/aws-config/src/profile/mod.rs b/aws/rust-runtime/aws-config/src/profile/mod.rs index d02e2d8e0d8..1bb0df6c94e 100644 --- a/aws/rust-runtime/aws-config/src/profile/mod.rs +++ b/aws/rust-runtime/aws-config/src/profile/mod.rs @@ -9,8 +9,14 @@ //! see the [`load`](parser::load) function. mod parser; + +// This can't be included in the other `pub use` statement until +// https://github.com/rust-lang/rust/pull/87487 is fixed by upgrading +// to Rust 1.60 +#[doc(inline)] +pub use parser::ProfileParseError; #[doc(inline)] -pub use parser::{load, Profile, ProfileParseError, ProfileSet, Property}; +pub use parser::{load, Profile, ProfileSet, Property}; pub mod app_name; pub mod credentials; diff --git a/aws/rust-runtime/aws-config/src/profile/parser/normalize.rs b/aws/rust-runtime/aws-config/src/profile/parser/normalize.rs index 9738df84681..81ad64327bc 100644 --- a/aws/rust-runtime/aws-config/src/profile/parser/normalize.rs +++ b/aws/rust-runtime/aws-config/src/profile/parser/normalize.rs @@ -20,7 +20,7 @@ struct ProfileName<'a> { } impl ProfileName<'_> { - fn parse(input: &str) -> ProfileName { + fn parse(input: &str) -> ProfileName<'_> { let input = input.trim_matches(WHITESPACE); let (name, has_profile_prefix) = match input.strip_prefix(PROFILE_PREFIX) { // profilefoo isn't considered as having the profile prefix @@ -68,7 +68,7 @@ impl ProfileName<'_> { /// - Profile names are validated (see `validate_profile_name`) /// - A profile named `profile default` takes priority over a profile named `default`. /// - Profiles with identical names are merged -pub fn merge_in(base: &mut ProfileSet, raw_profile_set: RawProfileSet, kind: FileKind) { +pub(super) fn merge_in(base: &mut ProfileSet, raw_profile_set: RawProfileSet<'_>, kind: FileKind) { // parse / validate profile names let validated_profiles = raw_profile_set .into_iter() @@ -212,7 +212,7 @@ mod tests { #[test] #[traced_test] fn ignored_key_generates_warning() { - let mut profile: RawProfileSet = HashMap::new(); + let mut profile: RawProfileSet<'_> = HashMap::new(); profile.insert("default", { let mut out = HashMap::new(); out.insert("invalid key", "value".into()); @@ -233,7 +233,7 @@ mod tests { #[test] #[traced_test] fn invalid_profile_generates_warning() { - let mut profile: RawProfileSet = HashMap::new(); + let mut profile: RawProfileSet<'_> = HashMap::new(); profile.insert("foo", HashMap::new()); merge_in(&mut ProfileSet::empty(), profile, FileKind::Config); assert!(logs_contain("profile `foo` ignored")); diff --git a/aws/rust-runtime/aws-config/src/profile/parser/parse.rs b/aws/rust-runtime/aws-config/src/profile/parser/parse.rs index 58b827a4a90..b1d43e58b24 100644 --- a/aws/rust-runtime/aws-config/src/profile/parser/parse.rs +++ b/aws/rust-runtime/aws-config/src/profile/parser/parse.rs @@ -19,13 +19,13 @@ use std::error::Error; use std::fmt::{self, Display, Formatter}; /// A set of profiles that still carries a reference to the underlying data -pub type RawProfileSet<'a> = HashMap<&'a str, HashMap<&'a str, Cow<'a, str>>>; +pub(super) type RawProfileSet<'a> = HashMap<&'a str, HashMap<&'a str, Cow<'a, str>>>; /// Characters considered to be whitespace by the spec /// /// Profile parsing is actually quite strict about what is and is not whitespace, so use this instead /// of `.is_whitespace()` / `.trim()` -pub const WHITESPACE: &[char] = &[' ', '\t']; +pub(super) const WHITESPACE: &[char] = &[' ', '\t']; const COMMENT: &[char] = &['#', ';']; /// Location for use during error reporting @@ -104,7 +104,7 @@ enum State<'a> { } /// Parse `file` into a `RawProfileSet` -pub fn parse_profile_file(file: &File) -> Result { +pub(super) fn parse_profile_file(file: &File) -> Result, ProfileParseError> { let mut parser = Parser { data: HashMap::new(), state: State::Starting, diff --git a/aws/rust-runtime/aws-config/src/profile/parser/source.rs b/aws/rust-runtime/aws-config/src/profile/parser/source.rs index f7dcf120580..7ae849ecc79 100644 --- a/aws/rust-runtime/aws-config/src/profile/parser/source.rs +++ b/aws/rust-runtime/aws-config/src/profile/parser/source.rs @@ -11,27 +11,27 @@ use std::path::{Component, Path, PathBuf}; use tracing::Instrument; /// In-memory source of profile data -pub struct Source { +pub(super) struct Source { /// Contents and path of ~/.aws/config - pub config_file: File, + pub(super) config_file: File, /// Contents and path of ~/.aws/credentials - pub credentials_file: File, + pub(super) credentials_file: File, /// Profile to use /// /// Overridden via `$AWS_PROFILE`, defaults to `default` - pub profile: Cow<'static, str>, + pub(super) profile: Cow<'static, str>, } /// In-memory configuration file -pub struct File { - pub path: String, - pub contents: String, +pub(super) struct File { + pub(super) path: String, + pub(super) contents: String, } #[derive(Clone, Copy)] -pub enum FileKind { +pub(super) enum FileKind { Config, Credentials, } @@ -53,7 +53,7 @@ impl FileKind { } /// Load a [Source](Source) from a given environment and filesystem. -pub async fn load(proc_env: &os_shim_internal::Env, fs: &os_shim_internal::Fs) -> Source { +pub(super) async fn load(proc_env: &os_shim_internal::Env, fs: &os_shim_internal::Fs) -> Source { let home = home_dir(proc_env, Os::real()); let config = load_config_file(FileKind::Config, &home, fs, proc_env) .instrument(tracing::debug_span!("load_config_file")) diff --git a/aws/rust-runtime/aws-config/src/profile/region.rs b/aws/rust-runtime/aws-config/src/profile/region.rs index e083952b221..e294ed61ef1 100644 --- a/aws/rust-runtime/aws-config/src/profile/region.rs +++ b/aws/rust-runtime/aws-config/src/profile/region.rs @@ -42,7 +42,7 @@ pub struct ProfileFileRegionProvider { } /// Builder for [ProfileFileRegionProvider] -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { config: Option, profile_override: Option, @@ -149,7 +149,7 @@ fn resolve_profile_chain_for_region( } impl ProvideRegion for ProfileFileRegionProvider { - fn region(&self) -> future::ProvideRegion { + fn region(&self) -> future::ProvideRegion<'_> { future::ProvideRegion::new(self.region()) } } diff --git a/aws/rust-runtime/aws-config/src/profile/retry_config.rs b/aws/rust-runtime/aws-config/src/profile/retry_config.rs index 6f853664ce7..c876d82f02c 100644 --- a/aws/rust-runtime/aws-config/src/profile/retry_config.rs +++ b/aws/rust-runtime/aws-config/src/profile/retry_config.rs @@ -41,7 +41,7 @@ pub struct ProfileFileRetryConfigProvider { } /// Builder for [ProfileFileRetryConfigProvider] -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { config: Option, profile_override: Option, diff --git a/aws/rust-runtime/aws-config/src/profile/timeout_config.rs b/aws/rust-runtime/aws-config/src/profile/timeout_config.rs index 16066db2108..f04d58b4f02 100644 --- a/aws/rust-runtime/aws-config/src/profile/timeout_config.rs +++ b/aws/rust-runtime/aws-config/src/profile/timeout_config.rs @@ -56,7 +56,7 @@ pub struct ProfileFileTimeoutConfigProvider { } /// Builder for [`ProfileFileTimeoutConfigProvider`] -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { config: Option, profile_override: Option, diff --git a/aws/rust-runtime/aws-config/src/sts/assume_role.rs b/aws/rust-runtime/aws-config/src/sts/assume_role.rs index 36f6d4aa238..60b73d9a392 100644 --- a/aws/rust-runtime/aws-config/src/sts/assume_role.rs +++ b/aws/rust-runtime/aws-config/src/sts/assume_role.rs @@ -69,6 +69,7 @@ impl AssumeRoleProvider { /// A builder for [`AssumeRoleProvider`]. /// /// Construct one through [`AssumeRoleProvider::builder`]. +#[derive(Debug)] pub struct AssumeRoleProviderBuilder { role_arn: String, external_id: Option, @@ -248,7 +249,7 @@ impl Inner { } impl ProvideCredentials for Inner { - fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials + fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'_> where Self: 'a, { diff --git a/aws/rust-runtime/aws-config/src/test_case.rs b/aws/rust-runtime/aws-config/src/test_case.rs index 172a3888ec4..bf5fc838510 100644 --- a/aws/rust-runtime/aws-config/src/test_case.rs +++ b/aws/rust-runtime/aws-config/src/test_case.rs @@ -64,7 +64,7 @@ impl From for Credentials { /// - an `env.json` file containing environment variables /// - an `http-traffic.json` file containing an http traffic log from [`dvr`](aws_smithy_client::dvr) /// - a `test-case.json` file defining the expected output of the test -pub struct TestEnvironment { +pub(crate) struct TestEnvironment { env: Env, fs: Fs, network_traffic: NetworkTraffic, @@ -73,7 +73,7 @@ pub struct TestEnvironment { } /// Connector which expects no traffic -pub fn no_traffic_connector() -> DynConnector { +pub(crate) fn no_traffic_connector() -> DynConnector { DynConnector::new(ReplayingConnection::new(vec![])) } @@ -86,7 +86,7 @@ impl AsyncSleep for InstantSleep { } #[derive(Deserialize)] -pub enum GenericTestResult { +pub(crate) enum GenericTestResult { Ok(T), ErrorContains(String), } @@ -95,7 +95,7 @@ impl GenericTestResult where T: PartialEq + Debug, { - pub fn assert_matches(&self, result: Result, impl Error>) { + pub(crate) fn assert_matches(&self, result: Result, impl Error>) { match (result, &self) { (Ok(actual), GenericTestResult::Ok(expected)) => { assert_eq!(expected, &actual.into(), "incorrect result was returned") @@ -124,14 +124,14 @@ where type TestResult = GenericTestResult; #[derive(Deserialize)] -pub struct Metadata { +pub(crate) struct Metadata { result: TestResult, docs: String, name: String, } impl TestEnvironment { - pub fn from_dir(dir: impl AsRef) -> Result> { + pub(crate) fn from_dir(dir: impl AsRef) -> Result> { let dir = dir.as_ref(); let env = std::fs::read_to_string(dir.join("env.json")) .map_err(|e| format!("failed to load env: {}", e))?; @@ -156,7 +156,7 @@ impl TestEnvironment { }) } - pub async fn provider_config(&self) -> (ReplayingConnection, ProviderConfig) { + pub(crate) async fn provider_config(&self) -> (ReplayingConnection, ProviderConfig) { let connector = ReplayingConnection::new(self.network_traffic.events().clone()); ( connector.clone(), @@ -174,8 +174,10 @@ impl TestEnvironment { /// Record a test case from live (remote) HTTPS traffic /// /// The `default_connector()` from the crate will be used - pub async fn execute_from_live_traffic(&self, make_provider: impl Fn(ProviderConfig) -> F) - where + pub(crate) async fn execute_from_live_traffic( + &self, + make_provider: impl Fn(ProviderConfig) -> F, + ) where F: Future, P: ProvideCredentials, { @@ -200,7 +202,7 @@ impl TestEnvironment { /// /// A connector will be created with the factory, then request traffic will be recorded. /// Response are generated from the existing http-traffic.json. - pub async fn execute_and_update(&self, make_provider: impl Fn(ProviderConfig) -> F) + pub(crate) async fn execute_and_update(&self, make_provider: impl Fn(ProviderConfig) -> F) where F: Future, P: ProvideCredentials, @@ -223,7 +225,7 @@ impl TestEnvironment { } /// Execute a test case. Failures lead to panics. - pub async fn execute(&self, make_provider: impl Fn(ProviderConfig) -> F) + pub(crate) async fn execute(&self, make_provider: impl Fn(ProviderConfig) -> F) where F: Future, P: ProvideCredentials, diff --git a/aws/rust-runtime/aws-config/src/web_identity_token.rs b/aws/rust-runtime/aws-config/src/web_identity_token.rs index da509f94136..4d963f7c66c 100644 --- a/aws/rust-runtime/aws-config/src/web_identity_token.rs +++ b/aws/rust-runtime/aws-config/src/web_identity_token.rs @@ -124,7 +124,7 @@ impl ProvideCredentials for WebIdentityTokenCredentialsProvider { } impl WebIdentityTokenCredentialsProvider { - fn source(&self) -> Result, CredentialsError> { + fn source(&self) -> Result, CredentialsError> { match &self.source { Source::Env(env) => { let token_file = env.get(ENV_VAR_TOKEN_FILE).map_err(|_| { @@ -170,7 +170,7 @@ impl WebIdentityTokenCredentialsProvider { } /// Builder for [`WebIdentityTokenCredentialsProvider`](WebIdentityTokenCredentialsProvider) -#[derive(Default)] +#[derive(Debug, Default)] pub struct Builder { source: Option, config: Option, From 9156aca9fdb93420d7562d54efb045d74984576b Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Mon, 13 Jun 2022 15:01:28 -0700 Subject: [PATCH 32/49] Add observability and more configuration to `sdk-sync` (#1452) * Make `sdk-sync` Gradle heap/metaspace constraints configurable * Dump process info on `sdk-sync` codegen failure * Periodically log progress information in `sdk-sync` * Enable verbose GC for codegen and use serial GC --- tools/sdk-sync/Cargo.lock | 65 ++++++++++++++------ tools/sdk-sync/Cargo.toml | 2 +- tools/sdk-sync/src/main.rs | 38 ++++++++++-- tools/sdk-sync/src/sync.rs | 100 ++++++++++++++++++++++++++++--- tools/sdk-sync/src/sync/gen.rs | 66 ++++++++++++++++---- tools/sdk-sync/tests/e2e_test.rs | 4 +- 6 files changed, 227 insertions(+), 48 deletions(-) diff --git a/tools/sdk-sync/Cargo.lock b/tools/sdk-sync/Cargo.lock index 933bda6888c..bb387da5b06 100644 --- a/tools/sdk-sync/Cargo.lock +++ b/tools/sdk-sync/Cargo.lock @@ -60,12 +60,30 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bytesize" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" + [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +dependencies = [ + "libc", + "num-integer", + "num-traits", + "winapi", +] + [[package]] name = "clap" version = "3.1.8" @@ -96,12 +114,6 @@ dependencies = [ "syn", ] -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - [[package]] name = "crossbeam-channel" version = "0.5.4" @@ -314,6 +326,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "mockall" version = "0.11.0" @@ -341,6 +359,16 @@ dependencies = [ "syn", ] +[[package]] +name = "nom" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "normalize-line-endings" version = "0.3.0" @@ -348,12 +376,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] -name = "ntapi" -version = "0.3.7" +name = "num-integer" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "winapi", + "autocfg", + "num-traits", ] [[package]] @@ -578,7 +607,7 @@ dependencies = [ "regex", "serde", "smithy-rs-tool-common", - "sysinfo", + "systemstat", "tempfile", "toml", "tracing", @@ -650,16 +679,16 @@ dependencies = [ ] [[package]] -name = "sysinfo" -version = "0.23.11" +name = "systemstat" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf915673a340ee41f2fc24ad1286c75ea92026f04b65a0d0e5132d80b95fc61" +checksum = "5f5dc96f7634f46ac7e485b8c051f5b89ec8ee5cc023236dd12fe4ae2fb52f80" dependencies = [ - "cfg-if", - "core-foundation-sys", + "bytesize", + "chrono", + "lazy_static", "libc", - "ntapi", - "once_cell", + "nom", "winapi", ] diff --git a/tools/sdk-sync/Cargo.toml b/tools/sdk-sync/Cargo.toml index f803884a1d7..e9e889e6227 100644 --- a/tools/sdk-sync/Cargo.toml +++ b/tools/sdk-sync/Cargo.toml @@ -22,7 +22,7 @@ num_cpus = "1.13.1" rayon = "1.5.2" serde = { version = "1.0.136", features = ["derive"] } smithy-rs-tool-common = { version = "0.1", path = "../smithy-rs-tool-common" } -sysinfo = { version = "0.23.11", default-features = false } +systemstat = "0.1.11" tempfile = "3.3.0" toml = "0.5.9" tracing = "0.1.34" diff --git a/tools/sdk-sync/src/main.rs b/tools/sdk-sync/src/main.rs index 3de674b9879..37b67345403 100644 --- a/tools/sdk-sync/src/main.rs +++ b/tools/sdk-sync/src/main.rs @@ -6,10 +6,11 @@ use anyhow::{Context, Result}; use clap::Parser; use sdk_sync::init_tracing; +use sdk_sync::sync::gen::CodeGenSettings; use sdk_sync::sync::Sync; use smithy_rs_tool_common::macros::here; use std::path::PathBuf; -use sysinfo::{System, SystemExt}; +use systemstat::{Platform, System}; use tracing::info; const CODEGEN_MIN_RAM_REQUIRED_GB: usize = 2; @@ -36,6 +37,29 @@ struct Args { /// system property) to use for Smithy codegen. Defaults to 1. #[clap(long)] smithy_parallelism: Option, + /// The maximum Java heap space (in megabytes) that the Gradle daemon is allowed to use during code generation. + #[clap(long)] + max_gradle_heap_megabytes: Option, + /// The maximum Java metaspace (in megabytes) that the Gradle daemon is allowed to use during code generation. + #[clap(long)] + max_gradle_metaspace_megabytes: Option, +} + +impl Args { + fn codegen_settings(&self) -> CodeGenSettings { + let defaults = CodeGenSettings::default(); + CodeGenSettings { + smithy_parallelism: self + .smithy_parallelism + .unwrap_or(defaults.smithy_parallelism), + max_gradle_heap_megabytes: self + .max_gradle_heap_megabytes + .unwrap_or(defaults.max_gradle_heap_megabytes), + max_gradle_metaspace_megabytes: self + .max_gradle_metaspace_megabytes + .unwrap_or(defaults.max_gradle_metaspace_megabytes), + } + } } /// This tool syncs codegen changes from smithy-rs, examples changes from aws-doc-sdk-examples, @@ -59,13 +83,11 @@ fn main() -> Result<()> { init_tracing(); let args = Args::parse(); - let sys = System::new_all(); - let available_ram_gb = (sys.available_memory() / 1024 / 1024) as usize; + let available_ram_gb = available_ram_gb(); let num_cpus = num_cpus::get_physical(); info!("Available RAM (GB): {available_ram_gb}"); info!("Num physical CPUs: {num_cpus}"); - let smithy_parallelism = args.smithy_parallelism.unwrap_or(1); let sync_threads = if let Some(sync_threads) = args.sync_threads { sync_threads } else { @@ -84,8 +106,14 @@ fn main() -> Result<()> { &args.aws_doc_sdk_examples.canonicalize().context(here!())?, &args.aws_sdk_rust.canonicalize().context(here!())?, &args.smithy_rs.canonicalize().context(here!())?, - smithy_parallelism, + args.codegen_settings(), )?; sync.sync().map_err(|e| e.context("The sync failed")) } + +fn available_ram_gb() -> usize { + let sys = System::new(); + let memory = sys.memory().expect("determine free memory"); + (memory.free.as_u64() / 1024 / 1024 / 1024) as usize +} diff --git a/tools/sdk-sync/src/sync.rs b/tools/sdk-sync/src/sync.rs index 6558b41ddd5..b7ea23998d4 100644 --- a/tools/sdk-sync/src/sync.rs +++ b/tools/sdk-sync/src/sync.rs @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -use self::gen::{DefaultSdkGenerator, SdkGenerator}; +use self::gen::{CodeGenSettings, DefaultSdkGenerator, SdkGenerator}; use crate::fs::{DefaultFs, Fs}; use crate::git::{Commit, Git, GitCLI}; use crate::versions::{DefaultVersions, Versions, VersionsManifest}; @@ -11,7 +11,12 @@ use anyhow::{bail, Context, Result}; use smithy_rs_tool_common::macros::here; use std::collections::BTreeSet; use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicUsize, Ordering}; +use std::sync::mpsc::{Sender, TryRecvError}; use std::sync::Arc; +use std::thread; +use std::time::Duration; +use systemstat::{ByteSize, Platform, System}; use tracing::{debug, info, info_span}; use tracing_attributes::instrument; @@ -21,6 +26,73 @@ pub const BOT_NAME: &str = "AWS SDK Rust Bot"; pub const BOT_EMAIL: &str = "aws-sdk-rust-primary@amazon.com"; pub const MODEL_STASH_BRANCH_NAME: &str = "__sdk_sync__models_"; +#[derive(Default)] +struct SyncProgress { + commits_completed: AtomicUsize, + total_commits: AtomicUsize, +} + +struct ProgressThread { + handle: Option>, + tx: Sender, +} + +impl ProgressThread { + pub fn spawn(progress: Arc) -> ProgressThread { + let (tx, rx) = std::sync::mpsc::channel(); + let handle = thread::spawn(move || { + let mut done = false; + let system = System::new(); + while !done { + let cpu = system.cpu_load_aggregate().ok(); + for _ in 0..15 { + thread::sleep(Duration::from_secs(1)); + if !matches!(rx.try_recv(), Err(TryRecvError::Empty)) { + done = true; + break; + } + } + let cpu = if let Some(Ok(cpu)) = cpu.map(|cpu| cpu.done()) { + format!("{:.1}", 100.0 - cpu.idle * 100.0) + } else { + "error".to_string() + }; + let (memory, swap) = system.memory_and_swap().unwrap(); + info!( + "Progress: smithy-rs commit {}/{}, cpu use: {}, memory used: {}, swap used: {}", + progress.commits_completed.load(Ordering::Relaxed), + progress.total_commits.load(Ordering::Relaxed), + cpu, + Self::format_memory(memory.free, memory.total), + Self::format_memory(swap.free, swap.total), + ); + } + }); + ProgressThread { + handle: Some(handle), + tx, + } + } + + fn format_memory(free: ByteSize, total: ByteSize) -> String { + let (free, total) = (free.as_u64(), total.as_u64()); + let format_part = |val: u64| format!("{:.3}GB", val as f64 / 1024.0 / 1024.0 / 1024.0); + format!( + "{}/{}", + format_part(total.saturating_sub(free)), + format_part(total) + ) + } +} + +impl Drop for ProgressThread { + fn drop(&mut self) { + // Attempt to stop the loop in the thread + let _ = self.tx.send(true); + let _ = self.handle.take().map(|handle| handle.join()); + } +} + pub struct Sync { aws_doc_sdk_examples: Arc, aws_sdk_rust: Arc, @@ -28,7 +100,8 @@ pub struct Sync { fs: Arc, versions: Arc, previous_versions_manifest: Arc, - smithy_parallelism: usize, + codegen_settings: CodeGenSettings, + progress: Arc, // Keep a reference to the temp directory so that it doesn't get cleaned up until the sync is complete _temp_dir: Arc, } @@ -38,7 +111,7 @@ impl Sync { aws_doc_sdk_examples_path: &Path, aws_sdk_rust_path: &Path, smithy_rs_path: &Path, - smithy_parallelism: usize, + codegen_settings: CodeGenSettings, ) -> Result { let _temp_dir = Arc::new(tempfile::tempdir().context(here!("create temp dir"))?); let aws_sdk_rust = Arc::new(GitCLI::new(aws_sdk_rust_path)?); @@ -58,7 +131,8 @@ impl Sync { fs, versions: Arc::new(DefaultVersions::new()), previous_versions_manifest, - smithy_parallelism, + codegen_settings, + progress: Default::default(), _temp_dir, }) } @@ -78,13 +152,16 @@ impl Sync { fs: Arc::new(fs), versions: Arc::new(versions), previous_versions_manifest: Arc::new(PathBuf::from("doesnt-matter-for-tests")), - smithy_parallelism: 1, + codegen_settings: Default::default(), + progress: Default::default(), _temp_dir: Arc::new(tempfile::tempdir().unwrap()), } } #[instrument(skip(self))] pub fn sync(&self) -> Result<()> { + let _progress_thread = ProgressThread::spawn(self.progress.clone()); + info!("Loading versions.toml..."); let versions = self .versions @@ -162,7 +239,7 @@ impl Sync { self.fs.clone(), None, self.smithy_rs.path(), - self.smithy_parallelism, + &self.codegen_settings, ) .context(here!())?; let generated_sdk = sdk_gen.generate_sdk().context(here!())?; @@ -203,6 +280,9 @@ impl Sync { } info!("Syncing {} commit(s)...", commits.len()); + self.progress + .total_commits + .store(commits.len(), Ordering::Relaxed); // Generate code in parallel for each individual commit let code_gen_paths = { @@ -211,7 +291,8 @@ impl Sync { let examples_revision = versions.aws_doc_sdk_examples_revision.clone(); let examples_path = self.aws_sdk_rust.path().join("examples"); let fs = self.fs.clone(); - let smithy_parallelism = self.smithy_parallelism; + let codegen_settings = self.codegen_settings.clone(); + let progress = self.progress.clone(); commits .par_iter() @@ -235,10 +316,11 @@ impl Sync { fs.clone(), Some(commit.hash.clone()), smithy_rs.path(), - smithy_parallelism, + &codegen_settings, ) .context(here!())?; let sdk_path = sdk_gen.generate_sdk().context(here!())?; + progress.commits_completed.fetch_add(1, Ordering::Relaxed); Ok((commit, sdk_path)) }) .collect::>>()? @@ -287,7 +369,7 @@ impl Sync { self.fs.clone(), None, self.smithy_rs.path(), - self.smithy_parallelism, + &self.codegen_settings, ) .context(here!())?; let generated_sdk = sdk_gen.generate_sdk().context(here!())?; diff --git a/tools/sdk-sync/src/sync/gen.rs b/tools/sdk-sync/src/sync/gen.rs index bab5bb81a00..d7f7b89fe8c 100644 --- a/tools/sdk-sync/src/sync/gen.rs +++ b/tools/sdk-sync/src/sync/gen.rs @@ -13,6 +13,23 @@ use std::process::Command; use std::sync::Arc; use tracing::{info, instrument}; +#[derive(Clone, Debug)] +pub struct CodeGenSettings { + pub smithy_parallelism: usize, + pub max_gradle_heap_megabytes: usize, + pub max_gradle_metaspace_megabytes: usize, +} + +impl Default for CodeGenSettings { + fn default() -> Self { + Self { + smithy_parallelism: 1, + max_gradle_heap_megabytes: 512, + max_gradle_metaspace_megabytes: 512, + } + } +} + pub struct GeneratedSdk { path: PathBuf, // Keep a reference to the temp directory so that it doesn't get cleaned up @@ -48,7 +65,7 @@ pub struct DefaultSdkGenerator { examples_path: PathBuf, fs: Arc, smithy_rs: Box, - smithy_parallelism: usize, + settings: CodeGenSettings, temp_dir: Arc, } @@ -61,7 +78,7 @@ impl DefaultSdkGenerator { fs: Arc, reset_to_commit: Option, original_smithy_rs_path: &Path, - smithy_parallelism: usize, + settings: &CodeGenSettings, ) -> Result { let temp_dir = tempfile::tempdir().context(here!("create temp dir"))?; GitCLI::new(original_smithy_rs_path) @@ -82,7 +99,7 @@ impl DefaultSdkGenerator { examples_path: examples_path.into(), fs, smithy_rs: Box::new(smithy_rs) as Box, - smithy_parallelism, + settings: settings.clone(), temp_dir: Arc::new(temp_dir), }) } @@ -110,9 +127,7 @@ impl DefaultSdkGenerator { Ok(()) } - /// Runs `aws:sdk:assemble` target with property `aws.fullsdk=true` set - #[instrument(skip(self))] - fn aws_sdk_assemble(&self) -> Result<()> { + fn do_aws_sdk_assemble(&self) -> Result<()> { info!("Generating the SDK..."); let mut command = Command::new("./gradlew"); @@ -126,14 +141,19 @@ impl DefaultSdkGenerator { command.arg(format!( "-Dorg.gradle.jvmargs={}", [ - // Retain default Gradle JVM args - "-Xmx512m", - "-XX:MaxMetaspaceSize=256m", + // Configure Gradle JVM memory settings + format!("-Xmx{}m", self.settings.max_gradle_heap_megabytes), + format!( + "-XX:MaxMetaspaceSize={}m", + self.settings.max_gradle_metaspace_megabytes + ), + "-XX:+UseSerialGC".to_string(), + "-verbose:gc".to_string(), // Disable incremental compilation and caching since we're compiling exactly once per commit - "-Dkotlin.incremental=false", - "-Dkotlin.caching.enabled=false", + "-Dkotlin.incremental=false".to_string(), + "-Dkotlin.caching.enabled=false".to_string(), // Run the compiler in the gradle daemon process to avoid more forking thrash - "-Dkotlin.compiler.execution.strategy=in-process" + "-Dkotlin.compiler.execution.strategy=in-process".to_string() ] .join(" ") )); @@ -141,7 +161,7 @@ impl DefaultSdkGenerator { // Disable Smithy's codegen parallelism in favor of sdk-sync parallelism command.arg(format!( "-Djava.util.concurrent.ForkJoinPool.common.parallelism={}", - self.smithy_parallelism + self.settings.smithy_parallelism )); command.arg("-Paws.fullsdk=true"); @@ -162,6 +182,26 @@ impl DefaultSdkGenerator { handle_failure("aws_sdk_assemble", &output)?; Ok(()) } + + /// Runs `aws:sdk:assemble` target with property `aws.fullsdk=true` set + #[instrument(skip(self))] + fn aws_sdk_assemble(&self) -> Result<()> { + let result = self.do_aws_sdk_assemble(); + if result.is_err() { + // On failure, do a dump of running processes to give more insight into if there is a process leak going on + match Command::new("ps").arg("-ef").output() { + Ok(output) => info!( + "Running processes shortly after failure:\n---\n{}---\n", + String::from_utf8_lossy(&output.stdout) + ), + Err(err) => info!( + "Failed to get running processes shortly after failure: {}", + err + ), + } + } + result + } } impl SdkGenerator for DefaultSdkGenerator { diff --git a/tools/sdk-sync/tests/e2e_test.rs b/tools/sdk-sync/tests/e2e_test.rs index 28e9d8699e7..016add58a5b 100644 --- a/tools/sdk-sync/tests/e2e_test.rs +++ b/tools/sdk-sync/tests/e2e_test.rs @@ -92,7 +92,7 @@ fn test_without_model_changes() { &tmp_dir.as_ref().join("aws-doc-sdk-examples"), &tmp_dir.as_ref().join("aws-sdk-rust"), &tmp_dir.as_ref().join("smithy-rs"), - 1, + Default::default(), ) .expect("create sync success"); sync.sync().expect("sync success"); @@ -211,7 +211,7 @@ fn test_with_model_changes() { &tmp_dir.as_ref().join("aws-doc-sdk-examples"), &tmp_dir.as_ref().join("aws-sdk-rust"), &tmp_dir.as_ref().join("smithy-rs"), - 1, + Default::default(), ) .expect("create sync success"); sync.sync().expect("sync success"); From 26316db7b2bbbf5bc5e9808b77051043a39bcbbe Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Mon, 13 Jun 2022 18:19:40 -0700 Subject: [PATCH 33/49] Implement feature-gated independent SDK crate versioning (#1435) Co-authored-by: Zelda Hessler --- aws/sdk/build.gradle.kts | 12 +- buildSrc/build.gradle.kts | 1 + .../src/main/kotlin/aws/sdk/CrateVersioner.kt | 169 ++++++++++++++++++ .../src/main/kotlin/aws/sdk/ModelMetadata.kt | 43 +++++ .../main/kotlin/aws/sdk/VersionsManifest.kt | 47 +++++ .../aws/sdk/IndependentCrateVersionerTest.kt | 161 +++++++++++++++++ .../test/kotlin/aws/sdk/ModelMetadataTest.kt | 33 ++++ .../kotlin/aws/sdk/VersionsManifestTest.kt | 51 ++++++ .../publisher/src/subcommand/fix_manifests.rs | 12 +- .../src/subcommand/fix_manifests/validate.rs | 14 +- 10 files changed, 535 insertions(+), 8 deletions(-) create mode 100644 buildSrc/src/main/kotlin/aws/sdk/CrateVersioner.kt create mode 100644 buildSrc/src/main/kotlin/aws/sdk/ModelMetadata.kt create mode 100644 buildSrc/src/main/kotlin/aws/sdk/VersionsManifest.kt create mode 100644 buildSrc/src/test/kotlin/aws/sdk/IndependentCrateVersionerTest.kt create mode 100644 buildSrc/src/test/kotlin/aws/sdk/ModelMetadataTest.kt create mode 100644 buildSrc/src/test/kotlin/aws/sdk/VersionsManifestTest.kt diff --git a/aws/sdk/build.gradle.kts b/aws/sdk/build.gradle.kts index d1df765a428..18514574c37 100644 --- a/aws/sdk/build.gradle.kts +++ b/aws/sdk/build.gradle.kts @@ -54,6 +54,7 @@ dependencies { val awsServices: AwsServices by lazy { discoverServices(loadServiceMembership()) } val eventStreamAllowList: Set by lazy { eventStreamAllowList() } +val crateVersioner by lazy { aws.sdk.CrateVersioner.defaultFor(rootProject, properties) } fun getSdkVersion(): String = properties.get("aws.sdk.version") ?: throw Exception("SDK version missing") fun getRustMSRV(): String = properties.get("rust.msrv") ?: throw Exception("Rust MSRV missing") @@ -86,6 +87,7 @@ fun generateSmithyBuild(services: AwsServices): String { "" ) } + val moduleName = "aws-sdk-${service.module}" val eventStreamAllowListMembers = eventStreamAllowList.joinToString(", ") { "\"$it\"" } """ "${service.module}": { @@ -103,8 +105,8 @@ fun generateSmithyBuild(services: AwsServices): String { "eventStreamAllowList": [$eventStreamAllowListMembers] }, "service": "${service.service}", - "module": "aws-sdk-${service.module}", - "moduleVersion": "${getSdkVersion()}", + "module": "$moduleName", + "moduleVersion": "${crateVersioner.decideCrateVersion(moduleName)}", "moduleAuthors": ["AWS Rust SDK Team ", "Russell Cohen "], "moduleDescription": "${service.moduleDescription}", ${service.examplesUri(project)?.let { """"examples": "$it",""" } ?: ""} @@ -299,7 +301,11 @@ tasks.register("fixManifests") { toolPath = publisherToolPath binaryName = "publisher" - arguments = listOf("fix-manifests", "--location", outputDir.absolutePath) + arguments = mutableListOf("fix-manifests", "--location", outputDir.absolutePath).apply { + if (crateVersioner.independentVersioningEnabled()) { + add("--disable-version-number-validation") + } + } dependsOn("assemble") dependsOn("relocateServices") diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 0f1f868fd96..b1d48a62e5c 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -30,6 +30,7 @@ dependencies { implementation("software.amazon.smithy:smithy-aws-iam-traits:$smithyVersion") implementation("software.amazon.smithy:smithy-aws-cloudformation-traits:$smithyVersion") implementation(gradleApi()) + implementation("com.moandjiezana.toml:toml4j:0.7.2") testImplementation("org.junit.jupiter:junit-jupiter:5.6.1") } diff --git a/buildSrc/src/main/kotlin/aws/sdk/CrateVersioner.kt b/buildSrc/src/main/kotlin/aws/sdk/CrateVersioner.kt new file mode 100644 index 00000000000..abea120ffa7 --- /dev/null +++ b/buildSrc/src/main/kotlin/aws/sdk/CrateVersioner.kt @@ -0,0 +1,169 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk + +import PropertyRetriever +import org.gradle.api.Project +import org.slf4j.LoggerFactory + +const val LOCAL_DEV_VERSION: String = "0.0.0-local" + +// Example command for generating with independent versions: +// ``` +// ./gradlew --no-daemon \ +// -Paws.sdk.independent.versions=true \ +// -Paws.sdk.model.metadata=$HOME/model-metadata.toml \ +// -Paws.sdk.previous.release.versions.manifest=$HOME/versions.toml \ +// aws:sdk:assemble +// ``` +object CrateVersioner { + fun defaultFor(rootProject: Project, properties: PropertyRetriever): VersionCrate = + // Putting independent crate versioning behind a feature flag for now + when (properties.get("aws.sdk.independent.versions")) { + "true" -> when (val versionsManifestPath = properties.get("aws.sdk.previous.release.versions.manifest")) { + // In local dev, use special `0.0.0-local` version number for all SDK crates + null -> SynchronizedCrateVersioner(properties, sdkVersion = LOCAL_DEV_VERSION) + else -> { + val modelMetadataPath = properties.get("aws.sdk.model.metadata") + ?: throw IllegalArgumentException("Property `aws.sdk.model.metadata` required for independent crate version builds") + IndependentCrateVersioner( + VersionsManifest.fromFile(versionsManifestPath), + ModelMetadata.fromFile(modelMetadataPath), + devPreview = true, + smithyRsVersion = getSmithyRsVersion(rootProject) + ) + } + } + else -> SynchronizedCrateVersioner(properties) + } +} + +interface VersionCrate { + fun decideCrateVersion(moduleName: String): String + + fun independentVersioningEnabled(): Boolean +} + +class SynchronizedCrateVersioner( + properties: PropertyRetriever, + private val sdkVersion: String = properties.get("aws.sdk.version") ?: throw Exception("SDK version missing") +) : VersionCrate { + init { + LoggerFactory.getLogger(javaClass).info("Using synchronized SDK crate versioning with version `$sdkVersion`") + } + + override fun decideCrateVersion(moduleName: String): String = sdkVersion + + override fun independentVersioningEnabled(): Boolean = sdkVersion == LOCAL_DEV_VERSION +} + +private data class SemVer( + val major: Int, + val minor: Int, + val patch: Int +) { + companion object { + fun parse(value: String): SemVer { + val parseNote = "Note: This implementation doesn't implement pre-release/build version support" + val failure = IllegalArgumentException("Unrecognized semver version number: $value. $parseNote") + val parts = value.split(".") + if (parts.size != 3) { + throw failure + } + return SemVer( + major = parts[0].toIntOrNull() ?: throw failure, + minor = parts[1].toIntOrNull() ?: throw failure, + patch = parts[2].toIntOrNull() ?: throw failure + ) + } + } + + fun bumpMajor(): SemVer = copy(major = major + 1, minor = 0, patch = 0) + fun bumpMinor(): SemVer = copy(minor = minor + 1, patch = 0) + fun bumpPatch(): SemVer = copy(patch = patch + 1) + + override fun toString(): String { + return "$major.$minor.$patch" + } +} + +fun getSmithyRsVersion(rootProject: Project): String { + Runtime.getRuntime().let { runtime -> + val command = arrayOf("git", "-C", rootProject.rootDir.absolutePath, "rev-parse", "HEAD") + val process = runtime.exec(command) + if (process.waitFor() != 0) { + throw RuntimeException( + "Failed to run `${command.joinToString(" ")}`:\n" + + "stdout: " + + String(process.inputStream.readAllBytes()) + + "stderr: " + + String(process.errorStream.readAllBytes()) + ) + } + return String(process.inputStream.readAllBytes()).trim() + } +} + +class IndependentCrateVersioner( + private val versionsManifest: VersionsManifest, + private val modelMetadata: ModelMetadata, + private val devPreview: Boolean, + smithyRsVersion: String +) : VersionCrate { + private val smithyRsChanged = versionsManifest.smithyRsRevision != smithyRsVersion + private val logger = LoggerFactory.getLogger(javaClass) + + init { + logger.info("Using independent SDK crate versioning. Dev preview: $devPreview") + logger.info( + "Current smithy-rs HEAD: `$smithyRsVersion`. " + + "Previous smithy-rs HEAD from versions.toml: `${versionsManifest.smithyRsRevision}`. " + + "Code generator changed: $smithyRsChanged" + ) + } + + override fun independentVersioningEnabled(): Boolean = true + + override fun decideCrateVersion(moduleName: String): String { + var previousVersion: SemVer? = null + val (reason, newVersion) = when (val existingCrate = versionsManifest.crates.get(moduleName)) { + // The crate didn't exist before, so create a new major version + null -> "new service" to newMajorVersion() + else -> { + previousVersion = SemVer.parse(existingCrate.version) + if (smithyRsChanged) { + "smithy-rs changed" to previousVersion.bumpCodegenChanged() + } else { + when (modelMetadata.changeType(moduleName)) { + ChangeType.UNCHANGED -> "no change" to previousVersion + ChangeType.FEATURE -> "its API changed" to previousVersion.bumpModelChanged() + ChangeType.DOCUMENTATION -> "it has new docs" to previousVersion.bumpDocsChanged() + } + } + } + } + if (previousVersion == null) { + logger.info("`$moduleName` is a new service. Starting it at `$newVersion`") + } else if (previousVersion != newVersion) { + logger.info("Version bumping `$moduleName` from `$previousVersion` to `$newVersion` because $reason") + } else { + logger.info("No changes expected for `$moduleName`") + } + return newVersion.toString() + } + + private fun newMajorVersion(): SemVer = when (devPreview) { + true -> SemVer.parse("0.1.0") + else -> SemVer.parse("1.0.0") + } + + private fun SemVer.bumpCodegenChanged(): SemVer = bumpMinor() + private fun SemVer.bumpModelChanged(): SemVer = when (devPreview) { + true -> bumpPatch() + else -> bumpMinor() + } + private fun SemVer.bumpDocsChanged(): SemVer = bumpPatch() +} diff --git a/buildSrc/src/main/kotlin/aws/sdk/ModelMetadata.kt b/buildSrc/src/main/kotlin/aws/sdk/ModelMetadata.kt new file mode 100644 index 00000000000..aca086cae1e --- /dev/null +++ b/buildSrc/src/main/kotlin/aws/sdk/ModelMetadata.kt @@ -0,0 +1,43 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk + +import com.moandjiezana.toml.Toml +import java.io.File + +enum class ChangeType { + UNCHANGED, + FEATURE, + DOCUMENTATION +} + +/** Model metadata toml file */ +data class ModelMetadata( + private val crates: Map +) { + companion object { + fun fromFile(path: String): ModelMetadata { + val contents = File(path).readText() + return fromString(contents) + } + + fun fromString(value: String): ModelMetadata { + val toml = Toml().read(value) + return ModelMetadata( + crates = toml.getTable("crates")?.entrySet()?.map { entry -> + entry.key to when (val kind = (entry.value as Toml).getString("kind")) { + "Feature" -> ChangeType.FEATURE + "Documentation" -> ChangeType.DOCUMENTATION + else -> throw IllegalArgumentException("Unrecognized change type: $kind") + } + }?.toMap() ?: emptyMap() + ) + } + } + + fun hasCrates(): Boolean = crates.isNotEmpty() + fun changeType(moduleName: String): ChangeType = crates[moduleName] ?: ChangeType.UNCHANGED +} diff --git a/buildSrc/src/main/kotlin/aws/sdk/VersionsManifest.kt b/buildSrc/src/main/kotlin/aws/sdk/VersionsManifest.kt new file mode 100644 index 00000000000..f1b793f97ff --- /dev/null +++ b/buildSrc/src/main/kotlin/aws/sdk/VersionsManifest.kt @@ -0,0 +1,47 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk + +import com.moandjiezana.toml.Toml +import java.io.File + +data class CrateVersion( + val category: String, + val version: String, + val sourceHash: String? = null, + val modelHash: String? = null +) + +/** Kotlin representation of aws-sdk-rust's `versions.toml` file */ +data class VersionsManifest( + val smithyRsRevision: String, + val awsDocSdkExamplesRevision: String, + val crates: Map +) { + companion object { + fun fromFile(path: String): VersionsManifest { + val contents = File(path).readText() + return fromString(contents) + } + + fun fromString(value: String): VersionsManifest { + val toml = Toml().read(value) + return VersionsManifest( + smithyRsRevision = toml.getString("smithy_rs_revision"), + awsDocSdkExamplesRevision = toml.getString("aws_doc_sdk_examples_revision"), + crates = toml.getTable("crates").entrySet().map { entry -> + val value = (entry.value as Toml) + entry.key to CrateVersion( + category = value.getString("category"), + version = value.getString("version"), + sourceHash = value.getString("source_hash"), + modelHash = value.getString("model_hash") + ) + }.toMap() + ) + } + } +} diff --git a/buildSrc/src/test/kotlin/aws/sdk/IndependentCrateVersionerTest.kt b/buildSrc/src/test/kotlin/aws/sdk/IndependentCrateVersionerTest.kt new file mode 100644 index 00000000000..5a2b691d65c --- /dev/null +++ b/buildSrc/src/test/kotlin/aws/sdk/IndependentCrateVersionerTest.kt @@ -0,0 +1,161 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk + +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test + +class IndependentCrateVersionerTest { + @Test + fun devPreviewSmithyRsChanged() { + val versioner = IndependentCrateVersioner( + VersionsManifest( + smithyRsRevision = "smithy-rs-1", + awsDocSdkExamplesRevision = "dontcare", + crates = mapOf( + "aws-sdk-dynamodb" to CrateVersion( + category = "AwsSdk", + version = "0.11.3" + ), + "aws-sdk-ec2" to CrateVersion( + category = "AwsSdk", + version = "0.10.1" + ), + "aws-sdk-s3" to CrateVersion( + category = "AwsSdk", + version = "0.12.0" + ) + ) + ), + ModelMetadata( + crates = mapOf( + "aws-sdk-dynamodb" to ChangeType.FEATURE, + "aws-sdk-ec2" to ChangeType.DOCUMENTATION + ) + ), + devPreview = true, + smithyRsVersion = "smithy-rs-2" + ) + + // The code generator changed, so all minor versions should bump + assertEquals("0.12.0", versioner.decideCrateVersion("aws-sdk-dynamodb")) + assertEquals("0.11.0", versioner.decideCrateVersion("aws-sdk-ec2")) + assertEquals("0.13.0", versioner.decideCrateVersion("aws-sdk-s3")) + assertEquals("0.1.0", versioner.decideCrateVersion("aws-sdk-somenewservice")) + } + + @Test + fun devPreviewSameCodeGenerator() { + val versioner = IndependentCrateVersioner( + VersionsManifest( + smithyRsRevision = "smithy-rs-1", + awsDocSdkExamplesRevision = "dontcare", + crates = mapOf( + "aws-sdk-dynamodb" to CrateVersion( + category = "AwsSdk", + version = "0.11.3" + ), + "aws-sdk-ec2" to CrateVersion( + category = "AwsSdk", + version = "0.10.1" + ), + "aws-sdk-s3" to CrateVersion( + category = "AwsSdk", + version = "0.12.0" + ) + ) + ), + ModelMetadata( + crates = mapOf( + "aws-sdk-dynamodb" to ChangeType.FEATURE, + "aws-sdk-ec2" to ChangeType.DOCUMENTATION + ) + ), + devPreview = true, + smithyRsVersion = "smithy-rs-1" + ) + + assertEquals("0.11.4", versioner.decideCrateVersion("aws-sdk-dynamodb")) + assertEquals("0.10.2", versioner.decideCrateVersion("aws-sdk-ec2")) + assertEquals("0.12.0", versioner.decideCrateVersion("aws-sdk-s3")) + assertEquals("0.1.0", versioner.decideCrateVersion("aws-sdk-somenewservice")) + } + + @Test + fun smithyRsChanged() { + val versioner = IndependentCrateVersioner( + VersionsManifest( + smithyRsRevision = "smithy-rs-1", + awsDocSdkExamplesRevision = "dontcare", + crates = mapOf( + "aws-sdk-dynamodb" to CrateVersion( + category = "AwsSdk", + version = "1.11.3" + ), + "aws-sdk-ec2" to CrateVersion( + category = "AwsSdk", + version = "1.10.1" + ), + "aws-sdk-s3" to CrateVersion( + category = "AwsSdk", + version = "1.12.0" + ) + ) + ), + ModelMetadata( + crates = mapOf( + "aws-sdk-dynamodb" to ChangeType.FEATURE, + "aws-sdk-ec2" to ChangeType.DOCUMENTATION + ) + ), + devPreview = false, + smithyRsVersion = "smithy-rs-2" + ) + + // The code generator changed, so all minor versions should bump + assertEquals("1.12.0", versioner.decideCrateVersion("aws-sdk-dynamodb")) + assertEquals("1.11.0", versioner.decideCrateVersion("aws-sdk-ec2")) + assertEquals("1.13.0", versioner.decideCrateVersion("aws-sdk-s3")) + assertEquals("1.0.0", versioner.decideCrateVersion("aws-sdk-somenewservice")) + } + + @Test + fun sameCodeGenerator() { + val versioner = IndependentCrateVersioner( + VersionsManifest( + smithyRsRevision = "smithy-rs-1", + awsDocSdkExamplesRevision = "dontcare", + crates = mapOf( + "aws-sdk-dynamodb" to CrateVersion( + category = "AwsSdk", + version = "1.11.3" + ), + "aws-sdk-ec2" to CrateVersion( + category = "AwsSdk", + version = "1.10.1" + ), + "aws-sdk-s3" to CrateVersion( + category = "AwsSdk", + version = "1.12.0" + ) + ) + ), + ModelMetadata( + crates = mapOf( + "aws-sdk-dynamodb" to ChangeType.FEATURE, + "aws-sdk-ec2" to ChangeType.DOCUMENTATION + ) + ), + devPreview = false, + smithyRsVersion = "smithy-rs-1" + ) + + assertEquals("1.12.0", versioner.decideCrateVersion("aws-sdk-dynamodb")) + assertEquals("1.10.2", versioner.decideCrateVersion("aws-sdk-ec2")) + assertEquals("1.12.0", versioner.decideCrateVersion("aws-sdk-s3")) + assertEquals("1.0.0", versioner.decideCrateVersion("aws-sdk-somenewservice")) + } +} diff --git a/buildSrc/src/test/kotlin/aws/sdk/ModelMetadataTest.kt b/buildSrc/src/test/kotlin/aws/sdk/ModelMetadataTest.kt new file mode 100644 index 00000000000..d157ed0adc2 --- /dev/null +++ b/buildSrc/src/test/kotlin/aws/sdk/ModelMetadataTest.kt @@ -0,0 +1,33 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk + +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertFalse +import org.junit.jupiter.api.Test + +class ModelMetadataTest { + @Test + fun `it should parse an empty file`() { + val result = ModelMetadata.fromString("") + assertFalse(result.hasCrates()) + } + + @Test + fun `it should parse`() { + val contents = """ + [crates.aws-sdk-someservice] + kind = "Feature" + + [crates.aws-sdk-s3] + kind = "Documentation" + """.trimIndent() + + val result = ModelMetadata.fromString(contents) + assertEquals(ChangeType.FEATURE, result.changeType("aws-sdk-someservice")) + assertEquals(ChangeType.DOCUMENTATION, result.changeType("aws-sdk-s3")) + } +} diff --git a/buildSrc/src/test/kotlin/aws/sdk/VersionsManifestTest.kt b/buildSrc/src/test/kotlin/aws/sdk/VersionsManifestTest.kt new file mode 100644 index 00000000000..0cfa63a0909 --- /dev/null +++ b/buildSrc/src/test/kotlin/aws/sdk/VersionsManifestTest.kt @@ -0,0 +1,51 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.sdk + +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test + +class VersionsManifestTest { + @Test + fun `it should parse versions toml`() { + val manifest = VersionsManifest.fromString( + """ + smithy_rs_revision = 'some-smithy-rs-revision' + aws_doc_sdk_examples_revision = 'some-doc-revision' + + [crates.aws-config] + category = 'AwsRuntime' + version = '0.12.0' + source_hash = '12d172094a2576e6f4d00a8ba58276c0d4abc4e241bb75f0d3de8ac3412e8e47' + + [crates.aws-sdk-account] + category = 'AwsSdk' + version = '0.12.0' + source_hash = 'a0dfc080638b1d803745f0bd66b610131783cf40ab88fd710dce906fc69b983e' + model_hash = '179bbfd915093dc3bec5444771da2b20d99a37d104ba25f0acac9aa0d5bb758a' + """.trimIndent() + ) + + assertEquals("some-smithy-rs-revision", manifest.smithyRsRevision) + assertEquals("some-doc-revision", manifest.awsDocSdkExamplesRevision) + assertEquals( + mapOf( + "aws-config" to CrateVersion( + category = "AwsRuntime", + version = "0.12.0", + sourceHash = "12d172094a2576e6f4d00a8ba58276c0d4abc4e241bb75f0d3de8ac3412e8e47" + ), + "aws-sdk-account" to CrateVersion( + category = "AwsSdk", + version = "0.12.0", + sourceHash = "a0dfc080638b1d803745f0bd66b610131783cf40ab88fd710dce906fc69b983e", + modelHash = "179bbfd915093dc3bec5444771da2b20d99a37d104ba25f0acac9aa0d5bb758a" + ) + ), + manifest.crates + ) + } +} diff --git a/tools/publisher/src/subcommand/fix_manifests.rs b/tools/publisher/src/subcommand/fix_manifests.rs index 8c2671da2fa..c6c15afcebb 100644 --- a/tools/publisher/src/subcommand/fix_manifests.rs +++ b/tools/publisher/src/subcommand/fix_manifests.rs @@ -38,10 +38,18 @@ pub struct FixManifestsArgs { /// Checks manifests rather than fixing them #[clap(long)] check: bool, + /// Disable expected version number validation. This should only be used + /// when SDK crates are being generated with independent version numbers. + #[clap(long)] + disable_version_number_validation: bool, } pub async fn subcommand_fix_manifests( - FixManifestsArgs { location, check }: &FixManifestsArgs, + FixManifestsArgs { + location, + check, + disable_version_number_validation, + }: &FixManifestsArgs, ) -> Result<()> { let mode = match check { true => Mode::Check, @@ -51,7 +59,7 @@ pub async fn subcommand_fix_manifests( let mut manifests = read_manifests(Fs::Real, manifest_paths).await?; let versions = package_versions(&manifests)?; - validate::validate_before_fixes(&versions)?; + validate::validate_before_fixes(&versions, *disable_version_number_validation)?; fix_manifests(Fs::Real, &versions, &mut manifests, mode).await?; validate::validate_after_fixes(location).await?; info!("Successfully fixed manifests!"); diff --git a/tools/publisher/src/subcommand/fix_manifests/validate.rs b/tools/publisher/src/subcommand/fix_manifests/validate.rs index 817afa5c3aa..7387bb661b4 100644 --- a/tools/publisher/src/subcommand/fix_manifests/validate.rs +++ b/tools/publisher/src/subcommand/fix_manifests/validate.rs @@ -17,7 +17,15 @@ use tracing::info; /// For now, this validates: /// - `aws-config` version number matches all `aws-sdk-` prefixed versions /// - `aws-smithy-` prefixed versions match `aws-` (NOT `aws-sdk-`) prefixed versions -pub(super) fn validate_before_fixes(versions: &BTreeMap) -> Result<()> { +pub(super) fn validate_before_fixes( + versions: &BTreeMap, + disable_version_number_validation: bool, +) -> Result<()> { + // Later when we only generate independently versioned SDK crates, this flag can become permanent. + if disable_version_number_validation { + return Ok(()); + } + info!("Pre-validation manifests..."); let maybe_sdk_version = versions.get("aws-config"); let expected_smithy_version = versions @@ -75,12 +83,12 @@ mod test { #[track_caller] fn expect_success(version_tuples: &[(&'static str, &'static str)]) { - validate_before_fixes(&versions(version_tuples)).expect("success"); + validate_before_fixes(&versions(version_tuples), false).expect("success"); } #[track_caller] fn expect_failure(message: &str, version_tuples: &[(&'static str, &'static str)]) { - if let Err(err) = validate_before_fixes(&versions(version_tuples)) { + if let Err(err) = validate_before_fixes(&versions(version_tuples), false) { assert_eq!(message, format!("{}", err)); } else { panic!("Expected validation failure"); From 66ff2bd0e7b1a79d33c47cf2e429b30301a21648 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Tue, 14 Jun 2022 07:29:35 -0700 Subject: [PATCH 34/49] Pin the `clap` version used to prevent future deprecation warnings (#1464) Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com> --- .../examples/pokemon_service/Cargo.toml | 2 +- tools/api-linter/Cargo.lock | 100 +++---- tools/api-linter/Cargo.toml | 2 +- tools/ci-cdk/canary-runner/Cargo.lock | 274 +++++++++--------- tools/ci-cdk/canary-runner/Cargo.toml | 2 +- tools/crate-hasher/Cargo.lock | 80 +++-- tools/crate-hasher/Cargo.toml | 2 +- tools/echo-server/Cargo.lock | 47 ++- tools/publisher/Cargo.lock | 171 +++++------ tools/publisher/Cargo.toml | 2 +- tools/sdk-lints/Cargo.lock | 58 ++-- tools/sdk-lints/Cargo.toml | 2 +- tools/sdk-sync/Cargo.lock | 154 +++++----- tools/sdk-sync/Cargo.toml | 2 +- tools/sdk-versioner/Cargo.lock | 124 ++++---- tools/sdk-versioner/Cargo.toml | 2 +- tools/smithy-rs-tool-common/.gitignore | 1 + tools/smithy-rs-tool-common/Cargo.lock | 190 ------------ 18 files changed, 507 insertions(+), 708 deletions(-) create mode 100644 tools/smithy-rs-tool-common/.gitignore delete mode 100644 tools/smithy-rs-tool-common/Cargo.lock diff --git a/rust-runtime/aws-smithy-http-server/examples/pokemon_service/Cargo.toml b/rust-runtime/aws-smithy-http-server/examples/pokemon_service/Cargo.toml index a503537f431..5a2e295e423 100644 --- a/rust-runtime/aws-smithy-http-server/examples/pokemon_service/Cargo.toml +++ b/rust-runtime/aws-smithy-http-server/examples/pokemon_service/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Smithy-rs Server Team "] description = "A smithy Rust service to retrieve information about Pokémon." [dependencies] -clap = { version = "3.2.1", features = ["derive"] } +clap = { version = "~3.2.1", features = ["derive"] } hyper = {version = "0.14", features = ["server"] } tokio = "1" tower = "0.4" diff --git a/tools/api-linter/Cargo.lock b/tools/api-linter/Cargo.lock index e92d2d48e03..4e2a2fe654c 100644 --- a/tools/api-linter/Cargo.lock +++ b/tools/api-linter/Cargo.lock @@ -19,9 +19,9 @@ checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -53,9 +53,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "camino" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] @@ -112,9 +112,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.1.12" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c167e37342afc5f33fd87bbc870cedd020d2a6dffa05d45ccd9241fbdd146db" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "atty", "bitflags", @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.7" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ "heck", "proc-macro-error", @@ -142,9 +142,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.1.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "189ddd3b5d32a70b35e7686054371742a937b0d99128e76dde6340210e966669" +checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" dependencies = [ "os_str_bytes", ] @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -204,9 +204,9 @@ checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "lazy_static" @@ -216,15 +216,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.124" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] @@ -240,15 +240,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "output_vt100" @@ -321,11 +321,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -339,9 +339,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "regex-syntax", ] @@ -357,9 +357,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "rustdoc-types" @@ -372,33 +372,33 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "semver" -version = "1.0.7" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" +checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -407,9 +407,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ "itoa", "ryu", @@ -460,13 +460,13 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.91" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -511,9 +511,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if", "pin-project-lite", @@ -534,11 +534,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -578,10 +578,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-ident" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" [[package]] name = "valuable" diff --git a/tools/api-linter/Cargo.toml b/tools/api-linter/Cargo.toml index d72d9b7c318..baed2b5f1de 100644 --- a/tools/api-linter/Cargo.toml +++ b/tools/api-linter/Cargo.toml @@ -10,7 +10,7 @@ publish = false [dependencies] anyhow = "1" cargo_metadata = "0.14" -clap = { version = "3.1", features = ["derive"] } +clap = { version = "~3.1.18", features = ["derive"] } owo-colors = { version = "3", features = ["supports-colors"] } pest = "2" # For pretty error formatting rustdoc-types = "0.10" diff --git a/tools/ci-cdk/canary-runner/Cargo.lock b/tools/ci-cdk/canary-runner/Cargo.lock index 26021f97615..008e3d262c9 100644 --- a/tools/ci-cdk/canary-runner/Cargo.lock +++ b/tools/ci-cdk/canary-runner/Cargo.lock @@ -28,9 +28,9 @@ checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -289,7 +289,7 @@ dependencies = [ "percent-encoding", "pin-project", "tokio", - "tokio-util 0.6.9", + "tokio-util 0.6.10", "tracing", ] @@ -376,9 +376,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "bytes" @@ -443,9 +443,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.12" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c167e37342afc5f33fd87bbc870cedd020d2a6dffa05d45ccd9241fbdd146db" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "atty", "bitflags", @@ -460,9 +460,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.7" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ "heck", "proc-macro-error", @@ -473,9 +473,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.1.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "189ddd3b5d32a70b35e7686054371742a937b0d99128e76dde6340210e966669" +checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" dependencies = [ "os_str_bytes", ] @@ -690,7 +690,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.7.1", + "tokio-util 0.7.3", "tracing", ] @@ -723,20 +723,20 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa 1.0.2", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -757,9 +757,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" dependencies = [ "bytes", "futures-channel", @@ -770,7 +770,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.1", + "itoa 1.0.2", "pin-project-lite", "socket2", "tokio", @@ -822,9 +822,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -853,9 +853,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "js-sys" @@ -874,9 +874,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.124" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "lock_api" @@ -890,9 +890,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] @@ -920,9 +920,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mime" @@ -932,25 +932,14 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mio" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" dependencies = [ "libc", "log", - "miow", - "ntapi", "wasi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "windows-sys", ] [[package]] @@ -971,20 +960,11 @@ dependencies = [ "tempfile", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -992,9 +972,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] @@ -1011,33 +991,45 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aba1801fb138d8e85e11d0fc70baf4fe1cdfffda7c6cd34a854905df588e5ed0" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ "libc", ] [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "openssl" -version = "0.10.38" +version = "0.10.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ "bitflags", "cfg-if", "foreign-types", "libc", "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" version = "0.1.5" @@ -1046,9 +1038,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.72" +version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" +checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" dependencies = [ "autocfg", "cc", @@ -1059,15 +1051,15 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", "parking_lot_core", @@ -1075,9 +1067,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if", "libc", @@ -1156,11 +1148,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1183,9 +1175,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -1203,9 +1195,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "remove_dir_all" @@ -1218,9 +1210,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ "base64", "bytes", @@ -1245,6 +1237,7 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-native-tls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -1303,18 +1296,18 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi", + "windows-sys", ] [[package]] @@ -1358,24 +1351,24 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.7" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" +checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -1384,11 +1377,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "itoa 1.0.1", + "itoa 1.0.2", "ryu", "serde", ] @@ -1400,7 +1393,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa 1.0.2", "ryu", "serde", ] @@ -1443,6 +1436,7 @@ dependencies = [ "async-trait", "serde", "tokio", + "toml", "tracing", ] @@ -1470,13 +1464,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.91" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1510,18 +1504,18 @@ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", @@ -1564,9 +1558,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.18.0" +version = "1.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f48b6d60512a392e34dbf7fd456249fd2de3c83669ab642e021903f4015185b" +checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" dependencies = [ "bytes", "libc", @@ -1584,9 +1578,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ "proc-macro2", "quote", @@ -1616,9 +1610,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ "bytes", "futures-core", @@ -1630,9 +1624,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" dependencies = [ "bytes", "futures-core", @@ -1642,6 +1636,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "toml" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +dependencies = [ + "indexmap", + "serde", +] + [[package]] name = "tower" version = "0.4.12" @@ -1672,9 +1676,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if", "log", @@ -1696,11 +1700,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -1745,6 +1749,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" + [[package]] name = "unicode-normalization" version = "0.1.19" @@ -1754,12 +1764,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - [[package]] name = "untrusted" version = "0.7.1" @@ -1937,9 +1941,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ "windows_aarch64_msvc", "windows_i686_gnu", @@ -1950,33 +1954,33 @@ dependencies = [ [[package]] name = "windows_aarch64_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_i686_gnu" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_x86_64_gnu" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "winreg" @@ -1995,6 +1999,6 @@ checksum = "114ba2b24d2167ef6d67d7d04c8cc86522b87f490025f39f0303b7db5bf5e3d8" [[package]] name = "zeroize" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb5728b8afd3f280a869ce1d4c554ffaed35f45c231fc41bfbd0381bef50317" +checksum = "94693807d016b2f2d2e14420eb3bfcca689311ff775dcf113d74ea624b7cdf07" diff --git a/tools/ci-cdk/canary-runner/Cargo.toml b/tools/ci-cdk/canary-runner/Cargo.toml index b4335d88352..fa7059d7eab 100644 --- a/tools/ci-cdk/canary-runner/Cargo.toml +++ b/tools/ci-cdk/canary-runner/Cargo.toml @@ -16,7 +16,7 @@ aws-sdk-cloudwatch = "0.3" aws-sdk-lambda = "0.3" aws-sdk-s3 = "0.3" base64 = "0.13" -clap = { version = "3.1", features = ["derive"] } +clap = { version = "~3.1.18", features = ["derive"] } crates_io_api = "0.7" lazy_static = "1" semver = "1" diff --git a/tools/crate-hasher/Cargo.lock b/tools/crate-hasher/Cargo.lock index 87c0df93edb..4a0a6635f29 100644 --- a/tools/crate-hasher/Cargo.lock +++ b/tools/crate-hasher/Cargo.lock @@ -81,9 +81,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.1.12" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c167e37342afc5f33fd87bbc870cedd020d2a6dffa05d45ccd9241fbdd146db" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "atty", "bitflags", @@ -98,9 +98,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.7" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ "heck", "proc-macro-error", @@ -111,9 +111,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.1.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "189ddd3b5d32a70b35e7686054371742a937b0d99128e76dde6340210e966669" +checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" dependencies = [ "os_str_bytes", ] @@ -199,13 +199,11 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if", "crc32fast", - "libc", "miniz_oxide", ] @@ -233,9 +231,9 @@ dependencies = [ [[package]] name = "globset" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" +checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" dependencies = [ "aho-corasick", "bstr", @@ -291,9 +289,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -307,39 +305,39 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.124" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "miniz_oxide" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", ] [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "opaque-debug" @@ -349,9 +347,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "output_vt100" @@ -400,11 +398,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -464,9 +462,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -475,9 +473,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "remove_dir_all" @@ -528,13 +526,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.91" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -589,10 +587,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-ident" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" [[package]] name = "version_check" @@ -644,9 +642,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "xattr" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" dependencies = [ "libc", ] diff --git a/tools/crate-hasher/Cargo.toml b/tools/crate-hasher/Cargo.toml index bbac31b0fc3..da23737b2ad 100644 --- a/tools/crate-hasher/Cargo.toml +++ b/tools/crate-hasher/Cargo.toml @@ -15,7 +15,7 @@ opt-level = 0 [dependencies] anyhow = "1.0" -clap = { version = "3", features = ["derive"] } +clap = { version = "~3.1.18", features = ["derive"] } ignore = "0.4" sha256 = "1.0" diff --git a/tools/echo-server/Cargo.lock b/tools/echo-server/Cargo.lock index db2c6d4e696..f54491a8414 100644 --- a/tools/echo-server/Cargo.lock +++ b/tools/echo-server/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -30,9 +30,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2504b827a8bef941ba3dd64bdffe9cf56ca182908a147edd6189c95fbcae7d" +checksum = "dc47084705629d09d15060d70a8dbfce479c842303d05929ce29c74c995916ae" dependencies = [ "async-trait", "axum-core", @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da31c0ed7b4690e2c78fe4b880d21cd7db04a346ebc658b4270251b695437f17" +checksum = "c2efed1c501becea07ce48118786ebcf229531d0d3b28edf224a720020d9e106" dependencies = [ "async-trait", "bytes", @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", @@ -559,9 +559,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", @@ -585,9 +585,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.18.2" +version = "1.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" dependencies = [ "bytes", "libc", @@ -605,9 +605,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ "proc-macro2", "quote", @@ -616,9 +616,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" dependencies = [ "bytes", "futures-core", @@ -639,7 +639,6 @@ dependencies = [ "pin-project", "pin-project-lite", "tokio", - "tokio-util", "tower-layer", "tower-service", "tracing", @@ -647,9 +646,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d342c6d58709c0a6d48d48dabbb62d4ef955cf5f0f3bbfd845838e7ae88dbae" +checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba" dependencies = [ "bitflags", "bytes", @@ -678,9 +677,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if", "log", @@ -702,11 +701,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] diff --git a/tools/publisher/Cargo.lock b/tools/publisher/Cargo.lock index d21f3b48965..b32b7f7108a 100644 --- a/tools/publisher/Cargo.lock +++ b/tools/publisher/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -109,9 +109,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byte-tools" @@ -167,9 +167,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.15" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a35a599b11c089a7f49105658d089b8f2cf0882993c17daf6de15285c2c35d" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "atty", "bitflags", @@ -184,9 +184,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.7" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ "heck", "proc-macro-error", @@ -197,9 +197,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" dependencies = [ "os_str_bytes", ] @@ -481,16 +481,16 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.2.2" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d6a30320f094710245150395bc763ad23128d6a1ebbad7594dc4164b62c56b" +checksum = "b66d0c1b6e3abfd1e72818798925e16e02ed77e1b47f6c25a95a23b377ee4299" dependencies = [ "log", "pest", "pest_derive", - "quick-error", "serde", "serde_json", + "thiserror", ] [[package]] @@ -522,9 +522,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", @@ -533,9 +533,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -556,9 +556,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" dependencies = [ "bytes", "futures-channel", @@ -604,9 +604,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -629,9 +629,9 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "js-sys" @@ -650,9 +650,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "lock_api" @@ -708,25 +708,14 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mio" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" dependencies = [ "libc", "log", - "miow", - "ntapi", "wasi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "windows-sys", ] [[package]] @@ -747,15 +736,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -787,9 +767,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "opaque-debug" @@ -837,9 +817,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.73" +version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5fd19fb3e0a8191c1e34935718976a3e70c112ab9a24af6d7cadccd9d90bc0" +checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" dependencies = [ "autocfg", "cc", @@ -850,15 +830,15 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", "parking_lot_core", @@ -970,11 +950,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1005,12 +985,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quote" version = "1.0.18" @@ -1031,9 +1005,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -1051,9 +1025,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "remove_dir_all" @@ -1066,9 +1040,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ "base64", "bytes", @@ -1093,6 +1067,7 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-native-tls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -1102,18 +1077,18 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi", + "windows-sys", ] [[package]] @@ -1147,9 +1122,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" +checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" [[package]] name = "serde" @@ -1289,13 +1264,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.92" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1383,9 +1358,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.18.1" +version = "1.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce653fb475565de9f6fb0614b28bca8df2c430c0cf84bcd9c843f15de5414cc" +checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" dependencies = [ "bytes", "libc", @@ -1403,9 +1378,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ "proc-macro2", "quote", @@ -1424,9 +1399,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" dependencies = [ "bytes", "futures-core", @@ -1454,9 +1429,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if", "pin-project-lite", @@ -1477,11 +1452,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -1538,6 +1513,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" + [[package]] name = "unicode-normalization" version = "0.1.19" @@ -1553,12 +1534,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" -[[package]] -name = "unicode-xid" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" - [[package]] name = "url" version = "2.2.2" diff --git a/tools/publisher/Cargo.toml b/tools/publisher/Cargo.toml index f2a30d09486..308caa387db 100644 --- a/tools/publisher/Cargo.toml +++ b/tools/publisher/Cargo.toml @@ -18,7 +18,7 @@ anyhow = "1.0" async-recursion = "0.3.2" async-trait = "0.1.51" cargo_toml = "0.10.1" -clap = { version = "3", features = ["derive"] } +clap = { version = "~3.1.18", features = ["derive"] } crates_io_api = "0.7.3" dialoguer = "0.8" handlebars = "4.2" diff --git a/tools/sdk-lints/Cargo.lock b/tools/sdk-lints/Cargo.lock index 7908b2e24c9..9e16f1691f3 100644 --- a/tools/sdk-lints/Cargo.lock +++ b/tools/sdk-lints/Cargo.lock @@ -53,9 +53,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.15" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a35a599b11c089a7f49105658d089b8f2cf0882993c17daf6de15285c2c35d" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "atty", "bitflags", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.7" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ "heck", "proc-macro-error", @@ -83,9 +83,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" dependencies = [ "os_str_bytes", ] @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "lazy_static" @@ -151,9 +151,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "num-integer" @@ -167,18 +167,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] [[package]] name = "num_threads" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aba1801fb138d8e85e11d0fc70baf4fe1cdfffda7c6cd34a854905df588e5ed0" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ "libc", ] @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "output_vt100" @@ -245,11 +245,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -263,9 +263,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "sdk-lints" @@ -322,13 +322,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.92" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -366,10 +366,10 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.3" +name = "unicode-ident" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" [[package]] name = "version_check" diff --git a/tools/sdk-lints/Cargo.toml b/tools/sdk-lints/Cargo.toml index f3763d2585c..496a762ce32 100644 --- a/tools/sdk-lints/Cargo.toml +++ b/tools/sdk-lints/Cargo.toml @@ -13,7 +13,7 @@ opt-level = 0 [dependencies] anyhow = "1" cargo_toml = "0.10.1" -clap = { version = "3.1.7", features = ["derive"]} +clap = { version = "~3.1.18", features = ["derive"]} toml = "0.5.8" serde = { version = "1", features = ["derive"]} serde_json = "1" diff --git a/tools/sdk-sync/Cargo.lock b/tools/sdk-sync/Cargo.lock index bb387da5b06..c2d813cf9f3 100644 --- a/tools/sdk-sync/Cargo.lock +++ b/tools/sdk-sync/Cargo.lock @@ -22,15 +22,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" +checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "async-trait" -version = "0.1.52" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" @@ -86,16 +86,16 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.8" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "atty", "bitflags", "clap_derive", + "clap_lex", "indexmap", "lazy_static", - "os_str_bytes", "strsim", "termcolor", "textwrap", @@ -103,9 +103,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.7" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ "heck", "proc-macro-error", @@ -114,6 +114,15 @@ dependencies = [ "syn", ] +[[package]] +name = "clap_lex" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "crossbeam-channel" version = "0.5.4" @@ -161,9 +170,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" dependencies = [ "quote", "syn", @@ -213,9 +222,9 @@ dependencies = [ [[package]] name = "fragile" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d758e60b45e8d749c89c1b389ad8aee550f86aa12e2b9298b546dda7a82ab1" +checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "gitignore" @@ -255,9 +264,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -289,15 +298,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.112" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] @@ -313,9 +322,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" @@ -334,9 +343,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mockall" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d4d70639a72f972725db16350db56da68266ca368b2a1fe26724a903ad3d6b8" +checksum = "5641e476bbaf592a3939a7485fa079f427b4db21407d5ebfd5bba4e07a1f6f4c" dependencies = [ "cfg-if", "downcast", @@ -349,9 +358,9 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ef208208a0dea3f72221e26e904cdc6db2e481d9ade89081ddd494f1dbaa6b" +checksum = "262d56735932ee0240d515656e5a7667af3af2a5b0af4da558c4cff2b2aeb0c7" dependencies = [ "cfg-if", "proc-macro2", @@ -387,9 +396,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] @@ -406,33 +415,30 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" -dependencies = [ - "memchr", -] +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "output_vt100" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" +checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" dependencies = [ "winapi", ] [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "predicates" @@ -502,27 +508,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.34" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f84e92c0f7c9d58328b85a78557813e4bd845130db68d7184635344399423b1" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.10" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ "proc-macro2", ] [[package]] name = "rayon" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" dependencies = [ "autocfg", "crossbeam-deque", @@ -532,9 +538,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -553,9 +559,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -573,9 +579,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "remove_dir_all" @@ -617,18 +623,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -669,13 +675,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.82" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -748,9 +754,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if", "pin-project-lite", @@ -760,9 +766,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" dependencies = [ "proc-macro2", "quote", @@ -771,19 +777,19 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.22" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23" +checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] [[package]] name = "tracing-log" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", "log", @@ -809,10 +815,10 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-ident" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "valuable" @@ -822,9 +828,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "winapi" diff --git a/tools/sdk-sync/Cargo.toml b/tools/sdk-sync/Cargo.toml index e9e889e6227..d95689762b5 100644 --- a/tools/sdk-sync/Cargo.toml +++ b/tools/sdk-sync/Cargo.toml @@ -16,7 +16,7 @@ opt-level = 0 [dependencies] anyhow = "1.0.56" -clap = { version = "3.1.8", features = ["derive"] } +clap = { version = "~3.1.18", features = ["derive"] } gitignore = "1.0.7" num_cpus = "1.13.1" rayon = "1.5.2" diff --git a/tools/sdk-versioner/Cargo.lock b/tools/sdk-versioner/Cargo.lock index db62a0ee695..5a153d93dc8 100644 --- a/tools/sdk-versioner/Cargo.lock +++ b/tools/sdk-versioner/Cargo.lock @@ -13,15 +13,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.52" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84450d0b4a8bd1ba4144ce8ce718fbc5d071358b1e5384bace6536b3d1f2d5b3" +checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "async-trait" -version = "0.1.52" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -41,9 +41,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" @@ -59,16 +59,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.1.7" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c67e7973e74896f4bba06ca2dcfd28d54f9cb8c035e940a32b88ed48f5f5ecf2" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "atty", "bitflags", "clap_derive", + "clap_lex", "indexmap", "lazy_static", - "os_str_bytes", "strsim", "termcolor", "textwrap", @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.7" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ "heck", "proc-macro-error", @@ -87,11 +87,20 @@ dependencies = [ "syn", ] +[[package]] +name = "clap_lex" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "ctor" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" dependencies = [ "quote", "syn", @@ -105,9 +114,9 @@ checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" [[package]] name = "fastrand" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779d043b6a0b90cc4c0ed7ee380a6504394cee7efd7db050e3774eee387324b2" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" dependencies = [ "instant", ] @@ -135,9 +144,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -160,45 +169,42 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.112" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] -name = "memchr" -version = "2.4.1" +name = "once_cell" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" -dependencies = [ - "memchr", -] +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "output_vt100" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" +checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" dependencies = [ "winapi", ] [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pretty_assertions" -version = "1.0.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0cfe1b2403f172ba0f234e500906ee0a3e493fb81092dac23ebefe129301cc" +checksum = "c89f989ac94207d048d92db058e4f6ec7342b0971fc58d1271ca148b799b3563" dependencies = [ "ansi_term", "ctor", @@ -232,27 +238,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.36" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ "proc-macro2", ] [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ "bitflags", ] @@ -280,18 +286,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.133" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.133" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -317,13 +323,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.85" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -357,9 +363,9 @@ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "indexmap", "serde", @@ -367,9 +373,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.30" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if", "pin-project-lite", @@ -379,9 +385,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" dependencies = [ "proc-macro2", "quote", @@ -390,18 +396,18 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.22" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23" +checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-ident" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" [[package]] name = "version_check" diff --git a/tools/sdk-versioner/Cargo.toml b/tools/sdk-versioner/Cargo.toml index 1beefe77d3b..13122eecce6 100644 --- a/tools/sdk-versioner/Cargo.toml +++ b/tools/sdk-versioner/Cargo.toml @@ -14,7 +14,7 @@ opt-level = 0 [dependencies] anyhow = "1.0" -clap = { version = "3.1.7", features = ["derive"] } +clap = { version = "~3.1.18", features = ["derive"] } toml = { version = "0.5.8", features = ["preserve_order"] } smithy-rs-tool-common = { version = "0.1", path = "../smithy-rs-tool-common" } diff --git a/tools/smithy-rs-tool-common/.gitignore b/tools/smithy-rs-tool-common/.gitignore new file mode 100644 index 00000000000..5a44eef09a5 --- /dev/null +++ b/tools/smithy-rs-tool-common/.gitignore @@ -0,0 +1 @@ +/Cargo.lock diff --git a/tools/smithy-rs-tool-common/Cargo.lock b/tools/smithy-rs-tool-common/Cargo.lock deleted file mode 100644 index 9571293893b..00000000000 --- a/tools/smithy-rs-tool-common/Cargo.lock +++ /dev/null @@ -1,190 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "anyhow" -version = "1.0.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" - -[[package]] -name = "async-trait" -version = "0.1.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" - -[[package]] -name = "indexmap" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "pin-project-lite" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" - -[[package]] -name = "proc-macro2" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quote" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "serde" -version = "1.0.136" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.136" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "smithy-rs-tool-common" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "serde", - "tokio", - "toml", - "tracing", -] - -[[package]] -name = "syn" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "tokio" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" -dependencies = [ - "pin-project-lite", - "tokio-macros", -] - -[[package]] -name = "tokio-macros" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "toml" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" -dependencies = [ - "indexmap", - "serde", -] - -[[package]] -name = "tracing" -version = "0.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" From 8911e86515ca8703bc24642ecb5e7be4406f1bee Mon Sep 17 00:00:00 2001 From: Harry Barber <106155934+hlbarber@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:38:15 +0100 Subject: [PATCH 35/49] Make unitTest accept a closure using RustWriter (#1450) * Make `unitTest` take `RustWriter.() -> Unit` * Convert `unitTests` which use dependencies to use `unitTest` with `RustWriter.() -> Unit` --- .../EndpointConfigCustomizationTest.kt | 74 ++++++++++--------- .../smithy/rust/codegen/testutil/Rust.kt | 12 +++ 2 files changed, 50 insertions(+), 36 deletions(-) diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt index 60bf730cc33..6c6968eee0f 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt @@ -8,6 +8,8 @@ package software.amazon.smithy.rustsdk import org.junit.jupiter.api.Test import software.amazon.smithy.model.node.ObjectNode import software.amazon.smithy.rust.codegen.rustlang.CargoDependency +import software.amazon.smithy.rust.codegen.rustlang.asType +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.smithy.CodegenContext import software.amazon.smithy.rust.codegen.smithy.CodegenVisitor import software.amazon.smithy.rust.codegen.smithy.RustCrate @@ -24,6 +26,10 @@ import software.amazon.smithy.rust.codegen.testutil.unitTest import software.amazon.smithy.rust.codegen.util.runCommand internal class EndpointConfigCustomizationTest { + private val codegenScope = arrayOf( + "http" to CargoDependency.Http.asType(), + "aws_types" to awsTypes(AwsTestRuntimeConfig).asType() + ) private val model = """ namespace test @@ -163,21 +169,19 @@ internal class EndpointConfigCustomizationTest { fun `support region-specific endpoint overrides`() { validateEndpointCustomizationForService("test#TestService") { crate -> crate.lib { - it.addDependency(awsTypes(AwsTestRuntimeConfig)) - it.addDependency(CargoDependency.Http) - it.unitTest( - "region_override", - """ - use aws_types::region::Region; - use http::Uri; - let conf = crate::config::Config::builder().build(); - let endpoint = conf.endpoint_resolver - .resolve_endpoint(&Region::new("fips-ca-central-1")).expect("default resolver produces a valid endpoint"); - let mut uri = Uri::from_static("/?k=v"); - endpoint.set_endpoint(&mut uri, None); - assert_eq!(uri, Uri::from_static("https://access-analyzer-fips.ca-central-1.amazonaws.com/?k=v")); - """ - ) + it.unitTest("region_override") { + rustTemplate( + """ + let conf = crate::config::Config::builder().build(); + let endpoint = conf.endpoint_resolver + .resolve_endpoint(&#{aws_types}::region::Region::new("fips-ca-central-1")).expect("default resolver produces a valid endpoint"); + let mut uri = #{http}::Uri::from_static("/?k=v"); + endpoint.set_endpoint(&mut uri, None); + assert_eq!(uri, #{http}::Uri::from_static("https://access-analyzer-fips.ca-central-1.amazonaws.com/?k=v")); + """, + *codegenScope + ) + } } } } @@ -186,27 +190,25 @@ internal class EndpointConfigCustomizationTest { fun `support region-agnostic services`() { validateEndpointCustomizationForService("test#NoRegions") { crate -> crate.lib { - it.addDependency(awsTypes(AwsTestRuntimeConfig)) - it.addDependency(CargoDependency.Http) - it.unitTest( - "global_services", - """ - use aws_types::region::Region; - use http::Uri; - let conf = crate::config::Config::builder().build(); - let endpoint = conf.endpoint_resolver - .resolve_endpoint(&Region::new("us-east-1")).expect("default resolver produces a valid endpoint"); - let mut uri = Uri::from_static("/?k=v"); - endpoint.set_endpoint(&mut uri, None); - assert_eq!(uri, Uri::from_static("https://iam.amazonaws.com/?k=v")); - - let endpoint = conf.endpoint_resolver - .resolve_endpoint(&Region::new("iam-fips")).expect("default resolver produces a valid endpoint"); - let mut uri = Uri::from_static("/?k=v"); - endpoint.set_endpoint(&mut uri, None); - assert_eq!(uri, Uri::from_static("https://iam-fips.amazonaws.com/?k=v")); - """ - ) + it.unitTest("global_services") { + rustTemplate( + """ + let conf = crate::config::Config::builder().build(); + let endpoint = conf.endpoint_resolver + .resolve_endpoint(&#{aws_types}::region::Region::new("us-east-1")).expect("default resolver produces a valid endpoint"); + let mut uri = #{http}::Uri::from_static("/?k=v"); + endpoint.set_endpoint(&mut uri, None); + assert_eq!(uri, #{http}::Uri::from_static("https://iam.amazonaws.com/?k=v")); + + let endpoint = conf.endpoint_resolver + .resolve_endpoint(&#{aws_types}::region::Region::new("iam-fips")).expect("default resolver produces a valid endpoint"); + let mut uri = #{http}::Uri::from_static("/?k=v"); + endpoint.set_endpoint(&mut uri, None); + assert_eq!(uri, #{http}::Uri::from_static("https://iam-fips.amazonaws.com/?k=v")); + """, + *codegenScope + ) + } } } } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt index e27cc75cb29..f1196798284 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt @@ -171,6 +171,18 @@ fun RustWriter.unitTest( } } +/* + * Writes a Rust-style unit test + */ +fun RustWriter.unitTest( + name: String, + vararg args: Any, + block: RustWriter.() -> Unit +): RustWriter { + raw("#[test]") + return rustBlock("fn $name()", *args, block = block) +} + /** * WriterDelegator used for test purposes * From 8e84ee2eff00f653b6339bde572c98b28d1b1fb5 Mon Sep 17 00:00:00 2001 From: Matteo Bigoi <1781140+crisidev@users.noreply.github.com> Date: Tue, 14 Jun 2022 17:16:35 +0100 Subject: [PATCH 36/49] Codegenerate StructureShape, BlobShape, application, server and Python runtime (#1403) We are introducing code-generation for Python bindings of StructureShape, BlobShape, EnumShape, OperationShape. This PR also add a runtime server implementation to support serving Python business logic directly and with an idiomatic experience. Co-authored-by: david-perez --- codegen-server-test/python/build.gradle.kts | 9 +- ...Plugin.kt => PythonCodegenServerPlugin.kt} | 21 +- .../smithy/PythonServerCargoDependency.kt | 29 +++ .../smithy/PythonServerCodegenVisitor.kt | 131 +++++++++++ .../python/smithy/PythonServerRuntimeType.kt | 26 +++ .../smithy/PythonServerSymbolProvider.kt | 44 ++++ .../PythonServerCodegenDecorator.kt | 88 ++++++++ .../generators/PythonApplicationGenerator.kt | 151 +++++++++++++ .../generators/PythonServerAttributeUtils.kt | 43 ++++ .../PythonServerCombinedErrorGenerator.kt | 47 ++++ .../generators/PythonServerEnumGenerator.kt | 57 +++++ .../PythonServerOperationHandlerGenerator.kt | 152 +++++++++++++ .../PythonServerServiceGenerator.kt | 46 ++++ .../PythonServerStructureGenerator.kt | 85 +++++++ ...ware.amazon.smithy.build.SmithyBuildPlugin | 2 +- ...egen.smithy.customize.RustCodegenDecorator | 6 + .../server/smithy/ServerCodegenVisitor.kt | 25 +- .../AdditionalErrorsDecorator.kt | 22 +- .../ServerCombinedErrorGenerator.kt | 6 +- .../smithy/generators/ServerEnumGenerator.kt | 6 +- .../ServerOperationHandlerGenerator.kt | 4 +- .../generators/ServerServiceGenerator.kt | 35 ++- .../ServerHttpBoundProtocolGenerator.kt | 15 +- .../AdditionalErrorsDecoratorTest.kt | 8 +- .../smithy/generators/EnumGenerator.kt | 2 +- .../smithy/generators/StructureGenerator.kt | 24 +- .../generators/http/HttpBindingGenerator.kt | 2 +- .../aws-smithy-http-server-python/Cargo.toml | 14 +- .../src/error.rs | 22 ++ .../aws-smithy-http-server-python/src/lib.rs | 23 ++ .../src/logging.rs | 17 +- .../src/server.rs | 213 ++++++++++++++++++ .../src/socket.rs | 8 + .../src/state.rs | 47 ++++ .../src/types.rs | 100 ++++++++ .../src/routing/into_make_service.rs | 2 +- .../aws-smithy-http-server/src/routing/mod.rs | 3 +- 37 files changed, 1436 insertions(+), 99 deletions(-) rename codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/{RustCodegenServerPlugin.kt => PythonCodegenServerPlugin.kt} (80%) create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCargoDependency.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerRuntimeType.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerSymbolProvider.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerAttributeUtils.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerCombinedErrorGenerator.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerServiceGenerator.kt create mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt create mode 100644 codegen-server/python/src/main/resources/META-INF/services/software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator create mode 100644 rust-runtime/aws-smithy-http-server-python/src/error.rs create mode 100644 rust-runtime/aws-smithy-http-server-python/src/server.rs create mode 100644 rust-runtime/aws-smithy-http-server-python/src/state.rs create mode 100644 rust-runtime/aws-smithy-http-server-python/src/types.rs diff --git a/codegen-server-test/python/build.gradle.kts b/codegen-server-test/python/build.gradle.kts index 9bc81a5f247..51d7971a82b 100644 --- a/codegen-server-test/python/build.gradle.kts +++ b/codegen-server-test/python/build.gradle.kts @@ -16,7 +16,7 @@ val defaultRustFlags: String by project val defaultRustDocFlags: String by project val properties = PropertyRetriever(rootProject, project) -val pluginName = "rust-server-codegen" +val pluginName = "rust-server-codegen-python" val workingDirUnderBuildDir = "smithyprojections/codegen-server-test-python/" configure { @@ -39,13 +39,6 @@ dependencies { val allCodegenTests = listOf( CodegenTest("com.amazonaws.simple#SimpleService", "simple"), - CodegenTest("aws.protocoltests.restjson#RestJson", "rest_json"), - CodegenTest("aws.protocoltests.restjson.validation#RestJsonValidation", "rest_json_validation"), - CodegenTest("aws.protocoltests.json10#JsonRpc10", "json_rpc10"), - CodegenTest("aws.protocoltests.json#JsonProtocol", "json_rpc11"), - CodegenTest("aws.protocoltests.misc#MiscService", "misc"), - CodegenTest("com.amazonaws.ebs#Ebs", "ebs"), - CodegenTest("com.amazonaws.s3#AmazonS3", "s3"), CodegenTest("com.aws.example#PokemonService", "pokemon_service_sdk") ) diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/RustCodegenServerPlugin.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonCodegenServerPlugin.kt similarity index 80% rename from codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/RustCodegenServerPlugin.kt rename to codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonCodegenServerPlugin.kt index 1bd6ac5405b..58bbc744829 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/RustCodegenServerPlugin.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonCodegenServerPlugin.kt @@ -11,7 +11,6 @@ import software.amazon.smithy.codegen.core.ReservedWordSymbolProvider import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.rust.codegen.rustlang.RustReservedWordSymbolProvider -import software.amazon.smithy.rust.codegen.server.smithy.ServerCodegenVisitor import software.amazon.smithy.rust.codegen.smithy.BaseSymbolMetadataProvider import software.amazon.smithy.rust.codegen.smithy.DefaultConfig import software.amazon.smithy.rust.codegen.smithy.EventStreamSymbolProvider @@ -23,12 +22,13 @@ import software.amazon.smithy.rust.codegen.smithy.customize.CombinedCodegenDecor import java.util.logging.Level import java.util.logging.Logger -/** Rust with Python bindings Codegen Plugin. - * This is the entrypoint for code generation, triggered by the smithy-build plugin. - * `resources/META-INF.services/software.amazon.smithy.build.SmithyBuildPlugin` refers to this class by name which - * enables the smithy-build plugin to invoke `execute` with all of the Smithy plugin context + models. +/** + * Rust with Python bindings Codegen Plugin. + * This is the entrypoint for code generation, triggered by the smithy-build plugin. + * `resources/META-INF.services/software.amazon.smithy.build.SmithyBuildPlugin` refers to this class by name which + * enables the smithy-build plugin to invoke `execute` with all of the Smithy plugin context + models. */ -class RustCodegenServerPlugin : SmithyBuildPlugin { +class PythonCodegenServerPlugin : SmithyBuildPlugin { private val logger = Logger.getLogger(javaClass.name) override fun getName(): String = "rust-server-codegen-python" @@ -43,9 +43,9 @@ class RustCodegenServerPlugin : SmithyBuildPlugin { // - writer: The active RustWriter at the given location val codegenDecorator = CombinedCodegenDecorator.fromClasspath(context) - // ServerCodegenVisitor is the main driver of code generation that traverses the model and generates code - logger.info("Loaded plugin to generate Rust/Python bindings for the server SSDK") - ServerCodegenVisitor(context, codegenDecorator).execute() + // PythonServerCodegenVisitor is the main driver of code generation that traverses the model and generates code + logger.info("Loaded plugin to generate Rust/Python bindings for the server SSDK for projection ${context.projectionName}") + PythonServerCodegenVisitor(context, codegenDecorator).execute() } companion object { @@ -61,6 +61,9 @@ class RustCodegenServerPlugin : SmithyBuildPlugin { symbolVisitorConfig: SymbolVisitorConfig = DefaultConfig ) = SymbolVisitor(model, serviceShape = serviceShape, config = symbolVisitorConfig) + // Rename a set of symbols that do not implement `PyClass` and have been wrapped in + // `aws_smithy_http_server_python::types`. + .let { PythonServerSymbolProvider(it) } // Generate different types for EventStream shapes (e.g. transcribe streaming) .let { EventStreamSymbolProvider(symbolVisitorConfig.runtimeConfig, it, model) diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCargoDependency.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCargoDependency.kt new file mode 100644 index 00000000000..65c90262d31 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCargoDependency.kt @@ -0,0 +1,29 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy + +import software.amazon.smithy.rust.codegen.rustlang.CargoDependency +import software.amazon.smithy.rust.codegen.rustlang.CratesIo +import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig + +/** + * Object used *exclusively* in the runtime of the Python server, for separation concerns. + * Analogous to the companion object in [CargoDependency] and [ServerCargoDependency]; see its documentation for details. + * For a dependency that is used in the client, or in both the client and the server, use [CargoDependency] directly. + */ +object PythonServerCargoDependency { + val PyO3: CargoDependency = CargoDependency("pyo3", CratesIo("0.16"), features = setOf("extension-module")) + val PyO3Asyncio: CargoDependency = CargoDependency("pyo3-asyncio", CratesIo("0.16"), features = setOf("attributes", "tokio-runtime")) + val Tokio: CargoDependency = CargoDependency("tokio", CratesIo("1.0"), features = setOf("full")) + val Tracing: CargoDependency = CargoDependency("tracing", CratesIo("0.1")) + val Tower: CargoDependency = CargoDependency("tower", CratesIo("0.4")) + val TowerHttp: CargoDependency = CargoDependency("tower-http", CratesIo("0.3"), features = setOf("trace")) + val Hyper: CargoDependency = CargoDependency("hyper", CratesIo("0.14"), features = setOf("server", "http1", "http2", "tcp", "stream")) + val NumCpus: CargoDependency = CargoDependency("num_cpus", CratesIo("1.13")) + + fun SmithyHttpServer(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("http-server") + fun SmithyHttpServerPython(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("http-server-python") +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt new file mode 100644 index 00000000000..9e8679e5a9f --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt @@ -0,0 +1,131 @@ + +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy + +import software.amazon.smithy.build.PluginContext +import software.amazon.smithy.model.shapes.ServiceShape +import software.amazon.smithy.model.shapes.StringShape +import software.amazon.smithy.model.shapes.StructureShape +import software.amazon.smithy.model.traits.EnumTrait +import software.amazon.smithy.rust.codegen.server.python.smithy.generators.PythonServerEnumGenerator +import software.amazon.smithy.rust.codegen.server.python.smithy.generators.PythonServerServiceGenerator +import software.amazon.smithy.rust.codegen.server.python.smithy.generators.PythonServerStructureGenerator +import software.amazon.smithy.rust.codegen.server.smithy.ServerCodegenVisitor +import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerProtocolLoader +import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.DefaultPublicModules +import software.amazon.smithy.rust.codegen.smithy.RustCrate +import software.amazon.smithy.rust.codegen.smithy.SymbolVisitorConfig +import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator +import software.amazon.smithy.rust.codegen.smithy.generators.BuilderGenerator +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget +import software.amazon.smithy.rust.codegen.smithy.generators.implBlock +import software.amazon.smithy.rust.codegen.util.getTrait + +/** + * Entrypoint for Python server-side code generation. This class will walk the in-memory model and + * generate all the needed types by calling the accept() function on the available shapes. + * + * This class inherits from [ServerCodegenVisitor] since it uses most of the functionlities of the super class + * and have to override the symbol provider with [PythonServerSymbolProvider]. + */ +class PythonServerCodegenVisitor(context: PluginContext, codegenDecorator: RustCodegenDecorator) : + ServerCodegenVisitor(context, codegenDecorator) { + + init { + val symbolVisitorConfig = + SymbolVisitorConfig( + runtimeConfig = settings.runtimeConfig, + codegenConfig = settings.codegenConfig, + handleRequired = true + ) + val baseModel = baselineTransform(context.model) + val service = settings.getService(baseModel) + val (protocol, generator) = + ServerProtocolLoader( + codegenDecorator.protocols( + service.id, + ServerProtocolLoader.DefaultProtocols + ) + ) + .protocolFor(context.model, service) + protocolGeneratorFactory = generator + model = generator.transformModel(codegenDecorator.transformModel(service, baseModel)) + val baseProvider = PythonCodegenServerPlugin.baseSymbolProvider(model, service, symbolVisitorConfig) + // Override symbolProvider. + symbolProvider = + codegenDecorator.symbolProvider(generator.symbolProvider(model, baseProvider)) + + // Override `codegenContext` which carries the symbolProvider. + codegenContext = CodegenContext(model, symbolProvider, service, protocol, settings, target = CodegenTarget.SERVER) + + // Override `rustCrate` which carries the symbolProvider. + rustCrate = RustCrate(context.fileManifest, symbolProvider, DefaultPublicModules, settings.codegenConfig) + // Override `protocolGenerator` which carries the symbolProvider. + protocolGenerator = protocolGeneratorFactory.buildProtocolGenerator(codegenContext) + } + + /** + * Structure Shape Visitor + * + * For each structure shape, generate: + * - A Rust structure for the shape ([StructureGenerator]). + * - `pyo3::PyClass` trait implementation. + * - A builder for the shape. + * + * This function _does not_ generate any serializers. + */ + override fun structureShape(shape: StructureShape) { + logger.info("[python-server-codegen] Generating a structure $shape") + rustCrate.useShapeWriter(shape) { writer -> + // Use Python specific structure generator that adds the #[pyclass] attribute + // and #[pymethods] implementation. + PythonServerStructureGenerator(model, symbolProvider, writer, shape).render(CodegenTarget.SERVER) + val builderGenerator = + BuilderGenerator(codegenContext.model, codegenContext.symbolProvider, shape) + builderGenerator.render(writer) + writer.implBlock(shape, symbolProvider) { + builderGenerator.renderConvenienceMethod(this) + } + } + } + + /** + * String Shape Visitor + * + * Although raw strings require no code generation, enums are actually [EnumTrait] applied to string shapes. + */ + override fun stringShape(shape: StringShape) { + logger.info("[rust-server-codegen] Generating an enum $shape") + shape.getTrait()?.also { enum -> + rustCrate.useShapeWriter(shape) { writer -> + PythonServerEnumGenerator(model, symbolProvider, writer, shape, enum, codegenContext.runtimeConfig).render() + } + } + } + + /** + * Generate service-specific code for the model: + * - Serializers + * - Deserializers + * - Trait implementations + * - Protocol tests + * - Operation structures + * - Python operation handlers + */ + override fun serviceShape(shape: ServiceShape) { + logger.info("[python-server-codegen] Generating a service $shape") + PythonServerServiceGenerator( + rustCrate, + protocolGenerator, + protocolGeneratorFactory.support(), + protocolGeneratorFactory.protocol(codegenContext).httpBindingResolver, + codegenContext, + ) + .render() + } +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerRuntimeType.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerRuntimeType.kt new file mode 100644 index 00000000000..0e87af702f1 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerRuntimeType.kt @@ -0,0 +1,26 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy + +import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig +import software.amazon.smithy.rust.codegen.smithy.RuntimeType + +/** + * Object used *exclusively* in the runtime of the Python server, for separation concerns. + * Analogous to the companion object in [RuntimeType] and [ServerRuntimeType]; see its documentation for details. + * For a runtime type that is used in the client, or in both the client and the server, use [RuntimeType] directly. + */ +object PythonServerRuntimeType { + + fun SharedSocket(runtimeConfig: RuntimeConfig) = + RuntimeType("SharedSocket", PythonServerCargoDependency.SmithyHttpServerPython(runtimeConfig), "${runtimeConfig.crateSrcPrefix}_http_server_python") + + fun Blob(runtimeConfig: RuntimeConfig) = + RuntimeType("Blob", PythonServerCargoDependency.SmithyHttpServerPython(runtimeConfig), "${runtimeConfig.crateSrcPrefix}_http_server_python::types") + + fun PyError(runtimeConfig: RuntimeConfig) = + RuntimeType("Error", PythonServerCargoDependency.SmithyHttpServerPython(runtimeConfig), "${runtimeConfig.crateSrcPrefix}_http_server_python") +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerSymbolProvider.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerSymbolProvider.kt new file mode 100644 index 00000000000..4dc949958bf --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerSymbolProvider.kt @@ -0,0 +1,44 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy + +import software.amazon.smithy.codegen.core.Symbol +import software.amazon.smithy.model.shapes.Shape +import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.WrappingSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.rustType + +/** + * Input / output / error structures can refer to complex types like the ones implemented inside + * `aws_smithy_types` (a good example is `aws_smithy_types::Blob`). + * `aws_smithy_http_server_python::types` wraps those types that do not implement directly the + * `pyo3::PyClass` trait and cannot be shared safely with Python, providing an idiomatic Python / Rust API. + * + * This symbol provider ensures types not implementing `pyo3::PyClass` are swapped with their wrappers from + * `aws_smithy_http_server_python::types`. + */ +class PythonServerSymbolProvider(private val base: RustSymbolProvider) : + WrappingSymbolProvider(base) { + + private val runtimeConfig = config().runtimeConfig + + /** + * Convert a shape to a Symbol. + * + * Swap the shape's symbol if its associated type does not implement `pyo3::PyClass`. + */ + override fun toSymbol(shape: Shape): Symbol { + return when (base.toSymbol(shape).rustType()) { + RuntimeType.Blob(runtimeConfig).toSymbol().rustType() -> { + PythonServerRuntimeType.Blob(runtimeConfig).toSymbol() + } + else -> { + base.toSymbol(shape) + } + } + } +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt new file mode 100644 index 00000000000..be3c3b9b8a1 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt @@ -0,0 +1,88 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy.customizations + +import software.amazon.smithy.rust.codegen.rustlang.Writable +import software.amazon.smithy.rust.codegen.rustlang.docs +import software.amazon.smithy.rust.codegen.rustlang.rust +import software.amazon.smithy.rust.codegen.rustlang.rustBlock +import software.amazon.smithy.rust.codegen.rustlang.writable +import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerRuntimeType +import software.amazon.smithy.rust.codegen.server.smithy.customizations.AddInternalServerErrorToAllOperationsDecorator +import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig +import software.amazon.smithy.rust.codegen.smithy.customize.CombinedCodegenDecorator +import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator +import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization +import software.amazon.smithy.rust.codegen.smithy.generators.LibRsSection +import software.amazon.smithy.rust.codegen.smithy.generators.ManifestCustomizations + +/** + * Configure the [lib] section of `Cargo.toml`. + * + * [lib] + * name = "$CRATE_NAME" + * crate-type = ["cdylib"] + */ +class CdylibManifestDecorator : RustCodegenDecorator { + override val name: String = "CdylibDecorator" + override val order: Byte = 0 + + override fun crateManifestCustomizations( + codegenContext: CodegenContext + ): ManifestCustomizations = + mapOf("lib" to mapOf("name" to codegenContext.settings.moduleName, "crate-type" to listOf("cdylib"))) +} + +/** + * Add `pub use aws_smithy_http_server_python::types::$TYPE` to lib.rs. + */ +class PubUsePythonTypes(private val runtimeConfig: RuntimeConfig) : LibRsCustomization() { + override fun section(section: LibRsSection): Writable { + return when (section) { + is LibRsSection.Body -> writable { + docs("Re-exported Python types from supporting crates.") + rustBlock("pub mod python_types") { + rust("pub use #T;", PythonServerRuntimeType.Blob(runtimeConfig).toSymbol()) + } + } + else -> emptySection + } + } +} + +/** + * Decorator applying the customization from [PubUsePythonTypes] class. + */ +class PubUsePythonTypesDecorator : RustCodegenDecorator { + override val name: String = "PubUsePythonTypesDecorator" + override val order: Byte = 0 + + override fun libRsCustomizations( + codegenContext: CodegenContext, + baseCustomizations: List + ): List { + return baseCustomizations + PubUsePythonTypes(codegenContext.runtimeConfig) + } +} + +val DECORATORS = listOf( + /** + * Add the [InternalServerError] error to all operations. + * This is done because the Python interpreter can raise exceptions during execution + */ + AddInternalServerErrorToAllOperationsDecorator(), + // Add the [lib] section to Cargo.toml to configure the generation of the shared library: + CdylibManifestDecorator(), + // Add `pub use` of `aws_smithy_http_server_python::types`. + PubUsePythonTypesDecorator() +) + +// Combined codegen decorator for Python services. +class PythonServerCodegenDecorator : CombinedCodegenDecorator(DECORATORS) { + override val name: String = "PythonServerCodegenDecorator" + override val order: Byte = -1 +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt new file mode 100644 index 00000000000..641e930abad --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt @@ -0,0 +1,151 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy.generators + +import software.amazon.smithy.model.shapes.OperationShape +import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.asType +import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency +import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency +import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.util.toSnakeCase + +/** + * Generates a Python compatible application and server that can be configured from Python. + * + * Example: + * from pool import DatabasePool + * from my_library import App, OperationInput, OperationOutput + + * @dataclass + * class Context: + * db = DatabasePool() + * + * app = App() + * app.context(Context()) + * + * @app.operation + * def operation(input: OperationInput, ctx: State) -> OperationOutput: + * description = await ctx.db.get_description(input.name) + * return OperationOutput(description) + * + * app.run() + * + * The application holds a mapping between operation names (lowercase, snakecase), + * the context as defined in Python and some task local with the Python event loop + * for the current process. + * + * The application exposes several methods to Python: + * * `App()`: constructor to create an instance of `App`. + * * `run()`: run the application on a number of workers. + * * `context()`: register the context object that is passed to the Python handlers. + * * One register method per operation that can be used as decorator. For example if + * the model has one operation called `RegisterServer`, it will codegenerate a method + * of `App` called `register_service()` that can be used to decorate the Python implementation + * of this operation. + * + * This class also renders the implementation of the `aws_smity_http_server_python::PyServer` trait, + * that abstracts the processes / event loops / workers lifecycles. + */ +class PythonApplicationGenerator( + codegenContext: CodegenContext, + private val operations: List, +) { + private val symbolProvider = codegenContext.symbolProvider + private val runtimeConfig = codegenContext.runtimeConfig + private val codegenScope = + arrayOf( + "SmithyPython" to PythonServerCargoDependency.SmithyHttpServerPython(runtimeConfig).asType(), + "SmithyServer" to ServerCargoDependency.SmithyHttpServer(runtimeConfig).asType(), + "pyo3" to PythonServerCargoDependency.PyO3.asType(), + "pyo3_asyncio" to PythonServerCargoDependency.PyO3Asyncio.asType(), + "tokio" to PythonServerCargoDependency.Tokio.asType(), + "tracing" to PythonServerCargoDependency.Tracing.asType(), + "tower" to PythonServerCargoDependency.Tower.asType(), + "tower_http" to PythonServerCargoDependency.TowerHttp.asType(), + "num_cpus" to PythonServerCargoDependency.NumCpus.asType(), + "hyper" to PythonServerCargoDependency.Hyper.asType() + ) + + fun render(writer: RustWriter) { + writer.rustTemplate( + """ + ##[#{pyo3}::pyclass(extends = #{SmithyPython}::PyApp)] + ##[derive(Debug, Clone)] + pub struct App { } + """, + *codegenScope + ) + + renderPyMethods(writer) + } + + private fun renderPyMethods(writer: RustWriter) { + writer.rustBlockTemplate( + """ + ##[#{pyo3}::pymethods] + impl App + """, + *codegenScope + ) { + rustBlockTemplate( + """ + /// Override the `router()` function of #{SmithyPython}::PyApp allowing to dynamically + /// codegenerate the routes. + pub fn router(self_: #{pyo3}::PyRef<'_, Self>) -> Option<#{pyo3}::PyObject> + """, + *codegenScope + ) { + rustTemplate( + """ + let router = crate::operation_registry::OperationRegistryBuilder::default(); + let sup = self_.as_ref(); + """, + *codegenScope + ) + for (operation in operations) { + val operationName = symbolProvider.toSymbol(operation).name + val name = operationName.toSnakeCase() + rustTemplate( + """ + let locals = sup.locals.clone(); + let handler = sup.handlers.get("$name").expect("Python handler for `{$name}` not found").clone(); + let router = router.$name(move |input, state| { + #{pyo3_asyncio}::tokio::scope(locals.clone(), crate::operation_handler::$name(input, state, handler)) + }); + """, + *codegenScope + ) + } + rustTemplate( + """ + let router: #{SmithyServer}::Router = router.build().expect("Unable to build operation registry").into(); + use #{pyo3}::IntoPy; + Some(#{SmithyPython}::PyRouter(router).into_py(self_.py())) + """, + *codegenScope + ) + } + operations.map { operation -> + val operationName = symbolProvider.toSymbol(operation).name + val name = operationName.toSnakeCase() + rustTemplate( + """ + /// Method to register `$name` Python implementation inside the handlers map. + /// It can be used as a function decorator in Python. + pub fn $name(self_: #{pyo3}::PyRefMut<'_, Self>, func: #{pyo3}::PyObject) -> #{pyo3}::PyResult<()> { + let mut sup = self_.into_super(); + #{pyo3}::Python::with_gil(|py| sup.register_operation(py, "$name", func)) + } + """, + *codegenScope + ) + } + } + } +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerAttributeUtils.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerAttributeUtils.kt new file mode 100644 index 00000000000..f65eb27d104 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerAttributeUtils.kt @@ -0,0 +1,43 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy.generators + +import software.amazon.smithy.model.shapes.Shape +import software.amazon.smithy.model.traits.ErrorTrait +import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.asType +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency +import software.amazon.smithy.rust.codegen.util.hasTrait + +/** + * This module contains utilities to render PyO3 attributes. + * + * TODO(https://github.com/awslabs/smithy-rs/issues/1465): Switch to `Attribute.Custom` and get rid of this class. + */ + +private val codegenScope = arrayOf( + "pyo3" to PythonServerCargoDependency.PyO3.asType(), +) + +// Renders #[pyo3::pyclass] attribute, inheriting from `Exception` if the shape has the `ErrorTrait` attached. +fun RustWriter.renderPyClass(shape: Shape) { + if (shape.hasTrait()) { + rustTemplate("##[#{pyo3}::pyclass(extends = #{pyo3}::exceptions::PyException)]", *codegenScope) + } else { + rustTemplate("##[#{pyo3}::pyclass]", *codegenScope) + } +} + +// Renders #[pyo3::pymethods] attribute. +fun RustWriter.renderPyMethods() { + rustTemplate("##[#{pyo3}::pymethods]", *codegenScope) +} + +// Renders #[pyo3(get, set)] attribute. +fun RustWriter.renderPyGetterSetter() { + rustTemplate("##[#{pyo3}(get, set)]", *codegenScope) +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerCombinedErrorGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerCombinedErrorGenerator.kt new file mode 100644 index 00000000000..076af071375 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerCombinedErrorGenerator.kt @@ -0,0 +1,47 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy.generators + +import software.amazon.smithy.model.Model +import software.amazon.smithy.model.shapes.OperationShape +import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.asType +import software.amazon.smithy.rust.codegen.rustlang.rust +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency +import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerCombinedErrorGenerator +import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.generators.error.errorSymbol + +/** + * Generates a unified error enum for [operation]. It depends on [ServerCombinedErrorGenerator] + * to generate the errors from the model and adds the Rust implementation `From`. + */ +class PythonServerCombinedErrorGenerator( + model: Model, + private val symbolProvider: RustSymbolProvider, + private val operation: OperationShape +) : ServerCombinedErrorGenerator(model, symbolProvider, operation) { + + override fun render(writer: RustWriter) { + super.render(writer) + writer.rustTemplate( + """ + impl #{From}<#{pyo3}::PyErr> for #{Error} { + fn from(variant: #{pyo3}::PyErr) -> #{Error} { + crate::error::InternalServerError { + message: variant.to_string() + }.into() + } + } + """, + "pyo3" to PythonServerCargoDependency.PyO3.asType(), + "Error" to operation.errorSymbol(symbolProvider), + "From" to RuntimeType.From + ) + } +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt new file mode 100644 index 00000000000..4cb1708a777 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt @@ -0,0 +1,57 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy.generators + +import software.amazon.smithy.model.Model +import software.amazon.smithy.model.shapes.StringShape +import software.amazon.smithy.model.traits.EnumTrait +import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.rust +import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerEnumGenerator +import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig +import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider + +/** + * To share enums defined in Rust with Python, `pyo3` provides the `PyClass` trait. + * This class generates enums definitions, implements the `PyClass` trait and adds + * some utility functions like `__str__()` and `__repr__()`. + */ +class PythonServerEnumGenerator( + model: Model, + symbolProvider: RustSymbolProvider, + private val writer: RustWriter, + private val shape: StringShape, + enumTrait: EnumTrait, + runtimeConfig: RuntimeConfig, +) : ServerEnumGenerator(model, symbolProvider, writer, shape, enumTrait, runtimeConfig) { + + override fun render() { + writer.renderPyClass(shape) + super.render() + renderPyO3Methods() + } + + override fun renderFromForStr() { + writer.renderPyClass(shape) + super.renderFromForStr() + } + + private fun renderPyO3Methods() { + writer.renderPyMethods() + writer.rust( + """ + impl $enumName { + fn __repr__(&self) -> String { + self.as_str().to_owned() + } + fn __str__(&self) -> String { + self.as_str().to_owned() + } + } + """ + ) + } +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt new file mode 100644 index 00000000000..17dea610b66 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt @@ -0,0 +1,152 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy.generators + +import software.amazon.smithy.model.shapes.OperationShape +import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Writable +import software.amazon.smithy.rust.codegen.rustlang.asType +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.rustlang.writable +import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency +import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency +import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerOperationHandlerGenerator +import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.util.toSnakeCase + +/** + * The Rust code responsible to run the Python business logic on the Python interpreter + * is implemented in this class, which inherits from [ServerOperationHandlerGenerator]. + * + * We codegenerate all operations handlers (steps usually left to the developer in a pure + * Rust application), which are built into a `Router` by [PythonApplicationGenerator]. + * + * To call a Python function from Rust, anything dealing with Python runs inside an async + * block that allows to catch stacktraces. The handler function is extracted from `PyHandler` + * and called with the necessary arguments inside a blocking Tokio task. + * At the end the block is awaited and errors are collected and reported. + * + * To call a Python coroutine, the same happens, but scheduled in a `tokio::Future`. + */ +class PythonServerOperationHandlerGenerator( + codegenContext: CodegenContext, + private val operations: List, +) : ServerOperationHandlerGenerator(codegenContext, operations) { + private val symbolProvider = codegenContext.symbolProvider + private val runtimeConfig = codegenContext.runtimeConfig + private val codegenScope = + arrayOf( + "SmithyPython" to PythonServerCargoDependency.SmithyHttpServerPython(runtimeConfig).asType(), + "SmithyServer" to ServerCargoDependency.SmithyHttpServer(runtimeConfig).asType(), + "pyo3" to PythonServerCargoDependency.PyO3.asType(), + "pyo3asyncio" to PythonServerCargoDependency.PyO3Asyncio.asType(), + "tokio" to PythonServerCargoDependency.Tokio.asType(), + "tracing" to PythonServerCargoDependency.Tracing.asType() + ) + + override fun render(writer: RustWriter) { + super.render(writer) + renderPythonOperationHandlerImpl(writer) + } + + private fun renderPythonOperationHandlerImpl(writer: RustWriter) { + for (operation in operations) { + val operationName = symbolProvider.toSymbol(operation).name + val input = "crate::input::${operationName}Input" + val output = "crate::output::${operationName}Output" + val error = "crate::error::${operationName}Error" + val fnName = operationName.toSnakeCase() + + writer.rustTemplate( + """ + /// Python handler for operation `$operationName`. + pub async fn $fnName( + input: $input, + state: #{SmithyServer}::Extension<#{SmithyPython}::PyState>, + handler: std::sync::Arc<#{SmithyPython}::PyHandler>, + ) -> std::result::Result<$output, $error> { + // Async block used to run the handler and catch any Python error. + let result = async { + let handler = handler.clone(); + if handler.is_coroutine { + #{pycoroutine:W} + } else { + #{pyfunction:W} + } + }; + #{pyerror:W} + } + """, + *codegenScope, + "pycoroutine" to renderPyCoroutine(fnName, output), + "pyfunction" to renderPyFunction(fnName, output), + "pyerror" to renderPyError(), + ) + } + } + + private fun renderPyFunction(name: String, output: String): Writable = + writable { + rustTemplate( + """ + #{tracing}::debug!("Executing Python handler function `$name()`"); + #{tokio}::task::spawn_blocking(move || { + #{pyo3}::Python::with_gil(|py| { + let pyhandler: &#{pyo3}::types::PyFunction = handler.extract(py)?; + let output = if handler.args == 1 { + pyhandler.call1((input,))? + } else { + pyhandler.call1((input, &*state.0.context))? + }; + output.extract::<$output>() + }) + }) + .await.map_err(|e| #{pyo3}::exceptions::PyRuntimeError::new_err(e.to_string()))? + """, + *codegenScope + ) + } + + private fun renderPyCoroutine(name: String, output: String): Writable = + writable { + rustTemplate( + """ + #{tracing}::debug!("Executing Python handler coroutine `$name()`"); + let result = #{pyo3}::Python::with_gil(|py| { + let pyhandler: &#{pyo3}::types::PyFunction = handler.extract(py)?; + let coroutine = if handler.args == 1 { + pyhandler.call1((input,))? + } else { + pyhandler.call1((input, &*state.0.context))? + }; + #{pyo3asyncio}::tokio::into_future(coroutine) + })?; + result.await.map(|r| #{pyo3}::Python::with_gil(|py| r.extract::<$output>(py)))? + """, + *codegenScope + ) + } + + private fun renderPyError(): Writable = + writable { + rustTemplate( + """ + // Catch and record a Python traceback. + result.await.map_err(|e| { + #{pyo3}::Python::with_gil(|py| { + let traceback = match e.traceback(py) { + Some(t) => t.format().unwrap_or_else(|e| e.to_string()), + None => "Unknown traceback".to_string() + }; + #{tracing}::error!("{}\n{}", e, traceback); + }); + e.into() + }) + """, + *codegenScope + ) + } +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerServiceGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerServiceGenerator.kt new file mode 100644 index 00000000000..86835adb2a2 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerServiceGenerator.kt @@ -0,0 +1,46 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy.generators + +import software.amazon.smithy.model.shapes.OperationShape +import software.amazon.smithy.rust.codegen.rustlang.RustModule +import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerServiceGenerator +import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.RustCrate +import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolGenerator +import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport +import software.amazon.smithy.rust.codegen.smithy.protocols.HttpBindingResolver + +/** + * PythonServerServiceGenerator + * + * Service generator is the main codegeneration entry point for Smithy services. Individual structures and unions are + * generated in codegen visitor, but this class handles all protocol-specific code generation (i.e. operations). + */ +class PythonServerServiceGenerator( + private val rustCrate: RustCrate, + protocolGenerator: ProtocolGenerator, + protocolSupport: ProtocolSupport, + httpBindingResolver: HttpBindingResolver, + private val context: CodegenContext, +) : ServerServiceGenerator(rustCrate, protocolGenerator, protocolSupport, httpBindingResolver, context) { + + override fun renderCombinedErrors(writer: RustWriter, operation: OperationShape) { + PythonServerCombinedErrorGenerator(context.model, context.symbolProvider, operation).render(writer) + } + + override fun renderOperationHandler(writer: RustWriter, operations: List) { + PythonServerOperationHandlerGenerator(context, operations).render(writer) + } + + override fun renderExtras(operations: List) { + rustCrate.withModule(RustModule.public("python_server_application", "Python server and application implementation.")) { writer -> + PythonApplicationGenerator(context, operations) + .render(writer) + } + } +} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt new file mode 100644 index 00000000000..7c3b59d2e08 --- /dev/null +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt @@ -0,0 +1,85 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.python.smithy.generators + +import software.amazon.smithy.codegen.core.Symbol +import software.amazon.smithy.model.Model +import software.amazon.smithy.model.shapes.MemberShape +import software.amazon.smithy.model.shapes.StructureShape +import software.amazon.smithy.model.traits.ErrorTrait +import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.Writable +import software.amazon.smithy.rust.codegen.rustlang.render +import software.amazon.smithy.rust.codegen.rustlang.rust +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.rustlang.writable +import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator +import software.amazon.smithy.rust.codegen.smithy.rustType +import software.amazon.smithy.rust.codegen.util.hasTrait + +/** + * To share structures defined in Rust with Python, `pyo3` provides the `PyClass` trait. + * This class generates input / output / error structures definitions and implements the + * `PyClass` trait. + */ +open class PythonServerStructureGenerator( + model: Model, + private val symbolProvider: RustSymbolProvider, + private val writer: RustWriter, + private val shape: StructureShape +) : StructureGenerator(model, symbolProvider, writer, shape) { + + override fun renderStructure() { + writer.renderPyClass(shape) + super.renderStructure() + renderPyO3Methods() + } + + override fun renderStructureMember(writer: RustWriter, member: MemberShape, memberName: String, memberSymbol: Symbol) { + writer.renderPyGetterSetter() + super.renderStructureMember(writer, member, memberName, memberSymbol) + } + + private fun renderPyO3Methods() { + if (shape.hasTrait() || accessorMembers.isNotEmpty()) { + writer.renderPyMethods() + writer.rustTemplate( + """ + impl $name { + ##[new] + pub fn new(#{bodysignature:W}) -> Self { + Self { + #{bodymembers:W} + } + } + fn __repr__(&self) -> String { + format!("{self:?}") + } + fn __str__(&self) -> String { + format!("{self:?}") + } + } + """, + "bodysignature" to renderStructSignatureMembers(), + "bodymembers" to renderStructBodyMembers() + ) + } + } + + private fun renderStructSignatureMembers(): Writable = + writable { + forEachMember(members) { _, memberName, memberSymbol -> + val memberType = memberSymbol.rustType() + rust("$memberName: ${memberType.render()},") + } + } + + private fun renderStructBodyMembers(): Writable = + writable { + forEachMember(members) { _, memberName, _ -> rust("$memberName,") } + } +} diff --git a/codegen-server/python/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin b/codegen-server/python/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin index ea7c4546af8..6dc5b76c780 100644 --- a/codegen-server/python/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin +++ b/codegen-server/python/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin @@ -2,4 +2,4 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # -software.amazon.smithy.rust.codegen.server.python.smithy.RustCodegenServerPlugin +software.amazon.smithy.rust.codegen.server.python.smithy.PythonCodegenServerPlugin diff --git a/codegen-server/python/src/main/resources/META-INF/services/software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator b/codegen-server/python/src/main/resources/META-INF/services/software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator new file mode 100644 index 00000000000..13a1fd23750 --- /dev/null +++ b/codegen-server/python/src/main/resources/META-INF/services/software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator @@ -0,0 +1,6 @@ +# +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +# + +software.amazon.smithy.rust.codegen.server.python.smithy.customizations.PythonServerCodegenDecorator diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt index d9816f9ec19..ca1fb540af3 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt @@ -48,19 +48,20 @@ import java.util.logging.Logger * Entrypoint for server-side code generation. This class will walk the in-memory model and * generate all the needed types by calling the accept() function on the available shapes. */ -class ServerCodegenVisitor(context: PluginContext, private val codegenDecorator: RustCodegenDecorator) : +open class ServerCodegenVisitor(context: PluginContext, private val codegenDecorator: RustCodegenDecorator) : ShapeVisitor.Default() { - private val logger = Logger.getLogger(javaClass.name) - private val settings = ServerRustSettings.from(context.model, context.settings) - - private val symbolProvider: RustSymbolProvider - private val rustCrate: RustCrate private val fileManifest = context.fileManifest - private val model: Model - private val codegenContext: CodegenContext - private val protocolGeneratorFactory: ProtocolGeneratorFactory - private val protocolGenerator: ProtocolGenerator + + protected val logger = Logger.getLogger(javaClass.name) + protected val settings = ServerRustSettings.from(context.model, context.settings) + + var model: Model + var protocolGeneratorFactory: ProtocolGeneratorFactory + var protocolGenerator: ProtocolGenerator + var codegenContext: CodegenContext + var symbolProvider: RustSymbolProvider + var rustCrate: RustCrate init { val symbolVisitorConfig = @@ -95,7 +96,7 @@ class ServerCodegenVisitor(context: PluginContext, private val codegenDecorator: * Base model transformation applied to all services. * See below for details. */ - private fun baselineTransform(model: Model) = + protected fun baselineTransform(model: Model) = model // Add errors attached at the service level to the models .let { ModelTransformer.create().copyServiceErrorsToOperations(it, settings.getService(it)) } @@ -175,7 +176,7 @@ class ServerCodegenVisitor(context: PluginContext, private val codegenDecorator: } /** - * String Shape Visitor + * Enum Shape Visitor * * Although raw strings require no code generation, enums are actually [EnumTrait] applied to string shapes. */ diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecorator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecorator.kt index 0038af876b0..af82b645b83 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecorator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecorator.kt @@ -18,23 +18,23 @@ import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator /** * Add at least one error to all operations in the model. * - * When this decorator is applied, even operations that do not have a Smithy error attatched, + * When this decorator is applied, even operations that do not have a Smithy error attached, * will return `Result`. * * To enable this decorator write its class name to a resource file like this: * ``` - * C="software.amazon.smithy.rust.codegen.server.smithy.customizations.AddInternalServerErrorToInfallibleOpsDecorator" + * C="software.amazon.smithy.rust.codegen.server.smithy.customizations.AddInternalServerErrorToInfallibleOperationsDecorator" * F="software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator" * D="codegen-server/src/main/resources/META-INF/services" * mkdir -p "$D" && echo "$C" > "$D/$F" * ``` */ -class AddInternalServerErrorToInfallibleOpsDecorator : RustCodegenDecorator { - override val name: String = "AddInternalServerErrorToInfallibleOps" +class AddInternalServerErrorToInfallibleOperationsDecorator : RustCodegenDecorator { + override val name: String = "AddInternalServerErrorToInfallibleOperations" override val order: Byte = 0 override fun transformModel(service: ServiceShape, model: Model): Model = - addErrorShapeToModelOps(service, model, { shape -> shape.errors.isEmpty() }) + addErrorShapeToModelOperations(service, model, { shape -> shape.errors.isEmpty() }) } /** @@ -44,26 +44,26 @@ class AddInternalServerErrorToInfallibleOpsDecorator : RustCodegenDecorator { * and there is no native mapping of these actual errors to the API errors, servers can generate * the code with this decorator to add an internal error shape on-the-fly to all the operations. * - * When this decorator is applied, even operations that do not have a Smithy error attatched, + * When this decorator is applied, even operations that do not have a Smithy error attached, * will return `Result`. * * To enable this decorator write its class name to a resource file like this: * ``` - * C="software.amazon.smithy.rust.codegen.server.smithy.customizations.AddInternalServerErrorToAllOpsDecorator" + * C="software.amazon.smithy.rust.codegen.server.smithy.customizations.AddInternalServerErrorToAllOperationsDecorator" * F="software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator" * D="codegen-server/src/main/resources/META-INF/services" * mkdir -p "$D" && echo "$C" > "$D/$F" * ``` */ -class AddInternalServerErrorToAllOpsDecorator : RustCodegenDecorator { - override val name: String = "AddInternalServerErrorToAllOps" +class AddInternalServerErrorToAllOperationsDecorator : RustCodegenDecorator { + override val name: String = "AddInternalServerErrorToAllOperations" override val order: Byte = 0 override fun transformModel(service: ServiceShape, model: Model): Model = - addErrorShapeToModelOps(service, model, { _ -> true }) + addErrorShapeToModelOperations(service, model, { _ -> true }) } -fun addErrorShapeToModelOps(service: ServiceShape, model: Model, opSelector: (OperationShape) -> Boolean): Model { +fun addErrorShapeToModelOperations(service: ServiceShape, model: Model, opSelector: (OperationShape) -> Boolean): Model { val errorShape = internalServerError(service.id.getNamespace()) val modelShapes = model.toBuilder().addShapes(listOf(errorShape)).build() return ModelTransformer.create().mapShapes(modelShapes) { shape -> diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGenerator.kt index edb7a891403..64683f4448d 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGenerator.kt @@ -25,14 +25,14 @@ import software.amazon.smithy.rust.codegen.util.toSnakeCase * Generates a unified error enum for [operation]. [ErrorGenerator] handles generating the individual variants, * but we must still combine those variants into an enum covering all possible errors for a given operation. */ -class ServerCombinedErrorGenerator( +open class ServerCombinedErrorGenerator( private val model: Model, private val symbolProvider: RustSymbolProvider, private val operation: OperationShape ) { private val operationIndex = OperationIndex.of(model) - fun render(writer: RustWriter) { + open fun render(writer: RustWriter) { val errors = operationIndex.getErrors(operation) val operationSymbol = symbolProvider.toSymbol(operation) val symbol = operation.errorSymbol(symbolProvider) @@ -87,7 +87,7 @@ class ServerCombinedErrorGenerator( for (error in errors) { val errorSymbol = symbolProvider.toSymbol(error) - writer.rustBlock("impl From<#T> for #T", errorSymbol, symbol) { + writer.rustBlock("impl #T<#T> for #T", RuntimeType.From, errorSymbol, symbol) { rustBlock("fn from(variant: #T) -> #T", errorSymbol, symbol) { rust("Self::${errorSymbol.name}(variant)") } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt index 830de8acfd1..9b1da8934b1 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt @@ -19,7 +19,7 @@ import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.EnumGenerator import software.amazon.smithy.rust.codegen.util.dq -class ServerEnumGenerator( +open class ServerEnumGenerator( model: Model, symbolProvider: RustSymbolProvider, private val writer: RustWriter, @@ -55,15 +55,12 @@ class ServerEnumGenerator( Self::EnumVariantNotFound(Box::new(e)) } } - impl #{From}<$errorStruct> for #{JsonDeserialize} { fn from(e: $errorStruct) -> Self { Self::custom(format!("unknown variant {}", e)) } } - impl #{StdError} for $errorStruct { } - impl #{Display} for $errorStruct { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.fmt(f) @@ -83,7 +80,6 @@ class ServerEnumGenerator( """ impl std::str::FromStr for $enumName { type Err = $errorStruct; - fn from_str(s: &str) -> std::result::Result { $enumName::try_from(s) } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt index e1c1b5db903..fb4d8013064 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt @@ -25,7 +25,7 @@ import software.amazon.smithy.rust.codegen.util.toPascalCase /** * ServerOperationHandlerGenerator */ -class ServerOperationHandlerGenerator( +open class ServerOperationHandlerGenerator( codegenContext: CodegenContext, private val operations: List, ) { @@ -48,7 +48,7 @@ class ServerOperationHandlerGenerator( "http" to RuntimeType.http, ) - fun render(writer: RustWriter) { + open fun render(writer: RustWriter) { renderHandlerImplementations(writer, false) renderHandlerImplementations(writer, true) } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt index 73ff3780734..4abc64460e9 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt @@ -6,7 +6,9 @@ package software.amazon.smithy.rust.codegen.server.smithy.generators import software.amazon.smithy.model.knowledge.TopDownIndex +import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.RustModule +import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.server.smithy.generators.protocol.ServerProtocolTestGenerator import software.amazon.smithy.rust.codegen.smithy.CodegenContext import software.amazon.smithy.rust.codegen.smithy.RustCrate @@ -20,7 +22,7 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.HttpBindingResolver * Service generator is the main codegeneration entry point for Smithy services. Individual structures and unions are * generated in codegen visitor, but this class handles all protocol-specific code generation (i.e. operations). */ -class ServerServiceGenerator( +open class ServerServiceGenerator( private val rustCrate: RustCrate, private val protocolGenerator: ProtocolGenerator, private val protocolSupport: ProtocolSupport, @@ -28,13 +30,13 @@ class ServerServiceGenerator( private val context: CodegenContext, ) { private val index = TopDownIndex.of(context.model) + protected val operations = index.getContainedOperations(context.serviceShape).sortedBy { it.id } /** * Render Service Specific code. Code will end up in different files via [useShapeWriter]. See `SymbolVisitor.kt` * which assigns a symbol location to each shape. */ fun render() { - val operations = index.getContainedOperations(context.serviceShape).sortedBy { it.id } for (operation in operations) { rustCrate.useShapeWriter(operation) { operationWriter -> protocolGenerator.serverRenderOperation( @@ -44,21 +46,36 @@ class ServerServiceGenerator( ServerProtocolTestGenerator(context, protocolSupport, operation, operationWriter) .render() } - if (operation.errors.isNotEmpty()) { rustCrate.withModule(RustModule.Error) { writer -> - ServerCombinedErrorGenerator(context.model, context.symbolProvider, operation) - .render(writer) + renderCombinedErrors(writer, operation) } } } rustCrate.withModule(RustModule.public("operation_handler", "Operation handlers definition and implementation.")) { writer -> - ServerOperationHandlerGenerator(context, operations) - .render(writer) + renderOperationHandler(writer, operations) } rustCrate.withModule(RustModule.public("operation_registry", "A registry of your service's operations.")) { writer -> - ServerOperationRegistryGenerator(context, httpBindingResolver, operations) - .render(writer) + renderOperationRegistry(writer, operations) } + renderExtras(operations) + } + + // Render any extra section needed by subclasses of `ServerServiceGenerator`. + open fun renderExtras(operations: List) { } + + // Render combined errors. + open fun renderCombinedErrors(writer: RustWriter, operation: OperationShape) { + ServerCombinedErrorGenerator(context.model, context.symbolProvider, operation).render(writer) + } + + // Render operations handler. + open fun renderOperationHandler(writer: RustWriter, operations: List) { + ServerOperationHandlerGenerator(context, operations).render(writer) + } + + // Render operations registry. + private fun renderOperationRegistry(writer: RustWriter, operations: List) { + ServerOperationRegistryGenerator(context, httpBindingResolver, operations).render(writer) } } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt index c6f7d9832f5..9ad961d399c 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt @@ -306,7 +306,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( if (operationShape.errors.isNotEmpty()) { rustTemplate( """ - impl From> for $outputName { + impl #{From}> for $outputName { fn from(res: Result<#{O}, #{E}>) -> Self { match res { Ok(v) => Self::Output(v), @@ -316,31 +316,34 @@ private class ServerHttpBoundProtocolTraitImplGenerator( } """.trimIndent(), "O" to outputSymbol, - "E" to errorSymbol + "E" to errorSymbol, + "From" to RuntimeType.From ) } else { rustTemplate( """ - impl From<#{O}> for $outputName { + impl #{From}<#{O}> for $outputName { fn from(o: #{O}) -> Self { Self(o) } } """.trimIndent(), - "O" to outputSymbol + "O" to outputSymbol, + "From" to RuntimeType.From ) } // Implement conversion function to "unwrap" into the model operation input types. rustTemplate( """ - impl From<$inputName> for #{I} { + impl #{From}<$inputName> for #{I} { fn from(i: $inputName) -> Self { i.0 } } """.trimIndent(), - "I" to inputSymbol + "I" to inputSymbol, + "From" to RuntimeType.From ) } diff --git a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecoratorTest.kt b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecoratorTest.kt index e49e2918879..4607c4460e4 100644 --- a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecoratorTest.kt +++ b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecoratorTest.kt @@ -27,9 +27,9 @@ class AdditionalErrorsDecoratorTest { output: InputOutput, errors: [AnError] } - + structure InputOutput { } - + @error("client") structure AnError { } """.asSmithyModel() @@ -40,7 +40,7 @@ class AdditionalErrorsDecoratorTest { fun `add InternalServerError to infallible operations only`() { model.lookup("test#Infallible").errors.isEmpty() shouldBe true model.lookup("test#Fallible").errors.size shouldBe 1 - val transformedModel = AddInternalServerErrorToInfallibleOpsDecorator().transformModel(service, model) + val transformedModel = AddInternalServerErrorToInfallibleOperationsDecorator().transformModel(service, model) transformedModel.lookup("test#Infallible").errors.size shouldBe 1 transformedModel.lookup("test#Fallible").errors.size shouldBe 1 } @@ -49,7 +49,7 @@ class AdditionalErrorsDecoratorTest { fun `add InternalServerError to all model operations`() { model.lookup("test#Infallible").errors.isEmpty() shouldBe true model.lookup("test#Fallible").errors.size shouldBe 1 - val transformedModel = AddInternalServerErrorToAllOpsDecorator().transformModel(service, model) + val transformedModel = AddInternalServerErrorToAllOperationsDecorator().transformModel(service, model) transformedModel.lookup("test#Infallible").errors.size shouldBe 1 transformedModel.lookup("test#Fallible").errors.size shouldBe 2 } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt index 8f2d1abbb6b..2e761ff3791 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EnumGenerator.kt @@ -92,7 +92,7 @@ open class EnumGenerator( const val Values = "values" } - fun render() { + open fun render() { if (enumTrait.hasNames()) { // pub enum Blah { V1, V2, .. } renderEnum() diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/StructureGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/StructureGenerator.kt index d4c6f143f71..cb545391f7f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/StructureGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/StructureGenerator.kt @@ -50,20 +50,20 @@ fun redactIfNecessary(member: MemberShape, model: Model, safeToPrint: String): S } } -class StructureGenerator( +open class StructureGenerator( val model: Model, private val symbolProvider: RustSymbolProvider, private val writer: RustWriter, private val shape: StructureShape ) { private val errorTrait = shape.getTrait() - private val members: List = shape.allMembers.values.toList() - private val accessorMembers: List = when (errorTrait) { + protected val members: List = shape.allMembers.values.toList() + protected val accessorMembers: List = when (errorTrait) { null -> members // Let the ErrorGenerator render the error message accessor if this is an error struct else -> members.filter { "message" != symbolProvider.toMemberName(it) } } - private val name = symbolProvider.toSymbol(shape).name + protected val name = symbolProvider.toSymbol(shape).name fun render(forWhom: CodegenTarget = CodegenTarget.CLIENT) { renderStructure() @@ -153,7 +153,13 @@ class StructureGenerator( } } - private fun renderStructure() { + open fun renderStructureMember(writer: RustWriter, member: MemberShape, memberName: String, memberSymbol: Symbol) { + writer.renderMemberDoc(member, memberSymbol) + memberSymbol.expectRustMetadata().render(writer) + writer.write("$memberName: #T,", symbolProvider.toSymbol(member)) + } + + open fun renderStructure() { val symbol = symbolProvider.toSymbol(shape) val containerMeta = symbol.expectRustMetadata() writer.documentShape(shape, model) @@ -161,10 +167,8 @@ class StructureGenerator( containerMeta.copy(derives = withoutDebug).render(writer) writer.rustBlock("struct $name ${lifetimeDeclaration()}") { - forEachMember(members) { member, memberName, memberSymbol -> - renderMemberDoc(member, memberSymbol) - memberSymbol.expectRustMetadata().render(this) - write("$memberName: #T,", symbolProvider.toSymbol(member)) + writer.forEachMember(members) { member, memberName, memberSymbol -> + renderStructureMember(writer, member, memberName, memberSymbol) } } @@ -172,7 +176,7 @@ class StructureGenerator( renderDebugImpl() } - private fun RustWriter.forEachMember( + protected fun RustWriter.forEachMember( toIterate: List, block: RustWriter.(MemberShape, String, Symbol) -> Unit ) { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt index 83f3ccf9ef8..7ebfb9b130c 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt @@ -297,7 +297,7 @@ class HttpBindingGenerator( } is BlobShape -> rust( "Ok(#T::new(body))", - RuntimeType.Blob(runtimeConfig) + symbolProvider.toSymbol(targetShape) ) // `httpPayload` can be applied to set/map/list shapes. // However, none of the AWS protocols support it. diff --git a/rust-runtime/aws-smithy-http-server-python/Cargo.toml b/rust-runtime/aws-smithy-http-server-python/Cargo.toml index e0d8e1d2522..96e074d3f7c 100644 --- a/rust-runtime/aws-smithy-http-server-python/Cargo.toml +++ b/rust-runtime/aws-smithy-http-server-python/Cargo.toml @@ -14,10 +14,20 @@ Python server runtime for Smithy Rust Server Framework. publish = false [dependencies] -pyo3 = { version = "0.16" } -pyo3-asyncio = { version = "0.16", features = ["attributes", "tokio-runtime"] } +aws-smithy-http-server = { path = "../aws-smithy-http-server" } +aws-smithy-types = { path = "../aws-smithy-types" } +bytes = "1.1" +delegate = "0.6" +http = "0.2" +hyper = { version = "0.14", features = ["server", "http1", "http2", "tcp", "stream"] } +num_cpus = "1.13" +paste = "1.0" +pyo3 = { version = "0.16.5" } +pyo3-asyncio = { version = "0.16.0", features = ["attributes", "tokio-runtime"] } socket2 = { version = "0.4", features = ["all"] } +thiserror = "1.0.31" tokio = { version = "1", features = ["full"] } +tower = "0.4" tracing = "0.1.34" tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/rust-runtime/aws-smithy-http-server-python/src/error.rs b/rust-runtime/aws-smithy-http-server-python/src/error.rs new file mode 100644 index 00000000000..0b1bc154942 --- /dev/null +++ b/rust-runtime/aws-smithy-http-server-python/src/error.rs @@ -0,0 +1,22 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +//! Python error definition. + +use thiserror::Error; + +/// Python error that implements foreign errors. +#[derive(Error, Debug)] +pub enum Error { + /// Custom error. + #[error("{0}")] + Custom(String), + /// Errors coming from `pyo3::PyErr`. + #[error("PyO3 error: {0}")] + PyO3(#[from] pyo3::PyErr), + /// Error coming from `tokio::task::JoinError`. + #[error("Tokio task join error: {0}")] + TaskJoin(#[from] tokio::task::JoinError), +} diff --git a/rust-runtime/aws-smithy-http-server-python/src/lib.rs b/rust-runtime/aws-smithy-http-server-python/src/lib.rs index 090642833f0..60a4f0f7c7c 100644 --- a/rust-runtime/aws-smithy-http-server-python/src/lib.rs +++ b/rust-runtime/aws-smithy-http-server-python/src/lib.rs @@ -11,10 +11,33 @@ //! //! [PyO3]: https://pyo3.rs/ +mod error; mod logging; +mod server; mod socket; +mod state; +pub mod types; +#[doc(inline)] +pub use error::Error; #[doc(inline)] pub use logging::{setup, LogLevel}; #[doc(inline)] +pub use server::{PyApp, PyRouter}; +#[doc(inline)] pub use socket::SharedSocket; +#[doc(inline)] +pub use state::{PyHandler, PyHandlers, PyState}; + +#[cfg(test)] +mod tests { + use std::sync::Once; + + static INIT: Once = Once::new(); + + pub(crate) fn initialize() { + INIT.call_once(|| { + pyo3::prepare_freethreaded_python(); + }); + } +} diff --git a/rust-runtime/aws-smithy-http-server-python/src/logging.rs b/rust-runtime/aws-smithy-http-server-python/src/logging.rs index 063ce412df4..595bf4cb981 100644 --- a/rust-runtime/aws-smithy-http-server-python/src/logging.rs +++ b/rust-runtime/aws-smithy-http-server-python/src/logging.rs @@ -88,7 +88,7 @@ impl From for Level { } } -/// Modifies the Python `logging` module to deliver its log messages using `tracing::Subscriber` events. +/// Modifies the Python `logging` module to deliver its log messages using [tracing::Subscriber] events. /// /// To achieve this goal, the following changes are made to the module: /// - A new builtin function `logging.python_tracing` transcodes `logging.LogRecord`s to `tracing::Event`s. This function @@ -131,9 +131,10 @@ def basicConfig(*pargs, **kwargs): Ok(()) } -/// Consumes a Python `logging.LogRecord` and emits a Rust `tracing::Event` instead. +/// Consumes a Python `logging.LogRecord` and emits a Rust [tracing::Event] instead. #[cfg(not(test))] #[pyfunction] +#[pyo3(text_signature = "(record)")] fn python_tracing(record: &PyAny) -> PyResult<()> { let level = record.getattr("levelno")?; let message = record.getattr("getMessage")?.call0()?; @@ -154,6 +155,7 @@ fn python_tracing(record: &PyAny) -> PyResult<()> { #[cfg(test)] #[pyfunction] +#[pyo3(text_signature = "(record)")] fn python_tracing(record: &PyAny) -> PyResult<()> { let message = record.getattr("getMessage")?.call0()?; pretty_assertions::assert_eq!(message.to_string(), "a message"); @@ -163,19 +165,10 @@ fn python_tracing(record: &PyAny) -> PyResult<()> { #[cfg(test)] mod tests { use super::*; - use std::sync::Once; - - static INIT: Once = Once::new(); - - fn initialize() { - INIT.call_once(|| { - pyo3::prepare_freethreaded_python(); - }); - } #[test] fn tracing_handler_is_injected_in_python() { - initialize(); + crate::tests::initialize(); Python::with_gil(|py| { setup_python_logging(py, LogLevel::Info).unwrap(); let logging = py.import("logging").unwrap(); diff --git a/rust-runtime/aws-smithy-http-server-python/src/server.rs b/rust-runtime/aws-smithy-http-server-python/src/server.rs new file mode 100644 index 00000000000..83fa804f086 --- /dev/null +++ b/rust-runtime/aws-smithy-http-server-python/src/server.rs @@ -0,0 +1,213 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +use std::sync::Arc; + +use aws_smithy_http_server::Router; +use pyo3::prelude::*; + +use crate::{PyHandler, PyHandlers, PyState, SharedSocket}; + +/// Python compatible wrapper for the [aws_smithy_http_server::Router] type. +#[pyclass(text_signature = "(router)")] +#[derive(Debug, Clone)] +pub struct PyRouter(pub Router); + +/// Python application definition, holding the handlers map, the optional Python context object +/// and the asyncio task locals with the running event loop. +#[pyclass(subclass, text_signature = "()")] +#[derive(Debug, Clone)] +pub struct PyApp { + pub handlers: PyHandlers, + pub context: Option>, + pub locals: pyo3_asyncio::TaskLocals, +} + +#[pymethods] +impl PyApp { + /// Create a new instance of [PyApp]. + #[new] + pub fn new(py: Python) -> PyResult { + let asyncio = py.import("asyncio")?; + let event_loop = asyncio.call_method0("get_event_loop")?; + let locals = pyo3_asyncio::TaskLocals::new(event_loop); + Ok(Self { + handlers: PyHandlers::new(), + context: None, + locals, + }) + } + + /// Start a single worker with its own Tokio and Python async runtime and provided shared socket. + /// + /// Python asynchronous loop needs to be started and handled during the lifetime of the process. + /// First of all we install [uvloop] as the main Python event loop. Thanks to libuv, uvloop + /// performs ~20% better than Python standard event loop in most benchmarks, while being 100% + /// compatible. + /// We retrieve the Python context object, if setup by the user calling [PyApp::context] method, + /// generate the [PyState] structure and build the [aws_smithy_http_server::Router], filling + /// it with the functions generated by `PythonServerOperationHandlerGenerator.kt`. + /// At last we get a cloned reference to the underlying [socket2::Socket]. + /// + /// Now that all the setup is done, we can start the two runtimes and run the [hyper] server. + /// We spawn a thread with a new [tokio::runtime], setup the middlewares and finally block the + /// thread on `hyper::serve`. + /// The main process continues and at the end it is blocked on Python `loop.run_forever()`. + /// + /// [uvloop]: https://github.com/MagicStack/uvloop + #[pyo3(text_signature = "($self, socket, worker_number)")] + fn start_hyper_thread( + &mut self, + py: Python, + socket: &PyCell, + worker_number: isize, + ) -> PyResult<()> { + // Setup the Python asyncio loop to use `uvloop`. + let asyncio = py.import("asyncio")?; + let uvloop = py.import("uvloop")?; + uvloop.call_method0("install")?; + tracing::debug!("Setting up uvloop for current process"); + let event_loop = asyncio.call_method0("new_event_loop")?; + asyncio.call_method1("set_event_loop", (event_loop,))?; + // Create the `PyState` object from the Python context object. + let context = self.context.clone().unwrap_or_else(|| Arc::new(py.None())); + let state = PyState::new(context); + // Build the router. + let router: PyRouter = self.router(py).expect("`start_hyper_thread()` is meant to be called only by subclasses implementing the `router()` method").extract(py)?; + // Clone the socket. + let borrow = socket.try_borrow_mut()?; + let held_socket: &SharedSocket = &*borrow; + let raw_socket = held_socket.get_socket()?; + // Store Python event loop locals. + self.locals = pyo3_asyncio::TaskLocals::new(event_loop); + + // Spawn a new background [std::thread] to run the application. + tracing::debug!("Start the Tokio runtime in a background task"); + std::thread::spawn(move || { + // The thread needs a new [tokio] runtime. + let rt = tokio::runtime::Builder::new_current_thread() + .enable_all() + .thread_name(format!("smithy-rs[{}]", worker_number)) + .build() + .expect("Unable to start a new tokio runtime for this process"); + // Register operations into a Router, add middleware and start the `hyper` server, + // all inside a [tokio] blocking function. + tracing::debug!("Add middlewares to Rust Python router"); + let app = router.0.layer( + tower::ServiceBuilder::new() + .layer(aws_smithy_http_server::AddExtensionLayer::new(state)), + ); + let server = hyper::Server::from_tcp( + raw_socket + .try_into() + .expect("Unable to convert `socket2::Socket` into `std::net::TcpListener`"), + ) + .expect("Unable to create hyper server from shared socket") + .serve(app.into_make_service()); + + tracing::debug!("Starting hyper server from shared socket"); + rt.block_on(async move { + // Run forever-ish... + if let Err(err) = server.await { + tracing::error!("server error: {}", err); + } + }); + }); + // Block on the event loop forever. + tracing::debug!("Run and block on the Python event loop"); + let event_loop = (*event_loop).call_method0("run_forever"); + tracing::info!("Rust Python server started successfully"); + if event_loop.is_err() { + tracing::warn!("Ctrl-c handler, quitting"); + } + Ok(()) + } + + /// Register a new operation in the handlers map. + /// + /// The operation registered in the map are used inside the code-generated `router()` method + /// and passed to the [aws_smithy_http_server::Router] as part of the operation handlers call. + #[pyo3(text_signature = "($self, name, func)")] + pub fn register_operation(&mut self, py: Python, name: &str, func: PyObject) -> PyResult<()> { + let inspect = py.import("inspect")?; + // Check if the function is a coroutine. + // NOTE: that `asyncio.iscoroutine()` doesn't work here. + let is_coroutine = inspect + .call_method1("iscoroutinefunction", (&func,))? + .extract::()?; + // Find number of expected methods (a Python implementation could not accept the context). + let func_args = inspect + .call_method1("getargs", (func.getattr(py, "__code__")?,))? + .getattr("args")? + .extract::>()?; + let func = PyHandler { + func, + is_coroutine, + args: func_args.len(), + }; + tracing::info!( + "Registering {} function `{}` for operation {} with {} arguments", + if func.is_coroutine { "async" } else { "sync" }, + name, + func.func, + func.args + ); + // Insert the handler in the handlers map. + self.handlers + .insert(String::from(name), std::sync::Arc::new(func)); + Ok(()) + } + + /// Register a new context object inside the Rust state. + #[pyo3(text_signature = "($self, context)")] + pub fn context(&mut self, _py: Python, context: PyObject) { + self.context = Some(Arc::new(context)); + } + + /// This method is here because it is meant to be overriden by the code-generated + /// `App` structure (see PythonServerApplicationGenerator.kt) with the code needed + /// to build the [aws_smithy_http_server::Router] and register the operations on it. + #[pyo3(text_signature = "($self)")] + pub fn router(&self, _py: Python) -> Option { + None + } + + /// Main entrypoint: start the server on multiple workers. + /// + /// The multiprocessing server is achieved using the ability of a Python interpreter + /// to clone and start itself as a new process. + /// The shared sockets is created and Using the [multiprocessing::Process] module, multiple + /// workers with the method `self.start_single_python_worker()` as target are started. + /// + /// [multiprocessing::Process]: https://docs.python.org/3/library/multiprocessing.html + #[pyo3(text_signature = "($self, address, port, backlog, workers)")] + fn run( + &mut self, + py: Python, + address: Option, + port: Option, + backlog: Option, + workers: Option, + ) -> PyResult<()> { + let mp = py.import("multiprocessing")?; + mp.call_method0("allow_connection_pickling")?; + let address = address.unwrap_or_else(|| String::from("127.0.0.1")); + let port = port.unwrap_or(8080); + let socket = SharedSocket::new(address, port, backlog)?; + for idx in 0..workers.unwrap_or_else(num_cpus::get) { + let sock = socket.try_clone()?; + let process = mp.getattr("Process")?; + let handle = process.call1(( + py.None(), + self.clone().into_py(py).getattr(py, "start_hyper_worker")?, + format!("smithy-rs[{}]", idx), + (sock.into_py(py), idx), + ))?; + handle.call_method0("start")?; + } + Ok(()) + } +} diff --git a/rust-runtime/aws-smithy-http-server-python/src/socket.rs b/rust-runtime/aws-smithy-http-server-python/src/socket.rs index aa305209b89..1d24b2f5a3a 100644 --- a/rust-runtime/aws-smithy-http-server-python/src/socket.rs +++ b/rust-runtime/aws-smithy-http-server-python/src/socket.rs @@ -74,12 +74,20 @@ impl SharedSocket { /// Clone the inner socket allowing it to be shared between multiple /// Python processes. + #[pyo3(text_signature = "($self, socket, worker_number)")] pub fn try_clone(&self) -> PyResult { let copied = self.inner.try_clone()?; Ok(SharedSocket { inner: copied }) } } +impl SharedSocket { + /// Get a cloned inner socket. + pub fn get_socket(&self) -> Result { + self.inner.try_clone() + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/rust-runtime/aws-smithy-http-server-python/src/state.rs b/rust-runtime/aws-smithy-http-server-python/src/state.rs new file mode 100644 index 00000000000..fe1fcb8d637 --- /dev/null +++ b/rust-runtime/aws-smithy-http-server-python/src/state.rs @@ -0,0 +1,47 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +//! [PyState] and Python handlers.. +use std::{collections::HashMap, ops::Deref, sync::Arc}; + +use pyo3::prelude::*; + +/// The Python business logic implementation needs to carry some information +/// to be executed properly like the size of its arguments and if it is +/// a coroutine. +#[derive(Debug, Clone)] +pub struct PyHandler { + pub func: PyObject, + pub args: usize, + pub is_coroutine: bool, +} + +impl Deref for PyHandler { + type Target = PyObject; + + fn deref(&self) -> &Self::Target { + &self.func + } +} + +/// Mapping holding the Python business logic handlers. +pub type PyHandlers = HashMap>; + +/// [PyState] structure holding the Python context. +/// +/// The possibility of passing the State or not is decided in Python if the method +/// `context()` is called on the `App` to register a context object. +#[pyclass] +#[derive(Debug, Clone)] +pub struct PyState { + pub context: Arc, +} + +impl PyState { + /// Create a new [PyState] structure. + pub fn new(context: Arc) -> Self { + Self { context } + } +} diff --git a/rust-runtime/aws-smithy-http-server-python/src/types.rs b/rust-runtime/aws-smithy-http-server-python/src/types.rs new file mode 100644 index 00000000000..42bc82c218c --- /dev/null +++ b/rust-runtime/aws-smithy-http-server-python/src/types.rs @@ -0,0 +1,100 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +//! Python wrapped types from aws-smithy-types. + +use pyo3::prelude::*; + +/// Python Wrapper for [aws_smithy_types::Blob]. +#[pyclass] +#[derive(Debug, Clone, PartialEq)] +pub struct Blob(aws_smithy_types::Blob); + +impl Blob { + /// Creates a new blob from the given `input`. + pub fn new>>(input: T) -> Self { + Self(aws_smithy_types::Blob::new(input)) + } + + /// Consumes the `Blob` and returns a `Vec` with its contents. + pub fn into_inner(self) -> Vec { + self.0.into_inner() + } +} + +impl AsRef<[u8]> for Blob { + fn as_ref(&self) -> &[u8] { + self.0.as_ref() + } +} + +#[pymethods] +impl Blob { + /// Create a new Python instance of `Blob`. + #[new] + pub fn pynew(input: Vec) -> Self { + Self(aws_smithy_types::Blob::new(input)) + } + + /// Python getter for the `Blob` byte array. + #[getter(data)] + pub fn get_data(&self) -> &[u8] { + self.as_ref() + } + + /// Python setter for the `Blob` byte array. + #[setter(data)] + pub fn set_data(&mut self, data: Vec) { + *self = Self::pynew(data); + } +} + +#[cfg(test)] +mod tests { + use pyo3::py_run; + + use super::*; + + #[test] + fn blob_can_be_used_in_python_when_initialized_in_rust() { + crate::tests::initialize(); + Python::with_gil(|py| { + let blob = Blob::new("some data".as_bytes().to_vec()); + let blob = PyCell::new(py, blob).unwrap(); + py_run!( + py, + blob, + r#" + assert blob.data == b"some data" + assert len(blob.data) == 9 + blob.data = b"some other data" + assert blob.data == b"some other data" + assert len(blob.data) == 15 + "# + ); + }) + } + + #[test] + fn blob_can_be_initialized_in_python() { + crate::tests::initialize(); + Python::with_gil(|py| { + let types = PyModule::new(py, "types").unwrap(); + types.add_class::().unwrap(); + py_run!( + py, + types, + r#" + blob = types.Blob(b"some data") + assert blob.data == b"some data" + assert len(blob.data) == 9 + blob.data = b"some other data" + assert blob.data == b"some other data" + assert len(blob.data) == 15 + "# + ); + }) + } +} diff --git a/rust-runtime/aws-smithy-http-server/src/routing/into_make_service.rs b/rust-runtime/aws-smithy-http-server/src/routing/into_make_service.rs index 05a34111ae7..324b9d59dc4 100644 --- a/rust-runtime/aws-smithy-http-server/src/routing/into_make_service.rs +++ b/rust-runtime/aws-smithy-http-server/src/routing/into_make_service.rs @@ -48,7 +48,7 @@ pub struct IntoMakeService { } impl IntoMakeService { - pub(super) fn new(service: S) -> Self { + pub fn new(service: S) -> Self { Self { service } } } diff --git a/rust-runtime/aws-smithy-http-server/src/routing/mod.rs b/rust-runtime/aws-smithy-http-server/src/routing/mod.rs index 2f4fa6c94f1..7ce1485b49b 100644 --- a/rust-runtime/aws-smithy-http-server/src/routing/mod.rs +++ b/rust-runtime/aws-smithy-http-server/src/routing/mod.rs @@ -7,7 +7,6 @@ //! //! [Smithy specification]: https://awslabs.github.io/smithy/1.0/spec/core/http-traits.html -use self::future::RouterFuture; use self::request_spec::RequestSpec; use self::tiny_map::TinyMap; use crate::body::{boxed, Body, BoxBody, HttpBody}; @@ -34,7 +33,7 @@ pub mod request_spec; mod route; mod tiny_map; -pub use self::{into_make_service::IntoMakeService, route::Route}; +pub use self::{future::RouterFuture, into_make_service::IntoMakeService, route::Route}; /// The router is a [`tower::Service`] that routes incoming requests to other `Service`s /// based on the request's URI and HTTP method or on some specific header setting the target operation. From 4a8da5f7a6e4cd01e24a1cecb9ea2c2417daa362 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Tue, 14 Jun 2022 10:42:38 -0700 Subject: [PATCH 37/49] Fix issues with setting crate ownership during publish (#1454) --- tools/publisher/src/main.rs | 10 ++++- tools/publisher/src/subcommand/publish.rs | 46 +++++++++++++++-------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/tools/publisher/src/main.rs b/tools/publisher/src/main.rs index e3a81864580..08896fc215a 100644 --- a/tools/publisher/src/main.rs +++ b/tools/publisher/src/main.rs @@ -26,7 +26,15 @@ mod subcommand; pub const SDK_REPO_CRATE_PATH: &str = "sdk"; pub const SDK_REPO_NAME: &str = "aws-sdk-rust"; pub const SMITHYRS_REPO_NAME: &str = "smithy-rs"; -pub const CRATE_OWNER: &str = "github:awslabs:rust-sdk-owners"; + +// Crate ownership for SDK crates. Crates.io requires that at least one owner +// is an individual rather than a team, so we use the automation user for that. +pub const CRATE_OWNERS: &[&str] = &[ + // https://github.com/orgs/awslabs/teams/rust-sdk-owners + "github:awslabs:rust-sdk-owners", + // https://github.com/aws-sdk-rust-ci + "aws-sdk-rust-ci", +]; #[derive(Parser, Debug)] #[clap(author, version, about)] diff --git a/tools/publisher/src/subcommand/publish.rs b/tools/publisher/src/subcommand/publish.rs index 9bec8b44fa3..ff30bb265d3 100644 --- a/tools/publisher/src/subcommand/publish.rs +++ b/tools/publisher/src/subcommand/publish.rs @@ -9,7 +9,7 @@ use crate::package::{ }; use crate::repo::{resolve_publish_location, Repository}; use crate::retry::{run_with_retry, BoxError, ErrorClass}; -use crate::CRATE_OWNER; +use crate::CRATE_OWNERS; use crate::{cargo, SDK_REPO_NAME}; use anyhow::{bail, Context, Result}; use clap::Parser; @@ -195,22 +195,36 @@ async fn correct_owner(package: &Package) -> Result<()> { Duration::from_secs(5), || async { let owners = cargo::GetOwners::new(&package.handle.name).spawn().await?; - let incorrect_owners = owners.iter().filter(|&owner| owner != CRATE_OWNER); - for incorrect_owner in incorrect_owners { - cargo::RemoveOwner::new(&package.handle.name, incorrect_owner) - .spawn() - .await - .context("remove incorrect owner")?; - info!( - "Removed incorrect owner `{}` from crate `{}`", - incorrect_owner, package.handle - ); + let mut added_individual = false; + for &crate_owner in CRATE_OWNERS { + if !owners.iter().any(|owner| owner == crate_owner) { + cargo::AddOwner::new(&package.handle.name, crate_owner) + .spawn() + .await?; + info!("Added `{}` as owner of `{}`", crate_owner, package.handle); + // Teams in crates.io start with `github:` while individuals are just the GitHub user name + added_individual |= !crate_owner.starts_with("github:"); + } } - if !owners.iter().any(|owner| owner == CRATE_OWNER) { - cargo::AddOwner::new(&package.handle.name, CRATE_OWNER) - .spawn() - .await?; - info!("Corrected crate ownership of `{}`", package.handle); + let incorrect_owners = owners + .iter() + .filter(|&owner| !CRATE_OWNERS.iter().any(|o| o == owner)); + for incorrect_owner in incorrect_owners { + // Adding an individual owner requires accepting an invite, so don't attempt to remove + // anyone if an owner was added, as removing the last individual owner may break. + // The next publish run will remove the incorrect owner. + if !added_individual { + cargo::RemoveOwner::new(&package.handle.name, incorrect_owner) + .spawn() + .await + .context("remove incorrect owner")?; + info!( + "Removed incorrect owner `{}` from crate `{}`", + incorrect_owner, package.handle + ); + } else { + info!("Skipping removal of incorrect owner `{}` from crate `{}` due to new owners", incorrect_owner, package.handle); + } } Result::<_, BoxError>::Ok(()) }, From c3f37303fac40cf30c0d256fb336ae0454c227c6 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Tue, 14 Jun 2022 11:52:27 -0700 Subject: [PATCH 38/49] Remove deprecated v1 arg format from `sdk-versioner` (#1456) --- tools/sdk-versioner/src/main.rs | 72 ++++---- tools/sdk-versioner/src/v1.rs | 286 -------------------------------- 2 files changed, 29 insertions(+), 329 deletions(-) delete mode 100644 tools/sdk-versioner/src/v1.rs diff --git a/tools/sdk-versioner/src/main.rs b/tools/sdk-versioner/src/main.rs index fd730fe9aec..91e65f782ff 100644 --- a/tools/sdk-versioner/src/main.rs +++ b/tools/sdk-versioner/src/main.rs @@ -13,9 +13,6 @@ use std::path::{Path, PathBuf}; use std::time::Instant; use toml::value::{Table, Value}; -// TODO(https://github.com/awslabs/smithy-rs/issues/1433): Remove this v1 impl -mod v1; - #[derive(Parser, Debug)] #[clap( name = "sdk-versioner", @@ -79,48 +76,37 @@ struct DependencyContext<'a> { } fn main() -> Result<()> { - match Args::try_parse() { - Ok(args) => { - let args = args.validate()?; - let dependency_context = match &args { - Args::UsePathDependencies { sdk_path, .. } => DependencyContext { - sdk_path: Some(sdk_path), - versions_manifest: None, - }, - Args::UseVersionDependencies { versions_toml, .. } => DependencyContext { - sdk_path: None, - versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), - }, - Args::UsePathAndVersionDependencies { - sdk_path, - versions_toml, - .. - } => DependencyContext { - sdk_path: Some(sdk_path), - versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), - }, - }; - - let start_time = Instant::now(); - let mut manifest_paths = Vec::new(); - for crate_path in args.crate_paths() { - discover_manifests(&mut manifest_paths, crate_path)?; - } - - for manifest_path in manifest_paths { - update_manifest(&manifest_path, &dependency_context)?; - } + let args = Args::parse().validate()?; + let dependency_context = match &args { + Args::UsePathDependencies { sdk_path, .. } => DependencyContext { + sdk_path: Some(sdk_path), + versions_manifest: None, + }, + Args::UseVersionDependencies { versions_toml, .. } => DependencyContext { + sdk_path: None, + versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), + }, + Args::UsePathAndVersionDependencies { + sdk_path, + versions_toml, + .. + } => DependencyContext { + sdk_path: Some(sdk_path), + versions_manifest: Some(VersionsManifest::from_file(&versions_toml)?), + }, + }; + + let start_time = Instant::now(); + let mut manifest_paths = Vec::new(); + for crate_path in args.crate_paths() { + discover_manifests(&mut manifest_paths, crate_path)?; + } - println!("Finished in {:?}", start_time.elapsed()); - } - Err(err) => { - println!( - "WARN: failed to parse args: {}\nAttempting v1 arg format...", - err - ); - v1::main()?; - } + for manifest_path in manifest_paths { + update_manifest(&manifest_path, &dependency_context)?; } + + println!("Finished in {:?}", start_time.elapsed()); Ok(()) } diff --git a/tools/sdk-versioner/src/v1.rs b/tools/sdk-versioner/src/v1.rs deleted file mode 100644 index c2a0e4b03f1..00000000000 --- a/tools/sdk-versioner/src/v1.rs +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -//! This is all deprecated code kept around so that older commits can be code generated with the latest tools -//! to unblock a release. It can be deleted after the first successful release after this file was introduced. - -use anyhow::bail; -use clap::Parser; -use smithy_rs_tool_common::package::{PackageCategory, SDK_PREFIX}; -use std::ffi::OsStr; -use std::fs; -use std::path::{Path, PathBuf}; -use std::time::Instant; -use toml::value::{Table, Value}; - -#[derive(Parser, Debug)] -#[clap( - name = "sdk-versioner", - about = "CLI tool to recursively update SDK/Smithy crate references in Cargo.toml files", - version -)] -pub struct Args { - /// Path(s) to recursively update Cargo.toml files in - #[clap()] - crate_paths: Vec, - - /// SDK version to point to - #[clap(long)] - sdk_version: Option, - /// Smithy version to point to - #[clap(long)] - smithy_version: Option, - - /// Path to generated SDK to point to - #[clap(long)] - sdk_path: Option, -} - -impl Args { - fn validate(self) -> anyhow::Result { - if self.crate_paths.is_empty() { - bail!("Must provide at least one crate path to recursively update"); - } - if self.sdk_version.is_none() && self.sdk_path.is_none() { - bail!("Must provide either an SDK version or an SDK path to update to"); - } - if self.sdk_version.is_some() != self.smithy_version.is_some() { - bail!("Must provide a Smithy version when providing an SDK version to update to"); - } - Ok(self) - } -} - -pub fn main() -> anyhow::Result<()> { - let opt = Args::parse().validate()?; - - let start_time = Instant::now(); - let mut manifest_paths = Vec::new(); - for crate_path in &opt.crate_paths { - discover_manifests(&mut manifest_paths, crate_path)?; - } - - for manifest_path in manifest_paths { - update_manifest(&manifest_path, &opt)?; - } - - println!("Finished in {:?}", start_time.elapsed()); - Ok(()) -} - -fn update_manifest(manifest_path: &Path, opt: &Args) -> anyhow::Result<()> { - println!("Updating {:?}...", manifest_path); - - let mut metadata: Value = toml::from_slice(&fs::read(manifest_path)?)?; - let mut changed = false; - for set in ["dependencies", "dev-dependencies", "build-dependencies"] { - if let Some(dependencies) = metadata.get_mut(set) { - if !dependencies.is_table() { - bail!( - "Unexpected non-table value named `{}` in {:?}", - set, - manifest_path - ); - } - changed = update_dependencies(dependencies.as_table_mut().unwrap(), opt)? || changed; - } - } - - if changed { - fs::write(manifest_path, &toml::to_vec(&metadata)?)?; - } - - Ok(()) -} - -fn update_dependencies(dependencies: &mut Table, opt: &Args) -> anyhow::Result { - let mut changed = false; - for (key, value) in dependencies.iter_mut() { - let category = PackageCategory::from_package_name(key); - if !matches!(category, PackageCategory::Unknown) { - if !value.is_table() { - *value = Value::Table(Table::new()); - } - update_dependency_value(key, value.as_table_mut().unwrap(), opt); - changed = true; - } - } - Ok(changed) -} - -fn crate_path_name(name: &str) -> &str { - if matches!( - PackageCategory::from_package_name(name), - PackageCategory::AwsSdk - ) { - &name[SDK_PREFIX.len()..] - } else { - name - } -} - -fn update_dependency_value(crate_name: &str, value: &mut Table, opt: &Args) { - let is_sdk_crate = matches!( - PackageCategory::from_package_name(crate_name), - PackageCategory::AwsSdk | PackageCategory::AwsRuntime, - ); - - // Remove keys that will be replaced - value.remove("git"); - value.remove("branch"); - value.remove("version"); - value.remove("path"); - - // Set the `path` if one was given - if let Some(path) = &opt.sdk_path { - let crate_path = path.join(crate_path_name(crate_name)); - value.insert( - "path".to_string(), - Value::String( - crate_path - .as_os_str() - .to_str() - .expect("valid utf-8 path") - .to_string(), - ), - ); - } - - // Set the `version` if one was given - if opt.sdk_version.is_some() { - value.insert( - "version".to_string(), - Value::String( - if is_sdk_crate { - &opt.sdk_version - } else { - &opt.smithy_version - } - .clone() - .unwrap(), - ), - ); - } -} - -/// Recursively discovers Cargo.toml files in the given `path` and adds them to `manifests`. -fn discover_manifests(manifests: &mut Vec, path: impl AsRef) -> anyhow::Result<()> { - let path = path.as_ref(); - - for entry in fs::read_dir(path)? { - let entry = entry?; - if entry.path().is_dir() { - discover_manifests(manifests, entry.path())?; - } else if entry.path().is_file() - && entry.path().file_name() == Some(OsStr::new("Cargo.toml")) - { - manifests.push(entry.path()); - } - } - - Ok(()) -} - -#[cfg(test)] -mod tests { - use super::{update_manifest, Args}; - use pretty_assertions::assert_eq; - use toml::Value; - - const TEST_MANIFEST: &[u8] = br#" - [package] - name = "test" - version = "0.1.0" - [dependencies] - aws-config = "0.4.1" - aws-sdk-s3 = "0.4.1" - aws-smithy-types = "0.34.1" - aws-smithy-http = { version = "0.34.1", features = ["test-util"] } - something-else = "0.1" - "#; - - #[track_caller] - fn test_with_opt(opt: Args, expected: &[u8]) { - let manifest_file = tempfile::NamedTempFile::new().unwrap(); - let manifest_path = manifest_file.into_temp_path(); - std::fs::write(&manifest_path, TEST_MANIFEST).unwrap(); - - update_manifest(&manifest_path, &opt).expect("success"); - - let actual = toml::from_slice(&std::fs::read(&manifest_path).expect("read tmp file")) - .expect("valid toml"); - let expected: Value = toml::from_slice(expected).unwrap(); - assert_eq!(expected, actual); - } - - #[test] - fn update_dependencies_with_versions() { - test_with_opt( - Args { - crate_paths: Vec::new(), - sdk_path: None, - sdk_version: Some("0.5.0".to_string()), - smithy_version: Some("0.35.0".to_string()), - }, - br#" - [package] - name = "test" - version = "0.1.0" - [dependencies] - aws-config = { version = "0.5.0" } - aws-sdk-s3 = { version = "0.5.0" } - aws-smithy-types = { version = "0.35.0" } - aws-smithy-http = { version = "0.35.0", features = ["test-util"] } - something-else = "0.1" - "#, - ); - } - - #[test] - fn update_dependencies_with_paths() { - test_with_opt( - Args { - crate_paths: Vec::new(), - sdk_path: Some("/foo/asdf/".into()), - sdk_version: None, - smithy_version: None, - }, - br#" - [package] - name = "test" - version = "0.1.0" - [dependencies] - aws-config = { path = "/foo/asdf/aws-config" } - aws-sdk-s3 = { path = "/foo/asdf/s3" } - aws-smithy-types = { path = "/foo/asdf/aws-smithy-types" } - aws-smithy-http = { path = "/foo/asdf/aws-smithy-http", features = ["test-util"] } - something-else = "0.1" - "#, - ); - } - - #[test] - fn update_dependencies_with_versions_and_paths() { - test_with_opt( - Args { - crate_paths: Vec::new(), - sdk_path: Some("/foo/asdf/".into()), - sdk_version: Some("0.5.0".to_string()), - smithy_version: Some("0.35.0".to_string()), - }, - br#" - [package] - name = "test" - version = "0.1.0" - [dependencies] - aws-config = { version = "0.5.0", path = "/foo/asdf/aws-config" } - aws-sdk-s3 = { version = "0.5.0", path = "/foo/asdf/s3" } - aws-smithy-types = { version = "0.35.0", path = "/foo/asdf/aws-smithy-types" } - aws-smithy-http = { version = "0.35.0", path = "/foo/asdf/aws-smithy-http", features = ["test-util"] } - something-else = "0.1" - "# - ); - } -} From b45c1f03d8ee6975b85d5f968a11db36efe1dedb Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Wed, 15 Jun 2022 12:20:47 -0400 Subject: [PATCH 39/49] Fixes for RustWriter bugs #1465 & #1459 (#1467) --- CHANGELOG.next.toml | 8 ++++- .../rust/codegen/rustlang/RustWriter.kt | 8 +++-- .../amazon/smithy/rust/lang/RustWriterTest.kt | 32 +++++++++++++++++++ 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 16c847df7fb..79ce9f47c1d 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -21,4 +21,10 @@ author = "rcoh" message = "Add `Debug` implementation to several types in `aws-config`" references = ["smithy-rs#1421"] meta = { "breaking" = false, "tada" = false, "bug" = false } -author = "jdisanti" \ No newline at end of file +author = "jdisanti" + +[[smithy-rs]] +message = "Fix RustWriter bugs for `rustTemplate` and `docs` utility methods" +references = ["smithy-rs#1427", "smithy-rs#1465", "smithy-rs#1459"] +meta = { "breaking" = false, "tada" = false, "bug" = true } +author = "rcoh" diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt index 9e8dd8b0610..af20e97b991 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt @@ -136,8 +136,9 @@ fun > T.rust( /* rewrite #{foo} to #{foo:T} (the smithy template format) */ private fun transformTemplate(template: String, scope: Array>): String { check(scope.distinctBy { it.first.lowercase() }.size == scope.size) { "Duplicate cased keys not supported" } - return template.replace(Regex("""#\{([a-zA-Z_0-9]+)\}""")) { matchResult -> + return template.replace(Regex("""#\{([a-zA-Z_0-9]+)(:\w)?\}""")) { matchResult -> val keyName = matchResult.groupValues[1] + val templateType = matchResult.groupValues[2].ifEmpty { ":T" } if (!scope.toMap().keys.contains(keyName)) { throw CodegenException( "Rust block template expected `$keyName` but was not present in template.\n hint: Template contains: ${ @@ -145,7 +146,7 @@ private fun transformTemplate(template: String, scope: Array> T.docs(text: String, vararg args: Any, newlinePr // Rustdoc warns on tabs in documentation it.trimStart().replace("\t", " ") } + // Because writing docs relies on the newline prefix, ensure that there was a new line written + // before we write the docs + this.ensureNewline() write(cleaned, *args) popState() return this diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/lang/RustWriterTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/lang/RustWriterTest.kt index fed41b13995..aee26d475cb 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/lang/RustWriterTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/lang/RustWriterTest.kt @@ -15,12 +15,16 @@ import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.SetShape import software.amazon.smithy.model.shapes.StringShape import software.amazon.smithy.model.shapes.StructureShape +import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustType import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.docs import software.amazon.smithy.rust.codegen.rustlang.isEmpty +import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.testutil.asSmithyModel @@ -111,4 +115,32 @@ class RustWriterTest { val w = writable {} w.isEmpty() shouldBe true } + + @Test + fun `attributes with comments when using rust`() { + val sut = RustWriter.forModule("lib") + Attribute.Custom("foo").render(sut) + sut.rust("// heres an attribute") + sut.toString().shouldContain("#[foo]// heres an attribute") + } + + @Test + fun `attributes with comments when using docs`() { + val sut = RustWriter.forModule("lib") + Attribute.Custom("foo").render(sut) + sut.docs("heres an attribute") + sut.toString().shouldContain("#[foo]\n/// heres an attribute") + } + + @Test + fun `template writables with upper case names`() { + val inner = writable { rust("hello") } + val sut = RustWriter.forModule("lib") + sut.rustTemplate( + "inner: #{Inner:W}, regular: #{http}", + "Inner" to inner, + "http" to CargoDependency.Http.asType().member("foo") + ) + sut.toString().shouldContain("inner: hello, regular: http::foo") + } } From 898dc7060b33f931129d33e649a79e0089c7294f Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Wed, 15 Jun 2022 14:27:45 -0400 Subject: [PATCH 40/49] Writer fixes (#1469) * Fixes for RustWriter bugs #1465 & #1459 * Fix behavior causing extra newlines in docs --- .../amazon/smithy/rust/codegen/rustlang/RustWriter.kt | 6 +++--- .../smithy/generators/client/FluentClientDecorator.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt index af20e97b991..8faddc40b53 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt @@ -253,6 +253,9 @@ fun RustWriter.containerDocs(text: String, vararg args: Any): RustWriter { * - Empty newlines are removed */ fun > T.docs(text: String, vararg args: Any, newlinePrefix: String = "/// "): T { + // Because writing docs relies on the newline prefix, ensure that there was a new line written + // before we write the docs + this.ensureNewline() pushState() setNewlinePrefix(newlinePrefix) val cleaned = text.lines() @@ -260,9 +263,6 @@ fun > T.docs(text: String, vararg args: Any, newlinePr // Rustdoc warns on tabs in documentation it.trimStart().replace("\t", " ") } - // Because writing docs relies on the newline prefix, ensure that there was a new line written - // before we write the docs - this.ensureNewline() write(cleaned, *args) popState() return this diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt index 2884ceb381e..8f2146af39e 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt @@ -448,7 +448,7 @@ class FluentClientGenerator( Fluent builders are created through the [`Client`](crate::client::Client) by calling one if its operation methods. After parameters are set using the builder methods, the `send` method can be called to initiate the request. - """, + """.trim(), newlinePrefix = "//! " ) operations.forEach { operation -> From 04eeb4ff13563ec098401d5253565f94958730c0 Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Wed, 15 Jun 2022 15:18:20 -0500 Subject: [PATCH 41/49] update: simplify and fix a latent issue with bytestream's streaming impl (#1461) update: print helpful panic message for users on 32bit systems that try to stream large bodies update: CHANGELOG.next.toml --- CHANGELOG.next.toml | 9 ++++++ .../aws-smithy-http/src/byte_stream.rs | 31 ++++++++++--------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 79ce9f47c1d..05fa4cd30f3 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -17,6 +17,15 @@ references = ["aws-sdk-rust#547", "smithy-rs#1458"] meta = { "breaking" = false, "tada" = false, "bug" = true } author = "rcoh" +[[smithy-rs]] +message = """ +Fix a potential bug with `ByteStream`'s implementation of `futures_core::stream::Stream` and add helpful error messages +for users on 32-bit systems that try to stream HTTP bodies larger than 4.29Gb. +""" +references = ["smithy-rs#1460"] +meta = { "breaking" = false, "tada" = false, "bug" = false } +author = "Velfi" + [[aws-sdk-rust]] message = "Add `Debug` implementation to several types in `aws-config`" references = ["smithy-rs#1421"] diff --git a/rust-runtime/aws-smithy-http/src/byte_stream.rs b/rust-runtime/aws-smithy-http/src/byte_stream.rs index a8c18d28ede..e9b3c0ccc9a 100644 --- a/rust-runtime/aws-smithy-http/src/byte_stream.rs +++ b/rust-runtime/aws-smithy-http/src/byte_stream.rs @@ -546,31 +546,32 @@ impl Inner { } } +const SIZE_HINT_32_BIT_PANIC_MESSAGE: &str = r#" +You're running a 32-bit system and this stream's length is too large to be represented with a usize. +Please limit stream length to less than 4.294Gb or run this program on a 64-bit computer architecture. +"#; + impl futures_core::stream::Stream for Inner where - B: http_body::Body, + B: http_body::Body, { type Item = Result; fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { - match self.project().body.poll_data(cx) { - Poll::Ready(Some(Ok(mut data))) => { - let len = data.chunk().len(); - let bytes = data.copy_to_bytes(len); - Poll::Ready(Some(Ok(bytes))) - } - Poll::Ready(None) => Poll::Ready(None), - Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), - Poll::Pending => Poll::Pending, - } + self.project().body.poll_data(cx) } fn size_hint(&self) -> (usize, Option) { let size_hint = http_body::Body::size_hint(&self.body); - ( - size_hint.lower() as usize, - size_hint.upper().map(|u| u as usize), - ) + let lower = size_hint.lower().try_into(); + let upper = size_hint.upper().map(|u| u.try_into()).transpose(); + + match (lower, upper) { + (Ok(lower), Ok(upper)) => (lower, upper), + (Err(_), _) | (_, Err(_)) => { + panic!("{}", SIZE_HINT_32_BIT_PANIC_MESSAGE) + } + } } } From 40f22207ad59c74fc525ec81d46c093344b4b904 Mon Sep 17 00:00:00 2001 From: david-perez Date: Thu, 16 Jun 2022 00:06:25 +0200 Subject: [PATCH 42/49] Avoid unnecessary Cargo crate rebuilds (#1422) Avoid unnecessary Cargo crate rebuilds This commit modifies the Gradle buildscripts to avoid unnecessary Cargo rebuilds of the generated crates, decreasing development iteration cycles. Prior to this commit, if you ran a crate-generating command _twice_ on any of the `codegen-test`, `codegen-server-test`, `sdk-codegen-test`, and `codegen-server-test:python` subprojects (without making any changes to the codegen code), both invocations would take the same time: Cargo would recompile the crate and its dependencies, even when the generated crate is identical. This is because Gradle deletes everything under `buildDir` when running the `generateSmithyBuild` task: ``` > Task :codegen-server-test:smithyBuildJar Deleting stale output file: /local/home/davidpz/workplace/smithy-ws/src/SmithyRsSource/codegen-server-test/build/smithyprojections/codegen-server-test ``` So the files get recreated each time. While developing, it is likely that only a small number of the generated crate files are modified across rebuilds. [Cargo uses `mtime`](https://github.com/rust-lang/cargo/issues/6529) (among other factors) to determine whether it needs to recompile a unit. Indeed, running with `CARGO_LOG=cargo::core::compiler::fingerprint=trace` yields `err: current filesystem status shows we're outdated`. This commit adds a Gradle task that compares the hashes of the newly generated files with the (previously cached) old ones, and restores their `mtime`s if the hashes coincide. Another issue was causing unnecessary crate rebuilds. Prior to this commit, we were sending `RUSTFLAGS=-D warnings` when invoking Cargo. However, a common thing to do after generating a crate is to open its contents in an editor. The editor's `rust-analyzer` would compile the crate and its dependencies without the `RUSTFLAGS` we had used earlier. The next time you rebuilt the crate, Cargo would claim `err: RUSTFLAGS has changed: previously [], now ["-D", "warnings"]` and recompile everything again. This commit refactors the Gradle tasks so as to not send these flags when invoking Cargo, instead generating a `.cargo/config.toml` containing these flags. This way, `rust-analyzer` also picks them up and does not need to recompile the crates. With both patches, Cargo avoids unnecessary crate rebuilds. All in all, the second invocation of a `./gradlew --info -P modules='simple' -P cargoCommands='test' codegen-server-test:build` command now takes 15 seconds less than the first invocation on my `c5.4xlarge` machine; Cargo does not need to do _any_ work on the second invocation. This commit also refactors the `build.gradle.kts` files of the `sdk`, `sdk-codegen-test`, `codegen-test`, `codegen-server-test`, and `codegen-server-test:python` subprojects to make them DRYer and more consistent. The last 4 subprojects' buildscripts are now much shorter, with all the common logic having been moved to `CodegenTestCommon.kt`. Note that we have made the last 4 subprojects' `cargo check` and `cargo doc` invocations use the same set of flags than in the `sdk` subproject for consistency. Closes #1378. Closes #1412. --- aws/sdk-codegen-test/build.gradle.kts | 98 ++---------- aws/sdk/build.gradle.kts | 32 +--- buildSrc/src/main/kotlin/CodegenTestCommon.kt | 141 +++++++++++++++++- buildSrc/src/main/kotlin/HashUtils.kt | 12 ++ codegen-server-test/build.gradle.kts | 56 +------ codegen-server-test/python/build.gradle.kts | 54 +------ codegen-test/build.gradle.kts | 62 +------- gradle.properties | 3 - 8 files changed, 181 insertions(+), 277 deletions(-) create mode 100644 buildSrc/src/main/kotlin/HashUtils.kt diff --git a/aws/sdk-codegen-test/build.gradle.kts b/aws/sdk-codegen-test/build.gradle.kts index 2f92e0504dd..84d6211b48a 100644 --- a/aws/sdk-codegen-test/build.gradle.kts +++ b/aws/sdk-codegen-test/build.gradle.kts @@ -8,13 +8,14 @@ extra["moduleName"] = "software.amazon.smithy.kotlin.codegen.test" tasks["jar"].enabled = false -plugins { - id("software.amazon.smithy").version("0.5.3") -} +plugins { id("software.amazon.smithy").version("0.5.3") } val smithyVersion: String by project -val defaultRustFlags: String by project val defaultRustDocFlags: String by project +val properties = PropertyRetriever(rootProject, project) + +val pluginName = "rust-codegen" +val workingDirUnderBuildDir = "smithyprojections/sdk-codegen-test/" dependencies { implementation(project(":aws:sdk-codegen")) @@ -23,94 +24,19 @@ dependencies { implementation("software.amazon.smithy:smithy-aws-traits:$smithyVersion") } -data class CodegenTest(val service: String, val module: String, val extraConfig: String? = null) - -val CodegenTests = listOf( +val allCodegenTests = listOf( CodegenTest("com.amazonaws.apigateway#BackplaneControlService", "apigateway") ) -fun generateSmithyBuild(tests: List): String { - val projections = tests.joinToString(",\n") { - """ - "${it.module}": { - "plugins": { - "rust-codegen": { - "runtimeConfig": { - "relativePath": "${rootProject.projectDir.absolutePath}/rust-runtime" - }, - "service": "${it.service}", - "module": "${it.module}", - "moduleAuthors": ["protocoltest@example.com"], - "moduleVersion": "0.0.1" - ${it.extraConfig ?: ""} - } - } - } - """.trimIndent() - } - return """ - { - "version": "1.0", - "projections": { $projections } - } - """ -} - -task("generateSmithyBuild") { - description = "generate smithy-build.json" - doFirst { - buildDir.resolve("smithy-build.json").writeText(generateSmithyBuild(CodegenTests)) - } -} - -fun generateCargoWorkspace(tests: List): String { - return """ - [workspace] - members = [ - ${tests.joinToString(",") { "\"${it.module}/rust-codegen\"" }} - ] - """.trimIndent() -} -task("generateCargoWorkspace") { - description = "generate Cargo.toml workspace file" - doFirst { - buildDir.resolve("smithyprojections/sdk-codegen-test/Cargo.toml").writeText(generateCargoWorkspace(CodegenTests)) - } -} +project.registerGenerateSmithyBuildTask(rootProject, pluginName, allCodegenTests) +project.registerGenerateCargoWorkspaceTask(rootProject, pluginName, allCodegenTests, workingDirUnderBuildDir) tasks["smithyBuildJar"].dependsOn("generateSmithyBuild") tasks["assemble"].finalizedBy("generateCargoWorkspace") -tasks.register("cargoCheck") { - workingDir("build/smithyprojections/sdk-codegen-test/") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "check") - dependsOn("assemble") -} - -tasks.register("cargoTest") { - workingDir("build/smithyprojections/sdk-codegen-test/") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "test") - dependsOn("assemble") -} - -tasks.register("cargoDocs") { - workingDir("build/smithyprojections/sdk-codegen-test/") - environment("RUSTDOCFLAGS", defaultRustDocFlags) - commandLine("cargo", "doc", "--no-deps") - dependsOn("assemble") -} - -tasks.register("cargoClippy") { - workingDir("build/smithyprojections/sdk-codegen-test/") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "clippy") - dependsOn("assemble") -} +project.registerModifyMtimeTask() +project.registerCargoCommandsTasks(buildDir.resolve(workingDirUnderBuildDir), defaultRustDocFlags) -tasks["test"].finalizedBy("cargoCheck", "cargoClippy", "cargoTest", "cargoDocs") +tasks["test"].finalizedBy(cargoCommands(properties).map { it.toString }) -tasks["clean"].doFirst { - delete("smithy-build.json") -} +tasks["clean"].doFirst { delete("smithy-build.json") } diff --git a/aws/sdk/build.gradle.kts b/aws/sdk/build.gradle.kts index 18514574c37..394b036b024 100644 --- a/aws/sdk/build.gradle.kts +++ b/aws/sdk/build.gradle.kts @@ -23,7 +23,6 @@ configure { } val smithyVersion: String by project -val defaultRustFlags: String by project val defaultRustDocFlags: String by project val properties = PropertyRetriever(rootProject, project) @@ -393,35 +392,10 @@ tasks["assemble"].apply { finalizedBy("finalizeSdk") } -tasks.register("cargoCheck") { - workingDir(outputDir) - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "check", "--lib", "--tests", "--benches") - dependsOn("assemble") -} - -tasks.register("cargoTest") { - workingDir(outputDir) - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "test") - dependsOn("assemble") -} - -tasks.register("cargoDocs") { - workingDir(outputDir) - environment("RUSTDOCFLAGS", defaultRustDocFlags) - commandLine("cargo", "doc", "--no-deps", "--document-private-items") - dependsOn("assemble") -} - -tasks.register("cargoClippy") { - workingDir(outputDir) - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "clippy") - dependsOn("assemble") -} +project.registerCargoCommandsTasks(outputDir, defaultRustDocFlags) +project.registerGenerateCargoConfigTomlTask(outputDir) -tasks["test"].finalizedBy("cargoClippy", "cargoTest", "cargoDocs") +tasks["test"].finalizedBy(Cargo.CLIPPY, Cargo.TEST, Cargo.DOCS) tasks.register("deleteSdk") { delete = setOf(outputDir) diff --git a/buildSrc/src/main/kotlin/CodegenTestCommon.kt b/buildSrc/src/main/kotlin/CodegenTestCommon.kt index f3f29ab7b98..aa187751a02 100644 --- a/buildSrc/src/main/kotlin/CodegenTestCommon.kt +++ b/buildSrc/src/main/kotlin/CodegenTestCommon.kt @@ -1,10 +1,14 @@ -import java.lang.IllegalArgumentException - /* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ +import org.gradle.api.Project +import org.gradle.api.tasks.Exec +import org.gradle.kotlin.dsl.extra +import org.gradle.kotlin.dsl.register +import java.io.File + /** * This file contains common functionality shared across the buildscripts for the `codegen-test` and `codegen-server-test` * modules. @@ -12,7 +16,7 @@ import java.lang.IllegalArgumentException data class CodegenTest(val service: String, val module: String, val extraConfig: String? = null) -fun generateSmithyBuild(projectDir: String, pluginName: String, tests: List): String { +private fun generateSmithyBuild(projectDir: String, pluginName: String, tests: List): String { val projections = tests.joinToString(",\n") { """ "${it.module}": { @@ -49,7 +53,7 @@ enum class Cargo(val toString: String) { CLIPPY("cargoClippy"); } -fun generateCargoWorkspace(pluginName: String, tests: List) = +private fun generateCargoWorkspace(pluginName: String, tests: List) = """ [workspace] members = [ @@ -60,7 +64,7 @@ fun generateCargoWorkspace(pluginName: String, tests: List) = /** * Filter the service integration tests for which to generate Rust crates in [allTests] using the given [properties]. */ -fun codegenTests(properties: PropertyRetriever, allTests: List): List { +private fun codegenTests(properties: PropertyRetriever, allTests: List): List { val modulesOverride = properties.get("modules")?.split(",")?.map { it.trim() } val ret = if (modulesOverride != null) { @@ -76,6 +80,7 @@ fun codegenTests(properties: PropertyRetriever, allTests: List): Li } val AllCargoCommands = listOf(Cargo.CHECK, Cargo.TEST, Cargo.CLIPPY, Cargo.DOCS) + /** * Filter the Cargo commands to be run on the generated Rust crates using the given [properties]. * The list of Cargo commands that is run by default is defined in [AllCargoCommands]. @@ -102,3 +107,129 @@ fun cargoCommands(properties: PropertyRetriever): List { } return ret } + +fun Project.registerGenerateSmithyBuildTask( + rootProject: Project, + pluginName: String, + allCodegenTests: List +) { + val properties = PropertyRetriever(rootProject, this) + this.tasks.register("generateSmithyBuild") { + description = "generate smithy-build.json" + outputs.file(project.projectDir.resolve("smithy-build.json")) + + doFirst { + project.projectDir.resolve("smithy-build.json") + .writeText( + generateSmithyBuild( + rootProject.projectDir.absolutePath, + pluginName, + codegenTests(properties, allCodegenTests) + ) + ) + + // If this is a rebuild, cache all the hashes of the generated Rust files. These are later used by the + // `modifyMtime` task. + project.extra["previousBuildHashes"] = project.buildDir.walk() + .filter { it.isFile } + .map { + getChecksumForFile(it) to it.lastModified() + } + .toMap() + } + } +} + +fun Project.registerGenerateCargoWorkspaceTask( + rootProject: Project, + pluginName: String, + allCodegenTests: List, + workingDirUnderBuildDir: String +) { + val properties = PropertyRetriever(rootProject, this) + project.tasks.register("generateCargoWorkspace") { + description = "generate Cargo.toml workspace file" + doFirst { + project.buildDir.resolve("$workingDirUnderBuildDir/Cargo.toml") + .writeText(generateCargoWorkspace(pluginName, codegenTests(properties, allCodegenTests))) + } + } +} + +fun Project.registerGenerateCargoConfigTomlTask( + outputDir: File +) { + this.tasks.register("generateCargoConfigToml") { + description = "generate `.cargo/config.toml`" + doFirst { + outputDir.resolve(".cargo").mkdir() + outputDir.resolve(".cargo/config.toml") + .writeText( + """ + [build] + rustflags = ["--deny", "warnings"] + """.trimIndent() + ) + } + } +} + +fun Project.registerModifyMtimeTask() { + // Cargo uses `mtime` (among other factors) to determine whether a compilation unit needs a rebuild. While developing, + // it is likely that only a small number of the generated crate files are modified across rebuilds. This task compares + // the hashes of the newly generated files with the (previously cached) old ones, and restores their `mtime`s if the + // hashes coincide. + // Debugging tip: it is useful to run with `CARGO_LOG=cargo::core::compiler::fingerprint=trace` to learn why Cargo + // determines a compilation unit needs a rebuild. + // For more information see https://github.com/awslabs/smithy-rs/issues/1412. + this.tasks.register("modifyMtime") { + description = "modify Rust files' `mtime` if the contents did not change" + dependsOn("generateSmithyBuild") + + doFirst { + @Suppress("UNCHECKED_CAST") val previousBuildHashes: Map = project.extra["previousBuildHashes"] as Map + + project.buildDir.walk() + .filter { it.isFile } + .map { + getChecksumForFile(it) to it + } + .forEach { (currentHash, currentFile) -> + previousBuildHashes[currentHash]?.also { oldMtime -> + println("Setting `mtime` of $currentFile back to `$oldMtime` because its hash `$currentHash` remained unchanged after a rebuild.") + currentFile.setLastModified(oldMtime) + } + } + } + } +} + +fun Project.registerCargoCommandsTasks( + outputDir: File, + defaultRustDocFlags: String +) { + this.tasks.register(Cargo.CHECK.toString) { + dependsOn("assemble", "modifyMtime", "generateCargoConfigToml") + workingDir(outputDir) + commandLine("cargo", "check", "--lib", "--tests", "--benches") + } + + this.tasks.register(Cargo.TEST.toString) { + dependsOn("assemble", "modifyMtime", "generateCargoConfigToml") + workingDir(outputDir) + commandLine("cargo", "test") + } + + this.tasks.register(Cargo.DOCS.toString) { + dependsOn("assemble", "modifyMtime", "generateCargoConfigToml") + workingDir(outputDir) + environment("RUSTDOCFLAGS", defaultRustDocFlags) + commandLine("cargo", "doc", "--no-deps", "--document-private-items") + } + + this.tasks.register(Cargo.CLIPPY.toString) { + dependsOn("assemble", "modifyMtime", "generateCargoConfigToml") + workingDir(outputDir) + commandLine("cargo", "clippy") + } +} diff --git a/buildSrc/src/main/kotlin/HashUtils.kt b/buildSrc/src/main/kotlin/HashUtils.kt new file mode 100644 index 00000000000..fb093c15712 --- /dev/null +++ b/buildSrc/src/main/kotlin/HashUtils.kt @@ -0,0 +1,12 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +import java.io.File +import java.security.MessageDigest + +fun ByteArray.toHex() = joinToString(separator = "") { byte -> "%02x".format(byte) } + +fun getChecksumForFile(file: File, digest: MessageDigest = MessageDigest.getInstance("SHA-256")): String = + digest.digest(file.readText().toByteArray()).toHex() diff --git a/codegen-server-test/build.gradle.kts b/codegen-server-test/build.gradle.kts index bbb5aba6e33..6abd77eea7c 100644 --- a/codegen-server-test/build.gradle.kts +++ b/codegen-server-test/build.gradle.kts @@ -12,7 +12,6 @@ tasks["jar"].enabled = false plugins { id("software.amazon.smithy").version("0.5.3") } val smithyVersion: String by project -val defaultRustFlags: String by project val defaultRustDocFlags: String by project val properties = PropertyRetriever(rootProject, project) @@ -45,58 +44,15 @@ val allCodegenTests = listOf( CodegenTest("com.aws.example#PokemonService", "pokemon_service_sdk") ) -tasks.register("generateSmithyBuild") { - description = "generate smithy-build.json" - doFirst { - projectDir.resolve("smithy-build.json") - .writeText( - generateSmithyBuild( - rootProject.projectDir.absolutePath, - pluginName, - codegenTests(properties, allCodegenTests) - ) - ) - } -} - -tasks.register("generateCargoWorkspace") { - description = "generate Cargo.toml workspace file" - doFirst { - buildDir.resolve("$workingDirUnderBuildDir/Cargo.toml") - .writeText(generateCargoWorkspace(pluginName, codegenTests(properties, allCodegenTests))) - } -} +project.registerGenerateSmithyBuildTask(rootProject, pluginName, allCodegenTests) +project.registerGenerateCargoWorkspaceTask(rootProject, pluginName, allCodegenTests, workingDirUnderBuildDir) +project.registerGenerateCargoConfigTomlTask(buildDir.resolve(workingDirUnderBuildDir)) tasks["smithyBuildJar"].dependsOn("generateSmithyBuild") -tasks["assemble"].finalizedBy("generateCargoWorkspace") - -tasks.register(Cargo.CHECK.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "check") - dependsOn("assemble") -} - -tasks.register(Cargo.TEST.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "test") - dependsOn("assemble") -} +tasks["assemble"].finalizedBy("generateCargoWorkspace", "generateCargoConfigToml") -tasks.register(Cargo.DOCS.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTDOCFLAGS", defaultRustDocFlags) - commandLine("cargo", "doc", "--no-deps") - dependsOn("assemble") -} - -tasks.register(Cargo.CLIPPY.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "clippy") - dependsOn("assemble") -} +project.registerModifyMtimeTask() +project.registerCargoCommandsTasks(buildDir.resolve(workingDirUnderBuildDir), defaultRustDocFlags) tasks["test"].finalizedBy(cargoCommands(properties).map { it.toString }) diff --git a/codegen-server-test/python/build.gradle.kts b/codegen-server-test/python/build.gradle.kts index 51d7971a82b..d6d345f8f14 100644 --- a/codegen-server-test/python/build.gradle.kts +++ b/codegen-server-test/python/build.gradle.kts @@ -12,7 +12,6 @@ tasks["jar"].enabled = false plugins { id("software.amazon.smithy") } val smithyVersion: String by project -val defaultRustFlags: String by project val defaultRustDocFlags: String by project val properties = PropertyRetriever(rootProject, project) @@ -42,58 +41,15 @@ val allCodegenTests = listOf( CodegenTest("com.aws.example#PokemonService", "pokemon_service_sdk") ) -task("generateSmithyBuild") { - description = "generate smithy-build.json" - doFirst { - projectDir.resolve("smithy-build.json") - .writeText( - generateSmithyBuild( - rootProject.projectDir.absolutePath, - pluginName, - codegenTests(properties, allCodegenTests) - ) - ) - } -} - -task("generateCargoWorkspace") { - description = "generate Cargo.toml workspace file" - doFirst { - buildDir.resolve("$workingDirUnderBuildDir/Cargo.toml") - .writeText(generateCargoWorkspace(pluginName, codegenTests(properties, allCodegenTests))) - } -} +project.registerGenerateSmithyBuildTask(rootProject, pluginName, allCodegenTests) +project.registerGenerateCargoWorkspaceTask(rootProject, pluginName, allCodegenTests, workingDirUnderBuildDir) +project.registerGenerateCargoConfigTomlTask(buildDir.resolve(workingDirUnderBuildDir)) tasks["smithyBuildJar"].dependsOn("generateSmithyBuild") tasks["assemble"].finalizedBy("generateCargoWorkspace") -tasks.register(Cargo.CHECK.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "check") - dependsOn("assemble") -} - -tasks.register(Cargo.TEST.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "test") - dependsOn("assemble") -} - -tasks.register(Cargo.DOCS.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTDOCFLAGS", defaultRustDocFlags) - commandLine("cargo", "doc", "--no-deps") - dependsOn("assemble") -} - -tasks.register(Cargo.CLIPPY.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "clippy") - dependsOn("assemble") -} +project.registerModifyMtimeTask() +project.registerCargoCommandsTasks(buildDir.resolve(workingDirUnderBuildDir), defaultRustDocFlags) tasks["test"].finalizedBy(cargoCommands(properties).map { it.toString }) diff --git a/codegen-test/build.gradle.kts b/codegen-test/build.gradle.kts index e9755f95001..235e980d5ba 100644 --- a/codegen-test/build.gradle.kts +++ b/codegen-test/build.gradle.kts @@ -8,12 +8,9 @@ extra["moduleName"] = "software.amazon.smithy.kotlin.codegen.test" tasks["jar"].enabled = false -plugins { - id("software.amazon.smithy").version("0.5.3") -} +plugins { id("software.amazon.smithy").version("0.5.3") } val smithyVersion: String by project -val defaultRustFlags: String by project val defaultRustDocFlags: String by project val properties = PropertyRetriever(rootProject, project) @@ -88,61 +85,16 @@ val allCodegenTests = listOf( CodegenTest("com.aws.example#PokemonService", "pokemon_service_client") ) -tasks.register("generateSmithyBuild") { - description = "generate smithy-build.json" - doFirst { - projectDir.resolve("smithy-build.json") - .writeText( - generateSmithyBuild( - rootProject.projectDir.absolutePath, - pluginName, - codegenTests(properties, allCodegenTests) - ) - ) - } -} - -tasks.register("generateCargoWorkspace") { - description = "generate Cargo.toml workspace file" - doFirst { - buildDir.resolve("$workingDirUnderBuildDir/Cargo.toml") - .writeText(generateCargoWorkspace(pluginName, codegenTests(properties, allCodegenTests))) - } -} +project.registerGenerateSmithyBuildTask(rootProject, pluginName, allCodegenTests) +project.registerGenerateCargoWorkspaceTask(rootProject, pluginName, allCodegenTests, workingDirUnderBuildDir) +project.registerGenerateCargoConfigTomlTask(buildDir.resolve(workingDirUnderBuildDir)) tasks["smithyBuildJar"].dependsOn("generateSmithyBuild") tasks["assemble"].finalizedBy("generateCargoWorkspace") -tasks.register(Cargo.CHECK.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "check") - dependsOn("assemble") -} - -tasks.register(Cargo.TEST.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "test") - dependsOn("assemble") -} - -tasks.register(Cargo.DOCS.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTDOCFLAGS", defaultRustDocFlags) - commandLine("cargo", "doc", "--no-deps") - dependsOn("assemble") -} - -tasks.register(Cargo.CLIPPY.toString) { - workingDir("$buildDir/$workingDirUnderBuildDir") - environment("RUSTFLAGS", defaultRustFlags) - commandLine("cargo", "clippy") - dependsOn("assemble") -} +project.registerModifyMtimeTask() +project.registerCargoCommandsTasks(buildDir.resolve(workingDirUnderBuildDir), defaultRustDocFlags) tasks["test"].finalizedBy(cargoCommands(properties).map { it.toString }) -tasks["clean"].doFirst { - delete("smithy-build.json") -} +tasks["clean"].doFirst { delete("smithy-build.json") } diff --git a/gradle.properties b/gradle.properties index fb4504bf4b5..9aac8d05f0e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,9 +27,6 @@ kotlinVersion=1.6.20 ktlintVersion=0.45.2 kotestVersion=5.2.3 -# rustc -defaultRustFlags=-D warnings - # TODO(https://github.com/awslabs/smithy-rs/issues/1068): Once doc normalization # is completed, warnings can be prohibited in rustdoc. # From 2f2db5a637736c78dbecd3bf0c0c7e362516b30e Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Thu, 16 Jun 2022 14:37:01 -0500 Subject: [PATCH 43/49] =?UTF-8?q?rename:=20hosted=5Fzone=5Fpreprocessor.rs?= =?UTF-8?q?=20to=20route53=5Fresource=5Fid=5Fpreprocess=E2=80=A6=20(#1472)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rename: hosted_zone_preprocessor.rs to route53_resource_id_preprocessor.rs update: trim_hosted_zone to work for more resource ids add: new Route53 protocol test for GetChange resource id trimming update: InlineDependency.forRustFile to accept filenames with a ".rs" extension add: CHANGELOG.next.toml entry --- CHANGELOG.next.toml | 10 +++ .../src/hosted_zone_preprocessor.rs | 61 -------------- aws/rust-runtime/aws-inlineable/src/lib.rs | 4 +- .../src/route53_resource_id_preprocessor.rs | 82 +++++++++++++++++++ .../customize/route53/Route53Decorator.kt | 28 ++++--- .../{TrimHostedZone.kt => TrimResourceId.kt} | 6 +- aws/sdk/aws-models/route53-tests.smithy | 32 +++++++- aws/sdk/integration-tests/Cargo.toml | 2 +- .../rust/codegen/rustlang/CargoDependency.kt | 2 +- 9 files changed, 146 insertions(+), 81 deletions(-) delete mode 100644 aws/rust-runtime/aws-inlineable/src/hosted_zone_preprocessor.rs create mode 100644 aws/rust-runtime/aws-inlineable/src/route53_resource_id_preprocessor.rs rename aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/{TrimHostedZone.kt => TrimResourceId.kt} (63%) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 05fa4cd30f3..69f79589ca7 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -37,3 +37,13 @@ message = "Fix RustWriter bugs for `rustTemplate` and `docs` utility methods" references = ["smithy-rs#1427", "smithy-rs#1465", "smithy-rs#1459"] meta = { "breaking" = false, "tada" = false, "bug" = true } author = "rcoh" + +[[smithy-rs]] +message = """ +Requests to Route53 that return `ResourceId`s often come with a prefix. When passing those IDs directly into another +request, the request would fail unless they manually stripped the prefix. Now, when making a request with a prefixed ID, +the prefix will be stripped automatically. +""" +references = ["aws-sdk-rust#554"] +meta = { "breaking" = false, "tada" = false, "bug" = true } +author = "Velfi" diff --git a/aws/rust-runtime/aws-inlineable/src/hosted_zone_preprocessor.rs b/aws/rust-runtime/aws-inlineable/src/hosted_zone_preprocessor.rs deleted file mode 100644 index 0bfd184e422..00000000000 --- a/aws/rust-runtime/aws-inlineable/src/hosted_zone_preprocessor.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -/// Strip the /hostedzone/ prefix from zone-id -pub fn trim_hosted_zone(zone: &mut Option) { - const PREFIXES: &[&str; 2] = &["/hostedzone/", "hostedzone/"]; - - for prefix in PREFIXES { - if let Some(core_zone) = zone.as_deref().unwrap_or_default().strip_prefix(prefix) { - *zone = Some(core_zone.to_string()); - return; - } - } -} - -#[cfg(test)] -mod test { - use crate::hosted_zone_preprocessor::trim_hosted_zone; - - struct OperationInput { - hosted_zone: Option, - } - - #[test] - fn does_not_change_regular_zones() { - let mut operation = OperationInput { - hosted_zone: Some("Z0441723226OZ66S5ZCNZ".to_string()), - }; - trim_hosted_zone(&mut operation.hosted_zone); - assert_eq!( - &operation.hosted_zone.unwrap_or_default(), - "Z0441723226OZ66S5ZCNZ" - ); - } - - #[test] - fn sanitizes_prefixed_zone() { - let mut operation = OperationInput { - hosted_zone: Some("/hostedzone/Z0441723226OZ66S5ZCNZ".to_string()), - }; - trim_hosted_zone(&mut operation.hosted_zone); - assert_eq!( - &operation.hosted_zone.unwrap_or_default(), - "Z0441723226OZ66S5ZCNZ" - ); - } - - #[test] - fn allow_no_leading_slash() { - let mut operation = OperationInput { - hosted_zone: Some("hostedzone/Z0441723226OZ66S5ZCNZ".to_string()), - }; - trim_hosted_zone(&mut operation.hosted_zone); - assert_eq!( - &operation.hosted_zone.unwrap_or_default(), - "Z0441723226OZ66S5ZCNZ" - ); - } -} diff --git a/aws/rust-runtime/aws-inlineable/src/lib.rs b/aws/rust-runtime/aws-inlineable/src/lib.rs index 56772271406..76b285f7088 100644 --- a/aws/rust-runtime/aws-inlineable/src/lib.rs +++ b/aws/rust-runtime/aws-inlineable/src/lib.rs @@ -33,5 +33,5 @@ pub mod glacier_checksums; /// Default middleware stack for AWS services pub mod middleware; -/// Strip `hostedzone/` from hosted zone ids -pub mod hosted_zone_preprocessor; +/// Strip prefixes from IDs returned by Route53 operations when those IDs are used to construct requests +pub mod route53_resource_id_preprocessor; diff --git a/aws/rust-runtime/aws-inlineable/src/route53_resource_id_preprocessor.rs b/aws/rust-runtime/aws-inlineable/src/route53_resource_id_preprocessor.rs new file mode 100644 index 00000000000..b1827f065ac --- /dev/null +++ b/aws/rust-runtime/aws-inlineable/src/route53_resource_id_preprocessor.rs @@ -0,0 +1,82 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +// This function is only used to strip prefixes from resource IDs at the time they're passed as +// input to a request. Resource IDs returned in responses may or may not include a prefix. +/// Strip the resource type prefix from resource ID return +pub fn trim_resource_id(resource_id: &mut Option) { + const PREFIXES: &[&str] = &[ + "/hostedzone/", + "hostedzone/", + "/change/", + "change/", + "/delegationset/", + "delegationset/", + ]; + + for prefix in PREFIXES { + if let Some(id) = resource_id + .as_deref() + .unwrap_or_default() + .strip_prefix(prefix) + { + *resource_id = Some(id.to_string()); + return; + } + } +} + +#[cfg(test)] +mod test { + use crate::route53_resource_id_preprocessor::trim_resource_id; + + #[test] + fn does_not_change_regular_zones() { + struct OperationInput { + resource: Option, + } + + let mut operation = OperationInput { + resource: Some("Z0441723226OZ66S5ZCNZ".to_string()), + }; + trim_resource_id(&mut operation.resource); + assert_eq!( + &operation.resource.unwrap_or_default(), + "Z0441723226OZ66S5ZCNZ" + ); + } + + #[test] + fn sanitizes_prefixed_zone() { + struct OperationInput { + change_id: Option, + } + + let mut operation = OperationInput { + change_id: Some("/change/Z0441723226OZ66S5ZCNZ".to_string()), + }; + trim_resource_id(&mut operation.change_id); + assert_eq!( + &operation.change_id.unwrap_or_default(), + "Z0441723226OZ66S5ZCNZ" + ); + } + + #[test] + fn allow_no_leading_slash() { + struct OperationInput { + hosted_zone: Option, + } + + let mut operation = OperationInput { + hosted_zone: Some("hostedzone/Z0441723226OZ66S5ZCNZ".to_string()), + }; + trim_resource_id(&mut operation.hosted_zone); + assert_eq!( + &operation.hosted_zone.unwrap_or_default(), + "Z0441723226OZ66S5ZCNZ" + ); + } +} diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt index 7a0338fb4f2..ff8b617ae4f 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt @@ -37,9 +37,9 @@ class Route53Decorator : RustCodegenDecorator { override fun transformModel(service: ServiceShape, model: Model): Model { return model.letIf(applies(service)) { ModelTransformer.create().mapShapes(model) { shape -> - shape.letIf(isHostId(shape)) { - logger.info("Adding TrimHostedZone trait to $shape") - (shape as MemberShape).toBuilder().addTrait(TrimHostedZone()).build() + shape.letIf(isResourceId(shape)) { + logger.info("Adding TrimResourceId trait to $shape") + (shape as MemberShape).toBuilder().addTrait(TrimResourceId()).build() } } } @@ -50,29 +50,35 @@ class Route53Decorator : RustCodegenDecorator { operation: OperationShape, baseCustomizations: List ): List { - val hostedZoneMember = operation.inputShape(codegenContext.model).members().find { it.hasTrait() } + val hostedZoneMember = + operation.inputShape(codegenContext.model).members().find { it.hasTrait() } return if (hostedZoneMember != null) { - baseCustomizations + TrimHostedZoneCustomization(codegenContext.symbolProvider.toMemberName(hostedZoneMember)) + baseCustomizations + TrimResourceIdCustomization(codegenContext.symbolProvider.toMemberName(hostedZoneMember)) } else baseCustomizations } - private fun isHostId(shape: Shape): Boolean { + private fun isResourceId(shape: Shape): Boolean { return (shape is MemberShape && shape.target == ShapeId.from("com.amazonaws.route53#ResourceId")) && shape.hasTrait() } } -class TrimHostedZoneCustomization(private val fieldName: String) : OperationCustomization() { +class TrimResourceIdCustomization(private val fieldName: String) : OperationCustomization() { override fun mutSelf(): Boolean = true override fun consumesSelf(): Boolean = true - private val trimZone = - RuntimeType.forInlineDependency(InlineAwsDependency.forRustFile("hosted_zone_preprocessor")) - .member("trim_hosted_zone") + private val trimResourceId = + RuntimeType.forInlineDependency( + InlineAwsDependency.forRustFile("route53_resource_id_preprocessor") + ) + .member("trim_resource_id") override fun section(section: OperationSection): Writable { return when (section) { is OperationSection.MutateInput -> writable { - rustTemplate("#{trim_hosted_zone}(&mut ${section.input}.$fieldName);", "trim_hosted_zone" to trimZone) + rustTemplate( + "#{trim_resource_id}(&mut ${section.input}.$fieldName);", + "trim_resource_id" to trimResourceId + ) } else -> emptySection } diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/TrimHostedZone.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/TrimResourceId.kt similarity index 63% rename from aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/TrimHostedZone.kt rename to aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/TrimResourceId.kt index 59a4bb6871a..1c61667feae 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/TrimHostedZone.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/TrimResourceId.kt @@ -10,10 +10,10 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.traits.AnnotationTrait /** - * Indicates that a member should have the `hostedzone` prefix stripped + * Indicates that a member should have their resource ID prefix stripped */ -class TrimHostedZone() : AnnotationTrait(ID, Node.objectNode()) { +class TrimResourceId() : AnnotationTrait(ID, Node.objectNode()) { companion object { - val ID = ShapeId.from("aws.api.internal#trimHostedZone") + val ID: ShapeId = ShapeId.from("aws.api.internal#trimResourceId") } } diff --git a/aws/sdk/aws-models/route53-tests.smithy b/aws/sdk/aws-models/route53-tests.smithy index d55d67d0bb0..36e3e234ef9 100644 --- a/aws/sdk/aws-models/route53-tests.smithy +++ b/aws/sdk/aws-models/route53-tests.smithy @@ -7,8 +7,8 @@ use smithy.test#httpRequestTests apply ListResourceRecordSets @httpRequestTests([ { - id: "ListResourceRecordSetsTrimHostdZone", - documentation: "This test validates that that hosted zone is correctly trimmed", + id: "ListResourceRecordSetsTrimHostedZone", + documentation: "This test validates that hosted zone is correctly trimmed", method: "GET", protocol: "aws.protocols#restXml", uri: "/2013-04-01/hostedzone/IDOFMYHOSTEDZONE/rrset", @@ -18,3 +18,31 @@ apply ListResourceRecordSets @httpRequestTests([ } } ]) + +apply GetChange @httpRequestTests([ + { + id: "GetChangeTrimChangeId", + documentation: "This test validates that change id is correctly trimmed", + method: "GET", + protocol: "aws.protocols#restXml", + uri: "/2013-04-01/change/SOMECHANGEID", + bodyMediaType: "application/xml", + params: { + "Id": "/change/SOMECHANGEID" + } + }, +]) + +apply GetReusableDelegationSet @httpRequestTests([ + { + id: "GetReusableDelegationSetTrimDelegationSetId", + documentation: "This test validates that delegation set id is correctly trimmed", + method: "GET", + protocol: "aws.protocols#restXml", + uri: "/2013-04-01/delegationset/DELEGATIONSETID", + bodyMediaType: "application/xml", + params: { + "Id": "/delegationset/DELEGATIONSETID" + } + }, +]) diff --git a/aws/sdk/integration-tests/Cargo.toml b/aws/sdk/integration-tests/Cargo.toml index ae426a1fb8c..06e119e43b6 100644 --- a/aws/sdk/integration-tests/Cargo.toml +++ b/aws/sdk/integration-tests/Cargo.toml @@ -4,6 +4,7 @@ members = [ "dynamodb", "ec2", + "glacier", "iam", "kms", "polly", @@ -12,5 +13,4 @@ members = [ "s3control", "sts", "transcribestreaming", - "glacier" ] diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt index 9189492aba0..a804112f997 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt @@ -83,7 +83,7 @@ class InlineDependency( vararg additionalDependencies: RustDependency ): InlineDependency { val module = RustModule.default(name, visibility) - val filename = "$name.rs" + val filename = if (name.endsWith(".rs")) { name } else { "$name.rs" } // The inline crate is loaded as a dependency on the runtime classpath val rustFile = this::class.java.getResource("/$baseDir/src/$filename") check(rustFile != null) { "Rust file /$baseDir/src/$filename was missing from the resource bundle!" } From 5af3b106a0ac345ac16a86efb75f13655f9f469d Mon Sep 17 00:00:00 2001 From: david-perez Date: Fri, 17 Jun 2022 15:44:58 +0200 Subject: [PATCH 44/49] Remove `#[doc(hidden)]` from `aws_smithy_http_server::body::BoxBody` (#1453) And from the `boxed` body function. These are necessary if users need to implement middleware (`tower::Layer`s) that use the request's body. --- rust-runtime/aws-smithy-http-server/src/body.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rust-runtime/aws-smithy-http-server/src/body.rs b/rust-runtime/aws-smithy-http-server/src/body.rs index 81701067294..116903b7723 100644 --- a/rust-runtime/aws-smithy-http-server/src/body.rs +++ b/rust-runtime/aws-smithy-http-server/src/body.rs @@ -4,22 +4,21 @@ */ //! HTTP body utilities. + +// Used in the codegen in trait bounds. #[doc(hidden)] pub use http_body::Body as HttpBody; -#[doc(hidden)] pub use hyper::body::Body; use bytes::Bytes; use crate::error::{BoxError, Error}; -#[doc(hidden)] pub type BoxBody = http_body::combinators::UnsyncBoxBody; // `boxed` is used in the codegen of the implementation of the operation `Handler` trait. /// Convert a [`http_body::Body`] into a [`BoxBody`]. -#[doc(hidden)] pub fn boxed(body: B) -> BoxBody where B: http_body::Body + Send + 'static, From a91b813e43c01606d6ba5c01353adea6a1fe417d Mon Sep 17 00:00:00 2001 From: david-perez Date: Fri, 17 Jun 2022 18:12:56 +0200 Subject: [PATCH 45/49] Fix `modifyMtime` task when `generateSmithyBuild` task is up to date (#1471) When `generateSmithyBuild` task is up to date, the hashes of the build are not calculated, so `modifyMtime` fails, because it expects them to be registered in Gradle's project properties. This can happen if you run a command like `./gradlew codegen-server-test:test` twice consecutively. In this case, we should skip the `modifyMtime` task altogether. Everything is up to date, so no codegen will run, and no artifacts will change. --- buildSrc/src/main/kotlin/CodegenTestCommon.kt | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/buildSrc/src/main/kotlin/CodegenTestCommon.kt b/buildSrc/src/main/kotlin/CodegenTestCommon.kt index aa187751a02..74b9b313ae4 100644 --- a/buildSrc/src/main/kotlin/CodegenTestCommon.kt +++ b/buildSrc/src/main/kotlin/CodegenTestCommon.kt @@ -130,7 +130,7 @@ fun Project.registerGenerateSmithyBuildTask( // If this is a rebuild, cache all the hashes of the generated Rust files. These are later used by the // `modifyMtime` task. - project.extra["previousBuildHashes"] = project.buildDir.walk() + project.extra[previousBuildHashesKey] = project.buildDir.walk() .filter { it.isFile } .map { getChecksumForFile(it) to it.lastModified() @@ -174,6 +174,8 @@ fun Project.registerGenerateCargoConfigTomlTask( } } +const val previousBuildHashesKey = "previousBuildHashes" + fun Project.registerModifyMtimeTask() { // Cargo uses `mtime` (among other factors) to determine whether a compilation unit needs a rebuild. While developing, // it is likely that only a small number of the generated crate files are modified across rebuilds. This task compares @@ -187,19 +189,23 @@ fun Project.registerModifyMtimeTask() { dependsOn("generateSmithyBuild") doFirst { - @Suppress("UNCHECKED_CAST") val previousBuildHashes: Map = project.extra["previousBuildHashes"] as Map - - project.buildDir.walk() - .filter { it.isFile } - .map { - getChecksumForFile(it) to it - } - .forEach { (currentHash, currentFile) -> - previousBuildHashes[currentHash]?.also { oldMtime -> - println("Setting `mtime` of $currentFile back to `$oldMtime` because its hash `$currentHash` remained unchanged after a rebuild.") - currentFile.setLastModified(oldMtime) + if (!project.extra.has(previousBuildHashesKey)) { + println("No hashes from a previous build exist because `generateSmithyBuild` is up to date, skipping `mtime` fixups") + } else { + @Suppress("UNCHECKED_CAST") val previousBuildHashes: Map = project.extra[previousBuildHashesKey] as Map + + project.buildDir.walk() + .filter { it.isFile } + .map { + getChecksumForFile(it) to it } - } + .forEach { (currentHash, currentFile) -> + previousBuildHashes[currentHash]?.also { oldMtime -> + println("Setting `mtime` of $currentFile back to `$oldMtime` because its hash `$currentHash` remained unchanged after a rebuild.") + currentFile.setLastModified(oldMtime) + } + } + } } } } From a3c7902d7c9b4013fb5f77a0d29e369b7f853264 Mon Sep 17 00:00:00 2001 From: Fahad Zubair Date: Tue, 21 Jun 2022 17:17:21 +0100 Subject: [PATCH 46/49] =?UTF-8?q?Refactor:=20Attribute.class=20used=20inst?= =?UTF-8?q?ead=20of=20helper=20methods=20in=20PythonSer=E2=80=A6=20(#1475)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor: Attribute.class used instead of helper methods in PythonServerAttributeUtils Helper methods in PythonServerAttributeUtils have been deprecated in favor of using Attribute.class directly Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com> * Smithy Python: PyException removed from enum Smithy enums do not have ErrorTrait so there is no need to check and generate code for pyo3::exceptions::PyException Co-authored-by: Fahad Zubair Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com> --- .../generators/PythonServerAttributeUtils.kt | 43 ------------------- .../generators/PythonServerEnumGenerator.kt | 16 +++++-- .../PythonServerStructureGenerator.kt | 14 ++++-- 3 files changed, 24 insertions(+), 49 deletions(-) delete mode 100644 codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerAttributeUtils.kt diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerAttributeUtils.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerAttributeUtils.kt deleted file mode 100644 index f65eb27d104..00000000000 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerAttributeUtils.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.rust.codegen.server.python.smithy.generators - -import software.amazon.smithy.model.shapes.Shape -import software.amazon.smithy.model.traits.ErrorTrait -import software.amazon.smithy.rust.codegen.rustlang.RustWriter -import software.amazon.smithy.rust.codegen.rustlang.asType -import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency -import software.amazon.smithy.rust.codegen.util.hasTrait - -/** - * This module contains utilities to render PyO3 attributes. - * - * TODO(https://github.com/awslabs/smithy-rs/issues/1465): Switch to `Attribute.Custom` and get rid of this class. - */ - -private val codegenScope = arrayOf( - "pyo3" to PythonServerCargoDependency.PyO3.asType(), -) - -// Renders #[pyo3::pyclass] attribute, inheriting from `Exception` if the shape has the `ErrorTrait` attached. -fun RustWriter.renderPyClass(shape: Shape) { - if (shape.hasTrait()) { - rustTemplate("##[#{pyo3}::pyclass(extends = #{pyo3}::exceptions::PyException)]", *codegenScope) - } else { - rustTemplate("##[#{pyo3}::pyclass]", *codegenScope) - } -} - -// Renders #[pyo3::pymethods] attribute. -fun RustWriter.renderPyMethods() { - rustTemplate("##[#{pyo3}::pymethods]", *codegenScope) -} - -// Renders #[pyo3(get, set)] attribute. -fun RustWriter.renderPyGetterSetter() { - rustTemplate("##[#{pyo3}(get, set)]", *codegenScope) -} diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt index 4cb1708a777..e7f3eced53a 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt @@ -8,8 +8,11 @@ package software.amazon.smithy.rust.codegen.server.python.smithy.generators import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.StringShape import software.amazon.smithy.model.traits.EnumTrait +import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.RustWriter +import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rust +import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerEnumGenerator import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider @@ -28,19 +31,26 @@ class PythonServerEnumGenerator( runtimeConfig: RuntimeConfig, ) : ServerEnumGenerator(model, symbolProvider, writer, shape, enumTrait, runtimeConfig) { + private val pyo3Symbols = listOf(PythonServerCargoDependency.PyO3.asType()) + override fun render() { - writer.renderPyClass(shape) + renderPyClass() super.render() renderPyO3Methods() } + private fun renderPyClass() { + Attribute.Custom("pyo3::pyclass", symbols = pyo3Symbols).render(writer) + } + override fun renderFromForStr() { - writer.renderPyClass(shape) + renderPyClass() super.renderFromForStr() } private fun renderPyO3Methods() { - writer.renderPyMethods() + Attribute.Custom("pyo3::pymethods", symbols = pyo3Symbols).render(writer) + writer.rust( """ impl $enumName { diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt index 7c3b59d2e08..8e15cf86aad 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt @@ -10,12 +10,15 @@ import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.MemberShape import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.traits.ErrorTrait +import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.rustlang.Writable +import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.render import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable +import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.smithy.rustType @@ -33,20 +36,25 @@ open class PythonServerStructureGenerator( private val shape: StructureShape ) : StructureGenerator(model, symbolProvider, writer, shape) { + private val pyo3Symbols = listOf(PythonServerCargoDependency.PyO3.asType()) + override fun renderStructure() { - writer.renderPyClass(shape) + if (shape.hasTrait()) + Attribute.Custom("pyo3::pyclass(extends = pyo3::exceptions::PyException)", symbols = pyo3Symbols).render(writer) + else + Attribute.Custom("pyo3::pyclass", symbols = pyo3Symbols).render(writer) super.renderStructure() renderPyO3Methods() } override fun renderStructureMember(writer: RustWriter, member: MemberShape, memberName: String, memberSymbol: Symbol) { - writer.renderPyGetterSetter() + Attribute.Custom("pyo3(get, set)", symbols = pyo3Symbols).render(writer) super.renderStructureMember(writer, member, memberName, memberSymbol) } private fun renderPyO3Methods() { if (shape.hasTrait() || accessorMembers.isNotEmpty()) { - writer.renderPyMethods() + Attribute.Custom("pyo3::pymethods", symbols = pyo3Symbols).render(writer) writer.rustTemplate( """ impl $name { From 1446681c0adcd3ea144ae409f691b61221c79282 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Tue, 21 Jun 2022 13:37:04 -0400 Subject: [PATCH 47/49] Add support for retrying individual call timeouts (#1478) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When timeout support was added initially, the resulting error `SdkError::TimeoutError` was never added to the retry policy which prevented these errors from being retried. This was a bug—This commit rectifies the and adds two integration-level tests that ensure that timeouts are properly retried. --- CHANGELOG.next.toml | 10 ++ aws/rust-runtime/aws-http/src/retry.rs | 18 +++- aws/sdk/integration-tests/dynamodb/Cargo.toml | 3 +- .../dynamodb/tests/timeouts.rs | 93 +++++++++++++++++++ rust-runtime/aws-smithy-client/src/never.rs | 11 +++ 5 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 aws/sdk/integration-tests/dynamodb/tests/timeouts.rs diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 69f79589ca7..2edd780695b 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -47,3 +47,13 @@ the prefix will be stripped automatically. references = ["aws-sdk-rust#554"] meta = { "breaking" = false, "tada" = false, "bug" = true } author = "Velfi" + +[[aws-sdk-rust]] +message = """ +Fix bug in retry policy where user configured timeouts were not retried. With this fix, setting +[`with_call_attempt_timeout`](https://docs.rs/aws-smithy-types/0.43.0/aws_smithy_types/timeout/struct.Api.html#method.with_call_attempt_timeout) +will lead to a retry when retries are enabled. +""" +meta = { "breaking" = false, "tada" = false, "bug" = true } +references = ["aws-sdk-rust#558", "smithy-rs#1478"] +author = "rcoh" diff --git a/aws/rust-runtime/aws-http/src/retry.rs b/aws/rust-runtime/aws-http/src/retry.rs index 041b73f1d0a..748d9584159 100644 --- a/aws/rust-runtime/aws-http/src/retry.rs +++ b/aws/rust-runtime/aws-http/src/retry.rs @@ -60,6 +60,10 @@ where let (err, response) = match err { Ok(_) => return RetryKind::Unnecessary, Err(SdkError::ServiceError { err, raw }) => (err, raw), + Err(SdkError::TimeoutError(_err)) => { + return RetryKind::Error(ErrorKind::TransientError) + } + Err(SdkError::DispatchFailure(err)) => { return if err.is_timeout() || err.is_io() { RetryKind::Error(ErrorKind::TransientError) @@ -67,7 +71,7 @@ where RetryKind::Error(ek) } else { RetryKind::UnretryableFailure - } + }; } Err(_) => return RetryKind::UnretryableFailure, }; @@ -198,7 +202,7 @@ mod test { CodedError { code: "RequestTimeout" }, - test_response + test_response, ) .as_ref() ), @@ -253,4 +257,14 @@ mod test { RetryKind::Explicit(Duration::from_millis(5000)) ); } + + #[test] + fn test_timeout_error() { + let policy = AwsErrorRetryPolicy::new(); + let err: Result<(), SdkError> = Err(SdkError::TimeoutError("blah".into())); + assert_eq!( + policy.classify(err.as_ref()), + RetryKind::Error(ErrorKind::TransientError) + ); + } } diff --git a/aws/sdk/integration-tests/dynamodb/Cargo.toml b/aws/sdk/integration-tests/dynamodb/Cargo.toml index 14f6837afe2..70437c8f03d 100644 --- a/aws/sdk/integration-tests/dynamodb/Cargo.toml +++ b/aws/sdk/integration-tests/dynamodb/Cargo.toml @@ -14,6 +14,7 @@ aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", featur aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol-test" } +aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async" } aws-types = { path = "../../build/aws-sdk/sdk/aws-types" } bytes = "1" # TODO(https://github.com/awslabs/smithy-rs/issues/1044) v3.5 has an unmaintained dependency, upgrade this when possible @@ -21,7 +22,7 @@ criterion = { version = "0.3.5" } futures-util = "0.3" http = "0.2.4" serde_json = "1" -tokio = { version = "1", features = ["full", "test-util"]} +tokio = { version = "1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.5", features = ["env-filter"] } tokio-stream = "0.1.8" diff --git a/aws/sdk/integration-tests/dynamodb/tests/timeouts.rs b/aws/sdk/integration-tests/dynamodb/tests/timeouts.rs new file mode 100644 index 00000000000..c1613d86294 --- /dev/null +++ b/aws/sdk/integration-tests/dynamodb/tests/timeouts.rs @@ -0,0 +1,93 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +use aws_sdk_dynamodb::types::SdkError; +use aws_smithy_async::rt::sleep::{AsyncSleep, Sleep}; +use aws_smithy_client::never::NeverConnector; +use aws_smithy_types::timeout; +use aws_smithy_types::timeout::Api; +use aws_smithy_types::tristate::TriState; +use aws_types::credentials::SharedCredentialsProvider; +use aws_types::region::Region; +use aws_types::{Credentials, SdkConfig}; +use std::sync::Arc; +use std::time::Duration; + +#[derive(Debug, Clone)] +struct InstantSleep; +impl AsyncSleep for InstantSleep { + fn sleep(&self, _duration: Duration) -> Sleep { + Sleep::new(Box::pin(async move {})) + } +} + +#[tokio::test] +async fn api_call_timeout_retries() { + let conn = NeverConnector::new(); + let conf = SdkConfig::builder() + .region(Region::new("us-east-2")) + .credentials_provider(SharedCredentialsProvider::new(Credentials::new( + "stub", "stub", None, None, "test", + ))) + .timeout_config(timeout::Config::new().with_api_timeouts( + Api::new().with_call_attempt_timeout(TriState::Set(Duration::new(123, 0))), + )) + .sleep_impl(Arc::new(InstantSleep)) + .build(); + let client = aws_sdk_dynamodb::Client::from_conf_conn( + aws_sdk_dynamodb::Config::new(&conf), + conn.clone(), + ); + let resp = client + .list_tables() + .send() + .await + .expect_err("call should fail"); + assert_eq!( + conn.num_calls(), + 3, + "client level timeouts should be retried" + ); + assert!( + matches!(resp, SdkError::TimeoutError { .. }), + "expected a timeout error, got: {}", + resp + ); +} + +#[tokio::test] +async fn no_retries_on_operation_timeout() { + let conn = NeverConnector::new(); + let conf = + SdkConfig::builder() + .region(Region::new("us-east-2")) + .credentials_provider(SharedCredentialsProvider::new(Credentials::new( + "stub", "stub", None, None, "test", + ))) + .timeout_config(timeout::Config::new().with_api_timeouts( + Api::new().with_call_timeout(TriState::Set(Duration::new(123, 0))), + )) + .sleep_impl(Arc::new(InstantSleep)) + .build(); + let client = aws_sdk_dynamodb::Client::from_conf_conn( + aws_sdk_dynamodb::Config::new(&conf), + conn.clone(), + ); + let resp = client + .list_tables() + .send() + .await + .expect_err("call should fail"); + assert_eq!( + conn.num_calls(), + 1, + "operation level timeouts should not be retried" + ); + assert!( + matches!(resp, SdkError::TimeoutError { .. }), + "expected a timeout error, got: {}", + resp + ); +} diff --git a/rust-runtime/aws-smithy-client/src/never.rs b/rust-runtime/aws-smithy-client/src/never.rs index ded0ba9e984..57d3f288a0d 100644 --- a/rust-runtime/aws-smithy-client/src/never.rs +++ b/rust-runtime/aws-smithy-client/src/never.rs @@ -10,6 +10,8 @@ use http::Uri; use aws_smithy_async::future::never::Never; use std::marker::PhantomData; +use std::sync::atomic::{AtomicU64, Ordering}; +use std::sync::Arc; use std::task::{Context, Poll}; @@ -25,12 +27,14 @@ use tower::BoxError; #[derive(Debug)] pub struct NeverService { _resp: PhantomData<(Req, Resp, Err)>, + invocations: Arc, } impl Clone for NeverService { fn clone(&self) -> Self { Self { _resp: Default::default(), + invocations: self.invocations.clone(), } } } @@ -46,8 +50,14 @@ impl NeverService { pub fn new() -> Self { NeverService { _resp: Default::default(), + invocations: Default::default(), } } + + /// Returns the number of invocations made to this service + pub fn num_calls(&self) -> u64 { + self.invocations.load(Ordering::SeqCst) + } } /// A Connector that can be use with [`Client`](crate::Client) that never returns a response. @@ -139,6 +149,7 @@ impl tower::Service for NeverService { } fn call(&mut self, _req: Req) -> Self::Future { + self.invocations.fetch_add(1, Ordering::SeqCst); Box::pin(async move { Never::new().await; unreachable!() From 5d6d8843cd0367ba792ffaeb61b235175ecfa154 Mon Sep 17 00:00:00 2001 From: david-perez Date: Tue, 21 Jun 2022 21:12:31 +0200 Subject: [PATCH 48/49] Split `CodegenContext` and children (#1473) This commit splits each of: * `CodegenContext`, * `RustSettings`; and * `CodegenConfig` into two variants: one for the `rust-codegen` client plugin and another for the `rust-server-codegen` plugin. (`CodegenConfig` is a property of `RustSettings`, which is a property of `CodegenContext`; they constitute pervasive read-only global data that gets passed around to the code generators). This allows each plugin to evolve separately, defining different settings and passing around a tailor-made code-generation context. Client-specific generators should now use: * `ClientCodegenContext`, * `ClientRustSettings`; and * `ClientCodegenConfig`. Likewise, server-specific generators should now use: * `ServerCodegenContext`, * `ServerRustSettings`; and * `ServerCodegenConfig`. This is a more robust and maintainable approach than the current one, where both generator types have to read possibly null values (because they don't make sense for a client/server target), and plugins have to populate settings that are not relevant for the crate they're generating. For example, the server plugin has to populate and pass around the settings `renameExceptions`, `includeFluentClient` and `addMessageToErrors` even though it never uses them and don't make sense for it. As of writing these client and server specific classes are very similar, but in the future they will evolve in separate ways (for example, #1342 will add symbol providers for constrained shapes that only make sense in a server code-generation context). Common properties have not been duplicated however. Instead, utilizing inheritance, code-generation context that is common to _all_ plugins can be placed in: * `CoreCodegenContext`, * `CoreRustSettings`; and * `CoreCodegenConfig`. This way, generators that are shared by both client and server can take in `CoreCodegenContext`. If they need to tweak the code they generate in small and self-contained places, they can utilize the `CodegenTarget` flag-like enum to disambiguate, like they have always been doing. Note this change also makes `RustDecorator`s be targeted for clients or servers, by making them generic over the code-generation context. When loading the decorators from the classpath and combining them into one in the executed smithy-rs plugin, all of them need to either target clients or target servers. This makes sense: after all, all of the decorators that conform the AWS Rust SDK are client-specific. Closes #828. --- .../smithy/rustsdk/AwsCodegenDecorator.kt | 3 +- .../smithy/rustsdk/AwsEndpointDecorator.kt | 25 +-- .../rustsdk/AwsFluentClientDecorator.kt | 19 +- .../smithy/rustsdk/AwsPresigningDecorator.kt | 19 +- .../smithy/rustsdk/AwsReadmeDecorator.kt | 9 +- .../smithy/rustsdk/CrateLicenseDecorator.kt | 6 +- .../smithy/rustsdk/CredentialProviders.kt | 10 +- .../rustsdk/IntegrationTestDependencies.kt | 6 +- .../amazon/smithy/rustsdk/RegionDecorator.kt | 17 +- .../smithy/rustsdk/RetryPolicyDecorator.kt | 6 +- .../smithy/rustsdk/SdkConfigDecorator.kt | 8 +- .../amazon/smithy/rustsdk/SdkSettings.kt | 6 +- .../smithy/rustsdk/ServiceConfigDecorator.kt | 6 +- .../smithy/rustsdk/SigV4SigningDecorator.kt | 11 +- .../smithy/rustsdk/UserAgentDecorator.kt | 10 +- .../apigateway/ApiGatewayDecorator.kt | 11 +- .../customize/auth/DisabledAuthDecorator.kt | 3 +- .../rustsdk/customize/ec2/Ec2Decorator.kt | 3 +- .../customize/glacier/GlacierDecorator.kt | 10 +- .../customize/route53/Route53Decorator.kt | 7 +- .../rustsdk/customize/s3/S3Decorator.kt | 27 +-- .../EndpointConfigCustomizationTest.kt | 20 +- .../rustsdk/RegionProviderConfigTest.kt | 17 +- .../amazon/smithy/rustsdk/TestUtil.kt | 9 +- .../smithy/PythonCodegenServerPlugin.kt | 8 +- .../smithy/PythonServerCodegenVisitor.kt | 17 +- .../PythonServerCodegenDecorator.kt | 17 +- .../generators/PythonApplicationGenerator.kt | 8 +- .../PythonServerOperationHandlerGenerator.kt | 10 +- .../PythonServerServiceGenerator.kt | 4 +- .../server/smithy/RustCodegenServerPlugin.kt | 12 +- .../server/smithy/ServerCodegenVisitor.kt | 45 +++-- .../server/smithy/ServerRustSettings.kt | 85 -------- .../AdditionalErrorsDecorator.kt | 13 +- .../ServerRequiredCustomizations.kt | 38 ++++ .../ServerOperationHandlerGenerator.kt | 14 +- .../ServerOperationRegistryGenerator.kt | 12 +- .../generators/ServerServiceGenerator.kt | 16 +- .../http/ServerRequestBindingGenerator.kt | 6 +- .../http/ServerResponseBindingGenerator.kt | 6 +- .../protocol/ServerProtocolTestGenerator.kt | 48 ++--- .../server/smithy/protocols/ServerAwsJson.kt | 20 +- .../ServerHttpBoundProtocolGenerator.kt | 6 +- .../smithy/protocols/ServerProtocolLoader.kt | 5 +- .../smithy/protocols/ServerRestJsonFactory.kt | 8 +- .../smithy/protocols/ServerRestXmlFactory.kt | 8 +- .../smithy/testutil/ServerTestHelpers.kt | 16 +- .../codegen/smithy/ClientCodegenContext.kt | 27 +++ .../rust/codegen/smithy/ClientRustSettings.kt | 109 +++++++++++ .../rust/codegen/smithy/CodegenContext.kt | 72 ------- .../rust/codegen/smithy/CodegenDelegator.kt | 8 +- .../rust/codegen/smithy/CodegenVisitor.kt | 28 +-- .../rust/codegen/smithy/CoreCodegenContext.kt | 83 ++++++++ .../{RustSettings.kt => CoreRustSettings.kt} | 181 +++++++++--------- .../rust/codegen/smithy/RustCodegenPlugin.kt | 26 ++- .../codegen/smithy/ServerCodegenContext.kt | 30 +++ .../rust/codegen/smithy/ServerRustSettings.kt | 91 +++++++++ .../rust/codegen/smithy/SymbolVisitor.kt | 18 +- .../customizations/AllowLintsGenerator.kt | 6 +- .../customizations/ClientCustomizations.kt | 12 +- .../customizations/ClientDocsGenerator.kt | 10 +- .../customizations/DocsRsMetadataDecorator.kt | 7 +- .../customizations/EndpointPrefixGenerator.kt | 10 +- .../HttpChecksumRequiredGenerator.kt | 10 +- .../HttpVersionListCustomization.kt | 10 +- .../IdempotencyTokenGenerator.kt | 8 +- .../customizations/RetryConfigDecorator.kt | 15 +- .../customizations/SleepImplDecorator.kt | 13 +- .../customizations/TimeoutConfigDecorator.kt | 13 +- .../customize/RequiredCustomizations.kt | 23 ++- .../smithy/customize/RustCodegenDecorator.kt | 73 ++++--- .../smithy/generators/CargoTomlGenerator.kt | 4 +- .../smithy/generators/LibRsGenerator.kt | 4 +- .../smithy/generators/PaginatorGenerator.kt | 12 +- .../smithy/generators/ServiceGenerator.kt | 24 +-- .../client/FluentClientDecorator.kt | 39 ++-- .../config/ServiceConfigGenerator.kt | 6 +- .../error/TopLevelErrorGenerator.kt | 16 +- .../generators/http/HttpBindingGenerator.kt | 14 +- .../http/RequestBindingGenerator.kt | 12 +- .../http/ResponseBindingGenerator.kt | 6 +- .../protocol/MakeOperationGenerator.kt | 20 +- .../generators/protocol/ProtocolGenerator.kt | 8 +- .../protocol/ProtocolTestGenerator.kt | 50 ++--- .../rust/codegen/smithy/protocols/AwsJson.kt | 36 ++-- .../rust/codegen/smithy/protocols/AwsQuery.kt | 19 +- .../rust/codegen/smithy/protocols/Ec2Query.kt | 19 +- .../protocols/HttpBoundProtocolGenerator.kt | 22 +-- .../HttpBoundProtocolPayloadGenerator.kt | 12 +- .../rust/codegen/smithy/protocols/Protocol.kt | 14 +- .../rust/codegen/smithy/protocols/RestJson.kt | 19 +- .../rust/codegen/smithy/protocols/RestXml.kt | 25 +-- .../parse/AwsQueryParserGenerator.kt | 8 +- .../parse/Ec2QueryParserGenerator.kt | 8 +- .../protocols/parse/JsonParserGenerator.kt | 12 +- .../protocols/parse/RestXmlParserGenerator.kt | 6 +- .../parse/XmlBindingTraitParserGenerator.kt | 14 +- .../serialize/AwsQuerySerializerGenerator.kt | 4 +- .../serialize/Ec2QuerySerializerGenerator.kt | 4 +- .../serialize/JsonSerializerGenerator.kt | 12 +- .../serialize/QuerySerializerGenerator.kt | 14 +- .../XmlBindingTraitSerializerGenerator.kt | 14 +- .../RemoveEventStreamOperations.kt | 4 +- .../smithy/rust/codegen/testutil/Rust.kt | 25 ++- .../rust/codegen/testutil/TestHelpers.kt | 29 +-- .../HttpVersionListGeneratorTest.kt | 32 ++-- .../http/ResponseBindingGeneratorTest.kt | 8 +- .../smithy/EventStreamSymbolProviderTest.kt | 5 +- .../generators/EndpointTraitBindingsTest.kt | 12 +- .../protocol/ProtocolTestGeneratorTest.kt | 41 ++-- .../smithy/protocols/EventStreamTestTools.kt | 4 +- .../EventStreamUnmarshallerGeneratorTest.kt | 5 +- .../AwsQuerySerializerGeneratorTest.kt | 2 +- .../EventStreamMarshallerGeneratorTest.kt | 5 +- .../RemoveEventStreamOperationsTest.kt | 6 +- rust-runtime/build.gradle.kts | 2 +- 116 files changed, 1280 insertions(+), 950 deletions(-) delete mode 100644 codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerRustSettings.kt create mode 100644 codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/ServerRequiredCustomizations.kt create mode 100644 codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ClientCodegenContext.kt create mode 100644 codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ClientRustSettings.kt delete mode 100644 codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenContext.kt create mode 100644 codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CoreCodegenContext.kt rename codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/{RustSettings.kt => CoreRustSettings.kt} (58%) create mode 100644 codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ServerCodegenContext.kt create mode 100644 codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ServerRustSettings.kt 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 9c06c6c2b37..db7b38373a9 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 @@ -5,6 +5,7 @@ package software.amazon.smithy.rustsdk +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.customizations.DocsRsMetadataDecorator import software.amazon.smithy.rust.codegen.smithy.customizations.DocsRsMetadataSettings import software.amazon.smithy.rust.codegen.smithy.customizations.RetryConfigDecorator @@ -51,7 +52,7 @@ val DECORATORS = listOf( DocsRsMetadataDecorator(DocsRsMetadataSettings(targets = listOf("x86_64-unknown-linux-gnu"), allFeatures = true)) ) -class AwsCodegenDecorator : CombinedCodegenDecorator(DECORATORS) { +class AwsCodegenDecorator : CombinedCodegenDecorator(DECORATORS) { override val name: String = "AwsSdkCodegenDecorator" override val order: Byte = -1 } diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt index c33706ab671..76a5a1574d0 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt @@ -22,7 +22,8 @@ import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.withBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization @@ -36,7 +37,7 @@ import software.amazon.smithy.rust.codegen.util.dq import software.amazon.smithy.rust.codegen.util.expectTrait import software.amazon.smithy.rust.codegen.util.orNull -class AwsEndpointDecorator : RustCodegenDecorator { +class AwsEndpointDecorator : RustCodegenDecorator { override val name: String = "AwsEndpoint" override val order: Byte = 0 @@ -46,14 +47,14 @@ class AwsEndpointDecorator : RustCodegenDecorator { } override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + EndpointConfigCustomization(codegenContext, endpoints) } override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { @@ -61,18 +62,18 @@ class AwsEndpointDecorator : RustCodegenDecorator { } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + PubUseEndpoint(codegenContext.runtimeConfig) } } -class EndpointConfigCustomization(private val codegenContext: CodegenContext, private val endpointData: ObjectNode) : +class EndpointConfigCustomization(private val coreCodegenContext: CoreCodegenContext, private val endpointData: ObjectNode) : ConfigCustomization() { - private val runtimeConfig = codegenContext.runtimeConfig + private val runtimeConfig = coreCodegenContext.runtimeConfig private val resolveAwsEndpoint = runtimeConfig.awsEndpoint().asType().copy(name = "ResolveAwsEndpoint") - private val moduleUseName = codegenContext.moduleUseName() + private val moduleUseName = coreCodegenContext.moduleUseName() override fun section(section: ServiceConfig): Writable = writable { when (section) { is ServiceConfig.ConfigStruct -> rust( @@ -116,7 +117,7 @@ class EndpointConfigCustomization(private val codegenContext: CodegenContext, pr "aws_types" to awsTypes(runtimeConfig).asType() ) ServiceConfig.BuilderBuild -> { - val resolverGenerator = EndpointResolverGenerator(codegenContext, endpointData) + val resolverGenerator = EndpointResolverGenerator(coreCodegenContext, endpointData) rust( """ endpoint_resolver: self.endpoint_resolver.unwrap_or_else(|| @@ -163,9 +164,9 @@ class PubUseEndpoint(private val runtimeConfig: RuntimeConfig) : LibRsCustomizat } } -class EndpointResolverGenerator(codegenContext: CodegenContext, private val endpointData: ObjectNode) { - private val runtimeConfig = codegenContext.runtimeConfig - private val endpointPrefix = codegenContext.serviceShape.expectTrait().endpointPrefix +class EndpointResolverGenerator(coreCodegenContext: CoreCodegenContext, private val endpointData: ObjectNode) { + private val runtimeConfig = coreCodegenContext.runtimeConfig + private val endpointPrefix = coreCodegenContext.serviceShape.expectTrait().endpointPrefix private val awsEndpoint = runtimeConfig.awsEndpoint().asType() private val awsTypes = runtimeConfig.awsTypes().asType() private val codegenScope = diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsFluentClientDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsFluentClientDecorator.kt index 0487e8f3b08..89f43d71a13 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsFluentClientDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsFluentClientDecorator.kt @@ -19,7 +19,8 @@ import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustCrate @@ -72,13 +73,13 @@ private class AwsClientGenerics(private val types: Types) : FluentClientGenerics override fun sendBounds(input: Symbol, output: Symbol, error: RuntimeType): Writable = writable { } } -class AwsFluentClientDecorator : RustCodegenDecorator { +class AwsFluentClientDecorator : RustCodegenDecorator { override val name: String = "FluentClient" // Must run after the AwsPresigningDecorator so that the presignable trait is correctly added to operations override val order: Byte = (AwsPresigningDecorator.ORDER + 1).toByte() - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { val types = Types(codegenContext.runtimeConfig) FluentClientGenerator( codegenContext, @@ -97,7 +98,7 @@ class AwsFluentClientDecorator : RustCodegenDecorator { } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + object : LibRsCustomization() { @@ -181,12 +182,12 @@ private class AwsFluentClientExtensions(types: Types) { } } -private class AwsFluentClientDocs(codegenContext: CodegenContext) : FluentClientCustomization() { - private val serviceName = codegenContext.serviceShape.expectTrait().value - private val serviceShape = codegenContext.serviceShape - private val crateName = codegenContext.moduleUseName() +private class AwsFluentClientDocs(coreCodegenContext: CoreCodegenContext) : FluentClientCustomization() { + private val serviceName = coreCodegenContext.serviceShape.expectTrait().value + private val serviceShape = coreCodegenContext.serviceShape + private val crateName = coreCodegenContext.moduleUseName() private val codegenScope = - arrayOf("aws_config" to codegenContext.runtimeConfig.awsConfig().copy(scope = DependencyScope.Dev).asType()) + arrayOf("aws_config" to coreCodegenContext.runtimeConfig.awsConfig().copy(scope = DependencyScope.Dev).asType()) // Usage docs on STS must be suppressed—aws-config cannot be added as a dev-dependency because it would create // a circular dependency diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt index bb1e01681ec..f82a8acd80b 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt @@ -27,7 +27,8 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection @@ -84,7 +85,7 @@ internal val PRESIGNABLE_OPERATIONS by lazy { class AwsPresigningDecorator internal constructor( private val presignableOperations: Map = PRESIGNABLE_OPERATIONS -) : RustCodegenDecorator { +) : RustCodegenDecorator { companion object { const val ORDER: Byte = 0 } @@ -93,7 +94,7 @@ class AwsPresigningDecorator internal constructor( override val order: Byte = ORDER override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List = baseCustomizations + listOf(AwsInputPresignedMethod(codegenContext, operation)) @@ -129,11 +130,11 @@ class AwsPresigningDecorator internal constructor( } class AwsInputPresignedMethod( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val operationShape: OperationShape ) : OperationCustomization() { - private val runtimeConfig = codegenContext.runtimeConfig - private val symbolProvider = codegenContext.symbolProvider + private val runtimeConfig = coreCodegenContext.runtimeConfig + private val symbolProvider = coreCodegenContext.symbolProvider private val codegenScope = arrayOf( "Error" to AwsRuntimeType.Presigning.member("config::Error"), @@ -158,7 +159,7 @@ class AwsInputPresignedMethod( val presignableOp = PRESIGNABLE_OPERATIONS.getValue(operationShape.id) val makeOperationOp = if (presignableOp.hasModelTransforms()) { - codegenContext.model.expectShape(syntheticShapeId(operationShape.id), OperationShape::class.java) + coreCodegenContext.model.expectShape(syntheticShapeId(operationShape.id), OperationShape::class.java) } else { section.operationShape } @@ -166,9 +167,9 @@ class AwsInputPresignedMethod( val protocol = section.protocol MakeOperationGenerator( - codegenContext, + coreCodegenContext, protocol, - HttpBoundProtocolPayloadGenerator(codegenContext, protocol), + HttpBoundProtocolPayloadGenerator(coreCodegenContext, protocol), // Prefixed with underscore to avoid colliding with modeled functions functionName = makeOperationFn, public = false, diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsReadmeDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsReadmeDecorator.kt index 088fe5e6af1..786997b0de9 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsReadmeDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsReadmeDecorator.kt @@ -10,12 +10,11 @@ import org.jsoup.nodes.Element import org.jsoup.nodes.TextNode import software.amazon.smithy.model.traits.DocumentationTrait import software.amazon.smithy.rust.codegen.rustlang.raw -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.ManifestCustomizations import software.amazon.smithy.rust.codegen.util.getTrait -import java.lang.StringBuilder import java.util.logging.Logger // Use a sigil that should always be unique in the text to fix line breaks and spaces @@ -26,16 +25,16 @@ private const val SPACE_SIGIL = "[[smithy-rs-nbsp]]" /** * Generates a README.md for each service crate for display on crates.io. */ -class AwsReadmeDecorator : RustCodegenDecorator { +class AwsReadmeDecorator : RustCodegenDecorator { override val name: String = "AwsReadmeDecorator" override val order: Byte = 0 private val logger: Logger = Logger.getLogger(javaClass.name) - override fun crateManifestCustomizations(codegenContext: CodegenContext): ManifestCustomizations = + override fun crateManifestCustomizations(codegenContext: ClientCodegenContext): ManifestCustomizations = mapOf("package" to mapOf("readme" to "README.md")) - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { rustCrate.withFile("README.md") { writer -> val description = normalizeDescription( codegenContext.moduleName, diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CrateLicenseDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CrateLicenseDecorator.kt index f49139718ec..ed152fe83a5 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CrateLicenseDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CrateLicenseDecorator.kt @@ -6,16 +6,16 @@ package software.amazon.smithy.rustsdk import software.amazon.smithy.rust.codegen.rustlang.raw -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator -class CrateLicenseDecorator : RustCodegenDecorator { +class CrateLicenseDecorator : RustCodegenDecorator { override val name: String = "CrateLicense" override val order: Byte = 0 - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { rustCrate.withFile("LICENSE") { val license = this::class.java.getResource("/LICENSE").readText() it.raw(license) diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CredentialProviders.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CredentialProviders.kt index a40f1514243..48a3dbdbf86 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CredentialProviders.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CredentialProviders.kt @@ -11,7 +11,7 @@ import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization @@ -22,19 +22,19 @@ import software.amazon.smithy.rust.codegen.smithy.generators.LibRsSection import software.amazon.smithy.rust.codegen.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.smithy.generators.config.ServiceConfig -class CredentialsProviderDecorator : RustCodegenDecorator { +class CredentialsProviderDecorator : RustCodegenDecorator { override val name: String = "CredentialsProvider" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + CredentialProviderConfig(codegenContext.runtimeConfig) } override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { @@ -42,7 +42,7 @@ class CredentialsProviderDecorator : RustCodegenDecorator { } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + PubUseCredentials(codegenContext.runtimeConfig) 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 8a03e1d8205..c4d1a5f11bd 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 @@ -10,7 +10,7 @@ import software.amazon.smithy.rust.codegen.rustlang.CratesIo import software.amazon.smithy.rust.codegen.rustlang.DependencyScope import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization @@ -18,12 +18,12 @@ import software.amazon.smithy.rust.codegen.smithy.generators.LibRsSection import java.nio.file.Files import java.nio.file.Paths -class IntegrationTestDecorator : RustCodegenDecorator { +class IntegrationTestDecorator : RustCodegenDecorator { override val name: String = "IntegrationTest" override val order: Byte = 0 override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { val integrationTestPath = Paths.get(SdkSettings.from(codegenContext.settings).integrationTestPath) diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/RegionDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/RegionDecorator.kt index f2e139a3524..f9f91699297 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/RegionDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/RegionDecorator.kt @@ -10,7 +10,8 @@ import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization @@ -69,19 +70,19 @@ fn test_1() { } */ -class RegionDecorator : RustCodegenDecorator { +class RegionDecorator : RustCodegenDecorator { override val name: String = "Region" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + RegionProviderConfig(codegenContext) } override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { @@ -89,16 +90,16 @@ class RegionDecorator : RustCodegenDecorator { } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + PubUseRegion(codegenContext.runtimeConfig) } } -class RegionProviderConfig(codegenContext: CodegenContext) : ConfigCustomization() { - private val region = region(codegenContext.runtimeConfig) - private val moduleUseName = codegenContext.moduleUseName() +class RegionProviderConfig(coreCodegenContext: CoreCodegenContext) : ConfigCustomization() { + private val region = region(coreCodegenContext.runtimeConfig) + private val moduleUseName = coreCodegenContext.moduleUseName() private val codegenScope = arrayOf("Region" to region.member("Region")) override fun section(section: ServiceConfig) = writable { when (section) { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/RetryPolicyDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/RetryPolicyDecorator.kt index 94f365b0e4e..df0145ebd50 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/RetryPolicyDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/RetryPolicyDecorator.kt @@ -9,19 +9,19 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator -class RetryPolicyDecorator : RustCodegenDecorator { +class RetryPolicyDecorator : RustCodegenDecorator { override val name: String = "RetryPolicy" override val order: Byte = 0 override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkConfigDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkConfigDecorator.kt index 934c0542c98..c860e3c6106 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkConfigDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkConfigDecorator.kt @@ -10,7 +10,7 @@ import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator @@ -23,18 +23,18 @@ import software.amazon.smithy.rust.codegen.smithy.generators.config.ServiceConfi * - `From<&aws_types::SdkConfig> for ::config::Builder`: Enabling customization * - `pub fn new(&aws_types::SdkConfig) -> ::Config`: Direct construction without customization */ -class SdkConfigDecorator : RustCodegenDecorator { +class SdkConfigDecorator : RustCodegenDecorator { override val name: String = "SdkConfig" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + NewFromShared(codegenContext.runtimeConfig) } - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { val codegenScope = arrayOf( "SdkConfig" to awsTypes(runtimeConfig = codegenContext.runtimeConfig).asType().member("sdk_config::SdkConfig") ) diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkSettings.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkSettings.kt index 8f370f63548..a94f4c57156 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkSettings.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkSettings.kt @@ -5,7 +5,7 @@ package software.amazon.smithy.rustsdk import software.amazon.smithy.model.node.ObjectNode -import software.amazon.smithy.rust.codegen.smithy.RustSettings +import software.amazon.smithy.rust.codegen.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.util.orNull /** @@ -13,8 +13,8 @@ import software.amazon.smithy.rust.codegen.util.orNull */ class SdkSettings private constructor(private val awsSdk: ObjectNode?) { companion object { - fun from(rustSettings: RustSettings): SdkSettings = - SdkSettings(rustSettings.customizationConfig?.getObjectMember("awsSdk")?.orNull()) + fun from(coreRustSettings: CoreRustSettings): SdkSettings = + SdkSettings(coreRustSettings.customizationConfig?.getObjectMember("awsSdk")?.orNull()) } /** Path to AWS SDK integration tests */ diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/ServiceConfigDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/ServiceConfigDecorator.kt index 0b196980473..2ae65bae1f9 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/ServiceConfigDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/ServiceConfigDecorator.kt @@ -8,17 +8,17 @@ package software.amazon.smithy.rustsdk import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.docs import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.smithy.generators.config.ServiceConfig -class ServiceConfigDecorator : RustCodegenDecorator { +class ServiceConfigDecorator : RustCodegenDecorator { override val name: String = "ServiceConfigGenerator" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List = baseCustomizations + SharedConfigDocsCustomization() } diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt index 935789068af..77fa9dd95bb 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt @@ -19,7 +19,8 @@ import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization @@ -42,14 +43,14 @@ import software.amazon.smithy.rust.codegen.util.isInputEventStream * - sets a default `OperationSigningConfig` A future enhancement will customize this for specific services that need * different behavior. */ -class SigV4SigningDecorator : RustCodegenDecorator { +class SigV4SigningDecorator : RustCodegenDecorator { override val name: String = "SigV4Signing" override val order: Byte = 0 - private fun applies(codegenContext: CodegenContext): Boolean = codegenContext.serviceShape.hasTrait() + private fun applies(coreCodegenContext: CoreCodegenContext): Boolean = coreCodegenContext.serviceShape.hasTrait() override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations.letIf(applies(codegenContext)) { customizations -> @@ -62,7 +63,7 @@ class SigV4SigningDecorator : RustCodegenDecorator { } override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/UserAgentDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/UserAgentDecorator.kt index e24bfd17744..d64468052eb 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/UserAgentDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/UserAgentDecorator.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization @@ -28,19 +28,19 @@ import software.amazon.smithy.rust.codegen.util.expectTrait /** * Inserts a UserAgent configuration into the operation */ -class UserAgentDecorator : RustCodegenDecorator { +class UserAgentDecorator : RustCodegenDecorator { override val name: String = "UserAgent" override val order: Byte = 10 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + AppNameCustomization(codegenContext.runtimeConfig) } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { // We are generating an AWS SDK, the service needs to have the AWS service trait @@ -49,7 +49,7 @@ class UserAgentDecorator : RustCodegenDecorator { } override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt index 7a168a5b5ec..77e872bc640 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt @@ -10,20 +10,23 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.letIf -class ApiGatewayDecorator : RustCodegenDecorator { +class ApiGatewayDecorator : RustCodegenDecorator { override val name: String = "ApiGateway" override val order: Byte = 0 - private fun applies(codegenContext: CodegenContext) = codegenContext.serviceShape.id == ShapeId.from("com.amazonaws.apigateway#BackplaneControlService") + private fun applies(coreCodegenContext: CoreCodegenContext) = + coreCodegenContext.serviceShape.id == ShapeId.from("com.amazonaws.apigateway#BackplaneControlService") + override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/auth/DisabledAuthDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/auth/DisabledAuthDecorator.kt index 65c4957c137..4325c765177 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/auth/DisabledAuthDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/auth/DisabledAuthDecorator.kt @@ -11,11 +11,12 @@ import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.traits.AuthTrait import software.amazon.smithy.model.transform.ModelTransformer +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator private fun String.shapeId() = ShapeId.from(this) // / STS (and possibly other services) need to have auth manually set to [] -class DisabledAuthDecorator : RustCodegenDecorator { +class DisabledAuthDecorator : RustCodegenDecorator { override val name: String = "OptionalAuth" override val order: Byte = 0 diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/Ec2Decorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/Ec2Decorator.kt index 70ae2f99402..bd4b7736bdd 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/Ec2Decorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/Ec2Decorator.kt @@ -8,10 +8,11 @@ package software.amazon.smithy.rustsdk.customize.ec2 import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.model.shapes.ShapeId +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.letIf -class Ec2Decorator : RustCodegenDecorator { +class Ec2Decorator : RustCodegenDecorator { override val name: String = "Ec2" override val order: Byte = 0 private val ec2 = ShapeId.from("com.amazonaws.ec2#AmazonEC2") diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/GlacierDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/GlacierDecorator.kt index d6badd38121..155fa822386 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/GlacierDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/GlacierDecorator.kt @@ -7,19 +7,21 @@ package software.amazon.smithy.rustsdk.customize.glacier import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ShapeId -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator val Glacier: ShapeId = ShapeId.from("com.amazonaws.glacier#Glacier") -class GlacierDecorator : RustCodegenDecorator { +class GlacierDecorator : RustCodegenDecorator { override val name: String = "Glacier" override val order: Byte = 0 - private fun applies(codegenContext: CodegenContext) = codegenContext.serviceShape.id == Glacier + private fun applies(coreCodegenContext: CoreCodegenContext) = coreCodegenContext.serviceShape.id == Glacier + override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt index ff8b617ae4f..09c59daabcb 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt @@ -15,7 +15,7 @@ import software.amazon.smithy.model.transform.ModelTransformer import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection @@ -28,12 +28,13 @@ import java.util.logging.Logger val Route53: ShapeId = ShapeId.from("com.amazonaws.route53#AWSDnsV20130401") -class Route53Decorator : RustCodegenDecorator { +class Route53Decorator : RustCodegenDecorator { override val name: String = "Route53" override val order: Byte = 0 private val logger: Logger = Logger.getLogger(javaClass.name) private fun applies(service: ServiceShape) = service.id == Route53 + override fun transformModel(service: ServiceShape, model: Model): Model { return model.letIf(applies(service)) { ModelTransformer.create().mapShapes(model) { shape -> @@ -46,7 +47,7 @@ class Route53Decorator : RustCodegenDecorator { } override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List ): List { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3Decorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3Decorator.kt index e5417ce6b98..406d02d6f79 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3Decorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3Decorator.kt @@ -16,7 +16,8 @@ import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization @@ -29,36 +30,36 @@ import software.amazon.smithy.rustsdk.AwsRuntimeType /** * Top level decorator for S3 - * */ -class S3Decorator : RustCodegenDecorator { + */ +class S3Decorator : RustCodegenDecorator { override val name: String = "S3ExtendedError" override val order: Byte = 0 private fun applies(serviceId: ShapeId) = serviceId == ShapeId.from("com.amazonaws.s3#AmazonS3") - override fun protocols(serviceId: ShapeId, currentProtocols: ProtocolMap): ProtocolMap { - return currentProtocols.letIf(applies(serviceId)) { + override fun protocols( + serviceId: ShapeId, + currentProtocols: ProtocolMap + ): ProtocolMap = + currentProtocols.letIf(applies(serviceId)) { it + mapOf( RestXmlTrait.ID to RestXmlFactory { protocolConfig -> S3(protocolConfig) } ) } - } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List - ): List { - return baseCustomizations.letIf(applies(codegenContext.serviceShape.id)) { - it + S3PubUse() - } + ): List = baseCustomizations.letIf(applies(codegenContext.serviceShape.id)) { + it + S3PubUse() } } -class S3(codegenContext: CodegenContext) : RestXml(codegenContext) { - private val runtimeConfig = codegenContext.runtimeConfig +class S3(coreCodegenContext: CoreCodegenContext) : RestXml(coreCodegenContext) { + private val runtimeConfig = coreCodegenContext.runtimeConfig private val errorScope = arrayOf( "Bytes" to RuntimeType.Bytes, "Error" to RuntimeType.GenericError(runtimeConfig), diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt index 6c6968eee0f..a3861d1f21e 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt @@ -10,7 +10,7 @@ import software.amazon.smithy.model.node.ObjectNode import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.CodegenVisitor import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.customizations.AllowLintsGenerator @@ -124,27 +124,25 @@ internal class EndpointConfigCustomizationTest { private fun validateEndpointCustomizationForService(service: String, test: ((RustCrate) -> Unit)? = null) { val (context, testDir) = generatePluginContext(model, service = service, runtimeConfig = AwsTestRuntimeConfig) - val codegenDecorator = object : RustCodegenDecorator { + val codegenDecorator = object : RustCodegenDecorator { override val name: String = "tests and config" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List - ): List { - return baseCustomizations + stubConfigCustomization("a") + EndpointConfigCustomization( + ): List = + baseCustomizations + stubConfigCustomization("a") + EndpointConfigCustomization( codegenContext, endpointConfig ) + stubConfigCustomization("b") - } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List - ): List { - return baseCustomizations + PubUseEndpoint(AwsTestRuntimeConfig) + AllowLintsGenerator(listOf("dead_code"), listOf(), listOf()) - } + ): List = + baseCustomizations + PubUseEndpoint(AwsTestRuntimeConfig) + AllowLintsGenerator(listOf("dead_code"), listOf(), listOf()) - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { if (test != null) { test(rustCrate) } diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/RegionProviderConfigTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/RegionProviderConfigTest.kt index f815dbf4d40..1de3a8c5457 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/RegionProviderConfigTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/RegionProviderConfigTest.kt @@ -6,6 +6,7 @@ package software.amazon.smithy.rustsdk import org.junit.jupiter.api.Test +import software.amazon.smithy.rust.codegen.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.testutil.TestWorkspace import software.amazon.smithy.rust.codegen.testutil.rustSettings import software.amazon.smithy.rust.codegen.testutil.validateConfigCustomizations @@ -14,7 +15,21 @@ internal class RegionProviderConfigTest { @Test fun `generates a valid config`() { val project = TestWorkspace.testProject() - val codegenContext = awsTestCodegenContext().copy(settings = project.rustSettings()) + val projectSettings = project.rustSettings() + val coreRustSettings = CoreRustSettings( + service = projectSettings.service, + moduleName = projectSettings.moduleName, + moduleVersion = projectSettings.moduleVersion, + moduleAuthors = projectSettings.moduleAuthors, + moduleDescription = projectSettings.moduleDescription, + moduleRepository = projectSettings.moduleRepository, + runtimeConfig = AwsTestRuntimeConfig, + codegenConfig = projectSettings.codegenConfig, + license = projectSettings.license, + examplesUri = projectSettings.examplesUri, + customizationConfig = projectSettings.customizationConfig, + ) + val codegenContext = awsTestCodegenContext(coreRustSettings = coreRustSettings) validateConfigCustomizations(RegionProviderConfig(codegenContext), project) } } diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/TestUtil.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/TestUtil.kt index 7ab7979b4aa..ed5d0b819c0 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/TestUtil.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/TestUtil.kt @@ -6,10 +6,12 @@ package software.amazon.smithy.rustsdk import software.amazon.smithy.model.Model +import software.amazon.smithy.rust.codegen.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.smithy.RuntimeCrateLocation import software.amazon.smithy.rust.codegen.testutil.TestRuntimeConfig import software.amazon.smithy.rust.codegen.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.testutil.testCodegenContext +import software.amazon.smithy.rust.codegen.testutil.testRustSettings import java.io.File // In aws-sdk-codegen, the working dir when gradle runs tests is actually `./aws`. So, to find the smithy runtime, we need @@ -22,5 +24,8 @@ val AwsTestRuntimeConfig = TestRuntimeConfig.copy( } ) -fun awsTestCodegenContext(model: Model? = null) = - testCodegenContext(model ?: "namespace test".asSmithyModel()).copy(runtimeConfig = AwsTestRuntimeConfig) +fun awsTestCodegenContext(model: Model? = null, coreRustSettings: CoreRustSettings?) = + testCodegenContext( + model ?: "namespace test".asSmithyModel(), + settings = coreRustSettings ?: testRustSettings(runtimeConfig = AwsTestRuntimeConfig) + ) diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonCodegenServerPlugin.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonCodegenServerPlugin.kt index 58bbc744829..9b116eb360e 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonCodegenServerPlugin.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonCodegenServerPlugin.kt @@ -11,9 +11,10 @@ import software.amazon.smithy.codegen.core.ReservedWordSymbolProvider import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.rust.codegen.rustlang.RustReservedWordSymbolProvider +import software.amazon.smithy.rust.codegen.server.smithy.customizations.ServerRequiredCustomizations import software.amazon.smithy.rust.codegen.smithy.BaseSymbolMetadataProvider -import software.amazon.smithy.rust.codegen.smithy.DefaultConfig import software.amazon.smithy.rust.codegen.smithy.EventStreamSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.StreamingShapeMetadataProvider import software.amazon.smithy.rust.codegen.smithy.StreamingShapeSymbolProvider import software.amazon.smithy.rust.codegen.smithy.SymbolVisitor @@ -41,7 +42,8 @@ class PythonCodegenServerPlugin : SmithyBuildPlugin { // - location (e.g. the mutate section of an operation) // - context (e.g. the of the operation) // - writer: The active RustWriter at the given location - val codegenDecorator = CombinedCodegenDecorator.fromClasspath(context) + val codegenDecorator: CombinedCodegenDecorator = + CombinedCodegenDecorator.fromClasspath(context, ServerRequiredCustomizations()) // PythonServerCodegenVisitor is the main driver of code generation that traverses the model and generates code logger.info("Loaded plugin to generate Rust/Python bindings for the server SSDK for projection ${context.projectionName}") @@ -58,7 +60,7 @@ class PythonCodegenServerPlugin : SmithyBuildPlugin { fun baseSymbolProvider( model: Model, serviceShape: ServiceShape, - symbolVisitorConfig: SymbolVisitorConfig = DefaultConfig + symbolVisitorConfig: SymbolVisitorConfig, ) = SymbolVisitor(model, serviceShape = serviceShape, config = symbolVisitorConfig) // Rename a set of symbols that do not implement `PyClass` and have been wrapped in diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt index 9e8679e5a9f..f12d2c2ad61 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt @@ -16,9 +16,9 @@ import software.amazon.smithy.rust.codegen.server.python.smithy.generators.Pytho import software.amazon.smithy.rust.codegen.server.python.smithy.generators.PythonServerStructureGenerator import software.amazon.smithy.rust.codegen.server.smithy.ServerCodegenVisitor import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerProtocolLoader -import software.amazon.smithy.rust.codegen.smithy.CodegenContext import software.amazon.smithy.rust.codegen.smithy.DefaultPublicModules import software.amazon.smithy.rust.codegen.smithy.RustCrate +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.SymbolVisitorConfig import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.BuilderGenerator @@ -30,18 +30,21 @@ import software.amazon.smithy.rust.codegen.util.getTrait * Entrypoint for Python server-side code generation. This class will walk the in-memory model and * generate all the needed types by calling the accept() function on the available shapes. * - * This class inherits from [ServerCodegenVisitor] since it uses most of the functionlities of the super class + * This class inherits from [ServerCodegenVisitor] since it uses most of the functionalities of the super class * and have to override the symbol provider with [PythonServerSymbolProvider]. */ -class PythonServerCodegenVisitor(context: PluginContext, codegenDecorator: RustCodegenDecorator) : - ServerCodegenVisitor(context, codegenDecorator) { +class PythonServerCodegenVisitor( + context: PluginContext, + codegenDecorator: RustCodegenDecorator +) : ServerCodegenVisitor(context, codegenDecorator) { init { val symbolVisitorConfig = SymbolVisitorConfig( runtimeConfig = settings.runtimeConfig, - codegenConfig = settings.codegenConfig, - handleRequired = true + renameExceptions = false, + handleRequired = true, + handleRustBoxing = true, ) val baseModel = baselineTransform(context.model) val service = settings.getService(baseModel) @@ -61,7 +64,7 @@ class PythonServerCodegenVisitor(context: PluginContext, codegenDecorator: RustC codegenDecorator.symbolProvider(generator.symbolProvider(model, baseProvider)) // Override `codegenContext` which carries the symbolProvider. - codegenContext = CodegenContext(model, symbolProvider, service, protocol, settings, target = CodegenTarget.SERVER) + codegenContext = ServerCodegenContext(model, symbolProvider, service, protocol, settings) // Override `rustCrate` which carries the symbolProvider. rustCrate = RustCrate(context.fileManifest, symbolProvider, DefaultPublicModules, settings.codegenConfig) diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt index be3c3b9b8a1..b00bec00fbd 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt @@ -12,8 +12,8 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.writable import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerRuntimeType import software.amazon.smithy.rust.codegen.server.smithy.customizations.AddInternalServerErrorToAllOperationsDecorator -import software.amazon.smithy.rust.codegen.smithy.CodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.CombinedCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization @@ -27,12 +27,12 @@ import software.amazon.smithy.rust.codegen.smithy.generators.ManifestCustomizati * name = "$CRATE_NAME" * crate-type = ["cdylib"] */ -class CdylibManifestDecorator : RustCodegenDecorator { +class CdylibManifestDecorator : RustCodegenDecorator { override val name: String = "CdylibDecorator" override val order: Byte = 0 override fun crateManifestCustomizations( - codegenContext: CodegenContext + codegenContext: ServerCodegenContext ): ManifestCustomizations = mapOf("lib" to mapOf("name" to codegenContext.settings.moduleName, "crate-type" to listOf("cdylib"))) } @@ -57,16 +57,15 @@ class PubUsePythonTypes(private val runtimeConfig: RuntimeConfig) : LibRsCustomi /** * Decorator applying the customization from [PubUsePythonTypes] class. */ -class PubUsePythonTypesDecorator : RustCodegenDecorator { +class PubUsePythonTypesDecorator : RustCodegenDecorator { override val name: String = "PubUsePythonTypesDecorator" override val order: Byte = 0 override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ServerCodegenContext, baseCustomizations: List - ): List { - return baseCustomizations + PubUsePythonTypes(codegenContext.runtimeConfig) - } + ): List = + baseCustomizations + PubUsePythonTypes(codegenContext.runtimeConfig) } val DECORATORS = listOf( @@ -82,7 +81,7 @@ val DECORATORS = listOf( ) // Combined codegen decorator for Python services. -class PythonServerCodegenDecorator : CombinedCodegenDecorator(DECORATORS) { +class PythonServerCodegenDecorator : CombinedCodegenDecorator(DECORATORS) { override val name: String = "PythonServerCodegenDecorator" override val order: Byte = -1 } diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt index 641e930abad..4ea83409951 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.util.toSnakeCase /** @@ -53,11 +53,11 @@ import software.amazon.smithy.rust.codegen.util.toSnakeCase * that abstracts the processes / event loops / workers lifecycles. */ class PythonApplicationGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val operations: List, ) { - private val symbolProvider = codegenContext.symbolProvider - private val runtimeConfig = codegenContext.runtimeConfig + private val symbolProvider = coreCodegenContext.symbolProvider + private val runtimeConfig = coreCodegenContext.runtimeConfig private val codegenScope = arrayOf( "SmithyPython" to PythonServerCargoDependency.SmithyHttpServerPython(runtimeConfig).asType(), diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt index 17dea610b66..72675bdbd27 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt @@ -14,7 +14,7 @@ import software.amazon.smithy.rust.codegen.rustlang.writable import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerOperationHandlerGenerator -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.util.toSnakeCase /** @@ -32,11 +32,11 @@ import software.amazon.smithy.rust.codegen.util.toSnakeCase * To call a Python coroutine, the same happens, but scheduled in a `tokio::Future`. */ class PythonServerOperationHandlerGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val operations: List, -) : ServerOperationHandlerGenerator(codegenContext, operations) { - private val symbolProvider = codegenContext.symbolProvider - private val runtimeConfig = codegenContext.runtimeConfig +) : ServerOperationHandlerGenerator(coreCodegenContext, operations) { + private val symbolProvider = coreCodegenContext.symbolProvider + private val runtimeConfig = coreCodegenContext.runtimeConfig private val codegenScope = arrayOf( "SmithyPython" to PythonServerCargoDependency.SmithyHttpServerPython(runtimeConfig).asType(), diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerServiceGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerServiceGenerator.kt index 86835adb2a2..ca39f292774 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerServiceGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerServiceGenerator.kt @@ -9,7 +9,7 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerServiceGenerator -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolGenerator import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport @@ -26,7 +26,7 @@ class PythonServerServiceGenerator( protocolGenerator: ProtocolGenerator, protocolSupport: ProtocolSupport, httpBindingResolver: HttpBindingResolver, - private val context: CodegenContext, + private val context: CoreCodegenContext, ) : ServerServiceGenerator(rustCrate, protocolGenerator, protocolSupport, httpBindingResolver, context) { override fun renderCombinedErrors(writer: RustWriter, operation: OperationShape) { diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/RustCodegenServerPlugin.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/RustCodegenServerPlugin.kt index 435c51b64ef..1d2440038c2 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/RustCodegenServerPlugin.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/RustCodegenServerPlugin.kt @@ -11,9 +11,10 @@ import software.amazon.smithy.codegen.core.ReservedWordSymbolProvider import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.rust.codegen.rustlang.RustReservedWordSymbolProvider +import software.amazon.smithy.rust.codegen.server.smithy.customizations.ServerRequiredCustomizations import software.amazon.smithy.rust.codegen.smithy.BaseSymbolMetadataProvider -import software.amazon.smithy.rust.codegen.smithy.DefaultConfig import software.amazon.smithy.rust.codegen.smithy.EventStreamSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.StreamingShapeMetadataProvider import software.amazon.smithy.rust.codegen.smithy.StreamingShapeSymbolProvider import software.amazon.smithy.rust.codegen.smithy.SymbolVisitor @@ -35,12 +36,13 @@ class RustCodegenServerPlugin : SmithyBuildPlugin { override fun execute(context: PluginContext) { // Suppress extremely noisy logs about reserved words Logger.getLogger(ReservedWordSymbolProvider::class.java.name).level = Level.OFF - // Discover [RustCodegenDecorators] on the classpath. [RustCodegenDecorator] return different types of - // customization. A customization is a function of: + // Discover [RustCodegenDecorators] on the classpath. [RustCodegenDecorator] returns different types of + // customizations. A customization is a function of: // - location (e.g. the mutate section of an operation) // - context (e.g. the of the operation) // - writer: The active RustWriter at the given location - val codegenDecorator = CombinedCodegenDecorator.fromClasspath(context) + val codegenDecorator: CombinedCodegenDecorator = + CombinedCodegenDecorator.fromClasspath(context, ServerRequiredCustomizations()) // ServerCodegenVisitor is the main driver of code generation that traverses the model and generates code logger.info("Loaded plugin to generate pure Rust bindings for the server SSDK") @@ -57,7 +59,7 @@ class RustCodegenServerPlugin : SmithyBuildPlugin { fun baseSymbolProvider( model: Model, serviceShape: ServiceShape, - symbolVisitorConfig: SymbolVisitorConfig = DefaultConfig + symbolVisitorConfig: SymbolVisitorConfig ) = SymbolVisitor(model, serviceShape = serviceShape, config = symbolVisitorConfig) // Generate different types for EventStream shapes (e.g. transcribe streaming) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt index ca1fb540af3..b6d7fc12666 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt @@ -19,11 +19,12 @@ import software.amazon.smithy.model.transform.ModelTransformer import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerEnumGenerator import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerServiceGenerator import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerProtocolLoader -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.smithy.DefaultPublicModules import software.amazon.smithy.rust.codegen.smithy.RustCrate -import software.amazon.smithy.rust.codegen.smithy.RustSettings import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext +import software.amazon.smithy.rust.codegen.smithy.ServerRustSettings import software.amazon.smithy.rust.codegen.smithy.SymbolVisitorConfig import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.BuilderGenerator @@ -32,9 +33,7 @@ import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator import software.amazon.smithy.rust.codegen.smithy.generators.implBlock import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolGenerator -import software.amazon.smithy.rust.codegen.smithy.letIf import software.amazon.smithy.rust.codegen.smithy.protocols.ProtocolGeneratorFactory -import software.amazon.smithy.rust.codegen.smithy.transformers.AddErrorMessage import software.amazon.smithy.rust.codegen.smithy.transformers.EventStreamNormalizer import software.amazon.smithy.rust.codegen.smithy.transformers.OperationNormalizer import software.amazon.smithy.rust.codegen.smithy.transformers.RecursiveShapeBoxer @@ -48,27 +47,29 @@ import java.util.logging.Logger * Entrypoint for server-side code generation. This class will walk the in-memory model and * generate all the needed types by calling the accept() function on the available shapes. */ -open class ServerCodegenVisitor(context: PluginContext, private val codegenDecorator: RustCodegenDecorator) : - ShapeVisitor.Default() { - - private val fileManifest = context.fileManifest +open class ServerCodegenVisitor( + context: PluginContext, + private val codegenDecorator: RustCodegenDecorator +) : ShapeVisitor.Default() { protected val logger = Logger.getLogger(javaClass.name) protected val settings = ServerRustSettings.from(context.model, context.settings) - var model: Model - var protocolGeneratorFactory: ProtocolGeneratorFactory - var protocolGenerator: ProtocolGenerator - var codegenContext: CodegenContext - var symbolProvider: RustSymbolProvider - var rustCrate: RustCrate + protected var symbolProvider: RustSymbolProvider + protected var rustCrate: RustCrate + private val fileManifest = context.fileManifest + protected var model: Model + protected var codegenContext: ServerCodegenContext + protected var protocolGeneratorFactory: ProtocolGeneratorFactory + protected var protocolGenerator: ProtocolGenerator init { val symbolVisitorConfig = SymbolVisitorConfig( runtimeConfig = settings.runtimeConfig, - codegenConfig = settings.codegenConfig, - handleRequired = true + renameExceptions = false, + handleRequired = true, + handleRustBoxing = true, ) val baseModel = baselineTransform(context.model) val service = settings.getService(baseModel) @@ -86,7 +87,13 @@ open class ServerCodegenVisitor(context: PluginContext, private val codegenDecor symbolProvider = codegenDecorator.symbolProvider(generator.symbolProvider(model, baseProvider)) - codegenContext = CodegenContext(model, symbolProvider, service, protocol, settings, target = CodegenTarget.SERVER) + codegenContext = ServerCodegenContext( + model, + symbolProvider, + service, + protocol, + settings, + ) rustCrate = RustCrate(context.fileManifest, symbolProvider, DefaultPublicModules, settings.codegenConfig) protocolGenerator = protocolGeneratorFactory.buildProtocolGenerator(codegenContext) @@ -102,8 +109,6 @@ open class ServerCodegenVisitor(context: PluginContext, private val codegenDecor .let { ModelTransformer.create().copyServiceErrorsToOperations(it, settings.getService(it)) } // Add `Box` to recursive shapes as necessary .let(RecursiveShapeBoxer::transform) - // Normalize the `message` field on errors when enabled in settings (default: true) - .letIf(settings.codegenConfig.addMessageToErrors, AddErrorMessage::transform) // Normalize operations by adding synthetic input and output shapes to every operation .let(OperationNormalizer::transform) // Drop unsupported event stream operations from the model @@ -114,7 +119,7 @@ open class ServerCodegenVisitor(context: PluginContext, private val codegenDecor /** * Execute code generation * - * 1. Load the service from [RustSettings]. + * 1. Load the service from [CoreRustSettings]. * 2. Traverse every shape in the closure of the service. * 3. Loop through each shape and visit them (calling the override functions in this class) * 4. Call finalization tasks specified by decorators. diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerRustSettings.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerRustSettings.kt deleted file mode 100644 index 998b04b0585..00000000000 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerRustSettings.kt +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.rust.codegen.server.smithy - -import software.amazon.smithy.model.Model -import software.amazon.smithy.model.node.ObjectNode -import software.amazon.smithy.model.shapes.ShapeId -import software.amazon.smithy.rust.codegen.smithy.CODEGEN_SETTINGS -import software.amazon.smithy.rust.codegen.smithy.CodegenConfig -import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig -import software.amazon.smithy.rust.codegen.smithy.RustSettings -import java.util.Optional - -/** - * Configuration of codegen settings - * - * [renameExceptions]: Rename `Exception` to `Error` in the generated SDK - * [includeFluentClient]: Generate a `client` module in the generated SDK (currently the AWS SDK sets this to false - * and generates its own client) - * - * [addMessageToErrors]: Adds a `message` field automatically to all error shapes - * [formatTimeoutSeconds]: Timeout for running cargo fmt at the end of code generation - */ -data class ServerCodegenConfig( - val renameExceptions: Boolean = false, - val includeFluentClient: Boolean = false, - val addMessageToErrors: Boolean = false, - val formatTimeoutSeconds: Int = 20, - val debugMode: Boolean = false, - // TODO(EventStream): [CLEANUP] Remove this property when turning on Event Stream for all services - val eventStreamAllowList: Set = emptySet(), -) { - companion object { - fun fromNode(node: Optional): CodegenConfig { - return if (node.isPresent) { - CodegenConfig.fromNode(node) - } else { - CodegenConfig( - false, - false, - false, - 20, - debugMode = false, - emptySet() - ) - } - } - } -} - -/** - * Settings used by [RustCodegenPlugin] - */ -class ServerRustSettings( - val service: ShapeId, - val moduleName: String, - val moduleVersion: String, - val moduleAuthors: List, - val moduleDescription: String?, - val moduleRepository: String?, - val runtimeConfig: RuntimeConfig, - val codegenConfig: CodegenConfig, - val license: String?, - val examplesUri: String? = null, - private val model: Model -) { - companion object { - /** - * Create settings from a configuration object node. - * - * @param model Model to infer the service from (if not explicitly set in config) - * @param config Config object to load - * @throws software.amazon.smithy.model.node.ExpectationNotMetException - * @return Returns the extracted settings - */ - fun from(model: Model, config: ObjectNode): RustSettings { - val codegenSettings = config.getObjectMember(CODEGEN_SETTINGS) - val codegenConfig = ServerCodegenConfig.fromNode(codegenSettings) - return RustSettings.fromCodegenConfig(model, config, codegenConfig) - } - } -} diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecorator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecorator.kt index af82b645b83..23e59d50018 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecorator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecorator.kt @@ -13,6 +13,7 @@ import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.traits.ErrorTrait import software.amazon.smithy.model.traits.RequiredTrait import software.amazon.smithy.model.transform.ModelTransformer +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator /** @@ -29,12 +30,12 @@ import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator * mkdir -p "$D" && echo "$C" > "$D/$F" * ``` */ -class AddInternalServerErrorToInfallibleOperationsDecorator : RustCodegenDecorator { +class AddInternalServerErrorToInfallibleOperationsDecorator : RustCodegenDecorator { override val name: String = "AddInternalServerErrorToInfallibleOperations" override val order: Byte = 0 override fun transformModel(service: ServiceShape, model: Model): Model = - addErrorShapeToModelOperations(service, model, { shape -> shape.errors.isEmpty() }) + addErrorShapeToModelOperations(service, model) { shape -> shape.errors.isEmpty() } } /** @@ -55,16 +56,16 @@ class AddInternalServerErrorToInfallibleOperationsDecorator : RustCodegenDecorat * mkdir -p "$D" && echo "$C" > "$D/$F" * ``` */ -class AddInternalServerErrorToAllOperationsDecorator : RustCodegenDecorator { +class AddInternalServerErrorToAllOperationsDecorator : RustCodegenDecorator { override val name: String = "AddInternalServerErrorToAllOperations" override val order: Byte = 0 override fun transformModel(service: ServiceShape, model: Model): Model = - addErrorShapeToModelOperations(service, model, { _ -> true }) + addErrorShapeToModelOperations(service, model) { true } } fun addErrorShapeToModelOperations(service: ServiceShape, model: Model, opSelector: (OperationShape) -> Boolean): Model { - val errorShape = internalServerError(service.id.getNamespace()) + val errorShape = internalServerError(service.id.namespace) val modelShapes = model.toBuilder().addShapes(listOf(errorShape)).build() return ModelTransformer.create().mapShapes(modelShapes) { shape -> if (shape is OperationShape && opSelector(shape)) { @@ -75,7 +76,7 @@ fun addErrorShapeToModelOperations(service: ServiceShape, model: Model, opSelect } } -fun internalServerError(namespace: String): StructureShape = +private fun internalServerError(namespace: String): StructureShape = StructureShape.builder().id("$namespace#InternalServerError") .addTrait(ErrorTrait("server")) .addMember( diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/ServerRequiredCustomizations.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/ServerRequiredCustomizations.kt new file mode 100644 index 00000000000..fb452d11406 --- /dev/null +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/ServerRequiredCustomizations.kt @@ -0,0 +1,38 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.server.smithy.customizations + +import software.amazon.smithy.rust.codegen.rustlang.Feature +import software.amazon.smithy.rust.codegen.smithy.RustCrate +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext +import software.amazon.smithy.rust.codegen.smithy.customizations.AllowLintsGenerator +import software.amazon.smithy.rust.codegen.smithy.customizations.CrateVersionGenerator +import software.amazon.smithy.rust.codegen.smithy.customizations.SmithyTypesPubUseGenerator +import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator +import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization + +/** + * A set of customizations that are included in all protocols. + * + * This exists as a convenient place to gather these modifications, these are not true customizations. + * + * See [RequiredCustomizations] from the `rust-codegen` subproject for the client version of this decorator. + */ +class ServerRequiredCustomizations : RustCodegenDecorator { + override val name: String = "ServerRequired" + override val order: Byte = -1 + + override fun libRsCustomizations( + codegenContext: ServerCodegenContext, + baseCustomizations: List + ): List = + baseCustomizations + CrateVersionGenerator() + SmithyTypesPubUseGenerator(codegenContext.runtimeConfig) + AllowLintsGenerator() + + override fun extras(codegenContext: ServerCodegenContext, rustCrate: RustCrate) { + // Add rt-tokio feature for `ByteStream::from_path` + rustCrate.mergeFeature(Feature("rt-tokio", true, listOf("aws-smithy-http/rt-tokio"))) + } +} diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt index fb4d8013064..c0c24ddb2f9 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt @@ -14,7 +14,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerHttpBoundProtocolGenerator -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.error.errorSymbol import software.amazon.smithy.rust.codegen.util.hasStreamingMember @@ -26,16 +26,16 @@ import software.amazon.smithy.rust.codegen.util.toPascalCase * ServerOperationHandlerGenerator */ open class ServerOperationHandlerGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val operations: List, ) { private val serverCrate = "aws_smithy_http_server" - private val service = codegenContext.serviceShape - private val model = codegenContext.model - private val protocol = codegenContext.protocol - private val symbolProvider = codegenContext.symbolProvider + private val service = coreCodegenContext.serviceShape + private val model = coreCodegenContext.model + private val protocol = coreCodegenContext.protocol + private val symbolProvider = coreCodegenContext.symbolProvider private val operationNames = operations.map { symbolProvider.toSymbol(it).name } - private val runtimeConfig = codegenContext.runtimeConfig + private val runtimeConfig = coreCodegenContext.runtimeConfig private val codegenScope = arrayOf( "AsyncTrait" to ServerCargoDependency.AsyncTrait.asType(), "PinProjectLite" to ServerCargoDependency.PinProjectLite.asType(), diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGenerator.kt index 9e20378d964..99ec2b69ef1 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGenerator.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.protocols.HttpBindingResolver import software.amazon.smithy.rust.codegen.util.dq @@ -28,15 +28,15 @@ import software.amazon.smithy.rust.codegen.util.toSnakeCase * ServerOperationRegistryGenerator */ class ServerOperationRegistryGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val httpBindingResolver: HttpBindingResolver, private val operations: List, ) { - private val protocol = codegenContext.protocol - private val symbolProvider = codegenContext.symbolProvider - private val serviceName = codegenContext.serviceShape.toShapeId().name + private val protocol = coreCodegenContext.protocol + private val symbolProvider = coreCodegenContext.symbolProvider + private val serviceName = coreCodegenContext.serviceShape.toShapeId().name private val operationNames = operations.map { symbolProvider.toSymbol(it).name.toSnakeCase() } - private val runtimeConfig = codegenContext.runtimeConfig + private val runtimeConfig = coreCodegenContext.runtimeConfig private val codegenScope = arrayOf( "Router" to ServerRuntimeType.Router(runtimeConfig), "SmithyHttpServer" to ServerCargoDependency.SmithyHttpServer(runtimeConfig).asType(), diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt index 4abc64460e9..8752e0018b7 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt @@ -10,7 +10,7 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.server.smithy.generators.protocol.ServerProtocolTestGenerator -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolGenerator import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport @@ -27,10 +27,10 @@ open class ServerServiceGenerator( private val protocolGenerator: ProtocolGenerator, private val protocolSupport: ProtocolSupport, private val httpBindingResolver: HttpBindingResolver, - private val context: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, ) { - private val index = TopDownIndex.of(context.model) - protected val operations = index.getContainedOperations(context.serviceShape).sortedBy { it.id } + private val index = TopDownIndex.of(coreCodegenContext.model) + protected val operations = index.getContainedOperations(coreCodegenContext.serviceShape).sortedBy { it.id } /** * Render Service Specific code. Code will end up in different files via [useShapeWriter]. See `SymbolVisitor.kt` @@ -43,7 +43,7 @@ open class ServerServiceGenerator( operationWriter, operation, ) - ServerProtocolTestGenerator(context, protocolSupport, operation, operationWriter) + ServerProtocolTestGenerator(coreCodegenContext, protocolSupport, operation, operationWriter) .render() } if (operation.errors.isNotEmpty()) { @@ -66,16 +66,16 @@ open class ServerServiceGenerator( // Render combined errors. open fun renderCombinedErrors(writer: RustWriter, operation: OperationShape) { - ServerCombinedErrorGenerator(context.model, context.symbolProvider, operation).render(writer) + ServerCombinedErrorGenerator(coreCodegenContext.model, coreCodegenContext.symbolProvider, operation).render(writer) } // Render operations handler. open fun renderOperationHandler(writer: RustWriter, operations: List) { - ServerOperationHandlerGenerator(context, operations).render(writer) + ServerOperationHandlerGenerator(coreCodegenContext, operations).render(writer) } // Render operations registry. private fun renderOperationRegistry(writer: RustWriter, operations: List) { - ServerOperationRegistryGenerator(context, httpBindingResolver, operations).render(writer) + ServerOperationRegistryGenerator(coreCodegenContext, httpBindingResolver, operations).render(writer) } } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/http/ServerRequestBindingGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/http/ServerRequestBindingGenerator.kt index dd5809902ad..397c55fdc05 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/http/ServerRequestBindingGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/http/ServerRequestBindingGenerator.kt @@ -7,7 +7,7 @@ package software.amazon.smithy.rust.codegen.server.smithy.generators.http import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.RustWriter -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.http.HttpBindingGenerator import software.amazon.smithy.rust.codegen.smithy.generators.http.HttpMessageType @@ -16,10 +16,10 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.Protocol class ServerRequestBindingGenerator( protocol: Protocol, - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, operationShape: OperationShape ) { - private val httpBindingGenerator = HttpBindingGenerator(protocol, codegenContext, operationShape) + private val httpBindingGenerator = HttpBindingGenerator(protocol, coreCodegenContext, operationShape) fun generateDeserializeHeaderFn(binding: HttpBindingDescriptor): RuntimeType = httpBindingGenerator.generateDeserializeHeaderFn(binding) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/http/ServerResponseBindingGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/http/ServerResponseBindingGenerator.kt index 0b9fe0a214c..ea425b64a6e 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/http/ServerResponseBindingGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/http/ServerResponseBindingGenerator.kt @@ -7,7 +7,7 @@ package software.amazon.smithy.rust.codegen.server.smithy.generators.http import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.Shape -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.http.HttpBindingGenerator import software.amazon.smithy.rust.codegen.smithy.generators.http.HttpMessageType @@ -15,10 +15,10 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.Protocol class ServerResponseBindingGenerator( protocol: Protocol, - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, operationShape: OperationShape ) { - private val httpBindingGenerator = HttpBindingGenerator(protocol, codegenContext, operationShape) + private val httpBindingGenerator = HttpBindingGenerator(protocol, coreCodegenContext, operationShape) fun generateAddHeadersFn(shape: Shape): RuntimeType? = httpBindingGenerator.generateAddHeadersFn(shape, HttpMessageType.RESPONSE) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt index d3b61ded7b8..255dfa0027a 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt @@ -34,7 +34,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerHttpBoundProtocolGenerator -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.Instantiator @@ -56,32 +56,32 @@ import kotlin.reflect.KFunction1 * Generate protocol tests for an operation */ class ServerProtocolTestGenerator( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val protocolSupport: ProtocolSupport, private val operationShape: OperationShape, private val writer: RustWriter ) { private val logger = Logger.getLogger(javaClass.name) - private val model = codegenContext.model - private val inputShape = operationShape.inputShape(codegenContext.model) - private val outputShape = operationShape.outputShape(codegenContext.model) - private val symbolProvider = codegenContext.symbolProvider + private val model = coreCodegenContext.model + private val inputShape = operationShape.inputShape(coreCodegenContext.model) + private val outputShape = operationShape.outputShape(coreCodegenContext.model) + private val symbolProvider = coreCodegenContext.symbolProvider private val operationSymbol = symbolProvider.toSymbol(operationShape) - private val operationIndex = OperationIndex.of(codegenContext.model) + private val operationIndex = OperationIndex.of(coreCodegenContext.model) private val operationImplementationName = "${operationSymbol.name}${ServerHttpBoundProtocolGenerator.OPERATION_OUTPUT_WRAPPER_SUFFIX}" private val operationErrorName = "crate::error::${operationSymbol.name}Error" - private val instantiator = with(codegenContext) { + private val instantiator = with(coreCodegenContext) { Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.SERVER) } private val codegenScope = arrayOf( "Bytes" to RuntimeType.Bytes, - "SmithyHttp" to CargoDependency.SmithyHttp(codegenContext.runtimeConfig).asType(), + "SmithyHttp" to CargoDependency.SmithyHttp(coreCodegenContext.runtimeConfig).asType(), "Http" to CargoDependency.Http.asType(), "Hyper" to CargoDependency.Hyper.asType(), - "SmithyHttpServer" to ServerCargoDependency.SmithyHttpServer(codegenContext.runtimeConfig).asType(), + "SmithyHttpServer" to ServerCargoDependency.SmithyHttpServer(coreCodegenContext.runtimeConfig).asType(), "AssertEq" to CargoDependency.PrettyAssertions.asType().member("assert_eq!") ) @@ -163,7 +163,7 @@ class ServerProtocolTestGenerator( private fun List.filterMatching(): List { return if (RunOnly.isNullOrEmpty()) { this.filter { testCase -> - testCase.protocol == codegenContext.protocol && + testCase.protocol == coreCodegenContext.protocol && !DisableTests.contains(testCase.id) } } else { @@ -177,7 +177,7 @@ class ServerProtocolTestGenerator( private fun List.fixBroken(): List = this.map { when (it) { is TestCase.RequestTest -> { - val howToFixIt = BrokenRequestTests[Pair(codegenContext.serviceShape.id.toString(), it.id)] + val howToFixIt = BrokenRequestTests[Pair(coreCodegenContext.serviceShape.id.toString(), it.id)] if (howToFixIt == null) { it } else { @@ -186,7 +186,7 @@ class ServerProtocolTestGenerator( } } is TestCase.ResponseTest -> { - val howToFixIt = BrokenResponseTests[Pair(codegenContext.serviceShape.id.toString(), it.id)] + val howToFixIt = BrokenResponseTests[Pair(coreCodegenContext.serviceShape.id.toString(), it.id)] if (howToFixIt == null) { it } else { @@ -259,7 +259,7 @@ class ServerProtocolTestGenerator( } private fun expectFail(testCase: TestCase): Boolean = ExpectFail.find { - it.id == testCase.id && it.testType == testCase.testType && it.service == codegenContext.serviceShape.id.toString() + it.id == testCase.id && it.testType == testCase.testType && it.service == coreCodegenContext.serviceShape.id.toString() } != null /** @@ -393,8 +393,8 @@ class ServerProtocolTestGenerator( // A streaming shape does not implement `PartialEq`, so we have to iterate over the input shape's members // and handle the equality assertion separately. for (member in inputShape.members()) { - val memberName = codegenContext.symbolProvider.toMemberName(member) - if (member.isStreaming(codegenContext.model)) { + val memberName = coreCodegenContext.symbolProvider.toMemberName(member) + if (member.isStreaming(coreCodegenContext.model)) { rustWriter.rustTemplate( """ #{AssertEq}( @@ -422,11 +422,11 @@ class ServerProtocolTestGenerator( // TODO(https://github.com/awslabs/smithy-rs/issues/1147) Handle the case of nested floating point members. if (hasFloatingPointMembers) { for (member in inputShape.members()) { - val memberName = codegenContext.symbolProvider.toMemberName(member) - when (codegenContext.model.expectShape(member.target)) { + val memberName = coreCodegenContext.symbolProvider.toMemberName(member) + when (coreCodegenContext.model.expectShape(member.target)) { is DoubleShape, is FloatShape -> { rustWriter.addUseImports( - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "FloatEquals").toSymbol() + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "FloatEquals").toSymbol() ) rustWriter.rust( """ @@ -518,8 +518,8 @@ class ServerProtocolTestGenerator( "#T(&body, ${ rustWriter.escape(body).dq() }, #T::from(${(mediaType ?: "unknown").dq()}))", - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "validate_body"), - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "MediaType") + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "validate_body"), + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "MediaType") ) } } @@ -588,7 +588,7 @@ class ServerProtocolTestGenerator( assertOk(rustWriter) { write( "#T($actualExpression, $variableName)", - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "validate_headers") + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "validate_headers") ) } } @@ -609,7 +609,7 @@ class ServerProtocolTestGenerator( assertOk(rustWriter) { write( "#T($actualExpression, $expectedVariableName)", - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, checkFunction) + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, checkFunction) ) } } @@ -619,7 +619,7 @@ class ServerProtocolTestGenerator( * for pretty prettying protocol test helper results */ private fun assertOk(rustWriter: RustWriter, inner: RustWriter.() -> Unit) { - rustWriter.write("#T(", RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "assert_ok")) + rustWriter.write("#T(", RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "assert_ok")) inner(rustWriter) rustWriter.write(");") } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerAwsJson.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerAwsJson.kt index d48ffc3c258..3770a9ced96 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerAwsJson.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerAwsJson.kt @@ -12,7 +12,8 @@ import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.escape import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.smithy.protocols.AwsJson import software.amazon.smithy.rust.codegen.smithy.protocols.AwsJsonVersion @@ -30,10 +31,11 @@ import software.amazon.smithy.rust.codegen.util.hasTrait * AwsJson 1.0 and 1.1 server-side protocol factory. This factory creates the [ServerHttpBoundProtocolGenerator] * with AwsJson specific configurations. */ -class ServerAwsJsonFactory(private val version: AwsJsonVersion) : ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol = ServerAwsJson(codegenContext, version) +class ServerAwsJsonFactory(private val version: AwsJsonVersion) : + ProtocolGeneratorFactory { + override fun protocol(codegenContext: ServerCodegenContext): Protocol = ServerAwsJson(codegenContext, version) - override fun buildProtocolGenerator(codegenContext: CodegenContext): ServerHttpBoundProtocolGenerator = + override fun buildProtocolGenerator(codegenContext: ServerCodegenContext): ServerHttpBoundProtocolGenerator = ServerHttpBoundProtocolGenerator(codegenContext, protocol(codegenContext)) override fun transformModel(model: Model): Model = model @@ -81,17 +83,17 @@ class ServerAwsJsonError(private val awsJsonVersion: AwsJsonVersion) : JsonCusto * customizes [JsonSerializerGenerator] to add this functionality. */ class ServerAwsJsonSerializerGenerator( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val httpBindingResolver: HttpBindingResolver, private val awsJsonVersion: AwsJsonVersion, private val jsonSerializerGenerator: JsonSerializerGenerator = - JsonSerializerGenerator(codegenContext, httpBindingResolver, ::awsJsonFieldName, customizations = listOf(ServerAwsJsonError(awsJsonVersion))) + JsonSerializerGenerator(coreCodegenContext, httpBindingResolver, ::awsJsonFieldName, customizations = listOf(ServerAwsJsonError(awsJsonVersion))) ) : StructuredDataSerializerGenerator by jsonSerializerGenerator class ServerAwsJson( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val awsJsonVersion: AwsJsonVersion -) : AwsJson(codegenContext, awsJsonVersion) { +) : AwsJson(coreCodegenContext, awsJsonVersion) { override fun structuredDataSerializer(operationShape: OperationShape): StructuredDataSerializerGenerator = - ServerAwsJsonSerializerGenerator(codegenContext, httpBindingResolver, awsJsonVersion) + ServerAwsJsonSerializerGenerator(coreCodegenContext, httpBindingResolver, awsJsonVersion) } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt index 9ad961d399c..5af80140abd 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt @@ -41,8 +41,8 @@ import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType import software.amazon.smithy.rust.codegen.server.smithy.generators.http.ServerRequestBindingGenerator import software.amazon.smithy.rust.codegen.server.smithy.generators.http.ServerResponseBindingGenerator -import software.amazon.smithy.rust.codegen.smithy.CodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.extractSymbolFromOption import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.smithy.generators.builderSymbol @@ -78,7 +78,7 @@ import java.util.logging.Logger * See `ServerRestJsonFactory.kt` for more info. */ class ServerHttpBoundProtocolGenerator( - codegenContext: CodegenContext, + codegenContext: ServerCodegenContext, protocol: Protocol, ) : ProtocolGenerator( codegenContext, @@ -104,7 +104,7 @@ class ServerHttpBoundProtocolGenerator( * non-streaming types. */ private class ServerHttpBoundProtocolTraitImplGenerator( - private val codegenContext: CodegenContext, + private val codegenContext: ServerCodegenContext, private val protocol: Protocol, ) : ProtocolTraitImplGenerator { private val logger = Logger.getLogger(javaClass.name) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerProtocolLoader.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerProtocolLoader.kt index 09de8308c05..67929355ffe 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerProtocolLoader.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerProtocolLoader.kt @@ -15,6 +15,7 @@ import software.amazon.smithy.model.knowledge.ServiceIndex import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.traits.Trait +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolGenerator import software.amazon.smithy.rust.codegen.smithy.protocols.AwsJsonVersion import software.amazon.smithy.rust.codegen.smithy.protocols.ProtocolGeneratorFactory @@ -23,11 +24,11 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.ProtocolMap /* * Protocol dispatcher, responsible for protocol selection. */ -class ServerProtocolLoader(private val supportedProtocols: ProtocolMap) { +class ServerProtocolLoader(private val supportedProtocols: ProtocolMap) { fun protocolFor( model: Model, serviceShape: ServiceShape - ): Pair> { + ): Pair> { val protocols: MutableMap = ServiceIndex.of(model).getProtocols(serviceShape) val matchingProtocols = protocols.keys.mapNotNull { protocolId -> supportedProtocols[protocolId]?.let { protocolId to it } } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerRestJsonFactory.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerRestJsonFactory.kt index dc5e543a09f..9d226b7e6c1 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerRestJsonFactory.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerRestJsonFactory.kt @@ -6,7 +6,7 @@ package software.amazon.smithy.rust.codegen.server.smithy.protocols import software.amazon.smithy.model.Model -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.smithy.protocols.Protocol import software.amazon.smithy.rust.codegen.smithy.protocols.ProtocolGeneratorFactory @@ -16,10 +16,10 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.RestJson * RestJson1 server-side protocol factory. This factory creates the [ServerHttpProtocolGenerator] * with RestJson1 specific configurations. */ -class ServerRestJsonFactory : ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol = RestJson(codegenContext) +class ServerRestJsonFactory : ProtocolGeneratorFactory { + override fun protocol(codegenContext: ServerCodegenContext): Protocol = RestJson(codegenContext) - override fun buildProtocolGenerator(codegenContext: CodegenContext): ServerHttpBoundProtocolGenerator = + override fun buildProtocolGenerator(codegenContext: ServerCodegenContext): ServerHttpBoundProtocolGenerator = ServerHttpBoundProtocolGenerator(codegenContext, RestJson(codegenContext)) override fun transformModel(model: Model): Model = model diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerRestXmlFactory.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerRestXmlFactory.kt index f22b1886a2d..e45247ff8d8 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerRestXmlFactory.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerRestXmlFactory.kt @@ -6,7 +6,7 @@ package software.amazon.smithy.rust.codegen.server.smithy.protocols import software.amazon.smithy.model.Model -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.smithy.protocols.Protocol import software.amazon.smithy.rust.codegen.smithy.protocols.ProtocolGeneratorFactory @@ -16,10 +16,10 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.RestXml * RestXml server-side protocol factory. This factory creates the [ServerHttpProtocolGenerator] * with RestXml specific configurations. */ -class ServerRestXmlFactory : ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol = RestXml(codegenContext) +class ServerRestXmlFactory : ProtocolGeneratorFactory { + override fun protocol(codegenContext: ServerCodegenContext): Protocol = RestXml(codegenContext) - override fun buildProtocolGenerator(codegenContext: CodegenContext): ServerHttpBoundProtocolGenerator = + override fun buildProtocolGenerator(codegenContext: ServerCodegenContext): ServerHttpBoundProtocolGenerator = ServerHttpBoundProtocolGenerator(codegenContext, RestXml(codegenContext)) override fun transformModel(model: Model): Model = model diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/testutil/ServerTestHelpers.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/testutil/ServerTestHelpers.kt index c9333880fcd..0250bb63397 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/testutil/ServerTestHelpers.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/testutil/ServerTestHelpers.kt @@ -8,26 +8,22 @@ package software.amazon.smithy.rust.codegen.server.smithy.testutil import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.rust.codegen.server.smithy.RustCodegenServerPlugin -import software.amazon.smithy.rust.codegen.smithy.CodegenConfig import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.SymbolVisitorConfig import software.amazon.smithy.rust.codegen.testutil.TestRuntimeConfig +// These are the settings we default to if the user does not override them in their `smithy-build.json`. val ServerTestSymbolVisitorConfig = SymbolVisitorConfig( runtimeConfig = TestRuntimeConfig, - // These are the settings we default to if the user does not override them in their `smithy-build.json`. - codegenConfig = CodegenConfig( - renameExceptions = false, - includeFluentClient = false, - addMessageToErrors = false, - formatTimeoutSeconds = 20, - eventStreamAllowList = emptySet() - ), + renameExceptions = false, handleRustBoxing = true, handleRequired = true ) -fun serverTestSymbolProvider(model: Model, serviceShape: ServiceShape? = null): RustSymbolProvider = +fun serverTestSymbolProvider( + model: Model, + serviceShape: ServiceShape? = null, +): RustSymbolProvider = RustCodegenServerPlugin.baseSymbolProvider( model, serviceShape ?: ServiceShape.builder().version("test").id("test#Service").build(), diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ClientCodegenContext.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ClientCodegenContext.kt new file mode 100644 index 00000000000..e1887ad1598 --- /dev/null +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ClientCodegenContext.kt @@ -0,0 +1,27 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.smithy + +import software.amazon.smithy.model.Model +import software.amazon.smithy.model.shapes.ServiceShape +import software.amazon.smithy.model.shapes.ShapeId +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget + +/** + * [ClientCodegenContext] contains code-generation context that is _specific_ to the [RustCodegenPlugin] plugin + * from the `rust-codegen` subproject. + * + * It inherits from [CoreCodegenContext], which contains code-generation context that is common to _all_ smithy-rs plugins. + */ +data class ClientCodegenContext( + override val model: Model, + override val symbolProvider: RustSymbolProvider, + override val serviceShape: ServiceShape, + override val protocol: ShapeId, + override val settings: ClientRustSettings, +) : CoreCodegenContext( + model, symbolProvider, serviceShape, protocol, settings, CodegenTarget.CLIENT +) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ClientRustSettings.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ClientRustSettings.kt new file mode 100644 index 00000000000..7c2aca25665 --- /dev/null +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ClientRustSettings.kt @@ -0,0 +1,109 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.smithy + +import software.amazon.smithy.model.Model +import software.amazon.smithy.model.node.ObjectNode +import software.amazon.smithy.model.shapes.ShapeId +import java.util.Optional + +/** + * [ClientRustSettings] and [ClientCodegenConfig] classes. + * + * These are specializations of [RustSettings] and [CodegenConfig] for the `rust-codegen` client Smithy plugin. Refer + * to the documentation of those for the inherited properties. + */ + +/** + * Settings used by [RustCodegenPlugin]. + */ +data class ClientRustSettings( + override val service: ShapeId, + override val moduleName: String, + override val moduleVersion: String, + override val moduleAuthors: List, + override val moduleDescription: String?, + override val moduleRepository: String?, + override val runtimeConfig: RuntimeConfig, + override val codegenConfig: ClientCodegenConfig, + override val license: String?, + override val examplesUri: String?, + override val customizationConfig: ObjectNode? +) : CoreRustSettings( + service, + moduleName, + moduleVersion, + moduleAuthors, + moduleDescription, + moduleRepository, + runtimeConfig, + codegenConfig, + license, + examplesUri, + customizationConfig +) { + companion object { + fun from(model: Model, config: ObjectNode): ClientRustSettings { + val coreRustSettings = CoreRustSettings.from(model, config) + val codegenSettingsNode = config.getObjectMember(CODEGEN_SETTINGS) + val coreCodegenConfig = CoreCodegenConfig.fromNode(codegenSettingsNode) + return ClientRustSettings( + service = coreRustSettings.service, + moduleName = coreRustSettings.moduleName, + moduleVersion = coreRustSettings.moduleVersion, + moduleAuthors = coreRustSettings.moduleAuthors, + moduleDescription = coreRustSettings.moduleDescription, + moduleRepository = coreRustSettings.moduleRepository, + runtimeConfig = coreRustSettings.runtimeConfig, + codegenConfig = ClientCodegenConfig.fromCodegenConfigAndNode(coreCodegenConfig, codegenSettingsNode), + license = coreRustSettings.license, + examplesUri = coreRustSettings.examplesUri, + customizationConfig = coreRustSettings.customizationConfig + ) + } + } +} + +/** + * [renameExceptions]: Rename `Exception` to `Error` in the generated SDK + * [includeFluentClient]: Generate a `client` module in the generated SDK (currently the AWS SDK sets this to `false` + * and generates its own client) + * [addMessageToErrors]: Adds a `message` field automatically to all error shapes + */ +data class ClientCodegenConfig( + override val formatTimeoutSeconds: Int = defaultFormatTimeoutSeconds, + override val debugMode: Boolean = defaultDebugMode, + override val eventStreamAllowList: Set = defaultEventStreamAllowList, + val renameExceptions: Boolean = defaultRenameExceptions, + val includeFluentClient: Boolean = defaultIncludeFluentClient, + val addMessageToErrors: Boolean = defaultAddMessageToErrors, +) : CoreCodegenConfig( + formatTimeoutSeconds, debugMode, eventStreamAllowList +) { + companion object { + private const val defaultRenameExceptions = true + private const val defaultIncludeFluentClient = true + private const val defaultAddMessageToErrors = true + + fun fromCodegenConfigAndNode(coreCodegenConfig: CoreCodegenConfig, node: Optional) = + if (node.isPresent) { + ClientCodegenConfig( + formatTimeoutSeconds = coreCodegenConfig.formatTimeoutSeconds, + debugMode = coreCodegenConfig.debugMode, + eventStreamAllowList = coreCodegenConfig.eventStreamAllowList, + renameExceptions = node.get().getBooleanMemberOrDefault("renameErrors", defaultRenameExceptions), + includeFluentClient = node.get().getBooleanMemberOrDefault("includeFluentClient", defaultIncludeFluentClient), + addMessageToErrors = node.get().getBooleanMemberOrDefault("addMessageToErrors", defaultAddMessageToErrors), + ) + } else { + ClientCodegenConfig( + formatTimeoutSeconds = coreCodegenConfig.formatTimeoutSeconds, + debugMode = coreCodegenConfig.debugMode, + eventStreamAllowList = coreCodegenConfig.eventStreamAllowList, + ) + } + } +} diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenContext.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenContext.kt deleted file mode 100644 index dcccd737d5d..00000000000 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenContext.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.rust.codegen.smithy - -import software.amazon.smithy.model.Model -import software.amazon.smithy.model.shapes.ServiceShape -import software.amazon.smithy.model.shapes.ShapeId -import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget - -/** - * Configuration needed to generate the client for a given Service<->Protocol pair - */ -data class CodegenContext( - /** - * The smithy model. - * - * Note: This model may or not be pruned to the given service closure, so ensure that `serviceShape` is used as - * an entry point. - */ - val model: Model, - val symbolProvider: RustSymbolProvider, - /** - * Configuration of the runtime package: - * - Where are the runtime crates (smithy-*) located on the file system? Or are they versioned? - * - What are they called? - */ - val runtimeConfig: RuntimeConfig, - /** - * Entrypoint service shape for code generation - */ - val serviceShape: ServiceShape, - /** - * Smithy Protocol to generate, e.g. RestJson1 - */ - val protocol: ShapeId, - /** - * Settings loaded from smithy-build.json - */ - val settings: RustSettings, - /** - * Server vs. Client codegen - * - * Some settings are dependent on whether server vs. client codegen is being invoked. - */ - val target: CodegenTarget, -) { - constructor( - model: Model, - symbolProvider: RustSymbolProvider, - serviceShape: ServiceShape, - protocol: ShapeId, - settings: RustSettings, - target: CodegenTarget, - ) : this(model, symbolProvider, settings.runtimeConfig, serviceShape, protocol, settings, target) - - /** - * The name of the cargo crate to generate e.g. `aws-sdk-s3` - * This is loaded from the smithy-build.json during codegen. - */ - val moduleName: String by lazy { settings.moduleName } - - /** - * A moduleName for a crate uses kebab-case. When you want to `use` a crate in Rust code, - * it must be in snake-case. Call this method to get this crate's name in snake-case. - */ - fun moduleUseName(): String { - return this.moduleName.replace("-", "_") - } -} diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenDelegator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenDelegator.kt index d1dd52665e8..65501c648ed 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenDelegator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenDelegator.kt @@ -47,9 +47,9 @@ open class RustCrate( * private as well as any other metadata. [baseModules] enables configuring this. See [DefaultPublicModules]. */ baseModules: Map, - codegenConfig: CodegenConfig + coreCodegenConfig: CoreCodegenConfig ) { - private val inner = WriterDelegator(fileManifest, symbolProvider, RustWriter.factory(codegenConfig.debugMode)) + private val inner = WriterDelegator(fileManifest, symbolProvider, RustWriter.factory(coreCodegenConfig.debugMode)) private val modules: MutableMap = baseModules.toMutableMap() private val features: MutableSet = mutableSetOf() @@ -87,7 +87,7 @@ open class RustCrate( * This is also where inline dependencies are actually reified and written, potentially recursively. */ fun finalize( - settings: RustSettings, + settings: CoreRustSettings, model: Model, manifestCustomizations: ManifestCustomizations, libRsCustomizations: List, @@ -167,7 +167,7 @@ val DefaultPublicModules = setOf( * - generating (and writing) a Cargo.toml based on the settings & the required dependencies */ fun WriterDelegator.finalize( - settings: RustSettings, + settings: CoreRustSettings, model: Model, manifestCustomizations: ManifestCustomizations, libRsCustomizations: List, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt index 04bdfe849c6..0492904ae33 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CodegenVisitor.kt @@ -18,7 +18,6 @@ import software.amazon.smithy.model.traits.EnumTrait import software.amazon.smithy.model.transform.ModelTransformer import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.BuilderGenerator -import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.EnumGenerator import software.amazon.smithy.rust.codegen.smithy.generators.ServiceGenerator import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator @@ -42,41 +41,46 @@ import java.util.logging.Logger /** * Base Entrypoint for Code generation */ -class CodegenVisitor(context: PluginContext, private val codegenDecorator: RustCodegenDecorator) : +class CodegenVisitor(context: PluginContext, private val codegenDecorator: RustCodegenDecorator) : ShapeVisitor.Default() { private val logger = Logger.getLogger(javaClass.name) - private val settings = RustSettings.from(context.model, context.settings) + private val settings = ClientRustSettings.from(context.model, context.settings) private val symbolProvider: RustSymbolProvider private val rustCrate: RustCrate private val fileManifest = context.fileManifest private val model: Model - private val codegenContext: CodegenContext - private val protocolGenerator: ProtocolGeneratorFactory - private val httpGenerator: ProtocolGenerator + private val codegenContext: ClientCodegenContext + private val protocolGeneratorFactory: ProtocolGeneratorFactory + private val protocolGenerator: ProtocolGenerator init { val symbolVisitorConfig = - SymbolVisitorConfig(runtimeConfig = settings.runtimeConfig, codegenConfig = settings.codegenConfig) + SymbolVisitorConfig( + runtimeConfig = settings.runtimeConfig, + renameExceptions = settings.codegenConfig.renameExceptions, + handleRequired = false, + handleRustBoxing = true, + ) val baseModel = baselineTransform(context.model) val service = settings.getService(baseModel) val (protocol, generator) = ProtocolLoader( codegenDecorator.protocols(service.id, ProtocolLoader.DefaultProtocols) ).protocolFor(context.model, service) - protocolGenerator = generator + protocolGeneratorFactory = generator model = generator.transformModel(codegenDecorator.transformModel(service, baseModel)) val baseProvider = RustCodegenPlugin.baseSymbolProvider(model, service, symbolVisitorConfig) symbolProvider = codegenDecorator.symbolProvider(generator.symbolProvider(model, baseProvider)) - codegenContext = CodegenContext(model, symbolProvider, service, protocol, settings, target = CodegenTarget.CLIENT) + codegenContext = ClientCodegenContext(model, symbolProvider, service, protocol, settings) rustCrate = RustCrate( context.fileManifest, symbolProvider, DefaultPublicModules, codegenContext.settings.codegenConfig ) - httpGenerator = protocolGenerator.buildProtocolGenerator(codegenContext) + protocolGenerator = protocolGeneratorFactory.buildProtocolGenerator(codegenContext) } /** @@ -147,8 +151,8 @@ class CodegenVisitor(context: PluginContext, private val codegenDecorator: RustC override fun serviceShape(shape: ServiceShape) { ServiceGenerator( rustCrate, - httpGenerator, - protocolGenerator.support(), + protocolGenerator, + protocolGeneratorFactory.support(), codegenContext, codegenDecorator ).render() diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CoreCodegenContext.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CoreCodegenContext.kt new file mode 100644 index 00000000000..85332c25706 --- /dev/null +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CoreCodegenContext.kt @@ -0,0 +1,83 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.smithy + +import software.amazon.smithy.model.Model +import software.amazon.smithy.model.shapes.ServiceShape +import software.amazon.smithy.model.shapes.ShapeId +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget + +/** + * [CoreCodegenContext] contains code-generation context that is _common to all_ smithy-rs plugins. + * + * Code-generation context is pervasive read-only global data that gets passed around to the generators. + * + * If your data is specific to the `rust-codegen` client plugin, put it in [ClientCodegenContext] instead. + * If your data is specific to the `rust-server-codegen` server plugin, put it in [ServerCodegenContext] instead. + */ +open class CoreCodegenContext( + /** + * The smithy model. + * + * Note: This model may or not be pruned to the given service closure, so ensure that `serviceShape` is used as + * an entry point. + */ + open val model: Model, + + /** + * The "canonical" symbol provider to convert Smithy [Shape]s into [Symbol]s, which have an associated [RustType]. + */ + open val symbolProvider: RustSymbolProvider, + + /** + * Entrypoint service shape for code generation. + */ + open val serviceShape: ServiceShape, + + /** + * Shape indicating the protocol to generate, e.g. RestJson1. + */ + open val protocol: ShapeId, + + /** + * Settings loaded from `smithy-build.json`. + */ + open val settings: CoreRustSettings, + + /** + * Are we generating code for a smithy-rs client or server? + * + * Several code generators are reused by both the client and server plugins, but only deviate in small and contained + * parts (e.g. changing a return type or adding an attribute). + * Instead of splitting the generator in two or setting up an inheritance relationship, sometimes it's best + * to just lookup this flag. + */ + open val target: CodegenTarget, +) { + + /** + * Configuration of the runtime package: + * - Where are the runtime crates (smithy-*) located on the file system? Or are they versioned? + * - What are they called? + */ + // This is just a convenience. To avoid typing `context.settings.runtimeConfig`, you can simply write + // `context.runtimeConfig`. + val runtimeConfig: RuntimeConfig by lazy { settings.runtimeConfig } + + /** + * The name of the cargo crate to generate e.g. `aws-sdk-s3` + * This is loaded from the smithy-build.json during codegen. + */ + // This is just a convenience. To avoid typing `context.settings.moduleName`, you can simply write + // `context.moduleName`. + val moduleName: String by lazy { settings.moduleName } + + /** + * A moduleName for a crate uses kebab-case. When you want to `use` a crate in Rust code, + * it must be in snake-case. Call this method to get this crate's name in snake-case. + */ + fun moduleUseName() = moduleName.replace("-", "_") +} diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustSettings.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CoreRustSettings.kt similarity index 58% rename from codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustSettings.kt rename to codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CoreRustSettings.kt index ab3007d940d..1d3fc1de7b8 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustSettings.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/CoreRustSettings.kt @@ -17,73 +17,83 @@ import java.util.Optional import java.util.logging.Logger import kotlin.streams.toList -private const val SERVICE = "service" -private const val MODULE_NAME = "module" -private const val MODULE_DESCRIPTION = "moduleDescription" -private const val MODULE_VERSION = "moduleVersion" -private const val MODULE_AUTHORS = "moduleAuthors" -private const val MODULE_REPOSITORY = "moduleRepository" -private const val RUNTIME_CONFIG = "runtimeConfig" -private const val LICENSE = "license" -private const val EXAMPLES = "examples" -private const val CUSTOMIZATION_CONFIG = "customizationConfig" +const val SERVICE = "service" +const val MODULE_NAME = "module" +const val MODULE_DESCRIPTION = "moduleDescription" +const val MODULE_VERSION = "moduleVersion" +const val MODULE_AUTHORS = "moduleAuthors" +const val MODULE_REPOSITORY = "moduleRepository" +const val RUNTIME_CONFIG = "runtimeConfig" +const val LICENSE = "license" +const val EXAMPLES = "examples" +const val CUSTOMIZATION_CONFIG = "customizationConfig" const val CODEGEN_SETTINGS = "codegen" /** - * Configuration of codegen settings + * [CoreCodegenConfig] contains code-generation configuration that is _common to all_ smithy-rs plugins. * - * [renameExceptions]: Rename `Exception` to `Error` in the generated SDK - * [includeFluentClient]: Generate a `client` module in the generated SDK (currently the AWS SDK sets this to false - * and generates its own client) + * If your configuration is specific to the `rust-codegen` client plugin, put it in [ClientCodegenContext] instead. + * If your configuration is specific to the `rust-server-codegen` server plugin, put it in [ServerCodegenContext] instead. * - * [addMessageToErrors]: Adds a `message` field automatically to all error shapes * [formatTimeoutSeconds]: Timeout for running cargo fmt at the end of code generation + * [debugMode]: Generate comments in the generated code indicating where code was generated from */ -data class CodegenConfig( - val renameExceptions: Boolean = true, - val includeFluentClient: Boolean = true, - val addMessageToErrors: Boolean = true, - val formatTimeoutSeconds: Int = 20, - /** Generate comments in the generated code indicating where code was generated from */ - val debugMode: Boolean = false, +open class CoreCodegenConfig( + open val formatTimeoutSeconds: Int = defaultFormatTimeoutSeconds, + open val debugMode: Boolean = defaultDebugMode, // TODO(EventStream): [CLEANUP] Remove this property when turning on Event Stream for all services - val eventStreamAllowList: Set = emptySet(), + open val eventStreamAllowList: Set = defaultEventStreamAllowList, ) { companion object { - fun fromNode(node: Optional): CodegenConfig { - return if (node.isPresent) { - CodegenConfig( - node.get().getBooleanMemberOrDefault("renameErrors", true), - node.get().getBooleanMemberOrDefault("includeFluentClient", true), - node.get().getBooleanMemberOrDefault("addMessageToErrors", true), - node.get().getNumberMemberOrDefault("formatTimeoutSeconds", 20).toInt(), - node.get().getBooleanMemberOrDefault("debugMode", false), + const val defaultFormatTimeoutSeconds = 20 + const val defaultDebugMode = false + val defaultEventStreamAllowList: Set = emptySet() + + fun fromNode(node: Optional): CoreCodegenConfig = + if (node.isPresent) { + CoreCodegenConfig( + node.get().getNumberMemberOrDefault("formatTimeoutSeconds", defaultFormatTimeoutSeconds).toInt(), + node.get().getBooleanMemberOrDefault("debugMode", defaultDebugMode), node.get().getArrayMember("eventStreamAllowList") .map { array -> array.toList().mapNotNull { node -> node.asStringNode().orNull()?.value } } - .orNull()?.toSet() ?: emptySet() + .orNull()?.toSet() ?: defaultEventStreamAllowList, ) } else { - CodegenConfig() + CoreCodegenConfig( + formatTimeoutSeconds = defaultFormatTimeoutSeconds, + debugMode = defaultDebugMode, + eventStreamAllowList = defaultEventStreamAllowList + ) } - } } } /** - * Settings used by [RustCodegenPlugin] + * [CoreRustSettings] contains crate settings that are _common to all_ smithy-rs plugins. + * + * If your setting is specific to the crate that the `rust-codegen` client plugin generates, put it in + * [ClientCodegenContext] instead. + * If your setting is specific to the crate that the `rust-server-codegen` server plugin generates, put it in + * [ServerCodegenContext] instead. */ -class RustSettings( - val service: ShapeId, - val moduleName: String, - val moduleVersion: String, - val moduleAuthors: List, - val moduleDescription: String?, - val moduleRepository: String?, - val runtimeConfig: RuntimeConfig, - val codegenConfig: CodegenConfig, - val license: String?, - val examplesUri: String? = null, - val customizationConfig: ObjectNode? = null +open class CoreRustSettings( + open val service: ShapeId, + open val moduleName: String, + open val moduleVersion: String, + open val moduleAuthors: List, + open val moduleDescription: String?, + open val moduleRepository: String?, + + /** + * Configuration of the runtime package: + * - Where are the runtime crates (smithy-*) located on the file system? Or are they versioned? + * - What are they called? + */ + open val runtimeConfig: RuntimeConfig, + open val codegenConfig: CoreCodegenConfig, + open val license: String?, + open val examplesUri: String? = null, + open val customizationConfig: ObjectNode? = null ) { /** @@ -100,20 +110,48 @@ class RustSettings( } companion object { - private val LOGGER: Logger = Logger.getLogger(RustSettings::class.java.name) + private val LOGGER: Logger = Logger.getLogger(CoreRustSettings::class.java.name) + + // Infer the service to generate from a model. + @JvmStatic + protected fun inferService(model: Model): ShapeId { + val services = model.shapes(ServiceShape::class.java) + .map(Shape::getId) + .sorted() + .toList() + + when { + services.isEmpty() -> { + throw CodegenException( + "Cannot infer a service to generate because the model does not " + + "contain any service shapes" + ) + } + services.size > 1 -> { + throw CodegenException( + "Cannot infer service to generate because the model contains " + + "multiple service shapes: " + services + ) + } + else -> { + val service = services[0] + LOGGER.info("Inferring service to generate as: $service") + return service + } + } + } /** * Create settings from a configuration object node. * * @param model Model to infer the service from (if not explicitly set in config) * @param config Config object to load - * @throws software.amazon.smithy.model.node.ExpectationNotMetException * @return Returns the extracted settings */ - fun from(model: Model, config: ObjectNode): RustSettings { + fun from(model: Model, config: ObjectNode): CoreRustSettings { val codegenSettings = config.getObjectMember(CODEGEN_SETTINGS) - val codegenConfig = CodegenConfig.fromNode(codegenSettings) - return fromCodegenConfig(model, config, codegenConfig) + val coreCodegenConfig = CoreCodegenConfig.fromNode(codegenSettings) + return fromCodegenConfig(model, config, coreCodegenConfig) } /** @@ -121,11 +159,10 @@ class RustSettings( * * @param model Model to infer the service from (if not explicitly set in config) * @param config Config object to load - * @param codegenConfig CodegenConfig object to use - * @throws software.amazon.smithy.model.node.ExpectationNotMetException + * @param coreCodegenConfig CodegenConfig object to use * @return Returns the extracted settings */ - fun fromCodegenConfig(model: Model, config: ObjectNode, codegenConfig: CodegenConfig): RustSettings { + private fun fromCodegenConfig(model: Model, config: ObjectNode, coreCodegenConfig: CoreCodegenConfig): CoreRustSettings { config.warnIfAdditionalProperties( arrayListOf( SERVICE, @@ -147,47 +184,19 @@ class RustSettings( .orElseGet { inferService(model) } val runtimeConfig = config.getObjectMember(RUNTIME_CONFIG) - return RustSettings( - service = service, + return CoreRustSettings( + service, moduleName = config.expectStringMember(MODULE_NAME).value, moduleVersion = config.expectStringMember(MODULE_VERSION).value, moduleAuthors = config.expectArrayMember(MODULE_AUTHORS).map { it.expectStringNode().value }, moduleDescription = config.getStringMember(MODULE_DESCRIPTION).orNull()?.value, moduleRepository = config.getStringMember(MODULE_REPOSITORY).orNull()?.value, runtimeConfig = RuntimeConfig.fromNode(runtimeConfig), - codegenConfig, + codegenConfig = coreCodegenConfig, license = config.getStringMember(LICENSE).orNull()?.value, examplesUri = config.getStringMember(EXAMPLES).orNull()?.value, customizationConfig = config.getObjectMember(CUSTOMIZATION_CONFIG).orNull() ) } - - // infer the service to generate from a model - private fun inferService(model: Model): ShapeId { - val services = model.shapes(ServiceShape::class.java) - .map(Shape::getId) - .sorted() - .toList() - - when { - services.isEmpty() -> { - throw CodegenException( - "Cannot infer a service to generate because the model does not " + - "contain any service shapes" - ) - } - services.size > 1 -> { - throw CodegenException( - "Cannot infer service to generate because the model contains " + - "multiple service shapes: " + services - ) - } - else -> { - val service = services[0] - LOGGER.info("Inferring service to generate as: $service") - return service - } - } - } } } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustCodegenPlugin.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustCodegenPlugin.kt index ceecac0b30f..47eb606d1fb 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustCodegenPlugin.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/RustCodegenPlugin.kt @@ -14,13 +14,17 @@ import software.amazon.smithy.rust.codegen.rustlang.Attribute.Companion.NonExhau import software.amazon.smithy.rust.codegen.rustlang.RustReservedWordSymbolProvider import software.amazon.smithy.rust.codegen.smithy.customizations.ClientCustomizations import software.amazon.smithy.rust.codegen.smithy.customize.CombinedCodegenDecorator +import software.amazon.smithy.rust.codegen.smithy.customize.RequiredCustomizations +import software.amazon.smithy.rust.codegen.smithy.generators.client.FluentClientDecorator import java.util.logging.Level import java.util.logging.Logger -/** Rust Codegen Plugin - * This is the entrypoint for code generation, triggered by the smithy-build plugin. - * `resources/META-INF.services/software.amazon.smithy.build.SmithyBuildPlugin` refers to this class by name which - * enables the smithy-build plugin to invoke `execute` with all of the Smithy plugin context + models. +/** + * Rust Codegen Plugin + * + * This is the entrypoint for code generation, triggered by the smithy-build plugin. + * `resources/META-INF.services/software.amazon.smithy.build.SmithyBuildPlugin` refers to this class by name which + * enables the smithy-build plugin to invoke `execute` with all of the Smithy plugin context + models. */ class RustCodegenPlugin : SmithyBuildPlugin { override fun getName(): String = "rust-codegen" @@ -28,12 +32,18 @@ class RustCodegenPlugin : SmithyBuildPlugin { override fun execute(context: PluginContext) { // Suppress extremely noisy logs about reserved words Logger.getLogger(ReservedWordSymbolProvider::class.java.name).level = Level.OFF - // Discover `RustCodegenDecorators` on the classpath. `RustCodegenDecorator` return different types of - // customization. A customization is a function of: + // Discover `RustCodegenDecorators` on the classpath. `RustCodegenDecorator` returns different types of + // customizations. A customization is a function of: // - location (e.g. the mutate section of an operation) // - context (e.g. the of the operation) // - writer: The active RustWriter at the given location - val codegenDecorator = CombinedCodegenDecorator.fromClasspath(context, ClientCustomizations()) + val codegenDecorator = + CombinedCodegenDecorator.fromClasspath( + context, + ClientCustomizations(), + RequiredCustomizations(), + FluentClientDecorator() + ) // CodegenVisitor is the main driver of code generation that traverses the model and generates code CodegenVisitor(context, codegenDecorator).execute() @@ -46,7 +56,7 @@ class RustCodegenPlugin : SmithyBuildPlugin { * The Symbol provider is composed of a base `SymbolVisitor` which handles the core functionality, then is layered * with other symbol providers, documented inline, to handle the full scope of Smithy types. */ - fun baseSymbolProvider(model: Model, serviceShape: ServiceShape, symbolVisitorConfig: SymbolVisitorConfig = DefaultConfig) = + fun baseSymbolProvider(model: Model, serviceShape: ServiceShape, symbolVisitorConfig: SymbolVisitorConfig) = SymbolVisitor(model, serviceShape = serviceShape, config = symbolVisitorConfig) // Generate different types for EventStream shapes (e.g. transcribe streaming) .let { EventStreamSymbolProvider(symbolVisitorConfig.runtimeConfig, it, model) } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ServerCodegenContext.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ServerCodegenContext.kt new file mode 100644 index 00000000000..19fc5979d1d --- /dev/null +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ServerCodegenContext.kt @@ -0,0 +1,30 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.smithy + +import software.amazon.smithy.model.Model +import software.amazon.smithy.model.shapes.ServiceShape +import software.amazon.smithy.model.shapes.ShapeId +import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget + +/** + * [ServerCodegenContext] contains code-generation context that is _specific_ to the [RustCodegenServerPlugin] plugin + * from the `rust-codegen-server` subproject. + * + * It inherits from [CoreCodegenContext], which contains code-generation context that is common to _all_ smithy-rs plugins. + * + * This class has to live in the `codegen` subproject because it is referenced in common generators to both client + * and server (like [JsonParserGenerator]). + */ +data class ServerCodegenContext( + override val model: Model, + override val symbolProvider: RustSymbolProvider, + override val serviceShape: ServiceShape, + override val protocol: ShapeId, + override val settings: ServerRustSettings, +) : CoreCodegenContext( + model, symbolProvider, serviceShape, protocol, settings, CodegenTarget.SERVER +) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ServerRustSettings.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ServerRustSettings.kt new file mode 100644 index 00000000000..1c97a7514b5 --- /dev/null +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/ServerRustSettings.kt @@ -0,0 +1,91 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rust.codegen.smithy + +import software.amazon.smithy.model.Model +import software.amazon.smithy.model.node.ObjectNode +import software.amazon.smithy.model.shapes.ShapeId +import java.util.Optional + +/** + * [ServerRustSettings] and [ServerCodegenConfig] classes. + * + * These classes are entirely analogous to [ClientRustSettings] and [ClientCodegenConfig]. Refer to the documentation + * for those. + * + * These classes have to live in the `codegen` subproject because they are referenced in [ServerCodegenContext], + * which is used in common generators to both client and server. + */ + +/** + * Settings used by [RustCodegenServerPlugin]. + */ +data class ServerRustSettings( + override val service: ShapeId, + override val moduleName: String, + override val moduleVersion: String, + override val moduleAuthors: List, + override val moduleDescription: String?, + override val moduleRepository: String?, + override val runtimeConfig: RuntimeConfig, + override val codegenConfig: ServerCodegenConfig, + override val license: String?, + override val examplesUri: String?, + override val customizationConfig: ObjectNode? +) : CoreRustSettings( + service, + moduleName, + moduleVersion, + moduleAuthors, + moduleDescription, + moduleRepository, + runtimeConfig, + codegenConfig, + license, + examplesUri, + customizationConfig +) { + companion object { + fun from(model: Model, config: ObjectNode): ServerRustSettings { + val coreRustSettings = CoreRustSettings.from(model, config) + val codegenSettingsNode = config.getObjectMember(CODEGEN_SETTINGS) + val coreCodegenConfig = CoreCodegenConfig.fromNode(codegenSettingsNode) + return ServerRustSettings( + service = coreRustSettings.service, + moduleName = coreRustSettings.moduleName, + moduleVersion = coreRustSettings.moduleVersion, + moduleAuthors = coreRustSettings.moduleAuthors, + moduleDescription = coreRustSettings.moduleDescription, + moduleRepository = coreRustSettings.moduleRepository, + runtimeConfig = coreRustSettings.runtimeConfig, + codegenConfig = ServerCodegenConfig.fromCodegenConfigAndNode(coreCodegenConfig, codegenSettingsNode), + license = coreRustSettings.license, + examplesUri = coreRustSettings.examplesUri, + customizationConfig = coreRustSettings.customizationConfig + ) + } + } +} + +data class ServerCodegenConfig( + override val formatTimeoutSeconds: Int, + override val debugMode: Boolean, + override val eventStreamAllowList: Set, +) : CoreCodegenConfig( + formatTimeoutSeconds, debugMode, eventStreamAllowList +) { + companion object { + // Note `node` is unused, because at the moment `ServerCodegenConfig` has the same properties as + // `CodegenConfig`. In the future, the server will have server-specific codegen options just like the client + // does. + fun fromCodegenConfigAndNode(coreCodegenConfig: CoreCodegenConfig, node: Optional) = + ServerCodegenConfig( + formatTimeoutSeconds = coreCodegenConfig.formatTimeoutSeconds, + debugMode = coreCodegenConfig.debugMode, + eventStreamAllowList = coreCodegenConfig.eventStreamAllowList, + ) + } +} diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt index 25b0b46320c..dd8322d5dea 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt @@ -62,19 +62,11 @@ val SimpleShapes: Map, RustType> = mapOf( data class SymbolVisitorConfig( val runtimeConfig: RuntimeConfig, - val codegenConfig: CodegenConfig, - val handleRustBoxing: Boolean = true, - val handleRequired: Boolean = false + val renameExceptions: Boolean, + val handleRustBoxing: Boolean, + val handleRequired: Boolean, ) -val DefaultConfig = - SymbolVisitorConfig( - runtimeConfig = RuntimeConfig(), - handleRustBoxing = true, - handleRequired = false, - codegenConfig = CodegenConfig() - ) - /** * Container type for the file a symbol should be written to * @@ -166,7 +158,7 @@ fun SymbolProvider.toOptional(member: MemberShape, value: String): String = valu class SymbolVisitor( private val model: Model, private val serviceShape: ServiceShape?, - private val config: SymbolVisitorConfig = DefaultConfig + private val config: SymbolVisitorConfig ) : RustSymbolProvider, ShapeVisitor { private val nullableIndex = NullableIndex.of(model) @@ -313,7 +305,7 @@ class SymbolVisitor( val isError = shape.hasTrait() val isInput = shape.hasTrait() val isOutput = shape.hasTrait() - val name = shape.contextName().toPascalCase().letIf(isError && config.codegenConfig.renameExceptions) { + val name = shape.contextName().toPascalCase().letIf(isError && config.renameExceptions) { it.replace("Exception", "Error") } val builder = symbolBuilder(shape, RustType.Opaque(name)) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/AllowLintsGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/AllowLintsGenerator.kt index 89140ea7f84..ce9cf6c44ee 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/AllowLintsGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/AllowLintsGenerator.kt @@ -42,7 +42,11 @@ val AllowDocsLints = listOf( "bare_urls" ) -class AllowLintsGenerator(private val bareLints: List = listOf(), private val clippyLints: List = ClippyAllowLints, private val docsLints: List = AllowDocsLints) : LibRsCustomization() { +class AllowLintsGenerator( + private val bareLints: List = listOf(), + private val clippyLints: List = ClippyAllowLints, + private val docsLints: List = AllowDocsLints +) : LibRsCustomization() { override fun section(section: LibRsSection) = when (section) { is LibRsSection.Attributes -> writable { bareLints.forEach { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/ClientCustomizations.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/ClientCustomizations.kt index dbbda7bd9c9..5c2efef294f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/ClientCustomizations.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/ClientCustomizations.kt @@ -5,21 +5,19 @@ package software.amazon.smithy.rust.codegen.smithy.customizations -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization /** - * Customizations that apply only to generated clients + * Customizations that apply only to generated clients. */ -class ClientCustomizations : RustCodegenDecorator { +class ClientCustomizations : RustCodegenDecorator { override val name: String = "ClientCustomizations" override val order: Byte = 0 override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List - ): List { - return baseCustomizations + ClientDocsGenerator() - } + ): List = baseCustomizations + ClientDocsGenerator() } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/ClientDocsGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/ClientDocsGenerator.kt index a31295a6cc6..49ee0170c68 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/ClientDocsGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/ClientDocsGenerator.kt @@ -20,11 +20,10 @@ class ClientDocsGenerator : LibRsCustomization() { else -> emptySection } } -} -private fun crateLayout(): Writable = writable { - containerDocs( - """ + private fun crateLayout(): Writable = writable { + containerDocs( + """ The entry point for most customers will be [`Client`]. [`Client`] exposes one method for each API offered by the service. @@ -35,5 +34,6 @@ private fun crateLayout(): Writable = writable { The other modules within this crate are not required for normal usage. """.trimEnd() - ) + ) + } } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/DocsRsMetadataDecorator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/DocsRsMetadataDecorator.kt index 26f2a496be5..5d2587e5f82 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/DocsRsMetadataDecorator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/DocsRsMetadataDecorator.kt @@ -5,7 +5,7 @@ package software.amazon.smithy.rust.codegen.smithy.customizations -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.ManifestCustomizations @@ -48,11 +48,12 @@ fun DocsRsMetadataSettings.asMap(): Map { * # Notes * This decorator is not used by default, code generators must manually configure and include it in their builds. */ -class DocsRsMetadataDecorator(private val docsRsMetadataSettings: DocsRsMetadataSettings) : RustCodegenDecorator { +class DocsRsMetadataDecorator(private val docsRsMetadataSettings: DocsRsMetadataSettings) : + RustCodegenDecorator { override val name: String = "docsrs-metadata" override val order: Byte = 0 - override fun crateManifestCustomizations(codegenContext: CodegenContext): ManifestCustomizations { + override fun crateManifestCustomizations(codegenContext: ClientCodegenContext): ManifestCustomizations { return docsRsMetadataSettings.asMap() } } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/EndpointPrefixGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/EndpointPrefixGenerator.kt index 4c378fec8c8..5218650312d 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/EndpointPrefixGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/EndpointPrefixGenerator.kt @@ -11,20 +11,20 @@ import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.smithy.generators.EndpointTraitBindings -class EndpointPrefixGenerator(private val codegenContext: CodegenContext, private val shape: OperationShape) : +class EndpointPrefixGenerator(private val coreCodegenContext: CoreCodegenContext, private val shape: OperationShape) : OperationCustomization() { override fun section(section: OperationSection): Writable = when (section) { is OperationSection.MutateRequest -> writable { shape.getTrait(EndpointTrait::class.java).map { epTrait -> val endpointTraitBindings = EndpointTraitBindings( - codegenContext.model, - codegenContext.symbolProvider, - codegenContext.runtimeConfig, + coreCodegenContext.model, + coreCodegenContext.symbolProvider, + coreCodegenContext.runtimeConfig, shape, epTrait ) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/HttpChecksumRequiredGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/HttpChecksumRequiredGenerator.kt index 5790d16023f..22b95ac9b4f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/HttpChecksumRequiredGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/HttpChecksumRequiredGenerator.kt @@ -13,7 +13,7 @@ import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection @@ -23,14 +23,14 @@ import software.amazon.smithy.rust.codegen.util.hasTrait import software.amazon.smithy.rust.codegen.util.inputShape class HttpChecksumRequiredGenerator( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val operationShape: OperationShape ) : OperationCustomization() { override fun section(section: OperationSection): Writable { if (!operationShape.hasTrait()) { return emptySection } - if (operationShape.inputShape(codegenContext.model).hasStreamingMember(codegenContext.model)) { + if (operationShape.inputShape(coreCodegenContext.model).hasStreamingMember(coreCodegenContext.model)) { throw CodegenException("HttpChecksum required cannot be applied to a streaming shape") } return when (section) { @@ -52,8 +52,8 @@ class HttpChecksumRequiredGenerator( """, "md5" to CargoDependency.Md5.asType(), "http" to CargoDependency.Http.asType(), - "base64_encode" to RuntimeType.Base64Encode(codegenContext.runtimeConfig), - "BuildError" to codegenContext.runtimeConfig.operationBuildError() + "base64_encode" to RuntimeType.Base64Encode(coreCodegenContext.runtimeConfig), + "BuildError" to coreCodegenContext.runtimeConfig.operationBuildError() ) } else -> emptySection diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/HttpVersionListCustomization.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/HttpVersionListCustomization.kt index b6c62edf6d3..c4d59a3e18d 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/HttpVersionListCustomization.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/HttpVersionListCustomization.kt @@ -10,7 +10,7 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization @@ -24,19 +24,19 @@ private fun RuntimeConfig.defaultHttpVersionList(): RuntimeType = this.httpVersionModule().member("DEFAULT_HTTP_VERSION_LIST") class HttpVersionListCustomization( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val operationShape: OperationShape ) : OperationCustomization() { - private val defaultHttpVersions = codegenContext.runtimeConfig.defaultHttpVersionList().fullyQualifiedName() + private val defaultHttpVersions = coreCodegenContext.runtimeConfig.defaultHttpVersionList().fullyQualifiedName() override fun section(section: OperationSection): Writable { - val awsProtocolTrait = codegenContext.serviceShape.getTrait() + val awsProtocolTrait = coreCodegenContext.serviceShape.getTrait() val supportedHttpProtocolVersions = if (awsProtocolTrait == null) { // No protocol trait was defined, use default http versions "$defaultHttpVersions.clone()" } else { // Figure out whether we're dealing with an EventStream operation and fetch the corresponding list of desired HTTP versions - val versionList = if (operationShape.isEventStream(codegenContext.model)) awsProtocolTrait.eventStreamHttp else awsProtocolTrait.http + val versionList = if (operationShape.isEventStream(coreCodegenContext.model)) awsProtocolTrait.eventStreamHttp else awsProtocolTrait.http if (versionList.isEmpty()) { // If no desired versions are specified, go with the default "$defaultHttpVersions.clone()" diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/IdempotencyTokenGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/IdempotencyTokenGenerator.kt index 4d445b7d90e..fc7410f02e5 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/IdempotencyTokenGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/IdempotencyTokenGenerator.kt @@ -10,16 +10,16 @@ import software.amazon.smithy.model.traits.IdempotencyTokenTrait import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.util.findMemberWithTrait import software.amazon.smithy.rust.codegen.util.inputShape -class IdempotencyTokenGenerator(codegenContext: CodegenContext, private val operationShape: OperationShape) : +class IdempotencyTokenGenerator(coreCodegenContext: CoreCodegenContext, private val operationShape: OperationShape) : OperationCustomization() { - private val model = codegenContext.model - private val symbolProvider = codegenContext.symbolProvider + private val model = coreCodegenContext.model + private val symbolProvider = coreCodegenContext.symbolProvider private val idempotencyTokenMember = operationShape.inputShape(model).findMemberWithTrait(model) override fun section(section: OperationSection): Writable { if (idempotencyTokenMember == null) { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/RetryConfigDecorator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/RetryConfigDecorator.kt index e3f1be3606e..ef4d96572b2 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/RetryConfigDecorator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/RetryConfigDecorator.kt @@ -9,7 +9,8 @@ import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator @@ -66,28 +67,28 @@ fn test_1() { } */ -class RetryConfigDecorator : RustCodegenDecorator { +class RetryConfigDecorator : RustCodegenDecorator { override val name: String = "RetryConfig" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + RetryConfigProviderConfig(codegenContext) } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + PubUseRetryConfig(codegenContext.runtimeConfig) } } -class RetryConfigProviderConfig(codegenContext: CodegenContext) : ConfigCustomization() { - private val retryConfig = smithyTypesRetry(codegenContext.runtimeConfig) - private val moduleUseName = codegenContext.moduleUseName() +class RetryConfigProviderConfig(coreCodegenContext: CoreCodegenContext) : ConfigCustomization() { + private val retryConfig = smithyTypesRetry(coreCodegenContext.runtimeConfig) + private val moduleUseName = coreCodegenContext.moduleUseName() private val codegenScope = arrayOf("RetryConfig" to retryConfig.member("RetryConfig")) override fun section(section: ServiceConfig) = writable { when (section) { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/SleepImplDecorator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/SleepImplDecorator.kt index 9f68b63cbe5..1438c38f5a4 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/SleepImplDecorator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/SleepImplDecorator.kt @@ -7,7 +7,8 @@ package software.amazon.smithy.rust.codegen.smithy.customizations import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator @@ -115,21 +116,21 @@ impl Builder { } */ -class SleepImplDecorator : RustCodegenDecorator { +class SleepImplDecorator : RustCodegenDecorator { override val name: String = "AsyncSleep" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + SleepImplProviderConfig(codegenContext) } } -class SleepImplProviderConfig(codegenContext: CodegenContext) : ConfigCustomization() { - private val sleepModule = smithyAsyncRtSleep(codegenContext.runtimeConfig) - private val moduleUseName = codegenContext.moduleUseName() +class SleepImplProviderConfig(coreCodegenContext: CoreCodegenContext) : ConfigCustomization() { + private val sleepModule = smithyAsyncRtSleep(coreCodegenContext.runtimeConfig) + private val moduleUseName = coreCodegenContext.moduleUseName() private val codegenScope = arrayOf( "AsyncSleep" to sleepModule.member("AsyncSleep"), "Sleep" to sleepModule.member("Sleep"), diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/TimeoutConfigDecorator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/TimeoutConfigDecorator.kt index 10da0090949..8417e29904f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/TimeoutConfigDecorator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customizations/TimeoutConfigDecorator.kt @@ -7,7 +7,8 @@ package software.amazon.smithy.rust.codegen.smithy.customizations import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.config.ConfigCustomization @@ -102,22 +103,22 @@ fn test_1() { } */ -class TimeoutConfigDecorator : RustCodegenDecorator { +class TimeoutConfigDecorator : RustCodegenDecorator { override val name: String = "TimeoutConfig" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return baseCustomizations + TimeoutConfigProviderConfig(codegenContext) } } -class TimeoutConfigProviderConfig(codegenContext: CodegenContext) : ConfigCustomization() { - private val smithyTypesCrate = codegenContext.runtimeConfig.runtimeCrate("types") +class TimeoutConfigProviderConfig(coreCodegenContext: CoreCodegenContext) : ConfigCustomization() { + private val smithyTypesCrate = coreCodegenContext.runtimeConfig.runtimeCrate("types") private val timeoutModule = RuntimeType("timeout", smithyTypesCrate, "aws_smithy_types") - private val moduleUseName = codegenContext.moduleUseName() + private val moduleUseName = coreCodegenContext.moduleUseName() private val codegenScope = arrayOf( "TimeoutConfig" to timeoutModule.member("Config"), ) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/RequiredCustomizations.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/RequiredCustomizations.kt index dafb9a0aa60..b41b6b00f75 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/RequiredCustomizations.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/RequiredCustomizations.kt @@ -7,7 +7,7 @@ package software.amazon.smithy.rust.codegen.smithy.customize import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.Feature -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.customizations.AllowLintsGenerator import software.amazon.smithy.rust.codegen.smithy.customizations.CrateVersionGenerator @@ -18,34 +18,33 @@ import software.amazon.smithy.rust.codegen.smithy.customizations.IdempotencyToke import software.amazon.smithy.rust.codegen.smithy.customizations.SmithyTypesPubUseGenerator import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization -/** A set of customizations that are included in all protocols. +/** + * A set of customizations that are included in all protocols. * * This exists as a convenient place to gather these modifications, these are not true customizations. */ -class RequiredCustomizations : RustCodegenDecorator { +class RequiredCustomizations : RustCodegenDecorator { override val name: String = "Required" override val order: Byte = -1 override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, operation: OperationShape, baseCustomizations: List - ): List { - return baseCustomizations + + ): List = + baseCustomizations + IdempotencyTokenGenerator(codegenContext, operation) + EndpointPrefixGenerator(codegenContext, operation) + HttpChecksumRequiredGenerator(codegenContext, operation) + HttpVersionListCustomization(codegenContext, operation) - } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List - ): List { - return baseCustomizations + CrateVersionGenerator() + SmithyTypesPubUseGenerator(codegenContext.runtimeConfig) + AllowLintsGenerator() - } + ): List = + baseCustomizations + CrateVersionGenerator() + SmithyTypesPubUseGenerator(codegenContext.runtimeConfig) + AllowLintsGenerator() - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { // Add rt-tokio feature for `ByteStream::from_path` rustCrate.mergeFeature(Feature("rt-tokio", true, listOf("aws-smithy-http/rt-tokio"))) } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/RustCodegenDecorator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/RustCodegenDecorator.kt index c17e765aa06..891e03890c5 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/RustCodegenDecorator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/RustCodegenDecorator.kt @@ -10,16 +10,15 @@ import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.model.shapes.ShapeId -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.smithy.generators.ManifestCustomizations -import software.amazon.smithy.rust.codegen.smithy.generators.client.FluentClientDecorator import software.amazon.smithy.rust.codegen.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.smithy.protocols.ProtocolMap import software.amazon.smithy.rust.codegen.util.deepMergeWith -import java.util.ServiceLoader +import java.util.* import java.util.logging.Logger /** @@ -29,7 +28,7 @@ import java.util.logging.Logger * AWS services. A different downstream customer may wish to add a different set of derive * attributes to the generated classes. */ -interface RustCodegenDecorator { +interface RustCodegenDecorator { /** * The name of this [RustCodegenDecorator], used for logging and debug information */ @@ -41,18 +40,19 @@ interface RustCodegenDecorator { val order: Byte fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: C, baseCustomizations: List ): List = baseCustomizations + // This is only used by decorators for smithy-rs _clients_. fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: C, operation: OperationShape, baseCustomizations: List ): List = baseCustomizations fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: C, baseCustomizations: List ): List = baseCustomizations @@ -61,11 +61,12 @@ interface RustCodegenDecorator { * added to the Cargo.toml `[package]` section, a `mapOf("package" to mapOf("homepage", "https://example.com"))` * could be returned. Properties here overwrite the default properties. */ - fun crateManifestCustomizations(codegenContext: CodegenContext): ManifestCustomizations = emptyMap() + fun crateManifestCustomizations(codegenContext: C): ManifestCustomizations = emptyMap() - fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) {} + fun extras(codegenContext: C, rustCrate: RustCrate) {} - fun protocols(serviceId: ShapeId, currentProtocols: ProtocolMap): ProtocolMap = currentProtocols + fun protocols(serviceId: ShapeId, currentProtocols: ProtocolMap): ProtocolMap = + currentProtocols fun transformModel(service: ServiceShape, model: Model): Model = model @@ -77,36 +78,36 @@ interface RustCodegenDecorator { * * This makes the actual concrete codegen simpler by not needing to deal with multiple separate decorators. */ -open class CombinedCodegenDecorator(decorators: List) : RustCodegenDecorator { +open class CombinedCodegenDecorator(decorators: List>) : RustCodegenDecorator { private val orderedDecorators = decorators.sortedBy { it.order } override val name: String get() = "MetaDecorator" override val order: Byte get() = 0 - fun withDecorator(decorator: RustCodegenDecorator) = CombinedCodegenDecorator(orderedDecorators + decorator) + fun withDecorator(decorator: RustCodegenDecorator) = CombinedCodegenDecorator(orderedDecorators + decorator) override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: C, baseCustomizations: List ): List { - return orderedDecorators.foldRight(baseCustomizations) { decorator: RustCodegenDecorator, customizations -> + return orderedDecorators.foldRight(baseCustomizations) { decorator: RustCodegenDecorator, customizations -> decorator.configCustomizations(codegenContext, customizations) } } override fun operationCustomizations( - codegenContext: CodegenContext, + codegenContext: C, operation: OperationShape, baseCustomizations: List ): List { - return orderedDecorators.foldRight(baseCustomizations) { decorator: RustCodegenDecorator, customizations -> + return orderedDecorators.foldRight(baseCustomizations) { decorator: RustCodegenDecorator, customizations -> decorator.operationCustomizations(codegenContext, operation, customizations) } } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: C, baseCustomizations: List ): List { return orderedDecorators.foldRight(baseCustomizations) { decorator, customizations -> @@ -117,7 +118,7 @@ open class CombinedCodegenDecorator(decorators: List) : Ru } } - override fun protocols(serviceId: ShapeId, currentProtocols: ProtocolMap): ProtocolMap { + override fun protocols(serviceId: ShapeId, currentProtocols: ProtocolMap): ProtocolMap { return orderedDecorators.foldRight(currentProtocols) { decorator, protocolMap -> decorator.protocols(serviceId, protocolMap) } @@ -129,13 +130,13 @@ open class CombinedCodegenDecorator(decorators: List) : Ru } } - override fun crateManifestCustomizations(codegenContext: CodegenContext): ManifestCustomizations { + override fun crateManifestCustomizations(codegenContext: C): ManifestCustomizations { return orderedDecorators.foldRight(emptyMap()) { decorator, customizations -> customizations.deepMergeWith(decorator.crateManifestCustomizations(codegenContext)) } } - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: C, rustCrate: RustCrate) { return orderedDecorators.forEach { it.extras(codegenContext, rustCrate) } } @@ -146,16 +147,40 @@ open class CombinedCodegenDecorator(decorators: List) : Ru } companion object { - private val logger = Logger.getLogger("RustCodegenSPILoader") - fun fromClasspath(context: PluginContext, vararg extras: RustCodegenDecorator): CombinedCodegenDecorator { + inline fun fromClasspath( + context: PluginContext, + vararg extras: RustCodegenDecorator, + logger: Logger = Logger.getLogger("RustCodegenSPILoader") + ): CombinedCodegenDecorator { val decorators = ServiceLoader.load( RustCodegenDecorator::class.java, context.pluginClassLoader.orElse(RustCodegenDecorator::class.java.classLoader) ) + // The JVM's `ServiceLoader` is woefully underpowered in that it can not load classes with generic + // parameters with _fixed_ parameters (like what we're trying to do here; we only want `RustCodegenDecorator` + // classes with code-generation context matching the input `T`). + // There are various workarounds: https://stackoverflow.com/questions/5451734/loading-generic-service-implementations-via-java-util-serviceloader + // All involve loading _all_ classes from the classpath (i.e. all `RustCodegenDecorator<*>`), and then + // filtering them. The most elegant way to filter is arguably by checking if we can cast the loaded + // class to what we want. + .filter { + try { + it as RustCodegenDecorator + true + } catch (e: ClassCastException) { + false + } + } .onEach { logger.info("Adding Codegen Decorator: ${it.javaClass.name}") - }.toList() - return CombinedCodegenDecorator(decorators + RequiredCustomizations() + FluentClientDecorator() + extras) + } + .map { + // Cast is safe because of the filter above. + @Suppress("UNCHECKED_CAST") + it as RustCodegenDecorator + } + .toList() + return CombinedCodegenDecorator(decorators + extras) } } } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CargoTomlGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CargoTomlGenerator.kt index 419ab351de9..a7136784b6d 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CargoTomlGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/CargoTomlGenerator.kt @@ -10,7 +10,7 @@ import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.DependencyScope import software.amazon.smithy.rust.codegen.rustlang.Feature import software.amazon.smithy.rust.codegen.rustlang.RustWriter -import software.amazon.smithy.rust.codegen.smithy.RustSettings +import software.amazon.smithy.rust.codegen.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.util.deepMergeWith /** @@ -42,7 +42,7 @@ typealias ManifestCustomizations = Map * Generates the crate manifest Cargo.toml file. */ class CargoTomlGenerator( - private val settings: RustSettings, + private val settings: CoreRustSettings, private val writer: RustWriter, private val manifestCustomizations: ManifestCustomizations, private val dependencies: List, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/LibRsGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/LibRsGenerator.kt index b16a581650c..6ca2593f946 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/LibRsGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/LibRsGenerator.kt @@ -13,7 +13,7 @@ import software.amazon.smithy.rust.codegen.rustlang.containerDocs import software.amazon.smithy.rust.codegen.rustlang.escape import software.amazon.smithy.rust.codegen.rustlang.isEmpty import software.amazon.smithy.rust.codegen.rustlang.rust -import software.amazon.smithy.rust.codegen.smithy.RustSettings +import software.amazon.smithy.rust.codegen.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.smithy.customize.NamedSectionGenerator import software.amazon.smithy.rust.codegen.smithy.customize.Section import software.amazon.smithy.rust.codegen.util.getTrait @@ -31,7 +31,7 @@ sealed class LibRsSection(name: String) : Section(name) { typealias LibRsCustomization = NamedSectionGenerator class LibRsGenerator( - private val settings: RustSettings, + private val settings: CoreRustSettings, private val model: Model, private val modules: List, private val customizations: List, diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/PaginatorGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/PaginatorGenerator.kt index fe4f0571f6a..c31f3240d4f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/PaginatorGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/PaginatorGenerator.kt @@ -23,7 +23,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.stripOuter import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.generators.client.FluentClientGenerics @@ -52,15 +52,15 @@ class PaginatorGenerator private constructor( companion object { fun paginatorType( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, generics: FluentClientGenerics, operationShape: OperationShape ): RuntimeType? { - return if (operationShape.isPaginated(codegenContext.model)) { + return if (operationShape.isPaginated(coreCodegenContext.model)) { PaginatorGenerator( - codegenContext.model, - codegenContext.symbolProvider, - codegenContext.serviceShape, + coreCodegenContext.model, + coreCodegenContext.symbolProvider, + coreCodegenContext.serviceShape, operationShape, generics ).paginatorType() diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/ServiceGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/ServiceGenerator.kt index 092f4275565..f4d65add46f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/ServiceGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/ServiceGenerator.kt @@ -8,7 +8,7 @@ package software.amazon.smithy.rust.codegen.smithy.generators import software.amazon.smithy.model.knowledge.TopDownIndex import software.amazon.smithy.rust.codegen.rustlang.Attribute import software.amazon.smithy.rust.codegen.rustlang.RustModule -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.config.ServiceConfigGenerator @@ -29,44 +29,44 @@ class ServiceGenerator( private val rustCrate: RustCrate, private val protocolGenerator: ProtocolGenerator, private val protocolSupport: ProtocolSupport, - private val config: CodegenContext, - private val decorator: RustCodegenDecorator, + private val clientCodegenContext: ClientCodegenContext, + private val decorator: RustCodegenDecorator, ) { - private val index = TopDownIndex.of(config.model) + private val index = TopDownIndex.of(clientCodegenContext.model) /** * Render Service-specific code. Code will end up in different files via `useShapeWriter`. See `SymbolVisitor.kt` * which assigns a symbol location to each shape. */ fun render() { - val operations = index.getContainedOperations(config.serviceShape).sortedBy { it.id } + val operations = index.getContainedOperations(clientCodegenContext.serviceShape).sortedBy { it.id } operations.map { operation -> rustCrate.useShapeWriter(operation) { operationWriter -> - rustCrate.useShapeWriter(operation.inputShape(config.model)) { inputWriter -> + rustCrate.useShapeWriter(operation.inputShape(clientCodegenContext.model)) { inputWriter -> // Render the operation shape & serializers input `input.rs` protocolGenerator.renderOperation( operationWriter, inputWriter, operation, - decorator.operationCustomizations(config, operation, listOf()) + decorator.operationCustomizations(clientCodegenContext, operation, listOf()) ) // render protocol tests into `operation.rs` (note operationWriter vs. inputWriter) - ProtocolTestGenerator(config, protocolSupport, operation, operationWriter).render() + ProtocolTestGenerator(clientCodegenContext, protocolSupport, operation, operationWriter).render() } } // Render a service-level error enum containing every error that the service can emit rustCrate.withModule(RustModule.Error) { writer -> - CombinedErrorGenerator(config.model, config.symbolProvider, operation).render(writer) + CombinedErrorGenerator(clientCodegenContext.model, clientCodegenContext.symbolProvider, operation).render(writer) } } - TopLevelErrorGenerator(config, operations).render(rustCrate) + TopLevelErrorGenerator(clientCodegenContext, operations).render(rustCrate) rustCrate.withModule(RustModule.Config) { writer -> ServiceConfigGenerator.withBaseBehavior( - config, - extraCustomizations = decorator.configCustomizations(config, listOf()) + clientCodegenContext, + extraCustomizations = decorator.configCustomizations(clientCodegenContext, listOf()) ).render(writer) } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt index 8f2146af39e..483ae8802eb 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt @@ -37,7 +37,8 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.stripOuter import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider @@ -59,14 +60,14 @@ import software.amazon.smithy.rust.codegen.util.orNull import software.amazon.smithy.rust.codegen.util.outputShape import software.amazon.smithy.rust.codegen.util.toSnakeCase -class FluentClientDecorator : RustCodegenDecorator { +class FluentClientDecorator : RustCodegenDecorator { override val name: String = "FluentClient" override val order: Byte = 0 - private fun applies(codegenContext: CodegenContext): Boolean = - codegenContext.symbolProvider.config().codegenConfig.includeFluentClient + private fun applies(codegenContext: ClientCodegenContext): Boolean = + codegenContext.settings.codegenConfig.includeFluentClient - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { if (!applies(codegenContext)) { return } @@ -80,7 +81,7 @@ class FluentClientDecorator : RustCodegenDecorator { } override fun libRsCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { if (!applies(codegenContext)) { @@ -111,9 +112,9 @@ sealed class FluentClientSection(name: String) : Section(name) { abstract class FluentClientCustomization : NamedSectionGenerator() -class GenericFluentClient(codegenContext: CodegenContext) : FluentClientCustomization() { - private val moduleUseName = codegenContext.moduleUseName() - private val clientDep = CargoDependency.SmithyClient(codegenContext.runtimeConfig) +class GenericFluentClient(coreCodegenContext: CoreCodegenContext) : FluentClientCustomization() { + private val moduleUseName = coreCodegenContext.moduleUseName() + private val clientDep = CargoDependency.SmithyClient(coreCodegenContext.runtimeConfig) private val codegenScope = arrayOf("client" to clientDep.asType()) override fun section(section: FluentClientSection): Writable { return when (section) { @@ -283,12 +284,12 @@ class GenericFluentClient(codegenContext: CodegenContext) : FluentClientCustomiz } class FluentClientGenerator( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val generics: FluentClientGenerics = FlexibleClientGenerics( connectorDefault = null, middlewareDefault = null, - retryDefault = CargoDependency.SmithyClient(codegenContext.runtimeConfig).asType().member("retry::Standard"), - client = CargoDependency.SmithyClient(codegenContext.runtimeConfig).asType() + retryDefault = CargoDependency.SmithyClient(coreCodegenContext.runtimeConfig).asType().member("retry::Standard"), + client = CargoDependency.SmithyClient(coreCodegenContext.runtimeConfig).asType() ), private val customizations: List = emptyList(), ) { @@ -303,13 +304,13 @@ class FluentClientGenerator( ) } - private val serviceShape = codegenContext.serviceShape + private val serviceShape = coreCodegenContext.serviceShape private val operations = - TopDownIndex.of(codegenContext.model).getContainedOperations(serviceShape).sortedBy { it.id } - private val symbolProvider = codegenContext.symbolProvider - private val model = codegenContext.model - private val clientDep = CargoDependency.SmithyClient(codegenContext.runtimeConfig) - private val runtimeConfig = codegenContext.runtimeConfig + TopDownIndex.of(coreCodegenContext.model).getContainedOperations(serviceShape).sortedBy { it.id } + private val symbolProvider = coreCodegenContext.symbolProvider + private val model = coreCodegenContext.model + private val clientDep = CargoDependency.SmithyClient(coreCodegenContext.runtimeConfig) + private val runtimeConfig = coreCodegenContext.runtimeConfig private val core = FluentClientCore(model) fun render(crate: RustCrate) { @@ -516,7 +517,7 @@ class FluentClientGenerator( .copy(name = "result::SdkError"), "send_bounds" to generics.sendBounds(inputType, outputType, errorType) ) - PaginatorGenerator.paginatorType(codegenContext, generics, operation)?.also { paginatorType -> + PaginatorGenerator.paginatorType(coreCodegenContext, generics, operation)?.also { paginatorType -> rustTemplate( """ /// Create a paginator for this request diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/config/ServiceConfigGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/config/ServiceConfigGenerator.kt index 25da413de18..50346181576 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/config/ServiceConfigGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/config/ServiceConfigGenerator.kt @@ -15,7 +15,7 @@ import software.amazon.smithy.rust.codegen.rustlang.docs import software.amazon.smithy.rust.codegen.rustlang.raw import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.customize.NamedSectionGenerator import software.amazon.smithy.rust.codegen.smithy.customize.Section import software.amazon.smithy.rust.codegen.util.hasTrait @@ -111,9 +111,9 @@ typealias ConfigCustomization = NamedSectionGenerator class ServiceConfigGenerator(private val customizations: List = listOf()) { companion object { - fun withBaseBehavior(codegenContext: CodegenContext, extraCustomizations: List): ServiceConfigGenerator { + fun withBaseBehavior(coreCodegenContext: CoreCodegenContext, extraCustomizations: List): ServiceConfigGenerator { val baseFeatures = mutableListOf() - if (codegenContext.serviceShape.needsIdempotencyToken(codegenContext.model)) { + if (coreCodegenContext.serviceShape.needsIdempotencyToken(coreCodegenContext.model)) { baseFeatures.add(IdempotencyTokenProviderCustomization()) } return ServiceConfigGenerator(baseFeatures + extraCustomizations) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/TopLevelErrorGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/TopLevelErrorGenerator.kt index 26f7321da6a..b63dbd8b128 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/TopLevelErrorGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/error/TopLevelErrorGenerator.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.rustlang.documentShape import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustCrate @@ -37,15 +37,15 @@ import software.amazon.smithy.rust.codegen.smithy.RustCrate * } * ``` */ -class TopLevelErrorGenerator(codegenContext: CodegenContext, private val operations: List) { - private val symbolProvider = codegenContext.symbolProvider - private val model = codegenContext.model +class TopLevelErrorGenerator(coreCodegenContext: CoreCodegenContext, private val operations: List) { + private val symbolProvider = coreCodegenContext.symbolProvider + private val model = coreCodegenContext.model - private val allErrors = operations.flatMap { it.errors }.distinctBy { it.getName(codegenContext.serviceShape) } - .map { codegenContext.model.expectShape(it, StructureShape::class.java) } - .sortedBy { it.id.getName(codegenContext.serviceShape) } + private val allErrors = operations.flatMap { it.errors }.distinctBy { it.getName(coreCodegenContext.serviceShape) } + .map { coreCodegenContext.model.expectShape(it, StructureShape::class.java) } + .sortedBy { it.id.getName(coreCodegenContext.serviceShape) } - private val sdkError = CargoDependency.SmithyHttp(codegenContext.runtimeConfig).asType().member("result::SdkError") + private val sdkError = CargoDependency.SmithyHttp(coreCodegenContext.runtimeConfig).asType().member("result::SdkError") fun render(crate: RustCrate) { crate.withModule(RustModule.default("error_meta", visibility = Visibility.PRIVATE)) { writer -> writer.renderDefinition() diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt index 7ebfb9b130c..08071c58c73 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt @@ -35,7 +35,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.stripOuter import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.operationBuildError @@ -88,14 +88,14 @@ public enum class HttpMessageType { */ class HttpBindingGenerator( private val protocol: Protocol, - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val operationShape: OperationShape ) { - private val runtimeConfig = codegenContext.runtimeConfig - private val symbolProvider = codegenContext.symbolProvider - private val target = codegenContext.target - private val model = codegenContext.model - private val service = codegenContext.serviceShape + private val runtimeConfig = coreCodegenContext.runtimeConfig + private val symbolProvider = coreCodegenContext.symbolProvider + private val target = coreCodegenContext.target + private val model = coreCodegenContext.model + private val service = coreCodegenContext.serviceShape private val index = HttpBindingIndex.of(model) private val headerUtil = CargoDependency.SmithyHttp(runtimeConfig).asType().member("header") private val defaultTimestampFormat = TimestampFormatTrait.Format.EPOCH_SECONDS diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/RequestBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/RequestBindingGenerator.kt index 59ccc236752..620e44dcbbb 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/RequestBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/RequestBindingGenerator.kt @@ -21,7 +21,7 @@ import software.amazon.smithy.rust.codegen.rustlang.autoDeref import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.OperationBuildError import software.amazon.smithy.rust.codegen.smithy.generators.operationBuildError @@ -53,16 +53,16 @@ fun SmithyPattern.rustFormatString(prefix: String, separator: String): String { * headers & URL based on the HTTP trait implementation. */ class RequestBindingGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val protocol: Protocol, private val operationShape: OperationShape, ) { - private val model = codegenContext.model + private val model = coreCodegenContext.model private val inputShape = operationShape.inputShape(model) - private val symbolProvider = codegenContext.symbolProvider - private val runtimeConfig = codegenContext.runtimeConfig + private val symbolProvider = coreCodegenContext.symbolProvider + private val runtimeConfig = coreCodegenContext.runtimeConfig private val httpTrait = protocol.httpBindingResolver.httpTrait(operationShape) - private val httpBindingGenerator = HttpBindingGenerator(protocol, codegenContext, operationShape) + private val httpBindingGenerator = HttpBindingGenerator(protocol, coreCodegenContext, operationShape) private val index = HttpBindingIndex.of(model) private val Encoder = CargoDependency.SmithyTypes(runtimeConfig).asType().member("primitive::Encoder") diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/ResponseBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/ResponseBindingGenerator.kt index 5652519bfbd..4c8f2d1a7db 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/ResponseBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/ResponseBindingGenerator.kt @@ -7,17 +7,17 @@ package software.amazon.smithy.rust.codegen.smithy.generators.http import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.rust.codegen.rustlang.RustWriter -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.protocols.HttpBindingDescriptor import software.amazon.smithy.rust.codegen.smithy.protocols.Protocol class ResponseBindingGenerator( protocol: Protocol, - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, operationShape: OperationShape ) { - private val httpBindingGenerator = HttpBindingGenerator(protocol, codegenContext, operationShape) + private val httpBindingGenerator = HttpBindingGenerator(protocol, coreCodegenContext, operationShape) fun generateDeserializeHeaderFn(binding: HttpBindingDescriptor): RuntimeType = httpBindingGenerator.generateDeserializeHeaderFn(binding) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/MakeOperationGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/MakeOperationGenerator.kt index dae6406538d..b9c6acda633 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/MakeOperationGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/MakeOperationGenerator.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.withBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection @@ -35,7 +35,7 @@ import software.amazon.smithy.rust.codegen.util.inputShape /** Generates the `make_operation` function on input structs */ open class MakeOperationGenerator( - protected val codegenContext: CodegenContext, + protected val coreCodegenContext: CoreCodegenContext, private val protocol: Protocol, private val bodyGenerator: ProtocolPayloadGenerator, private val public: Boolean, @@ -43,23 +43,23 @@ open class MakeOperationGenerator( private val includeDefaultPayloadHeaders: Boolean, private val functionName: String = "make_operation", ) { - protected val model = codegenContext.model - protected val runtimeConfig = codegenContext.runtimeConfig - protected val symbolProvider = codegenContext.symbolProvider + protected val model = coreCodegenContext.model + protected val runtimeConfig = coreCodegenContext.runtimeConfig + protected val symbolProvider = coreCodegenContext.symbolProvider protected val httpBindingResolver = protocol.httpBindingResolver private val sdkId = - codegenContext.serviceShape.getTrait()?.sdkId?.lowercase()?.replace(" ", "") - ?: codegenContext.serviceShape.id.getName(codegenContext.serviceShape) + coreCodegenContext.serviceShape.getTrait()?.sdkId?.lowercase()?.replace(" ", "") + ?: coreCodegenContext.serviceShape.id.getName(coreCodegenContext.serviceShape) private val codegenScope = arrayOf( "config" to RuntimeType.Config, "header_util" to CargoDependency.SmithyHttp(runtimeConfig).asType().member("header"), "http" to RuntimeType.http, "HttpRequestBuilder" to RuntimeType.HttpRequestBuilder, - "OpBuildError" to codegenContext.runtimeConfig.operationBuildError(), + "OpBuildError" to coreCodegenContext.runtimeConfig.operationBuildError(), "operation" to RuntimeType.operationModule(runtimeConfig), - "SdkBody" to RuntimeType.sdkBody(codegenContext.runtimeConfig) + "SdkBody" to RuntimeType.sdkBody(coreCodegenContext.runtimeConfig) ) fun generateMakeOperation( @@ -160,7 +160,7 @@ open class MakeOperationGenerator( open fun createHttpRequest(writer: RustWriter, operationShape: OperationShape) { val httpBindingGenerator = RequestBindingGenerator( - codegenContext, + coreCodegenContext, protocol, operationShape ) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolGenerator.kt index ef05fd523d5..7b84c8396af 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolGenerator.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.rustlang.docLink import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection @@ -77,7 +77,7 @@ interface ProtocolTraitImplGenerator { * Class providing scaffolding for HTTP based protocols that must build an HTTP request (headers / URL) and a body. */ open class ProtocolGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, /** * `Protocol` contains all protocol specific information. Each smithy protocol, e.g. RestJson, RestXml, etc. will * have their own implementation of the protocol interface which defines how an input shape becomes and http::Request @@ -95,8 +95,8 @@ open class ProtocolGenerator( */ private val traitGenerator: ProtocolTraitImplGenerator, ) { - private val symbolProvider = codegenContext.symbolProvider - private val model = codegenContext.model + private val symbolProvider = coreCodegenContext.symbolProvider + private val model = coreCodegenContext.model /** * Render all code required for serializing requests and deserializing responses for the operation diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt index abb9a680541..fbc3d3b7cf7 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGenerator.kt @@ -30,7 +30,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.Instantiator @@ -64,24 +64,24 @@ data class ProtocolSupport( * Generate protocol tests for an operation */ class ProtocolTestGenerator( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val protocolSupport: ProtocolSupport, private val operationShape: OperationShape, private val writer: RustWriter ) { private val logger = Logger.getLogger(javaClass.name) - private val inputShape = operationShape.inputShape(codegenContext.model) - private val outputShape = operationShape.outputShape(codegenContext.model) - private val operationSymbol = codegenContext.symbolProvider.toSymbol(operationShape) - private val operationIndex = OperationIndex.of(codegenContext.model) + private val inputShape = operationShape.inputShape(coreCodegenContext.model) + private val outputShape = operationShape.outputShape(coreCodegenContext.model) + private val operationSymbol = coreCodegenContext.symbolProvider.toSymbol(operationShape) + private val operationIndex = OperationIndex.of(coreCodegenContext.model) - private val instantiator = with(codegenContext) { + private val instantiator = with(coreCodegenContext) { Instantiator(symbolProvider, model, runtimeConfig, CodegenTarget.CLIENT) } private val codegenScope = arrayOf( - "SmithyHttp" to CargoDependency.SmithyHttp(codegenContext.runtimeConfig).asType(), + "SmithyHttp" to CargoDependency.SmithyHttp(coreCodegenContext.runtimeConfig).asType(), "Http" to CargoDependency.Http.asType(), "AssertEq" to CargoDependency.PrettyAssertions.asType().member("assert_eq!") ) @@ -138,7 +138,7 @@ class ProtocolTestGenerator( private fun List.filterMatching(): List { return if (RunOnly.isNullOrEmpty()) { this.filter { testCase -> - testCase.testCase.protocol == codegenContext.protocol && + testCase.testCase.protocol == coreCodegenContext.protocol && !DisableTests.contains(testCase.testCase.id) } } else { @@ -182,7 +182,7 @@ class ProtocolTestGenerator( rust("/* test case disabled for this protocol (not yet supported) */") return } - val customToken = if (inputShape.findMemberWithTrait(codegenContext.model) != null) { + val customToken = if (inputShape.findMemberWithTrait(coreCodegenContext.model) != null) { """.make_token("00000000-0000-4000-8000-000000000000")""" } else "" rust( @@ -248,7 +248,7 @@ class ProtocolTestGenerator( } private fun expectFail(testCase: HttpMessageTestCase): Boolean = ExpectFail.find { - it.id == testCase.id && it.action == testCase.action() && it.service == codegenContext.serviceShape.id.toString() + it.id == testCase.id && it.action == testCase.action() && it.service == coreCodegenContext.serviceShape.id.toString() } != null private fun RustWriter.renderHttpResponseTestCase( @@ -277,11 +277,11 @@ class ProtocolTestGenerator( .body(#T::from(${testCase.body.orNull()?.dq()?.replace("#", "##") ?: "vec![]"})) .unwrap(); """, - RuntimeType.sdkBody(runtimeConfig = codegenContext.runtimeConfig) + RuntimeType.sdkBody(runtimeConfig = coreCodegenContext.runtimeConfig) ) write( "let mut op_response = #T::new(http_response);", - RuntimeType.operationModule(codegenContext.runtimeConfig).member("Response") + RuntimeType.operationModule(coreCodegenContext.runtimeConfig).member("Response") ) rustTemplate( """ @@ -296,12 +296,12 @@ class ProtocolTestGenerator( """, "op" to operationSymbol, "bytes" to RuntimeType.Bytes, - "parse_http_response" to CargoDependency.SmithyHttp(codegenContext.runtimeConfig).asType() + "parse_http_response" to CargoDependency.SmithyHttp(coreCodegenContext.runtimeConfig).asType() .member("response::ParseHttpResponse"), ) if (expectedShape.hasTrait()) { - val errorSymbol = operationShape.errorSymbol(codegenContext.symbolProvider) - val errorVariant = codegenContext.symbolProvider.toSymbol(expectedShape).name + val errorSymbol = operationShape.errorSymbol(coreCodegenContext.symbolProvider) + val errorVariant = coreCodegenContext.symbolProvider.toSymbol(expectedShape).name rust("""let parsed = parsed.expect_err("should be error response");""") rustBlock("if let #TKind::$errorVariant(actual_error) = parsed.kind", errorSymbol) { rustTemplate("#{AssertEq}(expected_output, actual_error);", *codegenScope) @@ -312,8 +312,8 @@ class ProtocolTestGenerator( } else { rust("let parsed = parsed.unwrap();") outputShape.members().forEach { member -> - val memberName = codegenContext.symbolProvider.toMemberName(member) - if (member.isStreaming(codegenContext.model)) { + val memberName = coreCodegenContext.symbolProvider.toMemberName(member) + if (member.isStreaming(coreCodegenContext.model)) { rustTemplate( """ #{AssertEq}( @@ -324,10 +324,10 @@ class ProtocolTestGenerator( *codegenScope ) } else { - when (codegenContext.model.expectShape(member.target)) { + when (coreCodegenContext.model.expectShape(member.target)) { is DoubleShape, is FloatShape -> { addUseImports( - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "FloatEquals").toSymbol() + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "FloatEquals").toSymbol() ) rust( """ @@ -361,8 +361,8 @@ class ProtocolTestGenerator( "#T(&body, ${ rustWriter.escape(body).dq() }, #T::from(${(mediaType ?: "unknown").dq()}))", - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "validate_body"), - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "MediaType") + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "validate_body"), + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "MediaType") ) } } @@ -403,7 +403,7 @@ class ProtocolTestGenerator( assertOk(rustWriter) { write( "#T($actualExpression, $variableName)", - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "validate_headers") + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "validate_headers") ) } } @@ -457,7 +457,7 @@ class ProtocolTestGenerator( assertOk(rustWriter) { write( "#T($actualExpression, $expectedVariableName)", - RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, checkFunction) + RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, checkFunction) ) } } @@ -467,7 +467,7 @@ class ProtocolTestGenerator( * for pretty prettying protocol test helper results */ private fun assertOk(rustWriter: RustWriter, inner: RustWriter.() -> Unit) { - rustWriter.write("#T(", RuntimeType.ProtocolTestHelper(codegenContext.runtimeConfig, "assert_ok")) + rustWriter.write("#T(", RuntimeType.ProtocolTestHelper(coreCodegenContext.runtimeConfig, "assert_ok")) inner(rustWriter) rustWriter.write(");") } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsJson.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsJson.kt index ec14d709f9f..a8eeee56a32 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsJson.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsJson.kt @@ -17,7 +17,8 @@ import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.smithy.generators.serializationError @@ -39,12 +40,11 @@ sealed class AwsJsonVersion { } } -class AwsJsonFactory(private val version: AwsJsonVersion) : ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol = AwsJson(codegenContext, version) +class AwsJsonFactory(private val version: AwsJsonVersion) : ProtocolGeneratorFactory { + override fun protocol(codegenContext: ClientCodegenContext): Protocol = AwsJson(codegenContext, version) - override fun buildProtocolGenerator(codegenContext: CodegenContext): HttpBoundProtocolGenerator { - return HttpBoundProtocolGenerator(codegenContext, protocol(codegenContext)) - } + override fun buildProtocolGenerator(codegenContext: ClientCodegenContext): HttpBoundProtocolGenerator = + HttpBoundProtocolGenerator(codegenContext, protocol(codegenContext)) override fun transformModel(model: Model): Model = model @@ -99,12 +99,12 @@ class AwsJsonHttpBindingResolver( * customizes wraps [JsonSerializerGenerator] to add this functionality. */ class AwsJsonSerializerGenerator( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, httpBindingResolver: HttpBindingResolver, private val jsonSerializerGenerator: JsonSerializerGenerator = - JsonSerializerGenerator(codegenContext, httpBindingResolver, ::awsJsonFieldName) + JsonSerializerGenerator(coreCodegenContext, httpBindingResolver, ::awsJsonFieldName) ) : StructuredDataSerializerGenerator by jsonSerializerGenerator { - private val runtimeConfig = codegenContext.runtimeConfig + private val runtimeConfig = coreCodegenContext.runtimeConfig private val codegenScope = arrayOf( "Error" to runtimeConfig.serializationError(), "SdkBody" to RuntimeType.sdkBody(runtimeConfig), @@ -113,12 +113,12 @@ class AwsJsonSerializerGenerator( override fun operationInputSerializer(operationShape: OperationShape): RuntimeType { var serializer = jsonSerializerGenerator.operationInputSerializer(operationShape) if (serializer == null) { - val inputShape = operationShape.inputShape(codegenContext.model) - val fnName = codegenContext.symbolProvider.serializeFunctionName(operationShape) + val inputShape = operationShape.inputShape(coreCodegenContext.model) + val fnName = coreCodegenContext.symbolProvider.serializeFunctionName(operationShape) serializer = RuntimeType.forInlineFun(fnName, RustModule.private("operation_ser")) { it.rustBlockTemplate( "pub fn $fnName(_input: &#{target}) -> Result<#{SdkBody}, #{Error}>", - *codegenScope, "target" to codegenContext.symbolProvider.toSymbol(inputShape) + *codegenScope, "target" to coreCodegenContext.symbolProvider.toSymbol(inputShape) ) { rustTemplate("""Ok(#{SdkBody}::from("{}"))""", *codegenScope) } @@ -129,10 +129,10 @@ class AwsJsonSerializerGenerator( } open class AwsJson( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, awsJsonVersion: AwsJsonVersion ) : Protocol { - private val runtimeConfig = codegenContext.runtimeConfig + private val runtimeConfig = coreCodegenContext.runtimeConfig private val errorScope = arrayOf( "Bytes" to RuntimeType.Bytes, "Error" to RuntimeType.GenericError(runtimeConfig), @@ -144,18 +144,18 @@ open class AwsJson( private val jsonDeserModule = RustModule.private("json_deser") override val httpBindingResolver: HttpBindingResolver = - AwsJsonHttpBindingResolver(codegenContext.model, awsJsonVersion) + AwsJsonHttpBindingResolver(coreCodegenContext.model, awsJsonVersion) override val defaultTimestampFormat: TimestampFormatTrait.Format = TimestampFormatTrait.Format.EPOCH_SECONDS override fun additionalRequestHeaders(operationShape: OperationShape): List> = - listOf("x-amz-target" to "${codegenContext.serviceShape.id.name}.${operationShape.id.name}") + listOf("x-amz-target" to "${coreCodegenContext.serviceShape.id.name}.${operationShape.id.name}") override fun structuredDataParser(operationShape: OperationShape): StructuredDataParserGenerator = - JsonParserGenerator(codegenContext, httpBindingResolver, ::awsJsonFieldName) + JsonParserGenerator(coreCodegenContext, httpBindingResolver, ::awsJsonFieldName) override fun structuredDataSerializer(operationShape: OperationShape): StructuredDataSerializerGenerator = - AwsJsonSerializerGenerator(codegenContext, httpBindingResolver) + AwsJsonSerializerGenerator(coreCodegenContext, httpBindingResolver) override fun parseHttpGenericError(operationShape: OperationShape): RuntimeType = RuntimeType.forInlineFun("parse_http_generic_error", jsonDeserModule) { writer -> diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsQuery.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsQuery.kt index 1ed6b95c511..57907c543af 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsQuery.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsQuery.kt @@ -17,7 +17,8 @@ import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.smithy.protocols.parse.AwsQueryParserGenerator @@ -26,10 +27,10 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.serialize.AwsQuerySe import software.amazon.smithy.rust.codegen.smithy.protocols.serialize.StructuredDataSerializerGenerator import software.amazon.smithy.rust.codegen.util.getTrait -class AwsQueryFactory : ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol = AwsQueryProtocol(codegenContext) +class AwsQueryFactory : ProtocolGeneratorFactory { + override fun protocol(codegenContext: ClientCodegenContext): Protocol = AwsQueryProtocol(codegenContext) - override fun buildProtocolGenerator(codegenContext: CodegenContext): HttpBoundProtocolGenerator = + override fun buildProtocolGenerator(codegenContext: ClientCodegenContext): HttpBoundProtocolGenerator = HttpBoundProtocolGenerator(codegenContext, protocol(codegenContext)) override fun transformModel(model: Model): Model = model @@ -64,8 +65,8 @@ class AwsQueryBindingResolver(private val model: Model) : } } -class AwsQueryProtocol(private val codegenContext: CodegenContext) : Protocol { - private val runtimeConfig = codegenContext.runtimeConfig +class AwsQueryProtocol(private val coreCodegenContext: CoreCodegenContext) : Protocol { + private val runtimeConfig = coreCodegenContext.runtimeConfig private val awsQueryErrors: RuntimeType = RuntimeType.wrappedXmlErrors(runtimeConfig) private val errorScope = arrayOf( "Bytes" to RuntimeType.Bytes, @@ -76,15 +77,15 @@ class AwsQueryProtocol(private val codegenContext: CodegenContext) : Protocol { ) private val xmlDeserModule = RustModule.private("xml_deser") - override val httpBindingResolver: HttpBindingResolver = AwsQueryBindingResolver(codegenContext.model) + override val httpBindingResolver: HttpBindingResolver = AwsQueryBindingResolver(coreCodegenContext.model) override val defaultTimestampFormat: TimestampFormatTrait.Format = TimestampFormatTrait.Format.DATE_TIME override fun structuredDataParser(operationShape: OperationShape): StructuredDataParserGenerator = - AwsQueryParserGenerator(codegenContext, awsQueryErrors) + AwsQueryParserGenerator(coreCodegenContext, awsQueryErrors) override fun structuredDataSerializer(operationShape: OperationShape): StructuredDataSerializerGenerator = - AwsQuerySerializerGenerator(codegenContext) + AwsQuerySerializerGenerator(coreCodegenContext) override fun parseHttpGenericError(operationShape: OperationShape): RuntimeType = RuntimeType.forInlineFun("parse_http_generic_error", xmlDeserModule) { writer -> diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/Ec2Query.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/Ec2Query.kt index f010e97ed79..0f047ce1a97 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/Ec2Query.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/Ec2Query.kt @@ -15,7 +15,8 @@ import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.smithy.protocols.parse.Ec2QueryParserGenerator @@ -23,10 +24,10 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.parse.StructuredData import software.amazon.smithy.rust.codegen.smithy.protocols.serialize.Ec2QuerySerializerGenerator import software.amazon.smithy.rust.codegen.smithy.protocols.serialize.StructuredDataSerializerGenerator -class Ec2QueryFactory : ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol = Ec2QueryProtocol(codegenContext) +class Ec2QueryFactory : ProtocolGeneratorFactory { + override fun protocol(codegenContext: ClientCodegenContext): Protocol = Ec2QueryProtocol(codegenContext) - override fun buildProtocolGenerator(codegenContext: CodegenContext): HttpBoundProtocolGenerator = + override fun buildProtocolGenerator(codegenContext: ClientCodegenContext): HttpBoundProtocolGenerator = HttpBoundProtocolGenerator(codegenContext, protocol(codegenContext)) override fun transformModel(model: Model): Model = model @@ -47,8 +48,8 @@ class Ec2QueryFactory : ProtocolGeneratorFactory { } } -class Ec2QueryProtocol(private val codegenContext: CodegenContext) : Protocol { - private val runtimeConfig = codegenContext.runtimeConfig +class Ec2QueryProtocol(private val coreCodegenContext: CoreCodegenContext) : Protocol { + private val runtimeConfig = coreCodegenContext.runtimeConfig private val ec2QueryErrors: RuntimeType = RuntimeType.ec2QueryErrors(runtimeConfig) private val errorScope = arrayOf( "Bytes" to RuntimeType.Bytes, @@ -60,7 +61,7 @@ class Ec2QueryProtocol(private val codegenContext: CodegenContext) : Protocol { private val xmlDeserModule = RustModule.private("xml_deser") override val httpBindingResolver: HttpBindingResolver = StaticHttpBindingResolver( - codegenContext.model, + coreCodegenContext.model, HttpTrait.builder() .code(200) .method("POST") @@ -73,10 +74,10 @@ class Ec2QueryProtocol(private val codegenContext: CodegenContext) : Protocol { override val defaultTimestampFormat: TimestampFormatTrait.Format = TimestampFormatTrait.Format.DATE_TIME override fun structuredDataParser(operationShape: OperationShape): StructuredDataParserGenerator = - Ec2QueryParserGenerator(codegenContext, ec2QueryErrors) + Ec2QueryParserGenerator(coreCodegenContext, ec2QueryErrors) override fun structuredDataSerializer(operationShape: OperationShape): StructuredDataSerializerGenerator = - Ec2QuerySerializerGenerator(codegenContext) + Ec2QuerySerializerGenerator(coreCodegenContext) override fun parseHttpGenericError(operationShape: OperationShape): RuntimeType = RuntimeType.forInlineFun("parse_http_generic_error", xmlDeserModule) { writer -> diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolGenerator.kt index 116c68bd425..65d61f66cf5 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolGenerator.kt @@ -20,7 +20,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.smithy.generators.builderSymbol @@ -41,28 +41,28 @@ import software.amazon.smithy.rust.codegen.util.outputShape import software.amazon.smithy.rust.codegen.util.toSnakeCase class HttpBoundProtocolGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, protocol: Protocol, ) : ProtocolGenerator( - codegenContext, + coreCodegenContext, protocol, MakeOperationGenerator( - codegenContext, + coreCodegenContext, protocol, - HttpBoundProtocolPayloadGenerator(codegenContext, protocol), + HttpBoundProtocolPayloadGenerator(coreCodegenContext, protocol), public = true, includeDefaultPayloadHeaders = true ), - HttpBoundProtocolTraitImplGenerator(codegenContext, protocol), + HttpBoundProtocolTraitImplGenerator(coreCodegenContext, protocol), ) class HttpBoundProtocolTraitImplGenerator( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val protocol: Protocol, ) : ProtocolTraitImplGenerator { - private val symbolProvider = codegenContext.symbolProvider - private val model = codegenContext.model - private val runtimeConfig = codegenContext.runtimeConfig + private val symbolProvider = coreCodegenContext.symbolProvider + private val model = coreCodegenContext.model + private val runtimeConfig = coreCodegenContext.runtimeConfig private val httpBindingResolver = protocol.httpBindingResolver private val operationDeserModule = RustModule.private("operation_deser") @@ -278,7 +278,7 @@ class HttpBoundProtocolTraitImplGenerator( bindings: List, errorSymbol: RuntimeType, ) { - val httpBindingGenerator = ResponseBindingGenerator(protocol, codegenContext, operationShape) + val httpBindingGenerator = ResponseBindingGenerator(protocol, coreCodegenContext, operationShape) val structuredDataParser = protocol.structuredDataParser(operationShape) Attribute.AllowUnusedMut.render(this) rust("let mut output = #T::default();", outputShape.builderSymbol(symbolProvider)) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt index 6e6dee4864c..313878d75e6 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt @@ -23,7 +23,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.withBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.error.errorSymbol import software.amazon.smithy.rust.codegen.smithy.generators.http.HttpMessageType @@ -44,14 +44,14 @@ import software.amazon.smithy.rust.codegen.util.outputShape import software.amazon.smithy.rust.codegen.util.toSnakeCase class HttpBoundProtocolPayloadGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val protocol: Protocol, private val httpMessageType: HttpMessageType = HttpMessageType.REQUEST ) : ProtocolPayloadGenerator { - private val symbolProvider = codegenContext.symbolProvider - private val model = codegenContext.model - private val runtimeConfig = codegenContext.runtimeConfig - private val target = codegenContext.target + private val symbolProvider = coreCodegenContext.symbolProvider + private val model = coreCodegenContext.model + private val runtimeConfig = coreCodegenContext.runtimeConfig + private val target = coreCodegenContext.target private val httpBindingResolver = protocol.httpBindingResolver private val operationSerModule = RustModule.private("operation_ser") diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/Protocol.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/Protocol.kt index c59236840d6..32521b2b4df 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/Protocol.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/Protocol.kt @@ -20,7 +20,7 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.traits.TimestampFormatTrait import software.amazon.smithy.model.traits.Trait -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolGenerator @@ -76,21 +76,21 @@ interface Protocol { fun parseEventStreamGenericError(operationShape: OperationShape): RuntimeType } -typealias ProtocolMap = Map> +typealias ProtocolMap = Map> -interface ProtocolGeneratorFactory { - fun protocol(codegenContext: CodegenContext): Protocol - fun buildProtocolGenerator(codegenContext: CodegenContext): T +interface ProtocolGeneratorFactory { + fun protocol(codegenContext: C): Protocol + fun buildProtocolGenerator(codegenContext: C): T fun transformModel(model: Model): Model fun symbolProvider(model: Model, base: RustSymbolProvider): RustSymbolProvider = base fun support(): ProtocolSupport } -class ProtocolLoader(private val supportedProtocols: ProtocolMap) { +class ProtocolLoader(private val supportedProtocols: ProtocolMap) { fun protocolFor( model: Model, serviceShape: ServiceShape - ): Pair> { + ): Pair> { val protocols: MutableMap = ServiceIndex.of(model).getProtocols(serviceShape) val matchingProtocols = protocols.keys.mapNotNull { protocolId -> supportedProtocols[protocolId]?.let { protocolId to it } } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestJson.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestJson.kt index 596880dc414..221bd735a64 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestJson.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestJson.kt @@ -18,7 +18,8 @@ import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.smithy.protocols.parse.JsonParserGenerator @@ -29,10 +30,10 @@ import software.amazon.smithy.rust.codegen.util.getTrait import software.amazon.smithy.rust.codegen.util.hasTrait import software.amazon.smithy.rust.codegen.util.outputShape -class RestJsonFactory : ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol = RestJson(codegenContext) +class RestJsonFactory : ProtocolGeneratorFactory { + override fun protocol(codegenContext: ClientCodegenContext): Protocol = RestJson(codegenContext) - override fun buildProtocolGenerator(codegenContext: CodegenContext): HttpBoundProtocolGenerator = + override fun buildProtocolGenerator(codegenContext: ClientCodegenContext): HttpBoundProtocolGenerator = HttpBoundProtocolGenerator(codegenContext, RestJson(codegenContext)) override fun transformModel(model: Model): Model = model @@ -86,8 +87,8 @@ class RestJsonHttpBindingResolver( } } -class RestJson(private val codegenContext: CodegenContext) : Protocol { - private val runtimeConfig = codegenContext.runtimeConfig +class RestJson(private val coreCodegenContext: CoreCodegenContext) : Protocol { + private val runtimeConfig = coreCodegenContext.runtimeConfig private val errorScope = arrayOf( "Bytes" to RuntimeType.Bytes, "Error" to RuntimeType.GenericError(runtimeConfig), @@ -99,7 +100,7 @@ class RestJson(private val codegenContext: CodegenContext) : Protocol { private val jsonDeserModule = RustModule.private("json_deser") override val httpBindingResolver: HttpBindingResolver = - RestJsonHttpBindingResolver(codegenContext.model, ProtocolContentTypes.consistent("application/json")) + RestJsonHttpBindingResolver(coreCodegenContext.model, ProtocolContentTypes.consistent("application/json")) override val defaultTimestampFormat: TimestampFormatTrait.Format = TimestampFormatTrait.Format.EPOCH_SECONDS @@ -111,10 +112,10 @@ class RestJson(private val codegenContext: CodegenContext) : Protocol { listOf("x-amzn-errortype" to errorShape.id.name) override fun structuredDataParser(operationShape: OperationShape): StructuredDataParserGenerator = - JsonParserGenerator(codegenContext, httpBindingResolver, ::restJsonFieldName) + JsonParserGenerator(coreCodegenContext, httpBindingResolver, ::restJsonFieldName) override fun structuredDataSerializer(operationShape: OperationShape): StructuredDataSerializerGenerator = - JsonSerializerGenerator(codegenContext, httpBindingResolver, ::restJsonFieldName) + JsonSerializerGenerator(coreCodegenContext, httpBindingResolver, ::restJsonFieldName) override fun parseHttpGenericError(operationShape: OperationShape): RuntimeType = RuntimeType.forInlineFun("parse_http_generic_error", jsonDeserModule) { writer -> diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestXml.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestXml.kt index 98e9702a74b..4632dcf4b10 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestXml.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/RestXml.kt @@ -14,7 +14,8 @@ import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.asType import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.smithy.protocols.parse.RestXmlParserGenerator @@ -23,11 +24,13 @@ import software.amazon.smithy.rust.codegen.smithy.protocols.serialize.Structured import software.amazon.smithy.rust.codegen.smithy.protocols.serialize.XmlBindingTraitSerializerGenerator import software.amazon.smithy.rust.codegen.util.expectTrait -class RestXmlFactory(private val generator: (CodegenContext) -> Protocol = { RestXml(it) }) : - ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol = generator(codegenContext) +class RestXmlFactory( + private val generator: (ClientCodegenContext) -> Protocol = { RestXml(it) } +) : ProtocolGeneratorFactory { - override fun buildProtocolGenerator(codegenContext: CodegenContext): HttpBoundProtocolGenerator = + override fun protocol(codegenContext: ClientCodegenContext): Protocol = generator(codegenContext) + + override fun buildProtocolGenerator(codegenContext: ClientCodegenContext): HttpBoundProtocolGenerator = HttpBoundProtocolGenerator(codegenContext, protocol(codegenContext)) override fun transformModel(model: Model): Model = model @@ -48,9 +51,9 @@ class RestXmlFactory(private val generator: (CodegenContext) -> Protocol = { Res } } -open class RestXml(private val codegenContext: CodegenContext) : Protocol { - private val restXml = codegenContext.serviceShape.expectTrait() - private val runtimeConfig = codegenContext.runtimeConfig +open class RestXml(private val coreCodegenContext: CoreCodegenContext) : Protocol { + private val restXml = coreCodegenContext.serviceShape.expectTrait() + private val runtimeConfig = coreCodegenContext.runtimeConfig private val errorScope = arrayOf( "Bytes" to RuntimeType.Bytes, "Error" to RuntimeType.GenericError(runtimeConfig), @@ -66,17 +69,17 @@ open class RestXml(private val codegenContext: CodegenContext) : Protocol { } override val httpBindingResolver: HttpBindingResolver = - HttpTraitHttpBindingResolver(codegenContext.model, ProtocolContentTypes.consistent("application/xml")) + HttpTraitHttpBindingResolver(coreCodegenContext.model, ProtocolContentTypes.consistent("application/xml")) override val defaultTimestampFormat: TimestampFormatTrait.Format = TimestampFormatTrait.Format.DATE_TIME override fun structuredDataParser(operationShape: OperationShape): StructuredDataParserGenerator { - return RestXmlParserGenerator(codegenContext, restXmlErrors) + return RestXmlParserGenerator(coreCodegenContext, restXmlErrors) } override fun structuredDataSerializer(operationShape: OperationShape): StructuredDataSerializerGenerator { - return XmlBindingTraitSerializerGenerator(codegenContext, httpBindingResolver) + return XmlBindingTraitSerializerGenerator(coreCodegenContext, httpBindingResolver) } override fun parseHttpGenericError(operationShape: OperationShape): RuntimeType = diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/AwsQueryParserGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/AwsQueryParserGenerator.kt index ad11059b8b6..ab9034902b5 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/AwsQueryParserGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/AwsQueryParserGenerator.kt @@ -6,7 +6,7 @@ package software.amazon.smithy.rust.codegen.smithy.protocols.parse import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType /** @@ -25,14 +25,14 @@ import software.amazon.smithy.rust.codegen.smithy.RuntimeType * of the response parsing, but it overrides [operationParser] to add the protocol differences. */ class AwsQueryParserGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, xmlErrors: RuntimeType, private val xmlBindingTraitParserGenerator: XmlBindingTraitParserGenerator = XmlBindingTraitParserGenerator( - codegenContext, + coreCodegenContext, xmlErrors ) { context, inner -> - val operationName = codegenContext.symbolProvider.toSymbol(context.shape).name + val operationName = coreCodegenContext.symbolProvider.toSymbol(context.shape).name val responseWrapperName = operationName + "Response" val resultWrapperName = operationName + "Result" rustTemplate( diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/Ec2QueryParserGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/Ec2QueryParserGenerator.kt index f695e3c9bf4..528d22d4521 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/Ec2QueryParserGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/Ec2QueryParserGenerator.kt @@ -6,7 +6,7 @@ package software.amazon.smithy.rust.codegen.smithy.protocols.parse import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType /** @@ -23,14 +23,14 @@ import software.amazon.smithy.rust.codegen.smithy.RuntimeType * of the response parsing, but it overrides [operationParser] to add the protocol differences. */ class Ec2QueryParserGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, xmlErrors: RuntimeType, private val xmlBindingTraitParserGenerator: XmlBindingTraitParserGenerator = XmlBindingTraitParserGenerator( - codegenContext, + coreCodegenContext, xmlErrors ) { context, inner -> - val operationName = codegenContext.symbolProvider.toSymbol(context.shape).name + val operationName = coreCodegenContext.symbolProvider.toSymbol(context.shape).name val responseWrapperName = operationName + "Response" rustTemplate( """ diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/JsonParserGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/JsonParserGenerator.kt index 939c9f37ecf..1bb82d09e38 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/JsonParserGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/JsonParserGenerator.kt @@ -33,7 +33,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.withBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.canUseDefault import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget @@ -54,15 +54,15 @@ import software.amazon.smithy.rust.codegen.util.outputShape import software.amazon.smithy.utils.StringUtils class JsonParserGenerator( - codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val httpBindingResolver: HttpBindingResolver, /** Function that maps a MemberShape into a JSON field name */ private val jsonName: (MemberShape) -> String, ) : StructuredDataParserGenerator { - private val model = codegenContext.model - private val symbolProvider = codegenContext.symbolProvider - private val runtimeConfig = codegenContext.runtimeConfig - private val target = codegenContext.target + private val model = coreCodegenContext.model + private val symbolProvider = coreCodegenContext.symbolProvider + private val runtimeConfig = coreCodegenContext.runtimeConfig + private val target = coreCodegenContext.target private val smithyJson = CargoDependency.smithyJson(runtimeConfig).asType() private val jsonDeserModule = RustModule.private("json_deser") private val codegenScope = arrayOf( diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/RestXmlParserGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/RestXmlParserGenerator.kt index 8b8110051ac..db6fafbad19 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/RestXmlParserGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/RestXmlParserGenerator.kt @@ -6,15 +6,15 @@ package software.amazon.smithy.rust.codegen.smithy.protocols.parse import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType class RestXmlParserGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, xmlErrors: RuntimeType, private val xmlBindingTraitParserGenerator: XmlBindingTraitParserGenerator = XmlBindingTraitParserGenerator( - codegenContext, + coreCodegenContext, xmlErrors ) { context, inner -> val shapeName = context.outputShapeName diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt index df51185e379..c080a473178 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt @@ -37,7 +37,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.withBlockTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator @@ -66,7 +66,7 @@ data class OperationWrapperContext( ) class XmlBindingTraitParserGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val xmlErrors: RuntimeType, private val writeOperationWrapper: RustWriter.(OperationWrapperContext, OperationInnerWriteable) -> Unit, ) : StructuredDataParserGenerator { @@ -92,12 +92,12 @@ class XmlBindingTraitParserGenerator( */ data class Ctx(val tag: String, val accum: String?) - private val symbolProvider = codegenContext.symbolProvider - private val smithyXml = CargoDependency.smithyXml(codegenContext.runtimeConfig).asType() + private val symbolProvider = coreCodegenContext.symbolProvider + private val smithyXml = CargoDependency.smithyXml(coreCodegenContext.runtimeConfig).asType() private val xmlError = smithyXml.member("decode::XmlError") private val scopedDecoder = smithyXml.member("decode::ScopedDecoder") - private val runtimeConfig = codegenContext.runtimeConfig + private val runtimeConfig = coreCodegenContext.runtimeConfig // The symbols we want all the time private val codegenScope = arrayOf( @@ -109,10 +109,10 @@ class XmlBindingTraitParserGenerator( "ScopedDecoder" to scopedDecoder, "aws_smithy_types" to CargoDependency.SmithyTypes(runtimeConfig).asType() ) - private val model = codegenContext.model + private val model = coreCodegenContext.model private val index = HttpBindingIndex.of(model) private val xmlIndex = XmlNameIndex.of(model) - private val target = codegenContext.target + private val target = coreCodegenContext.target private val xmlDeserModule = RustModule.private("xml_deser") /** diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt index 90cc93960ee..198fb0717b4 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt @@ -10,11 +10,11 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.traits.XmlFlattenedTrait import software.amazon.smithy.model.traits.XmlNameTrait -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.util.getTrait -class AwsQuerySerializerGenerator(codegenContext: CodegenContext) : QuerySerializerGenerator(codegenContext) { +class AwsQuerySerializerGenerator(coreCodegenContext: CoreCodegenContext) : QuerySerializerGenerator(coreCodegenContext) { override val protocolName: String get() = "AWS Query" override fun MemberShape.queryKeyName(prioritizedFallback: String?): String = diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt index 5accaaf04db..f4761e09949 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt @@ -10,12 +10,12 @@ import software.amazon.smithy.model.shapes.MemberShape import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.traits.XmlNameTrait -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.util.getTrait import software.amazon.smithy.utils.StringUtils -class Ec2QuerySerializerGenerator(codegenContext: CodegenContext) : QuerySerializerGenerator(codegenContext) { +class Ec2QuerySerializerGenerator(coreCodegenContext: CoreCodegenContext) : QuerySerializerGenerator(coreCodegenContext) { override val protocolName: String get() = "EC2 Query" override fun MemberShape.queryKeyName(prioritizedFallback: String?): String = diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt index c2a979ce135..dd5c0a97db2 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/JsonSerializerGenerator.kt @@ -31,7 +31,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.customize.NamedSectionGenerator @@ -65,7 +65,7 @@ sealed class JsonSection(name: String) : Section(name) { typealias JsonCustomization = NamedSectionGenerator class JsonSerializerGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val httpBindingResolver: HttpBindingResolver, /** Function that maps a MemberShape into a JSON field name */ private val jsonName: (MemberShape) -> String, @@ -145,10 +145,10 @@ class JsonSerializerGenerator( val shape: StructureShape, ) - private val model = codegenContext.model - private val symbolProvider = codegenContext.symbolProvider - private val target = codegenContext.target - private val runtimeConfig = codegenContext.runtimeConfig + private val model = coreCodegenContext.model + private val symbolProvider = coreCodegenContext.symbolProvider + private val target = coreCodegenContext.target + private val runtimeConfig = coreCodegenContext.runtimeConfig private val smithyTypes = CargoDependency.SmithyTypes(runtimeConfig).asType() private val smithyJson = CargoDependency.smithyJson(runtimeConfig).asType() private val codegenScope = arrayOf( diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/QuerySerializerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/QuerySerializerGenerator.kt index 1b75ad3cca7..34ab935118c 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/QuerySerializerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/QuerySerializerGenerator.kt @@ -31,7 +31,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlock import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator @@ -46,7 +46,7 @@ import software.amazon.smithy.rust.codegen.util.hasTrait import software.amazon.smithy.rust.codegen.util.inputShape import software.amazon.smithy.rust.codegen.util.orNull -abstract class QuerySerializerGenerator(codegenContext: CodegenContext) : StructuredDataSerializerGenerator { +abstract class QuerySerializerGenerator(coreCodegenContext: CoreCodegenContext) : StructuredDataSerializerGenerator { protected data class Context( /** Expression that yields a QueryValueWriter */ val writerExpression: String, @@ -87,11 +87,11 @@ abstract class QuerySerializerGenerator(codegenContext: CodegenContext) : Struct } } - protected val model = codegenContext.model - protected val symbolProvider = codegenContext.symbolProvider - protected val runtimeConfig = codegenContext.runtimeConfig - private val target = codegenContext.target - private val serviceShape = codegenContext.serviceShape + protected val model = coreCodegenContext.model + protected val symbolProvider = coreCodegenContext.symbolProvider + protected val runtimeConfig = coreCodegenContext.runtimeConfig + private val target = coreCodegenContext.target + private val serviceShape = coreCodegenContext.serviceShape private val serializerError = runtimeConfig.serializationError() private val smithyTypes = CargoDependency.SmithyTypes(runtimeConfig).asType() private val smithyQuery = CargoDependency.smithyQuery(runtimeConfig).asType() diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt index 528ac0a8b27..243aec04373 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt @@ -37,7 +37,7 @@ import software.amazon.smithy.rust.codegen.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.stripOuter import software.amazon.smithy.rust.codegen.rustlang.withBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.generators.UnionGenerator import software.amazon.smithy.rust.codegen.smithy.generators.renderUnknownVariant @@ -57,14 +57,14 @@ import software.amazon.smithy.rust.codegen.util.inputShape import software.amazon.smithy.rust.codegen.util.outputShape class XmlBindingTraitSerializerGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, private val httpBindingResolver: HttpBindingResolver ) : StructuredDataSerializerGenerator { - private val symbolProvider = codegenContext.symbolProvider - private val runtimeConfig = codegenContext.runtimeConfig - private val model = codegenContext.model + private val symbolProvider = coreCodegenContext.symbolProvider + private val runtimeConfig = coreCodegenContext.runtimeConfig + private val model = coreCodegenContext.model private val smithyXml = CargoDependency.smithyXml(runtimeConfig).asType() - private val target = codegenContext.target + private val target = coreCodegenContext.target private val codegenScope = arrayOf( "XmlWriter" to smithyXml.member("encode::XmlWriter"), @@ -76,7 +76,7 @@ class XmlBindingTraitSerializerGenerator( private val xmlSerModule = RustModule.private("xml_ser") private val xmlIndex = XmlNameIndex.of(model) - private val rootNamespace = codegenContext.serviceShape.getTrait() + private val rootNamespace = coreCodegenContext.serviceShape.getTrait() private val util = SerializerUtil(model) sealed class Ctx { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RemoveEventStreamOperations.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RemoveEventStreamOperations.kt index 5d2bc11784e..f3c16c94177 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RemoveEventStreamOperations.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RemoveEventStreamOperations.kt @@ -9,7 +9,7 @@ import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.transform.ModelTransformer -import software.amazon.smithy.rust.codegen.smithy.RustSettings +import software.amazon.smithy.rust.codegen.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.util.findStreamingMember import software.amazon.smithy.rust.codegen.util.orNull import java.util.logging.Logger @@ -19,7 +19,7 @@ import java.util.logging.Logger object RemoveEventStreamOperations { private val logger = Logger.getLogger(javaClass.name) - fun transform(model: Model, settings: RustSettings): Model { + fun transform(model: Model, settings: CoreRustSettings): Model { // If Event Stream is allowed in build config, then don't remove the operations if (settings.codegenConfig.eventStreamAllowList.contains(settings.moduleName)) { return model diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt index f1196798284..6e79b2c0cc4 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/Rust.kt @@ -21,12 +21,11 @@ import software.amazon.smithy.rust.codegen.rustlang.RustDependency import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.rustlang.raw import software.amazon.smithy.rust.codegen.rustlang.rustBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenConfig +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenConfig import software.amazon.smithy.rust.codegen.smithy.DefaultPublicModules import software.amazon.smithy.rust.codegen.smithy.MaybeRenamed import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RustCrate -import software.amazon.smithy.rust.codegen.smithy.RustSettings import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.SymbolVisitorConfig import software.amazon.smithy.rust.codegen.smithy.letIf @@ -110,7 +109,7 @@ object TestWorkspace { return TestWriterDelegator( FileManifest.create(subprojectDir.toPath()), symbolProvider, - CodegenConfig(debugMode = debugMode) + CoreCodegenConfig(debugMode = debugMode) ) } } @@ -188,7 +187,11 @@ fun RustWriter.unitTest( * * This exposes both the base directory and a list of [generatedFiles] for test purposes */ -class TestWriterDelegator(private val fileManifest: FileManifest, symbolProvider: RustSymbolProvider, val codegenConfig: CodegenConfig) : +class TestWriterDelegator( + private val fileManifest: FileManifest, + symbolProvider: RustSymbolProvider, + val codegenConfig: CoreCodegenConfig +) : RustCrate(fileManifest, symbolProvider, DefaultPublicModules, codegenConfig) { val baseDir: Path = fileManifest.baseDir @@ -233,16 +236,10 @@ fun TestWriterDelegator.compileAndTest(runClippy: Boolean = false) { } fun TestWriterDelegator.rustSettings() = - RustSettings( - ShapeId.from("fake#Fake"), - "test_${baseDir.toFile().nameWithoutExtension}", - "0.0.1", - moduleAuthors = listOf("test@module.com"), - moduleDescription = "test", - moduleRepository = null, - runtimeConfig = TestRuntimeConfig, - codegenConfig = this.codegenConfig, - license = null + testRustSettings( + service = ShapeId.from("fake#Fake"), + moduleName = "test_${baseDir.toFile().nameWithoutExtension}", + codegenConfig = this.codegenConfig ) fun String.shouldParseAsRust() { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt index 24804bc40ff..2198600376c 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/testutil/TestHelpers.kt @@ -15,12 +15,12 @@ import software.amazon.smithy.rust.codegen.rustlang.CratesIo import software.amazon.smithy.rust.codegen.rustlang.DependencyScope import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.rustlang.asType -import software.amazon.smithy.rust.codegen.smithy.CodegenConfig -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenConfig +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeCrateLocation import software.amazon.smithy.rust.codegen.smithy.RustCodegenPlugin -import software.amazon.smithy.rust.codegen.smithy.RustSettings import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.SymbolVisitorConfig import software.amazon.smithy.rust.codegen.smithy.generators.BuilderGenerator @@ -35,22 +35,23 @@ val TestRuntimeConfig = RuntimeConfig(runtimeCrateLocation = RuntimeCrateLocation.Path(File("../rust-runtime/").absolutePath)) val TestSymbolVisitorConfig = SymbolVisitorConfig( runtimeConfig = TestRuntimeConfig, - codegenConfig = CodegenConfig(), - handleRustBoxing = true + renameExceptions = true, + handleRustBoxing = true, + handleRequired = false, ) fun testRustSettings( service: ShapeId = ShapeId.from("notrelevant#notrelevant"), moduleName: String = "test-module", - moduleVersion: String = "notrelevant", + moduleVersion: String = "0.0.1", moduleAuthors: List = listOf("notrelevant"), moduleDescription: String = "not relevant", moduleRepository: String? = null, - runtimeConfig: RuntimeConfig = RuntimeConfig(), - codegenConfig: CodegenConfig = CodegenConfig(), + runtimeConfig: RuntimeConfig = TestRuntimeConfig, + codegenConfig: CoreCodegenConfig = CoreCodegenConfig(), license: String? = null, examplesUri: String? = null, -) = RustSettings( +) = CoreRustSettings( service, moduleName, moduleVersion, @@ -73,17 +74,17 @@ fun testSymbolProvider(model: Model, serviceShape: ServiceShape? = null): RustSy fun testCodegenContext( model: Model, serviceShape: ServiceShape? = null, - settings: RustSettings = testRustSettings(), - mode: CodegenTarget = CodegenTarget.CLIENT -): CodegenContext = CodegenContext( + settings: CoreRustSettings = testRustSettings(), + codegenTarget: CodegenTarget = CodegenTarget.CLIENT +): CoreCodegenContext = CoreCodegenContext( model, testSymbolProvider(model), - TestRuntimeConfig, serviceShape ?: model.serviceShapes.firstOrNull() ?: ServiceShape.builder().version("test").id("test#Service").build(), ShapeId.from("test#Protocol"), - settings, mode + settings, + codegenTarget ) private const val SmithyVersion = "1.0" diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/customizations/HttpVersionListGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/customizations/HttpVersionListGeneratorTest.kt index 5165610be59..93d91e45017 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/customizations/HttpVersionListGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/customizations/HttpVersionListGeneratorTest.kt @@ -11,12 +11,13 @@ import software.amazon.smithy.rust.codegen.rustlang.Writable import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.rustlang.writable -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.CodegenVisitor import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.customize.CombinedCodegenDecorator +import software.amazon.smithy.rust.codegen.smithy.customize.RequiredCustomizations import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.smithy.generators.config.ServiceConfig @@ -58,10 +59,11 @@ internal class HttpVersionListGeneratorTest { """.asSmithyModel() val (ctx, testDir) = generatePluginContext(model) val moduleName = ctx.settings.expectStringMember("module").value.replace('-', '_') - val testWriter = object : RustCodegenDecorator { + val testWriter = object : RustCodegenDecorator { override val name: String = "add tests" override val order: Byte = 0 - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { rustCrate.withFile("tests/validate_defaults.rs") { TokioTest.render(it) it.rust( @@ -83,7 +85,9 @@ internal class HttpVersionListGeneratorTest { } } } - val visitor = CodegenVisitor(ctx, CombinedCodegenDecorator.fromClasspath(ctx).withDecorator(testWriter)) + val combinedCodegenDecorator: CombinedCodegenDecorator = + CombinedCodegenDecorator.fromClasspath(ctx, RequiredCustomizations()).withDecorator(testWriter) + val visitor = CodegenVisitor(ctx, combinedCodegenDecorator) visitor.execute() "cargo test".runCommand(testDir) } @@ -117,10 +121,11 @@ internal class HttpVersionListGeneratorTest { """.asSmithyModel() val (ctx, testDir) = generatePluginContext(model) val moduleName = ctx.settings.expectStringMember("module").value.replace('-', '_') - val testWriter = object : RustCodegenDecorator { + val testWriter = object : RustCodegenDecorator { override val name: String = "add tests" override val order: Byte = 0 - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { rustCrate.withFile("tests/validate_http.rs") { TokioTest.render(it) it.rust( @@ -142,7 +147,10 @@ internal class HttpVersionListGeneratorTest { } } } - val visitor = CodegenVisitor(ctx, CombinedCodegenDecorator.fromClasspath(ctx).withDecorator(testWriter)) + + val combinedCodegenDecorator: CombinedCodegenDecorator = + CombinedCodegenDecorator.fromClasspath(ctx, RequiredCustomizations()).withDecorator(testWriter) + val visitor = CodegenVisitor(ctx, combinedCodegenDecorator) visitor.execute() "cargo test".runCommand(testDir) } @@ -189,18 +197,18 @@ internal class HttpVersionListGeneratorTest { val (ctx, testDir) = generatePluginContext(model, addModuleToEventStreamAllowList = true) val moduleName = ctx.settings.expectStringMember("module").value.replace('-', '_') - val codegenDecorator = object : RustCodegenDecorator { + val codegenDecorator = object : RustCodegenDecorator { override val name: String = "add tests" override val order: Byte = 0 override fun configCustomizations( - codegenContext: CodegenContext, + codegenContext: ClientCodegenContext, baseCustomizations: List ): List { return super.configCustomizations(codegenContext, baseCustomizations) + FakeSigningConfig(codegenContext.runtimeConfig) } - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { rustCrate.withFile("tests/validate_eventstream_http.rs") { TokioTest.render(it) it.rust( @@ -222,7 +230,9 @@ internal class HttpVersionListGeneratorTest { } } - val visitor = CodegenVisitor(ctx, CombinedCodegenDecorator.fromClasspath(ctx).withDecorator(codegenDecorator)) + val combinedCodegenDecorator: CombinedCodegenDecorator = + CombinedCodegenDecorator.fromClasspath(ctx, RequiredCustomizations()).withDecorator(codegenDecorator) + val visitor = CodegenVisitor(ctx, combinedCodegenDecorator) visitor.execute() "cargo test".runCommand(testDir) } diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/generators/http/ResponseBindingGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/generators/http/ResponseBindingGeneratorTest.kt index 9327bf9f2f7..54f72c43fce 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/generators/http/ResponseBindingGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/generators/http/ResponseBindingGeneratorTest.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.generators.http.ResponseBindingGenerator import software.amazon.smithy.rust.codegen.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.smithy.protocols.HttpTraitHttpBindingResolver @@ -70,7 +70,7 @@ class ResponseBindingGeneratorTest { private val model = OperationNormalizer.transform(baseModel) private val operationShape = model.expectShape(ShapeId.from("smithy.example#PutObject"), OperationShape::class.java) private val symbolProvider = testSymbolProvider(model) - private val testCodegenContext: CodegenContext = testCodegenContext(model) + private val testCoreCodegenContext: CoreCodegenContext = testCodegenContext(model) private fun RustWriter.renderOperation() { operationShape.outputShape(model).renderWithModelBuilder(model, symbolProvider, this) @@ -80,8 +80,8 @@ class ResponseBindingGeneratorTest { .filter { it.location == HttpLocation.HEADER } bindings.forEach { binding -> val runtimeType = ResponseBindingGenerator( - RestJson(testCodegenContext), - testCodegenContext, + RestJson(testCoreCodegenContext), + testCoreCodegenContext, operationShape ).generateDeserializeHeaderFn(binding) // little hack to force these functions to be generated diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/EventStreamSymbolProviderTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/EventStreamSymbolProviderTest.kt index 0a85b92d1ad..f05fcce5ad4 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/EventStreamSymbolProviderTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/EventStreamSymbolProviderTest.kt @@ -13,6 +13,7 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.rust.codegen.rustlang.RustType import software.amazon.smithy.rust.codegen.smithy.transformers.OperationNormalizer import software.amazon.smithy.rust.codegen.testutil.TestRuntimeConfig +import software.amazon.smithy.rust.codegen.testutil.TestSymbolVisitorConfig import software.amazon.smithy.rust.codegen.testutil.asSmithyModel class EventStreamSymbolProviderTest { @@ -41,7 +42,7 @@ class EventStreamSymbolProviderTest { ) val service = model.expectShape(ShapeId.from("test#TestService")) as ServiceShape - val provider = EventStreamSymbolProvider(TestRuntimeConfig, SymbolVisitor(model, service, DefaultConfig), model) + val provider = EventStreamSymbolProvider(TestRuntimeConfig, SymbolVisitor(model, service, TestSymbolVisitorConfig), model) // Look up the synthetic input/output rather than the original input/output val inputStream = model.expectShape(ShapeId.from("test.synthetic#TestOperationInput\$inputStream")) as MemberShape @@ -77,7 +78,7 @@ class EventStreamSymbolProviderTest { ) val service = model.expectShape(ShapeId.from("test#TestService")) as ServiceShape - val provider = EventStreamSymbolProvider(TestRuntimeConfig, SymbolVisitor(model, service, DefaultConfig), model) + val provider = EventStreamSymbolProvider(TestRuntimeConfig, SymbolVisitor(model, service, TestSymbolVisitorConfig), model) // Look up the synthetic input/output rather than the original input/output val inputStream = model.expectShape(ShapeId.from("test.synthetic#TestOperationInput\$inputStream")) as MemberShape diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EndpointTraitBindingsTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EndpointTraitBindingsTest.kt index bfc182ffd2e..fed4803b406 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EndpointTraitBindingsTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/EndpointTraitBindingsTest.kt @@ -13,10 +13,11 @@ import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.Visibility import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustBlock -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.CodegenVisitor import software.amazon.smithy.rust.codegen.smithy.RustCrate import software.amazon.smithy.rust.codegen.smithy.customize.CombinedCodegenDecorator +import software.amazon.smithy.rust.codegen.smithy.customize.RequiredCustomizations import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.testutil.TestRuntimeConfig import software.amazon.smithy.rust.codegen.testutil.TestWorkspace @@ -142,10 +143,11 @@ internal class EndpointTraitBindingsTest { """.asSmithyModel() val (ctx, testDir) = generatePluginContext(model) val moduleName = ctx.settings.expectStringMember("module").value.replace('-', '_') - val codegenDecorator = object : RustCodegenDecorator { + val codegenDecorator = object : RustCodegenDecorator { override val name: String = "add tests" override val order: Byte = 0 - override fun extras(codegenContext: CodegenContext, rustCrate: RustCrate) { + + override fun extras(codegenContext: ClientCodegenContext, rustCrate: RustCrate) { rustCrate.withFile("tests/validate_errors.rs") { TokioTest.render(it) it.rust( @@ -170,7 +172,9 @@ internal class EndpointTraitBindingsTest { } } } - val visitor = CodegenVisitor(ctx, CombinedCodegenDecorator.fromClasspath(ctx).withDecorator(codegenDecorator)) + val combinedCodegenDecorator: CombinedCodegenDecorator = + CombinedCodegenDecorator.fromClasspath(ctx, RequiredCustomizations()).withDecorator(codegenDecorator) + val visitor = CodegenVisitor(ctx, combinedCodegenDecorator) visitor.execute() "cargo test".runCommand(testDir) } diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGeneratorTest.kt index 1a71c170967..6ed940fd3c9 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGeneratorTest.kt @@ -16,8 +16,9 @@ import software.amazon.smithy.rust.codegen.rustlang.RustWriter import software.amazon.smithy.rust.codegen.rustlang.escape import software.amazon.smithy.rust.codegen.rustlang.rust import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.CodegenVisitor +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.error.errorSymbol @@ -43,10 +44,10 @@ private class TestProtocolPayloadGenerator(private val body: String) : ProtocolP } private class TestProtocolTraitImplGenerator( - private val codegenContext: CodegenContext, + private val coreCodegenContext: CoreCodegenContext, private val correctResponse: String ) : ProtocolTraitImplGenerator { - private val symbolProvider = codegenContext.symbolProvider + private val symbolProvider = coreCodegenContext.symbolProvider override fun generateTraitImpls(operationWriter: RustWriter, operationShape: OperationShape) { operationWriter.rustTemplate( @@ -57,8 +58,8 @@ private class TestProtocolTraitImplGenerator( ${operationWriter.escape(correctResponse)} } }""", - "parse_strict" to RuntimeType.parseStrictResponse(codegenContext.runtimeConfig), - "output" to symbolProvider.toSymbol(operationShape.outputShape(codegenContext.model)), + "parse_strict" to RuntimeType.parseStrictResponse(coreCodegenContext.runtimeConfig), + "output" to symbolProvider.toSymbol(operationShape.outputShape(coreCodegenContext.model)), "error" to operationShape.errorSymbol(symbolProvider), "response" to RuntimeType.Http("Response"), "bytes" to RuntimeType.Bytes @@ -67,12 +68,12 @@ private class TestProtocolTraitImplGenerator( } private class TestProtocolMakeOperationGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, protocol: Protocol, body: String, private val httpRequestBuilder: String ) : MakeOperationGenerator( - codegenContext, + coreCodegenContext, protocol, TestProtocolPayloadGenerator(body), public = true, @@ -86,28 +87,28 @@ private class TestProtocolMakeOperationGenerator( // A stubbed test protocol to do enable testing intentionally broken protocols private class TestProtocolGenerator( - codegenContext: CodegenContext, + coreCodegenContext: CoreCodegenContext, protocol: Protocol, httpRequestBuilder: String, body: String, correctResponse: String ) : ProtocolGenerator( - codegenContext, + coreCodegenContext, protocol, - TestProtocolMakeOperationGenerator(codegenContext, protocol, body, httpRequestBuilder), - TestProtocolTraitImplGenerator(codegenContext, correctResponse) + TestProtocolMakeOperationGenerator(coreCodegenContext, protocol, body, httpRequestBuilder), + TestProtocolTraitImplGenerator(coreCodegenContext, correctResponse) ) private class TestProtocolFactory( private val httpRequestBuilder: String, private val body: String, private val correctResponse: String -) : ProtocolGeneratorFactory { - override fun protocol(codegenContext: CodegenContext): Protocol { +) : ProtocolGeneratorFactory { + override fun protocol(codegenContext: ClientCodegenContext): Protocol { return RestJson(codegenContext) } - override fun buildProtocolGenerator(codegenContext: CodegenContext): ProtocolGenerator { + override fun buildProtocolGenerator(codegenContext: ClientCodegenContext): ProtocolGenerator { return TestProtocolGenerator( codegenContext, protocol(codegenContext), @@ -211,7 +212,7 @@ class ProtocolTestGeneratorTest { private val correctBody = """{"name": "Teddy"}""" /** - * Creates an fake HTTP implementation for SayHello & generates the protocol test + * Creates a fake HTTP implementation for SayHello & generates the protocol test * * Returns the [Path] the service was generated at, suitable for running `cargo test` */ @@ -223,13 +224,15 @@ class ProtocolTestGeneratorTest { val (pluginContext, testDir) = generatePluginContext(model) val visitor = CodegenVisitor( pluginContext, - object : RustCodegenDecorator { + object : RustCodegenDecorator { override val name: String = "mock" override val order: Byte = 0 - override fun protocols(serviceId: ShapeId, currentProtocols: ProtocolMap): ProtocolMap { + override fun protocols( + serviceId: ShapeId, + currentProtocols: ProtocolMap + ): ProtocolMap = // Intentionally replace the builtin implementation of RestJson1 with our fake protocol - return mapOf(RestJson1Trait.ID to TestProtocolFactory(httpRequestBuilder, body, correctResponse)) - } + mapOf(RestJson1Trait.ID to TestProtocolFactory(httpRequestBuilder, body, correctResponse)) } ) visitor.execute() diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/EventStreamTestTools.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/EventStreamTestTools.kt index 2088a78deb2..a099178f955 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/EventStreamTestTools.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/EventStreamTestTools.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.model.shapes.UnionShape import software.amazon.smithy.model.traits.ErrorTrait import software.amazon.smithy.rust.codegen.rustlang.RustModule import software.amazon.smithy.rust.codegen.rustlang.RustWriter -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.smithy.generators.BuilderGenerator import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget @@ -126,7 +126,7 @@ object EventStreamTestModels { val validSomeError: String, val validUnmodeledError: String, val target: CodegenTarget = CodegenTarget.CLIENT, - val protocolBuilder: (CodegenContext) -> Protocol, + val protocolBuilder: (CoreCodegenContext) -> Protocol, ) { override fun toString(): String = protocolShapeId } diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGeneratorTest.kt index 4648241e6b9..69c3d30bb2e 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/parse/EventStreamUnmarshallerGeneratorTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ArgumentsSource import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.rust.codegen.rustlang.rust -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestModels import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestTools @@ -24,10 +24,9 @@ class EventStreamUnmarshallerGeneratorTest { fun test(testCase: EventStreamTestModels.TestCase) { val test = EventStreamTestTools.generateTestProject(testCase) - val codegenContext = CodegenContext( + val codegenContext = CoreCodegenContext( test.model, test.symbolProvider, - TestRuntimeConfig, test.serviceShape, ShapeId.from(testCase.protocolShapeId), testRustSettings(), diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt index f7e2eb86097..45c3756f7e4 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt @@ -95,7 +95,7 @@ class AwsQuerySerializerGeneratorTest { true -> CodegenTarget.CLIENT false -> CodegenTarget.SERVER } - val parserGenerator = AwsQuerySerializerGenerator(testCodegenContext(model).copy(target = target)) + val parserGenerator = AwsQuerySerializerGenerator(testCodegenContext(model, codegenTarget = target)) val operationGenerator = parserGenerator.operationInputSerializer(model.lookup("test#Op")) val project = TestWorkspace.testProject(testSymbolProvider(model)) diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt index 8c5f33f9fc1..f999b5943e5 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt @@ -11,7 +11,7 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.rust.codegen.rustlang.CargoDependency import software.amazon.smithy.rust.codegen.rustlang.DependencyScope import software.amazon.smithy.rust.codegen.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.smithy.CodegenContext +import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestModels import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestTools import software.amazon.smithy.rust.codegen.testutil.TestRuntimeConfig @@ -26,10 +26,9 @@ class EventStreamMarshallerGeneratorTest { fun test(testCase: EventStreamTestModels.TestCase) { val test = EventStreamTestTools.generateTestProject(testCase) - val codegenContext = CodegenContext( + val codegenContext = CoreCodegenContext( test.model, test.symbolProvider, - TestRuntimeConfig, test.serviceShape, ShapeId.from(testCase.protocolShapeId), testRustSettings(), diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RemoveEventStreamOperationsTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RemoveEventStreamOperationsTest.kt index 27a7da800cf..18dd3181632 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RemoveEventStreamOperationsTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RemoveEventStreamOperationsTest.kt @@ -10,7 +10,7 @@ import io.kotest.matchers.shouldNotBe import org.junit.jupiter.api.Test import software.amazon.smithy.model.shapes.Shape import software.amazon.smithy.model.shapes.ShapeId -import software.amazon.smithy.rust.codegen.smithy.CodegenConfig +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenConfig import software.amazon.smithy.rust.codegen.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.testutil.testRustSettings import java.util.Optional @@ -50,7 +50,7 @@ internal class RemoveEventStreamOperationsTest { val transformed = RemoveEventStreamOperations.transform( model, testRustSettings( - codegenConfig = CodegenConfig(eventStreamAllowList = setOf("not-test-module")), + codegenConfig = ClientCodegenConfig(eventStreamAllowList = setOf("not-test-module")), ) ) transformed.expectShape(ShapeId.from("test#BlobStream")) @@ -62,7 +62,7 @@ internal class RemoveEventStreamOperationsTest { val transformed = RemoveEventStreamOperations.transform( model, testRustSettings( - codegenConfig = CodegenConfig(eventStreamAllowList = setOf("test-module")), + codegenConfig = ClientCodegenConfig(eventStreamAllowList = setOf("test-module")), ) ) transformed.expectShape(ShapeId.from("test#BlobStream")) diff --git a/rust-runtime/build.gradle.kts b/rust-runtime/build.gradle.kts index 58702756043..8c231f11086 100644 --- a/rust-runtime/build.gradle.kts +++ b/rust-runtime/build.gradle.kts @@ -66,4 +66,4 @@ publishing { } } repositories { maven { url = uri("$buildDir/repository") } } -} \ No newline at end of file +} From 9f470718f7a766d05080420000fbfaaa0589c814 Mon Sep 17 00:00:00 2001 From: david-perez Date: Wed, 22 Jun 2022 14:06:19 +0200 Subject: [PATCH 49/49] Fix server routing matching URIs with prefixes (#1484) We are incorrectly matching URIs to the spec when the URI has a prefix that is not in the spec. This is because when generating the regex describing the spec, we're not using the `^` anchor to match from the beginning of the text. Fixes #1483. --- .../src/routing/request_spec.rs | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/rust-runtime/aws-smithy-http-server/src/routing/request_spec.rs b/rust-runtime/aws-smithy-http-server/src/routing/request_spec.rs index b6f89446bf8..b30be541918 100644 --- a/rust-runtime/aws-smithy-http-server/src/routing/request_spec.rs +++ b/rust-runtime/aws-smithy-http-server/src/routing/request_spec.rs @@ -98,7 +98,7 @@ impl From<&PathSpec> for Regex { fn from(uri_path_spec: &PathSpec) -> Self { let sep = "/"; let re = if uri_path_spec.0.is_empty() { - String::from("/") + String::from(sep) } else { uri_path_spec .0 @@ -113,7 +113,7 @@ impl From<&PathSpec> for Regex { .fold(String::new(), |a, b| a + sep + b) }; - Regex::new(&format!("{}$", re)).unwrap() + Regex::new(&format!("^{}$", re)).expect("invalid `Regex` from `PathSpec`; please file a bug report under https://github.com/awslabs/smithy-rs/issues") } } @@ -250,15 +250,15 @@ mod tests { #[test] fn path_spec_into_regex() { let cases = vec![ - (PathSpec(vec![]), "/$"), - (PathSpec(vec![PathSegment::Literal(String::from("a"))]), "/a$"), + (PathSpec(vec![]), "^/$"), + (PathSpec(vec![PathSegment::Literal(String::from("a"))]), "^/a$"), ( PathSpec(vec![PathSegment::Literal(String::from("a")), PathSegment::Label]), - "/a/[^/]*$", + "^/a/[^/]*$", ), ( PathSpec(vec![PathSegment::Literal(String::from("a")), PathSegment::Greedy]), - "/a/.*$", + "^/a/.*$", ), ( PathSpec(vec![ @@ -266,7 +266,7 @@ mod tests { PathSegment::Greedy, PathSegment::Literal(String::from("suffix")), ]), - "/a/.*/suffix$", + "^/a/.*/suffix$", ), ]; @@ -276,6 +276,34 @@ mod tests { } } + #[test] + fn paths_must_match_spec_from_the_beginning_literal() { + let spec = RequestSpec::from_parts( + Method::GET, + vec![PathSegment::Literal(String::from("path"))], + Vec::new(), + ); + + let misses = vec![(Method::GET, "/beta/path"), (Method::GET, "/multiple/stages/in/path")]; + for (method, uri) in &misses { + assert_eq!(Match::No, spec.matches(&req(method, uri, None))); + } + } + + #[test] + fn paths_must_match_spec_from_the_beginning_label() { + let spec = RequestSpec::from_parts(Method::GET, vec![PathSegment::Label], Vec::new()); + + let misses = vec![ + (Method::GET, "/prefix/label"), + (Method::GET, "/label/suffix"), + (Method::GET, "/prefix/label/suffix"), + ]; + for (method, uri) in &misses { + assert_eq!(Match::No, spec.matches(&req(method, uri, None))); + } + } + #[test] fn greedy_labels_match_greedily() { let spec = RequestSpec::from_parts(