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