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