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