#[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 convert_recovery_point_to_snapshot;
mod create_custom_domain_association;
mod create_endpoint_access;
mod create_namespace;
mod create_reservation;
mod create_scheduled_action;
mod create_snapshot;
mod create_snapshot_copy_configuration;
mod create_usage_limit;
mod create_workgroup;
pub mod customize;
mod delete_custom_domain_association;
mod delete_endpoint_access;
mod delete_namespace;
mod delete_resource_policy;
mod delete_scheduled_action;
mod delete_snapshot;
mod delete_snapshot_copy_configuration;
mod delete_usage_limit;
mod delete_workgroup;
mod get_credentials;
mod get_custom_domain_association;
mod get_endpoint_access;
mod get_identity_center_auth_token;
mod get_namespace;
mod get_recovery_point;
mod get_reservation;
mod get_reservation_offering;
mod get_resource_policy;
mod get_scheduled_action;
mod get_snapshot;
mod get_table_restore_status;
mod get_track;
mod get_usage_limit;
mod get_workgroup;
mod list_custom_domain_associations;
mod list_endpoint_access;
mod list_managed_workgroups;
mod list_namespaces;
mod list_recovery_points;
mod list_reservation_offerings;
mod list_reservations;
mod list_scheduled_actions;
mod list_snapshot_copy_configurations;
mod list_snapshots;
mod list_table_restore_status;
mod list_tags_for_resource;
mod list_tracks;
mod list_usage_limits;
mod list_workgroups;
mod put_resource_policy;
mod restore_from_recovery_point;
mod restore_from_snapshot;
mod restore_table_from_recovery_point;
mod restore_table_from_snapshot;
mod tag_resource;
mod untag_resource;
mod update_custom_domain_association;
mod update_endpoint_access;
mod update_lakehouse_configuration;
mod update_namespace;
mod update_scheduled_action;
mod update_snapshot;
mod update_snapshot_copy_configuration;
mod update_usage_limit;
mod update_workgroup;