aws_sdk_invoicing/
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//! __Amazon Web Services Invoice Configuration__
23//!
24//! You can use Amazon Web Services Invoice Configuration APIs to programmatically create, update, delete, get, and list invoice units. You can also programmatically fetch the information of the invoice receiver. For example, business legal name, address, and invoicing contacts.
25//!
26//! You can use Amazon Web Services Invoice Configuration to receive separate Amazon Web Services invoices based your organizational needs. By using Amazon Web Services Invoice Configuration, you can configure invoice units that are groups of Amazon Web Services accounts that represent your business entities, and receive separate invoices for each business entity. You can also assign a unique member or payer account as the invoice receiver for each invoice unit. As you create new accounts within your Organizations using Amazon Web Services Invoice Configuration APIs, you can automate the creation of new invoice units and subsequently automate the addition of new accounts to your invoice units.
27//!
28//! Service endpoint
29//!
30//! You can use the following endpoints for Amazon Web Services Invoice Configuration:
31//!   - https://invoicing.us-east-1.api.aws
32//!
33//! ## Getting Started
34//!
35//! > Examples are available for many services and operations, check out the
36//! > [usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1).
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-invoicing` 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-invoicing = "1.37.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_invoicing as invoicing;
53//!
54//! #[::tokio::main]
55//! async fn main() -> Result<(), invoicing::Error> {
56//!     let config = aws_config::load_from_env().await;
57//!     let client = aws_sdk_invoicing::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-invoicing/latest/aws_sdk_invoicing/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/awsdocs/aws-doc-sdk-examples/tree/main/rustv1)
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 AWS Invoicing. 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 AWS Invoicing.
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_invoicing::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_invoicing::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 [`CreateInvoiceUnit`](crate::operation::create_invoice_unit) operation has
163/// a [`Client::create_invoice_unit`], 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.create_invoice_unit()
169///     .name("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.
177pub mod client;
178
179/// Configuration for AWS Invoicing.
180pub mod config;
181
182/// Common errors and error handling utilities.
183pub mod error;
184
185mod error_meta;
186
187/// Information about this crate.
188pub mod meta;
189
190/// All operations that this crate can perform.
191pub mod operation;
192
193/// Primitives such as `Blob` or `DateTime` used by other types.
194pub mod primitives;
195
196/// Data structures used by operation inputs/outputs.
197pub mod types;
198
199pub(crate) mod protocol_serde;
200
201mod sdk_feature_tracker;
202
203mod serialization_settings;
204
205mod endpoint_lib;
206
207mod lens;
208
209mod serde_util;
210
211mod json_errors;
212
213#[doc(inline)]
214pub use client::Client;