#[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_inbound_cross_cluster_search_connection;
mod add_tags;
mod associate_package;
mod authorize_vpc_endpoint_access;
mod cancel_domain_config_change;
mod cancel_elasticsearch_service_software_update;
mod create_elasticsearch_domain;
mod create_outbound_cross_cluster_search_connection;
mod create_package;
mod create_vpc_endpoint;
pub mod customize;
mod delete_elasticsearch_domain;
mod delete_elasticsearch_service_role;
mod delete_inbound_cross_cluster_search_connection;
mod delete_outbound_cross_cluster_search_connection;
mod delete_package;
mod delete_vpc_endpoint;
mod describe_domain_auto_tunes;
mod describe_domain_change_progress;
mod describe_elasticsearch_domain;
mod describe_elasticsearch_domain_config;
mod describe_elasticsearch_domains;
mod describe_elasticsearch_instance_type_limits;
mod describe_inbound_cross_cluster_search_connections;
mod describe_outbound_cross_cluster_search_connections;
mod describe_packages;
mod describe_reserved_elasticsearch_instance_offerings;
mod describe_reserved_elasticsearch_instances;
mod describe_vpc_endpoints;
mod dissociate_package;
mod get_compatible_elasticsearch_versions;
mod get_package_version_history;
mod get_upgrade_history;
mod get_upgrade_status;
mod list_domain_names;
mod list_domains_for_package;
mod list_elasticsearch_instance_types;
mod list_elasticsearch_versions;
mod list_packages_for_domain;
mod list_tags;
mod list_vpc_endpoint_access;
mod list_vpc_endpoints;
mod list_vpc_endpoints_for_domain;
mod purchase_reserved_elasticsearch_instance_offering;
mod reject_inbound_cross_cluster_search_connection;
mod remove_tags;
mod revoke_vpc_endpoint_access;
mod start_elasticsearch_service_software_update;
mod update_elasticsearch_domain_config;
mod update_package;
mod update_vpc_endpoint;
mod upgrade_elasticsearch_domain;