1#[derive(Debug)]
3pub(crate) struct Handle {
4 pub(crate) conf: crate::Config,
5 #[allow(dead_code)] pub(crate) runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
7}
8
9#[derive(::std::clone::Clone, ::std::fmt::Debug)]
78pub struct Client {
79 handle: ::std::sync::Arc<Handle>,
80}
81
82impl Client {
83 #[track_caller]
95 pub fn from_conf(conf: crate::Config) -> Self {
96 let handle = Handle {
97 conf: conf.clone(),
98 runtime_plugins: crate::config::base_client_runtime_plugins(conf),
99 };
100 if let Err(err) = Self::validate_config(&handle) {
101 panic!("Invalid client configuration: {err}");
102 }
103 Self {
104 handle: ::std::sync::Arc::new(handle),
105 }
106 }
107
108 pub fn config(&self) -> &crate::Config {
110 &self.handle.conf
111 }
112
113 fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
114 let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
115 handle
116 .runtime_plugins
117 .apply_client_configuration(&mut cfg)?
118 .validate_base_client_config(&cfg)?;
119 Ok(())
120 }
121}
122
123impl Client {
124 #[track_caller]
134 pub fn new(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
135 Self::from_conf(sdk_config.into())
136 }
137}
138
139mod accept_certificate_transfer;
140
141mod add_thing_to_billing_group;
142
143mod add_thing_to_thing_group;
144
145mod associate_sbom_with_package_version;
146
147mod associate_targets_with_job;
148
149mod attach_policy;
150
151mod attach_principal_policy;
152
153mod attach_security_profile;
154
155mod attach_thing_principal;
156
157mod cancel_audit_mitigation_actions_task;
158
159mod cancel_audit_task;
160
161mod cancel_certificate_transfer;
162
163mod cancel_detect_mitigation_actions_task;
164
165mod cancel_job;
166
167mod cancel_job_execution;
168
169mod clear_default_authorizer;
170
171mod confirm_topic_rule_destination;
172
173mod create_audit_suppression;
174
175mod create_authorizer;
176
177mod create_billing_group;
178
179mod create_certificate_from_csr;
180
181mod create_certificate_provider;
182
183mod create_command;
184
185mod create_custom_metric;
186
187mod create_dimension;
188
189mod create_domain_configuration;
190
191mod create_dynamic_thing_group;
192
193mod create_fleet_metric;
194
195mod create_job;
196
197mod create_job_template;
198
199mod create_keys_and_certificate;
200
201mod create_mitigation_action;
202
203mod create_ota_update;
204
205mod create_package;
206
207mod create_package_version;
208
209mod create_policy;
210
211mod create_policy_version;
212
213mod create_provisioning_claim;
214
215mod create_provisioning_template;
216
217mod create_provisioning_template_version;
218
219mod create_role_alias;
220
221mod create_scheduled_audit;
222
223mod create_security_profile;
224
225mod create_stream;
226
227mod create_thing;
228
229mod create_thing_group;
230
231mod create_thing_type;
232
233mod create_topic_rule;
234
235mod create_topic_rule_destination;
236
237pub mod customize;
263
264mod delete_account_audit_configuration;
265
266mod delete_audit_suppression;
267
268mod delete_authorizer;
269
270mod delete_billing_group;
271
272mod delete_ca_certificate;
273
274mod delete_certificate;
275
276mod delete_certificate_provider;
277
278mod delete_command;
279
280mod delete_command_execution;
281
282mod delete_custom_metric;
283
284mod delete_dimension;
285
286mod delete_domain_configuration;
287
288mod delete_dynamic_thing_group;
289
290mod delete_fleet_metric;
291
292mod delete_job;
293
294mod delete_job_execution;
295
296mod delete_job_template;
297
298mod delete_mitigation_action;
299
300mod delete_ota_update;
301
302mod delete_package;
303
304mod delete_package_version;
305
306mod delete_policy;
307
308mod delete_policy_version;
309
310mod delete_provisioning_template;
311
312mod delete_provisioning_template_version;
313
314mod delete_registration_code;
315
316mod delete_role_alias;
317
318mod delete_scheduled_audit;
319
320mod delete_security_profile;
321
322mod delete_stream;
323
324mod delete_thing;
325
326mod delete_thing_group;
327
328mod delete_thing_type;
329
330mod delete_topic_rule;
331
332mod delete_topic_rule_destination;
333
334mod delete_v2_logging_level;
335
336mod deprecate_thing_type;
337
338mod describe_account_audit_configuration;
339
340mod describe_audit_finding;
341
342mod describe_audit_mitigation_actions_task;
343
344mod describe_audit_suppression;
345
346mod describe_audit_task;
347
348mod describe_authorizer;
349
350mod describe_billing_group;
351
352mod describe_ca_certificate;
353
354mod describe_certificate;
355
356mod describe_certificate_provider;
357
358mod describe_custom_metric;
359
360mod describe_default_authorizer;
361
362mod describe_detect_mitigation_actions_task;
363
364mod describe_dimension;
365
366mod describe_domain_configuration;
367
368mod describe_endpoint;
369
370mod describe_event_configurations;
371
372mod describe_fleet_metric;
373
374mod describe_index;
375
376mod describe_job;
377
378mod describe_job_execution;
379
380mod describe_job_template;
381
382mod describe_managed_job_template;
383
384mod describe_mitigation_action;
385
386mod describe_provisioning_template;
387
388mod describe_provisioning_template_version;
389
390mod describe_role_alias;
391
392mod describe_scheduled_audit;
393
394mod describe_security_profile;
395
396mod describe_stream;
397
398mod describe_thing;
399
400mod describe_thing_group;
401
402mod describe_thing_registration_task;
403
404mod describe_thing_type;
405
406mod detach_policy;
407
408mod detach_principal_policy;
409
410mod detach_security_profile;
411
412mod detach_thing_principal;
413
414mod disable_topic_rule;
415
416mod disassociate_sbom_from_package_version;
417
418mod enable_topic_rule;
419
420mod get_behavior_model_training_summaries;
421
422mod get_buckets_aggregation;
423
424mod get_cardinality;
425
426mod get_command;
427
428mod get_command_execution;
429
430mod get_effective_policies;
431
432mod get_indexing_configuration;
433
434mod get_job_document;
435
436mod get_logging_options;
437
438mod get_ota_update;
439
440mod get_package;
441
442mod get_package_configuration;
443
444mod get_package_version;
445
446mod get_percentiles;
447
448mod get_policy;
449
450mod get_policy_version;
451
452mod get_registration_code;
453
454mod get_statistics;
455
456mod get_thing_connectivity_data;
457
458mod get_topic_rule;
459
460mod get_topic_rule_destination;
461
462mod get_v2_logging_options;
463
464mod list_active_violations;
465
466mod list_attached_policies;
467
468mod list_audit_findings;
469
470mod list_audit_mitigation_actions_executions;
471
472mod list_audit_mitigation_actions_tasks;
473
474mod list_audit_suppressions;
475
476mod list_audit_tasks;
477
478mod list_authorizers;
479
480mod list_billing_groups;
481
482mod list_ca_certificates;
483
484mod list_certificate_providers;
485
486mod list_certificates;
487
488mod list_certificates_by_ca;
489
490mod list_command_executions;
491
492mod list_commands;
493
494mod list_custom_metrics;
495
496mod list_detect_mitigation_actions_executions;
497
498mod list_detect_mitigation_actions_tasks;
499
500mod list_dimensions;
501
502mod list_domain_configurations;
503
504mod list_fleet_metrics;
505
506mod list_indices;
507
508mod list_job_executions_for_job;
509
510mod list_job_executions_for_thing;
511
512mod list_job_templates;
513
514mod list_jobs;
515
516mod list_managed_job_templates;
517
518mod list_metric_values;
519
520mod list_mitigation_actions;
521
522mod list_ota_updates;
523
524mod list_outgoing_certificates;
525
526mod list_package_versions;
527
528mod list_packages;
529
530mod list_policies;
531
532mod list_policy_principals;
533
534mod list_policy_versions;
535
536mod list_principal_policies;
537
538mod list_principal_things;
539
540mod list_principal_things_v2;
541
542mod list_provisioning_template_versions;
543
544mod list_provisioning_templates;
545
546mod list_related_resources_for_audit_finding;
547
548mod list_role_aliases;
549
550mod list_sbom_validation_results;
551
552mod list_scheduled_audits;
553
554mod list_security_profiles;
555
556mod list_security_profiles_for_target;
557
558mod list_streams;
559
560mod list_tags_for_resource;
561
562mod list_targets_for_policy;
563
564mod list_targets_for_security_profile;
565
566mod list_thing_groups;
567
568mod list_thing_groups_for_thing;
569
570mod list_thing_principals;
571
572mod list_thing_principals_v2;
573
574mod list_thing_registration_task_reports;
575
576mod list_thing_registration_tasks;
577
578mod list_thing_types;
579
580mod list_things;
581
582mod list_things_in_billing_group;
583
584mod list_things_in_thing_group;
585
586mod list_topic_rule_destinations;
587
588mod list_topic_rules;
589
590mod list_v2_logging_levels;
591
592mod list_violation_events;
593
594mod put_verification_state_on_violation;
595
596mod register_ca_certificate;
597
598mod register_certificate;
599
600mod register_certificate_without_ca;
601
602mod register_thing;
603
604mod reject_certificate_transfer;
605
606mod remove_thing_from_billing_group;
607
608mod remove_thing_from_thing_group;
609
610mod replace_topic_rule;
611
612mod search_index;
613
614mod set_default_authorizer;
615
616mod set_default_policy_version;
617
618mod set_logging_options;
619
620mod set_v2_logging_level;
621
622mod set_v2_logging_options;
623
624mod start_audit_mitigation_actions_task;
625
626mod start_detect_mitigation_actions_task;
627
628mod start_on_demand_audit_task;
629
630mod start_thing_registration_task;
631
632mod stop_thing_registration_task;
633
634mod tag_resource;
635
636mod test_authorization;
637
638mod test_invoke_authorizer;
639
640mod transfer_certificate;
641
642mod untag_resource;
643
644mod update_account_audit_configuration;
645
646mod update_audit_suppression;
647
648mod update_authorizer;
649
650mod update_billing_group;
651
652mod update_ca_certificate;
653
654mod update_certificate;
655
656mod update_certificate_provider;
657
658mod update_command;
659
660mod update_custom_metric;
661
662mod update_dimension;
663
664mod update_domain_configuration;
665
666mod update_dynamic_thing_group;
667
668mod update_event_configurations;
669
670mod update_fleet_metric;
671
672mod update_indexing_configuration;
673
674mod update_job;
675
676mod update_mitigation_action;
677
678mod update_package;
679
680mod update_package_configuration;
681
682mod update_package_version;
683
684mod update_provisioning_template;
685
686mod update_role_alias;
687
688mod update_scheduled_audit;
689
690mod update_security_profile;
691
692mod update_stream;
693
694mod update_thing;
695
696mod update_thing_group;
697
698mod update_thing_groups_for_thing;
699
700mod update_thing_type;
701
702mod update_topic_rule_destination;
703
704mod validate_security_profile_behaviors;