aws_sdk_route53resolver/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//! When you create a VPC using Amazon VPC, you automatically get DNS resolution within the VPC from Route 53 Resolver. By default, Resolver answers DNS queries for VPC domain names such as domain names for EC2 instances or Elastic Load Balancing load balancers. Resolver performs recursive lookups against public name servers for all other domain names.
21//!
22//! You can also configure DNS resolution between your VPC and your network over a Direct Connect or VPN connection:
23//!
24//! __Forward DNS queries from resolvers on your network to Route 53 Resolver__
25//!
26//! DNS resolvers on your network can forward DNS queries to Resolver in a specified VPC. This allows your DNS resolvers to easily resolve domain names for Amazon Web Services resources such as EC2 instances or records in a Route 53 private hosted zone. For more information, see [How DNS Resolvers on Your Network Forward DNS Queries to Route 53 Resolver](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver.html#resolver-overview-forward-network-to-vpc) in the _Amazon Route 53 Developer Guide_.
27//!
28//! __Conditionally forward queries from a VPC to resolvers on your network__
29//!
30//! You can configure Resolver to forward queries that it receives from EC2 instances in your VPCs to DNS resolvers on your network. To forward selected queries, you create Resolver rules that specify the domain names for the DNS queries that you want to forward (such as example.com), and the IP addresses of the DNS resolvers on your network that you want to forward the queries to. If a query matches multiple rules (example.com, acme.example.com), Resolver chooses the rule with the most specific match (acme.example.com) and forwards the query to the IP addresses that you specified in that rule. For more information, see [How Route 53 Resolver Forwards DNS Queries from Your VPCs to Your Network](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver.html#resolver-overview-forward-vpc-to-network) in the _Amazon Route 53 Developer Guide_.
31//!
32//! Like Amazon VPC, Resolver is Regional. In each Region where you have VPCs, you can choose whether to forward queries from your VPCs to your network (outbound queries), from your network to your VPCs (inbound queries), or both.
33//!
34//! ## Getting Started
35//!
36//! > Examples are available for many services and operations, check out the
37//! > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples).
38//!
39//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
40//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-route53resolver` to
41//! your project, add the following to your **Cargo.toml** file:
42//!
43//! ```toml
44//! [dependencies]
45//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
46//! aws-sdk-route53resolver = "1.72.0"
47//! tokio = { version = "1", features = ["full"] }
48//! ```
49//!
50//! Then in code, a client can be created with the following:
51//!
52//! ```rust,no_run
53//! use aws_sdk_route53resolver as route53resolver;
54//!
55//! #[::tokio::main]
56//! async fn main() -> Result<(), route53resolver::Error> {
57//! let config = aws_config::load_from_env().await;
58//! let client = aws_sdk_route53resolver::Client::new(&config);
59//!
60//! // ... make some calls with the client
61//!
62//! Ok(())
63//! }
64//! ```
65//!
66//! See the [client documentation](https://docs.rs/aws-sdk-route53resolver/latest/aws_sdk_route53resolver/client/struct.Client.html)
67//! for information on what calls can be made, and the inputs and outputs for each of those calls.
68//!
69//! ## Using the SDK
70//!
71//! Until the SDK is released, we will be adding information about using the SDK to the
72//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
73//! additional sections for the guide by opening an issue and describing what you are trying to do.
74//!
75//! ## Getting Help
76//!
77//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
78//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
79//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
80//! * [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples)
81//!
82//!
83//! # Crate Organization
84//!
85//! The entry point for most customers will be [`Client`], which exposes one method for each API
86//! offered by Amazon Route 53 Resolver. The return value of each of these methods is a "fluent builder",
87//! where the different inputs for that API are added by builder-style function call chaining,
88//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
89//! either a successful output or a [`SdkError`](crate::error::SdkError).
90//!
91//! Some of these API inputs may be structs or enums to provide more complex structured information.
92//! These structs and enums live in [`types`](crate::types). There are some simpler types for
93//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
94//!
95//! All types required to configure a client via the [`Config`](crate::Config) struct live
96//! in [`config`](crate::config).
97//!
98//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
99//! is the input, output, and error type for that API, as well as builders to construct each of those.
100//!
101//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
102//! client can return. Any other error type can be converted to this `Error` type via the
103//! [`From`](std::convert::From) trait.
104//!
105//! The other modules within this crate are not required for normal usage.
106
107// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
108pub use error_meta::Error;
109
110#[doc(inline)]
111pub use config::Config;
112
113/// Client for calling Amazon Route 53 Resolver.
114/// ## Constructing a `Client`
115///
116/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
117/// crate should be used to automatically resolve this config using
118/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
119/// across multiple different AWS SDK clients. This config resolution process can be customized
120/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
121/// the [builder pattern] to customize the default config.
122///
123/// In the simplest case, creating a client looks as follows:
124/// ```rust,no_run
125/// # async fn wrapper() {
126/// let config = aws_config::load_from_env().await;
127/// let client = aws_sdk_route53resolver::Client::new(&config);
128/// # }
129/// ```
130///
131/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
132/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
133/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
134/// done as follows:
135///
136/// ```rust,no_run
137/// # async fn wrapper() {
138/// let sdk_config = ::aws_config::load_from_env().await;
139/// let config = aws_sdk_route53resolver::config::Builder::from(&sdk_config)
140/// # /*
141/// .some_service_specific_setting("value")
142/// # */
143/// .build();
144/// # }
145/// ```
146///
147/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
148///
149/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
150/// be done once at application start-up.
151///
152/// [`Config`]: crate::Config
153/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
154/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
155/// [`aws-config` docs]: https://docs.rs/aws-config/*
156/// [`aws-config`]: https://crates.io/crates/aws-config
157/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
158/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
159/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
160/// # Using the `Client`
161///
162/// A client has a function for every operation that can be performed by the service.
163/// For example, the [`AssociateFirewallRuleGroup`](crate::operation::associate_firewall_rule_group) operation has
164/// a [`Client::associate_firewall_rule_group`], function which returns a builder for that operation.
165/// The fluent builder ultimately has a `send()` function that returns an async future that
166/// returns a result, as illustrated below:
167///
168/// ```rust,ignore
169/// let result = client.associate_firewall_rule_group()
170/// .creator_request_id("example")
171/// .send()
172/// .await;
173/// ```
174///
175/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
176/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
177/// information.
178pub mod client;
179
180/// Configuration for Amazon Route 53 Resolver.
181pub mod config;
182
183/// Common errors and error handling utilities.
184pub mod error;
185
186mod error_meta;
187
188/// Information about this crate.
189pub mod meta;
190
191/// All operations that this crate can perform.
192pub mod operation;
193
194/// Primitives such as `Blob` or `DateTime` used by other types.
195pub mod primitives;
196
197/// Data structures used by operation inputs/outputs.
198pub mod types;
199
200mod auth_plugin;
201
202pub(crate) mod client_idempotency_token;
203
204mod idempotency_token;
205
206pub(crate) mod protocol_serde;
207
208mod sdk_feature_tracker;
209
210mod serialization_settings;
211
212mod endpoint_lib;
213
214mod lens;
215
216mod serde_util;
217
218mod json_errors;
219
220#[doc(inline)]
221pub use client::Client;