aws_sdk_codepipeline/
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//! __Overview__
22//!
23//! This is the CodePipeline API Reference. This guide provides descriptions of the actions and data types for CodePipeline. Some functionality for your pipeline can only be configured through the API. For more information, see the [CodePipeline User Guide](https://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html).
24//!
25//! You can use the CodePipeline API to work with pipelines, stages, actions, and transitions.
26//!
27//! _Pipelines_ are models of automated release processes. Each pipeline is uniquely named, and consists of stages, actions, and transitions.
28//!
29//! You can work with pipelines by calling:
30//!   - CreatePipeline, which creates a uniquely named pipeline.
31//!   - DeletePipeline, which deletes the specified pipeline.
32//!   - GetPipeline, which returns information about the pipeline structure and pipeline metadata, including the pipeline Amazon Resource Name (ARN).
33//!   - GetPipelineExecution, which returns information about a specific execution of a pipeline.
34//!   - GetPipelineState, which returns information about the current state of the stages and actions of a pipeline.
35//!   - ListActionExecutions, which returns action-level details for past executions. The details include full stage and action-level details, including individual action duration, status, any errors that occurred during the execution, and input and output artifact location details.
36//!   - ListPipelines, which gets a summary of all of the pipelines associated with your account.
37//!   - ListPipelineExecutions, which gets a summary of the most recent executions for a pipeline.
38//!   - StartPipelineExecution, which runs the most recent revision of an artifact through the pipeline.
39//!   - StopPipelineExecution, which stops the specified pipeline execution from continuing through the pipeline.
40//!   - UpdatePipeline, which updates a pipeline with edits or changes to the structure of the pipeline.
41//!
42//! Pipelines include _stages_. Each stage contains one or more actions that must complete before the next stage begins. A stage results in success or failure. If a stage fails, the pipeline stops at that stage and remains stopped until either a new version of an artifact appears in the source location, or a user takes action to rerun the most recent artifact through the pipeline. You can call GetPipelineState, which displays the status of a pipeline, including the status of stages in the pipeline, or GetPipeline, which returns the entire structure of the pipeline, including the stages of that pipeline. For more information about the structure of stages and actions, see [CodePipeline Pipeline Structure Reference](https://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-structure.html).
43//!
44//! Pipeline stages include _actions_ that are categorized into categories such as source or build actions performed in a stage of a pipeline. For example, you can use a source action to import artifacts into a pipeline from a source such as Amazon S3. Like stages, you do not work with actions directly in most cases, but you do define and interact with actions when working with pipeline operations such as CreatePipeline and GetPipelineState. Valid action categories are:
45//!   - Source
46//!   - Build
47//!   - Test
48//!   - Deploy
49//!   - Approval
50//!   - Invoke
51//!   - Compute
52//!
53//! Pipelines also include _transitions_, which allow the transition of artifacts from one stage to the next in a pipeline after the actions in one stage complete.
54//!
55//! You can work with transitions by calling:
56//!   - DisableStageTransition, which prevents artifacts from transitioning to the next stage in a pipeline.
57//!   - EnableStageTransition, which enables transition of artifacts between stages in a pipeline.
58//!
59//! __Using the API to integrate with CodePipeline__
60//!
61//! For third-party integrators or developers who want to create their own integrations with CodePipeline, the expected sequence varies from the standard API user. To integrate with CodePipeline, developers need to work with the following items:
62//!
63//! __Jobs__, which are instances of an action. For example, a job for a source action might import a revision of an artifact from a source.
64//!
65//! You can work with jobs by calling:
66//!   - AcknowledgeJob, which confirms whether a job worker has received the specified job.
67//!   - GetJobDetails, which returns the details of a job.
68//!   - PollForJobs, which determines whether there are any jobs to act on.
69//!   - PutJobFailureResult, which provides details of a job failure.
70//!   - PutJobSuccessResult, which provides details of a job success.
71//!
72//! __Third party jobs__, which are instances of an action created by a partner action and integrated into CodePipeline. Partner actions are created by members of the Amazon Web Services Partner Network.
73//!
74//! You can work with third party jobs by calling:
75//!   - AcknowledgeThirdPartyJob, which confirms whether a job worker has received the specified job.
76//!   - GetThirdPartyJobDetails, which requests the details of a job for a partner action.
77//!   - PollForThirdPartyJobs, which determines whether there are any jobs to act on.
78//!   - PutThirdPartyJobFailureResult, which provides details of a job failure.
79//!   - PutThirdPartyJobSuccessResult, which provides details of a job success.
80//!
81//! ## Getting Started
82//!
83//! > Examples are available for many services and operations, check out the
84//! > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples).
85//!
86//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
87//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-codepipeline` to
88//! your project, add the following to your **Cargo.toml** file:
89//!
90//! ```toml
91//! [dependencies]
92//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
93//! aws-sdk-codepipeline = "1.80.0"
94//! tokio = { version = "1", features = ["full"] }
95//! ```
96//!
97//! Then in code, a client can be created with the following:
98//!
99//! ```rust,no_run
100//! use aws_sdk_codepipeline as codepipeline;
101//!
102//! #[::tokio::main]
103//! async fn main() -> Result<(), codepipeline::Error> {
104//!     let config = aws_config::load_from_env().await;
105//!     let client = aws_sdk_codepipeline::Client::new(&config);
106//!
107//!     // ... make some calls with the client
108//!
109//!     Ok(())
110//! }
111//! ```
112//!
113//! See the [client documentation](https://docs.rs/aws-sdk-codepipeline/latest/aws_sdk_codepipeline/client/struct.Client.html)
114//! for information on what calls can be made, and the inputs and outputs for each of those calls.
115//!
116//! ## Using the SDK
117//!
118//! Until the SDK is released, we will be adding information about using the SDK to the
119//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
120//! additional sections for the guide by opening an issue and describing what you are trying to do.
121//!
122//! ## Getting Help
123//!
124//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
125//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
126//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
127//! * [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples)
128//!
129//!
130//! # Crate Organization
131//!
132//! The entry point for most customers will be [`Client`], which exposes one method for each API
133//! offered by AWS CodePipeline. The return value of each of these methods is a "fluent builder",
134//! where the different inputs for that API are added by builder-style function call chaining,
135//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
136//! either a successful output or a [`SdkError`](crate::error::SdkError).
137//!
138//! Some of these API inputs may be structs or enums to provide more complex structured information.
139//! These structs and enums live in [`types`](crate::types). There are some simpler types for
140//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
141//!
142//! All types required to configure a client via the [`Config`](crate::Config) struct live
143//! in [`config`](crate::config).
144//!
145//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
146//! is the input, output, and error type for that API, as well as builders to construct each of those.
147//!
148//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
149//! client can return. Any other error type can be converted to this `Error` type via the
150//! [`From`](std::convert::From) trait.
151//!
152//! The other modules within this crate are not required for normal usage.
153
154// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
155pub use error_meta::Error;
156
157#[doc(inline)]
158pub use config::Config;
159
160/// Client for calling AWS CodePipeline.
161/// ## Constructing a `Client`
162///
163/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
164/// crate should be used to automatically resolve this config using
165/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
166/// across multiple different AWS SDK clients. This config resolution process can be customized
167/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
168/// the [builder pattern] to customize the default config.
169///
170/// In the simplest case, creating a client looks as follows:
171/// ```rust,no_run
172/// # async fn wrapper() {
173/// let config = aws_config::load_from_env().await;
174/// let client = aws_sdk_codepipeline::Client::new(&config);
175/// # }
176/// ```
177///
178/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
179/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
180/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
181/// done as follows:
182///
183/// ```rust,no_run
184/// # async fn wrapper() {
185/// let sdk_config = ::aws_config::load_from_env().await;
186/// let config = aws_sdk_codepipeline::config::Builder::from(&sdk_config)
187/// # /*
188///     .some_service_specific_setting("value")
189/// # */
190///     .build();
191/// # }
192/// ```
193///
194/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
195///
196/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
197/// be done once at application start-up.
198///
199/// [`Config`]: crate::Config
200/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
201/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
202/// [`aws-config` docs]: https://docs.rs/aws-config/*
203/// [`aws-config`]: https://crates.io/crates/aws-config
204/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
205/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
206/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
207/// # Using the `Client`
208///
209/// A client has a function for every operation that can be performed by the service.
210/// For example, the [`AcknowledgeJob`](crate::operation::acknowledge_job) operation has
211/// a [`Client::acknowledge_job`], function which returns a builder for that operation.
212/// The fluent builder ultimately has a `send()` function that returns an async future that
213/// returns a result, as illustrated below:
214///
215/// ```rust,ignore
216/// let result = client.acknowledge_job()
217///     .job_id("example")
218///     .send()
219///     .await;
220/// ```
221///
222/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
223/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
224/// information.
225pub mod client;
226
227/// Configuration for AWS CodePipeline.
228pub mod config;
229
230/// Common errors and error handling utilities.
231pub mod error;
232
233mod error_meta;
234
235/// Information about this crate.
236pub mod meta;
237
238/// All operations that this crate can perform.
239pub mod operation;
240
241/// Primitives such as `Blob` or `DateTime` used by other types.
242pub mod primitives;
243
244/// Data structures used by operation inputs/outputs.
245pub mod types;
246
247mod auth_plugin;
248
249pub(crate) mod client_idempotency_token;
250
251mod idempotency_token;
252
253pub(crate) mod protocol_serde;
254
255mod sdk_feature_tracker;
256
257mod serialization_settings;
258
259mod endpoint_lib;
260
261mod lens;
262
263mod serde_util;
264
265mod json_errors;
266
267#[doc(inline)]
268pub use client::Client;