rusoto_cloudhsm/
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 CloudHsmClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "cloudhsm", &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 AddTagsToResourceRequest {
56    /// <p>The Amazon Resource Name (ARN) of the AWS CloudHSM resource to tag.</p>
57    #[serde(rename = "ResourceArn")]
58    pub resource_arn: String,
59    /// <p>One or more tags.</p>
60    #[serde(rename = "TagList")]
61    pub tag_list: Vec<Tag>,
62}
63
64#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
65#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
66pub struct AddTagsToResourceResponse {
67    /// <p>The status of the operation.</p>
68    #[serde(rename = "Status")]
69    pub status: String,
70}
71
72/// <p>Contains the inputs for the <a>CreateHapgRequest</a> action.</p>
73#[derive(Clone, Debug, Default, PartialEq, Serialize)]
74#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
75pub struct CreateHapgRequest {
76    /// <p>The label of the new high-availability partition group.</p>
77    #[serde(rename = "Label")]
78    pub label: String,
79}
80
81/// <p>Contains the output of the <a>CreateHAPartitionGroup</a> action.</p>
82#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
83#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
84pub struct CreateHapgResponse {
85    /// <p>The ARN of the high-availability partition group.</p>
86    #[serde(rename = "HapgArn")]
87    #[serde(skip_serializing_if = "Option::is_none")]
88    pub hapg_arn: Option<String>,
89}
90
91/// <p>Contains the inputs for the <code>CreateHsm</code> operation.</p>
92#[derive(Clone, Debug, Default, PartialEq, Serialize)]
93#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
94pub struct CreateHsmRequest {
95    /// <p>A user-defined token to ensure idempotence. Subsequent calls to this operation with the same token will be ignored.</p>
96    #[serde(rename = "ClientToken")]
97    #[serde(skip_serializing_if = "Option::is_none")]
98    pub client_token: Option<String>,
99    /// <p>The IP address to assign to the HSM's ENI.</p> <p>If an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the subnet.</p>
100    #[serde(rename = "EniIp")]
101    #[serde(skip_serializing_if = "Option::is_none")]
102    pub eni_ip: Option<String>,
103    /// <p>The external ID from <code>IamRoleArn</code>, if present.</p>
104    #[serde(rename = "ExternalId")]
105    #[serde(skip_serializing_if = "Option::is_none")]
106    pub external_id: Option<String>,
107    /// <p>The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.</p>
108    #[serde(rename = "IamRoleArn")]
109    pub iam_role_arn: String,
110    /// <p>The SSH public key to install on the HSM.</p>
111    #[serde(rename = "SshKey")]
112    pub ssh_key: String,
113    /// <p>The identifier of the subnet in your VPC in which to place the HSM.</p>
114    #[serde(rename = "SubnetId")]
115    pub subnet_id: String,
116    #[serde(rename = "SubscriptionType")]
117    pub subscription_type: String,
118    /// <p>The IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.</p>
119    #[serde(rename = "SyslogIp")]
120    #[serde(skip_serializing_if = "Option::is_none")]
121    pub syslog_ip: Option<String>,
122}
123
124/// <p>Contains the output of the <code>CreateHsm</code> operation.</p>
125#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
126#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
127pub struct CreateHsmResponse {
128    /// <p>The ARN of the HSM.</p>
129    #[serde(rename = "HsmArn")]
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub hsm_arn: Option<String>,
132}
133
134/// <p>Contains the inputs for the <a>CreateLunaClient</a> action.</p>
135#[derive(Clone, Debug, Default, PartialEq, Serialize)]
136#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
137pub struct CreateLunaClientRequest {
138    /// <p>The contents of a Base64-Encoded X.509 v3 certificate to be installed on the HSMs used by this client.</p>
139    #[serde(rename = "Certificate")]
140    pub certificate: String,
141    /// <p>The label for the client.</p>
142    #[serde(rename = "Label")]
143    #[serde(skip_serializing_if = "Option::is_none")]
144    pub label: Option<String>,
145}
146
147/// <p>Contains the output of the <a>CreateLunaClient</a> action.</p>
148#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
149#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
150pub struct CreateLunaClientResponse {
151    /// <p>The ARN of the client.</p>
152    #[serde(rename = "ClientArn")]
153    #[serde(skip_serializing_if = "Option::is_none")]
154    pub client_arn: Option<String>,
155}
156
157/// <p>Contains the inputs for the <a>DeleteHapg</a> action.</p>
158#[derive(Clone, Debug, Default, PartialEq, Serialize)]
159#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
160pub struct DeleteHapgRequest {
161    /// <p>The ARN of the high-availability partition group to delete.</p>
162    #[serde(rename = "HapgArn")]
163    pub hapg_arn: String,
164}
165
166/// <p>Contains the output of the <a>DeleteHapg</a> action.</p>
167#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
168#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
169pub struct DeleteHapgResponse {
170    /// <p>The status of the action.</p>
171    #[serde(rename = "Status")]
172    pub status: String,
173}
174
175/// <p>Contains the inputs for the <a>DeleteHsm</a> operation.</p>
176#[derive(Clone, Debug, Default, PartialEq, Serialize)]
177#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
178pub struct DeleteHsmRequest {
179    /// <p>The ARN of the HSM to delete.</p>
180    #[serde(rename = "HsmArn")]
181    pub hsm_arn: String,
182}
183
184/// <p>Contains the output of the <a>DeleteHsm</a> operation.</p>
185#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
186#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
187pub struct DeleteHsmResponse {
188    /// <p>The status of the operation.</p>
189    #[serde(rename = "Status")]
190    pub status: String,
191}
192
193#[derive(Clone, Debug, Default, PartialEq, Serialize)]
194#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
195pub struct DeleteLunaClientRequest {
196    /// <p>The ARN of the client to delete.</p>
197    #[serde(rename = "ClientArn")]
198    pub client_arn: String,
199}
200
201#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
202#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
203pub struct DeleteLunaClientResponse {
204    /// <p>The status of the action.</p>
205    #[serde(rename = "Status")]
206    pub status: String,
207}
208
209/// <p>Contains the inputs for the <a>DescribeHapg</a> action.</p>
210#[derive(Clone, Debug, Default, PartialEq, Serialize)]
211#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
212pub struct DescribeHapgRequest {
213    /// <p>The ARN of the high-availability partition group to describe.</p>
214    #[serde(rename = "HapgArn")]
215    pub hapg_arn: String,
216}
217
218/// <p>Contains the output of the <a>DescribeHapg</a> action.</p>
219#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
220#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
221pub struct DescribeHapgResponse {
222    /// <p>The ARN of the high-availability partition group.</p>
223    #[serde(rename = "HapgArn")]
224    #[serde(skip_serializing_if = "Option::is_none")]
225    pub hapg_arn: Option<String>,
226    /// <p>The serial number of the high-availability partition group.</p>
227    #[serde(rename = "HapgSerial")]
228    #[serde(skip_serializing_if = "Option::is_none")]
229    pub hapg_serial: Option<String>,
230    /// <p><p/></p>
231    #[serde(rename = "HsmsLastActionFailed")]
232    #[serde(skip_serializing_if = "Option::is_none")]
233    pub hsms_last_action_failed: Option<Vec<String>>,
234    /// <p><p/></p>
235    #[serde(rename = "HsmsPendingDeletion")]
236    #[serde(skip_serializing_if = "Option::is_none")]
237    pub hsms_pending_deletion: Option<Vec<String>>,
238    /// <p><p/></p>
239    #[serde(rename = "HsmsPendingRegistration")]
240    #[serde(skip_serializing_if = "Option::is_none")]
241    pub hsms_pending_registration: Option<Vec<String>>,
242    /// <p>The label for the high-availability partition group.</p>
243    #[serde(rename = "Label")]
244    #[serde(skip_serializing_if = "Option::is_none")]
245    pub label: Option<String>,
246    /// <p>The date and time the high-availability partition group was last modified.</p>
247    #[serde(rename = "LastModifiedTimestamp")]
248    #[serde(skip_serializing_if = "Option::is_none")]
249    pub last_modified_timestamp: Option<String>,
250    /// <p>The list of partition serial numbers that belong to the high-availability partition group.</p>
251    #[serde(rename = "PartitionSerialList")]
252    #[serde(skip_serializing_if = "Option::is_none")]
253    pub partition_serial_list: Option<Vec<String>>,
254    /// <p>The state of the high-availability partition group.</p>
255    #[serde(rename = "State")]
256    #[serde(skip_serializing_if = "Option::is_none")]
257    pub state: Option<String>,
258}
259
260/// <p>Contains the inputs for the <a>DescribeHsm</a> operation.</p>
261#[derive(Clone, Debug, Default, PartialEq, Serialize)]
262#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
263pub struct DescribeHsmRequest {
264    /// <p>The ARN of the HSM. Either the <code>HsmArn</code> or the <code>SerialNumber</code> parameter must be specified.</p>
265    #[serde(rename = "HsmArn")]
266    #[serde(skip_serializing_if = "Option::is_none")]
267    pub hsm_arn: Option<String>,
268    /// <p>The serial number of the HSM. Either the <code>HsmArn</code> or the <code>HsmSerialNumber</code> parameter must be specified.</p>
269    #[serde(rename = "HsmSerialNumber")]
270    #[serde(skip_serializing_if = "Option::is_none")]
271    pub hsm_serial_number: Option<String>,
272}
273
274/// <p>Contains the output of the <a>DescribeHsm</a> operation.</p>
275#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
276#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
277pub struct DescribeHsmResponse {
278    /// <p>The Availability Zone that the HSM is in.</p>
279    #[serde(rename = "AvailabilityZone")]
280    #[serde(skip_serializing_if = "Option::is_none")]
281    pub availability_zone: Option<String>,
282    /// <p>The identifier of the elastic network interface (ENI) attached to the HSM.</p>
283    #[serde(rename = "EniId")]
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub eni_id: Option<String>,
286    /// <p>The IP address assigned to the HSM's ENI.</p>
287    #[serde(rename = "EniIp")]
288    #[serde(skip_serializing_if = "Option::is_none")]
289    pub eni_ip: Option<String>,
290    /// <p>The ARN of the HSM.</p>
291    #[serde(rename = "HsmArn")]
292    #[serde(skip_serializing_if = "Option::is_none")]
293    pub hsm_arn: Option<String>,
294    /// <p>The HSM model type.</p>
295    #[serde(rename = "HsmType")]
296    #[serde(skip_serializing_if = "Option::is_none")]
297    pub hsm_type: Option<String>,
298    /// <p>The ARN of the IAM role assigned to the HSM.</p>
299    #[serde(rename = "IamRoleArn")]
300    #[serde(skip_serializing_if = "Option::is_none")]
301    pub iam_role_arn: Option<String>,
302    /// <p>The list of partitions on the HSM.</p>
303    #[serde(rename = "Partitions")]
304    #[serde(skip_serializing_if = "Option::is_none")]
305    pub partitions: Option<Vec<String>>,
306    /// <p>The serial number of the HSM.</p>
307    #[serde(rename = "SerialNumber")]
308    #[serde(skip_serializing_if = "Option::is_none")]
309    pub serial_number: Option<String>,
310    /// <p>The date and time that the server certificate was last updated.</p>
311    #[serde(rename = "ServerCertLastUpdated")]
312    #[serde(skip_serializing_if = "Option::is_none")]
313    pub server_cert_last_updated: Option<String>,
314    /// <p>The URI of the certificate server.</p>
315    #[serde(rename = "ServerCertUri")]
316    #[serde(skip_serializing_if = "Option::is_none")]
317    pub server_cert_uri: Option<String>,
318    /// <p>The HSM software version.</p>
319    #[serde(rename = "SoftwareVersion")]
320    #[serde(skip_serializing_if = "Option::is_none")]
321    pub software_version: Option<String>,
322    /// <p>The date and time that the SSH key was last updated.</p>
323    #[serde(rename = "SshKeyLastUpdated")]
324    #[serde(skip_serializing_if = "Option::is_none")]
325    pub ssh_key_last_updated: Option<String>,
326    /// <p>The public SSH key.</p>
327    #[serde(rename = "SshPublicKey")]
328    #[serde(skip_serializing_if = "Option::is_none")]
329    pub ssh_public_key: Option<String>,
330    /// <p>The status of the HSM.</p>
331    #[serde(rename = "Status")]
332    #[serde(skip_serializing_if = "Option::is_none")]
333    pub status: Option<String>,
334    /// <p>Contains additional information about the status of the HSM.</p>
335    #[serde(rename = "StatusDetails")]
336    #[serde(skip_serializing_if = "Option::is_none")]
337    pub status_details: Option<String>,
338    /// <p>The identifier of the subnet that the HSM is in.</p>
339    #[serde(rename = "SubnetId")]
340    #[serde(skip_serializing_if = "Option::is_none")]
341    pub subnet_id: Option<String>,
342    /// <p>The subscription end date.</p>
343    #[serde(rename = "SubscriptionEndDate")]
344    #[serde(skip_serializing_if = "Option::is_none")]
345    pub subscription_end_date: Option<String>,
346    /// <p>The subscription start date.</p>
347    #[serde(rename = "SubscriptionStartDate")]
348    #[serde(skip_serializing_if = "Option::is_none")]
349    pub subscription_start_date: Option<String>,
350    #[serde(rename = "SubscriptionType")]
351    #[serde(skip_serializing_if = "Option::is_none")]
352    pub subscription_type: Option<String>,
353    /// <p>The name of the HSM vendor.</p>
354    #[serde(rename = "VendorName")]
355    #[serde(skip_serializing_if = "Option::is_none")]
356    pub vendor_name: Option<String>,
357    /// <p>The identifier of the VPC that the HSM is in.</p>
358    #[serde(rename = "VpcId")]
359    #[serde(skip_serializing_if = "Option::is_none")]
360    pub vpc_id: Option<String>,
361}
362
363#[derive(Clone, Debug, Default, PartialEq, Serialize)]
364#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
365pub struct DescribeLunaClientRequest {
366    /// <p>The certificate fingerprint.</p>
367    #[serde(rename = "CertificateFingerprint")]
368    #[serde(skip_serializing_if = "Option::is_none")]
369    pub certificate_fingerprint: Option<String>,
370    /// <p>The ARN of the client.</p>
371    #[serde(rename = "ClientArn")]
372    #[serde(skip_serializing_if = "Option::is_none")]
373    pub client_arn: Option<String>,
374}
375
376#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
377#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
378pub struct DescribeLunaClientResponse {
379    /// <p>The certificate installed on the HSMs used by this client.</p>
380    #[serde(rename = "Certificate")]
381    #[serde(skip_serializing_if = "Option::is_none")]
382    pub certificate: Option<String>,
383    /// <p>The certificate fingerprint.</p>
384    #[serde(rename = "CertificateFingerprint")]
385    #[serde(skip_serializing_if = "Option::is_none")]
386    pub certificate_fingerprint: Option<String>,
387    /// <p>The ARN of the client.</p>
388    #[serde(rename = "ClientArn")]
389    #[serde(skip_serializing_if = "Option::is_none")]
390    pub client_arn: Option<String>,
391    /// <p>The label of the client.</p>
392    #[serde(rename = "Label")]
393    #[serde(skip_serializing_if = "Option::is_none")]
394    pub label: Option<String>,
395    /// <p>The date and time the client was last modified.</p>
396    #[serde(rename = "LastModifiedTimestamp")]
397    #[serde(skip_serializing_if = "Option::is_none")]
398    pub last_modified_timestamp: Option<String>,
399}
400
401#[derive(Clone, Debug, Default, PartialEq, Serialize)]
402#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
403pub struct GetConfigRequest {
404    /// <p>The ARN of the client.</p>
405    #[serde(rename = "ClientArn")]
406    pub client_arn: String,
407    /// <p>The client version.</p>
408    #[serde(rename = "ClientVersion")]
409    pub client_version: String,
410    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
411    #[serde(rename = "HapgList")]
412    pub hapg_list: Vec<String>,
413}
414
415#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
416#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
417pub struct GetConfigResponse {
418    /// <p>The certificate file containing the server.pem files of the HSMs.</p>
419    #[serde(rename = "ConfigCred")]
420    #[serde(skip_serializing_if = "Option::is_none")]
421    pub config_cred: Option<String>,
422    /// <p>The chrystoki.conf configuration file.</p>
423    #[serde(rename = "ConfigFile")]
424    #[serde(skip_serializing_if = "Option::is_none")]
425    pub config_file: Option<String>,
426    /// <p>The type of credentials.</p>
427    #[serde(rename = "ConfigType")]
428    #[serde(skip_serializing_if = "Option::is_none")]
429    pub config_type: Option<String>,
430}
431
432/// <p>Contains the inputs for the <a>ListAvailableZones</a> action.</p>
433#[derive(Clone, Debug, Default, PartialEq, Serialize)]
434#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
435pub struct ListAvailableZonesRequest {}
436
437#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
438#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
439pub struct ListAvailableZonesResponse {
440    /// <p>The list of Availability Zones that have available AWS CloudHSM capacity.</p>
441    #[serde(rename = "AZList")]
442    #[serde(skip_serializing_if = "Option::is_none")]
443    pub az_list: Option<Vec<String>>,
444}
445
446#[derive(Clone, Debug, Default, PartialEq, Serialize)]
447#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
448pub struct ListHapgsRequest {
449    /// <p>The <code>NextToken</code> value from a previous call to <code>ListHapgs</code>. Pass null if this is the first call.</p>
450    #[serde(rename = "NextToken")]
451    #[serde(skip_serializing_if = "Option::is_none")]
452    pub next_token: Option<String>,
453}
454
455#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
456#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
457pub struct ListHapgsResponse {
458    /// <p>The list of high-availability partition groups.</p>
459    #[serde(rename = "HapgList")]
460    pub hapg_list: Vec<String>,
461    /// <p>If not null, more results are available. Pass this value to <code>ListHapgs</code> to retrieve the next set of items.</p>
462    #[serde(rename = "NextToken")]
463    #[serde(skip_serializing_if = "Option::is_none")]
464    pub next_token: Option<String>,
465}
466
467#[derive(Clone, Debug, Default, PartialEq, Serialize)]
468#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
469pub struct ListHsmsRequest {
470    /// <p>The <code>NextToken</code> value from a previous call to <code>ListHsms</code>. Pass null if this is the first call.</p>
471    #[serde(rename = "NextToken")]
472    #[serde(skip_serializing_if = "Option::is_none")]
473    pub next_token: Option<String>,
474}
475
476/// <p>Contains the output of the <code>ListHsms</code> operation.</p>
477#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
478#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
479pub struct ListHsmsResponse {
480    /// <p>The list of ARNs that identify the HSMs.</p>
481    #[serde(rename = "HsmList")]
482    #[serde(skip_serializing_if = "Option::is_none")]
483    pub hsm_list: Option<Vec<String>>,
484    /// <p>If not null, more results are available. Pass this value to <code>ListHsms</code> to retrieve the next set of items.</p>
485    #[serde(rename = "NextToken")]
486    #[serde(skip_serializing_if = "Option::is_none")]
487    pub next_token: Option<String>,
488}
489
490#[derive(Clone, Debug, Default, PartialEq, Serialize)]
491#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
492pub struct ListLunaClientsRequest {
493    /// <p>The <code>NextToken</code> value from a previous call to <code>ListLunaClients</code>. Pass null if this is the first call.</p>
494    #[serde(rename = "NextToken")]
495    #[serde(skip_serializing_if = "Option::is_none")]
496    pub next_token: Option<String>,
497}
498
499#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
500#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
501pub struct ListLunaClientsResponse {
502    /// <p>The list of clients.</p>
503    #[serde(rename = "ClientList")]
504    pub client_list: Vec<String>,
505    /// <p>If not null, more results are available. Pass this to <code>ListLunaClients</code> to retrieve the next set of items.</p>
506    #[serde(rename = "NextToken")]
507    #[serde(skip_serializing_if = "Option::is_none")]
508    pub next_token: Option<String>,
509}
510
511#[derive(Clone, Debug, Default, PartialEq, Serialize)]
512#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
513pub struct ListTagsForResourceRequest {
514    /// <p>The Amazon Resource Name (ARN) of the AWS CloudHSM resource.</p>
515    #[serde(rename = "ResourceArn")]
516    pub resource_arn: String,
517}
518
519#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
520#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
521pub struct ListTagsForResourceResponse {
522    /// <p>One or more tags.</p>
523    #[serde(rename = "TagList")]
524    pub tag_list: Vec<Tag>,
525}
526
527#[derive(Clone, Debug, Default, PartialEq, Serialize)]
528#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
529pub struct ModifyHapgRequest {
530    /// <p>The ARN of the high-availability partition group to modify.</p>
531    #[serde(rename = "HapgArn")]
532    pub hapg_arn: String,
533    /// <p>The new label for the high-availability partition group.</p>
534    #[serde(rename = "Label")]
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub label: Option<String>,
537    /// <p>The list of partition serial numbers to make members of the high-availability partition group.</p>
538    #[serde(rename = "PartitionSerialList")]
539    #[serde(skip_serializing_if = "Option::is_none")]
540    pub partition_serial_list: Option<Vec<String>>,
541}
542
543#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
544#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
545pub struct ModifyHapgResponse {
546    /// <p>The ARN of the high-availability partition group.</p>
547    #[serde(rename = "HapgArn")]
548    #[serde(skip_serializing_if = "Option::is_none")]
549    pub hapg_arn: Option<String>,
550}
551
552/// <p>Contains the inputs for the <a>ModifyHsm</a> operation.</p>
553#[derive(Clone, Debug, Default, PartialEq, Serialize)]
554#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
555pub struct ModifyHsmRequest {
556    /// <p>The new IP address for the elastic network interface (ENI) attached to the HSM.</p> <p>If the HSM is moved to a different subnet, and an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the new subnet.</p>
557    #[serde(rename = "EniIp")]
558    #[serde(skip_serializing_if = "Option::is_none")]
559    pub eni_ip: Option<String>,
560    /// <p>The new external ID.</p>
561    #[serde(rename = "ExternalId")]
562    #[serde(skip_serializing_if = "Option::is_none")]
563    pub external_id: Option<String>,
564    /// <p>The ARN of the HSM to modify.</p>
565    #[serde(rename = "HsmArn")]
566    pub hsm_arn: String,
567    /// <p>The new IAM role ARN.</p>
568    #[serde(rename = "IamRoleArn")]
569    #[serde(skip_serializing_if = "Option::is_none")]
570    pub iam_role_arn: Option<String>,
571    /// <p>The new identifier of the subnet that the HSM is in. The new subnet must be in the same Availability Zone as the current subnet.</p>
572    #[serde(rename = "SubnetId")]
573    #[serde(skip_serializing_if = "Option::is_none")]
574    pub subnet_id: Option<String>,
575    /// <p>The new IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.</p>
576    #[serde(rename = "SyslogIp")]
577    #[serde(skip_serializing_if = "Option::is_none")]
578    pub syslog_ip: Option<String>,
579}
580
581/// <p>Contains the output of the <a>ModifyHsm</a> operation.</p>
582#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
583#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
584pub struct ModifyHsmResponse {
585    /// <p>The ARN of the HSM.</p>
586    #[serde(rename = "HsmArn")]
587    #[serde(skip_serializing_if = "Option::is_none")]
588    pub hsm_arn: Option<String>,
589}
590
591#[derive(Clone, Debug, Default, PartialEq, Serialize)]
592#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
593pub struct ModifyLunaClientRequest {
594    /// <p>The new certificate for the client.</p>
595    #[serde(rename = "Certificate")]
596    pub certificate: String,
597    /// <p>The ARN of the client.</p>
598    #[serde(rename = "ClientArn")]
599    pub client_arn: String,
600}
601
602#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
603#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
604pub struct ModifyLunaClientResponse {
605    /// <p>The ARN of the client.</p>
606    #[serde(rename = "ClientArn")]
607    #[serde(skip_serializing_if = "Option::is_none")]
608    pub client_arn: Option<String>,
609}
610
611#[derive(Clone, Debug, Default, PartialEq, Serialize)]
612#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
613pub struct RemoveTagsFromResourceRequest {
614    /// <p>The Amazon Resource Name (ARN) of the AWS CloudHSM resource.</p>
615    #[serde(rename = "ResourceArn")]
616    pub resource_arn: String,
617    /// <p>The tag key or keys to remove.</p> <p>Specify only the tag key to remove (not the value). To overwrite the value for an existing tag, use <a>AddTagsToResource</a>.</p>
618    #[serde(rename = "TagKeyList")]
619    pub tag_key_list: Vec<String>,
620}
621
622#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
623#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
624pub struct RemoveTagsFromResourceResponse {
625    /// <p>The status of the operation.</p>
626    #[serde(rename = "Status")]
627    pub status: String,
628}
629
630/// <p>A key-value pair that identifies or specifies metadata about an AWS CloudHSM resource.</p>
631#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
632pub struct Tag {
633    /// <p>The key of the tag.</p>
634    #[serde(rename = "Key")]
635    pub key: String,
636    /// <p>The value of the tag.</p>
637    #[serde(rename = "Value")]
638    pub value: String,
639}
640
641/// Errors returned by AddTagsToResource
642#[derive(Debug, PartialEq)]
643pub enum AddTagsToResourceError {
644    /// <p>Indicates that an internal error occurred.</p>
645    CloudHsmInternal(String),
646    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
647    CloudHsmService(String),
648    /// <p>Indicates that one or more of the request parameters are not valid.</p>
649    InvalidRequest(String),
650}
651
652impl AddTagsToResourceError {
653    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsToResourceError> {
654        if let Some(err) = proto::json::Error::parse(&res) {
655            match err.typ.as_str() {
656                "CloudHsmInternalException" => {
657                    return RusotoError::Service(AddTagsToResourceError::CloudHsmInternal(err.msg))
658                }
659                "CloudHsmServiceException" => {
660                    return RusotoError::Service(AddTagsToResourceError::CloudHsmService(err.msg))
661                }
662                "InvalidRequestException" => {
663                    return RusotoError::Service(AddTagsToResourceError::InvalidRequest(err.msg))
664                }
665                "ValidationException" => return RusotoError::Validation(err.msg),
666                _ => {}
667            }
668        }
669        RusotoError::Unknown(res)
670    }
671}
672impl fmt::Display for AddTagsToResourceError {
673    #[allow(unused_variables)]
674    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
675        match *self {
676            AddTagsToResourceError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
677            AddTagsToResourceError::CloudHsmService(ref cause) => write!(f, "{}", cause),
678            AddTagsToResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
679        }
680    }
681}
682impl Error for AddTagsToResourceError {}
683/// Errors returned by CreateHapg
684#[derive(Debug, PartialEq)]
685pub enum CreateHapgError {
686    /// <p>Indicates that an internal error occurred.</p>
687    CloudHsmInternal(String),
688    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
689    CloudHsmService(String),
690    /// <p>Indicates that one or more of the request parameters are not valid.</p>
691    InvalidRequest(String),
692}
693
694impl CreateHapgError {
695    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateHapgError> {
696        if let Some(err) = proto::json::Error::parse(&res) {
697            match err.typ.as_str() {
698                "CloudHsmInternalException" => {
699                    return RusotoError::Service(CreateHapgError::CloudHsmInternal(err.msg))
700                }
701                "CloudHsmServiceException" => {
702                    return RusotoError::Service(CreateHapgError::CloudHsmService(err.msg))
703                }
704                "InvalidRequestException" => {
705                    return RusotoError::Service(CreateHapgError::InvalidRequest(err.msg))
706                }
707                "ValidationException" => return RusotoError::Validation(err.msg),
708                _ => {}
709            }
710        }
711        RusotoError::Unknown(res)
712    }
713}
714impl fmt::Display for CreateHapgError {
715    #[allow(unused_variables)]
716    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
717        match *self {
718            CreateHapgError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
719            CreateHapgError::CloudHsmService(ref cause) => write!(f, "{}", cause),
720            CreateHapgError::InvalidRequest(ref cause) => write!(f, "{}", cause),
721        }
722    }
723}
724impl Error for CreateHapgError {}
725/// Errors returned by CreateHsm
726#[derive(Debug, PartialEq)]
727pub enum CreateHsmError {
728    /// <p>Indicates that an internal error occurred.</p>
729    CloudHsmInternal(String),
730    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
731    CloudHsmService(String),
732    /// <p>Indicates that one or more of the request parameters are not valid.</p>
733    InvalidRequest(String),
734}
735
736impl CreateHsmError {
737    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateHsmError> {
738        if let Some(err) = proto::json::Error::parse(&res) {
739            match err.typ.as_str() {
740                "CloudHsmInternalException" => {
741                    return RusotoError::Service(CreateHsmError::CloudHsmInternal(err.msg))
742                }
743                "CloudHsmServiceException" => {
744                    return RusotoError::Service(CreateHsmError::CloudHsmService(err.msg))
745                }
746                "InvalidRequestException" => {
747                    return RusotoError::Service(CreateHsmError::InvalidRequest(err.msg))
748                }
749                "ValidationException" => return RusotoError::Validation(err.msg),
750                _ => {}
751            }
752        }
753        RusotoError::Unknown(res)
754    }
755}
756impl fmt::Display for CreateHsmError {
757    #[allow(unused_variables)]
758    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
759        match *self {
760            CreateHsmError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
761            CreateHsmError::CloudHsmService(ref cause) => write!(f, "{}", cause),
762            CreateHsmError::InvalidRequest(ref cause) => write!(f, "{}", cause),
763        }
764    }
765}
766impl Error for CreateHsmError {}
767/// Errors returned by CreateLunaClient
768#[derive(Debug, PartialEq)]
769pub enum CreateLunaClientError {
770    /// <p>Indicates that an internal error occurred.</p>
771    CloudHsmInternal(String),
772    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
773    CloudHsmService(String),
774    /// <p>Indicates that one or more of the request parameters are not valid.</p>
775    InvalidRequest(String),
776}
777
778impl CreateLunaClientError {
779    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLunaClientError> {
780        if let Some(err) = proto::json::Error::parse(&res) {
781            match err.typ.as_str() {
782                "CloudHsmInternalException" => {
783                    return RusotoError::Service(CreateLunaClientError::CloudHsmInternal(err.msg))
784                }
785                "CloudHsmServiceException" => {
786                    return RusotoError::Service(CreateLunaClientError::CloudHsmService(err.msg))
787                }
788                "InvalidRequestException" => {
789                    return RusotoError::Service(CreateLunaClientError::InvalidRequest(err.msg))
790                }
791                "ValidationException" => return RusotoError::Validation(err.msg),
792                _ => {}
793            }
794        }
795        RusotoError::Unknown(res)
796    }
797}
798impl fmt::Display for CreateLunaClientError {
799    #[allow(unused_variables)]
800    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
801        match *self {
802            CreateLunaClientError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
803            CreateLunaClientError::CloudHsmService(ref cause) => write!(f, "{}", cause),
804            CreateLunaClientError::InvalidRequest(ref cause) => write!(f, "{}", cause),
805        }
806    }
807}
808impl Error for CreateLunaClientError {}
809/// Errors returned by DeleteHapg
810#[derive(Debug, PartialEq)]
811pub enum DeleteHapgError {
812    /// <p>Indicates that an internal error occurred.</p>
813    CloudHsmInternal(String),
814    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
815    CloudHsmService(String),
816    /// <p>Indicates that one or more of the request parameters are not valid.</p>
817    InvalidRequest(String),
818}
819
820impl DeleteHapgError {
821    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteHapgError> {
822        if let Some(err) = proto::json::Error::parse(&res) {
823            match err.typ.as_str() {
824                "CloudHsmInternalException" => {
825                    return RusotoError::Service(DeleteHapgError::CloudHsmInternal(err.msg))
826                }
827                "CloudHsmServiceException" => {
828                    return RusotoError::Service(DeleteHapgError::CloudHsmService(err.msg))
829                }
830                "InvalidRequestException" => {
831                    return RusotoError::Service(DeleteHapgError::InvalidRequest(err.msg))
832                }
833                "ValidationException" => return RusotoError::Validation(err.msg),
834                _ => {}
835            }
836        }
837        RusotoError::Unknown(res)
838    }
839}
840impl fmt::Display for DeleteHapgError {
841    #[allow(unused_variables)]
842    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
843        match *self {
844            DeleteHapgError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
845            DeleteHapgError::CloudHsmService(ref cause) => write!(f, "{}", cause),
846            DeleteHapgError::InvalidRequest(ref cause) => write!(f, "{}", cause),
847        }
848    }
849}
850impl Error for DeleteHapgError {}
851/// Errors returned by DeleteHsm
852#[derive(Debug, PartialEq)]
853pub enum DeleteHsmError {
854    /// <p>Indicates that an internal error occurred.</p>
855    CloudHsmInternal(String),
856    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
857    CloudHsmService(String),
858    /// <p>Indicates that one or more of the request parameters are not valid.</p>
859    InvalidRequest(String),
860}
861
862impl DeleteHsmError {
863    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteHsmError> {
864        if let Some(err) = proto::json::Error::parse(&res) {
865            match err.typ.as_str() {
866                "CloudHsmInternalException" => {
867                    return RusotoError::Service(DeleteHsmError::CloudHsmInternal(err.msg))
868                }
869                "CloudHsmServiceException" => {
870                    return RusotoError::Service(DeleteHsmError::CloudHsmService(err.msg))
871                }
872                "InvalidRequestException" => {
873                    return RusotoError::Service(DeleteHsmError::InvalidRequest(err.msg))
874                }
875                "ValidationException" => return RusotoError::Validation(err.msg),
876                _ => {}
877            }
878        }
879        RusotoError::Unknown(res)
880    }
881}
882impl fmt::Display for DeleteHsmError {
883    #[allow(unused_variables)]
884    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
885        match *self {
886            DeleteHsmError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
887            DeleteHsmError::CloudHsmService(ref cause) => write!(f, "{}", cause),
888            DeleteHsmError::InvalidRequest(ref cause) => write!(f, "{}", cause),
889        }
890    }
891}
892impl Error for DeleteHsmError {}
893/// Errors returned by DeleteLunaClient
894#[derive(Debug, PartialEq)]
895pub enum DeleteLunaClientError {
896    /// <p>Indicates that an internal error occurred.</p>
897    CloudHsmInternal(String),
898    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
899    CloudHsmService(String),
900    /// <p>Indicates that one or more of the request parameters are not valid.</p>
901    InvalidRequest(String),
902}
903
904impl DeleteLunaClientError {
905    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLunaClientError> {
906        if let Some(err) = proto::json::Error::parse(&res) {
907            match err.typ.as_str() {
908                "CloudHsmInternalException" => {
909                    return RusotoError::Service(DeleteLunaClientError::CloudHsmInternal(err.msg))
910                }
911                "CloudHsmServiceException" => {
912                    return RusotoError::Service(DeleteLunaClientError::CloudHsmService(err.msg))
913                }
914                "InvalidRequestException" => {
915                    return RusotoError::Service(DeleteLunaClientError::InvalidRequest(err.msg))
916                }
917                "ValidationException" => return RusotoError::Validation(err.msg),
918                _ => {}
919            }
920        }
921        RusotoError::Unknown(res)
922    }
923}
924impl fmt::Display for DeleteLunaClientError {
925    #[allow(unused_variables)]
926    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
927        match *self {
928            DeleteLunaClientError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
929            DeleteLunaClientError::CloudHsmService(ref cause) => write!(f, "{}", cause),
930            DeleteLunaClientError::InvalidRequest(ref cause) => write!(f, "{}", cause),
931        }
932    }
933}
934impl Error for DeleteLunaClientError {}
935/// Errors returned by DescribeHapg
936#[derive(Debug, PartialEq)]
937pub enum DescribeHapgError {
938    /// <p>Indicates that an internal error occurred.</p>
939    CloudHsmInternal(String),
940    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
941    CloudHsmService(String),
942    /// <p>Indicates that one or more of the request parameters are not valid.</p>
943    InvalidRequest(String),
944}
945
946impl DescribeHapgError {
947    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeHapgError> {
948        if let Some(err) = proto::json::Error::parse(&res) {
949            match err.typ.as_str() {
950                "CloudHsmInternalException" => {
951                    return RusotoError::Service(DescribeHapgError::CloudHsmInternal(err.msg))
952                }
953                "CloudHsmServiceException" => {
954                    return RusotoError::Service(DescribeHapgError::CloudHsmService(err.msg))
955                }
956                "InvalidRequestException" => {
957                    return RusotoError::Service(DescribeHapgError::InvalidRequest(err.msg))
958                }
959                "ValidationException" => return RusotoError::Validation(err.msg),
960                _ => {}
961            }
962        }
963        RusotoError::Unknown(res)
964    }
965}
966impl fmt::Display for DescribeHapgError {
967    #[allow(unused_variables)]
968    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
969        match *self {
970            DescribeHapgError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
971            DescribeHapgError::CloudHsmService(ref cause) => write!(f, "{}", cause),
972            DescribeHapgError::InvalidRequest(ref cause) => write!(f, "{}", cause),
973        }
974    }
975}
976impl Error for DescribeHapgError {}
977/// Errors returned by DescribeHsm
978#[derive(Debug, PartialEq)]
979pub enum DescribeHsmError {
980    /// <p>Indicates that an internal error occurred.</p>
981    CloudHsmInternal(String),
982    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
983    CloudHsmService(String),
984    /// <p>Indicates that one or more of the request parameters are not valid.</p>
985    InvalidRequest(String),
986}
987
988impl DescribeHsmError {
989    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeHsmError> {
990        if let Some(err) = proto::json::Error::parse(&res) {
991            match err.typ.as_str() {
992                "CloudHsmInternalException" => {
993                    return RusotoError::Service(DescribeHsmError::CloudHsmInternal(err.msg))
994                }
995                "CloudHsmServiceException" => {
996                    return RusotoError::Service(DescribeHsmError::CloudHsmService(err.msg))
997                }
998                "InvalidRequestException" => {
999                    return RusotoError::Service(DescribeHsmError::InvalidRequest(err.msg))
1000                }
1001                "ValidationException" => return RusotoError::Validation(err.msg),
1002                _ => {}
1003            }
1004        }
1005        RusotoError::Unknown(res)
1006    }
1007}
1008impl fmt::Display for DescribeHsmError {
1009    #[allow(unused_variables)]
1010    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1011        match *self {
1012            DescribeHsmError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1013            DescribeHsmError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1014            DescribeHsmError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1015        }
1016    }
1017}
1018impl Error for DescribeHsmError {}
1019/// Errors returned by DescribeLunaClient
1020#[derive(Debug, PartialEq)]
1021pub enum DescribeLunaClientError {
1022    /// <p>Indicates that an internal error occurred.</p>
1023    CloudHsmInternal(String),
1024    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1025    CloudHsmService(String),
1026    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1027    InvalidRequest(String),
1028}
1029
1030impl DescribeLunaClientError {
1031    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLunaClientError> {
1032        if let Some(err) = proto::json::Error::parse(&res) {
1033            match err.typ.as_str() {
1034                "CloudHsmInternalException" => {
1035                    return RusotoError::Service(DescribeLunaClientError::CloudHsmInternal(err.msg))
1036                }
1037                "CloudHsmServiceException" => {
1038                    return RusotoError::Service(DescribeLunaClientError::CloudHsmService(err.msg))
1039                }
1040                "InvalidRequestException" => {
1041                    return RusotoError::Service(DescribeLunaClientError::InvalidRequest(err.msg))
1042                }
1043                "ValidationException" => return RusotoError::Validation(err.msg),
1044                _ => {}
1045            }
1046        }
1047        RusotoError::Unknown(res)
1048    }
1049}
1050impl fmt::Display for DescribeLunaClientError {
1051    #[allow(unused_variables)]
1052    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1053        match *self {
1054            DescribeLunaClientError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1055            DescribeLunaClientError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1056            DescribeLunaClientError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1057        }
1058    }
1059}
1060impl Error for DescribeLunaClientError {}
1061/// Errors returned by GetConfig
1062#[derive(Debug, PartialEq)]
1063pub enum GetConfigError {
1064    /// <p>Indicates that an internal error occurred.</p>
1065    CloudHsmInternal(String),
1066    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1067    CloudHsmService(String),
1068    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1069    InvalidRequest(String),
1070}
1071
1072impl GetConfigError {
1073    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetConfigError> {
1074        if let Some(err) = proto::json::Error::parse(&res) {
1075            match err.typ.as_str() {
1076                "CloudHsmInternalException" => {
1077                    return RusotoError::Service(GetConfigError::CloudHsmInternal(err.msg))
1078                }
1079                "CloudHsmServiceException" => {
1080                    return RusotoError::Service(GetConfigError::CloudHsmService(err.msg))
1081                }
1082                "InvalidRequestException" => {
1083                    return RusotoError::Service(GetConfigError::InvalidRequest(err.msg))
1084                }
1085                "ValidationException" => return RusotoError::Validation(err.msg),
1086                _ => {}
1087            }
1088        }
1089        RusotoError::Unknown(res)
1090    }
1091}
1092impl fmt::Display for GetConfigError {
1093    #[allow(unused_variables)]
1094    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1095        match *self {
1096            GetConfigError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1097            GetConfigError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1098            GetConfigError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1099        }
1100    }
1101}
1102impl Error for GetConfigError {}
1103/// Errors returned by ListAvailableZones
1104#[derive(Debug, PartialEq)]
1105pub enum ListAvailableZonesError {
1106    /// <p>Indicates that an internal error occurred.</p>
1107    CloudHsmInternal(String),
1108    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1109    CloudHsmService(String),
1110    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1111    InvalidRequest(String),
1112}
1113
1114impl ListAvailableZonesError {
1115    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAvailableZonesError> {
1116        if let Some(err) = proto::json::Error::parse(&res) {
1117            match err.typ.as_str() {
1118                "CloudHsmInternalException" => {
1119                    return RusotoError::Service(ListAvailableZonesError::CloudHsmInternal(err.msg))
1120                }
1121                "CloudHsmServiceException" => {
1122                    return RusotoError::Service(ListAvailableZonesError::CloudHsmService(err.msg))
1123                }
1124                "InvalidRequestException" => {
1125                    return RusotoError::Service(ListAvailableZonesError::InvalidRequest(err.msg))
1126                }
1127                "ValidationException" => return RusotoError::Validation(err.msg),
1128                _ => {}
1129            }
1130        }
1131        RusotoError::Unknown(res)
1132    }
1133}
1134impl fmt::Display for ListAvailableZonesError {
1135    #[allow(unused_variables)]
1136    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1137        match *self {
1138            ListAvailableZonesError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1139            ListAvailableZonesError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1140            ListAvailableZonesError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1141        }
1142    }
1143}
1144impl Error for ListAvailableZonesError {}
1145/// Errors returned by ListHapgs
1146#[derive(Debug, PartialEq)]
1147pub enum ListHapgsError {
1148    /// <p>Indicates that an internal error occurred.</p>
1149    CloudHsmInternal(String),
1150    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1151    CloudHsmService(String),
1152    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1153    InvalidRequest(String),
1154}
1155
1156impl ListHapgsError {
1157    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListHapgsError> {
1158        if let Some(err) = proto::json::Error::parse(&res) {
1159            match err.typ.as_str() {
1160                "CloudHsmInternalException" => {
1161                    return RusotoError::Service(ListHapgsError::CloudHsmInternal(err.msg))
1162                }
1163                "CloudHsmServiceException" => {
1164                    return RusotoError::Service(ListHapgsError::CloudHsmService(err.msg))
1165                }
1166                "InvalidRequestException" => {
1167                    return RusotoError::Service(ListHapgsError::InvalidRequest(err.msg))
1168                }
1169                "ValidationException" => return RusotoError::Validation(err.msg),
1170                _ => {}
1171            }
1172        }
1173        RusotoError::Unknown(res)
1174    }
1175}
1176impl fmt::Display for ListHapgsError {
1177    #[allow(unused_variables)]
1178    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1179        match *self {
1180            ListHapgsError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1181            ListHapgsError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1182            ListHapgsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1183        }
1184    }
1185}
1186impl Error for ListHapgsError {}
1187/// Errors returned by ListHsms
1188#[derive(Debug, PartialEq)]
1189pub enum ListHsmsError {
1190    /// <p>Indicates that an internal error occurred.</p>
1191    CloudHsmInternal(String),
1192    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1193    CloudHsmService(String),
1194    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1195    InvalidRequest(String),
1196}
1197
1198impl ListHsmsError {
1199    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListHsmsError> {
1200        if let Some(err) = proto::json::Error::parse(&res) {
1201            match err.typ.as_str() {
1202                "CloudHsmInternalException" => {
1203                    return RusotoError::Service(ListHsmsError::CloudHsmInternal(err.msg))
1204                }
1205                "CloudHsmServiceException" => {
1206                    return RusotoError::Service(ListHsmsError::CloudHsmService(err.msg))
1207                }
1208                "InvalidRequestException" => {
1209                    return RusotoError::Service(ListHsmsError::InvalidRequest(err.msg))
1210                }
1211                "ValidationException" => return RusotoError::Validation(err.msg),
1212                _ => {}
1213            }
1214        }
1215        RusotoError::Unknown(res)
1216    }
1217}
1218impl fmt::Display for ListHsmsError {
1219    #[allow(unused_variables)]
1220    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1221        match *self {
1222            ListHsmsError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1223            ListHsmsError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1224            ListHsmsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1225        }
1226    }
1227}
1228impl Error for ListHsmsError {}
1229/// Errors returned by ListLunaClients
1230#[derive(Debug, PartialEq)]
1231pub enum ListLunaClientsError {
1232    /// <p>Indicates that an internal error occurred.</p>
1233    CloudHsmInternal(String),
1234    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1235    CloudHsmService(String),
1236    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1237    InvalidRequest(String),
1238}
1239
1240impl ListLunaClientsError {
1241    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLunaClientsError> {
1242        if let Some(err) = proto::json::Error::parse(&res) {
1243            match err.typ.as_str() {
1244                "CloudHsmInternalException" => {
1245                    return RusotoError::Service(ListLunaClientsError::CloudHsmInternal(err.msg))
1246                }
1247                "CloudHsmServiceException" => {
1248                    return RusotoError::Service(ListLunaClientsError::CloudHsmService(err.msg))
1249                }
1250                "InvalidRequestException" => {
1251                    return RusotoError::Service(ListLunaClientsError::InvalidRequest(err.msg))
1252                }
1253                "ValidationException" => return RusotoError::Validation(err.msg),
1254                _ => {}
1255            }
1256        }
1257        RusotoError::Unknown(res)
1258    }
1259}
1260impl fmt::Display for ListLunaClientsError {
1261    #[allow(unused_variables)]
1262    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1263        match *self {
1264            ListLunaClientsError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1265            ListLunaClientsError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1266            ListLunaClientsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1267        }
1268    }
1269}
1270impl Error for ListLunaClientsError {}
1271/// Errors returned by ListTagsForResource
1272#[derive(Debug, PartialEq)]
1273pub enum ListTagsForResourceError {
1274    /// <p>Indicates that an internal error occurred.</p>
1275    CloudHsmInternal(String),
1276    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1277    CloudHsmService(String),
1278    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1279    InvalidRequest(String),
1280}
1281
1282impl ListTagsForResourceError {
1283    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
1284        if let Some(err) = proto::json::Error::parse(&res) {
1285            match err.typ.as_str() {
1286                "CloudHsmInternalException" => {
1287                    return RusotoError::Service(ListTagsForResourceError::CloudHsmInternal(
1288                        err.msg,
1289                    ))
1290                }
1291                "CloudHsmServiceException" => {
1292                    return RusotoError::Service(ListTagsForResourceError::CloudHsmService(err.msg))
1293                }
1294                "InvalidRequestException" => {
1295                    return RusotoError::Service(ListTagsForResourceError::InvalidRequest(err.msg))
1296                }
1297                "ValidationException" => return RusotoError::Validation(err.msg),
1298                _ => {}
1299            }
1300        }
1301        RusotoError::Unknown(res)
1302    }
1303}
1304impl fmt::Display for ListTagsForResourceError {
1305    #[allow(unused_variables)]
1306    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1307        match *self {
1308            ListTagsForResourceError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1309            ListTagsForResourceError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1310            ListTagsForResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1311        }
1312    }
1313}
1314impl Error for ListTagsForResourceError {}
1315/// Errors returned by ModifyHapg
1316#[derive(Debug, PartialEq)]
1317pub enum ModifyHapgError {
1318    /// <p>Indicates that an internal error occurred.</p>
1319    CloudHsmInternal(String),
1320    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1321    CloudHsmService(String),
1322    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1323    InvalidRequest(String),
1324}
1325
1326impl ModifyHapgError {
1327    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyHapgError> {
1328        if let Some(err) = proto::json::Error::parse(&res) {
1329            match err.typ.as_str() {
1330                "CloudHsmInternalException" => {
1331                    return RusotoError::Service(ModifyHapgError::CloudHsmInternal(err.msg))
1332                }
1333                "CloudHsmServiceException" => {
1334                    return RusotoError::Service(ModifyHapgError::CloudHsmService(err.msg))
1335                }
1336                "InvalidRequestException" => {
1337                    return RusotoError::Service(ModifyHapgError::InvalidRequest(err.msg))
1338                }
1339                "ValidationException" => return RusotoError::Validation(err.msg),
1340                _ => {}
1341            }
1342        }
1343        RusotoError::Unknown(res)
1344    }
1345}
1346impl fmt::Display for ModifyHapgError {
1347    #[allow(unused_variables)]
1348    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1349        match *self {
1350            ModifyHapgError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1351            ModifyHapgError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1352            ModifyHapgError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1353        }
1354    }
1355}
1356impl Error for ModifyHapgError {}
1357/// Errors returned by ModifyHsm
1358#[derive(Debug, PartialEq)]
1359pub enum ModifyHsmError {
1360    /// <p>Indicates that an internal error occurred.</p>
1361    CloudHsmInternal(String),
1362    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1363    CloudHsmService(String),
1364    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1365    InvalidRequest(String),
1366}
1367
1368impl ModifyHsmError {
1369    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyHsmError> {
1370        if let Some(err) = proto::json::Error::parse(&res) {
1371            match err.typ.as_str() {
1372                "CloudHsmInternalException" => {
1373                    return RusotoError::Service(ModifyHsmError::CloudHsmInternal(err.msg))
1374                }
1375                "CloudHsmServiceException" => {
1376                    return RusotoError::Service(ModifyHsmError::CloudHsmService(err.msg))
1377                }
1378                "InvalidRequestException" => {
1379                    return RusotoError::Service(ModifyHsmError::InvalidRequest(err.msg))
1380                }
1381                "ValidationException" => return RusotoError::Validation(err.msg),
1382                _ => {}
1383            }
1384        }
1385        RusotoError::Unknown(res)
1386    }
1387}
1388impl fmt::Display for ModifyHsmError {
1389    #[allow(unused_variables)]
1390    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1391        match *self {
1392            ModifyHsmError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1393            ModifyHsmError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1394            ModifyHsmError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1395        }
1396    }
1397}
1398impl Error for ModifyHsmError {}
1399/// Errors returned by ModifyLunaClient
1400#[derive(Debug, PartialEq)]
1401pub enum ModifyLunaClientError {
1402    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1403    CloudHsmService(String),
1404}
1405
1406impl ModifyLunaClientError {
1407    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyLunaClientError> {
1408        if let Some(err) = proto::json::Error::parse(&res) {
1409            match err.typ.as_str() {
1410                "CloudHsmServiceException" => {
1411                    return RusotoError::Service(ModifyLunaClientError::CloudHsmService(err.msg))
1412                }
1413                "ValidationException" => return RusotoError::Validation(err.msg),
1414                _ => {}
1415            }
1416        }
1417        RusotoError::Unknown(res)
1418    }
1419}
1420impl fmt::Display for ModifyLunaClientError {
1421    #[allow(unused_variables)]
1422    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1423        match *self {
1424            ModifyLunaClientError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1425        }
1426    }
1427}
1428impl Error for ModifyLunaClientError {}
1429/// Errors returned by RemoveTagsFromResource
1430#[derive(Debug, PartialEq)]
1431pub enum RemoveTagsFromResourceError {
1432    /// <p>Indicates that an internal error occurred.</p>
1433    CloudHsmInternal(String),
1434    /// <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
1435    CloudHsmService(String),
1436    /// <p>Indicates that one or more of the request parameters are not valid.</p>
1437    InvalidRequest(String),
1438}
1439
1440impl RemoveTagsFromResourceError {
1441    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsFromResourceError> {
1442        if let Some(err) = proto::json::Error::parse(&res) {
1443            match err.typ.as_str() {
1444                "CloudHsmInternalException" => {
1445                    return RusotoError::Service(RemoveTagsFromResourceError::CloudHsmInternal(
1446                        err.msg,
1447                    ))
1448                }
1449                "CloudHsmServiceException" => {
1450                    return RusotoError::Service(RemoveTagsFromResourceError::CloudHsmService(
1451                        err.msg,
1452                    ))
1453                }
1454                "InvalidRequestException" => {
1455                    return RusotoError::Service(RemoveTagsFromResourceError::InvalidRequest(
1456                        err.msg,
1457                    ))
1458                }
1459                "ValidationException" => return RusotoError::Validation(err.msg),
1460                _ => {}
1461            }
1462        }
1463        RusotoError::Unknown(res)
1464    }
1465}
1466impl fmt::Display for RemoveTagsFromResourceError {
1467    #[allow(unused_variables)]
1468    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1469        match *self {
1470            RemoveTagsFromResourceError::CloudHsmInternal(ref cause) => write!(f, "{}", cause),
1471            RemoveTagsFromResourceError::CloudHsmService(ref cause) => write!(f, "{}", cause),
1472            RemoveTagsFromResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1473        }
1474    }
1475}
1476impl Error for RemoveTagsFromResourceError {}
1477/// Trait representing the capabilities of the CloudHSM API. CloudHSM clients implement this trait.
1478#[async_trait]
1479pub trait CloudHsm {
1480    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Adds or overwrites one or more tags for the specified AWS CloudHSM resource.</p> <p>Each tag consists of a key and a value. Tag keys must be unique to each resource.</p>
1481    async fn add_tags_to_resource(
1482        &self,
1483        input: AddTagsToResourceRequest,
1484    ) -> Result<AddTagsToResourceResponse, RusotoError<AddTagsToResourceError>>;
1485
1486    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Creates a high-availability partition group. A high-availability partition group is a group of partitions that spans multiple physical HSMs.</p>
1487    async fn create_hapg(
1488        &self,
1489        input: CreateHapgRequest,
1490    ) -> Result<CreateHapgResponse, RusotoError<CreateHapgError>>;
1491
1492    /// <p><p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Creates an uninitialized HSM instance.</p> <p>There is an upfront fee charged for each HSM instance that you create with the <code>CreateHsm</code> operation. If you accidentally provision an HSM and want to request a refund, delete the instance using the <a>DeleteHsm</a> operation, go to the <a href="https://console.aws.amazon.com/support/home">AWS Support Center</a>, create a new case, and select <b>Account and Billing Support</b>.</p> <important> <p>It can take up to 20 minutes to create and provision an HSM. You can monitor the status of the HSM with the <a>DescribeHsm</a> operation. The HSM is ready to be initialized when the status changes to <code>RUNNING</code>.</p> </important></p>
1493    async fn create_hsm(
1494        &self,
1495        input: CreateHsmRequest,
1496    ) -> Result<CreateHsmResponse, RusotoError<CreateHsmError>>;
1497
1498    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Creates an HSM client.</p>
1499    async fn create_luna_client(
1500        &self,
1501        input: CreateLunaClientRequest,
1502    ) -> Result<CreateLunaClientResponse, RusotoError<CreateLunaClientError>>;
1503
1504    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Deletes a high-availability partition group.</p>
1505    async fn delete_hapg(
1506        &self,
1507        input: DeleteHapgRequest,
1508    ) -> Result<DeleteHapgResponse, RusotoError<DeleteHapgError>>;
1509
1510    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Deletes an HSM. After completion, this operation cannot be undone and your key material cannot be recovered.</p>
1511    async fn delete_hsm(
1512        &self,
1513        input: DeleteHsmRequest,
1514    ) -> Result<DeleteHsmResponse, RusotoError<DeleteHsmError>>;
1515
1516    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Deletes a client.</p>
1517    async fn delete_luna_client(
1518        &self,
1519        input: DeleteLunaClientRequest,
1520    ) -> Result<DeleteLunaClientResponse, RusotoError<DeleteLunaClientError>>;
1521
1522    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Retrieves information about a high-availability partition group.</p>
1523    async fn describe_hapg(
1524        &self,
1525        input: DescribeHapgRequest,
1526    ) -> Result<DescribeHapgResponse, RusotoError<DescribeHapgError>>;
1527
1528    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Retrieves information about an HSM. You can identify the HSM by its ARN or its serial number.</p>
1529    async fn describe_hsm(
1530        &self,
1531        input: DescribeHsmRequest,
1532    ) -> Result<DescribeHsmResponse, RusotoError<DescribeHsmError>>;
1533
1534    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Retrieves information about an HSM client.</p>
1535    async fn describe_luna_client(
1536        &self,
1537        input: DescribeLunaClientRequest,
1538    ) -> Result<DescribeLunaClientResponse, RusotoError<DescribeLunaClientError>>;
1539
1540    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Gets the configuration files necessary to connect to all high availability partition groups the client is associated with.</p>
1541    async fn get_config(
1542        &self,
1543        input: GetConfigRequest,
1544    ) -> Result<GetConfigResponse, RusotoError<GetConfigError>>;
1545
1546    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Lists the Availability Zones that have available AWS CloudHSM capacity.</p>
1547    async fn list_available_zones(
1548        &self,
1549    ) -> Result<ListAvailableZonesResponse, RusotoError<ListAvailableZonesError>>;
1550
1551    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Lists the high-availability partition groups for the account.</p> <p>This operation supports pagination with the use of the <code>NextToken</code> member. If more results are available, the <code>NextToken</code> member of the response contains a token that you pass in the next call to <code>ListHapgs</code> to retrieve the next set of items.</p>
1552    async fn list_hapgs(
1553        &self,
1554        input: ListHapgsRequest,
1555    ) -> Result<ListHapgsResponse, RusotoError<ListHapgsError>>;
1556
1557    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Retrieves the identifiers of all of the HSMs provisioned for the current customer.</p> <p>This operation supports pagination with the use of the <code>NextToken</code> member. If more results are available, the <code>NextToken</code> member of the response contains a token that you pass in the next call to <code>ListHsms</code> to retrieve the next set of items.</p>
1558    async fn list_hsms(
1559        &self,
1560        input: ListHsmsRequest,
1561    ) -> Result<ListHsmsResponse, RusotoError<ListHsmsError>>;
1562
1563    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Lists all of the clients.</p> <p>This operation supports pagination with the use of the <code>NextToken</code> member. If more results are available, the <code>NextToken</code> member of the response contains a token that you pass in the next call to <code>ListLunaClients</code> to retrieve the next set of items.</p>
1564    async fn list_luna_clients(
1565        &self,
1566        input: ListLunaClientsRequest,
1567    ) -> Result<ListLunaClientsResponse, RusotoError<ListLunaClientsError>>;
1568
1569    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Returns a list of all tags for the specified AWS CloudHSM resource.</p>
1570    async fn list_tags_for_resource(
1571        &self,
1572        input: ListTagsForResourceRequest,
1573    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
1574
1575    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Modifies an existing high-availability partition group.</p>
1576    async fn modify_hapg(
1577        &self,
1578        input: ModifyHapgRequest,
1579    ) -> Result<ModifyHapgResponse, RusotoError<ModifyHapgError>>;
1580
1581    /// <p><p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Modifies an HSM.</p> <important> <p>This operation can result in the HSM being offline for up to 15 minutes while the AWS CloudHSM service is reconfigured. If you are modifying a production HSM, you should ensure that your AWS CloudHSM service is configured for high availability, and consider executing this operation during a maintenance window.</p> </important></p>
1582    async fn modify_hsm(
1583        &self,
1584        input: ModifyHsmRequest,
1585    ) -> Result<ModifyHsmResponse, RusotoError<ModifyHsmError>>;
1586
1587    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Modifies the certificate used by the client.</p> <p>This action can potentially start a workflow to install the new certificate on the client's HSMs.</p>
1588    async fn modify_luna_client(
1589        &self,
1590        input: ModifyLunaClientRequest,
1591    ) -> Result<ModifyLunaClientResponse, RusotoError<ModifyLunaClientError>>;
1592
1593    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Removes one or more tags from the specified AWS CloudHSM resource.</p> <p>To remove a tag, specify only the tag key to remove (not the value). To overwrite the value for an existing tag, use <a>AddTagsToResource</a>.</p>
1594    async fn remove_tags_from_resource(
1595        &self,
1596        input: RemoveTagsFromResourceRequest,
1597    ) -> Result<RemoveTagsFromResourceResponse, RusotoError<RemoveTagsFromResourceError>>;
1598}
1599/// A client for the CloudHSM API.
1600#[derive(Clone)]
1601pub struct CloudHsmClient {
1602    client: Client,
1603    region: region::Region,
1604}
1605
1606impl CloudHsmClient {
1607    /// Creates a client backed by the default tokio event loop.
1608    ///
1609    /// The client will use the default credentials provider and tls client.
1610    pub fn new(region: region::Region) -> CloudHsmClient {
1611        CloudHsmClient {
1612            client: Client::shared(),
1613            region,
1614        }
1615    }
1616
1617    pub fn new_with<P, D>(
1618        request_dispatcher: D,
1619        credentials_provider: P,
1620        region: region::Region,
1621    ) -> CloudHsmClient
1622    where
1623        P: ProvideAwsCredentials + Send + Sync + 'static,
1624        D: DispatchSignedRequest + Send + Sync + 'static,
1625    {
1626        CloudHsmClient {
1627            client: Client::new_with(credentials_provider, request_dispatcher),
1628            region,
1629        }
1630    }
1631
1632    pub fn new_with_client(client: Client, region: region::Region) -> CloudHsmClient {
1633        CloudHsmClient { client, region }
1634    }
1635}
1636
1637#[async_trait]
1638impl CloudHsm for CloudHsmClient {
1639    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Adds or overwrites one or more tags for the specified AWS CloudHSM resource.</p> <p>Each tag consists of a key and a value. Tag keys must be unique to each resource.</p>
1640    async fn add_tags_to_resource(
1641        &self,
1642        input: AddTagsToResourceRequest,
1643    ) -> Result<AddTagsToResourceResponse, RusotoError<AddTagsToResourceError>> {
1644        let mut request = self.new_signed_request("POST", "/");
1645        request.add_header("x-amz-target", "CloudHsmFrontendService.AddTagsToResource");
1646        let encoded = serde_json::to_string(&input).unwrap();
1647        request.set_payload(Some(encoded));
1648
1649        let response = self
1650            .sign_and_dispatch(request, AddTagsToResourceError::from_response)
1651            .await?;
1652        let mut response = response;
1653        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1654        proto::json::ResponsePayload::new(&response).deserialize::<AddTagsToResourceResponse, _>()
1655    }
1656
1657    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Creates a high-availability partition group. A high-availability partition group is a group of partitions that spans multiple physical HSMs.</p>
1658    async fn create_hapg(
1659        &self,
1660        input: CreateHapgRequest,
1661    ) -> Result<CreateHapgResponse, RusotoError<CreateHapgError>> {
1662        let mut request = self.new_signed_request("POST", "/");
1663        request.add_header("x-amz-target", "CloudHsmFrontendService.CreateHapg");
1664        let encoded = serde_json::to_string(&input).unwrap();
1665        request.set_payload(Some(encoded));
1666
1667        let response = self
1668            .sign_and_dispatch(request, CreateHapgError::from_response)
1669            .await?;
1670        let mut response = response;
1671        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1672        proto::json::ResponsePayload::new(&response).deserialize::<CreateHapgResponse, _>()
1673    }
1674
1675    /// <p><p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Creates an uninitialized HSM instance.</p> <p>There is an upfront fee charged for each HSM instance that you create with the <code>CreateHsm</code> operation. If you accidentally provision an HSM and want to request a refund, delete the instance using the <a>DeleteHsm</a> operation, go to the <a href="https://console.aws.amazon.com/support/home">AWS Support Center</a>, create a new case, and select <b>Account and Billing Support</b>.</p> <important> <p>It can take up to 20 minutes to create and provision an HSM. You can monitor the status of the HSM with the <a>DescribeHsm</a> operation. The HSM is ready to be initialized when the status changes to <code>RUNNING</code>.</p> </important></p>
1676    async fn create_hsm(
1677        &self,
1678        input: CreateHsmRequest,
1679    ) -> Result<CreateHsmResponse, RusotoError<CreateHsmError>> {
1680        let mut request = self.new_signed_request("POST", "/");
1681        request.add_header("x-amz-target", "CloudHsmFrontendService.CreateHsm");
1682        let encoded = serde_json::to_string(&input).unwrap();
1683        request.set_payload(Some(encoded));
1684
1685        let response = self
1686            .sign_and_dispatch(request, CreateHsmError::from_response)
1687            .await?;
1688        let mut response = response;
1689        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1690        proto::json::ResponsePayload::new(&response).deserialize::<CreateHsmResponse, _>()
1691    }
1692
1693    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Creates an HSM client.</p>
1694    async fn create_luna_client(
1695        &self,
1696        input: CreateLunaClientRequest,
1697    ) -> Result<CreateLunaClientResponse, RusotoError<CreateLunaClientError>> {
1698        let mut request = self.new_signed_request("POST", "/");
1699        request.add_header("x-amz-target", "CloudHsmFrontendService.CreateLunaClient");
1700        let encoded = serde_json::to_string(&input).unwrap();
1701        request.set_payload(Some(encoded));
1702
1703        let response = self
1704            .sign_and_dispatch(request, CreateLunaClientError::from_response)
1705            .await?;
1706        let mut response = response;
1707        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1708        proto::json::ResponsePayload::new(&response).deserialize::<CreateLunaClientResponse, _>()
1709    }
1710
1711    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Deletes a high-availability partition group.</p>
1712    async fn delete_hapg(
1713        &self,
1714        input: DeleteHapgRequest,
1715    ) -> Result<DeleteHapgResponse, RusotoError<DeleteHapgError>> {
1716        let mut request = self.new_signed_request("POST", "/");
1717        request.add_header("x-amz-target", "CloudHsmFrontendService.DeleteHapg");
1718        let encoded = serde_json::to_string(&input).unwrap();
1719        request.set_payload(Some(encoded));
1720
1721        let response = self
1722            .sign_and_dispatch(request, DeleteHapgError::from_response)
1723            .await?;
1724        let mut response = response;
1725        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1726        proto::json::ResponsePayload::new(&response).deserialize::<DeleteHapgResponse, _>()
1727    }
1728
1729    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Deletes an HSM. After completion, this operation cannot be undone and your key material cannot be recovered.</p>
1730    async fn delete_hsm(
1731        &self,
1732        input: DeleteHsmRequest,
1733    ) -> Result<DeleteHsmResponse, RusotoError<DeleteHsmError>> {
1734        let mut request = self.new_signed_request("POST", "/");
1735        request.add_header("x-amz-target", "CloudHsmFrontendService.DeleteHsm");
1736        let encoded = serde_json::to_string(&input).unwrap();
1737        request.set_payload(Some(encoded));
1738
1739        let response = self
1740            .sign_and_dispatch(request, DeleteHsmError::from_response)
1741            .await?;
1742        let mut response = response;
1743        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1744        proto::json::ResponsePayload::new(&response).deserialize::<DeleteHsmResponse, _>()
1745    }
1746
1747    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Deletes a client.</p>
1748    async fn delete_luna_client(
1749        &self,
1750        input: DeleteLunaClientRequest,
1751    ) -> Result<DeleteLunaClientResponse, RusotoError<DeleteLunaClientError>> {
1752        let mut request = self.new_signed_request("POST", "/");
1753        request.add_header("x-amz-target", "CloudHsmFrontendService.DeleteLunaClient");
1754        let encoded = serde_json::to_string(&input).unwrap();
1755        request.set_payload(Some(encoded));
1756
1757        let response = self
1758            .sign_and_dispatch(request, DeleteLunaClientError::from_response)
1759            .await?;
1760        let mut response = response;
1761        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1762        proto::json::ResponsePayload::new(&response).deserialize::<DeleteLunaClientResponse, _>()
1763    }
1764
1765    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Retrieves information about a high-availability partition group.</p>
1766    async fn describe_hapg(
1767        &self,
1768        input: DescribeHapgRequest,
1769    ) -> Result<DescribeHapgResponse, RusotoError<DescribeHapgError>> {
1770        let mut request = self.new_signed_request("POST", "/");
1771        request.add_header("x-amz-target", "CloudHsmFrontendService.DescribeHapg");
1772        let encoded = serde_json::to_string(&input).unwrap();
1773        request.set_payload(Some(encoded));
1774
1775        let response = self
1776            .sign_and_dispatch(request, DescribeHapgError::from_response)
1777            .await?;
1778        let mut response = response;
1779        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1780        proto::json::ResponsePayload::new(&response).deserialize::<DescribeHapgResponse, _>()
1781    }
1782
1783    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Retrieves information about an HSM. You can identify the HSM by its ARN or its serial number.</p>
1784    async fn describe_hsm(
1785        &self,
1786        input: DescribeHsmRequest,
1787    ) -> Result<DescribeHsmResponse, RusotoError<DescribeHsmError>> {
1788        let mut request = self.new_signed_request("POST", "/");
1789        request.add_header("x-amz-target", "CloudHsmFrontendService.DescribeHsm");
1790        let encoded = serde_json::to_string(&input).unwrap();
1791        request.set_payload(Some(encoded));
1792
1793        let response = self
1794            .sign_and_dispatch(request, DescribeHsmError::from_response)
1795            .await?;
1796        let mut response = response;
1797        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1798        proto::json::ResponsePayload::new(&response).deserialize::<DescribeHsmResponse, _>()
1799    }
1800
1801    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Retrieves information about an HSM client.</p>
1802    async fn describe_luna_client(
1803        &self,
1804        input: DescribeLunaClientRequest,
1805    ) -> Result<DescribeLunaClientResponse, RusotoError<DescribeLunaClientError>> {
1806        let mut request = self.new_signed_request("POST", "/");
1807        request.add_header("x-amz-target", "CloudHsmFrontendService.DescribeLunaClient");
1808        let encoded = serde_json::to_string(&input).unwrap();
1809        request.set_payload(Some(encoded));
1810
1811        let response = self
1812            .sign_and_dispatch(request, DescribeLunaClientError::from_response)
1813            .await?;
1814        let mut response = response;
1815        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1816        proto::json::ResponsePayload::new(&response).deserialize::<DescribeLunaClientResponse, _>()
1817    }
1818
1819    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Gets the configuration files necessary to connect to all high availability partition groups the client is associated with.</p>
1820    async fn get_config(
1821        &self,
1822        input: GetConfigRequest,
1823    ) -> Result<GetConfigResponse, RusotoError<GetConfigError>> {
1824        let mut request = self.new_signed_request("POST", "/");
1825        request.add_header("x-amz-target", "CloudHsmFrontendService.GetConfig");
1826        let encoded = serde_json::to_string(&input).unwrap();
1827        request.set_payload(Some(encoded));
1828
1829        let response = self
1830            .sign_and_dispatch(request, GetConfigError::from_response)
1831            .await?;
1832        let mut response = response;
1833        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1834        proto::json::ResponsePayload::new(&response).deserialize::<GetConfigResponse, _>()
1835    }
1836
1837    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Lists the Availability Zones that have available AWS CloudHSM capacity.</p>
1838    async fn list_available_zones(
1839        &self,
1840    ) -> Result<ListAvailableZonesResponse, RusotoError<ListAvailableZonesError>> {
1841        let mut request = self.new_signed_request("POST", "/");
1842        request.add_header("x-amz-target", "CloudHsmFrontendService.ListAvailableZones");
1843        request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
1844
1845        let response = self
1846            .sign_and_dispatch(request, ListAvailableZonesError::from_response)
1847            .await?;
1848        let mut response = response;
1849        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1850        proto::json::ResponsePayload::new(&response).deserialize::<ListAvailableZonesResponse, _>()
1851    }
1852
1853    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Lists the high-availability partition groups for the account.</p> <p>This operation supports pagination with the use of the <code>NextToken</code> member. If more results are available, the <code>NextToken</code> member of the response contains a token that you pass in the next call to <code>ListHapgs</code> to retrieve the next set of items.</p>
1854    async fn list_hapgs(
1855        &self,
1856        input: ListHapgsRequest,
1857    ) -> Result<ListHapgsResponse, RusotoError<ListHapgsError>> {
1858        let mut request = self.new_signed_request("POST", "/");
1859        request.add_header("x-amz-target", "CloudHsmFrontendService.ListHapgs");
1860        let encoded = serde_json::to_string(&input).unwrap();
1861        request.set_payload(Some(encoded));
1862
1863        let response = self
1864            .sign_and_dispatch(request, ListHapgsError::from_response)
1865            .await?;
1866        let mut response = response;
1867        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1868        proto::json::ResponsePayload::new(&response).deserialize::<ListHapgsResponse, _>()
1869    }
1870
1871    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Retrieves the identifiers of all of the HSMs provisioned for the current customer.</p> <p>This operation supports pagination with the use of the <code>NextToken</code> member. If more results are available, the <code>NextToken</code> member of the response contains a token that you pass in the next call to <code>ListHsms</code> to retrieve the next set of items.</p>
1872    async fn list_hsms(
1873        &self,
1874        input: ListHsmsRequest,
1875    ) -> Result<ListHsmsResponse, RusotoError<ListHsmsError>> {
1876        let mut request = self.new_signed_request("POST", "/");
1877        request.add_header("x-amz-target", "CloudHsmFrontendService.ListHsms");
1878        let encoded = serde_json::to_string(&input).unwrap();
1879        request.set_payload(Some(encoded));
1880
1881        let response = self
1882            .sign_and_dispatch(request, ListHsmsError::from_response)
1883            .await?;
1884        let mut response = response;
1885        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1886        proto::json::ResponsePayload::new(&response).deserialize::<ListHsmsResponse, _>()
1887    }
1888
1889    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Lists all of the clients.</p> <p>This operation supports pagination with the use of the <code>NextToken</code> member. If more results are available, the <code>NextToken</code> member of the response contains a token that you pass in the next call to <code>ListLunaClients</code> to retrieve the next set of items.</p>
1890    async fn list_luna_clients(
1891        &self,
1892        input: ListLunaClientsRequest,
1893    ) -> Result<ListLunaClientsResponse, RusotoError<ListLunaClientsError>> {
1894        let mut request = self.new_signed_request("POST", "/");
1895        request.add_header("x-amz-target", "CloudHsmFrontendService.ListLunaClients");
1896        let encoded = serde_json::to_string(&input).unwrap();
1897        request.set_payload(Some(encoded));
1898
1899        let response = self
1900            .sign_and_dispatch(request, ListLunaClientsError::from_response)
1901            .await?;
1902        let mut response = response;
1903        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1904        proto::json::ResponsePayload::new(&response).deserialize::<ListLunaClientsResponse, _>()
1905    }
1906
1907    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Returns a list of all tags for the specified AWS CloudHSM resource.</p>
1908    async fn list_tags_for_resource(
1909        &self,
1910        input: ListTagsForResourceRequest,
1911    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
1912        let mut request = self.new_signed_request("POST", "/");
1913        request.add_header(
1914            "x-amz-target",
1915            "CloudHsmFrontendService.ListTagsForResource",
1916        );
1917        let encoded = serde_json::to_string(&input).unwrap();
1918        request.set_payload(Some(encoded));
1919
1920        let response = self
1921            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
1922            .await?;
1923        let mut response = response;
1924        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1925        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceResponse, _>()
1926    }
1927
1928    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Modifies an existing high-availability partition group.</p>
1929    async fn modify_hapg(
1930        &self,
1931        input: ModifyHapgRequest,
1932    ) -> Result<ModifyHapgResponse, RusotoError<ModifyHapgError>> {
1933        let mut request = self.new_signed_request("POST", "/");
1934        request.add_header("x-amz-target", "CloudHsmFrontendService.ModifyHapg");
1935        let encoded = serde_json::to_string(&input).unwrap();
1936        request.set_payload(Some(encoded));
1937
1938        let response = self
1939            .sign_and_dispatch(request, ModifyHapgError::from_response)
1940            .await?;
1941        let mut response = response;
1942        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1943        proto::json::ResponsePayload::new(&response).deserialize::<ModifyHapgResponse, _>()
1944    }
1945
1946    /// <p><p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Modifies an HSM.</p> <important> <p>This operation can result in the HSM being offline for up to 15 minutes while the AWS CloudHSM service is reconfigured. If you are modifying a production HSM, you should ensure that your AWS CloudHSM service is configured for high availability, and consider executing this operation during a maintenance window.</p> </important></p>
1947    async fn modify_hsm(
1948        &self,
1949        input: ModifyHsmRequest,
1950    ) -> Result<ModifyHsmResponse, RusotoError<ModifyHsmError>> {
1951        let mut request = self.new_signed_request("POST", "/");
1952        request.add_header("x-amz-target", "CloudHsmFrontendService.ModifyHsm");
1953        let encoded = serde_json::to_string(&input).unwrap();
1954        request.set_payload(Some(encoded));
1955
1956        let response = self
1957            .sign_and_dispatch(request, ModifyHsmError::from_response)
1958            .await?;
1959        let mut response = response;
1960        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1961        proto::json::ResponsePayload::new(&response).deserialize::<ModifyHsmResponse, _>()
1962    }
1963
1964    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Modifies the certificate used by the client.</p> <p>This action can potentially start a workflow to install the new certificate on the client's HSMs.</p>
1965    async fn modify_luna_client(
1966        &self,
1967        input: ModifyLunaClientRequest,
1968    ) -> Result<ModifyLunaClientResponse, RusotoError<ModifyLunaClientError>> {
1969        let mut request = self.new_signed_request("POST", "/");
1970        request.add_header("x-amz-target", "CloudHsmFrontendService.ModifyLunaClient");
1971        let encoded = serde_json::to_string(&input).unwrap();
1972        request.set_payload(Some(encoded));
1973
1974        let response = self
1975            .sign_and_dispatch(request, ModifyLunaClientError::from_response)
1976            .await?;
1977        let mut response = response;
1978        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1979        proto::json::ResponsePayload::new(&response).deserialize::<ModifyLunaClientResponse, _>()
1980    }
1981
1982    /// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="http://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="http://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Removes one or more tags from the specified AWS CloudHSM resource.</p> <p>To remove a tag, specify only the tag key to remove (not the value). To overwrite the value for an existing tag, use <a>AddTagsToResource</a>.</p>
1983    async fn remove_tags_from_resource(
1984        &self,
1985        input: RemoveTagsFromResourceRequest,
1986    ) -> Result<RemoveTagsFromResourceResponse, RusotoError<RemoveTagsFromResourceError>> {
1987        let mut request = self.new_signed_request("POST", "/");
1988        request.add_header(
1989            "x-amz-target",
1990            "CloudHsmFrontendService.RemoveTagsFromResource",
1991        );
1992        let encoded = serde_json::to_string(&input).unwrap();
1993        request.set_payload(Some(encoded));
1994
1995        let response = self
1996            .sign_and_dispatch(request, RemoveTagsFromResourceError::from_response)
1997            .await?;
1998        let mut response = response;
1999        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2000        proto::json::ResponsePayload::new(&response)
2001            .deserialize::<RemoveTagsFromResourceResponse, _>()
2002    }
2003}