#[derive(Debug)]
pub(crate) struct Handle {
pub(crate) conf: crate::Config,
#[allow(dead_code)] pub(crate) runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
}
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct Client {
handle: ::std::sync::Arc<Handle>,
}
impl Client {
#[track_caller]
pub fn from_conf(conf: crate::Config) -> Self {
let handle = Handle {
conf: conf.clone(),
runtime_plugins: crate::config::base_client_runtime_plugins(conf),
};
if let Err(err) = Self::validate_config(&handle) {
panic!("Invalid client configuration: {err}");
}
Self {
handle: ::std::sync::Arc::new(handle),
}
}
pub fn config(&self) -> &crate::Config {
&self.handle.conf
}
fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
handle
.runtime_plugins
.apply_client_configuration(&mut cfg)?
.validate_base_client_config(&cfg)?;
Ok(())
}
}
impl Client {
#[track_caller]
pub fn new(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
Self::from_conf(sdk_config.into())
}
}
mod add_custom_routing_endpoints;
mod add_endpoints;
mod advertise_byoip_cidr;
mod allow_custom_routing_traffic;
mod create_accelerator;
mod create_cross_account_attachment;
mod create_custom_routing_accelerator;
mod create_custom_routing_endpoint_group;
mod create_custom_routing_listener;
mod create_endpoint_group;
mod create_listener;
pub mod customize;
mod delete_accelerator;
mod delete_cross_account_attachment;
mod delete_custom_routing_accelerator;
mod delete_custom_routing_endpoint_group;
mod delete_custom_routing_listener;
mod delete_endpoint_group;
mod delete_listener;
mod deny_custom_routing_traffic;
mod deprovision_byoip_cidr;
mod describe_accelerator;
mod describe_accelerator_attributes;
mod describe_cross_account_attachment;
mod describe_custom_routing_accelerator;
mod describe_custom_routing_accelerator_attributes;
mod describe_custom_routing_endpoint_group;
mod describe_custom_routing_listener;
mod describe_endpoint_group;
mod describe_listener;
mod list_accelerators;
mod list_byoip_cidrs;
mod list_cross_account_attachments;
mod list_cross_account_resource_accounts;
mod list_cross_account_resources;
mod list_custom_routing_accelerators;
mod list_custom_routing_endpoint_groups;
mod list_custom_routing_listeners;
mod list_custom_routing_port_mappings;
mod list_custom_routing_port_mappings_by_destination;
mod list_endpoint_groups;
mod list_listeners;
mod list_tags_for_resource;
mod provision_byoip_cidr;
mod remove_custom_routing_endpoints;
mod remove_endpoints;
mod tag_resource;
mod untag_resource;
mod update_accelerator;
mod update_accelerator_attributes;
mod update_cross_account_attachment;
mod update_custom_routing_accelerator;
mod update_custom_routing_accelerator_attributes;
mod update_custom_routing_listener;
mod update_endpoint_group;
mod update_listener;
mod withdraw_byoip_cidr;