1use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl LicenseManagerClient {
29 fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30 let mut request =
31 SignedRequest::new(http_method, "license-manager", &self.region, request_uri);
32
33 request.set_content_type("application/x-amz-json-1.1".to_owned());
34
35 request
36 }
37
38 async fn sign_and_dispatch<E>(
39 &self,
40 request: SignedRequest,
41 from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
42 ) -> Result<HttpResponse, RusotoError<E>> {
43 let mut response = self.client.sign_and_dispatch(request).await?;
44 if !response.status.is_success() {
45 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
46 return Err(from_response(response));
47 }
48
49 Ok(response)
50 }
51}
52
53use serde_json;
54#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
56#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
57pub struct AutomatedDiscoveryInformation {
58 #[serde(rename = "LastRunTime")]
60 #[serde(skip_serializing_if = "Option::is_none")]
61 pub last_run_time: Option<f64>,
62}
63
64#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
66#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
67pub struct ConsumedLicenseSummary {
68 #[serde(rename = "ConsumedLicenses")]
70 #[serde(skip_serializing_if = "Option::is_none")]
71 pub consumed_licenses: Option<i64>,
72 #[serde(rename = "ResourceType")]
74 #[serde(skip_serializing_if = "Option::is_none")]
75 pub resource_type: Option<String>,
76}
77
78#[derive(Clone, Debug, Default, PartialEq, Serialize)]
79#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
80pub struct CreateLicenseConfigurationRequest {
81 #[serde(rename = "Description")]
83 #[serde(skip_serializing_if = "Option::is_none")]
84 pub description: Option<String>,
85 #[serde(rename = "LicenseCount")]
87 #[serde(skip_serializing_if = "Option::is_none")]
88 pub license_count: Option<i64>,
89 #[serde(rename = "LicenseCountHardLimit")]
91 #[serde(skip_serializing_if = "Option::is_none")]
92 pub license_count_hard_limit: Option<bool>,
93 #[serde(rename = "LicenseCountingType")]
95 pub license_counting_type: String,
96 #[serde(rename = "LicenseRules")]
98 #[serde(skip_serializing_if = "Option::is_none")]
99 pub license_rules: Option<Vec<String>>,
100 #[serde(rename = "Name")]
102 pub name: String,
103 #[serde(rename = "ProductInformationList")]
105 #[serde(skip_serializing_if = "Option::is_none")]
106 pub product_information_list: Option<Vec<ProductInformation>>,
107 #[serde(rename = "Tags")]
109 #[serde(skip_serializing_if = "Option::is_none")]
110 pub tags: Option<Vec<Tag>>,
111}
112
113#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
114#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
115pub struct CreateLicenseConfigurationResponse {
116 #[serde(rename = "LicenseConfigurationArn")]
118 #[serde(skip_serializing_if = "Option::is_none")]
119 pub license_configuration_arn: Option<String>,
120}
121
122#[derive(Clone, Debug, Default, PartialEq, Serialize)]
123#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
124pub struct DeleteLicenseConfigurationRequest {
125 #[serde(rename = "LicenseConfigurationArn")]
127 pub license_configuration_arn: String,
128}
129
130#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
131#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
132pub struct DeleteLicenseConfigurationResponse {}
133
134#[derive(Clone, Debug, Default, PartialEq, Serialize)]
136#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
137pub struct Filter {
138 #[serde(rename = "Name")]
140 #[serde(skip_serializing_if = "Option::is_none")]
141 pub name: Option<String>,
142 #[serde(rename = "Values")]
144 #[serde(skip_serializing_if = "Option::is_none")]
145 pub values: Option<Vec<String>>,
146}
147
148#[derive(Clone, Debug, Default, PartialEq, Serialize)]
149#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
150pub struct GetLicenseConfigurationRequest {
151 #[serde(rename = "LicenseConfigurationArn")]
153 pub license_configuration_arn: String,
154}
155
156#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
157#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
158pub struct GetLicenseConfigurationResponse {
159 #[serde(rename = "AutomatedDiscoveryInformation")]
161 #[serde(skip_serializing_if = "Option::is_none")]
162 pub automated_discovery_information: Option<AutomatedDiscoveryInformation>,
163 #[serde(rename = "ConsumedLicenseSummaryList")]
165 #[serde(skip_serializing_if = "Option::is_none")]
166 pub consumed_license_summary_list: Option<Vec<ConsumedLicenseSummary>>,
167 #[serde(rename = "ConsumedLicenses")]
169 #[serde(skip_serializing_if = "Option::is_none")]
170 pub consumed_licenses: Option<i64>,
171 #[serde(rename = "Description")]
173 #[serde(skip_serializing_if = "Option::is_none")]
174 pub description: Option<String>,
175 #[serde(rename = "LicenseConfigurationArn")]
177 #[serde(skip_serializing_if = "Option::is_none")]
178 pub license_configuration_arn: Option<String>,
179 #[serde(rename = "LicenseConfigurationId")]
181 #[serde(skip_serializing_if = "Option::is_none")]
182 pub license_configuration_id: Option<String>,
183 #[serde(rename = "LicenseCount")]
185 #[serde(skip_serializing_if = "Option::is_none")]
186 pub license_count: Option<i64>,
187 #[serde(rename = "LicenseCountHardLimit")]
189 #[serde(skip_serializing_if = "Option::is_none")]
190 pub license_count_hard_limit: Option<bool>,
191 #[serde(rename = "LicenseCountingType")]
193 #[serde(skip_serializing_if = "Option::is_none")]
194 pub license_counting_type: Option<String>,
195 #[serde(rename = "LicenseRules")]
197 #[serde(skip_serializing_if = "Option::is_none")]
198 pub license_rules: Option<Vec<String>>,
199 #[serde(rename = "ManagedResourceSummaryList")]
201 #[serde(skip_serializing_if = "Option::is_none")]
202 pub managed_resource_summary_list: Option<Vec<ManagedResourceSummary>>,
203 #[serde(rename = "Name")]
205 #[serde(skip_serializing_if = "Option::is_none")]
206 pub name: Option<String>,
207 #[serde(rename = "OwnerAccountId")]
209 #[serde(skip_serializing_if = "Option::is_none")]
210 pub owner_account_id: Option<String>,
211 #[serde(rename = "ProductInformationList")]
213 #[serde(skip_serializing_if = "Option::is_none")]
214 pub product_information_list: Option<Vec<ProductInformation>>,
215 #[serde(rename = "Status")]
217 #[serde(skip_serializing_if = "Option::is_none")]
218 pub status: Option<String>,
219 #[serde(rename = "Tags")]
221 #[serde(skip_serializing_if = "Option::is_none")]
222 pub tags: Option<Vec<Tag>>,
223}
224
225#[derive(Clone, Debug, Default, PartialEq, Serialize)]
226#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
227pub struct GetServiceSettingsRequest {}
228
229#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
230#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
231pub struct GetServiceSettingsResponse {
232 #[serde(rename = "EnableCrossAccountsDiscovery")]
234 #[serde(skip_serializing_if = "Option::is_none")]
235 pub enable_cross_accounts_discovery: Option<bool>,
236 #[serde(rename = "LicenseManagerResourceShareArn")]
238 #[serde(skip_serializing_if = "Option::is_none")]
239 pub license_manager_resource_share_arn: Option<String>,
240 #[serde(rename = "OrganizationConfiguration")]
242 #[serde(skip_serializing_if = "Option::is_none")]
243 pub organization_configuration: Option<OrganizationConfiguration>,
244 #[serde(rename = "S3BucketArn")]
246 #[serde(skip_serializing_if = "Option::is_none")]
247 pub s3_bucket_arn: Option<String>,
248 #[serde(rename = "SnsTopicArn")]
250 #[serde(skip_serializing_if = "Option::is_none")]
251 pub sns_topic_arn: Option<String>,
252}
253
254#[derive(Clone, Debug, Default, PartialEq, Serialize)]
256#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
257pub struct InventoryFilter {
258 #[serde(rename = "Condition")]
260 pub condition: String,
261 #[serde(rename = "Name")]
263 pub name: String,
264 #[serde(rename = "Value")]
266 #[serde(skip_serializing_if = "Option::is_none")]
267 pub value: Option<String>,
268}
269
270#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
272#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
273pub struct LicenseConfiguration {
274 #[serde(rename = "AutomatedDiscoveryInformation")]
276 #[serde(skip_serializing_if = "Option::is_none")]
277 pub automated_discovery_information: Option<AutomatedDiscoveryInformation>,
278 #[serde(rename = "ConsumedLicenseSummaryList")]
280 #[serde(skip_serializing_if = "Option::is_none")]
281 pub consumed_license_summary_list: Option<Vec<ConsumedLicenseSummary>>,
282 #[serde(rename = "ConsumedLicenses")]
284 #[serde(skip_serializing_if = "Option::is_none")]
285 pub consumed_licenses: Option<i64>,
286 #[serde(rename = "Description")]
288 #[serde(skip_serializing_if = "Option::is_none")]
289 pub description: Option<String>,
290 #[serde(rename = "LicenseConfigurationArn")]
292 #[serde(skip_serializing_if = "Option::is_none")]
293 pub license_configuration_arn: Option<String>,
294 #[serde(rename = "LicenseConfigurationId")]
296 #[serde(skip_serializing_if = "Option::is_none")]
297 pub license_configuration_id: Option<String>,
298 #[serde(rename = "LicenseCount")]
300 #[serde(skip_serializing_if = "Option::is_none")]
301 pub license_count: Option<i64>,
302 #[serde(rename = "LicenseCountHardLimit")]
304 #[serde(skip_serializing_if = "Option::is_none")]
305 pub license_count_hard_limit: Option<bool>,
306 #[serde(rename = "LicenseCountingType")]
308 #[serde(skip_serializing_if = "Option::is_none")]
309 pub license_counting_type: Option<String>,
310 #[serde(rename = "LicenseRules")]
312 #[serde(skip_serializing_if = "Option::is_none")]
313 pub license_rules: Option<Vec<String>>,
314 #[serde(rename = "ManagedResourceSummaryList")]
316 #[serde(skip_serializing_if = "Option::is_none")]
317 pub managed_resource_summary_list: Option<Vec<ManagedResourceSummary>>,
318 #[serde(rename = "Name")]
320 #[serde(skip_serializing_if = "Option::is_none")]
321 pub name: Option<String>,
322 #[serde(rename = "OwnerAccountId")]
324 #[serde(skip_serializing_if = "Option::is_none")]
325 pub owner_account_id: Option<String>,
326 #[serde(rename = "ProductInformationList")]
328 #[serde(skip_serializing_if = "Option::is_none")]
329 pub product_information_list: Option<Vec<ProductInformation>>,
330 #[serde(rename = "Status")]
332 #[serde(skip_serializing_if = "Option::is_none")]
333 pub status: Option<String>,
334}
335
336#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
338#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
339pub struct LicenseConfigurationAssociation {
340 #[serde(rename = "AssociationTime")]
342 #[serde(skip_serializing_if = "Option::is_none")]
343 pub association_time: Option<f64>,
344 #[serde(rename = "ResourceArn")]
346 #[serde(skip_serializing_if = "Option::is_none")]
347 pub resource_arn: Option<String>,
348 #[serde(rename = "ResourceOwnerId")]
350 #[serde(skip_serializing_if = "Option::is_none")]
351 pub resource_owner_id: Option<String>,
352 #[serde(rename = "ResourceType")]
354 #[serde(skip_serializing_if = "Option::is_none")]
355 pub resource_type: Option<String>,
356}
357
358#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
360#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
361pub struct LicenseConfigurationUsage {
362 #[serde(rename = "AssociationTime")]
364 #[serde(skip_serializing_if = "Option::is_none")]
365 pub association_time: Option<f64>,
366 #[serde(rename = "ConsumedLicenses")]
368 #[serde(skip_serializing_if = "Option::is_none")]
369 pub consumed_licenses: Option<i64>,
370 #[serde(rename = "ResourceArn")]
372 #[serde(skip_serializing_if = "Option::is_none")]
373 pub resource_arn: Option<String>,
374 #[serde(rename = "ResourceOwnerId")]
376 #[serde(skip_serializing_if = "Option::is_none")]
377 pub resource_owner_id: Option<String>,
378 #[serde(rename = "ResourceStatus")]
380 #[serde(skip_serializing_if = "Option::is_none")]
381 pub resource_status: Option<String>,
382 #[serde(rename = "ResourceType")]
384 #[serde(skip_serializing_if = "Option::is_none")]
385 pub resource_type: Option<String>,
386}
387
388#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
390#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
391pub struct LicenseOperationFailure {
392 #[serde(rename = "ErrorMessage")]
394 #[serde(skip_serializing_if = "Option::is_none")]
395 pub error_message: Option<String>,
396 #[serde(rename = "FailureTime")]
398 #[serde(skip_serializing_if = "Option::is_none")]
399 pub failure_time: Option<f64>,
400 #[serde(rename = "MetadataList")]
402 #[serde(skip_serializing_if = "Option::is_none")]
403 pub metadata_list: Option<Vec<Metadata>>,
404 #[serde(rename = "OperationName")]
406 #[serde(skip_serializing_if = "Option::is_none")]
407 pub operation_name: Option<String>,
408 #[serde(rename = "OperationRequestedBy")]
410 #[serde(skip_serializing_if = "Option::is_none")]
411 pub operation_requested_by: Option<String>,
412 #[serde(rename = "ResourceArn")]
414 #[serde(skip_serializing_if = "Option::is_none")]
415 pub resource_arn: Option<String>,
416 #[serde(rename = "ResourceOwnerId")]
418 #[serde(skip_serializing_if = "Option::is_none")]
419 pub resource_owner_id: Option<String>,
420 #[serde(rename = "ResourceType")]
422 #[serde(skip_serializing_if = "Option::is_none")]
423 pub resource_type: Option<String>,
424}
425
426#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
428pub struct LicenseSpecification {
429 #[serde(rename = "LicenseConfigurationArn")]
431 pub license_configuration_arn: String,
432}
433
434#[derive(Clone, Debug, Default, PartialEq, Serialize)]
435#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
436pub struct ListAssociationsForLicenseConfigurationRequest {
437 #[serde(rename = "LicenseConfigurationArn")]
439 pub license_configuration_arn: String,
440 #[serde(rename = "MaxResults")]
442 #[serde(skip_serializing_if = "Option::is_none")]
443 pub max_results: Option<i64>,
444 #[serde(rename = "NextToken")]
446 #[serde(skip_serializing_if = "Option::is_none")]
447 pub next_token: Option<String>,
448}
449
450#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
451#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
452pub struct ListAssociationsForLicenseConfigurationResponse {
453 #[serde(rename = "LicenseConfigurationAssociations")]
455 #[serde(skip_serializing_if = "Option::is_none")]
456 pub license_configuration_associations: Option<Vec<LicenseConfigurationAssociation>>,
457 #[serde(rename = "NextToken")]
459 #[serde(skip_serializing_if = "Option::is_none")]
460 pub next_token: Option<String>,
461}
462
463#[derive(Clone, Debug, Default, PartialEq, Serialize)]
464#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
465pub struct ListFailuresForLicenseConfigurationOperationsRequest {
466 #[serde(rename = "LicenseConfigurationArn")]
468 pub license_configuration_arn: String,
469 #[serde(rename = "MaxResults")]
471 #[serde(skip_serializing_if = "Option::is_none")]
472 pub max_results: Option<i64>,
473 #[serde(rename = "NextToken")]
475 #[serde(skip_serializing_if = "Option::is_none")]
476 pub next_token: Option<String>,
477}
478
479#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
480#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
481pub struct ListFailuresForLicenseConfigurationOperationsResponse {
482 #[serde(rename = "LicenseOperationFailureList")]
484 #[serde(skip_serializing_if = "Option::is_none")]
485 pub license_operation_failure_list: Option<Vec<LicenseOperationFailure>>,
486 #[serde(rename = "NextToken")]
488 #[serde(skip_serializing_if = "Option::is_none")]
489 pub next_token: Option<String>,
490}
491
492#[derive(Clone, Debug, Default, PartialEq, Serialize)]
493#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
494pub struct ListLicenseConfigurationsRequest {
495 #[serde(rename = "Filters")]
497 #[serde(skip_serializing_if = "Option::is_none")]
498 pub filters: Option<Vec<Filter>>,
499 #[serde(rename = "LicenseConfigurationArns")]
501 #[serde(skip_serializing_if = "Option::is_none")]
502 pub license_configuration_arns: Option<Vec<String>>,
503 #[serde(rename = "MaxResults")]
505 #[serde(skip_serializing_if = "Option::is_none")]
506 pub max_results: Option<i64>,
507 #[serde(rename = "NextToken")]
509 #[serde(skip_serializing_if = "Option::is_none")]
510 pub next_token: Option<String>,
511}
512
513#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
514#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
515pub struct ListLicenseConfigurationsResponse {
516 #[serde(rename = "LicenseConfigurations")]
518 #[serde(skip_serializing_if = "Option::is_none")]
519 pub license_configurations: Option<Vec<LicenseConfiguration>>,
520 #[serde(rename = "NextToken")]
522 #[serde(skip_serializing_if = "Option::is_none")]
523 pub next_token: Option<String>,
524}
525
526#[derive(Clone, Debug, Default, PartialEq, Serialize)]
527#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
528pub struct ListLicenseSpecificationsForResourceRequest {
529 #[serde(rename = "MaxResults")]
531 #[serde(skip_serializing_if = "Option::is_none")]
532 pub max_results: Option<i64>,
533 #[serde(rename = "NextToken")]
535 #[serde(skip_serializing_if = "Option::is_none")]
536 pub next_token: Option<String>,
537 #[serde(rename = "ResourceArn")]
539 pub resource_arn: String,
540}
541
542#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
543#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
544pub struct ListLicenseSpecificationsForResourceResponse {
545 #[serde(rename = "LicenseSpecifications")]
547 #[serde(skip_serializing_if = "Option::is_none")]
548 pub license_specifications: Option<Vec<LicenseSpecification>>,
549 #[serde(rename = "NextToken")]
551 #[serde(skip_serializing_if = "Option::is_none")]
552 pub next_token: Option<String>,
553}
554
555#[derive(Clone, Debug, Default, PartialEq, Serialize)]
556#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
557pub struct ListResourceInventoryRequest {
558 #[serde(rename = "Filters")]
560 #[serde(skip_serializing_if = "Option::is_none")]
561 pub filters: Option<Vec<InventoryFilter>>,
562 #[serde(rename = "MaxResults")]
564 #[serde(skip_serializing_if = "Option::is_none")]
565 pub max_results: Option<i64>,
566 #[serde(rename = "NextToken")]
568 #[serde(skip_serializing_if = "Option::is_none")]
569 pub next_token: Option<String>,
570}
571
572#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
573#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
574pub struct ListResourceInventoryResponse {
575 #[serde(rename = "NextToken")]
577 #[serde(skip_serializing_if = "Option::is_none")]
578 pub next_token: Option<String>,
579 #[serde(rename = "ResourceInventoryList")]
581 #[serde(skip_serializing_if = "Option::is_none")]
582 pub resource_inventory_list: Option<Vec<ResourceInventory>>,
583}
584
585#[derive(Clone, Debug, Default, PartialEq, Serialize)]
586#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
587pub struct ListTagsForResourceRequest {
588 #[serde(rename = "ResourceArn")]
590 pub resource_arn: String,
591}
592
593#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
594#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
595pub struct ListTagsForResourceResponse {
596 #[serde(rename = "Tags")]
598 #[serde(skip_serializing_if = "Option::is_none")]
599 pub tags: Option<Vec<Tag>>,
600}
601
602#[derive(Clone, Debug, Default, PartialEq, Serialize)]
603#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
604pub struct ListUsageForLicenseConfigurationRequest {
605 #[serde(rename = "Filters")]
607 #[serde(skip_serializing_if = "Option::is_none")]
608 pub filters: Option<Vec<Filter>>,
609 #[serde(rename = "LicenseConfigurationArn")]
611 pub license_configuration_arn: String,
612 #[serde(rename = "MaxResults")]
614 #[serde(skip_serializing_if = "Option::is_none")]
615 pub max_results: Option<i64>,
616 #[serde(rename = "NextToken")]
618 #[serde(skip_serializing_if = "Option::is_none")]
619 pub next_token: Option<String>,
620}
621
622#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
623#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
624pub struct ListUsageForLicenseConfigurationResponse {
625 #[serde(rename = "LicenseConfigurationUsageList")]
627 #[serde(skip_serializing_if = "Option::is_none")]
628 pub license_configuration_usage_list: Option<Vec<LicenseConfigurationUsage>>,
629 #[serde(rename = "NextToken")]
631 #[serde(skip_serializing_if = "Option::is_none")]
632 pub next_token: Option<String>,
633}
634
635#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
637#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
638pub struct ManagedResourceSummary {
639 #[serde(rename = "AssociationCount")]
641 #[serde(skip_serializing_if = "Option::is_none")]
642 pub association_count: Option<i64>,
643 #[serde(rename = "ResourceType")]
645 #[serde(skip_serializing_if = "Option::is_none")]
646 pub resource_type: Option<String>,
647}
648
649#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
651#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
652pub struct Metadata {
653 #[serde(rename = "Name")]
655 #[serde(skip_serializing_if = "Option::is_none")]
656 pub name: Option<String>,
657 #[serde(rename = "Value")]
659 #[serde(skip_serializing_if = "Option::is_none")]
660 pub value: Option<String>,
661}
662
663#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
665pub struct OrganizationConfiguration {
666 #[serde(rename = "EnableIntegration")]
668 pub enable_integration: bool,
669}
670
671#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
673pub struct ProductInformation {
674 #[serde(rename = "ProductInformationFilterList")]
676 pub product_information_filter_list: Vec<ProductInformationFilter>,
677 #[serde(rename = "ResourceType")]
679 pub resource_type: String,
680}
681
682#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
684pub struct ProductInformationFilter {
685 #[serde(rename = "ProductInformationFilterComparator")]
687 pub product_information_filter_comparator: String,
688 #[serde(rename = "ProductInformationFilterName")]
690 pub product_information_filter_name: String,
691 #[serde(rename = "ProductInformationFilterValue")]
693 pub product_information_filter_value: Vec<String>,
694}
695
696#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
698#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
699pub struct ResourceInventory {
700 #[serde(rename = "Platform")]
702 #[serde(skip_serializing_if = "Option::is_none")]
703 pub platform: Option<String>,
704 #[serde(rename = "PlatformVersion")]
706 #[serde(skip_serializing_if = "Option::is_none")]
707 pub platform_version: Option<String>,
708 #[serde(rename = "ResourceArn")]
710 #[serde(skip_serializing_if = "Option::is_none")]
711 pub resource_arn: Option<String>,
712 #[serde(rename = "ResourceId")]
714 #[serde(skip_serializing_if = "Option::is_none")]
715 pub resource_id: Option<String>,
716 #[serde(rename = "ResourceOwningAccountId")]
718 #[serde(skip_serializing_if = "Option::is_none")]
719 pub resource_owning_account_id: Option<String>,
720 #[serde(rename = "ResourceType")]
722 #[serde(skip_serializing_if = "Option::is_none")]
723 pub resource_type: Option<String>,
724}
725
726#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
728pub struct Tag {
729 #[serde(rename = "Key")]
731 #[serde(skip_serializing_if = "Option::is_none")]
732 pub key: Option<String>,
733 #[serde(rename = "Value")]
735 #[serde(skip_serializing_if = "Option::is_none")]
736 pub value: Option<String>,
737}
738
739#[derive(Clone, Debug, Default, PartialEq, Serialize)]
740#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
741pub struct TagResourceRequest {
742 #[serde(rename = "ResourceArn")]
744 pub resource_arn: String,
745 #[serde(rename = "Tags")]
747 pub tags: Vec<Tag>,
748}
749
750#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
751#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
752pub struct TagResourceResponse {}
753
754#[derive(Clone, Debug, Default, PartialEq, Serialize)]
755#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
756pub struct UntagResourceRequest {
757 #[serde(rename = "ResourceArn")]
759 pub resource_arn: String,
760 #[serde(rename = "TagKeys")]
762 pub tag_keys: Vec<String>,
763}
764
765#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
766#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
767pub struct UntagResourceResponse {}
768
769#[derive(Clone, Debug, Default, PartialEq, Serialize)]
770#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
771pub struct UpdateLicenseConfigurationRequest {
772 #[serde(rename = "Description")]
774 #[serde(skip_serializing_if = "Option::is_none")]
775 pub description: Option<String>,
776 #[serde(rename = "LicenseConfigurationArn")]
778 pub license_configuration_arn: String,
779 #[serde(rename = "LicenseConfigurationStatus")]
781 #[serde(skip_serializing_if = "Option::is_none")]
782 pub license_configuration_status: Option<String>,
783 #[serde(rename = "LicenseCount")]
785 #[serde(skip_serializing_if = "Option::is_none")]
786 pub license_count: Option<i64>,
787 #[serde(rename = "LicenseCountHardLimit")]
789 #[serde(skip_serializing_if = "Option::is_none")]
790 pub license_count_hard_limit: Option<bool>,
791 #[serde(rename = "LicenseRules")]
793 #[serde(skip_serializing_if = "Option::is_none")]
794 pub license_rules: Option<Vec<String>>,
795 #[serde(rename = "Name")]
797 #[serde(skip_serializing_if = "Option::is_none")]
798 pub name: Option<String>,
799 #[serde(rename = "ProductInformationList")]
801 #[serde(skip_serializing_if = "Option::is_none")]
802 pub product_information_list: Option<Vec<ProductInformation>>,
803}
804
805#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
806#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
807pub struct UpdateLicenseConfigurationResponse {}
808
809#[derive(Clone, Debug, Default, PartialEq, Serialize)]
810#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
811pub struct UpdateLicenseSpecificationsForResourceRequest {
812 #[serde(rename = "AddLicenseSpecifications")]
814 #[serde(skip_serializing_if = "Option::is_none")]
815 pub add_license_specifications: Option<Vec<LicenseSpecification>>,
816 #[serde(rename = "RemoveLicenseSpecifications")]
818 #[serde(skip_serializing_if = "Option::is_none")]
819 pub remove_license_specifications: Option<Vec<LicenseSpecification>>,
820 #[serde(rename = "ResourceArn")]
822 pub resource_arn: String,
823}
824
825#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
826#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
827pub struct UpdateLicenseSpecificationsForResourceResponse {}
828
829#[derive(Clone, Debug, Default, PartialEq, Serialize)]
830#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
831pub struct UpdateServiceSettingsRequest {
832 #[serde(rename = "EnableCrossAccountsDiscovery")]
834 #[serde(skip_serializing_if = "Option::is_none")]
835 pub enable_cross_accounts_discovery: Option<bool>,
836 #[serde(rename = "OrganizationConfiguration")]
838 #[serde(skip_serializing_if = "Option::is_none")]
839 pub organization_configuration: Option<OrganizationConfiguration>,
840 #[serde(rename = "S3BucketArn")]
842 #[serde(skip_serializing_if = "Option::is_none")]
843 pub s3_bucket_arn: Option<String>,
844 #[serde(rename = "SnsTopicArn")]
846 #[serde(skip_serializing_if = "Option::is_none")]
847 pub sns_topic_arn: Option<String>,
848}
849
850#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
851#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
852pub struct UpdateServiceSettingsResponse {}
853
854#[derive(Debug, PartialEq)]
856pub enum CreateLicenseConfigurationError {
857 AccessDenied(String),
859 Authorization(String),
861 InvalidParameterValue(String),
863 RateLimitExceeded(String),
865 ResourceLimitExceeded(String),
867 ServerInternal(String),
869}
870
871impl CreateLicenseConfigurationError {
872 pub fn from_response(
873 res: BufferedHttpResponse,
874 ) -> RusotoError<CreateLicenseConfigurationError> {
875 if let Some(err) = proto::json::Error::parse(&res) {
876 match err.typ.as_str() {
877 "AccessDeniedException" => {
878 return RusotoError::Service(CreateLicenseConfigurationError::AccessDenied(
879 err.msg,
880 ))
881 }
882 "AuthorizationException" => {
883 return RusotoError::Service(CreateLicenseConfigurationError::Authorization(
884 err.msg,
885 ))
886 }
887 "InvalidParameterValueException" => {
888 return RusotoError::Service(
889 CreateLicenseConfigurationError::InvalidParameterValue(err.msg),
890 )
891 }
892 "RateLimitExceededException" => {
893 return RusotoError::Service(
894 CreateLicenseConfigurationError::RateLimitExceeded(err.msg),
895 )
896 }
897 "ResourceLimitExceededException" => {
898 return RusotoError::Service(
899 CreateLicenseConfigurationError::ResourceLimitExceeded(err.msg),
900 )
901 }
902 "ServerInternalException" => {
903 return RusotoError::Service(CreateLicenseConfigurationError::ServerInternal(
904 err.msg,
905 ))
906 }
907 "ValidationException" => return RusotoError::Validation(err.msg),
908 _ => {}
909 }
910 }
911 RusotoError::Unknown(res)
912 }
913}
914impl fmt::Display for CreateLicenseConfigurationError {
915 #[allow(unused_variables)]
916 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
917 match *self {
918 CreateLicenseConfigurationError::AccessDenied(ref cause) => write!(f, "{}", cause),
919 CreateLicenseConfigurationError::Authorization(ref cause) => write!(f, "{}", cause),
920 CreateLicenseConfigurationError::InvalidParameterValue(ref cause) => {
921 write!(f, "{}", cause)
922 }
923 CreateLicenseConfigurationError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
924 CreateLicenseConfigurationError::ResourceLimitExceeded(ref cause) => {
925 write!(f, "{}", cause)
926 }
927 CreateLicenseConfigurationError::ServerInternal(ref cause) => write!(f, "{}", cause),
928 }
929 }
930}
931impl Error for CreateLicenseConfigurationError {}
932#[derive(Debug, PartialEq)]
934pub enum DeleteLicenseConfigurationError {
935 AccessDenied(String),
937 Authorization(String),
939 InvalidParameterValue(String),
941 RateLimitExceeded(String),
943 ServerInternal(String),
945}
946
947impl DeleteLicenseConfigurationError {
948 pub fn from_response(
949 res: BufferedHttpResponse,
950 ) -> RusotoError<DeleteLicenseConfigurationError> {
951 if let Some(err) = proto::json::Error::parse(&res) {
952 match err.typ.as_str() {
953 "AccessDeniedException" => {
954 return RusotoError::Service(DeleteLicenseConfigurationError::AccessDenied(
955 err.msg,
956 ))
957 }
958 "AuthorizationException" => {
959 return RusotoError::Service(DeleteLicenseConfigurationError::Authorization(
960 err.msg,
961 ))
962 }
963 "InvalidParameterValueException" => {
964 return RusotoError::Service(
965 DeleteLicenseConfigurationError::InvalidParameterValue(err.msg),
966 )
967 }
968 "RateLimitExceededException" => {
969 return RusotoError::Service(
970 DeleteLicenseConfigurationError::RateLimitExceeded(err.msg),
971 )
972 }
973 "ServerInternalException" => {
974 return RusotoError::Service(DeleteLicenseConfigurationError::ServerInternal(
975 err.msg,
976 ))
977 }
978 "ValidationException" => return RusotoError::Validation(err.msg),
979 _ => {}
980 }
981 }
982 RusotoError::Unknown(res)
983 }
984}
985impl fmt::Display for DeleteLicenseConfigurationError {
986 #[allow(unused_variables)]
987 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
988 match *self {
989 DeleteLicenseConfigurationError::AccessDenied(ref cause) => write!(f, "{}", cause),
990 DeleteLicenseConfigurationError::Authorization(ref cause) => write!(f, "{}", cause),
991 DeleteLicenseConfigurationError::InvalidParameterValue(ref cause) => {
992 write!(f, "{}", cause)
993 }
994 DeleteLicenseConfigurationError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
995 DeleteLicenseConfigurationError::ServerInternal(ref cause) => write!(f, "{}", cause),
996 }
997 }
998}
999impl Error for DeleteLicenseConfigurationError {}
1000#[derive(Debug, PartialEq)]
1002pub enum GetLicenseConfigurationError {
1003 AccessDenied(String),
1005 Authorization(String),
1007 InvalidParameterValue(String),
1009 RateLimitExceeded(String),
1011 ServerInternal(String),
1013}
1014
1015impl GetLicenseConfigurationError {
1016 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLicenseConfigurationError> {
1017 if let Some(err) = proto::json::Error::parse(&res) {
1018 match err.typ.as_str() {
1019 "AccessDeniedException" => {
1020 return RusotoError::Service(GetLicenseConfigurationError::AccessDenied(
1021 err.msg,
1022 ))
1023 }
1024 "AuthorizationException" => {
1025 return RusotoError::Service(GetLicenseConfigurationError::Authorization(
1026 err.msg,
1027 ))
1028 }
1029 "InvalidParameterValueException" => {
1030 return RusotoError::Service(
1031 GetLicenseConfigurationError::InvalidParameterValue(err.msg),
1032 )
1033 }
1034 "RateLimitExceededException" => {
1035 return RusotoError::Service(GetLicenseConfigurationError::RateLimitExceeded(
1036 err.msg,
1037 ))
1038 }
1039 "ServerInternalException" => {
1040 return RusotoError::Service(GetLicenseConfigurationError::ServerInternal(
1041 err.msg,
1042 ))
1043 }
1044 "ValidationException" => return RusotoError::Validation(err.msg),
1045 _ => {}
1046 }
1047 }
1048 RusotoError::Unknown(res)
1049 }
1050}
1051impl fmt::Display for GetLicenseConfigurationError {
1052 #[allow(unused_variables)]
1053 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1054 match *self {
1055 GetLicenseConfigurationError::AccessDenied(ref cause) => write!(f, "{}", cause),
1056 GetLicenseConfigurationError::Authorization(ref cause) => write!(f, "{}", cause),
1057 GetLicenseConfigurationError::InvalidParameterValue(ref cause) => {
1058 write!(f, "{}", cause)
1059 }
1060 GetLicenseConfigurationError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1061 GetLicenseConfigurationError::ServerInternal(ref cause) => write!(f, "{}", cause),
1062 }
1063 }
1064}
1065impl Error for GetLicenseConfigurationError {}
1066#[derive(Debug, PartialEq)]
1068pub enum GetServiceSettingsError {
1069 AccessDenied(String),
1071 Authorization(String),
1073 RateLimitExceeded(String),
1075 ServerInternal(String),
1077}
1078
1079impl GetServiceSettingsError {
1080 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetServiceSettingsError> {
1081 if let Some(err) = proto::json::Error::parse(&res) {
1082 match err.typ.as_str() {
1083 "AccessDeniedException" => {
1084 return RusotoError::Service(GetServiceSettingsError::AccessDenied(err.msg))
1085 }
1086 "AuthorizationException" => {
1087 return RusotoError::Service(GetServiceSettingsError::Authorization(err.msg))
1088 }
1089 "RateLimitExceededException" => {
1090 return RusotoError::Service(GetServiceSettingsError::RateLimitExceeded(
1091 err.msg,
1092 ))
1093 }
1094 "ServerInternalException" => {
1095 return RusotoError::Service(GetServiceSettingsError::ServerInternal(err.msg))
1096 }
1097 "ValidationException" => return RusotoError::Validation(err.msg),
1098 _ => {}
1099 }
1100 }
1101 RusotoError::Unknown(res)
1102 }
1103}
1104impl fmt::Display for GetServiceSettingsError {
1105 #[allow(unused_variables)]
1106 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1107 match *self {
1108 GetServiceSettingsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1109 GetServiceSettingsError::Authorization(ref cause) => write!(f, "{}", cause),
1110 GetServiceSettingsError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1111 GetServiceSettingsError::ServerInternal(ref cause) => write!(f, "{}", cause),
1112 }
1113 }
1114}
1115impl Error for GetServiceSettingsError {}
1116#[derive(Debug, PartialEq)]
1118pub enum ListAssociationsForLicenseConfigurationError {
1119 AccessDenied(String),
1121 Authorization(String),
1123 FilterLimitExceeded(String),
1125 InvalidParameterValue(String),
1127 RateLimitExceeded(String),
1129 ServerInternal(String),
1131}
1132
1133impl ListAssociationsForLicenseConfigurationError {
1134 pub fn from_response(
1135 res: BufferedHttpResponse,
1136 ) -> RusotoError<ListAssociationsForLicenseConfigurationError> {
1137 if let Some(err) = proto::json::Error::parse(&res) {
1138 match err.typ.as_str() {
1139 "AccessDeniedException" => {
1140 return RusotoError::Service(
1141 ListAssociationsForLicenseConfigurationError::AccessDenied(err.msg),
1142 )
1143 }
1144 "AuthorizationException" => {
1145 return RusotoError::Service(
1146 ListAssociationsForLicenseConfigurationError::Authorization(err.msg),
1147 )
1148 }
1149 "FilterLimitExceededException" => {
1150 return RusotoError::Service(
1151 ListAssociationsForLicenseConfigurationError::FilterLimitExceeded(err.msg),
1152 )
1153 }
1154 "InvalidParameterValueException" => {
1155 return RusotoError::Service(
1156 ListAssociationsForLicenseConfigurationError::InvalidParameterValue(
1157 err.msg,
1158 ),
1159 )
1160 }
1161 "RateLimitExceededException" => {
1162 return RusotoError::Service(
1163 ListAssociationsForLicenseConfigurationError::RateLimitExceeded(err.msg),
1164 )
1165 }
1166 "ServerInternalException" => {
1167 return RusotoError::Service(
1168 ListAssociationsForLicenseConfigurationError::ServerInternal(err.msg),
1169 )
1170 }
1171 "ValidationException" => return RusotoError::Validation(err.msg),
1172 _ => {}
1173 }
1174 }
1175 RusotoError::Unknown(res)
1176 }
1177}
1178impl fmt::Display for ListAssociationsForLicenseConfigurationError {
1179 #[allow(unused_variables)]
1180 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1181 match *self {
1182 ListAssociationsForLicenseConfigurationError::AccessDenied(ref cause) => {
1183 write!(f, "{}", cause)
1184 }
1185 ListAssociationsForLicenseConfigurationError::Authorization(ref cause) => {
1186 write!(f, "{}", cause)
1187 }
1188 ListAssociationsForLicenseConfigurationError::FilterLimitExceeded(ref cause) => {
1189 write!(f, "{}", cause)
1190 }
1191 ListAssociationsForLicenseConfigurationError::InvalidParameterValue(ref cause) => {
1192 write!(f, "{}", cause)
1193 }
1194 ListAssociationsForLicenseConfigurationError::RateLimitExceeded(ref cause) => {
1195 write!(f, "{}", cause)
1196 }
1197 ListAssociationsForLicenseConfigurationError::ServerInternal(ref cause) => {
1198 write!(f, "{}", cause)
1199 }
1200 }
1201 }
1202}
1203impl Error for ListAssociationsForLicenseConfigurationError {}
1204#[derive(Debug, PartialEq)]
1206pub enum ListFailuresForLicenseConfigurationOperationsError {
1207 AccessDenied(String),
1209 Authorization(String),
1211 InvalidParameterValue(String),
1213 RateLimitExceeded(String),
1215 ServerInternal(String),
1217}
1218
1219impl ListFailuresForLicenseConfigurationOperationsError {
1220 pub fn from_response(
1221 res: BufferedHttpResponse,
1222 ) -> RusotoError<ListFailuresForLicenseConfigurationOperationsError> {
1223 if let Some(err) = proto::json::Error::parse(&res) {
1224 match err.typ.as_str() {
1225 "AccessDeniedException" => {
1226 return RusotoError::Service(
1227 ListFailuresForLicenseConfigurationOperationsError::AccessDenied(err.msg),
1228 )
1229 }
1230 "AuthorizationException" => {
1231 return RusotoError::Service(
1232 ListFailuresForLicenseConfigurationOperationsError::Authorization(err.msg),
1233 )
1234 }
1235 "InvalidParameterValueException" => {
1236 return RusotoError::Service(
1237 ListFailuresForLicenseConfigurationOperationsError::InvalidParameterValue(
1238 err.msg,
1239 ),
1240 )
1241 }
1242 "RateLimitExceededException" => {
1243 return RusotoError::Service(
1244 ListFailuresForLicenseConfigurationOperationsError::RateLimitExceeded(
1245 err.msg,
1246 ),
1247 )
1248 }
1249 "ServerInternalException" => {
1250 return RusotoError::Service(
1251 ListFailuresForLicenseConfigurationOperationsError::ServerInternal(err.msg),
1252 )
1253 }
1254 "ValidationException" => return RusotoError::Validation(err.msg),
1255 _ => {}
1256 }
1257 }
1258 RusotoError::Unknown(res)
1259 }
1260}
1261impl fmt::Display for ListFailuresForLicenseConfigurationOperationsError {
1262 #[allow(unused_variables)]
1263 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1264 match *self {
1265 ListFailuresForLicenseConfigurationOperationsError::AccessDenied(ref cause) => {
1266 write!(f, "{}", cause)
1267 }
1268 ListFailuresForLicenseConfigurationOperationsError::Authorization(ref cause) => {
1269 write!(f, "{}", cause)
1270 }
1271 ListFailuresForLicenseConfigurationOperationsError::InvalidParameterValue(
1272 ref cause,
1273 ) => write!(f, "{}", cause),
1274 ListFailuresForLicenseConfigurationOperationsError::RateLimitExceeded(ref cause) => {
1275 write!(f, "{}", cause)
1276 }
1277 ListFailuresForLicenseConfigurationOperationsError::ServerInternal(ref cause) => {
1278 write!(f, "{}", cause)
1279 }
1280 }
1281 }
1282}
1283impl Error for ListFailuresForLicenseConfigurationOperationsError {}
1284#[derive(Debug, PartialEq)]
1286pub enum ListLicenseConfigurationsError {
1287 AccessDenied(String),
1289 Authorization(String),
1291 FilterLimitExceeded(String),
1293 InvalidParameterValue(String),
1295 RateLimitExceeded(String),
1297 ServerInternal(String),
1299}
1300
1301impl ListLicenseConfigurationsError {
1302 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLicenseConfigurationsError> {
1303 if let Some(err) = proto::json::Error::parse(&res) {
1304 match err.typ.as_str() {
1305 "AccessDeniedException" => {
1306 return RusotoError::Service(ListLicenseConfigurationsError::AccessDenied(
1307 err.msg,
1308 ))
1309 }
1310 "AuthorizationException" => {
1311 return RusotoError::Service(ListLicenseConfigurationsError::Authorization(
1312 err.msg,
1313 ))
1314 }
1315 "FilterLimitExceededException" => {
1316 return RusotoError::Service(
1317 ListLicenseConfigurationsError::FilterLimitExceeded(err.msg),
1318 )
1319 }
1320 "InvalidParameterValueException" => {
1321 return RusotoError::Service(
1322 ListLicenseConfigurationsError::InvalidParameterValue(err.msg),
1323 )
1324 }
1325 "RateLimitExceededException" => {
1326 return RusotoError::Service(ListLicenseConfigurationsError::RateLimitExceeded(
1327 err.msg,
1328 ))
1329 }
1330 "ServerInternalException" => {
1331 return RusotoError::Service(ListLicenseConfigurationsError::ServerInternal(
1332 err.msg,
1333 ))
1334 }
1335 "ValidationException" => return RusotoError::Validation(err.msg),
1336 _ => {}
1337 }
1338 }
1339 RusotoError::Unknown(res)
1340 }
1341}
1342impl fmt::Display for ListLicenseConfigurationsError {
1343 #[allow(unused_variables)]
1344 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1345 match *self {
1346 ListLicenseConfigurationsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1347 ListLicenseConfigurationsError::Authorization(ref cause) => write!(f, "{}", cause),
1348 ListLicenseConfigurationsError::FilterLimitExceeded(ref cause) => {
1349 write!(f, "{}", cause)
1350 }
1351 ListLicenseConfigurationsError::InvalidParameterValue(ref cause) => {
1352 write!(f, "{}", cause)
1353 }
1354 ListLicenseConfigurationsError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1355 ListLicenseConfigurationsError::ServerInternal(ref cause) => write!(f, "{}", cause),
1356 }
1357 }
1358}
1359impl Error for ListLicenseConfigurationsError {}
1360#[derive(Debug, PartialEq)]
1362pub enum ListLicenseSpecificationsForResourceError {
1363 AccessDenied(String),
1365 Authorization(String),
1367 InvalidParameterValue(String),
1369 RateLimitExceeded(String),
1371 ServerInternal(String),
1373}
1374
1375impl ListLicenseSpecificationsForResourceError {
1376 pub fn from_response(
1377 res: BufferedHttpResponse,
1378 ) -> RusotoError<ListLicenseSpecificationsForResourceError> {
1379 if let Some(err) = proto::json::Error::parse(&res) {
1380 match err.typ.as_str() {
1381 "AccessDeniedException" => {
1382 return RusotoError::Service(
1383 ListLicenseSpecificationsForResourceError::AccessDenied(err.msg),
1384 )
1385 }
1386 "AuthorizationException" => {
1387 return RusotoError::Service(
1388 ListLicenseSpecificationsForResourceError::Authorization(err.msg),
1389 )
1390 }
1391 "InvalidParameterValueException" => {
1392 return RusotoError::Service(
1393 ListLicenseSpecificationsForResourceError::InvalidParameterValue(err.msg),
1394 )
1395 }
1396 "RateLimitExceededException" => {
1397 return RusotoError::Service(
1398 ListLicenseSpecificationsForResourceError::RateLimitExceeded(err.msg),
1399 )
1400 }
1401 "ServerInternalException" => {
1402 return RusotoError::Service(
1403 ListLicenseSpecificationsForResourceError::ServerInternal(err.msg),
1404 )
1405 }
1406 "ValidationException" => return RusotoError::Validation(err.msg),
1407 _ => {}
1408 }
1409 }
1410 RusotoError::Unknown(res)
1411 }
1412}
1413impl fmt::Display for ListLicenseSpecificationsForResourceError {
1414 #[allow(unused_variables)]
1415 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1416 match *self {
1417 ListLicenseSpecificationsForResourceError::AccessDenied(ref cause) => {
1418 write!(f, "{}", cause)
1419 }
1420 ListLicenseSpecificationsForResourceError::Authorization(ref cause) => {
1421 write!(f, "{}", cause)
1422 }
1423 ListLicenseSpecificationsForResourceError::InvalidParameterValue(ref cause) => {
1424 write!(f, "{}", cause)
1425 }
1426 ListLicenseSpecificationsForResourceError::RateLimitExceeded(ref cause) => {
1427 write!(f, "{}", cause)
1428 }
1429 ListLicenseSpecificationsForResourceError::ServerInternal(ref cause) => {
1430 write!(f, "{}", cause)
1431 }
1432 }
1433 }
1434}
1435impl Error for ListLicenseSpecificationsForResourceError {}
1436#[derive(Debug, PartialEq)]
1438pub enum ListResourceInventoryError {
1439 AccessDenied(String),
1441 Authorization(String),
1443 FailedDependency(String),
1445 FilterLimitExceeded(String),
1447 InvalidParameterValue(String),
1449 RateLimitExceeded(String),
1451 ServerInternal(String),
1453}
1454
1455impl ListResourceInventoryError {
1456 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListResourceInventoryError> {
1457 if let Some(err) = proto::json::Error::parse(&res) {
1458 match err.typ.as_str() {
1459 "AccessDeniedException" => {
1460 return RusotoError::Service(ListResourceInventoryError::AccessDenied(err.msg))
1461 }
1462 "AuthorizationException" => {
1463 return RusotoError::Service(ListResourceInventoryError::Authorization(err.msg))
1464 }
1465 "FailedDependencyException" => {
1466 return RusotoError::Service(ListResourceInventoryError::FailedDependency(
1467 err.msg,
1468 ))
1469 }
1470 "FilterLimitExceededException" => {
1471 return RusotoError::Service(ListResourceInventoryError::FilterLimitExceeded(
1472 err.msg,
1473 ))
1474 }
1475 "InvalidParameterValueException" => {
1476 return RusotoError::Service(ListResourceInventoryError::InvalidParameterValue(
1477 err.msg,
1478 ))
1479 }
1480 "RateLimitExceededException" => {
1481 return RusotoError::Service(ListResourceInventoryError::RateLimitExceeded(
1482 err.msg,
1483 ))
1484 }
1485 "ServerInternalException" => {
1486 return RusotoError::Service(ListResourceInventoryError::ServerInternal(
1487 err.msg,
1488 ))
1489 }
1490 "ValidationException" => return RusotoError::Validation(err.msg),
1491 _ => {}
1492 }
1493 }
1494 RusotoError::Unknown(res)
1495 }
1496}
1497impl fmt::Display for ListResourceInventoryError {
1498 #[allow(unused_variables)]
1499 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1500 match *self {
1501 ListResourceInventoryError::AccessDenied(ref cause) => write!(f, "{}", cause),
1502 ListResourceInventoryError::Authorization(ref cause) => write!(f, "{}", cause),
1503 ListResourceInventoryError::FailedDependency(ref cause) => write!(f, "{}", cause),
1504 ListResourceInventoryError::FilterLimitExceeded(ref cause) => write!(f, "{}", cause),
1505 ListResourceInventoryError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1506 ListResourceInventoryError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1507 ListResourceInventoryError::ServerInternal(ref cause) => write!(f, "{}", cause),
1508 }
1509 }
1510}
1511impl Error for ListResourceInventoryError {}
1512#[derive(Debug, PartialEq)]
1514pub enum ListTagsForResourceError {
1515 AccessDenied(String),
1517 Authorization(String),
1519 InvalidParameterValue(String),
1521 RateLimitExceeded(String),
1523 ServerInternal(String),
1525}
1526
1527impl ListTagsForResourceError {
1528 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
1529 if let Some(err) = proto::json::Error::parse(&res) {
1530 match err.typ.as_str() {
1531 "AccessDeniedException" => {
1532 return RusotoError::Service(ListTagsForResourceError::AccessDenied(err.msg))
1533 }
1534 "AuthorizationException" => {
1535 return RusotoError::Service(ListTagsForResourceError::Authorization(err.msg))
1536 }
1537 "InvalidParameterValueException" => {
1538 return RusotoError::Service(ListTagsForResourceError::InvalidParameterValue(
1539 err.msg,
1540 ))
1541 }
1542 "RateLimitExceededException" => {
1543 return RusotoError::Service(ListTagsForResourceError::RateLimitExceeded(
1544 err.msg,
1545 ))
1546 }
1547 "ServerInternalException" => {
1548 return RusotoError::Service(ListTagsForResourceError::ServerInternal(err.msg))
1549 }
1550 "ValidationException" => return RusotoError::Validation(err.msg),
1551 _ => {}
1552 }
1553 }
1554 RusotoError::Unknown(res)
1555 }
1556}
1557impl fmt::Display for ListTagsForResourceError {
1558 #[allow(unused_variables)]
1559 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1560 match *self {
1561 ListTagsForResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
1562 ListTagsForResourceError::Authorization(ref cause) => write!(f, "{}", cause),
1563 ListTagsForResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1564 ListTagsForResourceError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1565 ListTagsForResourceError::ServerInternal(ref cause) => write!(f, "{}", cause),
1566 }
1567 }
1568}
1569impl Error for ListTagsForResourceError {}
1570#[derive(Debug, PartialEq)]
1572pub enum ListUsageForLicenseConfigurationError {
1573 AccessDenied(String),
1575 Authorization(String),
1577 FilterLimitExceeded(String),
1579 InvalidParameterValue(String),
1581 RateLimitExceeded(String),
1583 ServerInternal(String),
1585}
1586
1587impl ListUsageForLicenseConfigurationError {
1588 pub fn from_response(
1589 res: BufferedHttpResponse,
1590 ) -> RusotoError<ListUsageForLicenseConfigurationError> {
1591 if let Some(err) = proto::json::Error::parse(&res) {
1592 match err.typ.as_str() {
1593 "AccessDeniedException" => {
1594 return RusotoError::Service(
1595 ListUsageForLicenseConfigurationError::AccessDenied(err.msg),
1596 )
1597 }
1598 "AuthorizationException" => {
1599 return RusotoError::Service(
1600 ListUsageForLicenseConfigurationError::Authorization(err.msg),
1601 )
1602 }
1603 "FilterLimitExceededException" => {
1604 return RusotoError::Service(
1605 ListUsageForLicenseConfigurationError::FilterLimitExceeded(err.msg),
1606 )
1607 }
1608 "InvalidParameterValueException" => {
1609 return RusotoError::Service(
1610 ListUsageForLicenseConfigurationError::InvalidParameterValue(err.msg),
1611 )
1612 }
1613 "RateLimitExceededException" => {
1614 return RusotoError::Service(
1615 ListUsageForLicenseConfigurationError::RateLimitExceeded(err.msg),
1616 )
1617 }
1618 "ServerInternalException" => {
1619 return RusotoError::Service(
1620 ListUsageForLicenseConfigurationError::ServerInternal(err.msg),
1621 )
1622 }
1623 "ValidationException" => return RusotoError::Validation(err.msg),
1624 _ => {}
1625 }
1626 }
1627 RusotoError::Unknown(res)
1628 }
1629}
1630impl fmt::Display for ListUsageForLicenseConfigurationError {
1631 #[allow(unused_variables)]
1632 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1633 match *self {
1634 ListUsageForLicenseConfigurationError::AccessDenied(ref cause) => {
1635 write!(f, "{}", cause)
1636 }
1637 ListUsageForLicenseConfigurationError::Authorization(ref cause) => {
1638 write!(f, "{}", cause)
1639 }
1640 ListUsageForLicenseConfigurationError::FilterLimitExceeded(ref cause) => {
1641 write!(f, "{}", cause)
1642 }
1643 ListUsageForLicenseConfigurationError::InvalidParameterValue(ref cause) => {
1644 write!(f, "{}", cause)
1645 }
1646 ListUsageForLicenseConfigurationError::RateLimitExceeded(ref cause) => {
1647 write!(f, "{}", cause)
1648 }
1649 ListUsageForLicenseConfigurationError::ServerInternal(ref cause) => {
1650 write!(f, "{}", cause)
1651 }
1652 }
1653 }
1654}
1655impl Error for ListUsageForLicenseConfigurationError {}
1656#[derive(Debug, PartialEq)]
1658pub enum TagResourceError {
1659 AccessDenied(String),
1661 Authorization(String),
1663 InvalidParameterValue(String),
1665 RateLimitExceeded(String),
1667 ServerInternal(String),
1669}
1670
1671impl TagResourceError {
1672 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
1673 if let Some(err) = proto::json::Error::parse(&res) {
1674 match err.typ.as_str() {
1675 "AccessDeniedException" => {
1676 return RusotoError::Service(TagResourceError::AccessDenied(err.msg))
1677 }
1678 "AuthorizationException" => {
1679 return RusotoError::Service(TagResourceError::Authorization(err.msg))
1680 }
1681 "InvalidParameterValueException" => {
1682 return RusotoError::Service(TagResourceError::InvalidParameterValue(err.msg))
1683 }
1684 "RateLimitExceededException" => {
1685 return RusotoError::Service(TagResourceError::RateLimitExceeded(err.msg))
1686 }
1687 "ServerInternalException" => {
1688 return RusotoError::Service(TagResourceError::ServerInternal(err.msg))
1689 }
1690 "ValidationException" => return RusotoError::Validation(err.msg),
1691 _ => {}
1692 }
1693 }
1694 RusotoError::Unknown(res)
1695 }
1696}
1697impl fmt::Display for TagResourceError {
1698 #[allow(unused_variables)]
1699 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1700 match *self {
1701 TagResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
1702 TagResourceError::Authorization(ref cause) => write!(f, "{}", cause),
1703 TagResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1704 TagResourceError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1705 TagResourceError::ServerInternal(ref cause) => write!(f, "{}", cause),
1706 }
1707 }
1708}
1709impl Error for TagResourceError {}
1710#[derive(Debug, PartialEq)]
1712pub enum UntagResourceError {
1713 AccessDenied(String),
1715 Authorization(String),
1717 InvalidParameterValue(String),
1719 RateLimitExceeded(String),
1721 ServerInternal(String),
1723}
1724
1725impl UntagResourceError {
1726 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
1727 if let Some(err) = proto::json::Error::parse(&res) {
1728 match err.typ.as_str() {
1729 "AccessDeniedException" => {
1730 return RusotoError::Service(UntagResourceError::AccessDenied(err.msg))
1731 }
1732 "AuthorizationException" => {
1733 return RusotoError::Service(UntagResourceError::Authorization(err.msg))
1734 }
1735 "InvalidParameterValueException" => {
1736 return RusotoError::Service(UntagResourceError::InvalidParameterValue(err.msg))
1737 }
1738 "RateLimitExceededException" => {
1739 return RusotoError::Service(UntagResourceError::RateLimitExceeded(err.msg))
1740 }
1741 "ServerInternalException" => {
1742 return RusotoError::Service(UntagResourceError::ServerInternal(err.msg))
1743 }
1744 "ValidationException" => return RusotoError::Validation(err.msg),
1745 _ => {}
1746 }
1747 }
1748 RusotoError::Unknown(res)
1749 }
1750}
1751impl fmt::Display for UntagResourceError {
1752 #[allow(unused_variables)]
1753 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1754 match *self {
1755 UntagResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
1756 UntagResourceError::Authorization(ref cause) => write!(f, "{}", cause),
1757 UntagResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1758 UntagResourceError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1759 UntagResourceError::ServerInternal(ref cause) => write!(f, "{}", cause),
1760 }
1761 }
1762}
1763impl Error for UntagResourceError {}
1764#[derive(Debug, PartialEq)]
1766pub enum UpdateLicenseConfigurationError {
1767 AccessDenied(String),
1769 Authorization(String),
1771 InvalidParameterValue(String),
1773 RateLimitExceeded(String),
1775 ServerInternal(String),
1777}
1778
1779impl UpdateLicenseConfigurationError {
1780 pub fn from_response(
1781 res: BufferedHttpResponse,
1782 ) -> RusotoError<UpdateLicenseConfigurationError> {
1783 if let Some(err) = proto::json::Error::parse(&res) {
1784 match err.typ.as_str() {
1785 "AccessDeniedException" => {
1786 return RusotoError::Service(UpdateLicenseConfigurationError::AccessDenied(
1787 err.msg,
1788 ))
1789 }
1790 "AuthorizationException" => {
1791 return RusotoError::Service(UpdateLicenseConfigurationError::Authorization(
1792 err.msg,
1793 ))
1794 }
1795 "InvalidParameterValueException" => {
1796 return RusotoError::Service(
1797 UpdateLicenseConfigurationError::InvalidParameterValue(err.msg),
1798 )
1799 }
1800 "RateLimitExceededException" => {
1801 return RusotoError::Service(
1802 UpdateLicenseConfigurationError::RateLimitExceeded(err.msg),
1803 )
1804 }
1805 "ServerInternalException" => {
1806 return RusotoError::Service(UpdateLicenseConfigurationError::ServerInternal(
1807 err.msg,
1808 ))
1809 }
1810 "ValidationException" => return RusotoError::Validation(err.msg),
1811 _ => {}
1812 }
1813 }
1814 RusotoError::Unknown(res)
1815 }
1816}
1817impl fmt::Display for UpdateLicenseConfigurationError {
1818 #[allow(unused_variables)]
1819 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1820 match *self {
1821 UpdateLicenseConfigurationError::AccessDenied(ref cause) => write!(f, "{}", cause),
1822 UpdateLicenseConfigurationError::Authorization(ref cause) => write!(f, "{}", cause),
1823 UpdateLicenseConfigurationError::InvalidParameterValue(ref cause) => {
1824 write!(f, "{}", cause)
1825 }
1826 UpdateLicenseConfigurationError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1827 UpdateLicenseConfigurationError::ServerInternal(ref cause) => write!(f, "{}", cause),
1828 }
1829 }
1830}
1831impl Error for UpdateLicenseConfigurationError {}
1832#[derive(Debug, PartialEq)]
1834pub enum UpdateLicenseSpecificationsForResourceError {
1835 AccessDenied(String),
1837 Authorization(String),
1839 InvalidParameterValue(String),
1841 InvalidResourceState(String),
1843 LicenseUsage(String),
1845 RateLimitExceeded(String),
1847 ServerInternal(String),
1849}
1850
1851impl UpdateLicenseSpecificationsForResourceError {
1852 pub fn from_response(
1853 res: BufferedHttpResponse,
1854 ) -> RusotoError<UpdateLicenseSpecificationsForResourceError> {
1855 if let Some(err) = proto::json::Error::parse(&res) {
1856 match err.typ.as_str() {
1857 "AccessDeniedException" => {
1858 return RusotoError::Service(
1859 UpdateLicenseSpecificationsForResourceError::AccessDenied(err.msg),
1860 )
1861 }
1862 "AuthorizationException" => {
1863 return RusotoError::Service(
1864 UpdateLicenseSpecificationsForResourceError::Authorization(err.msg),
1865 )
1866 }
1867 "InvalidParameterValueException" => {
1868 return RusotoError::Service(
1869 UpdateLicenseSpecificationsForResourceError::InvalidParameterValue(err.msg),
1870 )
1871 }
1872 "InvalidResourceStateException" => {
1873 return RusotoError::Service(
1874 UpdateLicenseSpecificationsForResourceError::InvalidResourceState(err.msg),
1875 )
1876 }
1877 "LicenseUsageException" => {
1878 return RusotoError::Service(
1879 UpdateLicenseSpecificationsForResourceError::LicenseUsage(err.msg),
1880 )
1881 }
1882 "RateLimitExceededException" => {
1883 return RusotoError::Service(
1884 UpdateLicenseSpecificationsForResourceError::RateLimitExceeded(err.msg),
1885 )
1886 }
1887 "ServerInternalException" => {
1888 return RusotoError::Service(
1889 UpdateLicenseSpecificationsForResourceError::ServerInternal(err.msg),
1890 )
1891 }
1892 "ValidationException" => return RusotoError::Validation(err.msg),
1893 _ => {}
1894 }
1895 }
1896 RusotoError::Unknown(res)
1897 }
1898}
1899impl fmt::Display for UpdateLicenseSpecificationsForResourceError {
1900 #[allow(unused_variables)]
1901 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1902 match *self {
1903 UpdateLicenseSpecificationsForResourceError::AccessDenied(ref cause) => {
1904 write!(f, "{}", cause)
1905 }
1906 UpdateLicenseSpecificationsForResourceError::Authorization(ref cause) => {
1907 write!(f, "{}", cause)
1908 }
1909 UpdateLicenseSpecificationsForResourceError::InvalidParameterValue(ref cause) => {
1910 write!(f, "{}", cause)
1911 }
1912 UpdateLicenseSpecificationsForResourceError::InvalidResourceState(ref cause) => {
1913 write!(f, "{}", cause)
1914 }
1915 UpdateLicenseSpecificationsForResourceError::LicenseUsage(ref cause) => {
1916 write!(f, "{}", cause)
1917 }
1918 UpdateLicenseSpecificationsForResourceError::RateLimitExceeded(ref cause) => {
1919 write!(f, "{}", cause)
1920 }
1921 UpdateLicenseSpecificationsForResourceError::ServerInternal(ref cause) => {
1922 write!(f, "{}", cause)
1923 }
1924 }
1925 }
1926}
1927impl Error for UpdateLicenseSpecificationsForResourceError {}
1928#[derive(Debug, PartialEq)]
1930pub enum UpdateServiceSettingsError {
1931 AccessDenied(String),
1933 Authorization(String),
1935 InvalidParameterValue(String),
1937 RateLimitExceeded(String),
1939 ServerInternal(String),
1941}
1942
1943impl UpdateServiceSettingsError {
1944 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateServiceSettingsError> {
1945 if let Some(err) = proto::json::Error::parse(&res) {
1946 match err.typ.as_str() {
1947 "AccessDeniedException" => {
1948 return RusotoError::Service(UpdateServiceSettingsError::AccessDenied(err.msg))
1949 }
1950 "AuthorizationException" => {
1951 return RusotoError::Service(UpdateServiceSettingsError::Authorization(err.msg))
1952 }
1953 "InvalidParameterValueException" => {
1954 return RusotoError::Service(UpdateServiceSettingsError::InvalidParameterValue(
1955 err.msg,
1956 ))
1957 }
1958 "RateLimitExceededException" => {
1959 return RusotoError::Service(UpdateServiceSettingsError::RateLimitExceeded(
1960 err.msg,
1961 ))
1962 }
1963 "ServerInternalException" => {
1964 return RusotoError::Service(UpdateServiceSettingsError::ServerInternal(
1965 err.msg,
1966 ))
1967 }
1968 "ValidationException" => return RusotoError::Validation(err.msg),
1969 _ => {}
1970 }
1971 }
1972 RusotoError::Unknown(res)
1973 }
1974}
1975impl fmt::Display for UpdateServiceSettingsError {
1976 #[allow(unused_variables)]
1977 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1978 match *self {
1979 UpdateServiceSettingsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1980 UpdateServiceSettingsError::Authorization(ref cause) => write!(f, "{}", cause),
1981 UpdateServiceSettingsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1982 UpdateServiceSettingsError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1983 UpdateServiceSettingsError::ServerInternal(ref cause) => write!(f, "{}", cause),
1984 }
1985 }
1986}
1987impl Error for UpdateServiceSettingsError {}
1988#[async_trait]
1990pub trait LicenseManager {
1991 async fn create_license_configuration(
1993 &self,
1994 input: CreateLicenseConfigurationRequest,
1995 ) -> Result<CreateLicenseConfigurationResponse, RusotoError<CreateLicenseConfigurationError>>;
1996
1997 async fn delete_license_configuration(
1999 &self,
2000 input: DeleteLicenseConfigurationRequest,
2001 ) -> Result<DeleteLicenseConfigurationResponse, RusotoError<DeleteLicenseConfigurationError>>;
2002
2003 async fn get_license_configuration(
2005 &self,
2006 input: GetLicenseConfigurationRequest,
2007 ) -> Result<GetLicenseConfigurationResponse, RusotoError<GetLicenseConfigurationError>>;
2008
2009 async fn get_service_settings(
2011 &self,
2012 ) -> Result<GetServiceSettingsResponse, RusotoError<GetServiceSettingsError>>;
2013
2014 async fn list_associations_for_license_configuration(
2016 &self,
2017 input: ListAssociationsForLicenseConfigurationRequest,
2018 ) -> Result<
2019 ListAssociationsForLicenseConfigurationResponse,
2020 RusotoError<ListAssociationsForLicenseConfigurationError>,
2021 >;
2022
2023 async fn list_failures_for_license_configuration_operations(
2025 &self,
2026 input: ListFailuresForLicenseConfigurationOperationsRequest,
2027 ) -> Result<
2028 ListFailuresForLicenseConfigurationOperationsResponse,
2029 RusotoError<ListFailuresForLicenseConfigurationOperationsError>,
2030 >;
2031
2032 async fn list_license_configurations(
2034 &self,
2035 input: ListLicenseConfigurationsRequest,
2036 ) -> Result<ListLicenseConfigurationsResponse, RusotoError<ListLicenseConfigurationsError>>;
2037
2038 async fn list_license_specifications_for_resource(
2040 &self,
2041 input: ListLicenseSpecificationsForResourceRequest,
2042 ) -> Result<
2043 ListLicenseSpecificationsForResourceResponse,
2044 RusotoError<ListLicenseSpecificationsForResourceError>,
2045 >;
2046
2047 async fn list_resource_inventory(
2049 &self,
2050 input: ListResourceInventoryRequest,
2051 ) -> Result<ListResourceInventoryResponse, RusotoError<ListResourceInventoryError>>;
2052
2053 async fn list_tags_for_resource(
2055 &self,
2056 input: ListTagsForResourceRequest,
2057 ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2058
2059 async fn list_usage_for_license_configuration(
2061 &self,
2062 input: ListUsageForLicenseConfigurationRequest,
2063 ) -> Result<
2064 ListUsageForLicenseConfigurationResponse,
2065 RusotoError<ListUsageForLicenseConfigurationError>,
2066 >;
2067
2068 async fn tag_resource(
2070 &self,
2071 input: TagResourceRequest,
2072 ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
2073
2074 async fn untag_resource(
2076 &self,
2077 input: UntagResourceRequest,
2078 ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
2079
2080 async fn update_license_configuration(
2082 &self,
2083 input: UpdateLicenseConfigurationRequest,
2084 ) -> Result<UpdateLicenseConfigurationResponse, RusotoError<UpdateLicenseConfigurationError>>;
2085
2086 async fn update_license_specifications_for_resource(
2088 &self,
2089 input: UpdateLicenseSpecificationsForResourceRequest,
2090 ) -> Result<
2091 UpdateLicenseSpecificationsForResourceResponse,
2092 RusotoError<UpdateLicenseSpecificationsForResourceError>,
2093 >;
2094
2095 async fn update_service_settings(
2097 &self,
2098 input: UpdateServiceSettingsRequest,
2099 ) -> Result<UpdateServiceSettingsResponse, RusotoError<UpdateServiceSettingsError>>;
2100}
2101#[derive(Clone)]
2103pub struct LicenseManagerClient {
2104 client: Client,
2105 region: region::Region,
2106}
2107
2108impl LicenseManagerClient {
2109 pub fn new(region: region::Region) -> LicenseManagerClient {
2113 LicenseManagerClient {
2114 client: Client::shared(),
2115 region,
2116 }
2117 }
2118
2119 pub fn new_with<P, D>(
2120 request_dispatcher: D,
2121 credentials_provider: P,
2122 region: region::Region,
2123 ) -> LicenseManagerClient
2124 where
2125 P: ProvideAwsCredentials + Send + Sync + 'static,
2126 D: DispatchSignedRequest + Send + Sync + 'static,
2127 {
2128 LicenseManagerClient {
2129 client: Client::new_with(credentials_provider, request_dispatcher),
2130 region,
2131 }
2132 }
2133
2134 pub fn new_with_client(client: Client, region: region::Region) -> LicenseManagerClient {
2135 LicenseManagerClient { client, region }
2136 }
2137}
2138
2139#[async_trait]
2140impl LicenseManager for LicenseManagerClient {
2141 async fn create_license_configuration(
2143 &self,
2144 input: CreateLicenseConfigurationRequest,
2145 ) -> Result<CreateLicenseConfigurationResponse, RusotoError<CreateLicenseConfigurationError>>
2146 {
2147 let mut request = self.new_signed_request("POST", "/");
2148 request.add_header(
2149 "x-amz-target",
2150 "AWSLicenseManager.CreateLicenseConfiguration",
2151 );
2152 let encoded = serde_json::to_string(&input).unwrap();
2153 request.set_payload(Some(encoded));
2154
2155 let response = self
2156 .sign_and_dispatch(request, CreateLicenseConfigurationError::from_response)
2157 .await?;
2158 let mut response = response;
2159 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2160 proto::json::ResponsePayload::new(&response)
2161 .deserialize::<CreateLicenseConfigurationResponse, _>()
2162 }
2163
2164 async fn delete_license_configuration(
2166 &self,
2167 input: DeleteLicenseConfigurationRequest,
2168 ) -> Result<DeleteLicenseConfigurationResponse, RusotoError<DeleteLicenseConfigurationError>>
2169 {
2170 let mut request = self.new_signed_request("POST", "/");
2171 request.add_header(
2172 "x-amz-target",
2173 "AWSLicenseManager.DeleteLicenseConfiguration",
2174 );
2175 let encoded = serde_json::to_string(&input).unwrap();
2176 request.set_payload(Some(encoded));
2177
2178 let response = self
2179 .sign_and_dispatch(request, DeleteLicenseConfigurationError::from_response)
2180 .await?;
2181 let mut response = response;
2182 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2183 proto::json::ResponsePayload::new(&response)
2184 .deserialize::<DeleteLicenseConfigurationResponse, _>()
2185 }
2186
2187 async fn get_license_configuration(
2189 &self,
2190 input: GetLicenseConfigurationRequest,
2191 ) -> Result<GetLicenseConfigurationResponse, RusotoError<GetLicenseConfigurationError>> {
2192 let mut request = self.new_signed_request("POST", "/");
2193 request.add_header("x-amz-target", "AWSLicenseManager.GetLicenseConfiguration");
2194 let encoded = serde_json::to_string(&input).unwrap();
2195 request.set_payload(Some(encoded));
2196
2197 let response = self
2198 .sign_and_dispatch(request, GetLicenseConfigurationError::from_response)
2199 .await?;
2200 let mut response = response;
2201 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2202 proto::json::ResponsePayload::new(&response)
2203 .deserialize::<GetLicenseConfigurationResponse, _>()
2204 }
2205
2206 async fn get_service_settings(
2208 &self,
2209 ) -> Result<GetServiceSettingsResponse, RusotoError<GetServiceSettingsError>> {
2210 let mut request = self.new_signed_request("POST", "/");
2211 request.add_header("x-amz-target", "AWSLicenseManager.GetServiceSettings");
2212 request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
2213
2214 let response = self
2215 .sign_and_dispatch(request, GetServiceSettingsError::from_response)
2216 .await?;
2217 let mut response = response;
2218 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2219 proto::json::ResponsePayload::new(&response).deserialize::<GetServiceSettingsResponse, _>()
2220 }
2221
2222 async fn list_associations_for_license_configuration(
2224 &self,
2225 input: ListAssociationsForLicenseConfigurationRequest,
2226 ) -> Result<
2227 ListAssociationsForLicenseConfigurationResponse,
2228 RusotoError<ListAssociationsForLicenseConfigurationError>,
2229 > {
2230 let mut request = self.new_signed_request("POST", "/");
2231 request.add_header(
2232 "x-amz-target",
2233 "AWSLicenseManager.ListAssociationsForLicenseConfiguration",
2234 );
2235 let encoded = serde_json::to_string(&input).unwrap();
2236 request.set_payload(Some(encoded));
2237
2238 let response = self
2239 .sign_and_dispatch(
2240 request,
2241 ListAssociationsForLicenseConfigurationError::from_response,
2242 )
2243 .await?;
2244 let mut response = response;
2245 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2246 proto::json::ResponsePayload::new(&response)
2247 .deserialize::<ListAssociationsForLicenseConfigurationResponse, _>()
2248 }
2249
2250 async fn list_failures_for_license_configuration_operations(
2252 &self,
2253 input: ListFailuresForLicenseConfigurationOperationsRequest,
2254 ) -> Result<
2255 ListFailuresForLicenseConfigurationOperationsResponse,
2256 RusotoError<ListFailuresForLicenseConfigurationOperationsError>,
2257 > {
2258 let mut request = self.new_signed_request("POST", "/");
2259 request.add_header(
2260 "x-amz-target",
2261 "AWSLicenseManager.ListFailuresForLicenseConfigurationOperations",
2262 );
2263 let encoded = serde_json::to_string(&input).unwrap();
2264 request.set_payload(Some(encoded));
2265
2266 let response = self
2267 .sign_and_dispatch(
2268 request,
2269 ListFailuresForLicenseConfigurationOperationsError::from_response,
2270 )
2271 .await?;
2272 let mut response = response;
2273 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2274 proto::json::ResponsePayload::new(&response)
2275 .deserialize::<ListFailuresForLicenseConfigurationOperationsResponse, _>()
2276 }
2277
2278 async fn list_license_configurations(
2280 &self,
2281 input: ListLicenseConfigurationsRequest,
2282 ) -> Result<ListLicenseConfigurationsResponse, RusotoError<ListLicenseConfigurationsError>>
2283 {
2284 let mut request = self.new_signed_request("POST", "/");
2285 request.add_header(
2286 "x-amz-target",
2287 "AWSLicenseManager.ListLicenseConfigurations",
2288 );
2289 let encoded = serde_json::to_string(&input).unwrap();
2290 request.set_payload(Some(encoded));
2291
2292 let response = self
2293 .sign_and_dispatch(request, ListLicenseConfigurationsError::from_response)
2294 .await?;
2295 let mut response = response;
2296 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2297 proto::json::ResponsePayload::new(&response)
2298 .deserialize::<ListLicenseConfigurationsResponse, _>()
2299 }
2300
2301 async fn list_license_specifications_for_resource(
2303 &self,
2304 input: ListLicenseSpecificationsForResourceRequest,
2305 ) -> Result<
2306 ListLicenseSpecificationsForResourceResponse,
2307 RusotoError<ListLicenseSpecificationsForResourceError>,
2308 > {
2309 let mut request = self.new_signed_request("POST", "/");
2310 request.add_header(
2311 "x-amz-target",
2312 "AWSLicenseManager.ListLicenseSpecificationsForResource",
2313 );
2314 let encoded = serde_json::to_string(&input).unwrap();
2315 request.set_payload(Some(encoded));
2316
2317 let response = self
2318 .sign_and_dispatch(
2319 request,
2320 ListLicenseSpecificationsForResourceError::from_response,
2321 )
2322 .await?;
2323 let mut response = response;
2324 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2325 proto::json::ResponsePayload::new(&response)
2326 .deserialize::<ListLicenseSpecificationsForResourceResponse, _>()
2327 }
2328
2329 async fn list_resource_inventory(
2331 &self,
2332 input: ListResourceInventoryRequest,
2333 ) -> Result<ListResourceInventoryResponse, RusotoError<ListResourceInventoryError>> {
2334 let mut request = self.new_signed_request("POST", "/");
2335 request.add_header("x-amz-target", "AWSLicenseManager.ListResourceInventory");
2336 let encoded = serde_json::to_string(&input).unwrap();
2337 request.set_payload(Some(encoded));
2338
2339 let response = self
2340 .sign_and_dispatch(request, ListResourceInventoryError::from_response)
2341 .await?;
2342 let mut response = response;
2343 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2344 proto::json::ResponsePayload::new(&response)
2345 .deserialize::<ListResourceInventoryResponse, _>()
2346 }
2347
2348 async fn list_tags_for_resource(
2350 &self,
2351 input: ListTagsForResourceRequest,
2352 ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
2353 let mut request = self.new_signed_request("POST", "/");
2354 request.add_header("x-amz-target", "AWSLicenseManager.ListTagsForResource");
2355 let encoded = serde_json::to_string(&input).unwrap();
2356 request.set_payload(Some(encoded));
2357
2358 let response = self
2359 .sign_and_dispatch(request, ListTagsForResourceError::from_response)
2360 .await?;
2361 let mut response = response;
2362 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2363 proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceResponse, _>()
2364 }
2365
2366 async fn list_usage_for_license_configuration(
2368 &self,
2369 input: ListUsageForLicenseConfigurationRequest,
2370 ) -> Result<
2371 ListUsageForLicenseConfigurationResponse,
2372 RusotoError<ListUsageForLicenseConfigurationError>,
2373 > {
2374 let mut request = self.new_signed_request("POST", "/");
2375 request.add_header(
2376 "x-amz-target",
2377 "AWSLicenseManager.ListUsageForLicenseConfiguration",
2378 );
2379 let encoded = serde_json::to_string(&input).unwrap();
2380 request.set_payload(Some(encoded));
2381
2382 let response = self
2383 .sign_and_dispatch(
2384 request,
2385 ListUsageForLicenseConfigurationError::from_response,
2386 )
2387 .await?;
2388 let mut response = response;
2389 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2390 proto::json::ResponsePayload::new(&response)
2391 .deserialize::<ListUsageForLicenseConfigurationResponse, _>()
2392 }
2393
2394 async fn tag_resource(
2396 &self,
2397 input: TagResourceRequest,
2398 ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
2399 let mut request = self.new_signed_request("POST", "/");
2400 request.add_header("x-amz-target", "AWSLicenseManager.TagResource");
2401 let encoded = serde_json::to_string(&input).unwrap();
2402 request.set_payload(Some(encoded));
2403
2404 let response = self
2405 .sign_and_dispatch(request, TagResourceError::from_response)
2406 .await?;
2407 let mut response = response;
2408 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2409 proto::json::ResponsePayload::new(&response).deserialize::<TagResourceResponse, _>()
2410 }
2411
2412 async fn untag_resource(
2414 &self,
2415 input: UntagResourceRequest,
2416 ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
2417 let mut request = self.new_signed_request("POST", "/");
2418 request.add_header("x-amz-target", "AWSLicenseManager.UntagResource");
2419 let encoded = serde_json::to_string(&input).unwrap();
2420 request.set_payload(Some(encoded));
2421
2422 let response = self
2423 .sign_and_dispatch(request, UntagResourceError::from_response)
2424 .await?;
2425 let mut response = response;
2426 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2427 proto::json::ResponsePayload::new(&response).deserialize::<UntagResourceResponse, _>()
2428 }
2429
2430 async fn update_license_configuration(
2432 &self,
2433 input: UpdateLicenseConfigurationRequest,
2434 ) -> Result<UpdateLicenseConfigurationResponse, RusotoError<UpdateLicenseConfigurationError>>
2435 {
2436 let mut request = self.new_signed_request("POST", "/");
2437 request.add_header(
2438 "x-amz-target",
2439 "AWSLicenseManager.UpdateLicenseConfiguration",
2440 );
2441 let encoded = serde_json::to_string(&input).unwrap();
2442 request.set_payload(Some(encoded));
2443
2444 let response = self
2445 .sign_and_dispatch(request, UpdateLicenseConfigurationError::from_response)
2446 .await?;
2447 let mut response = response;
2448 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2449 proto::json::ResponsePayload::new(&response)
2450 .deserialize::<UpdateLicenseConfigurationResponse, _>()
2451 }
2452
2453 async fn update_license_specifications_for_resource(
2455 &self,
2456 input: UpdateLicenseSpecificationsForResourceRequest,
2457 ) -> Result<
2458 UpdateLicenseSpecificationsForResourceResponse,
2459 RusotoError<UpdateLicenseSpecificationsForResourceError>,
2460 > {
2461 let mut request = self.new_signed_request("POST", "/");
2462 request.add_header(
2463 "x-amz-target",
2464 "AWSLicenseManager.UpdateLicenseSpecificationsForResource",
2465 );
2466 let encoded = serde_json::to_string(&input).unwrap();
2467 request.set_payload(Some(encoded));
2468
2469 let response = self
2470 .sign_and_dispatch(
2471 request,
2472 UpdateLicenseSpecificationsForResourceError::from_response,
2473 )
2474 .await?;
2475 let mut response = response;
2476 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2477 proto::json::ResponsePayload::new(&response)
2478 .deserialize::<UpdateLicenseSpecificationsForResourceResponse, _>()
2479 }
2480
2481 async fn update_service_settings(
2483 &self,
2484 input: UpdateServiceSettingsRequest,
2485 ) -> Result<UpdateServiceSettingsResponse, RusotoError<UpdateServiceSettingsError>> {
2486 let mut request = self.new_signed_request("POST", "/");
2487 request.add_header("x-amz-target", "AWSLicenseManager.UpdateServiceSettings");
2488 let encoded = serde_json::to_string(&input).unwrap();
2489 request.set_payload(Some(encoded));
2490
2491 let response = self
2492 .sign_and_dispatch(request, UpdateServiceSettingsError::from_response)
2493 .await?;
2494 let mut response = response;
2495 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2496 proto::json::ResponsePayload::new(&response)
2497 .deserialize::<UpdateServiceSettingsResponse, _>()
2498 }
2499}