1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package cloudhsmv2
4
5import (
6	"fmt"
7	"time"
8
9	"github.com/aws/aws-sdk-go/aws"
10	"github.com/aws/aws-sdk-go/aws/awsutil"
11	"github.com/aws/aws-sdk-go/aws/request"
12	"github.com/aws/aws-sdk-go/private/protocol"
13	"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
14)
15
16const opCopyBackupToRegion = "CopyBackupToRegion"
17
18// CopyBackupToRegionRequest generates a "aws/request.Request" representing the
19// client's request for the CopyBackupToRegion operation. The "output" return
20// value will be populated with the request's response once the request completes
21// successfully.
22//
23// Use "Send" method on the returned Request to send the API call to the service.
24// the "output" return value is not valid until after Send returns without error.
25//
26// See CopyBackupToRegion for more information on using the CopyBackupToRegion
27// API call, and error handling.
28//
29// This method is useful when you want to inject custom logic or configuration
30// into the SDK's request lifecycle. Such as custom headers, or retry logic.
31//
32//
33//    // Example sending a request using the CopyBackupToRegionRequest method.
34//    req, resp := client.CopyBackupToRegionRequest(params)
35//
36//    err := req.Send()
37//    if err == nil { // resp is now filled
38//        fmt.Println(resp)
39//    }
40//
41// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion
42func (c *CloudHSMV2) CopyBackupToRegionRequest(input *CopyBackupToRegionInput) (req *request.Request, output *CopyBackupToRegionOutput) {
43	op := &request.Operation{
44		Name:       opCopyBackupToRegion,
45		HTTPMethod: "POST",
46		HTTPPath:   "/",
47	}
48
49	if input == nil {
50		input = &CopyBackupToRegionInput{}
51	}
52
53	output = &CopyBackupToRegionOutput{}
54	req = c.newRequest(op, input, output)
55	return
56}
57
58// CopyBackupToRegion API operation for AWS CloudHSM V2.
59//
60// Copy an AWS CloudHSM cluster backup to a different region.
61//
62// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
63// with awserr.Error's Code and Message methods to get detailed information about
64// the error.
65//
66// See the AWS API reference guide for AWS CloudHSM V2's
67// API operation CopyBackupToRegion for usage and error information.
68//
69// Returned Error Codes:
70//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
71//   The request was rejected because of an AWS CloudHSM internal failure. The
72//   request can be retried.
73//
74//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
75//   The request was rejected because an error occurred.
76//
77//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
78//   The request was rejected because it refers to a resource that cannot be found.
79//
80//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
81//   The request was rejected because it is not a valid request.
82//
83//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
84//   The request was rejected because the requester does not have permission to
85//   perform the requested operation.
86//
87// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion
88func (c *CloudHSMV2) CopyBackupToRegion(input *CopyBackupToRegionInput) (*CopyBackupToRegionOutput, error) {
89	req, out := c.CopyBackupToRegionRequest(input)
90	return out, req.Send()
91}
92
93// CopyBackupToRegionWithContext is the same as CopyBackupToRegion with the addition of
94// the ability to pass a context and additional request options.
95//
96// See CopyBackupToRegion for details on how to use this API operation.
97//
98// The context must be non-nil and will be used for request cancellation. If
99// the context is nil a panic will occur. In the future the SDK may create
100// sub-contexts for http.Requests. See https://golang.org/pkg/context/
101// for more information on using Contexts.
102func (c *CloudHSMV2) CopyBackupToRegionWithContext(ctx aws.Context, input *CopyBackupToRegionInput, opts ...request.Option) (*CopyBackupToRegionOutput, error) {
103	req, out := c.CopyBackupToRegionRequest(input)
104	req.SetContext(ctx)
105	req.ApplyOptions(opts...)
106	return out, req.Send()
107}
108
109const opCreateCluster = "CreateCluster"
110
111// CreateClusterRequest generates a "aws/request.Request" representing the
112// client's request for the CreateCluster operation. The "output" return
113// value will be populated with the request's response once the request completes
114// successfully.
115//
116// Use "Send" method on the returned Request to send the API call to the service.
117// the "output" return value is not valid until after Send returns without error.
118//
119// See CreateCluster for more information on using the CreateCluster
120// API call, and error handling.
121//
122// This method is useful when you want to inject custom logic or configuration
123// into the SDK's request lifecycle. Such as custom headers, or retry logic.
124//
125//
126//    // Example sending a request using the CreateClusterRequest method.
127//    req, resp := client.CreateClusterRequest(params)
128//
129//    err := req.Send()
130//    if err == nil { // resp is now filled
131//        fmt.Println(resp)
132//    }
133//
134// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster
135func (c *CloudHSMV2) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) {
136	op := &request.Operation{
137		Name:       opCreateCluster,
138		HTTPMethod: "POST",
139		HTTPPath:   "/",
140	}
141
142	if input == nil {
143		input = &CreateClusterInput{}
144	}
145
146	output = &CreateClusterOutput{}
147	req = c.newRequest(op, input, output)
148	return
149}
150
151// CreateCluster API operation for AWS CloudHSM V2.
152//
153// Creates a new AWS CloudHSM cluster.
154//
155// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
156// with awserr.Error's Code and Message methods to get detailed information about
157// the error.
158//
159// See the AWS API reference guide for AWS CloudHSM V2's
160// API operation CreateCluster for usage and error information.
161//
162// Returned Error Codes:
163//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
164//   The request was rejected because of an AWS CloudHSM internal failure. The
165//   request can be retried.
166//
167//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
168//   The request was rejected because an error occurred.
169//
170//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
171//   The request was rejected because it refers to a resource that cannot be found.
172//
173//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
174//   The request was rejected because it is not a valid request.
175//
176//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
177//   The request was rejected because the requester does not have permission to
178//   perform the requested operation.
179//
180// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster
181func (c *CloudHSMV2) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) {
182	req, out := c.CreateClusterRequest(input)
183	return out, req.Send()
184}
185
186// CreateClusterWithContext is the same as CreateCluster with the addition of
187// the ability to pass a context and additional request options.
188//
189// See CreateCluster for details on how to use this API operation.
190//
191// The context must be non-nil and will be used for request cancellation. If
192// the context is nil a panic will occur. In the future the SDK may create
193// sub-contexts for http.Requests. See https://golang.org/pkg/context/
194// for more information on using Contexts.
195func (c *CloudHSMV2) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) {
196	req, out := c.CreateClusterRequest(input)
197	req.SetContext(ctx)
198	req.ApplyOptions(opts...)
199	return out, req.Send()
200}
201
202const opCreateHsm = "CreateHsm"
203
204// CreateHsmRequest generates a "aws/request.Request" representing the
205// client's request for the CreateHsm operation. The "output" return
206// value will be populated with the request's response once the request completes
207// successfully.
208//
209// Use "Send" method on the returned Request to send the API call to the service.
210// the "output" return value is not valid until after Send returns without error.
211//
212// See CreateHsm for more information on using the CreateHsm
213// API call, and error handling.
214//
215// This method is useful when you want to inject custom logic or configuration
216// into the SDK's request lifecycle. Such as custom headers, or retry logic.
217//
218//
219//    // Example sending a request using the CreateHsmRequest method.
220//    req, resp := client.CreateHsmRequest(params)
221//
222//    err := req.Send()
223//    if err == nil { // resp is now filled
224//        fmt.Println(resp)
225//    }
226//
227// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm
228func (c *CloudHSMV2) CreateHsmRequest(input *CreateHsmInput) (req *request.Request, output *CreateHsmOutput) {
229	op := &request.Operation{
230		Name:       opCreateHsm,
231		HTTPMethod: "POST",
232		HTTPPath:   "/",
233	}
234
235	if input == nil {
236		input = &CreateHsmInput{}
237	}
238
239	output = &CreateHsmOutput{}
240	req = c.newRequest(op, input, output)
241	return
242}
243
244// CreateHsm API operation for AWS CloudHSM V2.
245//
246// Creates a new hardware security module (HSM) in the specified AWS CloudHSM
247// cluster.
248//
249// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
250// with awserr.Error's Code and Message methods to get detailed information about
251// the error.
252//
253// See the AWS API reference guide for AWS CloudHSM V2's
254// API operation CreateHsm for usage and error information.
255//
256// Returned Error Codes:
257//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
258//   The request was rejected because of an AWS CloudHSM internal failure. The
259//   request can be retried.
260//
261//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
262//   The request was rejected because an error occurred.
263//
264//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
265//   The request was rejected because it is not a valid request.
266//
267//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
268//   The request was rejected because it refers to a resource that cannot be found.
269//
270//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
271//   The request was rejected because the requester does not have permission to
272//   perform the requested operation.
273//
274// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm
275func (c *CloudHSMV2) CreateHsm(input *CreateHsmInput) (*CreateHsmOutput, error) {
276	req, out := c.CreateHsmRequest(input)
277	return out, req.Send()
278}
279
280// CreateHsmWithContext is the same as CreateHsm with the addition of
281// the ability to pass a context and additional request options.
282//
283// See CreateHsm for details on how to use this API operation.
284//
285// The context must be non-nil and will be used for request cancellation. If
286// the context is nil a panic will occur. In the future the SDK may create
287// sub-contexts for http.Requests. See https://golang.org/pkg/context/
288// for more information on using Contexts.
289func (c *CloudHSMV2) CreateHsmWithContext(ctx aws.Context, input *CreateHsmInput, opts ...request.Option) (*CreateHsmOutput, error) {
290	req, out := c.CreateHsmRequest(input)
291	req.SetContext(ctx)
292	req.ApplyOptions(opts...)
293	return out, req.Send()
294}
295
296const opDeleteBackup = "DeleteBackup"
297
298// DeleteBackupRequest generates a "aws/request.Request" representing the
299// client's request for the DeleteBackup operation. The "output" return
300// value will be populated with the request's response once the request completes
301// successfully.
302//
303// Use "Send" method on the returned Request to send the API call to the service.
304// the "output" return value is not valid until after Send returns without error.
305//
306// See DeleteBackup for more information on using the DeleteBackup
307// API call, and error handling.
308//
309// This method is useful when you want to inject custom logic or configuration
310// into the SDK's request lifecycle. Such as custom headers, or retry logic.
311//
312//
313//    // Example sending a request using the DeleteBackupRequest method.
314//    req, resp := client.DeleteBackupRequest(params)
315//
316//    err := req.Send()
317//    if err == nil { // resp is now filled
318//        fmt.Println(resp)
319//    }
320//
321// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup
322func (c *CloudHSMV2) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) {
323	op := &request.Operation{
324		Name:       opDeleteBackup,
325		HTTPMethod: "POST",
326		HTTPPath:   "/",
327	}
328
329	if input == nil {
330		input = &DeleteBackupInput{}
331	}
332
333	output = &DeleteBackupOutput{}
334	req = c.newRequest(op, input, output)
335	return
336}
337
338// DeleteBackup API operation for AWS CloudHSM V2.
339//
340// Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7
341// days after the DeleteBackup request. For more information on restoring a
342// backup, see RestoreBackup
343//
344// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
345// with awserr.Error's Code and Message methods to get detailed information about
346// the error.
347//
348// See the AWS API reference guide for AWS CloudHSM V2's
349// API operation DeleteBackup for usage and error information.
350//
351// Returned Error Codes:
352//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
353//   The request was rejected because of an AWS CloudHSM internal failure. The
354//   request can be retried.
355//
356//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
357//   The request was rejected because an error occurred.
358//
359//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
360//   The request was rejected because it refers to a resource that cannot be found.
361//
362//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
363//   The request was rejected because it is not a valid request.
364//
365//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
366//   The request was rejected because the requester does not have permission to
367//   perform the requested operation.
368//
369// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup
370func (c *CloudHSMV2) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) {
371	req, out := c.DeleteBackupRequest(input)
372	return out, req.Send()
373}
374
375// DeleteBackupWithContext is the same as DeleteBackup with the addition of
376// the ability to pass a context and additional request options.
377//
378// See DeleteBackup for details on how to use this API operation.
379//
380// The context must be non-nil and will be used for request cancellation. If
381// the context is nil a panic will occur. In the future the SDK may create
382// sub-contexts for http.Requests. See https://golang.org/pkg/context/
383// for more information on using Contexts.
384func (c *CloudHSMV2) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) {
385	req, out := c.DeleteBackupRequest(input)
386	req.SetContext(ctx)
387	req.ApplyOptions(opts...)
388	return out, req.Send()
389}
390
391const opDeleteCluster = "DeleteCluster"
392
393// DeleteClusterRequest generates a "aws/request.Request" representing the
394// client's request for the DeleteCluster operation. The "output" return
395// value will be populated with the request's response once the request completes
396// successfully.
397//
398// Use "Send" method on the returned Request to send the API call to the service.
399// the "output" return value is not valid until after Send returns without error.
400//
401// See DeleteCluster for more information on using the DeleteCluster
402// API call, and error handling.
403//
404// This method is useful when you want to inject custom logic or configuration
405// into the SDK's request lifecycle. Such as custom headers, or retry logic.
406//
407//
408//    // Example sending a request using the DeleteClusterRequest method.
409//    req, resp := client.DeleteClusterRequest(params)
410//
411//    err := req.Send()
412//    if err == nil { // resp is now filled
413//        fmt.Println(resp)
414//    }
415//
416// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster
417func (c *CloudHSMV2) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) {
418	op := &request.Operation{
419		Name:       opDeleteCluster,
420		HTTPMethod: "POST",
421		HTTPPath:   "/",
422	}
423
424	if input == nil {
425		input = &DeleteClusterInput{}
426	}
427
428	output = &DeleteClusterOutput{}
429	req = c.newRequest(op, input, output)
430	return
431}
432
433// DeleteCluster API operation for AWS CloudHSM V2.
434//
435// Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster,
436// you must delete all HSMs in the cluster. To see if the cluster contains any
437// HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm.
438//
439// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
440// with awserr.Error's Code and Message methods to get detailed information about
441// the error.
442//
443// See the AWS API reference guide for AWS CloudHSM V2's
444// API operation DeleteCluster for usage and error information.
445//
446// Returned Error Codes:
447//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
448//   The request was rejected because of an AWS CloudHSM internal failure. The
449//   request can be retried.
450//
451//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
452//   The request was rejected because an error occurred.
453//
454//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
455//   The request was rejected because it refers to a resource that cannot be found.
456//
457//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
458//   The request was rejected because it is not a valid request.
459//
460//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
461//   The request was rejected because the requester does not have permission to
462//   perform the requested operation.
463//
464// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster
465func (c *CloudHSMV2) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) {
466	req, out := c.DeleteClusterRequest(input)
467	return out, req.Send()
468}
469
470// DeleteClusterWithContext is the same as DeleteCluster with the addition of
471// the ability to pass a context and additional request options.
472//
473// See DeleteCluster for details on how to use this API operation.
474//
475// The context must be non-nil and will be used for request cancellation. If
476// the context is nil a panic will occur. In the future the SDK may create
477// sub-contexts for http.Requests. See https://golang.org/pkg/context/
478// for more information on using Contexts.
479func (c *CloudHSMV2) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) {
480	req, out := c.DeleteClusterRequest(input)
481	req.SetContext(ctx)
482	req.ApplyOptions(opts...)
483	return out, req.Send()
484}
485
486const opDeleteHsm = "DeleteHsm"
487
488// DeleteHsmRequest generates a "aws/request.Request" representing the
489// client's request for the DeleteHsm operation. The "output" return
490// value will be populated with the request's response once the request completes
491// successfully.
492//
493// Use "Send" method on the returned Request to send the API call to the service.
494// the "output" return value is not valid until after Send returns without error.
495//
496// See DeleteHsm for more information on using the DeleteHsm
497// API call, and error handling.
498//
499// This method is useful when you want to inject custom logic or configuration
500// into the SDK's request lifecycle. Such as custom headers, or retry logic.
501//
502//
503//    // Example sending a request using the DeleteHsmRequest method.
504//    req, resp := client.DeleteHsmRequest(params)
505//
506//    err := req.Send()
507//    if err == nil { // resp is now filled
508//        fmt.Println(resp)
509//    }
510//
511// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm
512func (c *CloudHSMV2) DeleteHsmRequest(input *DeleteHsmInput) (req *request.Request, output *DeleteHsmOutput) {
513	op := &request.Operation{
514		Name:       opDeleteHsm,
515		HTTPMethod: "POST",
516		HTTPPath:   "/",
517	}
518
519	if input == nil {
520		input = &DeleteHsmInput{}
521	}
522
523	output = &DeleteHsmOutput{}
524	req = c.newRequest(op, input, output)
525	return
526}
527
528// DeleteHsm API operation for AWS CloudHSM V2.
529//
530// Deletes the specified HSM. To specify an HSM, you can use its identifier
531// (ID), the IP address of the HSM's elastic network interface (ENI), or the
532// ID of the HSM's ENI. You need to specify only one of these values. To find
533// these values, use DescribeClusters.
534//
535// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
536// with awserr.Error's Code and Message methods to get detailed information about
537// the error.
538//
539// See the AWS API reference guide for AWS CloudHSM V2's
540// API operation DeleteHsm for usage and error information.
541//
542// Returned Error Codes:
543//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
544//   The request was rejected because of an AWS CloudHSM internal failure. The
545//   request can be retried.
546//
547//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
548//   The request was rejected because an error occurred.
549//
550//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
551//   The request was rejected because it refers to a resource that cannot be found.
552//
553//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
554//   The request was rejected because it is not a valid request.
555//
556//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
557//   The request was rejected because the requester does not have permission to
558//   perform the requested operation.
559//
560// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm
561func (c *CloudHSMV2) DeleteHsm(input *DeleteHsmInput) (*DeleteHsmOutput, error) {
562	req, out := c.DeleteHsmRequest(input)
563	return out, req.Send()
564}
565
566// DeleteHsmWithContext is the same as DeleteHsm with the addition of
567// the ability to pass a context and additional request options.
568//
569// See DeleteHsm for details on how to use this API operation.
570//
571// The context must be non-nil and will be used for request cancellation. If
572// the context is nil a panic will occur. In the future the SDK may create
573// sub-contexts for http.Requests. See https://golang.org/pkg/context/
574// for more information on using Contexts.
575func (c *CloudHSMV2) DeleteHsmWithContext(ctx aws.Context, input *DeleteHsmInput, opts ...request.Option) (*DeleteHsmOutput, error) {
576	req, out := c.DeleteHsmRequest(input)
577	req.SetContext(ctx)
578	req.ApplyOptions(opts...)
579	return out, req.Send()
580}
581
582const opDescribeBackups = "DescribeBackups"
583
584// DescribeBackupsRequest generates a "aws/request.Request" representing the
585// client's request for the DescribeBackups operation. The "output" return
586// value will be populated with the request's response once the request completes
587// successfully.
588//
589// Use "Send" method on the returned Request to send the API call to the service.
590// the "output" return value is not valid until after Send returns without error.
591//
592// See DescribeBackups for more information on using the DescribeBackups
593// API call, and error handling.
594//
595// This method is useful when you want to inject custom logic or configuration
596// into the SDK's request lifecycle. Such as custom headers, or retry logic.
597//
598//
599//    // Example sending a request using the DescribeBackupsRequest method.
600//    req, resp := client.DescribeBackupsRequest(params)
601//
602//    err := req.Send()
603//    if err == nil { // resp is now filled
604//        fmt.Println(resp)
605//    }
606//
607// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups
608func (c *CloudHSMV2) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) {
609	op := &request.Operation{
610		Name:       opDescribeBackups,
611		HTTPMethod: "POST",
612		HTTPPath:   "/",
613		Paginator: &request.Paginator{
614			InputTokens:     []string{"NextToken"},
615			OutputTokens:    []string{"NextToken"},
616			LimitToken:      "MaxResults",
617			TruncationToken: "",
618		},
619	}
620
621	if input == nil {
622		input = &DescribeBackupsInput{}
623	}
624
625	output = &DescribeBackupsOutput{}
626	req = c.newRequest(op, input, output)
627	return
628}
629
630// DescribeBackups API operation for AWS CloudHSM V2.
631//
632// Gets information about backups of AWS CloudHSM clusters.
633//
634// This is a paginated operation, which means that each response might contain
635// only a subset of all the backups. When the response contains only a subset
636// of backups, it includes a NextToken value. Use this value in a subsequent
637// DescribeBackups request to get more backups. When you receive a response
638// with no NextToken (or an empty or null value), that means there are no more
639// backups to get.
640//
641// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
642// with awserr.Error's Code and Message methods to get detailed information about
643// the error.
644//
645// See the AWS API reference guide for AWS CloudHSM V2's
646// API operation DescribeBackups for usage and error information.
647//
648// Returned Error Codes:
649//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
650//   The request was rejected because of an AWS CloudHSM internal failure. The
651//   request can be retried.
652//
653//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
654//   The request was rejected because an error occurred.
655//
656//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
657//   The request was rejected because it refers to a resource that cannot be found.
658//
659//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
660//   The request was rejected because it is not a valid request.
661//
662//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
663//   The request was rejected because the requester does not have permission to
664//   perform the requested operation.
665//
666// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups
667func (c *CloudHSMV2) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) {
668	req, out := c.DescribeBackupsRequest(input)
669	return out, req.Send()
670}
671
672// DescribeBackupsWithContext is the same as DescribeBackups with the addition of
673// the ability to pass a context and additional request options.
674//
675// See DescribeBackups for details on how to use this API operation.
676//
677// The context must be non-nil and will be used for request cancellation. If
678// the context is nil a panic will occur. In the future the SDK may create
679// sub-contexts for http.Requests. See https://golang.org/pkg/context/
680// for more information on using Contexts.
681func (c *CloudHSMV2) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) {
682	req, out := c.DescribeBackupsRequest(input)
683	req.SetContext(ctx)
684	req.ApplyOptions(opts...)
685	return out, req.Send()
686}
687
688// DescribeBackupsPages iterates over the pages of a DescribeBackups operation,
689// calling the "fn" function with the response data for each page. To stop
690// iterating, return false from the fn function.
691//
692// See DescribeBackups method for more information on how to use this operation.
693//
694// Note: This operation can generate multiple requests to a service.
695//
696//    // Example iterating over at most 3 pages of a DescribeBackups operation.
697//    pageNum := 0
698//    err := client.DescribeBackupsPages(params,
699//        func(page *cloudhsmv2.DescribeBackupsOutput, lastPage bool) bool {
700//            pageNum++
701//            fmt.Println(page)
702//            return pageNum <= 3
703//        })
704//
705func (c *CloudHSMV2) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error {
706	return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn)
707}
708
709// DescribeBackupsPagesWithContext same as DescribeBackupsPages except
710// it takes a Context and allows setting request options on the pages.
711//
712// The context must be non-nil and will be used for request cancellation. If
713// the context is nil a panic will occur. In the future the SDK may create
714// sub-contexts for http.Requests. See https://golang.org/pkg/context/
715// for more information on using Contexts.
716func (c *CloudHSMV2) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error {
717	p := request.Pagination{
718		NewRequest: func() (*request.Request, error) {
719			var inCpy *DescribeBackupsInput
720			if input != nil {
721				tmp := *input
722				inCpy = &tmp
723			}
724			req, _ := c.DescribeBackupsRequest(inCpy)
725			req.SetContext(ctx)
726			req.ApplyOptions(opts...)
727			return req, nil
728		},
729	}
730
731	cont := true
732	for p.Next() && cont {
733		cont = fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage())
734	}
735	return p.Err()
736}
737
738const opDescribeClusters = "DescribeClusters"
739
740// DescribeClustersRequest generates a "aws/request.Request" representing the
741// client's request for the DescribeClusters operation. The "output" return
742// value will be populated with the request's response once the request completes
743// successfully.
744//
745// Use "Send" method on the returned Request to send the API call to the service.
746// the "output" return value is not valid until after Send returns without error.
747//
748// See DescribeClusters for more information on using the DescribeClusters
749// API call, and error handling.
750//
751// This method is useful when you want to inject custom logic or configuration
752// into the SDK's request lifecycle. Such as custom headers, or retry logic.
753//
754//
755//    // Example sending a request using the DescribeClustersRequest method.
756//    req, resp := client.DescribeClustersRequest(params)
757//
758//    err := req.Send()
759//    if err == nil { // resp is now filled
760//        fmt.Println(resp)
761//    }
762//
763// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters
764func (c *CloudHSMV2) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) {
765	op := &request.Operation{
766		Name:       opDescribeClusters,
767		HTTPMethod: "POST",
768		HTTPPath:   "/",
769		Paginator: &request.Paginator{
770			InputTokens:     []string{"NextToken"},
771			OutputTokens:    []string{"NextToken"},
772			LimitToken:      "MaxResults",
773			TruncationToken: "",
774		},
775	}
776
777	if input == nil {
778		input = &DescribeClustersInput{}
779	}
780
781	output = &DescribeClustersOutput{}
782	req = c.newRequest(op, input, output)
783	return
784}
785
786// DescribeClusters API operation for AWS CloudHSM V2.
787//
788// Gets information about AWS CloudHSM clusters.
789//
790// This is a paginated operation, which means that each response might contain
791// only a subset of all the clusters. When the response contains only a subset
792// of clusters, it includes a NextToken value. Use this value in a subsequent
793// DescribeClusters request to get more clusters. When you receive a response
794// with no NextToken (or an empty or null value), that means there are no more
795// clusters to get.
796//
797// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
798// with awserr.Error's Code and Message methods to get detailed information about
799// the error.
800//
801// See the AWS API reference guide for AWS CloudHSM V2's
802// API operation DescribeClusters for usage and error information.
803//
804// Returned Error Codes:
805//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
806//   The request was rejected because of an AWS CloudHSM internal failure. The
807//   request can be retried.
808//
809//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
810//   The request was rejected because an error occurred.
811//
812//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
813//   The request was rejected because it is not a valid request.
814//
815//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
816//   The request was rejected because the requester does not have permission to
817//   perform the requested operation.
818//
819// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters
820func (c *CloudHSMV2) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) {
821	req, out := c.DescribeClustersRequest(input)
822	return out, req.Send()
823}
824
825// DescribeClustersWithContext is the same as DescribeClusters with the addition of
826// the ability to pass a context and additional request options.
827//
828// See DescribeClusters for details on how to use this API operation.
829//
830// The context must be non-nil and will be used for request cancellation. If
831// the context is nil a panic will occur. In the future the SDK may create
832// sub-contexts for http.Requests. See https://golang.org/pkg/context/
833// for more information on using Contexts.
834func (c *CloudHSMV2) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) {
835	req, out := c.DescribeClustersRequest(input)
836	req.SetContext(ctx)
837	req.ApplyOptions(opts...)
838	return out, req.Send()
839}
840
841// DescribeClustersPages iterates over the pages of a DescribeClusters operation,
842// calling the "fn" function with the response data for each page. To stop
843// iterating, return false from the fn function.
844//
845// See DescribeClusters method for more information on how to use this operation.
846//
847// Note: This operation can generate multiple requests to a service.
848//
849//    // Example iterating over at most 3 pages of a DescribeClusters operation.
850//    pageNum := 0
851//    err := client.DescribeClustersPages(params,
852//        func(page *cloudhsmv2.DescribeClustersOutput, lastPage bool) bool {
853//            pageNum++
854//            fmt.Println(page)
855//            return pageNum <= 3
856//        })
857//
858func (c *CloudHSMV2) DescribeClustersPages(input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool) error {
859	return c.DescribeClustersPagesWithContext(aws.BackgroundContext(), input, fn)
860}
861
862// DescribeClustersPagesWithContext same as DescribeClustersPages except
863// it takes a Context and allows setting request options on the pages.
864//
865// The context must be non-nil and will be used for request cancellation. If
866// the context is nil a panic will occur. In the future the SDK may create
867// sub-contexts for http.Requests. See https://golang.org/pkg/context/
868// for more information on using Contexts.
869func (c *CloudHSMV2) DescribeClustersPagesWithContext(ctx aws.Context, input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool, opts ...request.Option) error {
870	p := request.Pagination{
871		NewRequest: func() (*request.Request, error) {
872			var inCpy *DescribeClustersInput
873			if input != nil {
874				tmp := *input
875				inCpy = &tmp
876			}
877			req, _ := c.DescribeClustersRequest(inCpy)
878			req.SetContext(ctx)
879			req.ApplyOptions(opts...)
880			return req, nil
881		},
882	}
883
884	cont := true
885	for p.Next() && cont {
886		cont = fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage())
887	}
888	return p.Err()
889}
890
891const opInitializeCluster = "InitializeCluster"
892
893// InitializeClusterRequest generates a "aws/request.Request" representing the
894// client's request for the InitializeCluster operation. The "output" return
895// value will be populated with the request's response once the request completes
896// successfully.
897//
898// Use "Send" method on the returned Request to send the API call to the service.
899// the "output" return value is not valid until after Send returns without error.
900//
901// See InitializeCluster for more information on using the InitializeCluster
902// API call, and error handling.
903//
904// This method is useful when you want to inject custom logic or configuration
905// into the SDK's request lifecycle. Such as custom headers, or retry logic.
906//
907//
908//    // Example sending a request using the InitializeClusterRequest method.
909//    req, resp := client.InitializeClusterRequest(params)
910//
911//    err := req.Send()
912//    if err == nil { // resp is now filled
913//        fmt.Println(resp)
914//    }
915//
916// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster
917func (c *CloudHSMV2) InitializeClusterRequest(input *InitializeClusterInput) (req *request.Request, output *InitializeClusterOutput) {
918	op := &request.Operation{
919		Name:       opInitializeCluster,
920		HTTPMethod: "POST",
921		HTTPPath:   "/",
922	}
923
924	if input == nil {
925		input = &InitializeClusterInput{}
926	}
927
928	output = &InitializeClusterOutput{}
929	req = c.newRequest(op, input, output)
930	return
931}
932
933// InitializeCluster API operation for AWS CloudHSM V2.
934//
935// Claims an AWS CloudHSM cluster by submitting the cluster certificate issued
936// by your issuing certificate authority (CA) and the CA's root certificate.
937// Before you can claim a cluster, you must sign the cluster's certificate signing
938// request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters.
939//
940// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
941// with awserr.Error's Code and Message methods to get detailed information about
942// the error.
943//
944// See the AWS API reference guide for AWS CloudHSM V2's
945// API operation InitializeCluster for usage and error information.
946//
947// Returned Error Codes:
948//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
949//   The request was rejected because of an AWS CloudHSM internal failure. The
950//   request can be retried.
951//
952//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
953//   The request was rejected because an error occurred.
954//
955//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
956//   The request was rejected because it refers to a resource that cannot be found.
957//
958//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
959//   The request was rejected because it is not a valid request.
960//
961//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
962//   The request was rejected because the requester does not have permission to
963//   perform the requested operation.
964//
965// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster
966func (c *CloudHSMV2) InitializeCluster(input *InitializeClusterInput) (*InitializeClusterOutput, error) {
967	req, out := c.InitializeClusterRequest(input)
968	return out, req.Send()
969}
970
971// InitializeClusterWithContext is the same as InitializeCluster with the addition of
972// the ability to pass a context and additional request options.
973//
974// See InitializeCluster for details on how to use this API operation.
975//
976// The context must be non-nil and will be used for request cancellation. If
977// the context is nil a panic will occur. In the future the SDK may create
978// sub-contexts for http.Requests. See https://golang.org/pkg/context/
979// for more information on using Contexts.
980func (c *CloudHSMV2) InitializeClusterWithContext(ctx aws.Context, input *InitializeClusterInput, opts ...request.Option) (*InitializeClusterOutput, error) {
981	req, out := c.InitializeClusterRequest(input)
982	req.SetContext(ctx)
983	req.ApplyOptions(opts...)
984	return out, req.Send()
985}
986
987const opListTags = "ListTags"
988
989// ListTagsRequest generates a "aws/request.Request" representing the
990// client's request for the ListTags operation. The "output" return
991// value will be populated with the request's response once the request completes
992// successfully.
993//
994// Use "Send" method on the returned Request to send the API call to the service.
995// the "output" return value is not valid until after Send returns without error.
996//
997// See ListTags for more information on using the ListTags
998// API call, and error handling.
999//
1000// This method is useful when you want to inject custom logic or configuration
1001// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1002//
1003//
1004//    // Example sending a request using the ListTagsRequest method.
1005//    req, resp := client.ListTagsRequest(params)
1006//
1007//    err := req.Send()
1008//    if err == nil { // resp is now filled
1009//        fmt.Println(resp)
1010//    }
1011//
1012// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags
1013func (c *CloudHSMV2) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
1014	op := &request.Operation{
1015		Name:       opListTags,
1016		HTTPMethod: "POST",
1017		HTTPPath:   "/",
1018		Paginator: &request.Paginator{
1019			InputTokens:     []string{"NextToken"},
1020			OutputTokens:    []string{"NextToken"},
1021			LimitToken:      "MaxResults",
1022			TruncationToken: "",
1023		},
1024	}
1025
1026	if input == nil {
1027		input = &ListTagsInput{}
1028	}
1029
1030	output = &ListTagsOutput{}
1031	req = c.newRequest(op, input, output)
1032	return
1033}
1034
1035// ListTags API operation for AWS CloudHSM V2.
1036//
1037// Gets a list of tags for the specified AWS CloudHSM cluster.
1038//
1039// This is a paginated operation, which means that each response might contain
1040// only a subset of all the tags. When the response contains only a subset of
1041// tags, it includes a NextToken value. Use this value in a subsequent ListTags
1042// request to get more tags. When you receive a response with no NextToken (or
1043// an empty or null value), that means there are no more tags to get.
1044//
1045// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1046// with awserr.Error's Code and Message methods to get detailed information about
1047// the error.
1048//
1049// See the AWS API reference guide for AWS CloudHSM V2's
1050// API operation ListTags for usage and error information.
1051//
1052// Returned Error Codes:
1053//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
1054//   The request was rejected because of an AWS CloudHSM internal failure. The
1055//   request can be retried.
1056//
1057//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
1058//   The request was rejected because an error occurred.
1059//
1060//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
1061//   The request was rejected because it refers to a resource that cannot be found.
1062//
1063//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
1064//   The request was rejected because it is not a valid request.
1065//
1066//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
1067//   The request was rejected because the requester does not have permission to
1068//   perform the requested operation.
1069//
1070// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags
1071func (c *CloudHSMV2) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
1072	req, out := c.ListTagsRequest(input)
1073	return out, req.Send()
1074}
1075
1076// ListTagsWithContext is the same as ListTags with the addition of
1077// the ability to pass a context and additional request options.
1078//
1079// See ListTags for details on how to use this API operation.
1080//
1081// The context must be non-nil and will be used for request cancellation. If
1082// the context is nil a panic will occur. In the future the SDK may create
1083// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1084// for more information on using Contexts.
1085func (c *CloudHSMV2) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
1086	req, out := c.ListTagsRequest(input)
1087	req.SetContext(ctx)
1088	req.ApplyOptions(opts...)
1089	return out, req.Send()
1090}
1091
1092// ListTagsPages iterates over the pages of a ListTags operation,
1093// calling the "fn" function with the response data for each page. To stop
1094// iterating, return false from the fn function.
1095//
1096// See ListTags method for more information on how to use this operation.
1097//
1098// Note: This operation can generate multiple requests to a service.
1099//
1100//    // Example iterating over at most 3 pages of a ListTags operation.
1101//    pageNum := 0
1102//    err := client.ListTagsPages(params,
1103//        func(page *cloudhsmv2.ListTagsOutput, lastPage bool) bool {
1104//            pageNum++
1105//            fmt.Println(page)
1106//            return pageNum <= 3
1107//        })
1108//
1109func (c *CloudHSMV2) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error {
1110	return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn)
1111}
1112
1113// ListTagsPagesWithContext same as ListTagsPages except
1114// it takes a Context and allows setting request options on the pages.
1115//
1116// The context must be non-nil and will be used for request cancellation. If
1117// the context is nil a panic will occur. In the future the SDK may create
1118// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1119// for more information on using Contexts.
1120func (c *CloudHSMV2) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error {
1121	p := request.Pagination{
1122		NewRequest: func() (*request.Request, error) {
1123			var inCpy *ListTagsInput
1124			if input != nil {
1125				tmp := *input
1126				inCpy = &tmp
1127			}
1128			req, _ := c.ListTagsRequest(inCpy)
1129			req.SetContext(ctx)
1130			req.ApplyOptions(opts...)
1131			return req, nil
1132		},
1133	}
1134
1135	cont := true
1136	for p.Next() && cont {
1137		cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage())
1138	}
1139	return p.Err()
1140}
1141
1142const opRestoreBackup = "RestoreBackup"
1143
1144// RestoreBackupRequest generates a "aws/request.Request" representing the
1145// client's request for the RestoreBackup operation. The "output" return
1146// value will be populated with the request's response once the request completes
1147// successfully.
1148//
1149// Use "Send" method on the returned Request to send the API call to the service.
1150// the "output" return value is not valid until after Send returns without error.
1151//
1152// See RestoreBackup for more information on using the RestoreBackup
1153// API call, and error handling.
1154//
1155// This method is useful when you want to inject custom logic or configuration
1156// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1157//
1158//
1159//    // Example sending a request using the RestoreBackupRequest method.
1160//    req, resp := client.RestoreBackupRequest(params)
1161//
1162//    err := req.Send()
1163//    if err == nil { // resp is now filled
1164//        fmt.Println(resp)
1165//    }
1166//
1167// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup
1168func (c *CloudHSMV2) RestoreBackupRequest(input *RestoreBackupInput) (req *request.Request, output *RestoreBackupOutput) {
1169	op := &request.Operation{
1170		Name:       opRestoreBackup,
1171		HTTPMethod: "POST",
1172		HTTPPath:   "/",
1173	}
1174
1175	if input == nil {
1176		input = &RestoreBackupInput{}
1177	}
1178
1179	output = &RestoreBackupOutput{}
1180	req = c.newRequest(op, input, output)
1181	return
1182}
1183
1184// RestoreBackup API operation for AWS CloudHSM V2.
1185//
1186// Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION
1187// state. For more information on deleting a backup, see DeleteBackup.
1188//
1189// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1190// with awserr.Error's Code and Message methods to get detailed information about
1191// the error.
1192//
1193// See the AWS API reference guide for AWS CloudHSM V2's
1194// API operation RestoreBackup for usage and error information.
1195//
1196// Returned Error Codes:
1197//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
1198//   The request was rejected because of an AWS CloudHSM internal failure. The
1199//   request can be retried.
1200//
1201//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
1202//   The request was rejected because an error occurred.
1203//
1204//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
1205//   The request was rejected because it refers to a resource that cannot be found.
1206//
1207//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
1208//   The request was rejected because it is not a valid request.
1209//
1210//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
1211//   The request was rejected because the requester does not have permission to
1212//   perform the requested operation.
1213//
1214// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup
1215func (c *CloudHSMV2) RestoreBackup(input *RestoreBackupInput) (*RestoreBackupOutput, error) {
1216	req, out := c.RestoreBackupRequest(input)
1217	return out, req.Send()
1218}
1219
1220// RestoreBackupWithContext is the same as RestoreBackup with the addition of
1221// the ability to pass a context and additional request options.
1222//
1223// See RestoreBackup for details on how to use this API operation.
1224//
1225// The context must be non-nil and will be used for request cancellation. If
1226// the context is nil a panic will occur. In the future the SDK may create
1227// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1228// for more information on using Contexts.
1229func (c *CloudHSMV2) RestoreBackupWithContext(ctx aws.Context, input *RestoreBackupInput, opts ...request.Option) (*RestoreBackupOutput, error) {
1230	req, out := c.RestoreBackupRequest(input)
1231	req.SetContext(ctx)
1232	req.ApplyOptions(opts...)
1233	return out, req.Send()
1234}
1235
1236const opTagResource = "TagResource"
1237
1238// TagResourceRequest generates a "aws/request.Request" representing the
1239// client's request for the TagResource operation. The "output" return
1240// value will be populated with the request's response once the request completes
1241// successfully.
1242//
1243// Use "Send" method on the returned Request to send the API call to the service.
1244// the "output" return value is not valid until after Send returns without error.
1245//
1246// See TagResource for more information on using the TagResource
1247// API call, and error handling.
1248//
1249// This method is useful when you want to inject custom logic or configuration
1250// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1251//
1252//
1253//    // Example sending a request using the TagResourceRequest method.
1254//    req, resp := client.TagResourceRequest(params)
1255//
1256//    err := req.Send()
1257//    if err == nil { // resp is now filled
1258//        fmt.Println(resp)
1259//    }
1260//
1261// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource
1262func (c *CloudHSMV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
1263	op := &request.Operation{
1264		Name:       opTagResource,
1265		HTTPMethod: "POST",
1266		HTTPPath:   "/",
1267	}
1268
1269	if input == nil {
1270		input = &TagResourceInput{}
1271	}
1272
1273	output = &TagResourceOutput{}
1274	req = c.newRequest(op, input, output)
1275	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1276	return
1277}
1278
1279// TagResource API operation for AWS CloudHSM V2.
1280//
1281// Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.
1282//
1283// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1284// with awserr.Error's Code and Message methods to get detailed information about
1285// the error.
1286//
1287// See the AWS API reference guide for AWS CloudHSM V2's
1288// API operation TagResource for usage and error information.
1289//
1290// Returned Error Codes:
1291//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
1292//   The request was rejected because of an AWS CloudHSM internal failure. The
1293//   request can be retried.
1294//
1295//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
1296//   The request was rejected because an error occurred.
1297//
1298//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
1299//   The request was rejected because it refers to a resource that cannot be found.
1300//
1301//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
1302//   The request was rejected because it is not a valid request.
1303//
1304//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
1305//   The request was rejected because the requester does not have permission to
1306//   perform the requested operation.
1307//
1308// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource
1309func (c *CloudHSMV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
1310	req, out := c.TagResourceRequest(input)
1311	return out, req.Send()
1312}
1313
1314// TagResourceWithContext is the same as TagResource with the addition of
1315// the ability to pass a context and additional request options.
1316//
1317// See TagResource for details on how to use this API operation.
1318//
1319// The context must be non-nil and will be used for request cancellation. If
1320// the context is nil a panic will occur. In the future the SDK may create
1321// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1322// for more information on using Contexts.
1323func (c *CloudHSMV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
1324	req, out := c.TagResourceRequest(input)
1325	req.SetContext(ctx)
1326	req.ApplyOptions(opts...)
1327	return out, req.Send()
1328}
1329
1330const opUntagResource = "UntagResource"
1331
1332// UntagResourceRequest generates a "aws/request.Request" representing the
1333// client's request for the UntagResource operation. The "output" return
1334// value will be populated with the request's response once the request completes
1335// successfully.
1336//
1337// Use "Send" method on the returned Request to send the API call to the service.
1338// the "output" return value is not valid until after Send returns without error.
1339//
1340// See UntagResource for more information on using the UntagResource
1341// API call, and error handling.
1342//
1343// This method is useful when you want to inject custom logic or configuration
1344// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1345//
1346//
1347//    // Example sending a request using the UntagResourceRequest method.
1348//    req, resp := client.UntagResourceRequest(params)
1349//
1350//    err := req.Send()
1351//    if err == nil { // resp is now filled
1352//        fmt.Println(resp)
1353//    }
1354//
1355// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource
1356func (c *CloudHSMV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
1357	op := &request.Operation{
1358		Name:       opUntagResource,
1359		HTTPMethod: "POST",
1360		HTTPPath:   "/",
1361	}
1362
1363	if input == nil {
1364		input = &UntagResourceInput{}
1365	}
1366
1367	output = &UntagResourceOutput{}
1368	req = c.newRequest(op, input, output)
1369	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1370	return
1371}
1372
1373// UntagResource API operation for AWS CloudHSM V2.
1374//
1375// Removes the specified tag or tags from the specified AWS CloudHSM cluster.
1376//
1377// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1378// with awserr.Error's Code and Message methods to get detailed information about
1379// the error.
1380//
1381// See the AWS API reference guide for AWS CloudHSM V2's
1382// API operation UntagResource for usage and error information.
1383//
1384// Returned Error Codes:
1385//   * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException"
1386//   The request was rejected because of an AWS CloudHSM internal failure. The
1387//   request can be retried.
1388//
1389//   * ErrCodeCloudHsmServiceException "CloudHsmServiceException"
1390//   The request was rejected because an error occurred.
1391//
1392//   * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException"
1393//   The request was rejected because it refers to a resource that cannot be found.
1394//
1395//   * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException"
1396//   The request was rejected because it is not a valid request.
1397//
1398//   * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException"
1399//   The request was rejected because the requester does not have permission to
1400//   perform the requested operation.
1401//
1402// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource
1403func (c *CloudHSMV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
1404	req, out := c.UntagResourceRequest(input)
1405	return out, req.Send()
1406}
1407
1408// UntagResourceWithContext is the same as UntagResource with the addition of
1409// the ability to pass a context and additional request options.
1410//
1411// See UntagResource for details on how to use this API operation.
1412//
1413// The context must be non-nil and will be used for request cancellation. If
1414// the context is nil a panic will occur. In the future the SDK may create
1415// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1416// for more information on using Contexts.
1417func (c *CloudHSMV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
1418	req, out := c.UntagResourceRequest(input)
1419	req.SetContext(ctx)
1420	req.ApplyOptions(opts...)
1421	return out, req.Send()
1422}
1423
1424// Contains information about a backup of an AWS CloudHSM cluster.
1425type Backup struct {
1426	_ struct{} `type:"structure"`
1427
1428	// The identifier (ID) of the backup.
1429	//
1430	// BackupId is a required field
1431	BackupId *string `type:"string" required:"true"`
1432
1433	// The state of the backup.
1434	BackupState *string `type:"string" enum:"BackupState"`
1435
1436	// The identifier (ID) of the cluster that was backed up.
1437	ClusterId *string `type:"string"`
1438
1439	CopyTimestamp *time.Time `type:"timestamp"`
1440
1441	// The date and time when the backup was created.
1442	CreateTimestamp *time.Time `type:"timestamp"`
1443
1444	// The date and time when the backup will be permanently deleted.
1445	DeleteTimestamp *time.Time `type:"timestamp"`
1446
1447	SourceBackup *string `type:"string"`
1448
1449	SourceCluster *string `type:"string"`
1450
1451	SourceRegion *string `type:"string"`
1452}
1453
1454// String returns the string representation
1455func (s Backup) String() string {
1456	return awsutil.Prettify(s)
1457}
1458
1459// GoString returns the string representation
1460func (s Backup) GoString() string {
1461	return s.String()
1462}
1463
1464// SetBackupId sets the BackupId field's value.
1465func (s *Backup) SetBackupId(v string) *Backup {
1466	s.BackupId = &v
1467	return s
1468}
1469
1470// SetBackupState sets the BackupState field's value.
1471func (s *Backup) SetBackupState(v string) *Backup {
1472	s.BackupState = &v
1473	return s
1474}
1475
1476// SetClusterId sets the ClusterId field's value.
1477func (s *Backup) SetClusterId(v string) *Backup {
1478	s.ClusterId = &v
1479	return s
1480}
1481
1482// SetCopyTimestamp sets the CopyTimestamp field's value.
1483func (s *Backup) SetCopyTimestamp(v time.Time) *Backup {
1484	s.CopyTimestamp = &v
1485	return s
1486}
1487
1488// SetCreateTimestamp sets the CreateTimestamp field's value.
1489func (s *Backup) SetCreateTimestamp(v time.Time) *Backup {
1490	s.CreateTimestamp = &v
1491	return s
1492}
1493
1494// SetDeleteTimestamp sets the DeleteTimestamp field's value.
1495func (s *Backup) SetDeleteTimestamp(v time.Time) *Backup {
1496	s.DeleteTimestamp = &v
1497	return s
1498}
1499
1500// SetSourceBackup sets the SourceBackup field's value.
1501func (s *Backup) SetSourceBackup(v string) *Backup {
1502	s.SourceBackup = &v
1503	return s
1504}
1505
1506// SetSourceCluster sets the SourceCluster field's value.
1507func (s *Backup) SetSourceCluster(v string) *Backup {
1508	s.SourceCluster = &v
1509	return s
1510}
1511
1512// SetSourceRegion sets the SourceRegion field's value.
1513func (s *Backup) SetSourceRegion(v string) *Backup {
1514	s.SourceRegion = &v
1515	return s
1516}
1517
1518// Contains one or more certificates or a certificate signing request (CSR).
1519type Certificates struct {
1520	_ struct{} `type:"structure"`
1521
1522	// The HSM hardware certificate issued (signed) by AWS CloudHSM.
1523	AwsHardwareCertificate *string `type:"string"`
1524
1525	// The cluster certificate issued (signed) by the issuing certificate authority
1526	// (CA) of the cluster's owner.
1527	ClusterCertificate *string `type:"string"`
1528
1529	// The cluster's certificate signing request (CSR). The CSR exists only when
1530	// the cluster's state is UNINITIALIZED.
1531	ClusterCsr *string `type:"string"`
1532
1533	// The HSM certificate issued (signed) by the HSM hardware.
1534	HsmCertificate *string `type:"string"`
1535
1536	// The HSM hardware certificate issued (signed) by the hardware manufacturer.
1537	ManufacturerHardwareCertificate *string `type:"string"`
1538}
1539
1540// String returns the string representation
1541func (s Certificates) String() string {
1542	return awsutil.Prettify(s)
1543}
1544
1545// GoString returns the string representation
1546func (s Certificates) GoString() string {
1547	return s.String()
1548}
1549
1550// SetAwsHardwareCertificate sets the AwsHardwareCertificate field's value.
1551func (s *Certificates) SetAwsHardwareCertificate(v string) *Certificates {
1552	s.AwsHardwareCertificate = &v
1553	return s
1554}
1555
1556// SetClusterCertificate sets the ClusterCertificate field's value.
1557func (s *Certificates) SetClusterCertificate(v string) *Certificates {
1558	s.ClusterCertificate = &v
1559	return s
1560}
1561
1562// SetClusterCsr sets the ClusterCsr field's value.
1563func (s *Certificates) SetClusterCsr(v string) *Certificates {
1564	s.ClusterCsr = &v
1565	return s
1566}
1567
1568// SetHsmCertificate sets the HsmCertificate field's value.
1569func (s *Certificates) SetHsmCertificate(v string) *Certificates {
1570	s.HsmCertificate = &v
1571	return s
1572}
1573
1574// SetManufacturerHardwareCertificate sets the ManufacturerHardwareCertificate field's value.
1575func (s *Certificates) SetManufacturerHardwareCertificate(v string) *Certificates {
1576	s.ManufacturerHardwareCertificate = &v
1577	return s
1578}
1579
1580// Contains information about an AWS CloudHSM cluster.
1581type Cluster struct {
1582	_ struct{} `type:"structure"`
1583
1584	// The cluster's backup policy.
1585	BackupPolicy *string `type:"string" enum:"BackupPolicy"`
1586
1587	// Contains one or more certificates or a certificate signing request (CSR).
1588	Certificates *Certificates `type:"structure"`
1589
1590	// The cluster's identifier (ID).
1591	ClusterId *string `type:"string"`
1592
1593	// The date and time when the cluster was created.
1594	CreateTimestamp *time.Time `type:"timestamp"`
1595
1596	// The type of HSM that the cluster contains.
1597	HsmType *string `type:"string"`
1598
1599	// Contains information about the HSMs in the cluster.
1600	Hsms []*Hsm `type:"list"`
1601
1602	// The default password for the cluster's Pre-Crypto Officer (PRECO) user.
1603	PreCoPassword *string `min:"7" type:"string"`
1604
1605	// The identifier (ID) of the cluster's security group.
1606	SecurityGroup *string `type:"string"`
1607
1608	// The identifier (ID) of the backup used to create the cluster. This value
1609	// exists only when the cluster was created from a backup.
1610	SourceBackupId *string `type:"string"`
1611
1612	// The cluster's state.
1613	State *string `type:"string" enum:"ClusterState"`
1614
1615	// A description of the cluster's state.
1616	StateMessage *string `type:"string"`
1617
1618	// A map of the cluster's subnets and their corresponding Availability Zones.
1619	SubnetMapping map[string]*string `type:"map"`
1620
1621	// The identifier (ID) of the virtual private cloud (VPC) that contains the
1622	// cluster.
1623	VpcId *string `type:"string"`
1624}
1625
1626// String returns the string representation
1627func (s Cluster) String() string {
1628	return awsutil.Prettify(s)
1629}
1630
1631// GoString returns the string representation
1632func (s Cluster) GoString() string {
1633	return s.String()
1634}
1635
1636// SetBackupPolicy sets the BackupPolicy field's value.
1637func (s *Cluster) SetBackupPolicy(v string) *Cluster {
1638	s.BackupPolicy = &v
1639	return s
1640}
1641
1642// SetCertificates sets the Certificates field's value.
1643func (s *Cluster) SetCertificates(v *Certificates) *Cluster {
1644	s.Certificates = v
1645	return s
1646}
1647
1648// SetClusterId sets the ClusterId field's value.
1649func (s *Cluster) SetClusterId(v string) *Cluster {
1650	s.ClusterId = &v
1651	return s
1652}
1653
1654// SetCreateTimestamp sets the CreateTimestamp field's value.
1655func (s *Cluster) SetCreateTimestamp(v time.Time) *Cluster {
1656	s.CreateTimestamp = &v
1657	return s
1658}
1659
1660// SetHsmType sets the HsmType field's value.
1661func (s *Cluster) SetHsmType(v string) *Cluster {
1662	s.HsmType = &v
1663	return s
1664}
1665
1666// SetHsms sets the Hsms field's value.
1667func (s *Cluster) SetHsms(v []*Hsm) *Cluster {
1668	s.Hsms = v
1669	return s
1670}
1671
1672// SetPreCoPassword sets the PreCoPassword field's value.
1673func (s *Cluster) SetPreCoPassword(v string) *Cluster {
1674	s.PreCoPassword = &v
1675	return s
1676}
1677
1678// SetSecurityGroup sets the SecurityGroup field's value.
1679func (s *Cluster) SetSecurityGroup(v string) *Cluster {
1680	s.SecurityGroup = &v
1681	return s
1682}
1683
1684// SetSourceBackupId sets the SourceBackupId field's value.
1685func (s *Cluster) SetSourceBackupId(v string) *Cluster {
1686	s.SourceBackupId = &v
1687	return s
1688}
1689
1690// SetState sets the State field's value.
1691func (s *Cluster) SetState(v string) *Cluster {
1692	s.State = &v
1693	return s
1694}
1695
1696// SetStateMessage sets the StateMessage field's value.
1697func (s *Cluster) SetStateMessage(v string) *Cluster {
1698	s.StateMessage = &v
1699	return s
1700}
1701
1702// SetSubnetMapping sets the SubnetMapping field's value.
1703func (s *Cluster) SetSubnetMapping(v map[string]*string) *Cluster {
1704	s.SubnetMapping = v
1705	return s
1706}
1707
1708// SetVpcId sets the VpcId field's value.
1709func (s *Cluster) SetVpcId(v string) *Cluster {
1710	s.VpcId = &v
1711	return s
1712}
1713
1714type CopyBackupToRegionInput struct {
1715	_ struct{} `type:"structure"`
1716
1717	// The ID of the backup that will be copied to the destination region.
1718	//
1719	// BackupId is a required field
1720	BackupId *string `type:"string" required:"true"`
1721
1722	// The AWS region that will contain your copied CloudHSM cluster backup.
1723	//
1724	// DestinationRegion is a required field
1725	DestinationRegion *string `type:"string" required:"true"`
1726}
1727
1728// String returns the string representation
1729func (s CopyBackupToRegionInput) String() string {
1730	return awsutil.Prettify(s)
1731}
1732
1733// GoString returns the string representation
1734func (s CopyBackupToRegionInput) GoString() string {
1735	return s.String()
1736}
1737
1738// Validate inspects the fields of the type to determine if they are valid.
1739func (s *CopyBackupToRegionInput) Validate() error {
1740	invalidParams := request.ErrInvalidParams{Context: "CopyBackupToRegionInput"}
1741	if s.BackupId == nil {
1742		invalidParams.Add(request.NewErrParamRequired("BackupId"))
1743	}
1744	if s.DestinationRegion == nil {
1745		invalidParams.Add(request.NewErrParamRequired("DestinationRegion"))
1746	}
1747
1748	if invalidParams.Len() > 0 {
1749		return invalidParams
1750	}
1751	return nil
1752}
1753
1754// SetBackupId sets the BackupId field's value.
1755func (s *CopyBackupToRegionInput) SetBackupId(v string) *CopyBackupToRegionInput {
1756	s.BackupId = &v
1757	return s
1758}
1759
1760// SetDestinationRegion sets the DestinationRegion field's value.
1761func (s *CopyBackupToRegionInput) SetDestinationRegion(v string) *CopyBackupToRegionInput {
1762	s.DestinationRegion = &v
1763	return s
1764}
1765
1766type CopyBackupToRegionOutput struct {
1767	_ struct{} `type:"structure"`
1768
1769	// Information on the backup that will be copied to the destination region,
1770	// including CreateTimestamp, SourceBackup, SourceCluster, and Source Region.
1771	// CreateTimestamp of the destination backup will be the same as that of the
1772	// source backup.
1773	//
1774	// You will need to use the sourceBackupID returned in this operation to use
1775	// the DescribeBackups operation on the backup that will be copied to the destination
1776	// region.
1777	DestinationBackup *DestinationBackup `type:"structure"`
1778}
1779
1780// String returns the string representation
1781func (s CopyBackupToRegionOutput) String() string {
1782	return awsutil.Prettify(s)
1783}
1784
1785// GoString returns the string representation
1786func (s CopyBackupToRegionOutput) GoString() string {
1787	return s.String()
1788}
1789
1790// SetDestinationBackup sets the DestinationBackup field's value.
1791func (s *CopyBackupToRegionOutput) SetDestinationBackup(v *DestinationBackup) *CopyBackupToRegionOutput {
1792	s.DestinationBackup = v
1793	return s
1794}
1795
1796type CreateClusterInput struct {
1797	_ struct{} `type:"structure"`
1798
1799	// The type of HSM to use in the cluster. Currently the only allowed value is
1800	// hsm1.medium.
1801	//
1802	// HsmType is a required field
1803	HsmType *string `type:"string" required:"true"`
1804
1805	// The identifier (ID) of the cluster backup to restore. Use this value to restore
1806	// the cluster from a backup instead of creating a new cluster. To find the
1807	// backup ID, use DescribeBackups.
1808	SourceBackupId *string `type:"string"`
1809
1810	// The identifiers (IDs) of the subnets where you are creating the cluster.
1811	// You must specify at least one subnet. If you specify multiple subnets, they
1812	// must meet the following criteria:
1813	//
1814	//    * All subnets must be in the same virtual private cloud (VPC).
1815	//
1816	//    * You can specify only one subnet per Availability Zone.
1817	//
1818	// SubnetIds is a required field
1819	SubnetIds []*string `min:"1" type:"list" required:"true"`
1820}
1821
1822// String returns the string representation
1823func (s CreateClusterInput) String() string {
1824	return awsutil.Prettify(s)
1825}
1826
1827// GoString returns the string representation
1828func (s CreateClusterInput) GoString() string {
1829	return s.String()
1830}
1831
1832// Validate inspects the fields of the type to determine if they are valid.
1833func (s *CreateClusterInput) Validate() error {
1834	invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"}
1835	if s.HsmType == nil {
1836		invalidParams.Add(request.NewErrParamRequired("HsmType"))
1837	}
1838	if s.SubnetIds == nil {
1839		invalidParams.Add(request.NewErrParamRequired("SubnetIds"))
1840	}
1841	if s.SubnetIds != nil && len(s.SubnetIds) < 1 {
1842		invalidParams.Add(request.NewErrParamMinLen("SubnetIds", 1))
1843	}
1844
1845	if invalidParams.Len() > 0 {
1846		return invalidParams
1847	}
1848	return nil
1849}
1850
1851// SetHsmType sets the HsmType field's value.
1852func (s *CreateClusterInput) SetHsmType(v string) *CreateClusterInput {
1853	s.HsmType = &v
1854	return s
1855}
1856
1857// SetSourceBackupId sets the SourceBackupId field's value.
1858func (s *CreateClusterInput) SetSourceBackupId(v string) *CreateClusterInput {
1859	s.SourceBackupId = &v
1860	return s
1861}
1862
1863// SetSubnetIds sets the SubnetIds field's value.
1864func (s *CreateClusterInput) SetSubnetIds(v []*string) *CreateClusterInput {
1865	s.SubnetIds = v
1866	return s
1867}
1868
1869type CreateClusterOutput struct {
1870	_ struct{} `type:"structure"`
1871
1872	// Information about the cluster that was created.
1873	Cluster *Cluster `type:"structure"`
1874}
1875
1876// String returns the string representation
1877func (s CreateClusterOutput) String() string {
1878	return awsutil.Prettify(s)
1879}
1880
1881// GoString returns the string representation
1882func (s CreateClusterOutput) GoString() string {
1883	return s.String()
1884}
1885
1886// SetCluster sets the Cluster field's value.
1887func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput {
1888	s.Cluster = v
1889	return s
1890}
1891
1892type CreateHsmInput struct {
1893	_ struct{} `type:"structure"`
1894
1895	// The Availability Zone where you are creating the HSM. To find the cluster's
1896	// Availability Zones, use DescribeClusters.
1897	//
1898	// AvailabilityZone is a required field
1899	AvailabilityZone *string `type:"string" required:"true"`
1900
1901	// The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters.
1902	//
1903	// ClusterId is a required field
1904	ClusterId *string `type:"string" required:"true"`
1905
1906	// The HSM's IP address. If you specify an IP address, use an available address
1907	// from the subnet that maps to the Availability Zone where you are creating
1908	// the HSM. If you don't specify an IP address, one is chosen for you from that
1909	// subnet.
1910	IpAddress *string `type:"string"`
1911}
1912
1913// String returns the string representation
1914func (s CreateHsmInput) String() string {
1915	return awsutil.Prettify(s)
1916}
1917
1918// GoString returns the string representation
1919func (s CreateHsmInput) GoString() string {
1920	return s.String()
1921}
1922
1923// Validate inspects the fields of the type to determine if they are valid.
1924func (s *CreateHsmInput) Validate() error {
1925	invalidParams := request.ErrInvalidParams{Context: "CreateHsmInput"}
1926	if s.AvailabilityZone == nil {
1927		invalidParams.Add(request.NewErrParamRequired("AvailabilityZone"))
1928	}
1929	if s.ClusterId == nil {
1930		invalidParams.Add(request.NewErrParamRequired("ClusterId"))
1931	}
1932
1933	if invalidParams.Len() > 0 {
1934		return invalidParams
1935	}
1936	return nil
1937}
1938
1939// SetAvailabilityZone sets the AvailabilityZone field's value.
1940func (s *CreateHsmInput) SetAvailabilityZone(v string) *CreateHsmInput {
1941	s.AvailabilityZone = &v
1942	return s
1943}
1944
1945// SetClusterId sets the ClusterId field's value.
1946func (s *CreateHsmInput) SetClusterId(v string) *CreateHsmInput {
1947	s.ClusterId = &v
1948	return s
1949}
1950
1951// SetIpAddress sets the IpAddress field's value.
1952func (s *CreateHsmInput) SetIpAddress(v string) *CreateHsmInput {
1953	s.IpAddress = &v
1954	return s
1955}
1956
1957type CreateHsmOutput struct {
1958	_ struct{} `type:"structure"`
1959
1960	// Information about the HSM that was created.
1961	Hsm *Hsm `type:"structure"`
1962}
1963
1964// String returns the string representation
1965func (s CreateHsmOutput) String() string {
1966	return awsutil.Prettify(s)
1967}
1968
1969// GoString returns the string representation
1970func (s CreateHsmOutput) GoString() string {
1971	return s.String()
1972}
1973
1974// SetHsm sets the Hsm field's value.
1975func (s *CreateHsmOutput) SetHsm(v *Hsm) *CreateHsmOutput {
1976	s.Hsm = v
1977	return s
1978}
1979
1980type DeleteBackupInput struct {
1981	_ struct{} `type:"structure"`
1982
1983	// The ID of the backup to be deleted. To find the ID of a backup, use the DescribeBackups
1984	// operation.
1985	//
1986	// BackupId is a required field
1987	BackupId *string `type:"string" required:"true"`
1988}
1989
1990// String returns the string representation
1991func (s DeleteBackupInput) String() string {
1992	return awsutil.Prettify(s)
1993}
1994
1995// GoString returns the string representation
1996func (s DeleteBackupInput) GoString() string {
1997	return s.String()
1998}
1999
2000// Validate inspects the fields of the type to determine if they are valid.
2001func (s *DeleteBackupInput) Validate() error {
2002	invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"}
2003	if s.BackupId == nil {
2004		invalidParams.Add(request.NewErrParamRequired("BackupId"))
2005	}
2006
2007	if invalidParams.Len() > 0 {
2008		return invalidParams
2009	}
2010	return nil
2011}
2012
2013// SetBackupId sets the BackupId field's value.
2014func (s *DeleteBackupInput) SetBackupId(v string) *DeleteBackupInput {
2015	s.BackupId = &v
2016	return s
2017}
2018
2019type DeleteBackupOutput struct {
2020	_ struct{} `type:"structure"`
2021
2022	// Information on the Backup object deleted.
2023	Backup *Backup `type:"structure"`
2024}
2025
2026// String returns the string representation
2027func (s DeleteBackupOutput) String() string {
2028	return awsutil.Prettify(s)
2029}
2030
2031// GoString returns the string representation
2032func (s DeleteBackupOutput) GoString() string {
2033	return s.String()
2034}
2035
2036// SetBackup sets the Backup field's value.
2037func (s *DeleteBackupOutput) SetBackup(v *Backup) *DeleteBackupOutput {
2038	s.Backup = v
2039	return s
2040}
2041
2042type DeleteClusterInput struct {
2043	_ struct{} `type:"structure"`
2044
2045	// The identifier (ID) of the cluster that you are deleting. To find the cluster
2046	// ID, use DescribeClusters.
2047	//
2048	// ClusterId is a required field
2049	ClusterId *string `type:"string" required:"true"`
2050}
2051
2052// String returns the string representation
2053func (s DeleteClusterInput) String() string {
2054	return awsutil.Prettify(s)
2055}
2056
2057// GoString returns the string representation
2058func (s DeleteClusterInput) GoString() string {
2059	return s.String()
2060}
2061
2062// Validate inspects the fields of the type to determine if they are valid.
2063func (s *DeleteClusterInput) Validate() error {
2064	invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"}
2065	if s.ClusterId == nil {
2066		invalidParams.Add(request.NewErrParamRequired("ClusterId"))
2067	}
2068
2069	if invalidParams.Len() > 0 {
2070		return invalidParams
2071	}
2072	return nil
2073}
2074
2075// SetClusterId sets the ClusterId field's value.
2076func (s *DeleteClusterInput) SetClusterId(v string) *DeleteClusterInput {
2077	s.ClusterId = &v
2078	return s
2079}
2080
2081type DeleteClusterOutput struct {
2082	_ struct{} `type:"structure"`
2083
2084	// Information about the cluster that was deleted.
2085	Cluster *Cluster `type:"structure"`
2086}
2087
2088// String returns the string representation
2089func (s DeleteClusterOutput) String() string {
2090	return awsutil.Prettify(s)
2091}
2092
2093// GoString returns the string representation
2094func (s DeleteClusterOutput) GoString() string {
2095	return s.String()
2096}
2097
2098// SetCluster sets the Cluster field's value.
2099func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput {
2100	s.Cluster = v
2101	return s
2102}
2103
2104type DeleteHsmInput struct {
2105	_ struct{} `type:"structure"`
2106
2107	// The identifier (ID) of the cluster that contains the HSM that you are deleting.
2108	//
2109	// ClusterId is a required field
2110	ClusterId *string `type:"string" required:"true"`
2111
2112	// The identifier (ID) of the elastic network interface (ENI) of the HSM that
2113	// you are deleting.
2114	EniId *string `type:"string"`
2115
2116	// The IP address of the elastic network interface (ENI) of the HSM that you
2117	// are deleting.
2118	EniIp *string `type:"string"`
2119
2120	// The identifier (ID) of the HSM that you are deleting.
2121	HsmId *string `type:"string"`
2122}
2123
2124// String returns the string representation
2125func (s DeleteHsmInput) String() string {
2126	return awsutil.Prettify(s)
2127}
2128
2129// GoString returns the string representation
2130func (s DeleteHsmInput) GoString() string {
2131	return s.String()
2132}
2133
2134// Validate inspects the fields of the type to determine if they are valid.
2135func (s *DeleteHsmInput) Validate() error {
2136	invalidParams := request.ErrInvalidParams{Context: "DeleteHsmInput"}
2137	if s.ClusterId == nil {
2138		invalidParams.Add(request.NewErrParamRequired("ClusterId"))
2139	}
2140
2141	if invalidParams.Len() > 0 {
2142		return invalidParams
2143	}
2144	return nil
2145}
2146
2147// SetClusterId sets the ClusterId field's value.
2148func (s *DeleteHsmInput) SetClusterId(v string) *DeleteHsmInput {
2149	s.ClusterId = &v
2150	return s
2151}
2152
2153// SetEniId sets the EniId field's value.
2154func (s *DeleteHsmInput) SetEniId(v string) *DeleteHsmInput {
2155	s.EniId = &v
2156	return s
2157}
2158
2159// SetEniIp sets the EniIp field's value.
2160func (s *DeleteHsmInput) SetEniIp(v string) *DeleteHsmInput {
2161	s.EniIp = &v
2162	return s
2163}
2164
2165// SetHsmId sets the HsmId field's value.
2166func (s *DeleteHsmInput) SetHsmId(v string) *DeleteHsmInput {
2167	s.HsmId = &v
2168	return s
2169}
2170
2171type DeleteHsmOutput struct {
2172	_ struct{} `type:"structure"`
2173
2174	// The identifier (ID) of the HSM that was deleted.
2175	HsmId *string `type:"string"`
2176}
2177
2178// String returns the string representation
2179func (s DeleteHsmOutput) String() string {
2180	return awsutil.Prettify(s)
2181}
2182
2183// GoString returns the string representation
2184func (s DeleteHsmOutput) GoString() string {
2185	return s.String()
2186}
2187
2188// SetHsmId sets the HsmId field's value.
2189func (s *DeleteHsmOutput) SetHsmId(v string) *DeleteHsmOutput {
2190	s.HsmId = &v
2191	return s
2192}
2193
2194type DescribeBackupsInput struct {
2195	_ struct{} `type:"structure"`
2196
2197	// One or more filters to limit the items returned in the response.
2198	//
2199	// Use the backupIds filter to return only the specified backups. Specify backups
2200	// by their backup identifier (ID).
2201	//
2202	// Use the sourceBackupIds filter to return only the backups created from a
2203	// source backup. The sourceBackupID of a source backup is returned by the CopyBackupToRegion
2204	// operation.
2205	//
2206	// Use the clusterIds filter to return only the backups for the specified clusters.
2207	// Specify clusters by their cluster identifier (ID).
2208	//
2209	// Use the states filter to return only backups that match the specified state.
2210	Filters map[string][]*string `type:"map"`
2211
2212	// The maximum number of backups to return in the response. When there are more
2213	// backups than the number you specify, the response contains a NextToken value.
2214	MaxResults *int64 `min:"1" type:"integer"`
2215
2216	// The NextToken value that you received in the previous response. Use this
2217	// value to get more backups.
2218	NextToken *string `type:"string"`
2219
2220	SortAscending *bool `type:"boolean"`
2221}
2222
2223// String returns the string representation
2224func (s DescribeBackupsInput) String() string {
2225	return awsutil.Prettify(s)
2226}
2227
2228// GoString returns the string representation
2229func (s DescribeBackupsInput) GoString() string {
2230	return s.String()
2231}
2232
2233// Validate inspects the fields of the type to determine if they are valid.
2234func (s *DescribeBackupsInput) Validate() error {
2235	invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"}
2236	if s.MaxResults != nil && *s.MaxResults < 1 {
2237		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2238	}
2239
2240	if invalidParams.Len() > 0 {
2241		return invalidParams
2242	}
2243	return nil
2244}
2245
2246// SetFilters sets the Filters field's value.
2247func (s *DescribeBackupsInput) SetFilters(v map[string][]*string) *DescribeBackupsInput {
2248	s.Filters = v
2249	return s
2250}
2251
2252// SetMaxResults sets the MaxResults field's value.
2253func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput {
2254	s.MaxResults = &v
2255	return s
2256}
2257
2258// SetNextToken sets the NextToken field's value.
2259func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput {
2260	s.NextToken = &v
2261	return s
2262}
2263
2264// SetSortAscending sets the SortAscending field's value.
2265func (s *DescribeBackupsInput) SetSortAscending(v bool) *DescribeBackupsInput {
2266	s.SortAscending = &v
2267	return s
2268}
2269
2270type DescribeBackupsOutput struct {
2271	_ struct{} `type:"structure"`
2272
2273	// A list of backups.
2274	Backups []*Backup `type:"list"`
2275
2276	// An opaque string that indicates that the response contains only a subset
2277	// of backups. Use this value in a subsequent DescribeBackups request to get
2278	// more backups.
2279	NextToken *string `type:"string"`
2280}
2281
2282// String returns the string representation
2283func (s DescribeBackupsOutput) String() string {
2284	return awsutil.Prettify(s)
2285}
2286
2287// GoString returns the string representation
2288func (s DescribeBackupsOutput) GoString() string {
2289	return s.String()
2290}
2291
2292// SetBackups sets the Backups field's value.
2293func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput {
2294	s.Backups = v
2295	return s
2296}
2297
2298// SetNextToken sets the NextToken field's value.
2299func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput {
2300	s.NextToken = &v
2301	return s
2302}
2303
2304type DescribeClustersInput struct {
2305	_ struct{} `type:"structure"`
2306
2307	// One or more filters to limit the items returned in the response.
2308	//
2309	// Use the clusterIds filter to return only the specified clusters. Specify
2310	// clusters by their cluster identifier (ID).
2311	//
2312	// Use the vpcIds filter to return only the clusters in the specified virtual
2313	// private clouds (VPCs). Specify VPCs by their VPC identifier (ID).
2314	//
2315	// Use the states filter to return only clusters that match the specified state.
2316	Filters map[string][]*string `type:"map"`
2317
2318	// The maximum number of clusters to return in the response. When there are
2319	// more clusters than the number you specify, the response contains a NextToken
2320	// value.
2321	MaxResults *int64 `min:"1" type:"integer"`
2322
2323	// The NextToken value that you received in the previous response. Use this
2324	// value to get more clusters.
2325	NextToken *string `type:"string"`
2326}
2327
2328// String returns the string representation
2329func (s DescribeClustersInput) String() string {
2330	return awsutil.Prettify(s)
2331}
2332
2333// GoString returns the string representation
2334func (s DescribeClustersInput) GoString() string {
2335	return s.String()
2336}
2337
2338// Validate inspects the fields of the type to determine if they are valid.
2339func (s *DescribeClustersInput) Validate() error {
2340	invalidParams := request.ErrInvalidParams{Context: "DescribeClustersInput"}
2341	if s.MaxResults != nil && *s.MaxResults < 1 {
2342		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2343	}
2344
2345	if invalidParams.Len() > 0 {
2346		return invalidParams
2347	}
2348	return nil
2349}
2350
2351// SetFilters sets the Filters field's value.
2352func (s *DescribeClustersInput) SetFilters(v map[string][]*string) *DescribeClustersInput {
2353	s.Filters = v
2354	return s
2355}
2356
2357// SetMaxResults sets the MaxResults field's value.
2358func (s *DescribeClustersInput) SetMaxResults(v int64) *DescribeClustersInput {
2359	s.MaxResults = &v
2360	return s
2361}
2362
2363// SetNextToken sets the NextToken field's value.
2364func (s *DescribeClustersInput) SetNextToken(v string) *DescribeClustersInput {
2365	s.NextToken = &v
2366	return s
2367}
2368
2369type DescribeClustersOutput struct {
2370	_ struct{} `type:"structure"`
2371
2372	// A list of clusters.
2373	Clusters []*Cluster `type:"list"`
2374
2375	// An opaque string that indicates that the response contains only a subset
2376	// of clusters. Use this value in a subsequent DescribeClusters request to get
2377	// more clusters.
2378	NextToken *string `type:"string"`
2379}
2380
2381// String returns the string representation
2382func (s DescribeClustersOutput) String() string {
2383	return awsutil.Prettify(s)
2384}
2385
2386// GoString returns the string representation
2387func (s DescribeClustersOutput) GoString() string {
2388	return s.String()
2389}
2390
2391// SetClusters sets the Clusters field's value.
2392func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput {
2393	s.Clusters = v
2394	return s
2395}
2396
2397// SetNextToken sets the NextToken field's value.
2398func (s *DescribeClustersOutput) SetNextToken(v string) *DescribeClustersOutput {
2399	s.NextToken = &v
2400	return s
2401}
2402
2403type DestinationBackup struct {
2404	_ struct{} `type:"structure"`
2405
2406	CreateTimestamp *time.Time `type:"timestamp"`
2407
2408	SourceBackup *string `type:"string"`
2409
2410	SourceCluster *string `type:"string"`
2411
2412	SourceRegion *string `type:"string"`
2413}
2414
2415// String returns the string representation
2416func (s DestinationBackup) String() string {
2417	return awsutil.Prettify(s)
2418}
2419
2420// GoString returns the string representation
2421func (s DestinationBackup) GoString() string {
2422	return s.String()
2423}
2424
2425// SetCreateTimestamp sets the CreateTimestamp field's value.
2426func (s *DestinationBackup) SetCreateTimestamp(v time.Time) *DestinationBackup {
2427	s.CreateTimestamp = &v
2428	return s
2429}
2430
2431// SetSourceBackup sets the SourceBackup field's value.
2432func (s *DestinationBackup) SetSourceBackup(v string) *DestinationBackup {
2433	s.SourceBackup = &v
2434	return s
2435}
2436
2437// SetSourceCluster sets the SourceCluster field's value.
2438func (s *DestinationBackup) SetSourceCluster(v string) *DestinationBackup {
2439	s.SourceCluster = &v
2440	return s
2441}
2442
2443// SetSourceRegion sets the SourceRegion field's value.
2444func (s *DestinationBackup) SetSourceRegion(v string) *DestinationBackup {
2445	s.SourceRegion = &v
2446	return s
2447}
2448
2449// Contains information about a hardware security module (HSM) in an AWS CloudHSM
2450// cluster.
2451type Hsm struct {
2452	_ struct{} `type:"structure"`
2453
2454	// The Availability Zone that contains the HSM.
2455	AvailabilityZone *string `type:"string"`
2456
2457	// The identifier (ID) of the cluster that contains the HSM.
2458	ClusterId *string `type:"string"`
2459
2460	// The identifier (ID) of the HSM's elastic network interface (ENI).
2461	EniId *string `type:"string"`
2462
2463	// The IP address of the HSM's elastic network interface (ENI).
2464	EniIp *string `type:"string"`
2465
2466	// The HSM's identifier (ID).
2467	//
2468	// HsmId is a required field
2469	HsmId *string `type:"string" required:"true"`
2470
2471	// The HSM's state.
2472	State *string `type:"string" enum:"HsmState"`
2473
2474	// A description of the HSM's state.
2475	StateMessage *string `type:"string"`
2476
2477	// The subnet that contains the HSM's elastic network interface (ENI).
2478	SubnetId *string `type:"string"`
2479}
2480
2481// String returns the string representation
2482func (s Hsm) String() string {
2483	return awsutil.Prettify(s)
2484}
2485
2486// GoString returns the string representation
2487func (s Hsm) GoString() string {
2488	return s.String()
2489}
2490
2491// SetAvailabilityZone sets the AvailabilityZone field's value.
2492func (s *Hsm) SetAvailabilityZone(v string) *Hsm {
2493	s.AvailabilityZone = &v
2494	return s
2495}
2496
2497// SetClusterId sets the ClusterId field's value.
2498func (s *Hsm) SetClusterId(v string) *Hsm {
2499	s.ClusterId = &v
2500	return s
2501}
2502
2503// SetEniId sets the EniId field's value.
2504func (s *Hsm) SetEniId(v string) *Hsm {
2505	s.EniId = &v
2506	return s
2507}
2508
2509// SetEniIp sets the EniIp field's value.
2510func (s *Hsm) SetEniIp(v string) *Hsm {
2511	s.EniIp = &v
2512	return s
2513}
2514
2515// SetHsmId sets the HsmId field's value.
2516func (s *Hsm) SetHsmId(v string) *Hsm {
2517	s.HsmId = &v
2518	return s
2519}
2520
2521// SetState sets the State field's value.
2522func (s *Hsm) SetState(v string) *Hsm {
2523	s.State = &v
2524	return s
2525}
2526
2527// SetStateMessage sets the StateMessage field's value.
2528func (s *Hsm) SetStateMessage(v string) *Hsm {
2529	s.StateMessage = &v
2530	return s
2531}
2532
2533// SetSubnetId sets the SubnetId field's value.
2534func (s *Hsm) SetSubnetId(v string) *Hsm {
2535	s.SubnetId = &v
2536	return s
2537}
2538
2539type InitializeClusterInput struct {
2540	_ struct{} `type:"structure"`
2541
2542	// The identifier (ID) of the cluster that you are claiming. To find the cluster
2543	// ID, use DescribeClusters.
2544	//
2545	// ClusterId is a required field
2546	ClusterId *string `type:"string" required:"true"`
2547
2548	// The cluster certificate issued (signed) by your issuing certificate authority
2549	// (CA). The certificate must be in PEM format and can contain a maximum of
2550	// 5000 characters.
2551	//
2552	// SignedCert is a required field
2553	SignedCert *string `type:"string" required:"true"`
2554
2555	// The issuing certificate of the issuing certificate authority (CA) that issued
2556	// (signed) the cluster certificate. This can be a root (self-signed) certificate
2557	// or a certificate chain that begins with the certificate that issued the cluster
2558	// certificate and ends with a root certificate. The certificate or certificate
2559	// chain must be in PEM format and can contain a maximum of 5000 characters.
2560	//
2561	// TrustAnchor is a required field
2562	TrustAnchor *string `type:"string" required:"true"`
2563}
2564
2565// String returns the string representation
2566func (s InitializeClusterInput) String() string {
2567	return awsutil.Prettify(s)
2568}
2569
2570// GoString returns the string representation
2571func (s InitializeClusterInput) GoString() string {
2572	return s.String()
2573}
2574
2575// Validate inspects the fields of the type to determine if they are valid.
2576func (s *InitializeClusterInput) Validate() error {
2577	invalidParams := request.ErrInvalidParams{Context: "InitializeClusterInput"}
2578	if s.ClusterId == nil {
2579		invalidParams.Add(request.NewErrParamRequired("ClusterId"))
2580	}
2581	if s.SignedCert == nil {
2582		invalidParams.Add(request.NewErrParamRequired("SignedCert"))
2583	}
2584	if s.TrustAnchor == nil {
2585		invalidParams.Add(request.NewErrParamRequired("TrustAnchor"))
2586	}
2587
2588	if invalidParams.Len() > 0 {
2589		return invalidParams
2590	}
2591	return nil
2592}
2593
2594// SetClusterId sets the ClusterId field's value.
2595func (s *InitializeClusterInput) SetClusterId(v string) *InitializeClusterInput {
2596	s.ClusterId = &v
2597	return s
2598}
2599
2600// SetSignedCert sets the SignedCert field's value.
2601func (s *InitializeClusterInput) SetSignedCert(v string) *InitializeClusterInput {
2602	s.SignedCert = &v
2603	return s
2604}
2605
2606// SetTrustAnchor sets the TrustAnchor field's value.
2607func (s *InitializeClusterInput) SetTrustAnchor(v string) *InitializeClusterInput {
2608	s.TrustAnchor = &v
2609	return s
2610}
2611
2612type InitializeClusterOutput struct {
2613	_ struct{} `type:"structure"`
2614
2615	// The cluster's state.
2616	State *string `type:"string" enum:"ClusterState"`
2617
2618	// A description of the cluster's state.
2619	StateMessage *string `type:"string"`
2620}
2621
2622// String returns the string representation
2623func (s InitializeClusterOutput) String() string {
2624	return awsutil.Prettify(s)
2625}
2626
2627// GoString returns the string representation
2628func (s InitializeClusterOutput) GoString() string {
2629	return s.String()
2630}
2631
2632// SetState sets the State field's value.
2633func (s *InitializeClusterOutput) SetState(v string) *InitializeClusterOutput {
2634	s.State = &v
2635	return s
2636}
2637
2638// SetStateMessage sets the StateMessage field's value.
2639func (s *InitializeClusterOutput) SetStateMessage(v string) *InitializeClusterOutput {
2640	s.StateMessage = &v
2641	return s
2642}
2643
2644type ListTagsInput struct {
2645	_ struct{} `type:"structure"`
2646
2647	// The maximum number of tags to return in the response. When there are more
2648	// tags than the number you specify, the response contains a NextToken value.
2649	MaxResults *int64 `min:"1" type:"integer"`
2650
2651	// The NextToken value that you received in the previous response. Use this
2652	// value to get more tags.
2653	NextToken *string `type:"string"`
2654
2655	// The cluster identifier (ID) for the cluster whose tags you are getting. To
2656	// find the cluster ID, use DescribeClusters.
2657	//
2658	// ResourceId is a required field
2659	ResourceId *string `type:"string" required:"true"`
2660}
2661
2662// String returns the string representation
2663func (s ListTagsInput) String() string {
2664	return awsutil.Prettify(s)
2665}
2666
2667// GoString returns the string representation
2668func (s ListTagsInput) GoString() string {
2669	return s.String()
2670}
2671
2672// Validate inspects the fields of the type to determine if they are valid.
2673func (s *ListTagsInput) Validate() error {
2674	invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
2675	if s.MaxResults != nil && *s.MaxResults < 1 {
2676		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2677	}
2678	if s.ResourceId == nil {
2679		invalidParams.Add(request.NewErrParamRequired("ResourceId"))
2680	}
2681
2682	if invalidParams.Len() > 0 {
2683		return invalidParams
2684	}
2685	return nil
2686}
2687
2688// SetMaxResults sets the MaxResults field's value.
2689func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput {
2690	s.MaxResults = &v
2691	return s
2692}
2693
2694// SetNextToken sets the NextToken field's value.
2695func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
2696	s.NextToken = &v
2697	return s
2698}
2699
2700// SetResourceId sets the ResourceId field's value.
2701func (s *ListTagsInput) SetResourceId(v string) *ListTagsInput {
2702	s.ResourceId = &v
2703	return s
2704}
2705
2706type ListTagsOutput struct {
2707	_ struct{} `type:"structure"`
2708
2709	// An opaque string that indicates that the response contains only a subset
2710	// of tags. Use this value in a subsequent ListTags request to get more tags.
2711	NextToken *string `type:"string"`
2712
2713	// A list of tags.
2714	//
2715	// TagList is a required field
2716	TagList []*Tag `min:"1" type:"list" required:"true"`
2717}
2718
2719// String returns the string representation
2720func (s ListTagsOutput) String() string {
2721	return awsutil.Prettify(s)
2722}
2723
2724// GoString returns the string representation
2725func (s ListTagsOutput) GoString() string {
2726	return s.String()
2727}
2728
2729// SetNextToken sets the NextToken field's value.
2730func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
2731	s.NextToken = &v
2732	return s
2733}
2734
2735// SetTagList sets the TagList field's value.
2736func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput {
2737	s.TagList = v
2738	return s
2739}
2740
2741type RestoreBackupInput struct {
2742	_ struct{} `type:"structure"`
2743
2744	// The ID of the backup to be restored. To find the ID of a backup, use the
2745	// DescribeBackups operation.
2746	//
2747	// BackupId is a required field
2748	BackupId *string `type:"string" required:"true"`
2749}
2750
2751// String returns the string representation
2752func (s RestoreBackupInput) String() string {
2753	return awsutil.Prettify(s)
2754}
2755
2756// GoString returns the string representation
2757func (s RestoreBackupInput) GoString() string {
2758	return s.String()
2759}
2760
2761// Validate inspects the fields of the type to determine if they are valid.
2762func (s *RestoreBackupInput) Validate() error {
2763	invalidParams := request.ErrInvalidParams{Context: "RestoreBackupInput"}
2764	if s.BackupId == nil {
2765		invalidParams.Add(request.NewErrParamRequired("BackupId"))
2766	}
2767
2768	if invalidParams.Len() > 0 {
2769		return invalidParams
2770	}
2771	return nil
2772}
2773
2774// SetBackupId sets the BackupId field's value.
2775func (s *RestoreBackupInput) SetBackupId(v string) *RestoreBackupInput {
2776	s.BackupId = &v
2777	return s
2778}
2779
2780type RestoreBackupOutput struct {
2781	_ struct{} `type:"structure"`
2782
2783	// Information on the Backup object created.
2784	Backup *Backup `type:"structure"`
2785}
2786
2787// String returns the string representation
2788func (s RestoreBackupOutput) String() string {
2789	return awsutil.Prettify(s)
2790}
2791
2792// GoString returns the string representation
2793func (s RestoreBackupOutput) GoString() string {
2794	return s.String()
2795}
2796
2797// SetBackup sets the Backup field's value.
2798func (s *RestoreBackupOutput) SetBackup(v *Backup) *RestoreBackupOutput {
2799	s.Backup = v
2800	return s
2801}
2802
2803// Contains a tag. A tag is a key-value pair.
2804type Tag struct {
2805	_ struct{} `type:"structure"`
2806
2807	// The key of the tag.
2808	//
2809	// Key is a required field
2810	Key *string `min:"1" type:"string" required:"true"`
2811
2812	// The value of the tag.
2813	//
2814	// Value is a required field
2815	Value *string `type:"string" required:"true"`
2816}
2817
2818// String returns the string representation
2819func (s Tag) String() string {
2820	return awsutil.Prettify(s)
2821}
2822
2823// GoString returns the string representation
2824func (s Tag) GoString() string {
2825	return s.String()
2826}
2827
2828// Validate inspects the fields of the type to determine if they are valid.
2829func (s *Tag) Validate() error {
2830	invalidParams := request.ErrInvalidParams{Context: "Tag"}
2831	if s.Key == nil {
2832		invalidParams.Add(request.NewErrParamRequired("Key"))
2833	}
2834	if s.Key != nil && len(*s.Key) < 1 {
2835		invalidParams.Add(request.NewErrParamMinLen("Key", 1))
2836	}
2837	if s.Value == nil {
2838		invalidParams.Add(request.NewErrParamRequired("Value"))
2839	}
2840
2841	if invalidParams.Len() > 0 {
2842		return invalidParams
2843	}
2844	return nil
2845}
2846
2847// SetKey sets the Key field's value.
2848func (s *Tag) SetKey(v string) *Tag {
2849	s.Key = &v
2850	return s
2851}
2852
2853// SetValue sets the Value field's value.
2854func (s *Tag) SetValue(v string) *Tag {
2855	s.Value = &v
2856	return s
2857}
2858
2859type TagResourceInput struct {
2860	_ struct{} `type:"structure"`
2861
2862	// The cluster identifier (ID) for the cluster that you are tagging. To find
2863	// the cluster ID, use DescribeClusters.
2864	//
2865	// ResourceId is a required field
2866	ResourceId *string `type:"string" required:"true"`
2867
2868	// A list of one or more tags.
2869	//
2870	// TagList is a required field
2871	TagList []*Tag `min:"1" type:"list" required:"true"`
2872}
2873
2874// String returns the string representation
2875func (s TagResourceInput) String() string {
2876	return awsutil.Prettify(s)
2877}
2878
2879// GoString returns the string representation
2880func (s TagResourceInput) GoString() string {
2881	return s.String()
2882}
2883
2884// Validate inspects the fields of the type to determine if they are valid.
2885func (s *TagResourceInput) Validate() error {
2886	invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
2887	if s.ResourceId == nil {
2888		invalidParams.Add(request.NewErrParamRequired("ResourceId"))
2889	}
2890	if s.TagList == nil {
2891		invalidParams.Add(request.NewErrParamRequired("TagList"))
2892	}
2893	if s.TagList != nil && len(s.TagList) < 1 {
2894		invalidParams.Add(request.NewErrParamMinLen("TagList", 1))
2895	}
2896	if s.TagList != nil {
2897		for i, v := range s.TagList {
2898			if v == nil {
2899				continue
2900			}
2901			if err := v.Validate(); err != nil {
2902				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams))
2903			}
2904		}
2905	}
2906
2907	if invalidParams.Len() > 0 {
2908		return invalidParams
2909	}
2910	return nil
2911}
2912
2913// SetResourceId sets the ResourceId field's value.
2914func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput {
2915	s.ResourceId = &v
2916	return s
2917}
2918
2919// SetTagList sets the TagList field's value.
2920func (s *TagResourceInput) SetTagList(v []*Tag) *TagResourceInput {
2921	s.TagList = v
2922	return s
2923}
2924
2925type TagResourceOutput struct {
2926	_ struct{} `type:"structure"`
2927}
2928
2929// String returns the string representation
2930func (s TagResourceOutput) String() string {
2931	return awsutil.Prettify(s)
2932}
2933
2934// GoString returns the string representation
2935func (s TagResourceOutput) GoString() string {
2936	return s.String()
2937}
2938
2939type UntagResourceInput struct {
2940	_ struct{} `type:"structure"`
2941
2942	// The cluster identifier (ID) for the cluster whose tags you are removing.
2943	// To find the cluster ID, use DescribeClusters.
2944	//
2945	// ResourceId is a required field
2946	ResourceId *string `type:"string" required:"true"`
2947
2948	// A list of one or more tag keys for the tags that you are removing. Specify
2949	// only the tag keys, not the tag values.
2950	//
2951	// TagKeyList is a required field
2952	TagKeyList []*string `min:"1" type:"list" required:"true"`
2953}
2954
2955// String returns the string representation
2956func (s UntagResourceInput) String() string {
2957	return awsutil.Prettify(s)
2958}
2959
2960// GoString returns the string representation
2961func (s UntagResourceInput) GoString() string {
2962	return s.String()
2963}
2964
2965// Validate inspects the fields of the type to determine if they are valid.
2966func (s *UntagResourceInput) Validate() error {
2967	invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
2968	if s.ResourceId == nil {
2969		invalidParams.Add(request.NewErrParamRequired("ResourceId"))
2970	}
2971	if s.TagKeyList == nil {
2972		invalidParams.Add(request.NewErrParamRequired("TagKeyList"))
2973	}
2974	if s.TagKeyList != nil && len(s.TagKeyList) < 1 {
2975		invalidParams.Add(request.NewErrParamMinLen("TagKeyList", 1))
2976	}
2977
2978	if invalidParams.Len() > 0 {
2979		return invalidParams
2980	}
2981	return nil
2982}
2983
2984// SetResourceId sets the ResourceId field's value.
2985func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput {
2986	s.ResourceId = &v
2987	return s
2988}
2989
2990// SetTagKeyList sets the TagKeyList field's value.
2991func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput {
2992	s.TagKeyList = v
2993	return s
2994}
2995
2996type UntagResourceOutput struct {
2997	_ struct{} `type:"structure"`
2998}
2999
3000// String returns the string representation
3001func (s UntagResourceOutput) String() string {
3002	return awsutil.Prettify(s)
3003}
3004
3005// GoString returns the string representation
3006func (s UntagResourceOutput) GoString() string {
3007	return s.String()
3008}
3009
3010const (
3011	// BackupPolicyDefault is a BackupPolicy enum value
3012	BackupPolicyDefault = "DEFAULT"
3013)
3014
3015const (
3016	// BackupStateCreateInProgress is a BackupState enum value
3017	BackupStateCreateInProgress = "CREATE_IN_PROGRESS"
3018
3019	// BackupStateReady is a BackupState enum value
3020	BackupStateReady = "READY"
3021
3022	// BackupStateDeleted is a BackupState enum value
3023	BackupStateDeleted = "DELETED"
3024
3025	// BackupStatePendingDeletion is a BackupState enum value
3026	BackupStatePendingDeletion = "PENDING_DELETION"
3027)
3028
3029const (
3030	// ClusterStateCreateInProgress is a ClusterState enum value
3031	ClusterStateCreateInProgress = "CREATE_IN_PROGRESS"
3032
3033	// ClusterStateUninitialized is a ClusterState enum value
3034	ClusterStateUninitialized = "UNINITIALIZED"
3035
3036	// ClusterStateInitializeInProgress is a ClusterState enum value
3037	ClusterStateInitializeInProgress = "INITIALIZE_IN_PROGRESS"
3038
3039	// ClusterStateInitialized is a ClusterState enum value
3040	ClusterStateInitialized = "INITIALIZED"
3041
3042	// ClusterStateActive is a ClusterState enum value
3043	ClusterStateActive = "ACTIVE"
3044
3045	// ClusterStateUpdateInProgress is a ClusterState enum value
3046	ClusterStateUpdateInProgress = "UPDATE_IN_PROGRESS"
3047
3048	// ClusterStateDeleteInProgress is a ClusterState enum value
3049	ClusterStateDeleteInProgress = "DELETE_IN_PROGRESS"
3050
3051	// ClusterStateDeleted is a ClusterState enum value
3052	ClusterStateDeleted = "DELETED"
3053
3054	// ClusterStateDegraded is a ClusterState enum value
3055	ClusterStateDegraded = "DEGRADED"
3056)
3057
3058const (
3059	// HsmStateCreateInProgress is a HsmState enum value
3060	HsmStateCreateInProgress = "CREATE_IN_PROGRESS"
3061
3062	// HsmStateActive is a HsmState enum value
3063	HsmStateActive = "ACTIVE"
3064
3065	// HsmStateDegraded is a HsmState enum value
3066	HsmStateDegraded = "DEGRADED"
3067
3068	// HsmStateDeleteInProgress is a HsmState enum value
3069	HsmStateDeleteInProgress = "DELETE_IN_PROGRESS"
3070
3071	// HsmStateDeleted is a HsmState enum value
3072	HsmStateDeleted = "DELETED"
3073)
3074