aws_sdk_ssm/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#![forbid(unsafe_code)]
18#![warn(missing_docs)]
19#![cfg_attr(docsrs, feature(doc_auto_cfg))]
20//! Amazon Web Services Systems Manager is the operations hub for your Amazon Web Services applications and resources and a secure end-to-end management solution for hybrid cloud environments that enables safe and secure operations at scale.
21//!
22//! This reference is intended to be used with the [Amazon Web Services Systems Manager User Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/). To get started, see [Setting up Amazon Web Services Systems Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html).
23//!
24//! __Related resources__
25//! - For information about each of the tools that comprise Systems Manager, see [Using Systems Manager tools](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-tools.html) in the _Amazon Web Services Systems Manager User Guide_.
26//! - For details about predefined runbooks for Automation, a tool in Amazon Web Services Systems Manager, see the _ [Systems Manager Automation runbook reference](https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-runbook-reference.html) _.
27//! - For information about AppConfig, a tool in Systems Manager, see the _ [AppConfig User Guide](https://docs.aws.amazon.com/appconfig/latest/userguide/) _ and the _ [AppConfig API Reference](https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/) _.
28//! - For information about Incident Manager, a tool in Systems Manager, see the _ [Systems Manager Incident Manager User Guide](https://docs.aws.amazon.com/incident-manager/latest/userguide/) _ and the _ [Systems Manager Incident Manager API Reference](https://docs.aws.amazon.com/incident-manager/latest/APIReference/) _.
29//!
30//! ## Getting Started
31//!
32//! > Examples are available for many services and operations, check out the
33//! > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples).
34//!
35//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
36//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-ssm` to
37//! your project, add the following to your **Cargo.toml** file:
38//!
39//! ```toml
40//! [dependencies]
41//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
42//! aws-sdk-ssm = "1.73.0"
43//! tokio = { version = "1", features = ["full"] }
44//! ```
45//!
46//! Then in code, a client can be created with the following:
47//!
48//! ```rust,no_run
49//! use aws_sdk_ssm as ssm;
50//!
51//! #[::tokio::main]
52//! async fn main() -> Result<(), ssm::Error> {
53//! let config = aws_config::load_from_env().await;
54//! let client = aws_sdk_ssm::Client::new(&config);
55//!
56//! // ... make some calls with the client
57//!
58//! Ok(())
59//! }
60//! ```
61//!
62//! See the [client documentation](https://docs.rs/aws-sdk-ssm/latest/aws_sdk_ssm/client/struct.Client.html)
63//! for information on what calls can be made, and the inputs and outputs for each of those calls.
64//!
65//! ## Using the SDK
66//!
67//! Until the SDK is released, we will be adding information about using the SDK to the
68//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
69//! additional sections for the guide by opening an issue and describing what you are trying to do.
70//!
71//! ## Getting Help
72//!
73//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
74//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
75//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
76//! * [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples)
77//!
78//!
79//! # Crate Organization
80//!
81//! The entry point for most customers will be [`Client`], which exposes one method for each API
82//! offered by Amazon Simple Systems Manager (SSM). The return value of each of these methods is a "fluent builder",
83//! where the different inputs for that API are added by builder-style function call chaining,
84//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
85//! either a successful output or a [`SdkError`](crate::error::SdkError).
86//!
87//! Some of these API inputs may be structs or enums to provide more complex structured information.
88//! These structs and enums live in [`types`](crate::types). There are some simpler types for
89//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
90//!
91//! All types required to configure a client via the [`Config`](crate::Config) struct live
92//! in [`config`](crate::config).
93//!
94//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
95//! is the input, output, and error type for that API, as well as builders to construct each of those.
96//!
97//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
98//! client can return. Any other error type can be converted to this `Error` type via the
99//! [`From`](std::convert::From) trait.
100//!
101//! The other modules within this crate are not required for normal usage.
102
103// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
104pub use error_meta::Error;
105
106#[doc(inline)]
107pub use config::Config;
108
109/// Client for calling Amazon Simple Systems Manager (SSM).
110/// ## Constructing a `Client`
111///
112/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
113/// crate should be used to automatically resolve this config using
114/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
115/// across multiple different AWS SDK clients. This config resolution process can be customized
116/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
117/// the [builder pattern] to customize the default config.
118///
119/// In the simplest case, creating a client looks as follows:
120/// ```rust,no_run
121/// # async fn wrapper() {
122/// let config = aws_config::load_from_env().await;
123/// let client = aws_sdk_ssm::Client::new(&config);
124/// # }
125/// ```
126///
127/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
128/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
129/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
130/// done as follows:
131///
132/// ```rust,no_run
133/// # async fn wrapper() {
134/// let sdk_config = ::aws_config::load_from_env().await;
135/// let config = aws_sdk_ssm::config::Builder::from(&sdk_config)
136/// # /*
137/// .some_service_specific_setting("value")
138/// # */
139/// .build();
140/// # }
141/// ```
142///
143/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
144///
145/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
146/// be done once at application start-up.
147///
148/// [`Config`]: crate::Config
149/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
150/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
151/// [`aws-config` docs]: https://docs.rs/aws-config/*
152/// [`aws-config`]: https://crates.io/crates/aws-config
153/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
154/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
155/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
156/// # Using the `Client`
157///
158/// A client has a function for every operation that can be performed by the service.
159/// For example, the [`AddTagsToResource`](crate::operation::add_tags_to_resource) operation has
160/// a [`Client::add_tags_to_resource`], function which returns a builder for that operation.
161/// The fluent builder ultimately has a `send()` function that returns an async future that
162/// returns a result, as illustrated below:
163///
164/// ```rust,ignore
165/// let result = client.add_tags_to_resource()
166/// .resource_type("example")
167/// .send()
168/// .await;
169/// ```
170///
171/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
172/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
173/// information.
174/// # Waiters
175///
176/// This client provides `wait_until` methods behind the [`Waiters`](crate::client::Waiters) trait.
177/// To use them, simply import the trait, and then call one of the `wait_until` methods. This will
178/// return a waiter fluent builder that takes various parameters, which are documented on the builder
179/// type. Once parameters have been provided, the `wait` method can be called to initiate waiting.
180///
181/// For example, if there was a `wait_until_thing` method, it could look like:
182/// ```rust,ignore
183/// let result = client.wait_until_thing()
184/// .thing_id("someId")
185/// .wait(Duration::from_secs(120))
186/// .await;
187/// ```
188pub mod client;
189
190/// Configuration for Amazon Simple Systems Manager (SSM).
191pub mod config;
192
193/// Common errors and error handling utilities.
194pub mod error;
195
196mod error_meta;
197
198/// Information about this crate.
199pub mod meta;
200
201/// All operations that this crate can perform.
202pub mod operation;
203
204/// Primitives such as `Blob` or `DateTime` used by other types.
205pub mod primitives;
206
207/// Data structures used by operation inputs/outputs.
208pub mod types;
209
210mod auth_plugin;
211
212pub(crate) mod client_idempotency_token;
213
214mod idempotency_token;
215
216pub(crate) mod protocol_serde;
217
218mod sdk_feature_tracker;
219
220mod serialization_settings;
221
222mod endpoint_lib;
223
224mod lens;
225
226mod serde_util;
227
228/// Supporting types for waiters.
229///
230/// Note: to use waiters, import the [`Waiters`](crate::client::Waiters) trait, which adds methods prefixed with `wait_until` to the client.
231pub mod waiters;
232
233mod json_errors;
234
235#[doc(inline)]
236pub use client::Client;