#[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 accept_attachment;
mod associate_connect_peer;
mod associate_customer_gateway;
mod associate_link;
mod associate_transit_gateway_connect_peer;
mod create_connect_attachment;
mod create_connect_peer;
mod create_connection;
mod create_core_network;
mod create_core_network_prefix_list_association;
mod create_device;
mod create_direct_connect_gateway_attachment;
mod create_global_network;
mod create_link;
mod create_site;
mod create_site_to_site_vpn_attachment;
mod create_transit_gateway_peering;
mod create_transit_gateway_route_table_attachment;
mod create_vpc_attachment;
pub mod customize;
mod delete_attachment;
mod delete_connect_peer;
mod delete_connection;
mod delete_core_network;
mod delete_core_network_policy_version;
mod delete_core_network_prefix_list_association;
mod delete_device;
mod delete_global_network;
mod delete_link;
mod delete_peering;
mod delete_resource_policy;
mod delete_site;
mod deregister_transit_gateway;
mod describe_global_networks;
mod disassociate_connect_peer;
mod disassociate_customer_gateway;
mod disassociate_link;
mod disassociate_transit_gateway_connect_peer;
mod execute_core_network_change_set;
mod get_connect_attachment;
mod get_connect_peer;
mod get_connect_peer_associations;
mod get_connections;
mod get_core_network;
mod get_core_network_change_events;
mod get_core_network_change_set;
mod get_core_network_policy;
mod get_customer_gateway_associations;
mod get_devices;
mod get_direct_connect_gateway_attachment;
mod get_link_associations;
mod get_links;
mod get_network_resource_counts;
mod get_network_resource_relationships;
mod get_network_resources;
mod get_network_routes;
mod get_network_telemetry;
mod get_resource_policy;
mod get_route_analysis;
mod get_site_to_site_vpn_attachment;
mod get_sites;
mod get_transit_gateway_connect_peer_associations;
mod get_transit_gateway_peering;
mod get_transit_gateway_registrations;
mod get_transit_gateway_route_table_attachment;
mod get_vpc_attachment;
mod list_attachment_routing_policy_associations;
mod list_attachments;
mod list_connect_peers;
mod list_core_network_policy_versions;
mod list_core_network_prefix_list_associations;
mod list_core_network_routing_information;
mod list_core_networks;
mod list_organization_service_access_status;
mod list_peerings;
mod list_tags_for_resource;
mod put_attachment_routing_policy_label;
mod put_core_network_policy;
mod put_resource_policy;
mod register_transit_gateway;
mod reject_attachment;
mod remove_attachment_routing_policy_label;
mod restore_core_network_policy_version;
mod start_organization_service_access_update;
mod start_route_analysis;
mod tag_resource;
mod untag_resource;
mod update_connection;
mod update_core_network;
mod update_device;
mod update_direct_connect_gateway_attachment;
mod update_global_network;
mod update_link;
mod update_network_resource_metadata;
mod update_site;
mod update_vpc_attachment;