aws_sdk_opsworks/
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 _OpsWorks Stacks API Reference_. This guide provides descriptions, syntax, and usage examples for OpsWorks Stacks actions and data types, including common parameters and error codes.
22//!
23//! OpsWorks Stacks is an application management service that provides an integrated experience for managing the complete application lifecycle. For information about OpsWorks, see the [OpsWorks](http://aws.amazon.com/opsworks/) information page.
24//!
25//! __SDKs and CLI__
26//!
27//! Use the OpsWorks Stacks API by using the Command Line Interface (CLI) or by using one of the Amazon Web Services SDKs to implement applications in your preferred language. For more information, see:
28//!   - [CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)
29//!   - [SDK for Java](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/opsworks/AWSOpsWorksClient.html)
30//!   - [SDK for .NET](https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/OpsWorks/NOpsWorks.html)
31//!   - [SDK for PHP](https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.OpsWorks.OpsWorksClient.html)
32//!   - [SDK for Ruby](http://docs.aws.amazon.com/sdkforruby/api/)
33//!   - [Amazon Web Services SDK for Node.js](http://aws.amazon.com/documentation/sdkforjavascript/)
34//!   - [SDK for Python (Boto)](http://docs.pythonboto.org/en/latest/ref/opsworks.html)
35//!
36//! __Endpoints__
37//!
38//! OpsWorks Stacks supports the following endpoints, all HTTPS. You must connect to one of the following endpoints. Stacks can only be accessed or managed within the endpoint in which they are created.
39//!   - opsworks.us-east-1.amazonaws.com
40//!   - opsworks.us-east-2.amazonaws.com
41//!   - opsworks.us-west-1.amazonaws.com
42//!   - opsworks.us-west-2.amazonaws.com
43//!   - opsworks.ca-central-1.amazonaws.com (API only; not available in the Amazon Web Services Management Console)
44//!   - opsworks.eu-west-1.amazonaws.com
45//!   - opsworks.eu-west-2.amazonaws.com
46//!   - opsworks.eu-west-3.amazonaws.com
47//!   - opsworks.eu-central-1.amazonaws.com
48//!   - opsworks.ap-northeast-1.amazonaws.com
49//!   - opsworks.ap-northeast-2.amazonaws.com
50//!   - opsworks.ap-south-1.amazonaws.com
51//!   - opsworks.ap-southeast-1.amazonaws.com
52//!   - opsworks.ap-southeast-2.amazonaws.com
53//!   - opsworks.sa-east-1.amazonaws.com
54//!
55//! __Chef Versions__
56//!
57//! When you call CreateStack, CloneStack, or UpdateStack we recommend you use the ConfigurationManager parameter to specify the Chef version. The recommended and default value for Linux stacks is currently 12. Windows stacks use Chef 12.2. For more information, see [Chef Versions](https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-chef11.html).
58//!
59//! ## Getting Started
60//!
61//! > Examples are available for many services and operations, check out the
62//! > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples).
63//!
64//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
65//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-opsworks` to
66//! your project, add the following to your **Cargo.toml** file:
67//!
68//! ```toml
69//! [dependencies]
70//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
71//! aws-sdk-opsworks = "1.82.0"
72//! tokio = { version = "1", features = ["full"] }
73//! ```
74//!
75//! Then in code, a client can be created with the following:
76//!
77//! ```rust,no_run
78//! use aws_sdk_opsworks as opsworks;
79//!
80//! #[::tokio::main]
81//! async fn main() -> Result<(), opsworks::Error> {
82//!     let config = aws_config::load_from_env().await;
83//!     let client = aws_sdk_opsworks::Client::new(&config);
84//!
85//!     // ... make some calls with the client
86//!
87//!     Ok(())
88//! }
89//! ```
90//!
91//! See the [client documentation](https://docs.rs/aws-sdk-opsworks/latest/aws_sdk_opsworks/client/struct.Client.html)
92//! for information on what calls can be made, and the inputs and outputs for each of those calls.
93//!
94//! ## Using the SDK
95//!
96//! Until the SDK is released, we will be adding information about using the SDK to the
97//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
98//! additional sections for the guide by opening an issue and describing what you are trying to do.
99//!
100//! ## Getting Help
101//!
102//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
103//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
104//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
105//! * [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples)
106//!
107//!
108//! # Crate Organization
109//!
110//! The entry point for most customers will be [`Client`], which exposes one method for each API
111//! offered by AWS OpsWorks. The return value of each of these methods is a "fluent builder",
112//! where the different inputs for that API are added by builder-style function call chaining,
113//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
114//! either a successful output or a [`SdkError`](crate::error::SdkError).
115//!
116//! Some of these API inputs may be structs or enums to provide more complex structured information.
117//! These structs and enums live in [`types`](crate::types). There are some simpler types for
118//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
119//!
120//! All types required to configure a client via the [`Config`](crate::Config) struct live
121//! in [`config`](crate::config).
122//!
123//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
124//! is the input, output, and error type for that API, as well as builders to construct each of those.
125//!
126//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
127//! client can return. Any other error type can be converted to this `Error` type via the
128//! [`From`](std::convert::From) trait.
129//!
130//! The other modules within this crate are not required for normal usage.
131
132// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
133pub use error_meta::Error;
134
135#[doc(inline)]
136pub use config::Config;
137
138/// Client for calling AWS OpsWorks.
139/// ## Constructing a `Client`
140///
141/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
142/// crate should be used to automatically resolve this config using
143/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
144/// across multiple different AWS SDK clients. This config resolution process can be customized
145/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
146/// the [builder pattern] to customize the default config.
147///
148/// In the simplest case, creating a client looks as follows:
149/// ```rust,no_run
150/// # async fn wrapper() {
151/// let config = aws_config::load_from_env().await;
152/// let client = aws_sdk_opsworks::Client::new(&config);
153/// # }
154/// ```
155///
156/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
157/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
158/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
159/// done as follows:
160///
161/// ```rust,no_run
162/// # async fn wrapper() {
163/// let sdk_config = ::aws_config::load_from_env().await;
164/// let config = aws_sdk_opsworks::config::Builder::from(&sdk_config)
165/// # /*
166///     .some_service_specific_setting("value")
167/// # */
168///     .build();
169/// # }
170/// ```
171///
172/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
173///
174/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
175/// be done once at application start-up.
176///
177/// [`Config`]: crate::Config
178/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
179/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
180/// [`aws-config` docs]: https://docs.rs/aws-config/*
181/// [`aws-config`]: https://crates.io/crates/aws-config
182/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
183/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
184/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
185/// # Using the `Client`
186///
187/// A client has a function for every operation that can be performed by the service.
188/// For example, the [`AssignInstance`](crate::operation::assign_instance) operation has
189/// a [`Client::assign_instance`], function which returns a builder for that operation.
190/// The fluent builder ultimately has a `send()` function that returns an async future that
191/// returns a result, as illustrated below:
192///
193/// ```rust,ignore
194/// let result = client.assign_instance()
195///     .instance_id("example")
196///     .send()
197///     .await;
198/// ```
199///
200/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
201/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
202/// information.
203/// # Waiters
204///
205/// This client provides `wait_until` methods behind the [`Waiters`](crate::client::Waiters) trait.
206/// To use them, simply import the trait, and then call one of the `wait_until` methods. This will
207/// return a waiter fluent builder that takes various parameters, which are documented on the builder
208/// type. Once parameters have been provided, the `wait` method can be called to initiate waiting.
209///
210/// For example, if there was a `wait_until_thing` method, it could look like:
211/// ```rust,ignore
212/// let result = client.wait_until_thing()
213///     .thing_id("someId")
214///     .wait(Duration::from_secs(120))
215///     .await;
216/// ```
217pub mod client;
218
219/// Configuration for AWS OpsWorks.
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
239pub(crate) mod protocol_serde;
240
241mod sdk_feature_tracker;
242
243mod serialization_settings;
244
245mod endpoint_lib;
246
247mod lens;
248
249/// Supporting types for waiters.
250///
251/// Note: to use waiters, import the [`Waiters`](crate::client::Waiters) trait, which adds methods prefixed with `wait_until` to the client.
252pub mod waiters;
253
254mod json_errors;
255
256mod serde_util;
257
258#[doc(inline)]
259pub use client::Client;