#[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 create_byte_match_set;
mod create_geo_match_set;
mod create_ip_set;
mod create_rate_based_rule;
mod create_regex_match_set;
mod create_regex_pattern_set;
mod create_rule;
mod create_rule_group;
mod create_size_constraint_set;
mod create_sql_injection_match_set;
mod create_web_acl;
mod create_web_acl_migration_stack;
mod create_xss_match_set;
pub mod customize;
mod delete_byte_match_set;
mod delete_geo_match_set;
mod delete_ip_set;
mod delete_logging_configuration;
mod delete_permission_policy;
mod delete_rate_based_rule;
mod delete_regex_match_set;
mod delete_regex_pattern_set;
mod delete_rule;
mod delete_rule_group;
mod delete_size_constraint_set;
mod delete_sql_injection_match_set;
mod delete_web_acl;
mod delete_xss_match_set;
mod get_byte_match_set;
mod get_change_token;
mod get_change_token_status;
mod get_geo_match_set;
mod get_ip_set;
mod get_logging_configuration;
mod get_permission_policy;
mod get_rate_based_rule;
mod get_rate_based_rule_managed_keys;
mod get_regex_match_set;
mod get_regex_pattern_set;
mod get_rule;
mod get_rule_group;
mod get_sampled_requests;
mod get_size_constraint_set;
mod get_sql_injection_match_set;
mod get_web_acl;
mod get_xss_match_set;
mod list_activated_rules_in_rule_group;
mod list_byte_match_sets;
mod list_geo_match_sets;
mod list_ip_sets;
mod list_logging_configurations;
mod list_rate_based_rules;
mod list_regex_match_sets;
mod list_regex_pattern_sets;
mod list_rule_groups;
mod list_rules;
mod list_size_constraint_sets;
mod list_sql_injection_match_sets;
mod list_subscribed_rule_groups;
mod list_tags_for_resource;
mod list_web_acls;
mod list_xss_match_sets;
mod put_logging_configuration;
mod put_permission_policy;
mod tag_resource;
mod untag_resource;
mod update_byte_match_set;
mod update_geo_match_set;
mod update_ip_set;
mod update_rate_based_rule;
mod update_regex_match_set;
mod update_regex_pattern_set;
mod update_rule;
mod update_rule_group;
mod update_size_constraint_set;
mod update_sql_injection_match_set;
mod update_web_acl;
mod update_xss_match_set;