aws_sdk_codecatalyst/
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//! Welcome to the Amazon CodeCatalyst API reference. This reference provides descriptions of operations and data types for Amazon CodeCatalyst. You can use the Amazon CodeCatalyst API to work with the following objects.
21//!
22//! Spaces, by calling the following:
23//!   - DeleteSpace, which deletes a space.
24//!   - GetSpace, which returns information about a space.
25//!   - GetSubscription, which returns information about the Amazon Web Services account used for billing purposes and the billing plan for the space.
26//!   - ListSpaces, which retrieves a list of spaces.
27//!   - UpdateSpace, which changes one or more values for a space.
28//!
29//! Projects, by calling the following:
30//!   - CreateProject which creates a project in a specified space.
31//!   - GetProject, which returns information about a project.
32//!   - ListProjects, which retrieves a list of projects in a space.
33//!
34//! Users, by calling the following:
35//!   - GetUserDetails, which returns information about a user in Amazon CodeCatalyst.
36//!
37//! Source repositories, by calling the following:
38//!   - CreateSourceRepository, which creates an empty Git-based source repository in a specified project.
39//!   - CreateSourceRepositoryBranch, which creates a branch in a specified repository where you can work on code.
40//!   - DeleteSourceRepository, which deletes a source repository.
41//!   - GetSourceRepository, which returns information about a source repository.
42//!   - GetSourceRepositoryCloneUrls, which returns information about the URLs that can be used with a Git client to clone a source repository.
43//!   - ListSourceRepositories, which retrieves a list of source repositories in a project.
44//!   - ListSourceRepositoryBranches, which retrieves a list of branches in a source repository.
45//!
46//! Dev Environments and the Amazon Web Services Toolkits, by calling the following:
47//!   - CreateDevEnvironment, which creates a Dev Environment, where you can quickly work on the code stored in the source repositories of your project.
48//!   - DeleteDevEnvironment, which deletes a Dev Environment.
49//!   - GetDevEnvironment, which returns information about a Dev Environment.
50//!   - ListDevEnvironments, which retrieves a list of Dev Environments in a project.
51//!   - ListDevEnvironmentSessions, which retrieves a list of active Dev Environment sessions in a project.
52//!   - StartDevEnvironment, which starts a specified Dev Environment and puts it into an active state.
53//!   - StartDevEnvironmentSession, which starts a session to a specified Dev Environment.
54//!   - StopDevEnvironment, which stops a specified Dev Environment and puts it into an stopped state.
55//!   - StopDevEnvironmentSession, which stops a session for a specified Dev Environment.
56//!   - UpdateDevEnvironment, which changes one or more values for a Dev Environment.
57//!
58//! Workflows, by calling the following:
59//!   - GetWorkflow, which returns information about a workflow.
60//!   - GetWorkflowRun, which returns information about a specified run of a workflow.
61//!   - ListWorkflowRuns, which retrieves a list of runs of a specified workflow.
62//!   - ListWorkflows, which retrieves a list of workflows in a specified project.
63//!   - StartWorkflowRun, which starts a run of a specified workflow.
64//!
65//! Security, activity, and resource management in Amazon CodeCatalyst, by calling the following:
66//!   - CreateAccessToken, which creates a personal access token (PAT) for the current user.
67//!   - DeleteAccessToken, which deletes a specified personal access token (PAT).
68//!   - ListAccessTokens, which lists all personal access tokens (PATs) associated with a user.
69//!   - ListEventLogs, which retrieves a list of events that occurred during a specified time period in a space.
70//!   - VerifySession, which verifies whether the calling user has a valid Amazon CodeCatalyst login and session.
71//!
72//! ## Getting Started
73//!
74//! > Examples are available for many services and operations, check out the
75//! > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples).
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-codecatalyst` 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-codecatalyst = "1.68.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_codecatalyst as codecatalyst;
92//!
93//! #[::tokio::main]
94//! async fn main() -> Result<(), codecatalyst::Error> {
95//!     let config = aws_config::load_from_env().await;
96//!     let client = aws_sdk_codecatalyst::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-codecatalyst/latest/aws_sdk_codecatalyst/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/awslabs/aws-sdk-rust/tree/main/examples)
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 CodeCatalyst. 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 CodeCatalyst.
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_codecatalyst::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_codecatalyst::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 [`CreateAccessToken`](crate::operation::create_access_token) operation has
202/// a [`Client::create_access_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_access_token()
208///     .name("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 CodeCatalyst.
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
238mod auth_plugin;
239
240pub(crate) mod client_idempotency_token;
241
242mod idempotency_token;
243
244pub(crate) mod protocol_serde;
245
246mod sdk_feature_tracker;
247
248mod serialization_settings;
249
250mod endpoint_lib;
251
252mod lens;
253
254mod serde_util;
255
256mod json_errors;
257
258#[doc(inline)]
259pub use client::Client;