#[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) -> 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_storage_system;
mod cancel_task_execution;
mod create_agent;
mod create_location_azure_blob;
mod create_location_efs;
mod create_location_fsx_lustre;
mod create_location_fsx_ontap;
mod create_location_fsx_open_zfs;
mod create_location_fsx_windows;
mod create_location_hdfs;
mod create_location_nfs;
mod create_location_object_storage;
mod create_location_s3;
mod create_location_smb;
mod create_task;
pub mod customize;
mod delete_agent;
mod delete_location;
mod delete_task;
mod describe_agent;
mod describe_discovery_job;
mod describe_location_azure_blob;
mod describe_location_efs;
mod describe_location_fsx_lustre;
mod describe_location_fsx_ontap;
mod describe_location_fsx_open_zfs;
mod describe_location_fsx_windows;
mod describe_location_hdfs;
mod describe_location_nfs;
mod describe_location_object_storage;
mod describe_location_s3;
mod describe_location_smb;
mod describe_storage_system;
mod describe_storage_system_resource_metrics;
mod describe_storage_system_resources;
mod describe_task;
mod describe_task_execution;
mod generate_recommendations;
mod list_agents;
mod list_discovery_jobs;
mod list_locations;
mod list_storage_systems;
mod list_tags_for_resource;
mod list_task_executions;
mod list_tasks;
mod remove_storage_system;
mod start_discovery_job;
mod start_task_execution;
mod stop_discovery_job;
mod tag_resource;
mod untag_resource;
mod update_agent;
mod update_discovery_job;
mod update_location_azure_blob;
mod update_location_efs;
mod update_location_fsx_lustre;
mod update_location_fsx_ontap;
mod update_location_fsx_open_zfs;
mod update_location_fsx_windows;
mod update_location_hdfs;
mod update_location_nfs;
mod update_location_object_storage;
mod update_location_s3;
mod update_location_smb;
mod update_storage_system;
mod update_task;
mod update_task_execution;