#[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 associate_web_acl;
mod check_capacity;
mod create_api_key;
mod create_ip_set;
mod create_regex_pattern_set;
mod create_rule_group;
mod create_web_acl;
pub mod customize;
mod delete_api_key;
mod delete_firewall_manager_rule_groups;
mod delete_ip_set;
mod delete_logging_configuration;
mod delete_permission_policy;
mod delete_regex_pattern_set;
mod delete_rule_group;
mod delete_web_acl;
mod describe_all_managed_products;
mod describe_managed_products_by_vendor;
mod describe_managed_rule_group;
mod disassociate_web_acl;
mod generate_mobile_sdk_release_url;
mod get_decrypted_api_key;
mod get_ip_set;
mod get_logging_configuration;
mod get_managed_rule_set;
mod get_mobile_sdk_release;
mod get_permission_policy;
mod get_rate_based_statement_managed_keys;
mod get_regex_pattern_set;
mod get_revenue_statistics;
mod get_revenue_statistics_summary;
mod get_revenue_statistics_time_series;
mod get_rule_group;
mod get_sampled_requests;
mod get_top_path_statistics_by_traffic;
mod get_web_acl;
mod get_web_acl_for_resource;
mod list_api_keys;
mod list_available_managed_rule_group_versions;
mod list_available_managed_rule_groups;
mod list_ip_sets;
mod list_logging_configurations;
mod list_managed_rule_sets;
mod list_mobile_sdk_releases;
mod list_regex_pattern_sets;
mod list_resources_for_web_acl;
mod list_rule_groups;
mod list_settlement_records;
mod list_tags_for_resource;
mod list_web_acls;
mod put_logging_configuration;
mod put_managed_rule_set_versions;
mod put_permission_policy;
mod tag_resource;
mod untag_resource;
mod update_ip_set;
mod update_managed_rule_set_version_expiry_date;
mod update_regex_pattern_set;
mod update_rule_group;
mod update_web_acl;