rusoto_support/generated.rs
1// =================================================================
2//
3// * WARNING *
4//
5// This file is generated!
6//
7// Changes made to this file will be overwritten. If changes are
8// required to the generated code, the service_crategen project
9// must be updated to generate the changes.
10//
11// =================================================================
12
13use 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 AWSSupportClient {
29 fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30 let mut request = SignedRequest::new(http_method, "support", &self.region, request_uri);
31
32 request.set_content_type("application/x-amz-json-1.1".to_owned());
33
34 request
35 }
36
37 async fn sign_and_dispatch<E>(
38 &self,
39 request: SignedRequest,
40 from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
41 ) -> Result<HttpResponse, RusotoError<E>> {
42 let mut response = self.client.sign_and_dispatch(request).await?;
43 if !response.status.is_success() {
44 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
45 return Err(from_response(response));
46 }
47
48 Ok(response)
49 }
50}
51
52use serde_json;
53#[derive(Clone, Debug, Default, PartialEq, Serialize)]
54#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
55pub struct AddAttachmentsToSetRequest {
56 /// <p>The ID of the attachment set. If an <code>attachmentSetId</code> is not specified, a new attachment set is created, and the ID of the set is returned in the response. If an <code>attachmentSetId</code> is specified, the attachments are added to the specified set, if it exists.</p>
57 #[serde(rename = "attachmentSetId")]
58 #[serde(skip_serializing_if = "Option::is_none")]
59 pub attachment_set_id: Option<String>,
60 /// <p>One or more attachments to add to the set. You can add up to three attachments per set. The size limit is 5 MB per attachment.</p> <p>In the <code>Attachment</code> object, use the <code>data</code> parameter to specify the contents of the attachment file. In the previous request syntax, the value for <code>data</code> appear as <code>blob</code>, which is represented as a base64-encoded string. The value for <code>fileName</code> is the name of the attachment, such as <code>troubleshoot-screenshot.png</code>.</p>
61 #[serde(rename = "attachments")]
62 pub attachments: Vec<Attachment>,
63}
64
65/// <p>The ID and expiry time of the attachment set returned by the <a>AddAttachmentsToSet</a> operation.</p>
66#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
67#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
68pub struct AddAttachmentsToSetResponse {
69 /// <p>The ID of the attachment set. If an <code>attachmentSetId</code> was not specified, a new attachment set is created, and the ID of the set is returned in the response. If an <code>attachmentSetId</code> was specified, the attachments are added to the specified set, if it exists.</p>
70 #[serde(rename = "attachmentSetId")]
71 #[serde(skip_serializing_if = "Option::is_none")]
72 pub attachment_set_id: Option<String>,
73 /// <p>The time and date when the attachment set expires.</p>
74 #[serde(rename = "expiryTime")]
75 #[serde(skip_serializing_if = "Option::is_none")]
76 pub expiry_time: Option<String>,
77}
78
79#[derive(Clone, Debug, Default, PartialEq, Serialize)]
80#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
81pub struct AddCommunicationToCaseRequest {
82 /// <p>The ID of a set of one or more attachments for the communication to add to the case. Create the set by calling <a>AddAttachmentsToSet</a> </p>
83 #[serde(rename = "attachmentSetId")]
84 #[serde(skip_serializing_if = "Option::is_none")]
85 pub attachment_set_id: Option<String>,
86 /// <p>The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i> </p>
87 #[serde(rename = "caseId")]
88 #[serde(skip_serializing_if = "Option::is_none")]
89 pub case_id: Option<String>,
90 /// <p>The email addresses in the CC line of an email to be added to the support case.</p>
91 #[serde(rename = "ccEmailAddresses")]
92 #[serde(skip_serializing_if = "Option::is_none")]
93 pub cc_email_addresses: Option<Vec<String>>,
94 /// <p>The body of an email communication to add to the support case.</p>
95 #[serde(rename = "communicationBody")]
96 pub communication_body: String,
97}
98
99/// <p>The result of the <a>AddCommunicationToCase</a> operation.</p>
100#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
101#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
102pub struct AddCommunicationToCaseResponse {
103 /// <p>True if <a>AddCommunicationToCase</a> succeeds. Otherwise, returns an error.</p>
104 #[serde(rename = "result")]
105 #[serde(skip_serializing_if = "Option::is_none")]
106 pub result: Option<bool>,
107}
108
109/// <p>An attachment to a case communication. The attachment consists of the file name and the content of the file.</p>
110#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
111pub struct Attachment {
112 /// <p>The content of the attachment file.</p>
113 #[serde(rename = "data")]
114 #[serde(
115 deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
116 serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
117 default
118 )]
119 #[serde(skip_serializing_if = "Option::is_none")]
120 pub data: Option<bytes::Bytes>,
121 /// <p>The name of the attachment file.</p>
122 #[serde(rename = "fileName")]
123 #[serde(skip_serializing_if = "Option::is_none")]
124 pub file_name: Option<String>,
125}
126
127/// <p>The file name and ID of an attachment to a case communication. You can use the ID to retrieve the attachment with the <a>DescribeAttachment</a> operation.</p>
128#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
129#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
130pub struct AttachmentDetails {
131 /// <p>The ID of the attachment.</p>
132 #[serde(rename = "attachmentId")]
133 #[serde(skip_serializing_if = "Option::is_none")]
134 pub attachment_id: Option<String>,
135 /// <p>The file name of the attachment.</p>
136 #[serde(rename = "fileName")]
137 #[serde(skip_serializing_if = "Option::is_none")]
138 pub file_name: Option<String>,
139}
140
141/// <p><p>A JSON-formatted object that contains the metadata for a support case. It is contained in the response from a <a>DescribeCases</a> request. <b>CaseDetails</b> contains the following fields:</p> <ul> <li> <p> <b>caseId.</b> The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i>.</p> </li> <li> <p> <b>categoryCode.</b> The category of problem for the AWS Support case. Corresponds to the CategoryCode values returned by a call to <a>DescribeServices</a>.</p> </li> <li> <p> <b>displayId.</b> The identifier for the case on pages in the AWS Support Center.</p> </li> <li> <p> <b>language.</b> The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.</p> </li> <li> <p> <b>nextToken.</b> A resumption point for pagination.</p> </li> <li> <p> <b>recentCommunications.</b> One or more <a>Communication</a> objects. Fields of these objects are <code>attachments</code>, <code>body</code>, <code>caseId</code>, <code>submittedBy</code>, and <code>timeCreated</code>.</p> </li> <li> <p> <b>serviceCode.</b> The identifier for the AWS service that corresponds to the service code defined in the call to <a>DescribeServices</a>.</p> </li> <li> <p> <b>severityCode.</b> The severity code assigned to the case. Contains one of the values returned by the call to <a>DescribeSeverityLevels</a>. The possible values are: <code>low</code>, <code>normal</code>, <code>high</code>, <code>urgent</code>, and <code>critical</code>.</p> </li> <li> <p> <b>status.</b> The status of the case in the AWS Support Center. Valid values:</p> <ul> <li> <p> <code>opened</code> </p> </li> <li> <p> <code>pending-customer-action</code> </p> </li> <li> <p> <code>reopened</code> </p> </li> <li> <p> <code>resolved</code> </p> </li> <li> <p> <code>unassigned</code> </p> </li> <li> <p> <code>work-in-progress</code> </p> </li> </ul> </li> <li> <p> <b>subject.</b> The subject line of the case.</p> </li> <li> <p> <b>submittedBy.</b> The email address of the account that submitted the case.</p> </li> <li> <p> <b>timeCreated.</b> The time the case was created, in ISO-8601 format.</p> </li> </ul></p>
142#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
143#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
144pub struct CaseDetails {
145 /// <p>The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i> </p>
146 #[serde(rename = "caseId")]
147 #[serde(skip_serializing_if = "Option::is_none")]
148 pub case_id: Option<String>,
149 /// <p>The category of problem for the AWS Support case.</p>
150 #[serde(rename = "categoryCode")]
151 #[serde(skip_serializing_if = "Option::is_none")]
152 pub category_code: Option<String>,
153 /// <p>The email addresses that receive copies of communication about the case.</p>
154 #[serde(rename = "ccEmailAddresses")]
155 #[serde(skip_serializing_if = "Option::is_none")]
156 pub cc_email_addresses: Option<Vec<String>>,
157 /// <p>The ID displayed for the case in the AWS Support Center. This is a numeric string.</p>
158 #[serde(rename = "displayId")]
159 #[serde(skip_serializing_if = "Option::is_none")]
160 pub display_id: Option<String>,
161 /// <p>The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.</p>
162 #[serde(rename = "language")]
163 #[serde(skip_serializing_if = "Option::is_none")]
164 pub language: Option<String>,
165 /// <p>The five most recent communications between you and AWS Support Center, including the IDs of any attachments to the communications. Also includes a <code>nextToken</code> that you can use to retrieve earlier communications.</p>
166 #[serde(rename = "recentCommunications")]
167 #[serde(skip_serializing_if = "Option::is_none")]
168 pub recent_communications: Option<RecentCaseCommunications>,
169 /// <p>The code for the AWS service. You can get a list of codes and the corresponding service names by calling <a>DescribeServices</a>.</p>
170 #[serde(rename = "serviceCode")]
171 #[serde(skip_serializing_if = "Option::is_none")]
172 pub service_code: Option<String>,
173 /// <p>The code for the severity level returned by the call to <a>DescribeSeverityLevels</a>.</p>
174 #[serde(rename = "severityCode")]
175 #[serde(skip_serializing_if = "Option::is_none")]
176 pub severity_code: Option<String>,
177 /// <p><p>The status of the case.</p> <p>Valid values:</p> <ul> <li> <p> <code>opened</code> </p> </li> <li> <p> <code>pending-customer-action</code> </p> </li> <li> <p> <code>reopened</code> </p> </li> <li> <p> <code>resolved</code> </p> </li> <li> <p> <code>unassigned</code> </p> </li> <li> <p> <code>work-in-progress</code> </p> </li> </ul></p>
178 #[serde(rename = "status")]
179 #[serde(skip_serializing_if = "Option::is_none")]
180 pub status: Option<String>,
181 /// <p>The subject line for the case in the AWS Support Center.</p>
182 #[serde(rename = "subject")]
183 #[serde(skip_serializing_if = "Option::is_none")]
184 pub subject: Option<String>,
185 /// <p>The email address of the account that submitted the case.</p>
186 #[serde(rename = "submittedBy")]
187 #[serde(skip_serializing_if = "Option::is_none")]
188 pub submitted_by: Option<String>,
189 /// <p>The time that the case was created in the AWS Support Center.</p>
190 #[serde(rename = "timeCreated")]
191 #[serde(skip_serializing_if = "Option::is_none")]
192 pub time_created: Option<String>,
193}
194
195/// <p>A JSON-formatted name/value pair that represents the category name and category code of the problem, selected from the <a>DescribeServices</a> response for each AWS service.</p>
196#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
197#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
198pub struct Category {
199 /// <p>The category code for the support case.</p>
200 #[serde(rename = "code")]
201 #[serde(skip_serializing_if = "Option::is_none")]
202 pub code: Option<String>,
203 /// <p>The category name for the support case.</p>
204 #[serde(rename = "name")]
205 #[serde(skip_serializing_if = "Option::is_none")]
206 pub name: Option<String>,
207}
208
209/// <p>A communication associated with an AWS Support case. The communication consists of the case ID, the message body, attachment information, the submitter of the communication, and the date and time of the communication.</p>
210#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
211#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
212pub struct Communication {
213 /// <p>Information about the attachments to the case communication.</p>
214 #[serde(rename = "attachmentSet")]
215 #[serde(skip_serializing_if = "Option::is_none")]
216 pub attachment_set: Option<Vec<AttachmentDetails>>,
217 /// <p>The text of the communication between the customer and AWS Support.</p>
218 #[serde(rename = "body")]
219 #[serde(skip_serializing_if = "Option::is_none")]
220 pub body: Option<String>,
221 /// <p>The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i> </p>
222 #[serde(rename = "caseId")]
223 #[serde(skip_serializing_if = "Option::is_none")]
224 pub case_id: Option<String>,
225 /// <p>The identity of the account that submitted, or responded to, the support case. Customer entries include the role or IAM user as well as the email address. For example, "AdminRole (Role) <someone@example.com>. Entries from the AWS Support team display "Amazon Web Services," and do not show an email address. </p>
226 #[serde(rename = "submittedBy")]
227 #[serde(skip_serializing_if = "Option::is_none")]
228 pub submitted_by: Option<String>,
229 /// <p>The time the communication was created.</p>
230 #[serde(rename = "timeCreated")]
231 #[serde(skip_serializing_if = "Option::is_none")]
232 pub time_created: Option<String>,
233}
234
235#[derive(Clone, Debug, Default, PartialEq, Serialize)]
236#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
237pub struct CreateCaseRequest {
238 /// <p>The ID of a set of one or more attachments for the case. Create the set by using the <a>AddAttachmentsToSet</a> operation.</p>
239 #[serde(rename = "attachmentSetId")]
240 #[serde(skip_serializing_if = "Option::is_none")]
241 pub attachment_set_id: Option<String>,
242 /// <p>The category of problem for the AWS Support case. You also use the <a>DescribeServices</a> operation to get the category code for a service. Each AWS service defines its own set of category codes.</p>
243 #[serde(rename = "categoryCode")]
244 #[serde(skip_serializing_if = "Option::is_none")]
245 pub category_code: Option<String>,
246 /// <p>A list of email addresses that AWS Support copies on case correspondence. AWS Support identifies the account that creates the case when you specify your AWS credentials in an HTTP POST method or use the <a href="http://aws.amazon.com/tools/">AWS SDKs</a>. </p>
247 #[serde(rename = "ccEmailAddresses")]
248 #[serde(skip_serializing_if = "Option::is_none")]
249 pub cc_email_addresses: Option<Vec<String>>,
250 /// <p>The communication body text that describes the issue. This text appears in the <b>Description</b> field on the AWS Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
251 #[serde(rename = "communicationBody")]
252 pub communication_body: String,
253 /// <p>The type of issue for the case. You can specify <code>customer-service</code> or <code>technical</code>. If you don't specify a value, the default is <code>technical</code>.</p>
254 #[serde(rename = "issueType")]
255 #[serde(skip_serializing_if = "Option::is_none")]
256 pub issue_type: Option<String>,
257 /// <p>The language in which AWS Support handles the case. You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language. Currently, English ("en") and Japanese ("ja") are supported.</p>
258 #[serde(rename = "language")]
259 #[serde(skip_serializing_if = "Option::is_none")]
260 pub language: Option<String>,
261 /// <p>The code for the AWS service. You can use the <a>DescribeServices</a> operation to get the possible <code>serviceCode</code> values.</p>
262 #[serde(rename = "serviceCode")]
263 #[serde(skip_serializing_if = "Option::is_none")]
264 pub service_code: Option<String>,
265 /// <p><p>A value that indicates the urgency of the case. This value determines the response time according to your service level agreement with AWS Support. You can use the <a>DescribeSeverityLevels</a> operation to get the possible values for <code>severityCode</code>. </p> <p>For more information, see <a>SeverityLevel</a> and <a href="https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html#choosing-severity">Choosing a Severity</a> in the <i>AWS Support User Guide</i>.</p> <note> <p>The availability of severity levels depends on the support plan for the AWS account.</p> </note></p>
266 #[serde(rename = "severityCode")]
267 #[serde(skip_serializing_if = "Option::is_none")]
268 pub severity_code: Option<String>,
269 /// <p>The title of the AWS Support case. The title appears in the <b>Subject</b> field on the AWS Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
270 #[serde(rename = "subject")]
271 pub subject: String,
272}
273
274/// <p>The AWS Support case ID returned by a successful completion of the <a>CreateCase</a> operation.</p>
275#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
276#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
277pub struct CreateCaseResponse {
278 /// <p>The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string in the following format: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i> </p>
279 #[serde(rename = "caseId")]
280 #[serde(skip_serializing_if = "Option::is_none")]
281 pub case_id: Option<String>,
282}
283
284#[derive(Clone, Debug, Default, PartialEq, Serialize)]
285#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
286pub struct DescribeAttachmentRequest {
287 /// <p>The ID of the attachment to return. Attachment IDs are returned by the <a>DescribeCommunications</a> operation.</p>
288 #[serde(rename = "attachmentId")]
289 pub attachment_id: String,
290}
291
292/// <p>The content and file name of the attachment returned by the <a>DescribeAttachment</a> operation.</p>
293#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
294#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
295pub struct DescribeAttachmentResponse {
296 /// <p>This object includes the attachment content and file name.</p> <p>In the previous response syntax, the value for the <code>data</code> parameter appears as <code>blob</code>, which is represented as a base64-encoded string. The value for <code>fileName</code> is the name of the attachment, such as <code>troubleshoot-screenshot.png</code>.</p>
297 #[serde(rename = "attachment")]
298 #[serde(skip_serializing_if = "Option::is_none")]
299 pub attachment: Option<Attachment>,
300}
301
302#[derive(Clone, Debug, Default, PartialEq, Serialize)]
303#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
304pub struct DescribeCasesRequest {
305 /// <p>The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
306 #[serde(rename = "afterTime")]
307 #[serde(skip_serializing_if = "Option::is_none")]
308 pub after_time: Option<String>,
309 /// <p>The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
310 #[serde(rename = "beforeTime")]
311 #[serde(skip_serializing_if = "Option::is_none")]
312 pub before_time: Option<String>,
313 /// <p>A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.</p>
314 #[serde(rename = "caseIdList")]
315 #[serde(skip_serializing_if = "Option::is_none")]
316 pub case_id_list: Option<Vec<String>>,
317 /// <p>The ID displayed for a case in the AWS Support Center user interface.</p>
318 #[serde(rename = "displayId")]
319 #[serde(skip_serializing_if = "Option::is_none")]
320 pub display_id: Option<String>,
321 /// <p>Specifies whether to include communications in the <code>DescribeCases</code> response. By default, communications are incuded.</p>
322 #[serde(rename = "includeCommunications")]
323 #[serde(skip_serializing_if = "Option::is_none")]
324 pub include_communications: Option<bool>,
325 /// <p>Specifies whether to include resolved support cases in the <code>DescribeCases</code> response. By default, resolved cases aren't included.</p>
326 #[serde(rename = "includeResolvedCases")]
327 #[serde(skip_serializing_if = "Option::is_none")]
328 pub include_resolved_cases: Option<bool>,
329 /// <p>The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.</p>
330 #[serde(rename = "language")]
331 #[serde(skip_serializing_if = "Option::is_none")]
332 pub language: Option<String>,
333 /// <p>The maximum number of results to return before paginating.</p>
334 #[serde(rename = "maxResults")]
335 #[serde(skip_serializing_if = "Option::is_none")]
336 pub max_results: Option<i64>,
337 /// <p>A resumption point for pagination.</p>
338 #[serde(rename = "nextToken")]
339 #[serde(skip_serializing_if = "Option::is_none")]
340 pub next_token: Option<String>,
341}
342
343/// <p>Returns an array of <a href="https://docs.aws.amazon.com/awssupport/latest/APIReference/API_CaseDetails.html">CaseDetails</a> objects and a <code>nextToken</code> that defines a point for pagination in the result set.</p>
344#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
345#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
346pub struct DescribeCasesResponse {
347 /// <p>The details for the cases that match the request.</p>
348 #[serde(rename = "cases")]
349 #[serde(skip_serializing_if = "Option::is_none")]
350 pub cases: Option<Vec<CaseDetails>>,
351 /// <p>A resumption point for pagination.</p>
352 #[serde(rename = "nextToken")]
353 #[serde(skip_serializing_if = "Option::is_none")]
354 pub next_token: Option<String>,
355}
356
357#[derive(Clone, Debug, Default, PartialEq, Serialize)]
358#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
359pub struct DescribeCommunicationsRequest {
360 /// <p>The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
361 #[serde(rename = "afterTime")]
362 #[serde(skip_serializing_if = "Option::is_none")]
363 pub after_time: Option<String>,
364 /// <p>The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
365 #[serde(rename = "beforeTime")]
366 #[serde(skip_serializing_if = "Option::is_none")]
367 pub before_time: Option<String>,
368 /// <p>The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i> </p>
369 #[serde(rename = "caseId")]
370 pub case_id: String,
371 /// <p>The maximum number of results to return before paginating.</p>
372 #[serde(rename = "maxResults")]
373 #[serde(skip_serializing_if = "Option::is_none")]
374 pub max_results: Option<i64>,
375 /// <p>A resumption point for pagination.</p>
376 #[serde(rename = "nextToken")]
377 #[serde(skip_serializing_if = "Option::is_none")]
378 pub next_token: Option<String>,
379}
380
381/// <p>The communications returned by the <a>DescribeCommunications</a> operation.</p>
382#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
383#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
384pub struct DescribeCommunicationsResponse {
385 /// <p>The communications for the case.</p>
386 #[serde(rename = "communications")]
387 #[serde(skip_serializing_if = "Option::is_none")]
388 pub communications: Option<Vec<Communication>>,
389 /// <p>A resumption point for pagination.</p>
390 #[serde(rename = "nextToken")]
391 #[serde(skip_serializing_if = "Option::is_none")]
392 pub next_token: Option<String>,
393}
394
395#[derive(Clone, Debug, Default, PartialEq, Serialize)]
396#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
397pub struct DescribeServicesRequest {
398 /// <p>The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.</p>
399 #[serde(rename = "language")]
400 #[serde(skip_serializing_if = "Option::is_none")]
401 pub language: Option<String>,
402 /// <p>A JSON-formatted list of service codes available for AWS services.</p>
403 #[serde(rename = "serviceCodeList")]
404 #[serde(skip_serializing_if = "Option::is_none")]
405 pub service_code_list: Option<Vec<String>>,
406}
407
408/// <p>The list of AWS services returned by the <a>DescribeServices</a> operation.</p>
409#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
410#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
411pub struct DescribeServicesResponse {
412 /// <p>A JSON-formatted list of AWS services.</p>
413 #[serde(rename = "services")]
414 #[serde(skip_serializing_if = "Option::is_none")]
415 pub services: Option<Vec<Service>>,
416}
417
418#[derive(Clone, Debug, Default, PartialEq, Serialize)]
419#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
420pub struct DescribeSeverityLevelsRequest {
421 /// <p>The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.</p>
422 #[serde(rename = "language")]
423 #[serde(skip_serializing_if = "Option::is_none")]
424 pub language: Option<String>,
425}
426
427/// <p>The list of severity levels returned by the <a>DescribeSeverityLevels</a> operation.</p>
428#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
429#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
430pub struct DescribeSeverityLevelsResponse {
431 /// <p>The available severity levels for the support case. Available severity levels are defined by your service level agreement with AWS.</p>
432 #[serde(rename = "severityLevels")]
433 #[serde(skip_serializing_if = "Option::is_none")]
434 pub severity_levels: Option<Vec<SeverityLevel>>,
435}
436
437#[derive(Clone, Debug, Default, PartialEq, Serialize)]
438#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
439pub struct DescribeTrustedAdvisorCheckRefreshStatusesRequest {
440 /// <p><p>The IDs of the Trusted Advisor checks to get the status of. </p> <note> <p>If you specify the check ID of a check that is automatically refreshed, you might see an <code>InvalidParameterValue</code> error.</p> </note></p>
441 #[serde(rename = "checkIds")]
442 pub check_ids: Vec<String>,
443}
444
445/// <p>The statuses of the Trusted Advisor checks returned by the <a>DescribeTrustedAdvisorCheckRefreshStatuses</a> operation.</p>
446#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
447#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
448pub struct DescribeTrustedAdvisorCheckRefreshStatusesResponse {
449 /// <p>The refresh status of the specified Trusted Advisor checks.</p>
450 #[serde(rename = "statuses")]
451 pub statuses: Vec<TrustedAdvisorCheckRefreshStatus>,
452}
453
454/// <p><p/></p>
455#[derive(Clone, Debug, Default, PartialEq, Serialize)]
456#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
457pub struct DescribeTrustedAdvisorCheckResultRequest {
458 /// <p>The unique identifier for the Trusted Advisor check.</p>
459 #[serde(rename = "checkId")]
460 pub check_id: String,
461 /// <p>The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.</p>
462 #[serde(rename = "language")]
463 #[serde(skip_serializing_if = "Option::is_none")]
464 pub language: Option<String>,
465}
466
467/// <p>The result of the Trusted Advisor check returned by the <a>DescribeTrustedAdvisorCheckResult</a> operation.</p>
468#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
469#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
470pub struct DescribeTrustedAdvisorCheckResultResponse {
471 /// <p>The detailed results of the Trusted Advisor check.</p>
472 #[serde(rename = "result")]
473 #[serde(skip_serializing_if = "Option::is_none")]
474 pub result: Option<TrustedAdvisorCheckResult>,
475}
476
477#[derive(Clone, Debug, Default, PartialEq, Serialize)]
478#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
479pub struct DescribeTrustedAdvisorCheckSummariesRequest {
480 /// <p>The IDs of the Trusted Advisor checks.</p>
481 #[serde(rename = "checkIds")]
482 pub check_ids: Vec<String>,
483}
484
485/// <p>The summaries of the Trusted Advisor checks returned by the <a>DescribeTrustedAdvisorCheckSummaries</a> operation.</p>
486#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
487#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
488pub struct DescribeTrustedAdvisorCheckSummariesResponse {
489 /// <p>The summary information for the requested Trusted Advisor checks.</p>
490 #[serde(rename = "summaries")]
491 pub summaries: Vec<TrustedAdvisorCheckSummary>,
492}
493
494#[derive(Clone, Debug, Default, PartialEq, Serialize)]
495#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
496pub struct DescribeTrustedAdvisorChecksRequest {
497 /// <p>The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.</p>
498 #[serde(rename = "language")]
499 pub language: String,
500}
501
502/// <p>Information about the Trusted Advisor checks returned by the <a>DescribeTrustedAdvisorChecks</a> operation.</p>
503#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
504#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
505pub struct DescribeTrustedAdvisorChecksResponse {
506 /// <p>Information about all available Trusted Advisor checks.</p>
507 #[serde(rename = "checks")]
508 pub checks: Vec<TrustedAdvisorCheckDescription>,
509}
510
511/// <p>The five most recent communications associated with the case.</p>
512#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
513#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
514pub struct RecentCaseCommunications {
515 /// <p>The five most recent communications associated with the case.</p>
516 #[serde(rename = "communications")]
517 #[serde(skip_serializing_if = "Option::is_none")]
518 pub communications: Option<Vec<Communication>>,
519 /// <p>A resumption point for pagination.</p>
520 #[serde(rename = "nextToken")]
521 #[serde(skip_serializing_if = "Option::is_none")]
522 pub next_token: Option<String>,
523}
524
525/// <p><p/></p>
526#[derive(Clone, Debug, Default, PartialEq, Serialize)]
527#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
528pub struct RefreshTrustedAdvisorCheckRequest {
529 /// <p>The unique identifier for the Trusted Advisor check to refresh. <b>Note:</b> Specifying the check ID of a check that is automatically refreshed causes an <code>InvalidParameterValue</code> error.</p>
530 #[serde(rename = "checkId")]
531 pub check_id: String,
532}
533
534/// <p>The current refresh status of a Trusted Advisor check.</p>
535#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
536#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
537pub struct RefreshTrustedAdvisorCheckResponse {
538 /// <p>The current refresh status for a check, including the amount of time until the check is eligible for refresh.</p>
539 #[serde(rename = "status")]
540 pub status: TrustedAdvisorCheckRefreshStatus,
541}
542
543#[derive(Clone, Debug, Default, PartialEq, Serialize)]
544#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
545pub struct ResolveCaseRequest {
546 /// <p>The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i> </p>
547 #[serde(rename = "caseId")]
548 #[serde(skip_serializing_if = "Option::is_none")]
549 pub case_id: Option<String>,
550}
551
552/// <p>The status of the case returned by the <a>ResolveCase</a> operation.</p>
553#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
554#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
555pub struct ResolveCaseResponse {
556 /// <p>The status of the case after the <a>ResolveCase</a> request was processed.</p>
557 #[serde(rename = "finalCaseStatus")]
558 #[serde(skip_serializing_if = "Option::is_none")]
559 pub final_case_status: Option<String>,
560 /// <p>The status of the case when the <a>ResolveCase</a> request was sent.</p>
561 #[serde(rename = "initialCaseStatus")]
562 #[serde(skip_serializing_if = "Option::is_none")]
563 pub initial_case_status: Option<String>,
564}
565
566/// <p>Information about an AWS service returned by the <a>DescribeServices</a> operation.</p>
567#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
568#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
569pub struct Service {
570 /// <p>A list of categories that describe the type of support issue a case describes. Categories consist of a category name and a category code. Category names and codes are passed to AWS Support when you call <a>CreateCase</a>.</p>
571 #[serde(rename = "categories")]
572 #[serde(skip_serializing_if = "Option::is_none")]
573 pub categories: Option<Vec<Category>>,
574 /// <p>The code for an AWS service returned by the <a>DescribeServices</a> response. The <code>name</code> element contains the corresponding friendly name.</p>
575 #[serde(rename = "code")]
576 #[serde(skip_serializing_if = "Option::is_none")]
577 pub code: Option<String>,
578 /// <p>The friendly name for an AWS service. The <code>code</code> element contains the corresponding code.</p>
579 #[serde(rename = "name")]
580 #[serde(skip_serializing_if = "Option::is_none")]
581 pub name: Option<String>,
582}
583
584/// <p>A code and name pair that represents the severity level of a support case. The available values depend on the support plan for the account. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#choosing-severity">Choosing a severity</a> in the <i>AWS Support User Guide</i>.</p>
585#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
586#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
587pub struct SeverityLevel {
588 /// <p>The code for case severity level.</p> <p>Valid values: <code>low</code> | <code>normal</code> | <code>high</code> | <code>urgent</code> | <code>critical</code> </p>
589 #[serde(rename = "code")]
590 #[serde(skip_serializing_if = "Option::is_none")]
591 pub code: Option<String>,
592 /// <p>The name of the severity level that corresponds to the severity level code.</p> <note> <p>The values returned by the API differ from the values that are displayed in the AWS Support Center. For example, for the code "low", the API name is "Low", but the name in the Support Center is "General guidance". These are the Support Center code/name mappings:</p> <ul> <li> <p> <code>low</code>: General guidance</p> </li> <li> <p> <code>normal</code>: System impaired</p> </li> <li> <p> <code>high</code>: Production system impaired</p> </li> <li> <p> <code>urgent</code>: Production system down</p> </li> <li> <p> <code>critical</code>: Business-critical system down</p> </li> </ul> </note> <p>For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#choosing-severity">Choosing a severity</a> in the <i>AWS Support User Guide</i>.</p>
593 #[serde(rename = "name")]
594 #[serde(skip_serializing_if = "Option::is_none")]
595 pub name: Option<String>,
596}
597
598/// <p>The container for summary information that relates to the category of the Trusted Advisor check.</p>
599#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
600#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
601pub struct TrustedAdvisorCategorySpecificSummary {
602 /// <p>The summary information about cost savings for a Trusted Advisor check that is in the Cost Optimizing category.</p>
603 #[serde(rename = "costOptimizing")]
604 #[serde(skip_serializing_if = "Option::is_none")]
605 pub cost_optimizing: Option<TrustedAdvisorCostOptimizingSummary>,
606}
607
608/// <p>The description and metadata for a Trusted Advisor check.</p>
609#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
610#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
611pub struct TrustedAdvisorCheckDescription {
612 /// <p>The category of the Trusted Advisor check.</p>
613 #[serde(rename = "category")]
614 pub category: String,
615 /// <p>The description of the Trusted Advisor check, which includes the alert criteria and recommended operations (contains HTML markup).</p>
616 #[serde(rename = "description")]
617 pub description: String,
618 /// <p>The unique identifier for the Trusted Advisor check.</p>
619 #[serde(rename = "id")]
620 pub id: String,
621 /// <p>The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the <b>Metadata</b> element of the <a>TrustedAdvisorResourceDetail</a> for the check. <b>Metadata</b> contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data. </p>
622 #[serde(rename = "metadata")]
623 pub metadata: Vec<String>,
624 /// <p>The display name for the Trusted Advisor check.</p>
625 #[serde(rename = "name")]
626 pub name: String,
627}
628
629/// <p>The refresh status of a Trusted Advisor check.</p>
630#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
631#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
632pub struct TrustedAdvisorCheckRefreshStatus {
633 /// <p>The unique identifier for the Trusted Advisor check.</p>
634 #[serde(rename = "checkId")]
635 pub check_id: String,
636 /// <p>The amount of time, in milliseconds, until the Trusted Advisor check is eligible for refresh.</p>
637 #[serde(rename = "millisUntilNextRefreshable")]
638 pub millis_until_next_refreshable: i64,
639 /// <p><p>The status of the Trusted Advisor check for which a refresh has been requested: </p> <ul> <li> <p> <code>none:</code> The check is not refreshed or the non-success status exceeds the timeout</p> </li> <li> <p> <code>enqueued:</code> The check refresh requests has entered the refresh queue</p> </li> <li> <p> <code>processing:</code> The check refresh request is picked up by the rule processing engine</p> </li> <li> <p> <code>success:</code> The check is successfully refreshed</p> </li> <li> <p> <code>abandoned:</code> The check refresh has failed</p> </li> </ul></p>
640 #[serde(rename = "status")]
641 pub status: String,
642}
643
644/// <p>The results of a Trusted Advisor check returned by <a>DescribeTrustedAdvisorCheckResult</a>.</p>
645#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
646#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
647pub struct TrustedAdvisorCheckResult {
648 /// <p>Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.</p>
649 #[serde(rename = "categorySpecificSummary")]
650 pub category_specific_summary: TrustedAdvisorCategorySpecificSummary,
651 /// <p>The unique identifier for the Trusted Advisor check.</p>
652 #[serde(rename = "checkId")]
653 pub check_id: String,
654 /// <p>The details about each resource listed in the check result.</p>
655 #[serde(rename = "flaggedResources")]
656 pub flagged_resources: Vec<TrustedAdvisorResourceDetail>,
657 #[serde(rename = "resourcesSummary")]
658 pub resources_summary: TrustedAdvisorResourcesSummary,
659 /// <p>The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".</p>
660 #[serde(rename = "status")]
661 pub status: String,
662 /// <p>The time of the last refresh of the check.</p>
663 #[serde(rename = "timestamp")]
664 pub timestamp: String,
665}
666
667/// <p>A summary of a Trusted Advisor check result, including the alert status, last refresh, and number of resources examined.</p>
668#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
669#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
670pub struct TrustedAdvisorCheckSummary {
671 /// <p>Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.</p>
672 #[serde(rename = "categorySpecificSummary")]
673 pub category_specific_summary: TrustedAdvisorCategorySpecificSummary,
674 /// <p>The unique identifier for the Trusted Advisor check.</p>
675 #[serde(rename = "checkId")]
676 pub check_id: String,
677 /// <p>Specifies whether the Trusted Advisor check has flagged resources.</p>
678 #[serde(rename = "hasFlaggedResources")]
679 #[serde(skip_serializing_if = "Option::is_none")]
680 pub has_flagged_resources: Option<bool>,
681 #[serde(rename = "resourcesSummary")]
682 pub resources_summary: TrustedAdvisorResourcesSummary,
683 /// <p>The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".</p>
684 #[serde(rename = "status")]
685 pub status: String,
686 /// <p>The time of the last refresh of the check.</p>
687 #[serde(rename = "timestamp")]
688 pub timestamp: String,
689}
690
691/// <p>The estimated cost savings that might be realized if the recommended operations are taken.</p>
692#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
693#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
694pub struct TrustedAdvisorCostOptimizingSummary {
695 /// <p>The estimated monthly savings that might be realized if the recommended operations are taken.</p>
696 #[serde(rename = "estimatedMonthlySavings")]
697 pub estimated_monthly_savings: f64,
698 /// <p>The estimated percentage of savings that might be realized if the recommended operations are taken.</p>
699 #[serde(rename = "estimatedPercentMonthlySavings")]
700 pub estimated_percent_monthly_savings: f64,
701}
702
703/// <p>Contains information about a resource identified by a Trusted Advisor check.</p>
704#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
705#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
706pub struct TrustedAdvisorResourceDetail {
707 /// <p>Specifies whether the AWS resource was ignored by Trusted Advisor because it was marked as suppressed by the user.</p>
708 #[serde(rename = "isSuppressed")]
709 #[serde(skip_serializing_if = "Option::is_none")]
710 pub is_suppressed: Option<bool>,
711 /// <p>Additional information about the identified resource. The exact metadata and its order can be obtained by inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.</p>
712 #[serde(rename = "metadata")]
713 pub metadata: Vec<String>,
714 /// <p>The AWS region in which the identified resource is located.</p>
715 #[serde(rename = "region")]
716 #[serde(skip_serializing_if = "Option::is_none")]
717 pub region: Option<String>,
718 /// <p>The unique identifier for the identified resource.</p>
719 #[serde(rename = "resourceId")]
720 pub resource_id: String,
721 /// <p>The status code for the resource identified in the Trusted Advisor check.</p>
722 #[serde(rename = "status")]
723 pub status: String,
724}
725
726/// <p>Details about AWS resources that were analyzed in a call to Trusted Advisor <a>DescribeTrustedAdvisorCheckSummaries</a>.</p>
727#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
728#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
729pub struct TrustedAdvisorResourcesSummary {
730 /// <p>The number of AWS resources that were flagged (listed) by the Trusted Advisor check.</p>
731 #[serde(rename = "resourcesFlagged")]
732 pub resources_flagged: i64,
733 /// <p>The number of AWS resources ignored by Trusted Advisor because information was unavailable.</p>
734 #[serde(rename = "resourcesIgnored")]
735 pub resources_ignored: i64,
736 /// <p>The number of AWS resources that were analyzed by the Trusted Advisor check.</p>
737 #[serde(rename = "resourcesProcessed")]
738 pub resources_processed: i64,
739 /// <p>The number of AWS resources ignored by Trusted Advisor because they were marked as suppressed by the user.</p>
740 #[serde(rename = "resourcesSuppressed")]
741 pub resources_suppressed: i64,
742}
743
744/// Errors returned by AddAttachmentsToSet
745#[derive(Debug, PartialEq)]
746pub enum AddAttachmentsToSetError {
747 /// <p>The limit for the number of attachment sets created in a short period of time has been exceeded.</p>
748 AttachmentLimitExceeded(String),
749 /// <p>The expiration time of the attachment set has passed. The set expires 1 hour after it is created.</p>
750 AttachmentSetExpired(String),
751 /// <p>An attachment set with the specified ID could not be found.</p>
752 AttachmentSetIdNotFound(String),
753 /// <p>A limit for the size of an attachment set has been exceeded. The limits are three attachments and 5 MB per attachment.</p>
754 AttachmentSetSizeLimitExceeded(String),
755 /// <p>An internal server error occurred.</p>
756 InternalServerError(String),
757}
758
759impl AddAttachmentsToSetError {
760 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddAttachmentsToSetError> {
761 if let Some(err) = proto::json::Error::parse(&res) {
762 match err.typ.as_str() {
763 "AttachmentLimitExceeded" => {
764 return RusotoError::Service(AddAttachmentsToSetError::AttachmentLimitExceeded(
765 err.msg,
766 ))
767 }
768 "AttachmentSetExpired" => {
769 return RusotoError::Service(AddAttachmentsToSetError::AttachmentSetExpired(
770 err.msg,
771 ))
772 }
773 "AttachmentSetIdNotFound" => {
774 return RusotoError::Service(AddAttachmentsToSetError::AttachmentSetIdNotFound(
775 err.msg,
776 ))
777 }
778 "AttachmentSetSizeLimitExceeded" => {
779 return RusotoError::Service(
780 AddAttachmentsToSetError::AttachmentSetSizeLimitExceeded(err.msg),
781 )
782 }
783 "InternalServerError" => {
784 return RusotoError::Service(AddAttachmentsToSetError::InternalServerError(
785 err.msg,
786 ))
787 }
788 "ValidationException" => return RusotoError::Validation(err.msg),
789 _ => {}
790 }
791 }
792 RusotoError::Unknown(res)
793 }
794}
795impl fmt::Display for AddAttachmentsToSetError {
796 #[allow(unused_variables)]
797 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
798 match *self {
799 AddAttachmentsToSetError::AttachmentLimitExceeded(ref cause) => write!(f, "{}", cause),
800 AddAttachmentsToSetError::AttachmentSetExpired(ref cause) => write!(f, "{}", cause),
801 AddAttachmentsToSetError::AttachmentSetIdNotFound(ref cause) => write!(f, "{}", cause),
802 AddAttachmentsToSetError::AttachmentSetSizeLimitExceeded(ref cause) => {
803 write!(f, "{}", cause)
804 }
805 AddAttachmentsToSetError::InternalServerError(ref cause) => write!(f, "{}", cause),
806 }
807 }
808}
809impl Error for AddAttachmentsToSetError {}
810/// Errors returned by AddCommunicationToCase
811#[derive(Debug, PartialEq)]
812pub enum AddCommunicationToCaseError {
813 /// <p>The expiration time of the attachment set has passed. The set expires 1 hour after it is created.</p>
814 AttachmentSetExpired(String),
815 /// <p>An attachment set with the specified ID could not be found.</p>
816 AttachmentSetIdNotFound(String),
817 /// <p>The requested <code>caseId</code> could not be located.</p>
818 CaseIdNotFound(String),
819 /// <p>An internal server error occurred.</p>
820 InternalServerError(String),
821}
822
823impl AddCommunicationToCaseError {
824 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddCommunicationToCaseError> {
825 if let Some(err) = proto::json::Error::parse(&res) {
826 match err.typ.as_str() {
827 "AttachmentSetExpired" => {
828 return RusotoError::Service(AddCommunicationToCaseError::AttachmentSetExpired(
829 err.msg,
830 ))
831 }
832 "AttachmentSetIdNotFound" => {
833 return RusotoError::Service(
834 AddCommunicationToCaseError::AttachmentSetIdNotFound(err.msg),
835 )
836 }
837 "CaseIdNotFound" => {
838 return RusotoError::Service(AddCommunicationToCaseError::CaseIdNotFound(
839 err.msg,
840 ))
841 }
842 "InternalServerError" => {
843 return RusotoError::Service(AddCommunicationToCaseError::InternalServerError(
844 err.msg,
845 ))
846 }
847 "ValidationException" => return RusotoError::Validation(err.msg),
848 _ => {}
849 }
850 }
851 RusotoError::Unknown(res)
852 }
853}
854impl fmt::Display for AddCommunicationToCaseError {
855 #[allow(unused_variables)]
856 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
857 match *self {
858 AddCommunicationToCaseError::AttachmentSetExpired(ref cause) => write!(f, "{}", cause),
859 AddCommunicationToCaseError::AttachmentSetIdNotFound(ref cause) => {
860 write!(f, "{}", cause)
861 }
862 AddCommunicationToCaseError::CaseIdNotFound(ref cause) => write!(f, "{}", cause),
863 AddCommunicationToCaseError::InternalServerError(ref cause) => write!(f, "{}", cause),
864 }
865 }
866}
867impl Error for AddCommunicationToCaseError {}
868/// Errors returned by CreateCase
869#[derive(Debug, PartialEq)]
870pub enum CreateCaseError {
871 /// <p>The expiration time of the attachment set has passed. The set expires 1 hour after it is created.</p>
872 AttachmentSetExpired(String),
873 /// <p>An attachment set with the specified ID could not be found.</p>
874 AttachmentSetIdNotFound(String),
875 /// <p>The case creation limit for the account has been exceeded.</p>
876 CaseCreationLimitExceeded(String),
877 /// <p>An internal server error occurred.</p>
878 InternalServerError(String),
879}
880
881impl CreateCaseError {
882 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCaseError> {
883 if let Some(err) = proto::json::Error::parse(&res) {
884 match err.typ.as_str() {
885 "AttachmentSetExpired" => {
886 return RusotoError::Service(CreateCaseError::AttachmentSetExpired(err.msg))
887 }
888 "AttachmentSetIdNotFound" => {
889 return RusotoError::Service(CreateCaseError::AttachmentSetIdNotFound(err.msg))
890 }
891 "CaseCreationLimitExceeded" => {
892 return RusotoError::Service(CreateCaseError::CaseCreationLimitExceeded(
893 err.msg,
894 ))
895 }
896 "InternalServerError" => {
897 return RusotoError::Service(CreateCaseError::InternalServerError(err.msg))
898 }
899 "ValidationException" => return RusotoError::Validation(err.msg),
900 _ => {}
901 }
902 }
903 RusotoError::Unknown(res)
904 }
905}
906impl fmt::Display for CreateCaseError {
907 #[allow(unused_variables)]
908 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
909 match *self {
910 CreateCaseError::AttachmentSetExpired(ref cause) => write!(f, "{}", cause),
911 CreateCaseError::AttachmentSetIdNotFound(ref cause) => write!(f, "{}", cause),
912 CreateCaseError::CaseCreationLimitExceeded(ref cause) => write!(f, "{}", cause),
913 CreateCaseError::InternalServerError(ref cause) => write!(f, "{}", cause),
914 }
915 }
916}
917impl Error for CreateCaseError {}
918/// Errors returned by DescribeAttachment
919#[derive(Debug, PartialEq)]
920pub enum DescribeAttachmentError {
921 /// <p>An attachment with the specified ID could not be found.</p>
922 AttachmentIdNotFound(String),
923 /// <p>The limit for the number of <a>DescribeAttachment</a> requests in a short period of time has been exceeded.</p>
924 DescribeAttachmentLimitExceeded(String),
925 /// <p>An internal server error occurred.</p>
926 InternalServerError(String),
927}
928
929impl DescribeAttachmentError {
930 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAttachmentError> {
931 if let Some(err) = proto::json::Error::parse(&res) {
932 match err.typ.as_str() {
933 "AttachmentIdNotFound" => {
934 return RusotoError::Service(DescribeAttachmentError::AttachmentIdNotFound(
935 err.msg,
936 ))
937 }
938 "DescribeAttachmentLimitExceeded" => {
939 return RusotoError::Service(
940 DescribeAttachmentError::DescribeAttachmentLimitExceeded(err.msg),
941 )
942 }
943 "InternalServerError" => {
944 return RusotoError::Service(DescribeAttachmentError::InternalServerError(
945 err.msg,
946 ))
947 }
948 "ValidationException" => return RusotoError::Validation(err.msg),
949 _ => {}
950 }
951 }
952 RusotoError::Unknown(res)
953 }
954}
955impl fmt::Display for DescribeAttachmentError {
956 #[allow(unused_variables)]
957 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
958 match *self {
959 DescribeAttachmentError::AttachmentIdNotFound(ref cause) => write!(f, "{}", cause),
960 DescribeAttachmentError::DescribeAttachmentLimitExceeded(ref cause) => {
961 write!(f, "{}", cause)
962 }
963 DescribeAttachmentError::InternalServerError(ref cause) => write!(f, "{}", cause),
964 }
965 }
966}
967impl Error for DescribeAttachmentError {}
968/// Errors returned by DescribeCases
969#[derive(Debug, PartialEq)]
970pub enum DescribeCasesError {
971 /// <p>The requested <code>caseId</code> could not be located.</p>
972 CaseIdNotFound(String),
973 /// <p>An internal server error occurred.</p>
974 InternalServerError(String),
975}
976
977impl DescribeCasesError {
978 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCasesError> {
979 if let Some(err) = proto::json::Error::parse(&res) {
980 match err.typ.as_str() {
981 "CaseIdNotFound" => {
982 return RusotoError::Service(DescribeCasesError::CaseIdNotFound(err.msg))
983 }
984 "InternalServerError" => {
985 return RusotoError::Service(DescribeCasesError::InternalServerError(err.msg))
986 }
987 "ValidationException" => return RusotoError::Validation(err.msg),
988 _ => {}
989 }
990 }
991 RusotoError::Unknown(res)
992 }
993}
994impl fmt::Display for DescribeCasesError {
995 #[allow(unused_variables)]
996 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
997 match *self {
998 DescribeCasesError::CaseIdNotFound(ref cause) => write!(f, "{}", cause),
999 DescribeCasesError::InternalServerError(ref cause) => write!(f, "{}", cause),
1000 }
1001 }
1002}
1003impl Error for DescribeCasesError {}
1004/// Errors returned by DescribeCommunications
1005#[derive(Debug, PartialEq)]
1006pub enum DescribeCommunicationsError {
1007 /// <p>The requested <code>caseId</code> could not be located.</p>
1008 CaseIdNotFound(String),
1009 /// <p>An internal server error occurred.</p>
1010 InternalServerError(String),
1011}
1012
1013impl DescribeCommunicationsError {
1014 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCommunicationsError> {
1015 if let Some(err) = proto::json::Error::parse(&res) {
1016 match err.typ.as_str() {
1017 "CaseIdNotFound" => {
1018 return RusotoError::Service(DescribeCommunicationsError::CaseIdNotFound(
1019 err.msg,
1020 ))
1021 }
1022 "InternalServerError" => {
1023 return RusotoError::Service(DescribeCommunicationsError::InternalServerError(
1024 err.msg,
1025 ))
1026 }
1027 "ValidationException" => return RusotoError::Validation(err.msg),
1028 _ => {}
1029 }
1030 }
1031 RusotoError::Unknown(res)
1032 }
1033}
1034impl fmt::Display for DescribeCommunicationsError {
1035 #[allow(unused_variables)]
1036 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1037 match *self {
1038 DescribeCommunicationsError::CaseIdNotFound(ref cause) => write!(f, "{}", cause),
1039 DescribeCommunicationsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1040 }
1041 }
1042}
1043impl Error for DescribeCommunicationsError {}
1044/// Errors returned by DescribeServices
1045#[derive(Debug, PartialEq)]
1046pub enum DescribeServicesError {
1047 /// <p>An internal server error occurred.</p>
1048 InternalServerError(String),
1049}
1050
1051impl DescribeServicesError {
1052 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeServicesError> {
1053 if let Some(err) = proto::json::Error::parse(&res) {
1054 match err.typ.as_str() {
1055 "InternalServerError" => {
1056 return RusotoError::Service(DescribeServicesError::InternalServerError(
1057 err.msg,
1058 ))
1059 }
1060 "ValidationException" => return RusotoError::Validation(err.msg),
1061 _ => {}
1062 }
1063 }
1064 RusotoError::Unknown(res)
1065 }
1066}
1067impl fmt::Display for DescribeServicesError {
1068 #[allow(unused_variables)]
1069 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1070 match *self {
1071 DescribeServicesError::InternalServerError(ref cause) => write!(f, "{}", cause),
1072 }
1073 }
1074}
1075impl Error for DescribeServicesError {}
1076/// Errors returned by DescribeSeverityLevels
1077#[derive(Debug, PartialEq)]
1078pub enum DescribeSeverityLevelsError {
1079 /// <p>An internal server error occurred.</p>
1080 InternalServerError(String),
1081}
1082
1083impl DescribeSeverityLevelsError {
1084 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSeverityLevelsError> {
1085 if let Some(err) = proto::json::Error::parse(&res) {
1086 match err.typ.as_str() {
1087 "InternalServerError" => {
1088 return RusotoError::Service(DescribeSeverityLevelsError::InternalServerError(
1089 err.msg,
1090 ))
1091 }
1092 "ValidationException" => return RusotoError::Validation(err.msg),
1093 _ => {}
1094 }
1095 }
1096 RusotoError::Unknown(res)
1097 }
1098}
1099impl fmt::Display for DescribeSeverityLevelsError {
1100 #[allow(unused_variables)]
1101 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1102 match *self {
1103 DescribeSeverityLevelsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1104 }
1105 }
1106}
1107impl Error for DescribeSeverityLevelsError {}
1108/// Errors returned by DescribeTrustedAdvisorCheckRefreshStatuses
1109#[derive(Debug, PartialEq)]
1110pub enum DescribeTrustedAdvisorCheckRefreshStatusesError {
1111 /// <p>An internal server error occurred.</p>
1112 InternalServerError(String),
1113}
1114
1115impl DescribeTrustedAdvisorCheckRefreshStatusesError {
1116 pub fn from_response(
1117 res: BufferedHttpResponse,
1118 ) -> RusotoError<DescribeTrustedAdvisorCheckRefreshStatusesError> {
1119 if let Some(err) = proto::json::Error::parse(&res) {
1120 match err.typ.as_str() {
1121 "InternalServerError" => {
1122 return RusotoError::Service(
1123 DescribeTrustedAdvisorCheckRefreshStatusesError::InternalServerError(
1124 err.msg,
1125 ),
1126 )
1127 }
1128 "ValidationException" => return RusotoError::Validation(err.msg),
1129 _ => {}
1130 }
1131 }
1132 RusotoError::Unknown(res)
1133 }
1134}
1135impl fmt::Display for DescribeTrustedAdvisorCheckRefreshStatusesError {
1136 #[allow(unused_variables)]
1137 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1138 match *self {
1139 DescribeTrustedAdvisorCheckRefreshStatusesError::InternalServerError(ref cause) => {
1140 write!(f, "{}", cause)
1141 }
1142 }
1143 }
1144}
1145impl Error for DescribeTrustedAdvisorCheckRefreshStatusesError {}
1146/// Errors returned by DescribeTrustedAdvisorCheckResult
1147#[derive(Debug, PartialEq)]
1148pub enum DescribeTrustedAdvisorCheckResultError {
1149 /// <p>An internal server error occurred.</p>
1150 InternalServerError(String),
1151}
1152
1153impl DescribeTrustedAdvisorCheckResultError {
1154 pub fn from_response(
1155 res: BufferedHttpResponse,
1156 ) -> RusotoError<DescribeTrustedAdvisorCheckResultError> {
1157 if let Some(err) = proto::json::Error::parse(&res) {
1158 match err.typ.as_str() {
1159 "InternalServerError" => {
1160 return RusotoError::Service(
1161 DescribeTrustedAdvisorCheckResultError::InternalServerError(err.msg),
1162 )
1163 }
1164 "ValidationException" => return RusotoError::Validation(err.msg),
1165 _ => {}
1166 }
1167 }
1168 RusotoError::Unknown(res)
1169 }
1170}
1171impl fmt::Display for DescribeTrustedAdvisorCheckResultError {
1172 #[allow(unused_variables)]
1173 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1174 match *self {
1175 DescribeTrustedAdvisorCheckResultError::InternalServerError(ref cause) => {
1176 write!(f, "{}", cause)
1177 }
1178 }
1179 }
1180}
1181impl Error for DescribeTrustedAdvisorCheckResultError {}
1182/// Errors returned by DescribeTrustedAdvisorCheckSummaries
1183#[derive(Debug, PartialEq)]
1184pub enum DescribeTrustedAdvisorCheckSummariesError {
1185 /// <p>An internal server error occurred.</p>
1186 InternalServerError(String),
1187}
1188
1189impl DescribeTrustedAdvisorCheckSummariesError {
1190 pub fn from_response(
1191 res: BufferedHttpResponse,
1192 ) -> RusotoError<DescribeTrustedAdvisorCheckSummariesError> {
1193 if let Some(err) = proto::json::Error::parse(&res) {
1194 match err.typ.as_str() {
1195 "InternalServerError" => {
1196 return RusotoError::Service(
1197 DescribeTrustedAdvisorCheckSummariesError::InternalServerError(err.msg),
1198 )
1199 }
1200 "ValidationException" => return RusotoError::Validation(err.msg),
1201 _ => {}
1202 }
1203 }
1204 RusotoError::Unknown(res)
1205 }
1206}
1207impl fmt::Display for DescribeTrustedAdvisorCheckSummariesError {
1208 #[allow(unused_variables)]
1209 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1210 match *self {
1211 DescribeTrustedAdvisorCheckSummariesError::InternalServerError(ref cause) => {
1212 write!(f, "{}", cause)
1213 }
1214 }
1215 }
1216}
1217impl Error for DescribeTrustedAdvisorCheckSummariesError {}
1218/// Errors returned by DescribeTrustedAdvisorChecks
1219#[derive(Debug, PartialEq)]
1220pub enum DescribeTrustedAdvisorChecksError {
1221 /// <p>An internal server error occurred.</p>
1222 InternalServerError(String),
1223}
1224
1225impl DescribeTrustedAdvisorChecksError {
1226 pub fn from_response(
1227 res: BufferedHttpResponse,
1228 ) -> RusotoError<DescribeTrustedAdvisorChecksError> {
1229 if let Some(err) = proto::json::Error::parse(&res) {
1230 match err.typ.as_str() {
1231 "InternalServerError" => {
1232 return RusotoError::Service(
1233 DescribeTrustedAdvisorChecksError::InternalServerError(err.msg),
1234 )
1235 }
1236 "ValidationException" => return RusotoError::Validation(err.msg),
1237 _ => {}
1238 }
1239 }
1240 RusotoError::Unknown(res)
1241 }
1242}
1243impl fmt::Display for DescribeTrustedAdvisorChecksError {
1244 #[allow(unused_variables)]
1245 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1246 match *self {
1247 DescribeTrustedAdvisorChecksError::InternalServerError(ref cause) => {
1248 write!(f, "{}", cause)
1249 }
1250 }
1251 }
1252}
1253impl Error for DescribeTrustedAdvisorChecksError {}
1254/// Errors returned by RefreshTrustedAdvisorCheck
1255#[derive(Debug, PartialEq)]
1256pub enum RefreshTrustedAdvisorCheckError {
1257 /// <p>An internal server error occurred.</p>
1258 InternalServerError(String),
1259}
1260
1261impl RefreshTrustedAdvisorCheckError {
1262 pub fn from_response(
1263 res: BufferedHttpResponse,
1264 ) -> RusotoError<RefreshTrustedAdvisorCheckError> {
1265 if let Some(err) = proto::json::Error::parse(&res) {
1266 match err.typ.as_str() {
1267 "InternalServerError" => {
1268 return RusotoError::Service(
1269 RefreshTrustedAdvisorCheckError::InternalServerError(err.msg),
1270 )
1271 }
1272 "ValidationException" => return RusotoError::Validation(err.msg),
1273 _ => {}
1274 }
1275 }
1276 RusotoError::Unknown(res)
1277 }
1278}
1279impl fmt::Display for RefreshTrustedAdvisorCheckError {
1280 #[allow(unused_variables)]
1281 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1282 match *self {
1283 RefreshTrustedAdvisorCheckError::InternalServerError(ref cause) => {
1284 write!(f, "{}", cause)
1285 }
1286 }
1287 }
1288}
1289impl Error for RefreshTrustedAdvisorCheckError {}
1290/// Errors returned by ResolveCase
1291#[derive(Debug, PartialEq)]
1292pub enum ResolveCaseError {
1293 /// <p>The requested <code>caseId</code> could not be located.</p>
1294 CaseIdNotFound(String),
1295 /// <p>An internal server error occurred.</p>
1296 InternalServerError(String),
1297}
1298
1299impl ResolveCaseError {
1300 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResolveCaseError> {
1301 if let Some(err) = proto::json::Error::parse(&res) {
1302 match err.typ.as_str() {
1303 "CaseIdNotFound" => {
1304 return RusotoError::Service(ResolveCaseError::CaseIdNotFound(err.msg))
1305 }
1306 "InternalServerError" => {
1307 return RusotoError::Service(ResolveCaseError::InternalServerError(err.msg))
1308 }
1309 "ValidationException" => return RusotoError::Validation(err.msg),
1310 _ => {}
1311 }
1312 }
1313 RusotoError::Unknown(res)
1314 }
1315}
1316impl fmt::Display for ResolveCaseError {
1317 #[allow(unused_variables)]
1318 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1319 match *self {
1320 ResolveCaseError::CaseIdNotFound(ref cause) => write!(f, "{}", cause),
1321 ResolveCaseError::InternalServerError(ref cause) => write!(f, "{}", cause),
1322 }
1323 }
1324}
1325impl Error for ResolveCaseError {}
1326/// Trait representing the capabilities of the AWS Support API. AWS Support clients implement this trait.
1327#[async_trait]
1328pub trait AWSSupport {
1329 /// <p><p>Adds one or more attachments to an attachment set. </p> <p>An attachment set is a temporary container for attachments that you add to a case or case communication. The set is available for 1 hour after it's created. The <code>expiryTime</code> returned in the response is when the set expires. </p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1330 async fn add_attachments_to_set(
1331 &self,
1332 input: AddAttachmentsToSetRequest,
1333 ) -> Result<AddAttachmentsToSetResponse, RusotoError<AddAttachmentsToSetError>>;
1334
1335 /// <p><p>Adds additional customer communication to an AWS Support case. Use the <code>caseId</code> parameter to identify the case to which to add communication. You can list a set of email addresses to copy on the communication by using the <code>ccEmailAddresses</code> parameter. The <code>communicationBody</code> value contains the text of the communication.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1336 async fn add_communication_to_case(
1337 &self,
1338 input: AddCommunicationToCaseRequest,
1339 ) -> Result<AddCommunicationToCaseResponse, RusotoError<AddCommunicationToCaseError>>;
1340
1341 /// <p><p>Creates a case in the AWS Support Center. This operation is similar to how you create a case in the AWS Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p> <p>The AWS Support API doesn't support requesting service limit increases. You can submit a service limit increase in the following ways: </p> <ul> <li> <p>Submit a request from the AWS Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p> </li> <li> <p>Use the Service Quotas <a href="https://docs.aws.amazon.com/servicequotas/2019-06-24/apireference/API_RequestServiceQuotaIncrease.html">RequestServiceQuotaIncrease</a> operation.</p> </li> </ul> <p>A successful <code>CreateCase</code> request returns an AWS Support case number. You can use the <a>DescribeCases</a> operation and specify the case number to get existing AWS Support cases. After you create a case, use the <a>AddCommunicationToCase</a> operation to add additional communication or attachments to an existing case.</p> <p>The <code>caseId</code> is separate from the <code>displayId</code> that appears in the <a href="https://console.aws.amazon.com/support">AWS Support Center</a>. Use the <a>DescribeCases</a> operation to get the <code>displayId</code>.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1342 async fn create_case(
1343 &self,
1344 input: CreateCaseRequest,
1345 ) -> Result<CreateCaseResponse, RusotoError<CreateCaseError>>;
1346
1347 /// <p><p>Returns the attachment that has the specified ID. Attachments can include screenshots, error logs, or other files that describe your issue. Attachment IDs are generated by the case management system when you add an attachment to a case or case communication. Attachment IDs are returned in the <a>AttachmentDetails</a> objects that are returned by the <a>DescribeCommunications</a> operation.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1348 async fn describe_attachment(
1349 &self,
1350 input: DescribeAttachmentRequest,
1351 ) -> Result<DescribeAttachmentResponse, RusotoError<DescribeAttachmentError>>;
1352
1353 /// <p><p>Returns a list of cases that you specify by passing one or more case IDs. You can use the <code>afterTime</code> and <code>beforeTime</code> parameters to filter the cases by date. You can set values for the <code>includeResolvedCases</code> and <code>includeCommunications</code> parameters to specify how much information to return.</p> <p>The response returns the following in JSON format:</p> <ul> <li> <p>One or more <a href="https://docs.aws.amazon.com/awssupport/latest/APIReference/API_CaseDetails.html">CaseDetails</a> data types.</p> </li> <li> <p>One or more <code>nextToken</code> values, which specify where to paginate the returned records represented by the <code>CaseDetails</code> objects.</p> </li> </ul> <p>Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request might return an error.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1354 async fn describe_cases(
1355 &self,
1356 input: DescribeCasesRequest,
1357 ) -> Result<DescribeCasesResponse, RusotoError<DescribeCasesError>>;
1358
1359 /// <p><p>Returns communications and attachments for one or more support cases. Use the <code>afterTime</code> and <code>beforeTime</code> parameters to filter by date. You can use the <code>caseId</code> parameter to restrict the results to a specific case.</p> <p>Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.</p> <p>You can use the <code>maxResults</code> and <code>nextToken</code> parameters to control the pagination of the results. Set <code>maxResults</code> to the number of cases that you want to display on each page, and use <code>nextToken</code> to specify the resumption of pagination.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1360 async fn describe_communications(
1361 &self,
1362 input: DescribeCommunicationsRequest,
1363 ) -> Result<DescribeCommunicationsResponse, RusotoError<DescribeCommunicationsError>>;
1364
1365 /// <p><p>Returns the current list of AWS services and a list of service categories for each service. You then use service names and categories in your <a>CreateCase</a> requests. Each AWS service has its own set of categories.</p> <p>The service codes and category codes correspond to the values that appear in the <b>Service</b> and <b>Category</b> lists on the AWS Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page. The values in those fields don't necessarily match the service codes and categories returned by the <code>DescribeServices</code> operation. Always use the service codes and categories that the <code>DescribeServices</code> operation returns, so that you have the most recent set of service and category codes.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1366 async fn describe_services(
1367 &self,
1368 input: DescribeServicesRequest,
1369 ) -> Result<DescribeServicesResponse, RusotoError<DescribeServicesError>>;
1370
1371 /// <p><p>Returns the list of severity levels that you can assign to an AWS Support case. The severity level for a case is also a field in the <a>CaseDetails</a> data type that you include for a <a>CreateCase</a> request.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1372 async fn describe_severity_levels(
1373 &self,
1374 input: DescribeSeverityLevelsRequest,
1375 ) -> Result<DescribeSeverityLevelsResponse, RusotoError<DescribeSeverityLevelsError>>;
1376
1377 /// <p><p>Returns the refresh status of the AWS Trusted Advisor checks that have the specified check IDs. You can get the check IDs by calling the <a>DescribeTrustedAdvisorChecks</a> operation.</p> <p>Some checks are refreshed automatically, and you can't return their refresh statuses by using the <code>DescribeTrustedAdvisorCheckRefreshStatuses</code> operation. If you call this operation for these checks, you might see an <code>InvalidParameterValue</code> error.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1378 async fn describe_trusted_advisor_check_refresh_statuses(
1379 &self,
1380 input: DescribeTrustedAdvisorCheckRefreshStatusesRequest,
1381 ) -> Result<
1382 DescribeTrustedAdvisorCheckRefreshStatusesResponse,
1383 RusotoError<DescribeTrustedAdvisorCheckRefreshStatusesError>,
1384 >;
1385
1386 /// <p><p>Returns the results of the AWS Trusted Advisor check that has the specified check ID. You can get the check IDs by calling the <a>DescribeTrustedAdvisorChecks</a> operation.</p> <p>The response contains a <a>TrustedAdvisorCheckResult</a> object, which contains these three objects:</p> <ul> <li> <p> <a>TrustedAdvisorCategorySpecificSummary</a> </p> </li> <li> <p> <a>TrustedAdvisorResourceDetail</a> </p> </li> <li> <p> <a>TrustedAdvisorResourcesSummary</a> </p> </li> </ul> <p>In addition, the response contains these fields:</p> <ul> <li> <p> <b>status</b> - The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".</p> </li> <li> <p> <b>timestamp</b> - The time of the last refresh of the check.</p> </li> <li> <p> <b>checkId</b> - The unique identifier for the check.</p> </li> </ul> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1387 async fn describe_trusted_advisor_check_result(
1388 &self,
1389 input: DescribeTrustedAdvisorCheckResultRequest,
1390 ) -> Result<
1391 DescribeTrustedAdvisorCheckResultResponse,
1392 RusotoError<DescribeTrustedAdvisorCheckResultError>,
1393 >;
1394
1395 /// <p><p>Returns the results for the AWS Trusted Advisor check summaries for the check IDs that you specified. You can get the check IDs by calling the <a>DescribeTrustedAdvisorChecks</a> operation.</p> <p>The response contains an array of <a>TrustedAdvisorCheckSummary</a> objects.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1396 async fn describe_trusted_advisor_check_summaries(
1397 &self,
1398 input: DescribeTrustedAdvisorCheckSummariesRequest,
1399 ) -> Result<
1400 DescribeTrustedAdvisorCheckSummariesResponse,
1401 RusotoError<DescribeTrustedAdvisorCheckSummariesError>,
1402 >;
1403
1404 /// <p><p>Returns information about all available AWS Trusted Advisor checks, including the name, ID, category, description, and metadata. You must specify a language code. The AWS Support API currently supports English ("en") and Japanese ("ja"). The response contains a <a>TrustedAdvisorCheckDescription</a> object for each check. You must set the AWS Region to us-east-1.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1405 async fn describe_trusted_advisor_checks(
1406 &self,
1407 input: DescribeTrustedAdvisorChecksRequest,
1408 ) -> Result<DescribeTrustedAdvisorChecksResponse, RusotoError<DescribeTrustedAdvisorChecksError>>;
1409
1410 /// <p><p>Refreshes the AWS Trusted Advisor check that you specify using the check ID. You can get the check IDs by calling the <a>DescribeTrustedAdvisorChecks</a> operation.</p> <note> <p>Some checks are refreshed automatically. If you call the <code>RefreshTrustedAdvisorCheck</code> operation to refresh them, you might see the <code>InvalidParameterValue</code> error.</p> </note> <p>The response contains a <a>TrustedAdvisorCheckRefreshStatus</a> object.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1411 async fn refresh_trusted_advisor_check(
1412 &self,
1413 input: RefreshTrustedAdvisorCheckRequest,
1414 ) -> Result<RefreshTrustedAdvisorCheckResponse, RusotoError<RefreshTrustedAdvisorCheckError>>;
1415
1416 /// <p><p>Resolves a support case. This operation takes a <code>caseId</code> and returns the initial and final state of the case.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1417 async fn resolve_case(
1418 &self,
1419 input: ResolveCaseRequest,
1420 ) -> Result<ResolveCaseResponse, RusotoError<ResolveCaseError>>;
1421}
1422/// A client for the AWS Support API.
1423#[derive(Clone)]
1424pub struct AWSSupportClient {
1425 client: Client,
1426 region: region::Region,
1427}
1428
1429impl AWSSupportClient {
1430 /// Creates a client backed by the default tokio event loop.
1431 ///
1432 /// The client will use the default credentials provider and tls client.
1433 pub fn new(region: region::Region) -> AWSSupportClient {
1434 AWSSupportClient {
1435 client: Client::shared(),
1436 region,
1437 }
1438 }
1439
1440 pub fn new_with<P, D>(
1441 request_dispatcher: D,
1442 credentials_provider: P,
1443 region: region::Region,
1444 ) -> AWSSupportClient
1445 where
1446 P: ProvideAwsCredentials + Send + Sync + 'static,
1447 D: DispatchSignedRequest + Send + Sync + 'static,
1448 {
1449 AWSSupportClient {
1450 client: Client::new_with(credentials_provider, request_dispatcher),
1451 region,
1452 }
1453 }
1454
1455 pub fn new_with_client(client: Client, region: region::Region) -> AWSSupportClient {
1456 AWSSupportClient { client, region }
1457 }
1458}
1459
1460#[async_trait]
1461impl AWSSupport for AWSSupportClient {
1462 /// <p><p>Adds one or more attachments to an attachment set. </p> <p>An attachment set is a temporary container for attachments that you add to a case or case communication. The set is available for 1 hour after it's created. The <code>expiryTime</code> returned in the response is when the set expires. </p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1463 async fn add_attachments_to_set(
1464 &self,
1465 input: AddAttachmentsToSetRequest,
1466 ) -> Result<AddAttachmentsToSetResponse, RusotoError<AddAttachmentsToSetError>> {
1467 let mut request = self.new_signed_request("POST", "/");
1468 request.add_header("x-amz-target", "AWSSupport_20130415.AddAttachmentsToSet");
1469 let encoded = serde_json::to_string(&input).unwrap();
1470 request.set_payload(Some(encoded));
1471
1472 let response = self
1473 .sign_and_dispatch(request, AddAttachmentsToSetError::from_response)
1474 .await?;
1475 let mut response = response;
1476 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1477 proto::json::ResponsePayload::new(&response).deserialize::<AddAttachmentsToSetResponse, _>()
1478 }
1479
1480 /// <p><p>Adds additional customer communication to an AWS Support case. Use the <code>caseId</code> parameter to identify the case to which to add communication. You can list a set of email addresses to copy on the communication by using the <code>ccEmailAddresses</code> parameter. The <code>communicationBody</code> value contains the text of the communication.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1481 async fn add_communication_to_case(
1482 &self,
1483 input: AddCommunicationToCaseRequest,
1484 ) -> Result<AddCommunicationToCaseResponse, RusotoError<AddCommunicationToCaseError>> {
1485 let mut request = self.new_signed_request("POST", "/");
1486 request.add_header("x-amz-target", "AWSSupport_20130415.AddCommunicationToCase");
1487 let encoded = serde_json::to_string(&input).unwrap();
1488 request.set_payload(Some(encoded));
1489
1490 let response = self
1491 .sign_and_dispatch(request, AddCommunicationToCaseError::from_response)
1492 .await?;
1493 let mut response = response;
1494 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1495 proto::json::ResponsePayload::new(&response)
1496 .deserialize::<AddCommunicationToCaseResponse, _>()
1497 }
1498
1499 /// <p><p>Creates a case in the AWS Support Center. This operation is similar to how you create a case in the AWS Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p> <p>The AWS Support API doesn't support requesting service limit increases. You can submit a service limit increase in the following ways: </p> <ul> <li> <p>Submit a request from the AWS Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p> </li> <li> <p>Use the Service Quotas <a href="https://docs.aws.amazon.com/servicequotas/2019-06-24/apireference/API_RequestServiceQuotaIncrease.html">RequestServiceQuotaIncrease</a> operation.</p> </li> </ul> <p>A successful <code>CreateCase</code> request returns an AWS Support case number. You can use the <a>DescribeCases</a> operation and specify the case number to get existing AWS Support cases. After you create a case, use the <a>AddCommunicationToCase</a> operation to add additional communication or attachments to an existing case.</p> <p>The <code>caseId</code> is separate from the <code>displayId</code> that appears in the <a href="https://console.aws.amazon.com/support">AWS Support Center</a>. Use the <a>DescribeCases</a> operation to get the <code>displayId</code>.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1500 async fn create_case(
1501 &self,
1502 input: CreateCaseRequest,
1503 ) -> Result<CreateCaseResponse, RusotoError<CreateCaseError>> {
1504 let mut request = self.new_signed_request("POST", "/");
1505 request.add_header("x-amz-target", "AWSSupport_20130415.CreateCase");
1506 let encoded = serde_json::to_string(&input).unwrap();
1507 request.set_payload(Some(encoded));
1508
1509 let response = self
1510 .sign_and_dispatch(request, CreateCaseError::from_response)
1511 .await?;
1512 let mut response = response;
1513 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1514 proto::json::ResponsePayload::new(&response).deserialize::<CreateCaseResponse, _>()
1515 }
1516
1517 /// <p><p>Returns the attachment that has the specified ID. Attachments can include screenshots, error logs, or other files that describe your issue. Attachment IDs are generated by the case management system when you add an attachment to a case or case communication. Attachment IDs are returned in the <a>AttachmentDetails</a> objects that are returned by the <a>DescribeCommunications</a> operation.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1518 async fn describe_attachment(
1519 &self,
1520 input: DescribeAttachmentRequest,
1521 ) -> Result<DescribeAttachmentResponse, RusotoError<DescribeAttachmentError>> {
1522 let mut request = self.new_signed_request("POST", "/");
1523 request.add_header("x-amz-target", "AWSSupport_20130415.DescribeAttachment");
1524 let encoded = serde_json::to_string(&input).unwrap();
1525 request.set_payload(Some(encoded));
1526
1527 let response = self
1528 .sign_and_dispatch(request, DescribeAttachmentError::from_response)
1529 .await?;
1530 let mut response = response;
1531 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1532 proto::json::ResponsePayload::new(&response).deserialize::<DescribeAttachmentResponse, _>()
1533 }
1534
1535 /// <p><p>Returns a list of cases that you specify by passing one or more case IDs. You can use the <code>afterTime</code> and <code>beforeTime</code> parameters to filter the cases by date. You can set values for the <code>includeResolvedCases</code> and <code>includeCommunications</code> parameters to specify how much information to return.</p> <p>The response returns the following in JSON format:</p> <ul> <li> <p>One or more <a href="https://docs.aws.amazon.com/awssupport/latest/APIReference/API_CaseDetails.html">CaseDetails</a> data types.</p> </li> <li> <p>One or more <code>nextToken</code> values, which specify where to paginate the returned records represented by the <code>CaseDetails</code> objects.</p> </li> </ul> <p>Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request might return an error.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1536 async fn describe_cases(
1537 &self,
1538 input: DescribeCasesRequest,
1539 ) -> Result<DescribeCasesResponse, RusotoError<DescribeCasesError>> {
1540 let mut request = self.new_signed_request("POST", "/");
1541 request.add_header("x-amz-target", "AWSSupport_20130415.DescribeCases");
1542 let encoded = serde_json::to_string(&input).unwrap();
1543 request.set_payload(Some(encoded));
1544
1545 let response = self
1546 .sign_and_dispatch(request, DescribeCasesError::from_response)
1547 .await?;
1548 let mut response = response;
1549 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1550 proto::json::ResponsePayload::new(&response).deserialize::<DescribeCasesResponse, _>()
1551 }
1552
1553 /// <p><p>Returns communications and attachments for one or more support cases. Use the <code>afterTime</code> and <code>beforeTime</code> parameters to filter by date. You can use the <code>caseId</code> parameter to restrict the results to a specific case.</p> <p>Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.</p> <p>You can use the <code>maxResults</code> and <code>nextToken</code> parameters to control the pagination of the results. Set <code>maxResults</code> to the number of cases that you want to display on each page, and use <code>nextToken</code> to specify the resumption of pagination.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1554 async fn describe_communications(
1555 &self,
1556 input: DescribeCommunicationsRequest,
1557 ) -> Result<DescribeCommunicationsResponse, RusotoError<DescribeCommunicationsError>> {
1558 let mut request = self.new_signed_request("POST", "/");
1559 request.add_header("x-amz-target", "AWSSupport_20130415.DescribeCommunications");
1560 let encoded = serde_json::to_string(&input).unwrap();
1561 request.set_payload(Some(encoded));
1562
1563 let response = self
1564 .sign_and_dispatch(request, DescribeCommunicationsError::from_response)
1565 .await?;
1566 let mut response = response;
1567 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1568 proto::json::ResponsePayload::new(&response)
1569 .deserialize::<DescribeCommunicationsResponse, _>()
1570 }
1571
1572 /// <p><p>Returns the current list of AWS services and a list of service categories for each service. You then use service names and categories in your <a>CreateCase</a> requests. Each AWS service has its own set of categories.</p> <p>The service codes and category codes correspond to the values that appear in the <b>Service</b> and <b>Category</b> lists on the AWS Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page. The values in those fields don't necessarily match the service codes and categories returned by the <code>DescribeServices</code> operation. Always use the service codes and categories that the <code>DescribeServices</code> operation returns, so that you have the most recent set of service and category codes.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1573 async fn describe_services(
1574 &self,
1575 input: DescribeServicesRequest,
1576 ) -> Result<DescribeServicesResponse, RusotoError<DescribeServicesError>> {
1577 let mut request = self.new_signed_request("POST", "/");
1578 request.add_header("x-amz-target", "AWSSupport_20130415.DescribeServices");
1579 let encoded = serde_json::to_string(&input).unwrap();
1580 request.set_payload(Some(encoded));
1581
1582 let response = self
1583 .sign_and_dispatch(request, DescribeServicesError::from_response)
1584 .await?;
1585 let mut response = response;
1586 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1587 proto::json::ResponsePayload::new(&response).deserialize::<DescribeServicesResponse, _>()
1588 }
1589
1590 /// <p><p>Returns the list of severity levels that you can assign to an AWS Support case. The severity level for a case is also a field in the <a>CaseDetails</a> data type that you include for a <a>CreateCase</a> request.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1591 async fn describe_severity_levels(
1592 &self,
1593 input: DescribeSeverityLevelsRequest,
1594 ) -> Result<DescribeSeverityLevelsResponse, RusotoError<DescribeSeverityLevelsError>> {
1595 let mut request = self.new_signed_request("POST", "/");
1596 request.add_header("x-amz-target", "AWSSupport_20130415.DescribeSeverityLevels");
1597 let encoded = serde_json::to_string(&input).unwrap();
1598 request.set_payload(Some(encoded));
1599
1600 let response = self
1601 .sign_and_dispatch(request, DescribeSeverityLevelsError::from_response)
1602 .await?;
1603 let mut response = response;
1604 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1605 proto::json::ResponsePayload::new(&response)
1606 .deserialize::<DescribeSeverityLevelsResponse, _>()
1607 }
1608
1609 /// <p><p>Returns the refresh status of the AWS Trusted Advisor checks that have the specified check IDs. You can get the check IDs by calling the <a>DescribeTrustedAdvisorChecks</a> operation.</p> <p>Some checks are refreshed automatically, and you can't return their refresh statuses by using the <code>DescribeTrustedAdvisorCheckRefreshStatuses</code> operation. If you call this operation for these checks, you might see an <code>InvalidParameterValue</code> error.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1610 async fn describe_trusted_advisor_check_refresh_statuses(
1611 &self,
1612 input: DescribeTrustedAdvisorCheckRefreshStatusesRequest,
1613 ) -> Result<
1614 DescribeTrustedAdvisorCheckRefreshStatusesResponse,
1615 RusotoError<DescribeTrustedAdvisorCheckRefreshStatusesError>,
1616 > {
1617 let mut request = self.new_signed_request("POST", "/");
1618 request.add_header(
1619 "x-amz-target",
1620 "AWSSupport_20130415.DescribeTrustedAdvisorCheckRefreshStatuses",
1621 );
1622 let encoded = serde_json::to_string(&input).unwrap();
1623 request.set_payload(Some(encoded));
1624
1625 let response = self
1626 .sign_and_dispatch(
1627 request,
1628 DescribeTrustedAdvisorCheckRefreshStatusesError::from_response,
1629 )
1630 .await?;
1631 let mut response = response;
1632 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1633 proto::json::ResponsePayload::new(&response)
1634 .deserialize::<DescribeTrustedAdvisorCheckRefreshStatusesResponse, _>()
1635 }
1636
1637 /// <p><p>Returns the results of the AWS Trusted Advisor check that has the specified check ID. You can get the check IDs by calling the <a>DescribeTrustedAdvisorChecks</a> operation.</p> <p>The response contains a <a>TrustedAdvisorCheckResult</a> object, which contains these three objects:</p> <ul> <li> <p> <a>TrustedAdvisorCategorySpecificSummary</a> </p> </li> <li> <p> <a>TrustedAdvisorResourceDetail</a> </p> </li> <li> <p> <a>TrustedAdvisorResourcesSummary</a> </p> </li> </ul> <p>In addition, the response contains these fields:</p> <ul> <li> <p> <b>status</b> - The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".</p> </li> <li> <p> <b>timestamp</b> - The time of the last refresh of the check.</p> </li> <li> <p> <b>checkId</b> - The unique identifier for the check.</p> </li> </ul> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1638 async fn describe_trusted_advisor_check_result(
1639 &self,
1640 input: DescribeTrustedAdvisorCheckResultRequest,
1641 ) -> Result<
1642 DescribeTrustedAdvisorCheckResultResponse,
1643 RusotoError<DescribeTrustedAdvisorCheckResultError>,
1644 > {
1645 let mut request = self.new_signed_request("POST", "/");
1646 request.add_header(
1647 "x-amz-target",
1648 "AWSSupport_20130415.DescribeTrustedAdvisorCheckResult",
1649 );
1650 let encoded = serde_json::to_string(&input).unwrap();
1651 request.set_payload(Some(encoded));
1652
1653 let response = self
1654 .sign_and_dispatch(
1655 request,
1656 DescribeTrustedAdvisorCheckResultError::from_response,
1657 )
1658 .await?;
1659 let mut response = response;
1660 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1661 proto::json::ResponsePayload::new(&response)
1662 .deserialize::<DescribeTrustedAdvisorCheckResultResponse, _>()
1663 }
1664
1665 /// <p><p>Returns the results for the AWS Trusted Advisor check summaries for the check IDs that you specified. You can get the check IDs by calling the <a>DescribeTrustedAdvisorChecks</a> operation.</p> <p>The response contains an array of <a>TrustedAdvisorCheckSummary</a> objects.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1666 async fn describe_trusted_advisor_check_summaries(
1667 &self,
1668 input: DescribeTrustedAdvisorCheckSummariesRequest,
1669 ) -> Result<
1670 DescribeTrustedAdvisorCheckSummariesResponse,
1671 RusotoError<DescribeTrustedAdvisorCheckSummariesError>,
1672 > {
1673 let mut request = self.new_signed_request("POST", "/");
1674 request.add_header(
1675 "x-amz-target",
1676 "AWSSupport_20130415.DescribeTrustedAdvisorCheckSummaries",
1677 );
1678 let encoded = serde_json::to_string(&input).unwrap();
1679 request.set_payload(Some(encoded));
1680
1681 let response = self
1682 .sign_and_dispatch(
1683 request,
1684 DescribeTrustedAdvisorCheckSummariesError::from_response,
1685 )
1686 .await?;
1687 let mut response = response;
1688 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1689 proto::json::ResponsePayload::new(&response)
1690 .deserialize::<DescribeTrustedAdvisorCheckSummariesResponse, _>()
1691 }
1692
1693 /// <p><p>Returns information about all available AWS Trusted Advisor checks, including the name, ID, category, description, and metadata. You must specify a language code. The AWS Support API currently supports English ("en") and Japanese ("ja"). The response contains a <a>TrustedAdvisorCheckDescription</a> object for each check. You must set the AWS Region to us-east-1.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1694 async fn describe_trusted_advisor_checks(
1695 &self,
1696 input: DescribeTrustedAdvisorChecksRequest,
1697 ) -> Result<DescribeTrustedAdvisorChecksResponse, RusotoError<DescribeTrustedAdvisorChecksError>>
1698 {
1699 let mut request = self.new_signed_request("POST", "/");
1700 request.add_header(
1701 "x-amz-target",
1702 "AWSSupport_20130415.DescribeTrustedAdvisorChecks",
1703 );
1704 let encoded = serde_json::to_string(&input).unwrap();
1705 request.set_payload(Some(encoded));
1706
1707 let response = self
1708 .sign_and_dispatch(request, DescribeTrustedAdvisorChecksError::from_response)
1709 .await?;
1710 let mut response = response;
1711 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1712 proto::json::ResponsePayload::new(&response)
1713 .deserialize::<DescribeTrustedAdvisorChecksResponse, _>()
1714 }
1715
1716 /// <p><p>Refreshes the AWS Trusted Advisor check that you specify using the check ID. You can get the check IDs by calling the <a>DescribeTrustedAdvisorChecks</a> operation.</p> <note> <p>Some checks are refreshed automatically. If you call the <code>RefreshTrustedAdvisorCheck</code> operation to refresh them, you might see the <code>InvalidParameterValue</code> error.</p> </note> <p>The response contains a <a>TrustedAdvisorCheckRefreshStatus</a> object.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1717 async fn refresh_trusted_advisor_check(
1718 &self,
1719 input: RefreshTrustedAdvisorCheckRequest,
1720 ) -> Result<RefreshTrustedAdvisorCheckResponse, RusotoError<RefreshTrustedAdvisorCheckError>>
1721 {
1722 let mut request = self.new_signed_request("POST", "/");
1723 request.add_header(
1724 "x-amz-target",
1725 "AWSSupport_20130415.RefreshTrustedAdvisorCheck",
1726 );
1727 let encoded = serde_json::to_string(&input).unwrap();
1728 request.set_payload(Some(encoded));
1729
1730 let response = self
1731 .sign_and_dispatch(request, RefreshTrustedAdvisorCheckError::from_response)
1732 .await?;
1733 let mut response = response;
1734 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1735 proto::json::ResponsePayload::new(&response)
1736 .deserialize::<RefreshTrustedAdvisorCheckResponse, _>()
1737 }
1738
1739 /// <p><p>Resolves a support case. This operation takes a <code>caseId</code> and returns the initial and final state of the case.</p> <note> <ul> <li> <p>You must have a Business or Enterprise support plan to use the AWS Support API. </p> </li> <li> <p>If you call the AWS Support API from an account that does not have a Business or Enterprise support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a>.</p> </li> </ul> </note></p>
1740 async fn resolve_case(
1741 &self,
1742 input: ResolveCaseRequest,
1743 ) -> Result<ResolveCaseResponse, RusotoError<ResolveCaseError>> {
1744 let mut request = self.new_signed_request("POST", "/");
1745 request.add_header("x-amz-target", "AWSSupport_20130415.ResolveCase");
1746 let encoded = serde_json::to_string(&input).unwrap();
1747 request.set_payload(Some(encoded));
1748
1749 let response = self
1750 .sign_and_dispatch(request, ResolveCaseError::from_response)
1751 .await?;
1752 let mut response = response;
1753 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1754 proto::json::ResponsePayload::new(&response).deserialize::<ResolveCaseResponse, _>()
1755 }
1756}