Skip to main content

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