aws_sdk_ivschat/
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//! __Introduction__
23//!
24//! The Amazon IVS Chat control-plane API enables you to create and manage Amazon IVS Chat resources. You also need to integrate with the [Amazon IVS Chat Messaging API](https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/chat-messaging-api.html), to enable users to interact with chat rooms in real time.
25//!
26//! The API is an AWS regional service. For a list of supported regions and Amazon IVS Chat HTTPS service endpoints, see the Amazon IVS Chat information on the [Amazon IVS page](https://docs.aws.amazon.com/general/latest/gr/ivs.html) in the _AWS General Reference_.
27//!
28//! This document describes HTTP operations. There is a separate _messaging_ API for managing Chat resources; see the [Amazon IVS Chat Messaging API Reference](https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/chat-messaging-api.html).
29//!
30//! __Notes on terminology:__
31//!   - You create service applications using the Amazon IVS Chat API. We refer to these as _applications_.
32//!   - You create front-end client applications (browser and Android/iOS apps) using the Amazon IVS Chat Messaging API. We refer to these as _clients_.
33//!
34//! __Resources__
35//!
36//! The following resources are part of Amazon IVS Chat:
37//!   - __LoggingConfiguration__ — A configuration that allows customers to store and record sent messages in a chat room. See the Logging Configuration endpoints for more information.
38//!   - __Room__ — The central Amazon IVS Chat resource through which clients connect to and exchange chat messages. See the Room endpoints for more information.
39//!
40//! __Tagging__
41//!
42//! A _tag_ is a metadata label that you assign to an AWS resource. A tag comprises a _key_ and a _value_, both set by you. For example, you might set a tag as topic:nature to label a particular video category. See [Best practices and strategies](https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html) in _Tagging Amazon Web Services Resources and Tag Editor_ for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no service-specific constraints beyond what is documented there.
43//!
44//! Tags can help you identify and organize your AWS resources. For example, you can use the same tag for different resources to indicate that they are related. You can also use tags to manage access (see [Access Tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html)).
45//!
46//! The Amazon IVS Chat API has these tag-related operations: TagResource, UntagResource, and ListTagsForResource. The following resource supports tagging: Room.
47//!
48//! At most 50 tags can be applied to a resource.
49//!
50//! __API Access Security__
51//!
52//! Your Amazon IVS Chat applications (service applications and clients) must be authenticated and authorized to access Amazon IVS Chat resources. Note the differences between these concepts:
53//!   - _Authentication_ is about verifying identity. Requests to the Amazon IVS Chat API must be signed to verify your identity.
54//!   - _Authorization_ is about granting permissions. Your IAM roles need to have permissions for Amazon IVS Chat API requests.
55//!
56//! Users (viewers) connect to a room using secure access tokens that you create using the CreateChatToken operation through the AWS SDK. You call CreateChatToken for every user’s chat session, passing identity and authorization information about the user.
57//!
58//! __Signing API Requests__
59//!
60//! HTTP API requests must be signed with an AWS SigV4 signature using your AWS security credentials. The AWS Command Line Interface (CLI) and the AWS SDKs take care of signing the underlying API calls for you. However, if your application calls the Amazon IVS Chat HTTP API directly, it’s your responsibility to sign the requests.
61//!
62//! You generate a signature using valid AWS credentials for an IAM role that has permission to perform the requested action. For example, DeleteMessage requests must be made using an IAM role that has the ivschat:DeleteMessage permission.
63//!
64//! For more information:
65//!   - Authentication and generating signatures — See [Authenticating Requests (Amazon Web Services Signature Version 4)](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) in the _Amazon Web Services General Reference_.
66//!   - Managing Amazon IVS permissions — See [Identity and Access Management](https://docs.aws.amazon.com/ivs/latest/userguide/security-iam.html) on the Security page of the _Amazon IVS User Guide_.
67//!
68//! __Amazon Resource Names (ARNs)__
69//!
70//! ARNs uniquely identify AWS resources. An ARN is required when you need to specify a resource unambiguously across all of AWS, such as in IAM policies and API calls. For more information, see [Amazon Resource Names](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the _AWS General Reference_.
71//!
72//! ## Getting Started
73//!
74//! > Examples are available for many services and operations, check out the
75//! > [usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1).
76//!
77//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
78//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-ivschat` to
79//! your project, add the following to your **Cargo.toml** file:
80//!
81//! ```toml
82//! [dependencies]
83//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
84//! aws-sdk-ivschat = "1.91.0"
85//! tokio = { version = "1", features = ["full"] }
86//! ```
87//!
88//! Then in code, a client can be created with the following:
89//!
90//! ```rust,no_run
91//! use aws_sdk_ivschat as ivschat;
92//!
93//! #[::tokio::main]
94//! async fn main() -> Result<(), ivschat::Error> {
95//!     let config = aws_config::load_from_env().await;
96//!     let client = aws_sdk_ivschat::Client::new(&config);
97//!
98//!     // ... make some calls with the client
99//!
100//!     Ok(())
101//! }
102//! ```
103//!
104//! See the [client documentation](https://docs.rs/aws-sdk-ivschat/latest/aws_sdk_ivschat/client/struct.Client.html)
105//! for information on what calls can be made, and the inputs and outputs for each of those calls.
106//!
107//! ## Using the SDK
108//!
109//! Until the SDK is released, we will be adding information about using the SDK to the
110//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
111//! additional sections for the guide by opening an issue and describing what you are trying to do.
112//!
113//! ## Getting Help
114//!
115//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
116//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
117//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
118//! * [Usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1)
119//!
120//!
121//! # Crate Organization
122//!
123//! The entry point for most customers will be [`Client`], which exposes one method for each API
124//! offered by Amazon Interactive Video Service Chat. The return value of each of these methods is a "fluent builder",
125//! where the different inputs for that API are added by builder-style function call chaining,
126//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
127//! either a successful output or a [`SdkError`](crate::error::SdkError).
128//!
129//! Some of these API inputs may be structs or enums to provide more complex structured information.
130//! These structs and enums live in [`types`](crate::types). There are some simpler types for
131//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
132//!
133//! All types required to configure a client via the [`Config`](crate::Config) struct live
134//! in [`config`](crate::config).
135//!
136//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
137//! is the input, output, and error type for that API, as well as builders to construct each of those.
138//!
139//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
140//! client can return. Any other error type can be converted to this `Error` type via the
141//! [`From`](std::convert::From) trait.
142//!
143//! The other modules within this crate are not required for normal usage.
144
145// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
146pub use error_meta::Error;
147
148#[doc(inline)]
149pub use config::Config;
150
151/// Client for calling Amazon Interactive Video Service Chat.
152/// ## Constructing a `Client`
153///
154/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
155/// crate should be used to automatically resolve this config using
156/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
157/// across multiple different AWS SDK clients. This config resolution process can be customized
158/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
159/// the [builder pattern] to customize the default config.
160///
161/// In the simplest case, creating a client looks as follows:
162/// ```rust,no_run
163/// # async fn wrapper() {
164/// let config = aws_config::load_from_env().await;
165/// let client = aws_sdk_ivschat::Client::new(&config);
166/// # }
167/// ```
168///
169/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
170/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
171/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
172/// done as follows:
173///
174/// ```rust,no_run
175/// # async fn wrapper() {
176/// let sdk_config = ::aws_config::load_from_env().await;
177/// let config = aws_sdk_ivschat::config::Builder::from(&sdk_config)
178/// # /*
179///     .some_service_specific_setting("value")
180/// # */
181///     .build();
182/// # }
183/// ```
184///
185/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
186///
187/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
188/// be done once at application start-up.
189///
190/// [`Config`]: crate::Config
191/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
192/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
193/// [`aws-config` docs]: https://docs.rs/aws-config/*
194/// [`aws-config`]: https://crates.io/crates/aws-config
195/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
196/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
197/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
198/// # Using the `Client`
199///
200/// A client has a function for every operation that can be performed by the service.
201/// For example, the [`CreateChatToken`](crate::operation::create_chat_token) operation has
202/// a [`Client::create_chat_token`], function which returns a builder for that operation.
203/// The fluent builder ultimately has a `send()` function that returns an async future that
204/// returns a result, as illustrated below:
205///
206/// ```rust,ignore
207/// let result = client.create_chat_token()
208///     .room_identifier("example")
209///     .send()
210///     .await;
211/// ```
212///
213/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
214/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
215/// information.
216pub mod client;
217
218/// Configuration for Amazon Interactive Video Service Chat.
219pub mod config;
220
221/// Common errors and error handling utilities.
222pub mod error;
223
224mod error_meta;
225
226/// Information about this crate.
227pub mod meta;
228
229/// All operations that this crate can perform.
230pub mod operation;
231
232/// Primitives such as `Blob` or `DateTime` used by other types.
233pub mod primitives;
234
235/// Data structures used by operation inputs/outputs.
236pub mod types;
237
238pub(crate) mod protocol_serde;
239
240mod sdk_feature_tracker;
241
242mod serialization_settings;
243
244mod endpoint_lib;
245
246mod lens;
247
248mod serde_util;
249
250mod json_errors;
251
252#[doc(inline)]
253pub use client::Client;