aws_sdk_keyspacesstreams/
lib.rs

1#![allow(deprecated)]
2#![allow(unknown_lints)]
3#![allow(clippy::module_inception)]
4#![allow(clippy::upper_case_acronyms)]
5#![allow(clippy::large_enum_variant)]
6#![allow(clippy::wrong_self_convention)]
7#![allow(clippy::should_implement_trait)]
8#![allow(clippy::disallowed_names)]
9#![allow(clippy::vec_init_then_push)]
10#![allow(clippy::type_complexity)]
11#![allow(clippy::needless_return)]
12#![allow(clippy::derive_partial_eq_without_eq)]
13#![allow(clippy::result_large_err)]
14#![allow(clippy::unnecessary_map_on_constructor)]
15#![allow(clippy::deprecated_semver)]
16#![allow(rustdoc::bare_urls)]
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::invalid_html_tags)]
19#![forbid(unsafe_code)]
20#![warn(missing_docs)]
21#![cfg_attr(docsrs, feature(doc_cfg))]
22//! Amazon Keyspaces (for Apache Cassandra) change data capture (CDC) records change events for Amazon Keyspaces tables. The change events captured in a stream are time-ordered and de-duplicated write operations. Using stream data you can build event driven applications that incorporate near-real time change events from Amazon Keyspaces tables.
23//!
24//! Amazon Keyspaces CDC is serverless and scales the infrastructure for change events automatically based on the volume of changes on your table.
25//!
26//! This API reference describes the Amazon Keyspaces CDC stream API in detail.
27//!
28//! For more information about Amazon Keyspaces CDC, see [Working with change data capture (CDC) streams in Amazon Keyspaces](https://docs.aws.amazon.com/keyspaces/latest/devguide/cdc.html) in the _Amazon Keyspaces Developer Guide_.
29//!
30//! To learn how Amazon Keyspaces CDC API actions are recorded with CloudTrail, see [Amazon Keyspaces information in CloudTrail](https://docs.aws.amazon.com/keyspaces/latest/devguide/logging-using-cloudtrail.html#service-name-info-in-cloudtrail) in the _Amazon Keyspaces Developer Guide_.
31//!
32//! To see the metrics Amazon Keyspaces CDC sends to Amazon CloudWatch, see [Amazon Keyspaces change data capture (CDC) CloudWatch metrics](https://docs.aws.amazon.com/keyspaces/latest/devguide/metrics-dimensions.html#keyspaces-cdc-metrics) in the _Amazon Keyspaces Developer Guide_.
33//!
34//! ## Getting Started
35//!
36//! > Examples are available for many services and operations, check out the
37//! > [usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1).
38//!
39//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
40//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-keyspacesstreams` to
41//! your project, add the following to your **Cargo.toml** file:
42//!
43//! ```toml
44//! [dependencies]
45//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
46//! aws-sdk-keyspacesstreams = "1.13.0"
47//! tokio = { version = "1", features = ["full"] }
48//! ```
49//!
50//! Then in code, a client can be created with the following:
51//!
52//! ```rust,no_run
53//! use aws_sdk_keyspacesstreams as keyspacesstreams;
54//!
55//! #[::tokio::main]
56//! async fn main() -> Result<(), keyspacesstreams::Error> {
57//!     let config = aws_config::load_from_env().await;
58//!     let client = aws_sdk_keyspacesstreams::Client::new(&config);
59//!
60//!     // ... make some calls with the client
61//!
62//!     Ok(())
63//! }
64//! ```
65//!
66//! See the [client documentation](https://docs.rs/aws-sdk-keyspacesstreams/latest/aws_sdk_keyspacesstreams/client/struct.Client.html)
67//! for information on what calls can be made, and the inputs and outputs for each of those calls.
68//!
69//! ## Using the SDK
70//!
71//! Until the SDK is released, we will be adding information about using the SDK to the
72//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
73//! additional sections for the guide by opening an issue and describing what you are trying to do.
74//!
75//! ## Getting Help
76//!
77//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
78//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
79//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
80//! * [Usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1)
81//!
82//!
83//! # Crate Organization
84//!
85//! The entry point for most customers will be [`Client`], which exposes one method for each API
86//! offered by Amazon Keyspaces Streams. The return value of each of these methods is a "fluent builder",
87//! where the different inputs for that API are added by builder-style function call chaining,
88//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
89//! either a successful output or a [`SdkError`](crate::error::SdkError).
90//!
91//! Some of these API inputs may be structs or enums to provide more complex structured information.
92//! These structs and enums live in [`types`](crate::types). There are some simpler types for
93//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
94//!
95//! All types required to configure a client via the [`Config`](crate::Config) struct live
96//! in [`config`](crate::config).
97//!
98//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
99//! is the input, output, and error type for that API, as well as builders to construct each of those.
100//!
101//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
102//! client can return. Any other error type can be converted to this `Error` type via the
103//! [`From`](std::convert::From) trait.
104//!
105//! The other modules within this crate are not required for normal usage.
106
107// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
108pub use error_meta::Error;
109
110#[doc(inline)]
111pub use config::Config;
112
113/// Client for calling Amazon Keyspaces Streams.
114/// ## Constructing a `Client`
115///
116/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
117/// crate should be used to automatically resolve this config using
118/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
119/// across multiple different AWS SDK clients. This config resolution process can be customized
120/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
121/// the [builder pattern] to customize the default config.
122///
123/// In the simplest case, creating a client looks as follows:
124/// ```rust,no_run
125/// # async fn wrapper() {
126/// let config = aws_config::load_from_env().await;
127/// let client = aws_sdk_keyspacesstreams::Client::new(&config);
128/// # }
129/// ```
130///
131/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
132/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
133/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
134/// done as follows:
135///
136/// ```rust,no_run
137/// # async fn wrapper() {
138/// let sdk_config = ::aws_config::load_from_env().await;
139/// let config = aws_sdk_keyspacesstreams::config::Builder::from(&sdk_config)
140/// # /*
141///     .some_service_specific_setting("value")
142/// # */
143///     .build();
144/// # }
145/// ```
146///
147/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
148///
149/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
150/// be done once at application start-up.
151///
152/// [`Config`]: crate::Config
153/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
154/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
155/// [`aws-config` docs]: https://docs.rs/aws-config/*
156/// [`aws-config`]: https://crates.io/crates/aws-config
157/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
158/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
159/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
160/// # Using the `Client`
161///
162/// A client has a function for every operation that can be performed by the service.
163/// For example, the [`GetRecords`](crate::operation::get_records) operation has
164/// a [`Client::get_records`], function which returns a builder for that operation.
165/// The fluent builder ultimately has a `send()` function that returns an async future that
166/// returns a result, as illustrated below:
167///
168/// ```rust,ignore
169/// let result = client.get_records()
170///     .shard_iterator("example")
171///     .send()
172///     .await;
173/// ```
174///
175/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
176/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
177/// information.
178pub mod client;
179
180/// Configuration for Amazon Keyspaces Streams.
181pub mod config;
182
183/// Common errors and error handling utilities.
184pub mod error;
185
186mod error_meta;
187
188/// Information about this crate.
189pub mod meta;
190
191/// All operations that this crate can perform.
192pub mod operation;
193
194/// Primitives such as `Blob` or `DateTime` used by other types.
195pub mod primitives;
196
197/// Data structures used by operation inputs/outputs.
198pub mod types;
199
200pub(crate) mod protocol_serde;
201
202mod sdk_feature_tracker;
203
204mod serialization_settings;
205
206mod endpoint_lib;
207
208mod lens;
209
210mod serde_util;
211
212mod json_errors;
213
214#[doc(inline)]
215pub use client::Client;