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