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(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//! 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.
23//!
24//! Spaces, by calling the following:
25//!   - DeleteSpace, which deletes a space.
26//!   - GetSpace, which returns information about a space.
27//!   - GetSubscription, which returns information about the Amazon Web Services account used for billing purposes and the billing plan for the space.
28//!   - ListSpaces, which retrieves a list of spaces.
29//!   - UpdateSpace, which changes one or more values for a space.
30//!
31//! Projects, by calling the following:
32//!   - CreateProject which creates a project in a specified space.
33//!   - GetProject, which returns information about a project.
34//!   - ListProjects, which retrieves a list of projects in a space.
35//!
36//! Users, by calling the following:
37//!   - GetUserDetails, which returns information about a user in Amazon CodeCatalyst.
38//!
39//! Source repositories, by calling the following:
40//!   - CreateSourceRepository, which creates an empty Git-based source repository in a specified project.
41//!   - CreateSourceRepositoryBranch, which creates a branch in a specified repository where you can work on code.
42//!   - DeleteSourceRepository, which deletes a source repository.
43//!   - GetSourceRepository, which returns information about a source repository.
44//!   - GetSourceRepositoryCloneUrls, which returns information about the URLs that can be used with a Git client to clone a source repository.
45//!   - ListSourceRepositories, which retrieves a list of source repositories in a project.
46//!   - ListSourceRepositoryBranches, which retrieves a list of branches in a source repository.
47//!
48//! Dev Environments and the Amazon Web Services Toolkits, by calling the following:
49//!   - CreateDevEnvironment, which creates a Dev Environment, where you can quickly work on the code stored in the source repositories of your project.
50//!   - DeleteDevEnvironment, which deletes a Dev Environment.
51//!   - GetDevEnvironment, which returns information about a Dev Environment.
52//!   - ListDevEnvironments, which retrieves a list of Dev Environments in a project.
53//!   - ListDevEnvironmentSessions, which retrieves a list of active Dev Environment sessions in a project.
54//!   - StartDevEnvironment, which starts a specified Dev Environment and puts it into an active state.
55//!   - StartDevEnvironmentSession, which starts a session to a specified Dev Environment.
56//!   - StopDevEnvironment, which stops a specified Dev Environment and puts it into an stopped state.
57//!   - StopDevEnvironmentSession, which stops a session for a specified Dev Environment.
58//!   - UpdateDevEnvironment, which changes one or more values for a Dev Environment.
59//!
60//! Workflows, by calling the following:
61//!   - GetWorkflow, which returns information about a workflow.
62//!   - GetWorkflowRun, which returns information about a specified run of a workflow.
63//!   - ListWorkflowRuns, which retrieves a list of runs of a specified workflow.
64//!   - ListWorkflows, which retrieves a list of workflows in a specified project.
65//!   - StartWorkflowRun, which starts a run of a specified workflow.
66//!
67//! Security, activity, and resource management in Amazon CodeCatalyst, by calling the following:
68//!   - CreateAccessToken, which creates a personal access token (PAT) for the current user.
69//!   - DeleteAccessToken, which deletes a specified personal access token (PAT).
70//!   - ListAccessTokens, which lists all personal access tokens (PATs) associated with a user.
71//!   - ListEventLogs, which retrieves a list of events that occurred during a specified time period in a space.
72//!   - VerifySession, which verifies whether the calling user has a valid Amazon CodeCatalyst login and session.
73//!
74//! ## Getting Started
75//!
76//! > Examples are available for many services and operations, check out the
77//! > [usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1).
78//!
79//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
80//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-codecatalyst` to
81//! your project, add the following to your **Cargo.toml** file:
82//!
83//! ```toml
84//! [dependencies]
85//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
86//! aws-sdk-codecatalyst = "1.86.0"
87//! tokio = { version = "1", features = ["full"] }
88//! ```
89//!
90//! Then in code, a client can be created with the following:
91//!
92//! ```rust,no_run
93//! use aws_sdk_codecatalyst as codecatalyst;
94//!
95//! #[::tokio::main]
96//! async fn main() -> Result<(), codecatalyst::Error> {
97//!     let config = aws_config::load_from_env().await;
98//!     let client = aws_sdk_codecatalyst::Client::new(&config);
99//!
100//!     // ... make some calls with the client
101//!
102//!     Ok(())
103//! }
104//! ```
105//!
106//! See the [client documentation](https://docs.rs/aws-sdk-codecatalyst/latest/aws_sdk_codecatalyst/client/struct.Client.html)
107//! for information on what calls can be made, and the inputs and outputs for each of those calls.
108//!
109//! ## Using the SDK
110//!
111//! Until the SDK is released, we will be adding information about using the SDK to the
112//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
113//! additional sections for the guide by opening an issue and describing what you are trying to do.
114//!
115//! ## Getting Help
116//!
117//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
118//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
119//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
120//! * [Usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1)
121//!
122//!
123//! # Crate Organization
124//!
125//! The entry point for most customers will be [`Client`], which exposes one method for each API
126//! offered by Amazon CodeCatalyst. The return value of each of these methods is a "fluent builder",
127//! where the different inputs for that API are added by builder-style function call chaining,
128//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
129//! either a successful output or a [`SdkError`](crate::error::SdkError).
130//!
131//! Some of these API inputs may be structs or enums to provide more complex structured information.
132//! These structs and enums live in [`types`](crate::types). There are some simpler types for
133//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
134//!
135//! All types required to configure a client via the [`Config`](crate::Config) struct live
136//! in [`config`](crate::config).
137//!
138//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
139//! is the input, output, and error type for that API, as well as builders to construct each of those.
140//!
141//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
142//! client can return. Any other error type can be converted to this `Error` type via the
143//! [`From`](std::convert::From) trait.
144//!
145//! The other modules within this crate are not required for normal usage.
146
147// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
148pub use error_meta::Error;
149
150#[doc(inline)]
151pub use config::Config;
152
153/// Client for calling Amazon CodeCatalyst.
154/// ## Constructing a `Client`
155///
156/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
157/// crate should be used to automatically resolve this config using
158/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
159/// across multiple different AWS SDK clients. This config resolution process can be customized
160/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
161/// the [builder pattern] to customize the default config.
162///
163/// In the simplest case, creating a client looks as follows:
164/// ```rust,no_run
165/// # async fn wrapper() {
166/// let config = aws_config::load_from_env().await;
167/// let client = aws_sdk_codecatalyst::Client::new(&config);
168/// # }
169/// ```
170///
171/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
172/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
173/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
174/// done as follows:
175///
176/// ```rust,no_run
177/// # async fn wrapper() {
178/// let sdk_config = ::aws_config::load_from_env().await;
179/// let config = aws_sdk_codecatalyst::config::Builder::from(&sdk_config)
180/// # /*
181///     .some_service_specific_setting("value")
182/// # */
183///     .build();
184/// # }
185/// ```
186///
187/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
188///
189/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
190/// be done once at application start-up.
191///
192/// [`Config`]: crate::Config
193/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
194/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
195/// [`aws-config` docs]: https://docs.rs/aws-config/*
196/// [`aws-config`]: https://crates.io/crates/aws-config
197/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
198/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
199/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
200/// # Using the `Client`
201///
202/// A client has a function for every operation that can be performed by the service.
203/// For example, the [`CreateAccessToken`](crate::operation::create_access_token) operation has
204/// a [`Client::create_access_token`], function which returns a builder for that operation.
205/// The fluent builder ultimately has a `send()` function that returns an async future that
206/// returns a result, as illustrated below:
207///
208/// ```rust,ignore
209/// let result = client.create_access_token()
210///     .name("example")
211///     .send()
212///     .await;
213/// ```
214///
215/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
216/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
217/// information.
218pub mod client;
219
220/// Configuration for Amazon CodeCatalyst.
221pub mod config;
222
223/// Common errors and error handling utilities.
224pub mod error;
225
226mod error_meta;
227
228/// Information about this crate.
229pub mod meta;
230
231/// All operations that this crate can perform.
232pub mod operation;
233
234/// Primitives such as `Blob` or `DateTime` used by other types.
235pub mod primitives;
236
237/// Data structures used by operation inputs/outputs.
238pub mod types;
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;