#[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(())
}
}
pub trait Waiters {
fn wait_until_server_offline(&self) -> crate::waiters::server_offline::ServerOfflineFluentBuilder;
fn wait_until_server_online(&self) -> crate::waiters::server_online::ServerOnlineFluentBuilder;
}
impl Waiters for Client {
fn wait_until_server_offline(&self) -> crate::waiters::server_offline::ServerOfflineFluentBuilder {
crate::waiters::server_offline::ServerOfflineFluentBuilder::new(self.handle.clone())
}
fn wait_until_server_online(&self) -> crate::waiters::server_online::ServerOnlineFluentBuilder {
crate::waiters::server_online::ServerOnlineFluentBuilder::new(self.handle.clone())
}
}
impl Client {
#[track_caller]
pub fn new(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
Self::from_conf(sdk_config.into())
}
}
mod create_access;
mod create_agreement;
mod create_connector;
mod create_profile;
mod create_server;
mod create_user;
mod create_web_app;
mod create_workflow;
pub mod customize;
mod delete_access;
mod delete_agreement;
mod delete_certificate;
mod delete_connector;
mod delete_host_key;
mod delete_profile;
mod delete_server;
mod delete_ssh_public_key;
mod delete_user;
mod delete_web_app;
mod delete_web_app_customization;
mod delete_workflow;
mod describe_access;
mod describe_agreement;
mod describe_certificate;
mod describe_connector;
mod describe_execution;
mod describe_host_key;
mod describe_profile;
mod describe_security_policy;
mod describe_server;
mod describe_user;
mod describe_web_app;
mod describe_web_app_customization;
mod describe_workflow;
mod import_certificate;
mod import_host_key;
mod import_ssh_public_key;
mod list_accesses;
mod list_agreements;
mod list_certificates;
mod list_connectors;
mod list_executions;
mod list_file_transfer_results;
mod list_host_keys;
mod list_profiles;
mod list_security_policies;
mod list_servers;
mod list_tags_for_resource;
mod list_users;
mod list_web_apps;
mod list_workflows;
mod send_workflow_step_state;
mod start_directory_listing;
mod start_file_transfer;
mod start_remote_delete;
mod start_remote_move;
mod start_server;
mod stop_server;
mod tag_resource;
mod test_connection;
mod test_identity_provider;
mod untag_resource;
mod update_access;
mod update_agreement;
mod update_certificate;
mod update_connector;
mod update_host_key;
mod update_profile;
mod update_server;
mod update_user;
mod update_web_app;
mod update_web_app_customization;