aws_sdk_connect/
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 Connect actions](https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Service.html)
23//!   - [Amazon Connect data types](https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Service.html)
24//!
25//! Amazon Connect is a cloud-based contact center solution that you use to set up and manage a customer contact center and provide reliable customer engagement at any scale.
26//!
27//! Amazon Connect provides metrics and real-time reporting that enable you to optimize contact routing. You can also resolve customer issues more efficiently by getting customers in touch with the appropriate agents.
28//!
29//! There are limits to the number of Amazon Connect resources that you can create. There are also limits to the number of requests that you can make per second. For more information, see [Amazon Connect Service Quotas](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html) in the _Amazon Connect Administrator Guide_.
30//!
31//! You can use an endpoint to connect programmatically to an Amazon Web Services service. For a list of Amazon Connect endpoints, see [Amazon Connect Endpoints](https://docs.aws.amazon.com/general/latest/gr/connect_region.html).
32//!
33//! ## Getting Started
34//!
35//! > Examples are available for many services and operations, check out the
36//! > [usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1).
37//!
38//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
39//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-connect` to
40//! your project, add the following to your **Cargo.toml** file:
41//!
42//! ```toml
43//! [dependencies]
44//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
45//! aws-sdk-connect = "1.132.0"
46//! tokio = { version = "1", features = ["full"] }
47//! ```
48//!
49//! Then in code, a client can be created with the following:
50//!
51//! ```rust,no_run
52//! use aws_sdk_connect as connect;
53//!
54//! #[::tokio::main]
55//! async fn main() -> Result<(), connect::Error> {
56//!     let config = aws_config::load_from_env().await;
57//!     let client = aws_sdk_connect::Client::new(&config);
58//!
59//!     // ... make some calls with the client
60//!
61//!     Ok(())
62//! }
63//! ```
64//!
65//! See the [client documentation](https://docs.rs/aws-sdk-connect/latest/aws_sdk_connect/client/struct.Client.html)
66//! for information on what calls can be made, and the inputs and outputs for each of those calls.
67//!
68//! ## Using the SDK
69//!
70//! Until the SDK is released, we will be adding information about using the SDK to the
71//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
72//! additional sections for the guide by opening an issue and describing what you are trying to do.
73//!
74//! ## Getting Help
75//!
76//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
77//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
78//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
79//! * [Usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1)
80//!
81//!
82//! # Crate Organization
83//!
84//! The entry point for most customers will be [`Client`], which exposes one method for each API
85//! offered by Amazon Connect Service. The return value of each of these methods is a "fluent builder",
86//! where the different inputs for that API are added by builder-style function call chaining,
87//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
88//! either a successful output or a [`SdkError`](crate::error::SdkError).
89//!
90//! Some of these API inputs may be structs or enums to provide more complex structured information.
91//! These structs and enums live in [`types`](crate::types). There are some simpler types for
92//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
93//!
94//! All types required to configure a client via the [`Config`](crate::Config) struct live
95//! in [`config`](crate::config).
96//!
97//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
98//! is the input, output, and error type for that API, as well as builders to construct each of those.
99//!
100//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
101//! client can return. Any other error type can be converted to this `Error` type via the
102//! [`From`](std::convert::From) trait.
103//!
104//! The other modules within this crate are not required for normal usage.
105
106// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
107pub use error_meta::Error;
108
109#[doc(inline)]
110pub use config::Config;
111
112/// Client for calling Amazon Connect Service.
113/// ## Constructing a `Client`
114///
115/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
116/// crate should be used to automatically resolve this config using
117/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
118/// across multiple different AWS SDK clients. This config resolution process can be customized
119/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
120/// the [builder pattern] to customize the default config.
121///
122/// In the simplest case, creating a client looks as follows:
123/// ```rust,no_run
124/// # async fn wrapper() {
125/// let config = aws_config::load_from_env().await;
126/// let client = aws_sdk_connect::Client::new(&config);
127/// # }
128/// ```
129///
130/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
131/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
132/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
133/// done as follows:
134///
135/// ```rust,no_run
136/// # async fn wrapper() {
137/// let sdk_config = ::aws_config::load_from_env().await;
138/// let config = aws_sdk_connect::config::Builder::from(&sdk_config)
139/// # /*
140///     .some_service_specific_setting("value")
141/// # */
142///     .build();
143/// # }
144/// ```
145///
146/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
147///
148/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
149/// be done once at application start-up.
150///
151/// [`Config`]: crate::Config
152/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
153/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
154/// [`aws-config` docs]: https://docs.rs/aws-config/*
155/// [`aws-config`]: https://crates.io/crates/aws-config
156/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
157/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
158/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
159/// # Using the `Client`
160///
161/// A client has a function for every operation that can be performed by the service.
162/// For example, the [`ActivateEvaluationForm`](crate::operation::activate_evaluation_form) operation has
163/// a [`Client::activate_evaluation_form`], function which returns a builder for that operation.
164/// The fluent builder ultimately has a `send()` function that returns an async future that
165/// returns a result, as illustrated below:
166///
167/// ```rust,ignore
168/// let result = client.activate_evaluation_form()
169///     .instance_id("example")
170///     .send()
171///     .await;
172/// ```
173///
174/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
175/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
176/// information.
177pub mod client;
178
179/// Configuration for Amazon Connect Service.
180pub mod config;
181
182/// Common errors and error handling utilities.
183pub mod error;
184
185mod error_meta;
186
187/// Information about this crate.
188pub mod meta;
189
190/// All operations that this crate can perform.
191pub mod operation;
192
193/// Primitives such as `Blob` or `DateTime` used by other types.
194pub mod primitives;
195
196/// Data structures used by operation inputs/outputs.
197pub mod types;
198
199pub(crate) mod client_idempotency_token;
200
201mod idempotency_token;
202
203pub(crate) mod protocol_serde;
204
205mod sdk_feature_tracker;
206
207mod serialization_settings;
208
209mod endpoint_lib;
210
211mod lens;
212
213mod serde_util;
214
215mod json_errors;
216
217#[doc(inline)]
218pub use client::Client;