#[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 cancel_image_creation;
mod cancel_lifecycle_execution;
mod create_component;
mod create_container_recipe;
mod create_distribution_configuration;
mod create_image;
mod create_image_pipeline;
mod create_image_recipe;
mod create_infrastructure_configuration;
mod create_lifecycle_policy;
mod create_workflow;
pub mod customize;
mod delete_component;
mod delete_container_recipe;
mod delete_distribution_configuration;
mod delete_image;
mod delete_image_pipeline;
mod delete_image_recipe;
mod delete_infrastructure_configuration;
mod delete_lifecycle_policy;
mod delete_workflow;
mod distribute_image;
mod get_component;
mod get_component_policy;
mod get_container_recipe;
mod get_container_recipe_policy;
mod get_distribution_configuration;
mod get_image;
mod get_image_pipeline;
mod get_image_policy;
mod get_image_recipe;
mod get_image_recipe_policy;
mod get_infrastructure_configuration;
mod get_lifecycle_execution;
mod get_lifecycle_policy;
mod get_marketplace_resource;
mod get_workflow;
mod get_workflow_execution;
mod get_workflow_step_execution;
mod import_component;
mod import_disk_image;
mod import_vm_image;
mod list_component_build_versions;
mod list_components;
mod list_container_recipes;
mod list_distribution_configurations;
mod list_image_build_versions;
mod list_image_packages;
mod list_image_pipeline_images;
mod list_image_pipelines;
mod list_image_recipes;
mod list_image_scan_finding_aggregations;
mod list_image_scan_findings;
mod list_images;
mod list_infrastructure_configurations;
mod list_lifecycle_execution_resources;
mod list_lifecycle_executions;
mod list_lifecycle_policies;
mod list_tags_for_resource;
mod list_waiting_workflow_steps;
mod list_workflow_build_versions;
mod list_workflow_executions;
mod list_workflow_step_executions;
mod list_workflows;
mod put_component_policy;
mod put_container_recipe_policy;
mod put_image_policy;
mod put_image_recipe_policy;
mod retry_image;
mod send_workflow_step_action;
mod start_image_pipeline_execution;
mod start_resource_state_update;
mod tag_resource;
mod untag_resource;
mod update_distribution_configuration;
mod update_image_pipeline;
mod update_infrastructure_configuration;
mod update_lifecycle_policy;