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(rustdoc::bare_urls)]
16#![allow(rustdoc::redundant_explicit_links)]
17#![allow(rustdoc::invalid_html_tags)]
18#![forbid(unsafe_code)]
19#![warn(missing_docs)]
20#![cfg_attr(docsrs, feature(doc_auto_cfg))]
21//! __Introduction__
22//!
23//! 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.
24//!
25//! 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_.
26//!
27//! 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).
28//!
29//! __Notes on terminology:__
30//! - You create service applications using the Amazon IVS Chat API. We refer to these as _applications_.
31//! - You create front-end client applications (browser and Android/iOS apps) using the Amazon IVS Chat Messaging API. We refer to these as _clients_.
32//!
33//! __Resources__
34//!
35//! The following resources are part of Amazon IVS Chat:
36//! - __LoggingConfiguration__ — A configuration that allows customers to store and record sent messages in a chat room. See the Logging Configuration endpoints for more information.
37//! - __Room__ — The central Amazon IVS Chat resource through which clients connect to and exchange chat messages. See the Room endpoints for more information.
38//!
39//! __Tagging__
40//!
41//! 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.
42//!
43//! 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)).
44//!
45//! The Amazon IVS Chat API has these tag-related operations: TagResource, UntagResource, and ListTagsForResource. The following resource supports tagging: Room.
46//!
47//! At most 50 tags can be applied to a resource.
48//!
49//! __API Access Security__
50//!
51//! 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:
52//! - _Authentication_ is about verifying identity. Requests to the Amazon IVS Chat API must be signed to verify your identity.
53//! - _Authorization_ is about granting permissions. Your IAM roles need to have permissions for Amazon IVS Chat API requests.
54//!
55//! 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.
56//!
57//! __Signing API Requests__
58//!
59//! 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.
60//!
61//! 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.
62//!
63//! For more information:
64//! - 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_.
65//! - 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_.
66//!
67//! __Amazon Resource Names (ARNs)__
68//!
69//! 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_.
70//!
71//! ## Getting Started
72//!
73//! > Examples are available for many services and operations, check out the
74//! > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples).
75//!
76//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
77//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-ivschat` to
78//! your project, add the following to your **Cargo.toml** file:
79//!
80//! ```toml
81//! [dependencies]
82//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
83//! aws-sdk-ivschat = "1.85.0"
84//! tokio = { version = "1", features = ["full"] }
85//! ```
86//!
87//! Then in code, a client can be created with the following:
88//!
89//! ```rust,no_run
90//! use aws_sdk_ivschat as ivschat;
91//!
92//! #[::tokio::main]
93//! async fn main() -> Result<(), ivschat::Error> {
94//! let config = aws_config::load_from_env().await;
95//! let client = aws_sdk_ivschat::Client::new(&config);
96//!
97//! // ... make some calls with the client
98//!
99//! Ok(())
100//! }
101//! ```
102//!
103//! See the [client documentation](https://docs.rs/aws-sdk-ivschat/latest/aws_sdk_ivschat/client/struct.Client.html)
104//! for information on what calls can be made, and the inputs and outputs for each of those calls.
105//!
106//! ## Using the SDK
107//!
108//! Until the SDK is released, we will be adding information about using the SDK to the
109//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
110//! additional sections for the guide by opening an issue and describing what you are trying to do.
111//!
112//! ## Getting Help
113//!
114//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
115//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
116//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
117//! * [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples)
118//!
119//!
120//! # Crate Organization
121//!
122//! The entry point for most customers will be [`Client`], which exposes one method for each API
123//! offered by Amazon Interactive Video Service Chat. The return value of each of these methods is a "fluent builder",
124//! where the different inputs for that API are added by builder-style function call chaining,
125//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
126//! either a successful output or a [`SdkError`](crate::error::SdkError).
127//!
128//! Some of these API inputs may be structs or enums to provide more complex structured information.
129//! These structs and enums live in [`types`](crate::types). There are some simpler types for
130//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
131//!
132//! All types required to configure a client via the [`Config`](crate::Config) struct live
133//! in [`config`](crate::config).
134//!
135//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
136//! is the input, output, and error type for that API, as well as builders to construct each of those.
137//!
138//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
139//! client can return. Any other error type can be converted to this `Error` type via the
140//! [`From`](std::convert::From) trait.
141//!
142//! The other modules within this crate are not required for normal usage.
143
144// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
145pub use error_meta::Error;
146
147#[doc(inline)]
148pub use config::Config;
149
150/// Client for calling Amazon Interactive Video Service Chat.
151/// ## Constructing a `Client`
152///
153/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
154/// crate should be used to automatically resolve this config using
155/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
156/// across multiple different AWS SDK clients. This config resolution process can be customized
157/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
158/// the [builder pattern] to customize the default config.
159///
160/// In the simplest case, creating a client looks as follows:
161/// ```rust,no_run
162/// # async fn wrapper() {
163/// let config = aws_config::load_from_env().await;
164/// let client = aws_sdk_ivschat::Client::new(&config);
165/// # }
166/// ```
167///
168/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
169/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
170/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
171/// done as follows:
172///
173/// ```rust,no_run
174/// # async fn wrapper() {
175/// let sdk_config = ::aws_config::load_from_env().await;
176/// let config = aws_sdk_ivschat::config::Builder::from(&sdk_config)
177/// # /*
178/// .some_service_specific_setting("value")
179/// # */
180/// .build();
181/// # }
182/// ```
183///
184/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
185///
186/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
187/// be done once at application start-up.
188///
189/// [`Config`]: crate::Config
190/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
191/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
192/// [`aws-config` docs]: https://docs.rs/aws-config/*
193/// [`aws-config`]: https://crates.io/crates/aws-config
194/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
195/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
196/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
197/// # Using the `Client`
198///
199/// A client has a function for every operation that can be performed by the service.
200/// For example, the [`CreateChatToken`](crate::operation::create_chat_token) operation has
201/// a [`Client::create_chat_token`], function which returns a builder for that operation.
202/// The fluent builder ultimately has a `send()` function that returns an async future that
203/// returns a result, as illustrated below:
204///
205/// ```rust,ignore
206/// let result = client.create_chat_token()
207/// .room_identifier("example")
208/// .send()
209/// .await;
210/// ```
211///
212/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
213/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
214/// information.
215pub mod client;
216
217/// Configuration for Amazon Interactive Video Service Chat.
218pub mod config;
219
220/// Common errors and error handling utilities.
221pub mod error;
222
223mod error_meta;
224
225/// Information about this crate.
226pub mod meta;
227
228/// All operations that this crate can perform.
229pub mod operation;
230
231/// Primitives such as `Blob` or `DateTime` used by other types.
232pub mod primitives;
233
234/// Data structures used by operation inputs/outputs.
235pub mod types;
236
237pub(crate) mod protocol_serde;
238
239mod sdk_feature_tracker;
240
241mod serialization_settings;
242
243mod endpoint_lib;
244
245mod lens;
246
247mod serde_util;
248
249mod json_errors;
250
251#[doc(inline)]
252pub use client::Client;