github.com/aavshr/aws-sdk-go@v1.41.3/service/cloudhsmv2/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package cloudhsmv2 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc" 14 ) 15 16 const 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 42 func (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 Types: 70 // * CloudHsmAccessDeniedException 71 // The request was rejected because the requester does not have permission to 72 // perform the requested operation. 73 // 74 // * CloudHsmInternalFailureException 75 // The request was rejected because of an AWS CloudHSM internal failure. The 76 // request can be retried. 77 // 78 // * CloudHsmInvalidRequestException 79 // The request was rejected because it is not a valid request. 80 // 81 // * CloudHsmResourceNotFoundException 82 // The request was rejected because it refers to a resource that cannot be found. 83 // 84 // * CloudHsmServiceException 85 // The request was rejected because an error occurred. 86 // 87 // * CloudHsmTagException 88 // The request was rejected because of a tagging failure. Verify the tag conditions 89 // in all applicable policies, and then retry the request. 90 // 91 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion 92 func (c *CloudHSMV2) CopyBackupToRegion(input *CopyBackupToRegionInput) (*CopyBackupToRegionOutput, error) { 93 req, out := c.CopyBackupToRegionRequest(input) 94 return out, req.Send() 95 } 96 97 // CopyBackupToRegionWithContext is the same as CopyBackupToRegion with the addition of 98 // the ability to pass a context and additional request options. 99 // 100 // See CopyBackupToRegion for details on how to use this API operation. 101 // 102 // The context must be non-nil and will be used for request cancellation. If 103 // the context is nil a panic will occur. In the future the SDK may create 104 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 105 // for more information on using Contexts. 106 func (c *CloudHSMV2) CopyBackupToRegionWithContext(ctx aws.Context, input *CopyBackupToRegionInput, opts ...request.Option) (*CopyBackupToRegionOutput, error) { 107 req, out := c.CopyBackupToRegionRequest(input) 108 req.SetContext(ctx) 109 req.ApplyOptions(opts...) 110 return out, req.Send() 111 } 112 113 const opCreateCluster = "CreateCluster" 114 115 // CreateClusterRequest generates a "aws/request.Request" representing the 116 // client's request for the CreateCluster operation. The "output" return 117 // value will be populated with the request's response once the request completes 118 // successfully. 119 // 120 // Use "Send" method on the returned Request to send the API call to the service. 121 // the "output" return value is not valid until after Send returns without error. 122 // 123 // See CreateCluster for more information on using the CreateCluster 124 // API call, and error handling. 125 // 126 // This method is useful when you want to inject custom logic or configuration 127 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 128 // 129 // 130 // // Example sending a request using the CreateClusterRequest method. 131 // req, resp := client.CreateClusterRequest(params) 132 // 133 // err := req.Send() 134 // if err == nil { // resp is now filled 135 // fmt.Println(resp) 136 // } 137 // 138 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster 139 func (c *CloudHSMV2) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { 140 op := &request.Operation{ 141 Name: opCreateCluster, 142 HTTPMethod: "POST", 143 HTTPPath: "/", 144 } 145 146 if input == nil { 147 input = &CreateClusterInput{} 148 } 149 150 output = &CreateClusterOutput{} 151 req = c.newRequest(op, input, output) 152 return 153 } 154 155 // CreateCluster API operation for AWS CloudHSM V2. 156 // 157 // Creates a new AWS CloudHSM cluster. 158 // 159 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 160 // with awserr.Error's Code and Message methods to get detailed information about 161 // the error. 162 // 163 // See the AWS API reference guide for AWS CloudHSM V2's 164 // API operation CreateCluster for usage and error information. 165 // 166 // Returned Error Types: 167 // * CloudHsmAccessDeniedException 168 // The request was rejected because the requester does not have permission to 169 // perform the requested operation. 170 // 171 // * CloudHsmInternalFailureException 172 // The request was rejected because of an AWS CloudHSM internal failure. The 173 // request can be retried. 174 // 175 // * CloudHsmInvalidRequestException 176 // The request was rejected because it is not a valid request. 177 // 178 // * CloudHsmResourceNotFoundException 179 // The request was rejected because it refers to a resource that cannot be found. 180 // 181 // * CloudHsmServiceException 182 // The request was rejected because an error occurred. 183 // 184 // * CloudHsmTagException 185 // The request was rejected because of a tagging failure. Verify the tag conditions 186 // in all applicable policies, and then retry the request. 187 // 188 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster 189 func (c *CloudHSMV2) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { 190 req, out := c.CreateClusterRequest(input) 191 return out, req.Send() 192 } 193 194 // CreateClusterWithContext is the same as CreateCluster with the addition of 195 // the ability to pass a context and additional request options. 196 // 197 // See CreateCluster for details on how to use this API operation. 198 // 199 // The context must be non-nil and will be used for request cancellation. If 200 // the context is nil a panic will occur. In the future the SDK may create 201 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 202 // for more information on using Contexts. 203 func (c *CloudHSMV2) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { 204 req, out := c.CreateClusterRequest(input) 205 req.SetContext(ctx) 206 req.ApplyOptions(opts...) 207 return out, req.Send() 208 } 209 210 const opCreateHsm = "CreateHsm" 211 212 // CreateHsmRequest generates a "aws/request.Request" representing the 213 // client's request for the CreateHsm operation. The "output" return 214 // value will be populated with the request's response once the request completes 215 // successfully. 216 // 217 // Use "Send" method on the returned Request to send the API call to the service. 218 // the "output" return value is not valid until after Send returns without error. 219 // 220 // See CreateHsm for more information on using the CreateHsm 221 // API call, and error handling. 222 // 223 // This method is useful when you want to inject custom logic or configuration 224 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 225 // 226 // 227 // // Example sending a request using the CreateHsmRequest method. 228 // req, resp := client.CreateHsmRequest(params) 229 // 230 // err := req.Send() 231 // if err == nil { // resp is now filled 232 // fmt.Println(resp) 233 // } 234 // 235 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm 236 func (c *CloudHSMV2) CreateHsmRequest(input *CreateHsmInput) (req *request.Request, output *CreateHsmOutput) { 237 op := &request.Operation{ 238 Name: opCreateHsm, 239 HTTPMethod: "POST", 240 HTTPPath: "/", 241 } 242 243 if input == nil { 244 input = &CreateHsmInput{} 245 } 246 247 output = &CreateHsmOutput{} 248 req = c.newRequest(op, input, output) 249 return 250 } 251 252 // CreateHsm API operation for AWS CloudHSM V2. 253 // 254 // Creates a new hardware security module (HSM) in the specified AWS CloudHSM 255 // cluster. 256 // 257 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 258 // with awserr.Error's Code and Message methods to get detailed information about 259 // the error. 260 // 261 // See the AWS API reference guide for AWS CloudHSM V2's 262 // API operation CreateHsm for usage and error information. 263 // 264 // Returned Error Types: 265 // * CloudHsmInternalFailureException 266 // The request was rejected because of an AWS CloudHSM internal failure. The 267 // request can be retried. 268 // 269 // * CloudHsmServiceException 270 // The request was rejected because an error occurred. 271 // 272 // * CloudHsmInvalidRequestException 273 // The request was rejected because it is not a valid request. 274 // 275 // * CloudHsmResourceNotFoundException 276 // The request was rejected because it refers to a resource that cannot be found. 277 // 278 // * CloudHsmAccessDeniedException 279 // The request was rejected because the requester does not have permission to 280 // perform the requested operation. 281 // 282 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm 283 func (c *CloudHSMV2) CreateHsm(input *CreateHsmInput) (*CreateHsmOutput, error) { 284 req, out := c.CreateHsmRequest(input) 285 return out, req.Send() 286 } 287 288 // CreateHsmWithContext is the same as CreateHsm with the addition of 289 // the ability to pass a context and additional request options. 290 // 291 // See CreateHsm for details on how to use this API operation. 292 // 293 // The context must be non-nil and will be used for request cancellation. If 294 // the context is nil a panic will occur. In the future the SDK may create 295 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 296 // for more information on using Contexts. 297 func (c *CloudHSMV2) CreateHsmWithContext(ctx aws.Context, input *CreateHsmInput, opts ...request.Option) (*CreateHsmOutput, error) { 298 req, out := c.CreateHsmRequest(input) 299 req.SetContext(ctx) 300 req.ApplyOptions(opts...) 301 return out, req.Send() 302 } 303 304 const opDeleteBackup = "DeleteBackup" 305 306 // DeleteBackupRequest generates a "aws/request.Request" representing the 307 // client's request for the DeleteBackup operation. The "output" return 308 // value will be populated with the request's response once the request completes 309 // successfully. 310 // 311 // Use "Send" method on the returned Request to send the API call to the service. 312 // the "output" return value is not valid until after Send returns without error. 313 // 314 // See DeleteBackup for more information on using the DeleteBackup 315 // API call, and error handling. 316 // 317 // This method is useful when you want to inject custom logic or configuration 318 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 319 // 320 // 321 // // Example sending a request using the DeleteBackupRequest method. 322 // req, resp := client.DeleteBackupRequest(params) 323 // 324 // err := req.Send() 325 // if err == nil { // resp is now filled 326 // fmt.Println(resp) 327 // } 328 // 329 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup 330 func (c *CloudHSMV2) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) { 331 op := &request.Operation{ 332 Name: opDeleteBackup, 333 HTTPMethod: "POST", 334 HTTPPath: "/", 335 } 336 337 if input == nil { 338 input = &DeleteBackupInput{} 339 } 340 341 output = &DeleteBackupOutput{} 342 req = c.newRequest(op, input, output) 343 return 344 } 345 346 // DeleteBackup API operation for AWS CloudHSM V2. 347 // 348 // Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7 349 // days after the DeleteBackup request is made. For more information on restoring 350 // a backup, see RestoreBackup. 351 // 352 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 353 // with awserr.Error's Code and Message methods to get detailed information about 354 // the error. 355 // 356 // See the AWS API reference guide for AWS CloudHSM V2's 357 // API operation DeleteBackup for usage and error information. 358 // 359 // Returned Error Types: 360 // * CloudHsmAccessDeniedException 361 // The request was rejected because the requester does not have permission to 362 // perform the requested operation. 363 // 364 // * CloudHsmInternalFailureException 365 // The request was rejected because of an AWS CloudHSM internal failure. The 366 // request can be retried. 367 // 368 // * CloudHsmInvalidRequestException 369 // The request was rejected because it is not a valid request. 370 // 371 // * CloudHsmResourceNotFoundException 372 // The request was rejected because it refers to a resource that cannot be found. 373 // 374 // * CloudHsmServiceException 375 // The request was rejected because an error occurred. 376 // 377 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup 378 func (c *CloudHSMV2) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) { 379 req, out := c.DeleteBackupRequest(input) 380 return out, req.Send() 381 } 382 383 // DeleteBackupWithContext is the same as DeleteBackup with the addition of 384 // the ability to pass a context and additional request options. 385 // 386 // See DeleteBackup for details on how to use this API operation. 387 // 388 // The context must be non-nil and will be used for request cancellation. If 389 // the context is nil a panic will occur. In the future the SDK may create 390 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 391 // for more information on using Contexts. 392 func (c *CloudHSMV2) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) { 393 req, out := c.DeleteBackupRequest(input) 394 req.SetContext(ctx) 395 req.ApplyOptions(opts...) 396 return out, req.Send() 397 } 398 399 const opDeleteCluster = "DeleteCluster" 400 401 // DeleteClusterRequest generates a "aws/request.Request" representing the 402 // client's request for the DeleteCluster operation. The "output" return 403 // value will be populated with the request's response once the request completes 404 // successfully. 405 // 406 // Use "Send" method on the returned Request to send the API call to the service. 407 // the "output" return value is not valid until after Send returns without error. 408 // 409 // See DeleteCluster for more information on using the DeleteCluster 410 // API call, and error handling. 411 // 412 // This method is useful when you want to inject custom logic or configuration 413 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 414 // 415 // 416 // // Example sending a request using the DeleteClusterRequest method. 417 // req, resp := client.DeleteClusterRequest(params) 418 // 419 // err := req.Send() 420 // if err == nil { // resp is now filled 421 // fmt.Println(resp) 422 // } 423 // 424 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster 425 func (c *CloudHSMV2) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { 426 op := &request.Operation{ 427 Name: opDeleteCluster, 428 HTTPMethod: "POST", 429 HTTPPath: "/", 430 } 431 432 if input == nil { 433 input = &DeleteClusterInput{} 434 } 435 436 output = &DeleteClusterOutput{} 437 req = c.newRequest(op, input, output) 438 return 439 } 440 441 // DeleteCluster API operation for AWS CloudHSM V2. 442 // 443 // Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, 444 // you must delete all HSMs in the cluster. To see if the cluster contains any 445 // HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm. 446 // 447 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 448 // with awserr.Error's Code and Message methods to get detailed information about 449 // the error. 450 // 451 // See the AWS API reference guide for AWS CloudHSM V2's 452 // API operation DeleteCluster for usage and error information. 453 // 454 // Returned Error Types: 455 // * CloudHsmAccessDeniedException 456 // The request was rejected because the requester does not have permission to 457 // perform the requested operation. 458 // 459 // * CloudHsmInternalFailureException 460 // The request was rejected because of an AWS CloudHSM internal failure. The 461 // request can be retried. 462 // 463 // * CloudHsmInvalidRequestException 464 // The request was rejected because it is not a valid request. 465 // 466 // * CloudHsmResourceNotFoundException 467 // The request was rejected because it refers to a resource that cannot be found. 468 // 469 // * CloudHsmServiceException 470 // The request was rejected because an error occurred. 471 // 472 // * CloudHsmTagException 473 // The request was rejected because of a tagging failure. Verify the tag conditions 474 // in all applicable policies, and then retry the request. 475 // 476 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster 477 func (c *CloudHSMV2) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { 478 req, out := c.DeleteClusterRequest(input) 479 return out, req.Send() 480 } 481 482 // DeleteClusterWithContext is the same as DeleteCluster with the addition of 483 // the ability to pass a context and additional request options. 484 // 485 // See DeleteCluster for details on how to use this API operation. 486 // 487 // The context must be non-nil and will be used for request cancellation. If 488 // the context is nil a panic will occur. In the future the SDK may create 489 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 490 // for more information on using Contexts. 491 func (c *CloudHSMV2) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { 492 req, out := c.DeleteClusterRequest(input) 493 req.SetContext(ctx) 494 req.ApplyOptions(opts...) 495 return out, req.Send() 496 } 497 498 const opDeleteHsm = "DeleteHsm" 499 500 // DeleteHsmRequest generates a "aws/request.Request" representing the 501 // client's request for the DeleteHsm operation. The "output" return 502 // value will be populated with the request's response once the request completes 503 // successfully. 504 // 505 // Use "Send" method on the returned Request to send the API call to the service. 506 // the "output" return value is not valid until after Send returns without error. 507 // 508 // See DeleteHsm for more information on using the DeleteHsm 509 // API call, and error handling. 510 // 511 // This method is useful when you want to inject custom logic or configuration 512 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 513 // 514 // 515 // // Example sending a request using the DeleteHsmRequest method. 516 // req, resp := client.DeleteHsmRequest(params) 517 // 518 // err := req.Send() 519 // if err == nil { // resp is now filled 520 // fmt.Println(resp) 521 // } 522 // 523 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm 524 func (c *CloudHSMV2) DeleteHsmRequest(input *DeleteHsmInput) (req *request.Request, output *DeleteHsmOutput) { 525 op := &request.Operation{ 526 Name: opDeleteHsm, 527 HTTPMethod: "POST", 528 HTTPPath: "/", 529 } 530 531 if input == nil { 532 input = &DeleteHsmInput{} 533 } 534 535 output = &DeleteHsmOutput{} 536 req = c.newRequest(op, input, output) 537 return 538 } 539 540 // DeleteHsm API operation for AWS CloudHSM V2. 541 // 542 // Deletes the specified HSM. To specify an HSM, you can use its identifier 543 // (ID), the IP address of the HSM's elastic network interface (ENI), or the 544 // ID of the HSM's ENI. You need to specify only one of these values. To find 545 // these values, use DescribeClusters. 546 // 547 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 548 // with awserr.Error's Code and Message methods to get detailed information about 549 // the error. 550 // 551 // See the AWS API reference guide for AWS CloudHSM V2's 552 // API operation DeleteHsm for usage and error information. 553 // 554 // Returned Error Types: 555 // * CloudHsmInternalFailureException 556 // The request was rejected because of an AWS CloudHSM internal failure. The 557 // request can be retried. 558 // 559 // * CloudHsmServiceException 560 // The request was rejected because an error occurred. 561 // 562 // * CloudHsmResourceNotFoundException 563 // The request was rejected because it refers to a resource that cannot be found. 564 // 565 // * CloudHsmInvalidRequestException 566 // The request was rejected because it is not a valid request. 567 // 568 // * CloudHsmAccessDeniedException 569 // The request was rejected because the requester does not have permission to 570 // perform the requested operation. 571 // 572 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm 573 func (c *CloudHSMV2) DeleteHsm(input *DeleteHsmInput) (*DeleteHsmOutput, error) { 574 req, out := c.DeleteHsmRequest(input) 575 return out, req.Send() 576 } 577 578 // DeleteHsmWithContext is the same as DeleteHsm with the addition of 579 // the ability to pass a context and additional request options. 580 // 581 // See DeleteHsm for details on how to use this API operation. 582 // 583 // The context must be non-nil and will be used for request cancellation. If 584 // the context is nil a panic will occur. In the future the SDK may create 585 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 586 // for more information on using Contexts. 587 func (c *CloudHSMV2) DeleteHsmWithContext(ctx aws.Context, input *DeleteHsmInput, opts ...request.Option) (*DeleteHsmOutput, error) { 588 req, out := c.DeleteHsmRequest(input) 589 req.SetContext(ctx) 590 req.ApplyOptions(opts...) 591 return out, req.Send() 592 } 593 594 const opDescribeBackups = "DescribeBackups" 595 596 // DescribeBackupsRequest generates a "aws/request.Request" representing the 597 // client's request for the DescribeBackups operation. The "output" return 598 // value will be populated with the request's response once the request completes 599 // successfully. 600 // 601 // Use "Send" method on the returned Request to send the API call to the service. 602 // the "output" return value is not valid until after Send returns without error. 603 // 604 // See DescribeBackups for more information on using the DescribeBackups 605 // API call, and error handling. 606 // 607 // This method is useful when you want to inject custom logic or configuration 608 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 609 // 610 // 611 // // Example sending a request using the DescribeBackupsRequest method. 612 // req, resp := client.DescribeBackupsRequest(params) 613 // 614 // err := req.Send() 615 // if err == nil { // resp is now filled 616 // fmt.Println(resp) 617 // } 618 // 619 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups 620 func (c *CloudHSMV2) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) { 621 op := &request.Operation{ 622 Name: opDescribeBackups, 623 HTTPMethod: "POST", 624 HTTPPath: "/", 625 Paginator: &request.Paginator{ 626 InputTokens: []string{"NextToken"}, 627 OutputTokens: []string{"NextToken"}, 628 LimitToken: "MaxResults", 629 TruncationToken: "", 630 }, 631 } 632 633 if input == nil { 634 input = &DescribeBackupsInput{} 635 } 636 637 output = &DescribeBackupsOutput{} 638 req = c.newRequest(op, input, output) 639 return 640 } 641 642 // DescribeBackups API operation for AWS CloudHSM V2. 643 // 644 // Gets information about backups of AWS CloudHSM clusters. 645 // 646 // This is a paginated operation, which means that each response might contain 647 // only a subset of all the backups. When the response contains only a subset 648 // of backups, it includes a NextToken value. Use this value in a subsequent 649 // DescribeBackups request to get more backups. When you receive a response 650 // with no NextToken (or an empty or null value), that means there are no more 651 // backups to get. 652 // 653 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 654 // with awserr.Error's Code and Message methods to get detailed information about 655 // the error. 656 // 657 // See the AWS API reference guide for AWS CloudHSM V2's 658 // API operation DescribeBackups for usage and error information. 659 // 660 // Returned Error Types: 661 // * CloudHsmAccessDeniedException 662 // The request was rejected because the requester does not have permission to 663 // perform the requested operation. 664 // 665 // * CloudHsmInternalFailureException 666 // The request was rejected because of an AWS CloudHSM internal failure. The 667 // request can be retried. 668 // 669 // * CloudHsmInvalidRequestException 670 // The request was rejected because it is not a valid request. 671 // 672 // * CloudHsmResourceNotFoundException 673 // The request was rejected because it refers to a resource that cannot be found. 674 // 675 // * CloudHsmServiceException 676 // The request was rejected because an error occurred. 677 // 678 // * CloudHsmTagException 679 // The request was rejected because of a tagging failure. Verify the tag conditions 680 // in all applicable policies, and then retry the request. 681 // 682 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups 683 func (c *CloudHSMV2) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) { 684 req, out := c.DescribeBackupsRequest(input) 685 return out, req.Send() 686 } 687 688 // DescribeBackupsWithContext is the same as DescribeBackups with the addition of 689 // the ability to pass a context and additional request options. 690 // 691 // See DescribeBackups for details on how to use this API operation. 692 // 693 // The context must be non-nil and will be used for request cancellation. If 694 // the context is nil a panic will occur. In the future the SDK may create 695 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 696 // for more information on using Contexts. 697 func (c *CloudHSMV2) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) { 698 req, out := c.DescribeBackupsRequest(input) 699 req.SetContext(ctx) 700 req.ApplyOptions(opts...) 701 return out, req.Send() 702 } 703 704 // DescribeBackupsPages iterates over the pages of a DescribeBackups operation, 705 // calling the "fn" function with the response data for each page. To stop 706 // iterating, return false from the fn function. 707 // 708 // See DescribeBackups method for more information on how to use this operation. 709 // 710 // Note: This operation can generate multiple requests to a service. 711 // 712 // // Example iterating over at most 3 pages of a DescribeBackups operation. 713 // pageNum := 0 714 // err := client.DescribeBackupsPages(params, 715 // func(page *cloudhsmv2.DescribeBackupsOutput, lastPage bool) bool { 716 // pageNum++ 717 // fmt.Println(page) 718 // return pageNum <= 3 719 // }) 720 // 721 func (c *CloudHSMV2) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error { 722 return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn) 723 } 724 725 // DescribeBackupsPagesWithContext same as DescribeBackupsPages except 726 // it takes a Context and allows setting request options on the pages. 727 // 728 // The context must be non-nil and will be used for request cancellation. If 729 // the context is nil a panic will occur. In the future the SDK may create 730 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 731 // for more information on using Contexts. 732 func (c *CloudHSMV2) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error { 733 p := request.Pagination{ 734 NewRequest: func() (*request.Request, error) { 735 var inCpy *DescribeBackupsInput 736 if input != nil { 737 tmp := *input 738 inCpy = &tmp 739 } 740 req, _ := c.DescribeBackupsRequest(inCpy) 741 req.SetContext(ctx) 742 req.ApplyOptions(opts...) 743 return req, nil 744 }, 745 } 746 747 for p.Next() { 748 if !fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) { 749 break 750 } 751 } 752 753 return p.Err() 754 } 755 756 const opDescribeClusters = "DescribeClusters" 757 758 // DescribeClustersRequest generates a "aws/request.Request" representing the 759 // client's request for the DescribeClusters operation. The "output" return 760 // value will be populated with the request's response once the request completes 761 // successfully. 762 // 763 // Use "Send" method on the returned Request to send the API call to the service. 764 // the "output" return value is not valid until after Send returns without error. 765 // 766 // See DescribeClusters for more information on using the DescribeClusters 767 // API call, and error handling. 768 // 769 // This method is useful when you want to inject custom logic or configuration 770 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 771 // 772 // 773 // // Example sending a request using the DescribeClustersRequest method. 774 // req, resp := client.DescribeClustersRequest(params) 775 // 776 // err := req.Send() 777 // if err == nil { // resp is now filled 778 // fmt.Println(resp) 779 // } 780 // 781 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters 782 func (c *CloudHSMV2) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) { 783 op := &request.Operation{ 784 Name: opDescribeClusters, 785 HTTPMethod: "POST", 786 HTTPPath: "/", 787 Paginator: &request.Paginator{ 788 InputTokens: []string{"NextToken"}, 789 OutputTokens: []string{"NextToken"}, 790 LimitToken: "MaxResults", 791 TruncationToken: "", 792 }, 793 } 794 795 if input == nil { 796 input = &DescribeClustersInput{} 797 } 798 799 output = &DescribeClustersOutput{} 800 req = c.newRequest(op, input, output) 801 return 802 } 803 804 // DescribeClusters API operation for AWS CloudHSM V2. 805 // 806 // Gets information about AWS CloudHSM clusters. 807 // 808 // This is a paginated operation, which means that each response might contain 809 // only a subset of all the clusters. When the response contains only a subset 810 // of clusters, it includes a NextToken value. Use this value in a subsequent 811 // DescribeClusters request to get more clusters. When you receive a response 812 // with no NextToken (or an empty or null value), that means there are no more 813 // clusters to get. 814 // 815 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 816 // with awserr.Error's Code and Message methods to get detailed information about 817 // the error. 818 // 819 // See the AWS API reference guide for AWS CloudHSM V2's 820 // API operation DescribeClusters for usage and error information. 821 // 822 // Returned Error Types: 823 // * CloudHsmAccessDeniedException 824 // The request was rejected because the requester does not have permission to 825 // perform the requested operation. 826 // 827 // * CloudHsmInternalFailureException 828 // The request was rejected because of an AWS CloudHSM internal failure. The 829 // request can be retried. 830 // 831 // * CloudHsmInvalidRequestException 832 // The request was rejected because it is not a valid request. 833 // 834 // * CloudHsmServiceException 835 // The request was rejected because an error occurred. 836 // 837 // * CloudHsmTagException 838 // The request was rejected because of a tagging failure. Verify the tag conditions 839 // in all applicable policies, and then retry the request. 840 // 841 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters 842 func (c *CloudHSMV2) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) { 843 req, out := c.DescribeClustersRequest(input) 844 return out, req.Send() 845 } 846 847 // DescribeClustersWithContext is the same as DescribeClusters with the addition of 848 // the ability to pass a context and additional request options. 849 // 850 // See DescribeClusters for details on how to use this API operation. 851 // 852 // The context must be non-nil and will be used for request cancellation. If 853 // the context is nil a panic will occur. In the future the SDK may create 854 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 855 // for more information on using Contexts. 856 func (c *CloudHSMV2) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) { 857 req, out := c.DescribeClustersRequest(input) 858 req.SetContext(ctx) 859 req.ApplyOptions(opts...) 860 return out, req.Send() 861 } 862 863 // DescribeClustersPages iterates over the pages of a DescribeClusters operation, 864 // calling the "fn" function with the response data for each page. To stop 865 // iterating, return false from the fn function. 866 // 867 // See DescribeClusters method for more information on how to use this operation. 868 // 869 // Note: This operation can generate multiple requests to a service. 870 // 871 // // Example iterating over at most 3 pages of a DescribeClusters operation. 872 // pageNum := 0 873 // err := client.DescribeClustersPages(params, 874 // func(page *cloudhsmv2.DescribeClustersOutput, lastPage bool) bool { 875 // pageNum++ 876 // fmt.Println(page) 877 // return pageNum <= 3 878 // }) 879 // 880 func (c *CloudHSMV2) DescribeClustersPages(input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool) error { 881 return c.DescribeClustersPagesWithContext(aws.BackgroundContext(), input, fn) 882 } 883 884 // DescribeClustersPagesWithContext same as DescribeClustersPages except 885 // it takes a Context and allows setting request options on the pages. 886 // 887 // The context must be non-nil and will be used for request cancellation. If 888 // the context is nil a panic will occur. In the future the SDK may create 889 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 890 // for more information on using Contexts. 891 func (c *CloudHSMV2) DescribeClustersPagesWithContext(ctx aws.Context, input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool, opts ...request.Option) error { 892 p := request.Pagination{ 893 NewRequest: func() (*request.Request, error) { 894 var inCpy *DescribeClustersInput 895 if input != nil { 896 tmp := *input 897 inCpy = &tmp 898 } 899 req, _ := c.DescribeClustersRequest(inCpy) 900 req.SetContext(ctx) 901 req.ApplyOptions(opts...) 902 return req, nil 903 }, 904 } 905 906 for p.Next() { 907 if !fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) { 908 break 909 } 910 } 911 912 return p.Err() 913 } 914 915 const opInitializeCluster = "InitializeCluster" 916 917 // InitializeClusterRequest generates a "aws/request.Request" representing the 918 // client's request for the InitializeCluster operation. The "output" return 919 // value will be populated with the request's response once the request completes 920 // successfully. 921 // 922 // Use "Send" method on the returned Request to send the API call to the service. 923 // the "output" return value is not valid until after Send returns without error. 924 // 925 // See InitializeCluster for more information on using the InitializeCluster 926 // API call, and error handling. 927 // 928 // This method is useful when you want to inject custom logic or configuration 929 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 930 // 931 // 932 // // Example sending a request using the InitializeClusterRequest method. 933 // req, resp := client.InitializeClusterRequest(params) 934 // 935 // err := req.Send() 936 // if err == nil { // resp is now filled 937 // fmt.Println(resp) 938 // } 939 // 940 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster 941 func (c *CloudHSMV2) InitializeClusterRequest(input *InitializeClusterInput) (req *request.Request, output *InitializeClusterOutput) { 942 op := &request.Operation{ 943 Name: opInitializeCluster, 944 HTTPMethod: "POST", 945 HTTPPath: "/", 946 } 947 948 if input == nil { 949 input = &InitializeClusterInput{} 950 } 951 952 output = &InitializeClusterOutput{} 953 req = c.newRequest(op, input, output) 954 return 955 } 956 957 // InitializeCluster API operation for AWS CloudHSM V2. 958 // 959 // Claims an AWS CloudHSM cluster by submitting the cluster certificate issued 960 // by your issuing certificate authority (CA) and the CA's root certificate. 961 // Before you can claim a cluster, you must sign the cluster's certificate signing 962 // request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters. 963 // 964 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 965 // with awserr.Error's Code and Message methods to get detailed information about 966 // the error. 967 // 968 // See the AWS API reference guide for AWS CloudHSM V2's 969 // API operation InitializeCluster for usage and error information. 970 // 971 // Returned Error Types: 972 // * CloudHsmAccessDeniedException 973 // The request was rejected because the requester does not have permission to 974 // perform the requested operation. 975 // 976 // * CloudHsmInternalFailureException 977 // The request was rejected because of an AWS CloudHSM internal failure. The 978 // request can be retried. 979 // 980 // * CloudHsmInvalidRequestException 981 // The request was rejected because it is not a valid request. 982 // 983 // * CloudHsmResourceNotFoundException 984 // The request was rejected because it refers to a resource that cannot be found. 985 // 986 // * CloudHsmServiceException 987 // The request was rejected because an error occurred. 988 // 989 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster 990 func (c *CloudHSMV2) InitializeCluster(input *InitializeClusterInput) (*InitializeClusterOutput, error) { 991 req, out := c.InitializeClusterRequest(input) 992 return out, req.Send() 993 } 994 995 // InitializeClusterWithContext is the same as InitializeCluster with the addition of 996 // the ability to pass a context and additional request options. 997 // 998 // See InitializeCluster for details on how to use this API operation. 999 // 1000 // The context must be non-nil and will be used for request cancellation. If 1001 // the context is nil a panic will occur. In the future the SDK may create 1002 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1003 // for more information on using Contexts. 1004 func (c *CloudHSMV2) InitializeClusterWithContext(ctx aws.Context, input *InitializeClusterInput, opts ...request.Option) (*InitializeClusterOutput, error) { 1005 req, out := c.InitializeClusterRequest(input) 1006 req.SetContext(ctx) 1007 req.ApplyOptions(opts...) 1008 return out, req.Send() 1009 } 1010 1011 const opListTags = "ListTags" 1012 1013 // ListTagsRequest generates a "aws/request.Request" representing the 1014 // client's request for the ListTags operation. The "output" return 1015 // value will be populated with the request's response once the request completes 1016 // successfully. 1017 // 1018 // Use "Send" method on the returned Request to send the API call to the service. 1019 // the "output" return value is not valid until after Send returns without error. 1020 // 1021 // See ListTags for more information on using the ListTags 1022 // API call, and error handling. 1023 // 1024 // This method is useful when you want to inject custom logic or configuration 1025 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1026 // 1027 // 1028 // // Example sending a request using the ListTagsRequest method. 1029 // req, resp := client.ListTagsRequest(params) 1030 // 1031 // err := req.Send() 1032 // if err == nil { // resp is now filled 1033 // fmt.Println(resp) 1034 // } 1035 // 1036 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags 1037 func (c *CloudHSMV2) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { 1038 op := &request.Operation{ 1039 Name: opListTags, 1040 HTTPMethod: "POST", 1041 HTTPPath: "/", 1042 Paginator: &request.Paginator{ 1043 InputTokens: []string{"NextToken"}, 1044 OutputTokens: []string{"NextToken"}, 1045 LimitToken: "MaxResults", 1046 TruncationToken: "", 1047 }, 1048 } 1049 1050 if input == nil { 1051 input = &ListTagsInput{} 1052 } 1053 1054 output = &ListTagsOutput{} 1055 req = c.newRequest(op, input, output) 1056 return 1057 } 1058 1059 // ListTags API operation for AWS CloudHSM V2. 1060 // 1061 // Gets a list of tags for the specified AWS CloudHSM cluster. 1062 // 1063 // This is a paginated operation, which means that each response might contain 1064 // only a subset of all the tags. When the response contains only a subset of 1065 // tags, it includes a NextToken value. Use this value in a subsequent ListTags 1066 // request to get more tags. When you receive a response with no NextToken (or 1067 // an empty or null value), that means there are no more tags to get. 1068 // 1069 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1070 // with awserr.Error's Code and Message methods to get detailed information about 1071 // the error. 1072 // 1073 // See the AWS API reference guide for AWS CloudHSM V2's 1074 // API operation ListTags for usage and error information. 1075 // 1076 // Returned Error Types: 1077 // * CloudHsmAccessDeniedException 1078 // The request was rejected because the requester does not have permission to 1079 // perform the requested operation. 1080 // 1081 // * CloudHsmInternalFailureException 1082 // The request was rejected because of an AWS CloudHSM internal failure. The 1083 // request can be retried. 1084 // 1085 // * CloudHsmInvalidRequestException 1086 // The request was rejected because it is not a valid request. 1087 // 1088 // * CloudHsmResourceNotFoundException 1089 // The request was rejected because it refers to a resource that cannot be found. 1090 // 1091 // * CloudHsmServiceException 1092 // The request was rejected because an error occurred. 1093 // 1094 // * CloudHsmTagException 1095 // The request was rejected because of a tagging failure. Verify the tag conditions 1096 // in all applicable policies, and then retry the request. 1097 // 1098 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags 1099 func (c *CloudHSMV2) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { 1100 req, out := c.ListTagsRequest(input) 1101 return out, req.Send() 1102 } 1103 1104 // ListTagsWithContext is the same as ListTags with the addition of 1105 // the ability to pass a context and additional request options. 1106 // 1107 // See ListTags for details on how to use this API operation. 1108 // 1109 // The context must be non-nil and will be used for request cancellation. If 1110 // the context is nil a panic will occur. In the future the SDK may create 1111 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1112 // for more information on using Contexts. 1113 func (c *CloudHSMV2) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { 1114 req, out := c.ListTagsRequest(input) 1115 req.SetContext(ctx) 1116 req.ApplyOptions(opts...) 1117 return out, req.Send() 1118 } 1119 1120 // ListTagsPages iterates over the pages of a ListTags operation, 1121 // calling the "fn" function with the response data for each page. To stop 1122 // iterating, return false from the fn function. 1123 // 1124 // See ListTags method for more information on how to use this operation. 1125 // 1126 // Note: This operation can generate multiple requests to a service. 1127 // 1128 // // Example iterating over at most 3 pages of a ListTags operation. 1129 // pageNum := 0 1130 // err := client.ListTagsPages(params, 1131 // func(page *cloudhsmv2.ListTagsOutput, lastPage bool) bool { 1132 // pageNum++ 1133 // fmt.Println(page) 1134 // return pageNum <= 3 1135 // }) 1136 // 1137 func (c *CloudHSMV2) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error { 1138 return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn) 1139 } 1140 1141 // ListTagsPagesWithContext same as ListTagsPages except 1142 // it takes a Context and allows setting request options on the pages. 1143 // 1144 // The context must be non-nil and will be used for request cancellation. If 1145 // the context is nil a panic will occur. In the future the SDK may create 1146 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1147 // for more information on using Contexts. 1148 func (c *CloudHSMV2) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error { 1149 p := request.Pagination{ 1150 NewRequest: func() (*request.Request, error) { 1151 var inCpy *ListTagsInput 1152 if input != nil { 1153 tmp := *input 1154 inCpy = &tmp 1155 } 1156 req, _ := c.ListTagsRequest(inCpy) 1157 req.SetContext(ctx) 1158 req.ApplyOptions(opts...) 1159 return req, nil 1160 }, 1161 } 1162 1163 for p.Next() { 1164 if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) { 1165 break 1166 } 1167 } 1168 1169 return p.Err() 1170 } 1171 1172 const opModifyBackupAttributes = "ModifyBackupAttributes" 1173 1174 // ModifyBackupAttributesRequest generates a "aws/request.Request" representing the 1175 // client's request for the ModifyBackupAttributes operation. The "output" return 1176 // value will be populated with the request's response once the request completes 1177 // successfully. 1178 // 1179 // Use "Send" method on the returned Request to send the API call to the service. 1180 // the "output" return value is not valid until after Send returns without error. 1181 // 1182 // See ModifyBackupAttributes for more information on using the ModifyBackupAttributes 1183 // API call, and error handling. 1184 // 1185 // This method is useful when you want to inject custom logic or configuration 1186 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1187 // 1188 // 1189 // // Example sending a request using the ModifyBackupAttributesRequest method. 1190 // req, resp := client.ModifyBackupAttributesRequest(params) 1191 // 1192 // err := req.Send() 1193 // if err == nil { // resp is now filled 1194 // fmt.Println(resp) 1195 // } 1196 // 1197 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ModifyBackupAttributes 1198 func (c *CloudHSMV2) ModifyBackupAttributesRequest(input *ModifyBackupAttributesInput) (req *request.Request, output *ModifyBackupAttributesOutput) { 1199 op := &request.Operation{ 1200 Name: opModifyBackupAttributes, 1201 HTTPMethod: "POST", 1202 HTTPPath: "/", 1203 } 1204 1205 if input == nil { 1206 input = &ModifyBackupAttributesInput{} 1207 } 1208 1209 output = &ModifyBackupAttributesOutput{} 1210 req = c.newRequest(op, input, output) 1211 return 1212 } 1213 1214 // ModifyBackupAttributes API operation for AWS CloudHSM V2. 1215 // 1216 // Modifies attributes for AWS CloudHSM backup. 1217 // 1218 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1219 // with awserr.Error's Code and Message methods to get detailed information about 1220 // the error. 1221 // 1222 // See the AWS API reference guide for AWS CloudHSM V2's 1223 // API operation ModifyBackupAttributes for usage and error information. 1224 // 1225 // Returned Error Types: 1226 // * CloudHsmAccessDeniedException 1227 // The request was rejected because the requester does not have permission to 1228 // perform the requested operation. 1229 // 1230 // * CloudHsmInternalFailureException 1231 // The request was rejected because of an AWS CloudHSM internal failure. The 1232 // request can be retried. 1233 // 1234 // * CloudHsmInvalidRequestException 1235 // The request was rejected because it is not a valid request. 1236 // 1237 // * CloudHsmResourceNotFoundException 1238 // The request was rejected because it refers to a resource that cannot be found. 1239 // 1240 // * CloudHsmServiceException 1241 // The request was rejected because an error occurred. 1242 // 1243 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ModifyBackupAttributes 1244 func (c *CloudHSMV2) ModifyBackupAttributes(input *ModifyBackupAttributesInput) (*ModifyBackupAttributesOutput, error) { 1245 req, out := c.ModifyBackupAttributesRequest(input) 1246 return out, req.Send() 1247 } 1248 1249 // ModifyBackupAttributesWithContext is the same as ModifyBackupAttributes with the addition of 1250 // the ability to pass a context and additional request options. 1251 // 1252 // See ModifyBackupAttributes for details on how to use this API operation. 1253 // 1254 // The context must be non-nil and will be used for request cancellation. If 1255 // the context is nil a panic will occur. In the future the SDK may create 1256 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1257 // for more information on using Contexts. 1258 func (c *CloudHSMV2) ModifyBackupAttributesWithContext(ctx aws.Context, input *ModifyBackupAttributesInput, opts ...request.Option) (*ModifyBackupAttributesOutput, error) { 1259 req, out := c.ModifyBackupAttributesRequest(input) 1260 req.SetContext(ctx) 1261 req.ApplyOptions(opts...) 1262 return out, req.Send() 1263 } 1264 1265 const opModifyCluster = "ModifyCluster" 1266 1267 // ModifyClusterRequest generates a "aws/request.Request" representing the 1268 // client's request for the ModifyCluster operation. The "output" return 1269 // value will be populated with the request's response once the request completes 1270 // successfully. 1271 // 1272 // Use "Send" method on the returned Request to send the API call to the service. 1273 // the "output" return value is not valid until after Send returns without error. 1274 // 1275 // See ModifyCluster for more information on using the ModifyCluster 1276 // API call, and error handling. 1277 // 1278 // This method is useful when you want to inject custom logic or configuration 1279 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1280 // 1281 // 1282 // // Example sending a request using the ModifyClusterRequest method. 1283 // req, resp := client.ModifyClusterRequest(params) 1284 // 1285 // err := req.Send() 1286 // if err == nil { // resp is now filled 1287 // fmt.Println(resp) 1288 // } 1289 // 1290 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ModifyCluster 1291 func (c *CloudHSMV2) ModifyClusterRequest(input *ModifyClusterInput) (req *request.Request, output *ModifyClusterOutput) { 1292 op := &request.Operation{ 1293 Name: opModifyCluster, 1294 HTTPMethod: "POST", 1295 HTTPPath: "/", 1296 } 1297 1298 if input == nil { 1299 input = &ModifyClusterInput{} 1300 } 1301 1302 output = &ModifyClusterOutput{} 1303 req = c.newRequest(op, input, output) 1304 return 1305 } 1306 1307 // ModifyCluster API operation for AWS CloudHSM V2. 1308 // 1309 // Modifies AWS CloudHSM cluster. 1310 // 1311 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1312 // with awserr.Error's Code and Message methods to get detailed information about 1313 // the error. 1314 // 1315 // See the AWS API reference guide for AWS CloudHSM V2's 1316 // API operation ModifyCluster for usage and error information. 1317 // 1318 // Returned Error Types: 1319 // * CloudHsmAccessDeniedException 1320 // The request was rejected because the requester does not have permission to 1321 // perform the requested operation. 1322 // 1323 // * CloudHsmInternalFailureException 1324 // The request was rejected because of an AWS CloudHSM internal failure. The 1325 // request can be retried. 1326 // 1327 // * CloudHsmInvalidRequestException 1328 // The request was rejected because it is not a valid request. 1329 // 1330 // * CloudHsmResourceNotFoundException 1331 // The request was rejected because it refers to a resource that cannot be found. 1332 // 1333 // * CloudHsmServiceException 1334 // The request was rejected because an error occurred. 1335 // 1336 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ModifyCluster 1337 func (c *CloudHSMV2) ModifyCluster(input *ModifyClusterInput) (*ModifyClusterOutput, error) { 1338 req, out := c.ModifyClusterRequest(input) 1339 return out, req.Send() 1340 } 1341 1342 // ModifyClusterWithContext is the same as ModifyCluster with the addition of 1343 // the ability to pass a context and additional request options. 1344 // 1345 // See ModifyCluster for details on how to use this API operation. 1346 // 1347 // The context must be non-nil and will be used for request cancellation. If 1348 // the context is nil a panic will occur. In the future the SDK may create 1349 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1350 // for more information on using Contexts. 1351 func (c *CloudHSMV2) ModifyClusterWithContext(ctx aws.Context, input *ModifyClusterInput, opts ...request.Option) (*ModifyClusterOutput, error) { 1352 req, out := c.ModifyClusterRequest(input) 1353 req.SetContext(ctx) 1354 req.ApplyOptions(opts...) 1355 return out, req.Send() 1356 } 1357 1358 const opRestoreBackup = "RestoreBackup" 1359 1360 // RestoreBackupRequest generates a "aws/request.Request" representing the 1361 // client's request for the RestoreBackup operation. The "output" return 1362 // value will be populated with the request's response once the request completes 1363 // successfully. 1364 // 1365 // Use "Send" method on the returned Request to send the API call to the service. 1366 // the "output" return value is not valid until after Send returns without error. 1367 // 1368 // See RestoreBackup for more information on using the RestoreBackup 1369 // API call, and error handling. 1370 // 1371 // This method is useful when you want to inject custom logic or configuration 1372 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1373 // 1374 // 1375 // // Example sending a request using the RestoreBackupRequest method. 1376 // req, resp := client.RestoreBackupRequest(params) 1377 // 1378 // err := req.Send() 1379 // if err == nil { // resp is now filled 1380 // fmt.Println(resp) 1381 // } 1382 // 1383 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup 1384 func (c *CloudHSMV2) RestoreBackupRequest(input *RestoreBackupInput) (req *request.Request, output *RestoreBackupOutput) { 1385 op := &request.Operation{ 1386 Name: opRestoreBackup, 1387 HTTPMethod: "POST", 1388 HTTPPath: "/", 1389 } 1390 1391 if input == nil { 1392 input = &RestoreBackupInput{} 1393 } 1394 1395 output = &RestoreBackupOutput{} 1396 req = c.newRequest(op, input, output) 1397 return 1398 } 1399 1400 // RestoreBackup API operation for AWS CloudHSM V2. 1401 // 1402 // Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION 1403 // state. For mor information on deleting a backup, see DeleteBackup. 1404 // 1405 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1406 // with awserr.Error's Code and Message methods to get detailed information about 1407 // the error. 1408 // 1409 // See the AWS API reference guide for AWS CloudHSM V2's 1410 // API operation RestoreBackup for usage and error information. 1411 // 1412 // Returned Error Types: 1413 // * CloudHsmAccessDeniedException 1414 // The request was rejected because the requester does not have permission to 1415 // perform the requested operation. 1416 // 1417 // * CloudHsmInternalFailureException 1418 // The request was rejected because of an AWS CloudHSM internal failure. The 1419 // request can be retried. 1420 // 1421 // * CloudHsmInvalidRequestException 1422 // The request was rejected because it is not a valid request. 1423 // 1424 // * CloudHsmResourceNotFoundException 1425 // The request was rejected because it refers to a resource that cannot be found. 1426 // 1427 // * CloudHsmServiceException 1428 // The request was rejected because an error occurred. 1429 // 1430 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup 1431 func (c *CloudHSMV2) RestoreBackup(input *RestoreBackupInput) (*RestoreBackupOutput, error) { 1432 req, out := c.RestoreBackupRequest(input) 1433 return out, req.Send() 1434 } 1435 1436 // RestoreBackupWithContext is the same as RestoreBackup with the addition of 1437 // the ability to pass a context and additional request options. 1438 // 1439 // See RestoreBackup for details on how to use this API operation. 1440 // 1441 // The context must be non-nil and will be used for request cancellation. If 1442 // the context is nil a panic will occur. In the future the SDK may create 1443 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1444 // for more information on using Contexts. 1445 func (c *CloudHSMV2) RestoreBackupWithContext(ctx aws.Context, input *RestoreBackupInput, opts ...request.Option) (*RestoreBackupOutput, error) { 1446 req, out := c.RestoreBackupRequest(input) 1447 req.SetContext(ctx) 1448 req.ApplyOptions(opts...) 1449 return out, req.Send() 1450 } 1451 1452 const opTagResource = "TagResource" 1453 1454 // TagResourceRequest generates a "aws/request.Request" representing the 1455 // client's request for the TagResource operation. The "output" return 1456 // value will be populated with the request's response once the request completes 1457 // successfully. 1458 // 1459 // Use "Send" method on the returned Request to send the API call to the service. 1460 // the "output" return value is not valid until after Send returns without error. 1461 // 1462 // See TagResource for more information on using the TagResource 1463 // API call, and error handling. 1464 // 1465 // This method is useful when you want to inject custom logic or configuration 1466 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1467 // 1468 // 1469 // // Example sending a request using the TagResourceRequest method. 1470 // req, resp := client.TagResourceRequest(params) 1471 // 1472 // err := req.Send() 1473 // if err == nil { // resp is now filled 1474 // fmt.Println(resp) 1475 // } 1476 // 1477 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource 1478 func (c *CloudHSMV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1479 op := &request.Operation{ 1480 Name: opTagResource, 1481 HTTPMethod: "POST", 1482 HTTPPath: "/", 1483 } 1484 1485 if input == nil { 1486 input = &TagResourceInput{} 1487 } 1488 1489 output = &TagResourceOutput{} 1490 req = c.newRequest(op, input, output) 1491 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1492 return 1493 } 1494 1495 // TagResource API operation for AWS CloudHSM V2. 1496 // 1497 // Adds or overwrites one or more tags for the specified AWS CloudHSM cluster. 1498 // 1499 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1500 // with awserr.Error's Code and Message methods to get detailed information about 1501 // the error. 1502 // 1503 // See the AWS API reference guide for AWS CloudHSM V2's 1504 // API operation TagResource for usage and error information. 1505 // 1506 // Returned Error Types: 1507 // * CloudHsmAccessDeniedException 1508 // The request was rejected because the requester does not have permission to 1509 // perform the requested operation. 1510 // 1511 // * CloudHsmInternalFailureException 1512 // The request was rejected because of an AWS CloudHSM internal failure. The 1513 // request can be retried. 1514 // 1515 // * CloudHsmInvalidRequestException 1516 // The request was rejected because it is not a valid request. 1517 // 1518 // * CloudHsmResourceNotFoundException 1519 // The request was rejected because it refers to a resource that cannot be found. 1520 // 1521 // * CloudHsmServiceException 1522 // The request was rejected because an error occurred. 1523 // 1524 // * CloudHsmTagException 1525 // The request was rejected because of a tagging failure. Verify the tag conditions 1526 // in all applicable policies, and then retry the request. 1527 // 1528 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource 1529 func (c *CloudHSMV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1530 req, out := c.TagResourceRequest(input) 1531 return out, req.Send() 1532 } 1533 1534 // TagResourceWithContext is the same as TagResource with the addition of 1535 // the ability to pass a context and additional request options. 1536 // 1537 // See TagResource for details on how to use this API operation. 1538 // 1539 // The context must be non-nil and will be used for request cancellation. If 1540 // the context is nil a panic will occur. In the future the SDK may create 1541 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1542 // for more information on using Contexts. 1543 func (c *CloudHSMV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1544 req, out := c.TagResourceRequest(input) 1545 req.SetContext(ctx) 1546 req.ApplyOptions(opts...) 1547 return out, req.Send() 1548 } 1549 1550 const opUntagResource = "UntagResource" 1551 1552 // UntagResourceRequest generates a "aws/request.Request" representing the 1553 // client's request for the UntagResource operation. The "output" return 1554 // value will be populated with the request's response once the request completes 1555 // successfully. 1556 // 1557 // Use "Send" method on the returned Request to send the API call to the service. 1558 // the "output" return value is not valid until after Send returns without error. 1559 // 1560 // See UntagResource for more information on using the UntagResource 1561 // API call, and error handling. 1562 // 1563 // This method is useful when you want to inject custom logic or configuration 1564 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1565 // 1566 // 1567 // // Example sending a request using the UntagResourceRequest method. 1568 // req, resp := client.UntagResourceRequest(params) 1569 // 1570 // err := req.Send() 1571 // if err == nil { // resp is now filled 1572 // fmt.Println(resp) 1573 // } 1574 // 1575 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource 1576 func (c *CloudHSMV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1577 op := &request.Operation{ 1578 Name: opUntagResource, 1579 HTTPMethod: "POST", 1580 HTTPPath: "/", 1581 } 1582 1583 if input == nil { 1584 input = &UntagResourceInput{} 1585 } 1586 1587 output = &UntagResourceOutput{} 1588 req = c.newRequest(op, input, output) 1589 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1590 return 1591 } 1592 1593 // UntagResource API operation for AWS CloudHSM V2. 1594 // 1595 // Removes the specified tag or tags from the specified AWS CloudHSM cluster. 1596 // 1597 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1598 // with awserr.Error's Code and Message methods to get detailed information about 1599 // the error. 1600 // 1601 // See the AWS API reference guide for AWS CloudHSM V2's 1602 // API operation UntagResource for usage and error information. 1603 // 1604 // Returned Error Types: 1605 // * CloudHsmAccessDeniedException 1606 // The request was rejected because the requester does not have permission to 1607 // perform the requested operation. 1608 // 1609 // * CloudHsmInternalFailureException 1610 // The request was rejected because of an AWS CloudHSM internal failure. The 1611 // request can be retried. 1612 // 1613 // * CloudHsmInvalidRequestException 1614 // The request was rejected because it is not a valid request. 1615 // 1616 // * CloudHsmResourceNotFoundException 1617 // The request was rejected because it refers to a resource that cannot be found. 1618 // 1619 // * CloudHsmServiceException 1620 // The request was rejected because an error occurred. 1621 // 1622 // * CloudHsmTagException 1623 // The request was rejected because of a tagging failure. Verify the tag conditions 1624 // in all applicable policies, and then retry the request. 1625 // 1626 // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource 1627 func (c *CloudHSMV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1628 req, out := c.UntagResourceRequest(input) 1629 return out, req.Send() 1630 } 1631 1632 // UntagResourceWithContext is the same as UntagResource with the addition of 1633 // the ability to pass a context and additional request options. 1634 // 1635 // See UntagResource for details on how to use this API operation. 1636 // 1637 // The context must be non-nil and will be used for request cancellation. If 1638 // the context is nil a panic will occur. In the future the SDK may create 1639 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1640 // for more information on using Contexts. 1641 func (c *CloudHSMV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1642 req, out := c.UntagResourceRequest(input) 1643 req.SetContext(ctx) 1644 req.ApplyOptions(opts...) 1645 return out, req.Send() 1646 } 1647 1648 // Contains information about a backup of an AWS CloudHSM cluster. All backup 1649 // objects contain the BackupId, BackupState, ClusterId, and CreateTimestamp 1650 // parameters. Backups that were copied into a destination region additionally 1651 // contain the CopyTimestamp, SourceBackup, SourceCluster, and SourceRegion 1652 // parameters. A backup that is pending deletion will include the DeleteTimestamp 1653 // parameter. 1654 type Backup struct { 1655 _ struct{} `type:"structure"` 1656 1657 // The identifier (ID) of the backup. 1658 // 1659 // BackupId is a required field 1660 BackupId *string `type:"string" required:"true"` 1661 1662 // The state of the backup. 1663 BackupState *string `type:"string" enum:"BackupState"` 1664 1665 // The identifier (ID) of the cluster that was backed up. 1666 ClusterId *string `type:"string"` 1667 1668 // The date and time when the backup was copied from a source backup. 1669 CopyTimestamp *time.Time `type:"timestamp"` 1670 1671 // The date and time when the backup was created. 1672 CreateTimestamp *time.Time `type:"timestamp"` 1673 1674 // The date and time when the backup will be permanently deleted. 1675 DeleteTimestamp *time.Time `type:"timestamp"` 1676 1677 // Specifies whether the service should exempt a backup from the retention policy 1678 // for the cluster. True exempts a backup from the retention policy. False means 1679 // the service applies the backup retention policy defined at the cluster. 1680 NeverExpires *bool `type:"boolean"` 1681 1682 // The identifier (ID) of the source backup from which the new backup was copied. 1683 SourceBackup *string `type:"string"` 1684 1685 // The identifier (ID) of the cluster containing the source backup from which 1686 // the new backup was copied. 1687 SourceCluster *string `type:"string"` 1688 1689 // The AWS Region that contains the source backup from which the new backup 1690 // was copied. 1691 SourceRegion *string `type:"string"` 1692 1693 // The list of tags for the backup. 1694 TagList []*Tag `min:"1" type:"list"` 1695 } 1696 1697 // String returns the string representation. 1698 // 1699 // API parameter values that are decorated as "sensitive" in the API will not 1700 // be included in the string output. The member name will be present, but the 1701 // value will be replaced with "sensitive". 1702 func (s Backup) String() string { 1703 return awsutil.Prettify(s) 1704 } 1705 1706 // GoString returns the string representation. 1707 // 1708 // API parameter values that are decorated as "sensitive" in the API will not 1709 // be included in the string output. The member name will be present, but the 1710 // value will be replaced with "sensitive". 1711 func (s Backup) GoString() string { 1712 return s.String() 1713 } 1714 1715 // SetBackupId sets the BackupId field's value. 1716 func (s *Backup) SetBackupId(v string) *Backup { 1717 s.BackupId = &v 1718 return s 1719 } 1720 1721 // SetBackupState sets the BackupState field's value. 1722 func (s *Backup) SetBackupState(v string) *Backup { 1723 s.BackupState = &v 1724 return s 1725 } 1726 1727 // SetClusterId sets the ClusterId field's value. 1728 func (s *Backup) SetClusterId(v string) *Backup { 1729 s.ClusterId = &v 1730 return s 1731 } 1732 1733 // SetCopyTimestamp sets the CopyTimestamp field's value. 1734 func (s *Backup) SetCopyTimestamp(v time.Time) *Backup { 1735 s.CopyTimestamp = &v 1736 return s 1737 } 1738 1739 // SetCreateTimestamp sets the CreateTimestamp field's value. 1740 func (s *Backup) SetCreateTimestamp(v time.Time) *Backup { 1741 s.CreateTimestamp = &v 1742 return s 1743 } 1744 1745 // SetDeleteTimestamp sets the DeleteTimestamp field's value. 1746 func (s *Backup) SetDeleteTimestamp(v time.Time) *Backup { 1747 s.DeleteTimestamp = &v 1748 return s 1749 } 1750 1751 // SetNeverExpires sets the NeverExpires field's value. 1752 func (s *Backup) SetNeverExpires(v bool) *Backup { 1753 s.NeverExpires = &v 1754 return s 1755 } 1756 1757 // SetSourceBackup sets the SourceBackup field's value. 1758 func (s *Backup) SetSourceBackup(v string) *Backup { 1759 s.SourceBackup = &v 1760 return s 1761 } 1762 1763 // SetSourceCluster sets the SourceCluster field's value. 1764 func (s *Backup) SetSourceCluster(v string) *Backup { 1765 s.SourceCluster = &v 1766 return s 1767 } 1768 1769 // SetSourceRegion sets the SourceRegion field's value. 1770 func (s *Backup) SetSourceRegion(v string) *Backup { 1771 s.SourceRegion = &v 1772 return s 1773 } 1774 1775 // SetTagList sets the TagList field's value. 1776 func (s *Backup) SetTagList(v []*Tag) *Backup { 1777 s.TagList = v 1778 return s 1779 } 1780 1781 // A policy that defines the number of days to retain backups. 1782 type BackupRetentionPolicy struct { 1783 _ struct{} `type:"structure"` 1784 1785 // The type of backup retention policy. For the DAYS type, the value is the 1786 // number of days to retain backups. 1787 Type *string `type:"string" enum:"BackupRetentionType"` 1788 1789 // Use a value between 7 - 379. 1790 Value *string `min:"1" type:"string"` 1791 } 1792 1793 // String returns the string representation. 1794 // 1795 // API parameter values that are decorated as "sensitive" in the API will not 1796 // be included in the string output. The member name will be present, but the 1797 // value will be replaced with "sensitive". 1798 func (s BackupRetentionPolicy) String() string { 1799 return awsutil.Prettify(s) 1800 } 1801 1802 // GoString returns the string representation. 1803 // 1804 // API parameter values that are decorated as "sensitive" in the API will not 1805 // be included in the string output. The member name will be present, but the 1806 // value will be replaced with "sensitive". 1807 func (s BackupRetentionPolicy) GoString() string { 1808 return s.String() 1809 } 1810 1811 // Validate inspects the fields of the type to determine if they are valid. 1812 func (s *BackupRetentionPolicy) Validate() error { 1813 invalidParams := request.ErrInvalidParams{Context: "BackupRetentionPolicy"} 1814 if s.Value != nil && len(*s.Value) < 1 { 1815 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 1816 } 1817 1818 if invalidParams.Len() > 0 { 1819 return invalidParams 1820 } 1821 return nil 1822 } 1823 1824 // SetType sets the Type field's value. 1825 func (s *BackupRetentionPolicy) SetType(v string) *BackupRetentionPolicy { 1826 s.Type = &v 1827 return s 1828 } 1829 1830 // SetValue sets the Value field's value. 1831 func (s *BackupRetentionPolicy) SetValue(v string) *BackupRetentionPolicy { 1832 s.Value = &v 1833 return s 1834 } 1835 1836 // Contains one or more certificates or a certificate signing request (CSR). 1837 type Certificates struct { 1838 _ struct{} `type:"structure"` 1839 1840 // The HSM hardware certificate issued (signed) by AWS CloudHSM. 1841 AwsHardwareCertificate *string `type:"string"` 1842 1843 // The cluster certificate issued (signed) by the issuing certificate authority 1844 // (CA) of the cluster's owner. 1845 ClusterCertificate *string `type:"string"` 1846 1847 // The cluster's certificate signing request (CSR). The CSR exists only when 1848 // the cluster's state is UNINITIALIZED. 1849 ClusterCsr *string `type:"string"` 1850 1851 // The HSM certificate issued (signed) by the HSM hardware. 1852 HsmCertificate *string `type:"string"` 1853 1854 // The HSM hardware certificate issued (signed) by the hardware manufacturer. 1855 ManufacturerHardwareCertificate *string `type:"string"` 1856 } 1857 1858 // String returns the string representation. 1859 // 1860 // API parameter values that are decorated as "sensitive" in the API will not 1861 // be included in the string output. The member name will be present, but the 1862 // value will be replaced with "sensitive". 1863 func (s Certificates) String() string { 1864 return awsutil.Prettify(s) 1865 } 1866 1867 // GoString returns the string representation. 1868 // 1869 // API parameter values that are decorated as "sensitive" in the API will not 1870 // be included in the string output. The member name will be present, but the 1871 // value will be replaced with "sensitive". 1872 func (s Certificates) GoString() string { 1873 return s.String() 1874 } 1875 1876 // SetAwsHardwareCertificate sets the AwsHardwareCertificate field's value. 1877 func (s *Certificates) SetAwsHardwareCertificate(v string) *Certificates { 1878 s.AwsHardwareCertificate = &v 1879 return s 1880 } 1881 1882 // SetClusterCertificate sets the ClusterCertificate field's value. 1883 func (s *Certificates) SetClusterCertificate(v string) *Certificates { 1884 s.ClusterCertificate = &v 1885 return s 1886 } 1887 1888 // SetClusterCsr sets the ClusterCsr field's value. 1889 func (s *Certificates) SetClusterCsr(v string) *Certificates { 1890 s.ClusterCsr = &v 1891 return s 1892 } 1893 1894 // SetHsmCertificate sets the HsmCertificate field's value. 1895 func (s *Certificates) SetHsmCertificate(v string) *Certificates { 1896 s.HsmCertificate = &v 1897 return s 1898 } 1899 1900 // SetManufacturerHardwareCertificate sets the ManufacturerHardwareCertificate field's value. 1901 func (s *Certificates) SetManufacturerHardwareCertificate(v string) *Certificates { 1902 s.ManufacturerHardwareCertificate = &v 1903 return s 1904 } 1905 1906 // The request was rejected because the requester does not have permission to 1907 // perform the requested operation. 1908 type CloudHsmAccessDeniedException struct { 1909 _ struct{} `type:"structure"` 1910 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1911 1912 Message_ *string `locationName:"Message" type:"string"` 1913 } 1914 1915 // String returns the string representation. 1916 // 1917 // API parameter values that are decorated as "sensitive" in the API will not 1918 // be included in the string output. The member name will be present, but the 1919 // value will be replaced with "sensitive". 1920 func (s CloudHsmAccessDeniedException) String() string { 1921 return awsutil.Prettify(s) 1922 } 1923 1924 // GoString returns the string representation. 1925 // 1926 // API parameter values that are decorated as "sensitive" in the API will not 1927 // be included in the string output. The member name will be present, but the 1928 // value will be replaced with "sensitive". 1929 func (s CloudHsmAccessDeniedException) GoString() string { 1930 return s.String() 1931 } 1932 1933 func newErrorCloudHsmAccessDeniedException(v protocol.ResponseMetadata) error { 1934 return &CloudHsmAccessDeniedException{ 1935 RespMetadata: v, 1936 } 1937 } 1938 1939 // Code returns the exception type name. 1940 func (s *CloudHsmAccessDeniedException) Code() string { 1941 return "CloudHsmAccessDeniedException" 1942 } 1943 1944 // Message returns the exception's message. 1945 func (s *CloudHsmAccessDeniedException) Message() string { 1946 if s.Message_ != nil { 1947 return *s.Message_ 1948 } 1949 return "" 1950 } 1951 1952 // OrigErr always returns nil, satisfies awserr.Error interface. 1953 func (s *CloudHsmAccessDeniedException) OrigErr() error { 1954 return nil 1955 } 1956 1957 func (s *CloudHsmAccessDeniedException) Error() string { 1958 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1959 } 1960 1961 // Status code returns the HTTP status code for the request's response error. 1962 func (s *CloudHsmAccessDeniedException) StatusCode() int { 1963 return s.RespMetadata.StatusCode 1964 } 1965 1966 // RequestID returns the service's response RequestID for request. 1967 func (s *CloudHsmAccessDeniedException) RequestID() string { 1968 return s.RespMetadata.RequestID 1969 } 1970 1971 // The request was rejected because of an AWS CloudHSM internal failure. The 1972 // request can be retried. 1973 type CloudHsmInternalFailureException struct { 1974 _ struct{} `type:"structure"` 1975 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1976 1977 Message_ *string `locationName:"Message" type:"string"` 1978 } 1979 1980 // String returns the string representation. 1981 // 1982 // API parameter values that are decorated as "sensitive" in the API will not 1983 // be included in the string output. The member name will be present, but the 1984 // value will be replaced with "sensitive". 1985 func (s CloudHsmInternalFailureException) String() string { 1986 return awsutil.Prettify(s) 1987 } 1988 1989 // GoString returns the string representation. 1990 // 1991 // API parameter values that are decorated as "sensitive" in the API will not 1992 // be included in the string output. The member name will be present, but the 1993 // value will be replaced with "sensitive". 1994 func (s CloudHsmInternalFailureException) GoString() string { 1995 return s.String() 1996 } 1997 1998 func newErrorCloudHsmInternalFailureException(v protocol.ResponseMetadata) error { 1999 return &CloudHsmInternalFailureException{ 2000 RespMetadata: v, 2001 } 2002 } 2003 2004 // Code returns the exception type name. 2005 func (s *CloudHsmInternalFailureException) Code() string { 2006 return "CloudHsmInternalFailureException" 2007 } 2008 2009 // Message returns the exception's message. 2010 func (s *CloudHsmInternalFailureException) Message() string { 2011 if s.Message_ != nil { 2012 return *s.Message_ 2013 } 2014 return "" 2015 } 2016 2017 // OrigErr always returns nil, satisfies awserr.Error interface. 2018 func (s *CloudHsmInternalFailureException) OrigErr() error { 2019 return nil 2020 } 2021 2022 func (s *CloudHsmInternalFailureException) Error() string { 2023 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2024 } 2025 2026 // Status code returns the HTTP status code for the request's response error. 2027 func (s *CloudHsmInternalFailureException) StatusCode() int { 2028 return s.RespMetadata.StatusCode 2029 } 2030 2031 // RequestID returns the service's response RequestID for request. 2032 func (s *CloudHsmInternalFailureException) RequestID() string { 2033 return s.RespMetadata.RequestID 2034 } 2035 2036 // The request was rejected because it is not a valid request. 2037 type CloudHsmInvalidRequestException struct { 2038 _ struct{} `type:"structure"` 2039 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2040 2041 Message_ *string `locationName:"Message" type:"string"` 2042 } 2043 2044 // String returns the string representation. 2045 // 2046 // API parameter values that are decorated as "sensitive" in the API will not 2047 // be included in the string output. The member name will be present, but the 2048 // value will be replaced with "sensitive". 2049 func (s CloudHsmInvalidRequestException) String() string { 2050 return awsutil.Prettify(s) 2051 } 2052 2053 // GoString returns the string representation. 2054 // 2055 // API parameter values that are decorated as "sensitive" in the API will not 2056 // be included in the string output. The member name will be present, but the 2057 // value will be replaced with "sensitive". 2058 func (s CloudHsmInvalidRequestException) GoString() string { 2059 return s.String() 2060 } 2061 2062 func newErrorCloudHsmInvalidRequestException(v protocol.ResponseMetadata) error { 2063 return &CloudHsmInvalidRequestException{ 2064 RespMetadata: v, 2065 } 2066 } 2067 2068 // Code returns the exception type name. 2069 func (s *CloudHsmInvalidRequestException) Code() string { 2070 return "CloudHsmInvalidRequestException" 2071 } 2072 2073 // Message returns the exception's message. 2074 func (s *CloudHsmInvalidRequestException) Message() string { 2075 if s.Message_ != nil { 2076 return *s.Message_ 2077 } 2078 return "" 2079 } 2080 2081 // OrigErr always returns nil, satisfies awserr.Error interface. 2082 func (s *CloudHsmInvalidRequestException) OrigErr() error { 2083 return nil 2084 } 2085 2086 func (s *CloudHsmInvalidRequestException) Error() string { 2087 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2088 } 2089 2090 // Status code returns the HTTP status code for the request's response error. 2091 func (s *CloudHsmInvalidRequestException) StatusCode() int { 2092 return s.RespMetadata.StatusCode 2093 } 2094 2095 // RequestID returns the service's response RequestID for request. 2096 func (s *CloudHsmInvalidRequestException) RequestID() string { 2097 return s.RespMetadata.RequestID 2098 } 2099 2100 // The request was rejected because it refers to a resource that cannot be found. 2101 type CloudHsmResourceNotFoundException struct { 2102 _ struct{} `type:"structure"` 2103 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2104 2105 Message_ *string `locationName:"Message" type:"string"` 2106 } 2107 2108 // String returns the string representation. 2109 // 2110 // API parameter values that are decorated as "sensitive" in the API will not 2111 // be included in the string output. The member name will be present, but the 2112 // value will be replaced with "sensitive". 2113 func (s CloudHsmResourceNotFoundException) String() string { 2114 return awsutil.Prettify(s) 2115 } 2116 2117 // GoString returns the string representation. 2118 // 2119 // API parameter values that are decorated as "sensitive" in the API will not 2120 // be included in the string output. The member name will be present, but the 2121 // value will be replaced with "sensitive". 2122 func (s CloudHsmResourceNotFoundException) GoString() string { 2123 return s.String() 2124 } 2125 2126 func newErrorCloudHsmResourceNotFoundException(v protocol.ResponseMetadata) error { 2127 return &CloudHsmResourceNotFoundException{ 2128 RespMetadata: v, 2129 } 2130 } 2131 2132 // Code returns the exception type name. 2133 func (s *CloudHsmResourceNotFoundException) Code() string { 2134 return "CloudHsmResourceNotFoundException" 2135 } 2136 2137 // Message returns the exception's message. 2138 func (s *CloudHsmResourceNotFoundException) Message() string { 2139 if s.Message_ != nil { 2140 return *s.Message_ 2141 } 2142 return "" 2143 } 2144 2145 // OrigErr always returns nil, satisfies awserr.Error interface. 2146 func (s *CloudHsmResourceNotFoundException) OrigErr() error { 2147 return nil 2148 } 2149 2150 func (s *CloudHsmResourceNotFoundException) Error() string { 2151 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2152 } 2153 2154 // Status code returns the HTTP status code for the request's response error. 2155 func (s *CloudHsmResourceNotFoundException) StatusCode() int { 2156 return s.RespMetadata.StatusCode 2157 } 2158 2159 // RequestID returns the service's response RequestID for request. 2160 func (s *CloudHsmResourceNotFoundException) RequestID() string { 2161 return s.RespMetadata.RequestID 2162 } 2163 2164 // The request was rejected because an error occurred. 2165 type CloudHsmServiceException struct { 2166 _ struct{} `type:"structure"` 2167 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2168 2169 Message_ *string `locationName:"Message" type:"string"` 2170 } 2171 2172 // String returns the string representation. 2173 // 2174 // API parameter values that are decorated as "sensitive" in the API will not 2175 // be included in the string output. The member name will be present, but the 2176 // value will be replaced with "sensitive". 2177 func (s CloudHsmServiceException) String() string { 2178 return awsutil.Prettify(s) 2179 } 2180 2181 // GoString returns the string representation. 2182 // 2183 // API parameter values that are decorated as "sensitive" in the API will not 2184 // be included in the string output. The member name will be present, but the 2185 // value will be replaced with "sensitive". 2186 func (s CloudHsmServiceException) GoString() string { 2187 return s.String() 2188 } 2189 2190 func newErrorCloudHsmServiceException(v protocol.ResponseMetadata) error { 2191 return &CloudHsmServiceException{ 2192 RespMetadata: v, 2193 } 2194 } 2195 2196 // Code returns the exception type name. 2197 func (s *CloudHsmServiceException) Code() string { 2198 return "CloudHsmServiceException" 2199 } 2200 2201 // Message returns the exception's message. 2202 func (s *CloudHsmServiceException) Message() string { 2203 if s.Message_ != nil { 2204 return *s.Message_ 2205 } 2206 return "" 2207 } 2208 2209 // OrigErr always returns nil, satisfies awserr.Error interface. 2210 func (s *CloudHsmServiceException) OrigErr() error { 2211 return nil 2212 } 2213 2214 func (s *CloudHsmServiceException) Error() string { 2215 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2216 } 2217 2218 // Status code returns the HTTP status code for the request's response error. 2219 func (s *CloudHsmServiceException) StatusCode() int { 2220 return s.RespMetadata.StatusCode 2221 } 2222 2223 // RequestID returns the service's response RequestID for request. 2224 func (s *CloudHsmServiceException) RequestID() string { 2225 return s.RespMetadata.RequestID 2226 } 2227 2228 // The request was rejected because of a tagging failure. Verify the tag conditions 2229 // in all applicable policies, and then retry the request. 2230 type CloudHsmTagException struct { 2231 _ struct{} `type:"structure"` 2232 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2233 2234 Message_ *string `locationName:"Message" type:"string"` 2235 } 2236 2237 // String returns the string representation. 2238 // 2239 // API parameter values that are decorated as "sensitive" in the API will not 2240 // be included in the string output. The member name will be present, but the 2241 // value will be replaced with "sensitive". 2242 func (s CloudHsmTagException) String() string { 2243 return awsutil.Prettify(s) 2244 } 2245 2246 // GoString returns the string representation. 2247 // 2248 // API parameter values that are decorated as "sensitive" in the API will not 2249 // be included in the string output. The member name will be present, but the 2250 // value will be replaced with "sensitive". 2251 func (s CloudHsmTagException) GoString() string { 2252 return s.String() 2253 } 2254 2255 func newErrorCloudHsmTagException(v protocol.ResponseMetadata) error { 2256 return &CloudHsmTagException{ 2257 RespMetadata: v, 2258 } 2259 } 2260 2261 // Code returns the exception type name. 2262 func (s *CloudHsmTagException) Code() string { 2263 return "CloudHsmTagException" 2264 } 2265 2266 // Message returns the exception's message. 2267 func (s *CloudHsmTagException) Message() string { 2268 if s.Message_ != nil { 2269 return *s.Message_ 2270 } 2271 return "" 2272 } 2273 2274 // OrigErr always returns nil, satisfies awserr.Error interface. 2275 func (s *CloudHsmTagException) OrigErr() error { 2276 return nil 2277 } 2278 2279 func (s *CloudHsmTagException) Error() string { 2280 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2281 } 2282 2283 // Status code returns the HTTP status code for the request's response error. 2284 func (s *CloudHsmTagException) StatusCode() int { 2285 return s.RespMetadata.StatusCode 2286 } 2287 2288 // RequestID returns the service's response RequestID for request. 2289 func (s *CloudHsmTagException) RequestID() string { 2290 return s.RespMetadata.RequestID 2291 } 2292 2293 // Contains information about an AWS CloudHSM cluster. 2294 type Cluster struct { 2295 _ struct{} `type:"structure"` 2296 2297 // The cluster's backup policy. 2298 BackupPolicy *string `type:"string" enum:"BackupPolicy"` 2299 2300 // A policy that defines how the service retains backups. 2301 BackupRetentionPolicy *BackupRetentionPolicy `type:"structure"` 2302 2303 // Contains one or more certificates or a certificate signing request (CSR). 2304 Certificates *Certificates `type:"structure"` 2305 2306 // The cluster's identifier (ID). 2307 ClusterId *string `type:"string"` 2308 2309 // The date and time when the cluster was created. 2310 CreateTimestamp *time.Time `type:"timestamp"` 2311 2312 // The type of HSM that the cluster contains. 2313 HsmType *string `type:"string"` 2314 2315 // Contains information about the HSMs in the cluster. 2316 Hsms []*Hsm `type:"list"` 2317 2318 // The default password for the cluster's Pre-Crypto Officer (PRECO) user. 2319 PreCoPassword *string `min:"7" type:"string"` 2320 2321 // The identifier (ID) of the cluster's security group. 2322 SecurityGroup *string `type:"string"` 2323 2324 // The identifier (ID) of the backup used to create the cluster. This value 2325 // exists only when the cluster was created from a backup. 2326 SourceBackupId *string `type:"string"` 2327 2328 // The cluster's state. 2329 State *string `type:"string" enum:"ClusterState"` 2330 2331 // A description of the cluster's state. 2332 StateMessage *string `type:"string"` 2333 2334 // A map from availability zone to the cluster’s subnet in that availability 2335 // zone. 2336 SubnetMapping map[string]*string `type:"map"` 2337 2338 // The list of tags for the cluster. 2339 TagList []*Tag `min:"1" type:"list"` 2340 2341 // The identifier (ID) of the virtual private cloud (VPC) that contains the 2342 // cluster. 2343 VpcId *string `type:"string"` 2344 } 2345 2346 // String returns the string representation. 2347 // 2348 // API parameter values that are decorated as "sensitive" in the API will not 2349 // be included in the string output. The member name will be present, but the 2350 // value will be replaced with "sensitive". 2351 func (s Cluster) String() string { 2352 return awsutil.Prettify(s) 2353 } 2354 2355 // GoString returns the string representation. 2356 // 2357 // API parameter values that are decorated as "sensitive" in the API will not 2358 // be included in the string output. The member name will be present, but the 2359 // value will be replaced with "sensitive". 2360 func (s Cluster) GoString() string { 2361 return s.String() 2362 } 2363 2364 // SetBackupPolicy sets the BackupPolicy field's value. 2365 func (s *Cluster) SetBackupPolicy(v string) *Cluster { 2366 s.BackupPolicy = &v 2367 return s 2368 } 2369 2370 // SetBackupRetentionPolicy sets the BackupRetentionPolicy field's value. 2371 func (s *Cluster) SetBackupRetentionPolicy(v *BackupRetentionPolicy) *Cluster { 2372 s.BackupRetentionPolicy = v 2373 return s 2374 } 2375 2376 // SetCertificates sets the Certificates field's value. 2377 func (s *Cluster) SetCertificates(v *Certificates) *Cluster { 2378 s.Certificates = v 2379 return s 2380 } 2381 2382 // SetClusterId sets the ClusterId field's value. 2383 func (s *Cluster) SetClusterId(v string) *Cluster { 2384 s.ClusterId = &v 2385 return s 2386 } 2387 2388 // SetCreateTimestamp sets the CreateTimestamp field's value. 2389 func (s *Cluster) SetCreateTimestamp(v time.Time) *Cluster { 2390 s.CreateTimestamp = &v 2391 return s 2392 } 2393 2394 // SetHsmType sets the HsmType field's value. 2395 func (s *Cluster) SetHsmType(v string) *Cluster { 2396 s.HsmType = &v 2397 return s 2398 } 2399 2400 // SetHsms sets the Hsms field's value. 2401 func (s *Cluster) SetHsms(v []*Hsm) *Cluster { 2402 s.Hsms = v 2403 return s 2404 } 2405 2406 // SetPreCoPassword sets the PreCoPassword field's value. 2407 func (s *Cluster) SetPreCoPassword(v string) *Cluster { 2408 s.PreCoPassword = &v 2409 return s 2410 } 2411 2412 // SetSecurityGroup sets the SecurityGroup field's value. 2413 func (s *Cluster) SetSecurityGroup(v string) *Cluster { 2414 s.SecurityGroup = &v 2415 return s 2416 } 2417 2418 // SetSourceBackupId sets the SourceBackupId field's value. 2419 func (s *Cluster) SetSourceBackupId(v string) *Cluster { 2420 s.SourceBackupId = &v 2421 return s 2422 } 2423 2424 // SetState sets the State field's value. 2425 func (s *Cluster) SetState(v string) *Cluster { 2426 s.State = &v 2427 return s 2428 } 2429 2430 // SetStateMessage sets the StateMessage field's value. 2431 func (s *Cluster) SetStateMessage(v string) *Cluster { 2432 s.StateMessage = &v 2433 return s 2434 } 2435 2436 // SetSubnetMapping sets the SubnetMapping field's value. 2437 func (s *Cluster) SetSubnetMapping(v map[string]*string) *Cluster { 2438 s.SubnetMapping = v 2439 return s 2440 } 2441 2442 // SetTagList sets the TagList field's value. 2443 func (s *Cluster) SetTagList(v []*Tag) *Cluster { 2444 s.TagList = v 2445 return s 2446 } 2447 2448 // SetVpcId sets the VpcId field's value. 2449 func (s *Cluster) SetVpcId(v string) *Cluster { 2450 s.VpcId = &v 2451 return s 2452 } 2453 2454 type CopyBackupToRegionInput struct { 2455 _ struct{} `type:"structure"` 2456 2457 // The ID of the backup that will be copied to the destination region. 2458 // 2459 // BackupId is a required field 2460 BackupId *string `type:"string" required:"true"` 2461 2462 // The AWS region that will contain your copied CloudHSM cluster backup. 2463 // 2464 // DestinationRegion is a required field 2465 DestinationRegion *string `type:"string" required:"true"` 2466 2467 // Tags to apply to the destination backup during creation. If you specify tags, 2468 // only these tags will be applied to the destination backup. If you do not 2469 // specify tags, the service copies tags from the source backup to the destination 2470 // backup. 2471 TagList []*Tag `min:"1" type:"list"` 2472 } 2473 2474 // String returns the string representation. 2475 // 2476 // API parameter values that are decorated as "sensitive" in the API will not 2477 // be included in the string output. The member name will be present, but the 2478 // value will be replaced with "sensitive". 2479 func (s CopyBackupToRegionInput) String() string { 2480 return awsutil.Prettify(s) 2481 } 2482 2483 // GoString returns the string representation. 2484 // 2485 // API parameter values that are decorated as "sensitive" in the API will not 2486 // be included in the string output. The member name will be present, but the 2487 // value will be replaced with "sensitive". 2488 func (s CopyBackupToRegionInput) GoString() string { 2489 return s.String() 2490 } 2491 2492 // Validate inspects the fields of the type to determine if they are valid. 2493 func (s *CopyBackupToRegionInput) Validate() error { 2494 invalidParams := request.ErrInvalidParams{Context: "CopyBackupToRegionInput"} 2495 if s.BackupId == nil { 2496 invalidParams.Add(request.NewErrParamRequired("BackupId")) 2497 } 2498 if s.DestinationRegion == nil { 2499 invalidParams.Add(request.NewErrParamRequired("DestinationRegion")) 2500 } 2501 if s.TagList != nil && len(s.TagList) < 1 { 2502 invalidParams.Add(request.NewErrParamMinLen("TagList", 1)) 2503 } 2504 if s.TagList != nil { 2505 for i, v := range s.TagList { 2506 if v == nil { 2507 continue 2508 } 2509 if err := v.Validate(); err != nil { 2510 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) 2511 } 2512 } 2513 } 2514 2515 if invalidParams.Len() > 0 { 2516 return invalidParams 2517 } 2518 return nil 2519 } 2520 2521 // SetBackupId sets the BackupId field's value. 2522 func (s *CopyBackupToRegionInput) SetBackupId(v string) *CopyBackupToRegionInput { 2523 s.BackupId = &v 2524 return s 2525 } 2526 2527 // SetDestinationRegion sets the DestinationRegion field's value. 2528 func (s *CopyBackupToRegionInput) SetDestinationRegion(v string) *CopyBackupToRegionInput { 2529 s.DestinationRegion = &v 2530 return s 2531 } 2532 2533 // SetTagList sets the TagList field's value. 2534 func (s *CopyBackupToRegionInput) SetTagList(v []*Tag) *CopyBackupToRegionInput { 2535 s.TagList = v 2536 return s 2537 } 2538 2539 type CopyBackupToRegionOutput struct { 2540 _ struct{} `type:"structure"` 2541 2542 // Information on the backup that will be copied to the destination region, 2543 // including CreateTimestamp, SourceBackup, SourceCluster, and Source Region. 2544 // CreateTimestamp of the destination backup will be the same as that of the 2545 // source backup. 2546 // 2547 // You will need to use the sourceBackupID returned in this operation to use 2548 // the DescribeBackups operation on the backup that will be copied to the destination 2549 // region. 2550 DestinationBackup *DestinationBackup `type:"structure"` 2551 } 2552 2553 // String returns the string representation. 2554 // 2555 // API parameter values that are decorated as "sensitive" in the API will not 2556 // be included in the string output. The member name will be present, but the 2557 // value will be replaced with "sensitive". 2558 func (s CopyBackupToRegionOutput) String() string { 2559 return awsutil.Prettify(s) 2560 } 2561 2562 // GoString returns the string representation. 2563 // 2564 // API parameter values that are decorated as "sensitive" in the API will not 2565 // be included in the string output. The member name will be present, but the 2566 // value will be replaced with "sensitive". 2567 func (s CopyBackupToRegionOutput) GoString() string { 2568 return s.String() 2569 } 2570 2571 // SetDestinationBackup sets the DestinationBackup field's value. 2572 func (s *CopyBackupToRegionOutput) SetDestinationBackup(v *DestinationBackup) *CopyBackupToRegionOutput { 2573 s.DestinationBackup = v 2574 return s 2575 } 2576 2577 type CreateClusterInput struct { 2578 _ struct{} `type:"structure"` 2579 2580 // A policy that defines how the service retains backups. 2581 BackupRetentionPolicy *BackupRetentionPolicy `type:"structure"` 2582 2583 // The type of HSM to use in the cluster. Currently the only allowed value is 2584 // hsm1.medium. 2585 // 2586 // HsmType is a required field 2587 HsmType *string `type:"string" required:"true"` 2588 2589 // The identifier (ID) of the cluster backup to restore. Use this value to restore 2590 // the cluster from a backup instead of creating a new cluster. To find the 2591 // backup ID, use DescribeBackups. 2592 SourceBackupId *string `type:"string"` 2593 2594 // The identifiers (IDs) of the subnets where you are creating the cluster. 2595 // You must specify at least one subnet. If you specify multiple subnets, they 2596 // must meet the following criteria: 2597 // 2598 // * All subnets must be in the same virtual private cloud (VPC). 2599 // 2600 // * You can specify only one subnet per Availability Zone. 2601 // 2602 // SubnetIds is a required field 2603 SubnetIds []*string `min:"1" type:"list" required:"true"` 2604 2605 // Tags to apply to the CloudHSM cluster during creation. 2606 TagList []*Tag `min:"1" type:"list"` 2607 } 2608 2609 // String returns the string representation. 2610 // 2611 // API parameter values that are decorated as "sensitive" in the API will not 2612 // be included in the string output. The member name will be present, but the 2613 // value will be replaced with "sensitive". 2614 func (s CreateClusterInput) String() string { 2615 return awsutil.Prettify(s) 2616 } 2617 2618 // GoString returns the string representation. 2619 // 2620 // API parameter values that are decorated as "sensitive" in the API will not 2621 // be included in the string output. The member name will be present, but the 2622 // value will be replaced with "sensitive". 2623 func (s CreateClusterInput) GoString() string { 2624 return s.String() 2625 } 2626 2627 // Validate inspects the fields of the type to determine if they are valid. 2628 func (s *CreateClusterInput) Validate() error { 2629 invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} 2630 if s.HsmType == nil { 2631 invalidParams.Add(request.NewErrParamRequired("HsmType")) 2632 } 2633 if s.SubnetIds == nil { 2634 invalidParams.Add(request.NewErrParamRequired("SubnetIds")) 2635 } 2636 if s.SubnetIds != nil && len(s.SubnetIds) < 1 { 2637 invalidParams.Add(request.NewErrParamMinLen("SubnetIds", 1)) 2638 } 2639 if s.TagList != nil && len(s.TagList) < 1 { 2640 invalidParams.Add(request.NewErrParamMinLen("TagList", 1)) 2641 } 2642 if s.BackupRetentionPolicy != nil { 2643 if err := s.BackupRetentionPolicy.Validate(); err != nil { 2644 invalidParams.AddNested("BackupRetentionPolicy", err.(request.ErrInvalidParams)) 2645 } 2646 } 2647 if s.TagList != nil { 2648 for i, v := range s.TagList { 2649 if v == nil { 2650 continue 2651 } 2652 if err := v.Validate(); err != nil { 2653 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) 2654 } 2655 } 2656 } 2657 2658 if invalidParams.Len() > 0 { 2659 return invalidParams 2660 } 2661 return nil 2662 } 2663 2664 // SetBackupRetentionPolicy sets the BackupRetentionPolicy field's value. 2665 func (s *CreateClusterInput) SetBackupRetentionPolicy(v *BackupRetentionPolicy) *CreateClusterInput { 2666 s.BackupRetentionPolicy = v 2667 return s 2668 } 2669 2670 // SetHsmType sets the HsmType field's value. 2671 func (s *CreateClusterInput) SetHsmType(v string) *CreateClusterInput { 2672 s.HsmType = &v 2673 return s 2674 } 2675 2676 // SetSourceBackupId sets the SourceBackupId field's value. 2677 func (s *CreateClusterInput) SetSourceBackupId(v string) *CreateClusterInput { 2678 s.SourceBackupId = &v 2679 return s 2680 } 2681 2682 // SetSubnetIds sets the SubnetIds field's value. 2683 func (s *CreateClusterInput) SetSubnetIds(v []*string) *CreateClusterInput { 2684 s.SubnetIds = v 2685 return s 2686 } 2687 2688 // SetTagList sets the TagList field's value. 2689 func (s *CreateClusterInput) SetTagList(v []*Tag) *CreateClusterInput { 2690 s.TagList = v 2691 return s 2692 } 2693 2694 type CreateClusterOutput struct { 2695 _ struct{} `type:"structure"` 2696 2697 // Information about the cluster that was created. 2698 Cluster *Cluster `type:"structure"` 2699 } 2700 2701 // String returns the string representation. 2702 // 2703 // API parameter values that are decorated as "sensitive" in the API will not 2704 // be included in the string output. The member name will be present, but the 2705 // value will be replaced with "sensitive". 2706 func (s CreateClusterOutput) String() string { 2707 return awsutil.Prettify(s) 2708 } 2709 2710 // GoString returns the string representation. 2711 // 2712 // API parameter values that are decorated as "sensitive" in the API will not 2713 // be included in the string output. The member name will be present, but the 2714 // value will be replaced with "sensitive". 2715 func (s CreateClusterOutput) GoString() string { 2716 return s.String() 2717 } 2718 2719 // SetCluster sets the Cluster field's value. 2720 func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { 2721 s.Cluster = v 2722 return s 2723 } 2724 2725 type CreateHsmInput struct { 2726 _ struct{} `type:"structure"` 2727 2728 // The Availability Zone where you are creating the HSM. To find the cluster's 2729 // Availability Zones, use DescribeClusters. 2730 // 2731 // AvailabilityZone is a required field 2732 AvailabilityZone *string `type:"string" required:"true"` 2733 2734 // The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters. 2735 // 2736 // ClusterId is a required field 2737 ClusterId *string `type:"string" required:"true"` 2738 2739 // The HSM's IP address. If you specify an IP address, use an available address 2740 // from the subnet that maps to the Availability Zone where you are creating 2741 // the HSM. If you don't specify an IP address, one is chosen for you from that 2742 // subnet. 2743 IpAddress *string `type:"string"` 2744 } 2745 2746 // String returns the string representation. 2747 // 2748 // API parameter values that are decorated as "sensitive" in the API will not 2749 // be included in the string output. The member name will be present, but the 2750 // value will be replaced with "sensitive". 2751 func (s CreateHsmInput) String() string { 2752 return awsutil.Prettify(s) 2753 } 2754 2755 // GoString returns the string representation. 2756 // 2757 // API parameter values that are decorated as "sensitive" in the API will not 2758 // be included in the string output. The member name will be present, but the 2759 // value will be replaced with "sensitive". 2760 func (s CreateHsmInput) GoString() string { 2761 return s.String() 2762 } 2763 2764 // Validate inspects the fields of the type to determine if they are valid. 2765 func (s *CreateHsmInput) Validate() error { 2766 invalidParams := request.ErrInvalidParams{Context: "CreateHsmInput"} 2767 if s.AvailabilityZone == nil { 2768 invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) 2769 } 2770 if s.ClusterId == nil { 2771 invalidParams.Add(request.NewErrParamRequired("ClusterId")) 2772 } 2773 2774 if invalidParams.Len() > 0 { 2775 return invalidParams 2776 } 2777 return nil 2778 } 2779 2780 // SetAvailabilityZone sets the AvailabilityZone field's value. 2781 func (s *CreateHsmInput) SetAvailabilityZone(v string) *CreateHsmInput { 2782 s.AvailabilityZone = &v 2783 return s 2784 } 2785 2786 // SetClusterId sets the ClusterId field's value. 2787 func (s *CreateHsmInput) SetClusterId(v string) *CreateHsmInput { 2788 s.ClusterId = &v 2789 return s 2790 } 2791 2792 // SetIpAddress sets the IpAddress field's value. 2793 func (s *CreateHsmInput) SetIpAddress(v string) *CreateHsmInput { 2794 s.IpAddress = &v 2795 return s 2796 } 2797 2798 type CreateHsmOutput struct { 2799 _ struct{} `type:"structure"` 2800 2801 // Information about the HSM that was created. 2802 Hsm *Hsm `type:"structure"` 2803 } 2804 2805 // String returns the string representation. 2806 // 2807 // API parameter values that are decorated as "sensitive" in the API will not 2808 // be included in the string output. The member name will be present, but the 2809 // value will be replaced with "sensitive". 2810 func (s CreateHsmOutput) String() string { 2811 return awsutil.Prettify(s) 2812 } 2813 2814 // GoString returns the string representation. 2815 // 2816 // API parameter values that are decorated as "sensitive" in the API will not 2817 // be included in the string output. The member name will be present, but the 2818 // value will be replaced with "sensitive". 2819 func (s CreateHsmOutput) GoString() string { 2820 return s.String() 2821 } 2822 2823 // SetHsm sets the Hsm field's value. 2824 func (s *CreateHsmOutput) SetHsm(v *Hsm) *CreateHsmOutput { 2825 s.Hsm = v 2826 return s 2827 } 2828 2829 type DeleteBackupInput struct { 2830 _ struct{} `type:"structure"` 2831 2832 // The ID of the backup to be deleted. To find the ID of a backup, use the DescribeBackups 2833 // operation. 2834 // 2835 // BackupId is a required field 2836 BackupId *string `type:"string" required:"true"` 2837 } 2838 2839 // String returns the string representation. 2840 // 2841 // API parameter values that are decorated as "sensitive" in the API will not 2842 // be included in the string output. The member name will be present, but the 2843 // value will be replaced with "sensitive". 2844 func (s DeleteBackupInput) String() string { 2845 return awsutil.Prettify(s) 2846 } 2847 2848 // GoString returns the string representation. 2849 // 2850 // API parameter values that are decorated as "sensitive" in the API will not 2851 // be included in the string output. The member name will be present, but the 2852 // value will be replaced with "sensitive". 2853 func (s DeleteBackupInput) GoString() string { 2854 return s.String() 2855 } 2856 2857 // Validate inspects the fields of the type to determine if they are valid. 2858 func (s *DeleteBackupInput) Validate() error { 2859 invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"} 2860 if s.BackupId == nil { 2861 invalidParams.Add(request.NewErrParamRequired("BackupId")) 2862 } 2863 2864 if invalidParams.Len() > 0 { 2865 return invalidParams 2866 } 2867 return nil 2868 } 2869 2870 // SetBackupId sets the BackupId field's value. 2871 func (s *DeleteBackupInput) SetBackupId(v string) *DeleteBackupInput { 2872 s.BackupId = &v 2873 return s 2874 } 2875 2876 type DeleteBackupOutput struct { 2877 _ struct{} `type:"structure"` 2878 2879 // Information on the Backup object deleted. 2880 Backup *Backup `type:"structure"` 2881 } 2882 2883 // String returns the string representation. 2884 // 2885 // API parameter values that are decorated as "sensitive" in the API will not 2886 // be included in the string output. The member name will be present, but the 2887 // value will be replaced with "sensitive". 2888 func (s DeleteBackupOutput) String() string { 2889 return awsutil.Prettify(s) 2890 } 2891 2892 // GoString returns the string representation. 2893 // 2894 // API parameter values that are decorated as "sensitive" in the API will not 2895 // be included in the string output. The member name will be present, but the 2896 // value will be replaced with "sensitive". 2897 func (s DeleteBackupOutput) GoString() string { 2898 return s.String() 2899 } 2900 2901 // SetBackup sets the Backup field's value. 2902 func (s *DeleteBackupOutput) SetBackup(v *Backup) *DeleteBackupOutput { 2903 s.Backup = v 2904 return s 2905 } 2906 2907 type DeleteClusterInput struct { 2908 _ struct{} `type:"structure"` 2909 2910 // The identifier (ID) of the cluster that you are deleting. To find the cluster 2911 // ID, use DescribeClusters. 2912 // 2913 // ClusterId is a required field 2914 ClusterId *string `type:"string" required:"true"` 2915 } 2916 2917 // String returns the string representation. 2918 // 2919 // API parameter values that are decorated as "sensitive" in the API will not 2920 // be included in the string output. The member name will be present, but the 2921 // value will be replaced with "sensitive". 2922 func (s DeleteClusterInput) String() string { 2923 return awsutil.Prettify(s) 2924 } 2925 2926 // GoString returns the string representation. 2927 // 2928 // API parameter values that are decorated as "sensitive" in the API will not 2929 // be included in the string output. The member name will be present, but the 2930 // value will be replaced with "sensitive". 2931 func (s DeleteClusterInput) GoString() string { 2932 return s.String() 2933 } 2934 2935 // Validate inspects the fields of the type to determine if they are valid. 2936 func (s *DeleteClusterInput) Validate() error { 2937 invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} 2938 if s.ClusterId == nil { 2939 invalidParams.Add(request.NewErrParamRequired("ClusterId")) 2940 } 2941 2942 if invalidParams.Len() > 0 { 2943 return invalidParams 2944 } 2945 return nil 2946 } 2947 2948 // SetClusterId sets the ClusterId field's value. 2949 func (s *DeleteClusterInput) SetClusterId(v string) *DeleteClusterInput { 2950 s.ClusterId = &v 2951 return s 2952 } 2953 2954 type DeleteClusterOutput struct { 2955 _ struct{} `type:"structure"` 2956 2957 // Information about the cluster that was deleted. 2958 Cluster *Cluster `type:"structure"` 2959 } 2960 2961 // String returns the string representation. 2962 // 2963 // API parameter values that are decorated as "sensitive" in the API will not 2964 // be included in the string output. The member name will be present, but the 2965 // value will be replaced with "sensitive". 2966 func (s DeleteClusterOutput) String() string { 2967 return awsutil.Prettify(s) 2968 } 2969 2970 // GoString returns the string representation. 2971 // 2972 // API parameter values that are decorated as "sensitive" in the API will not 2973 // be included in the string output. The member name will be present, but the 2974 // value will be replaced with "sensitive". 2975 func (s DeleteClusterOutput) GoString() string { 2976 return s.String() 2977 } 2978 2979 // SetCluster sets the Cluster field's value. 2980 func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { 2981 s.Cluster = v 2982 return s 2983 } 2984 2985 type DeleteHsmInput struct { 2986 _ struct{} `type:"structure"` 2987 2988 // The identifier (ID) of the cluster that contains the HSM that you are deleting. 2989 // 2990 // ClusterId is a required field 2991 ClusterId *string `type:"string" required:"true"` 2992 2993 // The identifier (ID) of the elastic network interface (ENI) of the HSM that 2994 // you are deleting. 2995 EniId *string `type:"string"` 2996 2997 // The IP address of the elastic network interface (ENI) of the HSM that you 2998 // are deleting. 2999 EniIp *string `type:"string"` 3000 3001 // The identifier (ID) of the HSM that you are deleting. 3002 HsmId *string `type:"string"` 3003 } 3004 3005 // String returns the string representation. 3006 // 3007 // API parameter values that are decorated as "sensitive" in the API will not 3008 // be included in the string output. The member name will be present, but the 3009 // value will be replaced with "sensitive". 3010 func (s DeleteHsmInput) String() string { 3011 return awsutil.Prettify(s) 3012 } 3013 3014 // GoString returns the string representation. 3015 // 3016 // API parameter values that are decorated as "sensitive" in the API will not 3017 // be included in the string output. The member name will be present, but the 3018 // value will be replaced with "sensitive". 3019 func (s DeleteHsmInput) GoString() string { 3020 return s.String() 3021 } 3022 3023 // Validate inspects the fields of the type to determine if they are valid. 3024 func (s *DeleteHsmInput) Validate() error { 3025 invalidParams := request.ErrInvalidParams{Context: "DeleteHsmInput"} 3026 if s.ClusterId == nil { 3027 invalidParams.Add(request.NewErrParamRequired("ClusterId")) 3028 } 3029 3030 if invalidParams.Len() > 0 { 3031 return invalidParams 3032 } 3033 return nil 3034 } 3035 3036 // SetClusterId sets the ClusterId field's value. 3037 func (s *DeleteHsmInput) SetClusterId(v string) *DeleteHsmInput { 3038 s.ClusterId = &v 3039 return s 3040 } 3041 3042 // SetEniId sets the EniId field's value. 3043 func (s *DeleteHsmInput) SetEniId(v string) *DeleteHsmInput { 3044 s.EniId = &v 3045 return s 3046 } 3047 3048 // SetEniIp sets the EniIp field's value. 3049 func (s *DeleteHsmInput) SetEniIp(v string) *DeleteHsmInput { 3050 s.EniIp = &v 3051 return s 3052 } 3053 3054 // SetHsmId sets the HsmId field's value. 3055 func (s *DeleteHsmInput) SetHsmId(v string) *DeleteHsmInput { 3056 s.HsmId = &v 3057 return s 3058 } 3059 3060 type DeleteHsmOutput struct { 3061 _ struct{} `type:"structure"` 3062 3063 // The identifier (ID) of the HSM that was deleted. 3064 HsmId *string `type:"string"` 3065 } 3066 3067 // String returns the string representation. 3068 // 3069 // API parameter values that are decorated as "sensitive" in the API will not 3070 // be included in the string output. The member name will be present, but the 3071 // value will be replaced with "sensitive". 3072 func (s DeleteHsmOutput) String() string { 3073 return awsutil.Prettify(s) 3074 } 3075 3076 // GoString returns the string representation. 3077 // 3078 // API parameter values that are decorated as "sensitive" in the API will not 3079 // be included in the string output. The member name will be present, but the 3080 // value will be replaced with "sensitive". 3081 func (s DeleteHsmOutput) GoString() string { 3082 return s.String() 3083 } 3084 3085 // SetHsmId sets the HsmId field's value. 3086 func (s *DeleteHsmOutput) SetHsmId(v string) *DeleteHsmOutput { 3087 s.HsmId = &v 3088 return s 3089 } 3090 3091 type DescribeBackupsInput struct { 3092 _ struct{} `type:"structure"` 3093 3094 // One or more filters to limit the items returned in the response. 3095 // 3096 // Use the backupIds filter to return only the specified backups. Specify backups 3097 // by their backup identifier (ID). 3098 // 3099 // Use the sourceBackupIds filter to return only the backups created from a 3100 // source backup. The sourceBackupID of a source backup is returned by the CopyBackupToRegion 3101 // operation. 3102 // 3103 // Use the clusterIds filter to return only the backups for the specified clusters. 3104 // Specify clusters by their cluster identifier (ID). 3105 // 3106 // Use the states filter to return only backups that match the specified state. 3107 // 3108 // Use the neverExpires filter to return backups filtered by the value in the 3109 // neverExpires parameter. True returns all backups exempt from the backup retention 3110 // policy. False returns all backups with a backup retention policy defined 3111 // at the cluster. 3112 Filters map[string][]*string `type:"map"` 3113 3114 // The maximum number of backups to return in the response. When there are more 3115 // backups than the number you specify, the response contains a NextToken value. 3116 MaxResults *int64 `min:"1" type:"integer"` 3117 3118 // The NextToken value that you received in the previous response. Use this 3119 // value to get more backups. 3120 NextToken *string `type:"string"` 3121 3122 // Designates whether or not to sort the return backups by ascending chronological 3123 // order of generation. 3124 SortAscending *bool `type:"boolean"` 3125 } 3126 3127 // String returns the string representation. 3128 // 3129 // API parameter values that are decorated as "sensitive" in the API will not 3130 // be included in the string output. The member name will be present, but the 3131 // value will be replaced with "sensitive". 3132 func (s DescribeBackupsInput) String() string { 3133 return awsutil.Prettify(s) 3134 } 3135 3136 // GoString returns the string representation. 3137 // 3138 // API parameter values that are decorated as "sensitive" in the API will not 3139 // be included in the string output. The member name will be present, but the 3140 // value will be replaced with "sensitive". 3141 func (s DescribeBackupsInput) GoString() string { 3142 return s.String() 3143 } 3144 3145 // Validate inspects the fields of the type to determine if they are valid. 3146 func (s *DescribeBackupsInput) Validate() error { 3147 invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"} 3148 if s.MaxResults != nil && *s.MaxResults < 1 { 3149 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3150 } 3151 3152 if invalidParams.Len() > 0 { 3153 return invalidParams 3154 } 3155 return nil 3156 } 3157 3158 // SetFilters sets the Filters field's value. 3159 func (s *DescribeBackupsInput) SetFilters(v map[string][]*string) *DescribeBackupsInput { 3160 s.Filters = v 3161 return s 3162 } 3163 3164 // SetMaxResults sets the MaxResults field's value. 3165 func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput { 3166 s.MaxResults = &v 3167 return s 3168 } 3169 3170 // SetNextToken sets the NextToken field's value. 3171 func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput { 3172 s.NextToken = &v 3173 return s 3174 } 3175 3176 // SetSortAscending sets the SortAscending field's value. 3177 func (s *DescribeBackupsInput) SetSortAscending(v bool) *DescribeBackupsInput { 3178 s.SortAscending = &v 3179 return s 3180 } 3181 3182 type DescribeBackupsOutput struct { 3183 _ struct{} `type:"structure"` 3184 3185 // A list of backups. 3186 Backups []*Backup `type:"list"` 3187 3188 // An opaque string that indicates that the response contains only a subset 3189 // of backups. Use this value in a subsequent DescribeBackups request to get 3190 // more backups. 3191 NextToken *string `type:"string"` 3192 } 3193 3194 // String returns the string representation. 3195 // 3196 // API parameter values that are decorated as "sensitive" in the API will not 3197 // be included in the string output. The member name will be present, but the 3198 // value will be replaced with "sensitive". 3199 func (s DescribeBackupsOutput) String() string { 3200 return awsutil.Prettify(s) 3201 } 3202 3203 // GoString returns the string representation. 3204 // 3205 // API parameter values that are decorated as "sensitive" in the API will not 3206 // be included in the string output. The member name will be present, but the 3207 // value will be replaced with "sensitive". 3208 func (s DescribeBackupsOutput) GoString() string { 3209 return s.String() 3210 } 3211 3212 // SetBackups sets the Backups field's value. 3213 func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput { 3214 s.Backups = v 3215 return s 3216 } 3217 3218 // SetNextToken sets the NextToken field's value. 3219 func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput { 3220 s.NextToken = &v 3221 return s 3222 } 3223 3224 type DescribeClustersInput struct { 3225 _ struct{} `type:"structure"` 3226 3227 // One or more filters to limit the items returned in the response. 3228 // 3229 // Use the clusterIds filter to return only the specified clusters. Specify 3230 // clusters by their cluster identifier (ID). 3231 // 3232 // Use the vpcIds filter to return only the clusters in the specified virtual 3233 // private clouds (VPCs). Specify VPCs by their VPC identifier (ID). 3234 // 3235 // Use the states filter to return only clusters that match the specified state. 3236 Filters map[string][]*string `type:"map"` 3237 3238 // The maximum number of clusters to return in the response. When there are 3239 // more clusters than the number you specify, the response contains a NextToken 3240 // value. 3241 MaxResults *int64 `min:"1" type:"integer"` 3242 3243 // The NextToken value that you received in the previous response. Use this 3244 // value to get more clusters. 3245 NextToken *string `type:"string"` 3246 } 3247 3248 // String returns the string representation. 3249 // 3250 // API parameter values that are decorated as "sensitive" in the API will not 3251 // be included in the string output. The member name will be present, but the 3252 // value will be replaced with "sensitive". 3253 func (s DescribeClustersInput) String() string { 3254 return awsutil.Prettify(s) 3255 } 3256 3257 // GoString returns the string representation. 3258 // 3259 // API parameter values that are decorated as "sensitive" in the API will not 3260 // be included in the string output. The member name will be present, but the 3261 // value will be replaced with "sensitive". 3262 func (s DescribeClustersInput) GoString() string { 3263 return s.String() 3264 } 3265 3266 // Validate inspects the fields of the type to determine if they are valid. 3267 func (s *DescribeClustersInput) Validate() error { 3268 invalidParams := request.ErrInvalidParams{Context: "DescribeClustersInput"} 3269 if s.MaxResults != nil && *s.MaxResults < 1 { 3270 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3271 } 3272 3273 if invalidParams.Len() > 0 { 3274 return invalidParams 3275 } 3276 return nil 3277 } 3278 3279 // SetFilters sets the Filters field's value. 3280 func (s *DescribeClustersInput) SetFilters(v map[string][]*string) *DescribeClustersInput { 3281 s.Filters = v 3282 return s 3283 } 3284 3285 // SetMaxResults sets the MaxResults field's value. 3286 func (s *DescribeClustersInput) SetMaxResults(v int64) *DescribeClustersInput { 3287 s.MaxResults = &v 3288 return s 3289 } 3290 3291 // SetNextToken sets the NextToken field's value. 3292 func (s *DescribeClustersInput) SetNextToken(v string) *DescribeClustersInput { 3293 s.NextToken = &v 3294 return s 3295 } 3296 3297 type DescribeClustersOutput struct { 3298 _ struct{} `type:"structure"` 3299 3300 // A list of clusters. 3301 Clusters []*Cluster `type:"list"` 3302 3303 // An opaque string that indicates that the response contains only a subset 3304 // of clusters. Use this value in a subsequent DescribeClusters request to get 3305 // more clusters. 3306 NextToken *string `type:"string"` 3307 } 3308 3309 // String returns the string representation. 3310 // 3311 // API parameter values that are decorated as "sensitive" in the API will not 3312 // be included in the string output. The member name will be present, but the 3313 // value will be replaced with "sensitive". 3314 func (s DescribeClustersOutput) String() string { 3315 return awsutil.Prettify(s) 3316 } 3317 3318 // GoString returns the string representation. 3319 // 3320 // API parameter values that are decorated as "sensitive" in the API will not 3321 // be included in the string output. The member name will be present, but the 3322 // value will be replaced with "sensitive". 3323 func (s DescribeClustersOutput) GoString() string { 3324 return s.String() 3325 } 3326 3327 // SetClusters sets the Clusters field's value. 3328 func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput { 3329 s.Clusters = v 3330 return s 3331 } 3332 3333 // SetNextToken sets the NextToken field's value. 3334 func (s *DescribeClustersOutput) SetNextToken(v string) *DescribeClustersOutput { 3335 s.NextToken = &v 3336 return s 3337 } 3338 3339 // Contains information about the backup that will be copied and created by 3340 // the CopyBackupToRegion operation. 3341 type DestinationBackup struct { 3342 _ struct{} `type:"structure"` 3343 3344 // The date and time when both the source backup was created. 3345 CreateTimestamp *time.Time `type:"timestamp"` 3346 3347 // The identifier (ID) of the source backup from which the new backup was copied. 3348 SourceBackup *string `type:"string"` 3349 3350 // The identifier (ID) of the cluster containing the source backup from which 3351 // the new backup was copied. 3352 SourceCluster *string `type:"string"` 3353 3354 // The AWS region that contains the source backup from which the new backup 3355 // was copied. 3356 SourceRegion *string `type:"string"` 3357 } 3358 3359 // String returns the string representation. 3360 // 3361 // API parameter values that are decorated as "sensitive" in the API will not 3362 // be included in the string output. The member name will be present, but the 3363 // value will be replaced with "sensitive". 3364 func (s DestinationBackup) String() string { 3365 return awsutil.Prettify(s) 3366 } 3367 3368 // GoString returns the string representation. 3369 // 3370 // API parameter values that are decorated as "sensitive" in the API will not 3371 // be included in the string output. The member name will be present, but the 3372 // value will be replaced with "sensitive". 3373 func (s DestinationBackup) GoString() string { 3374 return s.String() 3375 } 3376 3377 // SetCreateTimestamp sets the CreateTimestamp field's value. 3378 func (s *DestinationBackup) SetCreateTimestamp(v time.Time) *DestinationBackup { 3379 s.CreateTimestamp = &v 3380 return s 3381 } 3382 3383 // SetSourceBackup sets the SourceBackup field's value. 3384 func (s *DestinationBackup) SetSourceBackup(v string) *DestinationBackup { 3385 s.SourceBackup = &v 3386 return s 3387 } 3388 3389 // SetSourceCluster sets the SourceCluster field's value. 3390 func (s *DestinationBackup) SetSourceCluster(v string) *DestinationBackup { 3391 s.SourceCluster = &v 3392 return s 3393 } 3394 3395 // SetSourceRegion sets the SourceRegion field's value. 3396 func (s *DestinationBackup) SetSourceRegion(v string) *DestinationBackup { 3397 s.SourceRegion = &v 3398 return s 3399 } 3400 3401 // Contains information about a hardware security module (HSM) in an AWS CloudHSM 3402 // cluster. 3403 type Hsm struct { 3404 _ struct{} `type:"structure"` 3405 3406 // The Availability Zone that contains the HSM. 3407 AvailabilityZone *string `type:"string"` 3408 3409 // The identifier (ID) of the cluster that contains the HSM. 3410 ClusterId *string `type:"string"` 3411 3412 // The identifier (ID) of the HSM's elastic network interface (ENI). 3413 EniId *string `type:"string"` 3414 3415 // The IP address of the HSM's elastic network interface (ENI). 3416 EniIp *string `type:"string"` 3417 3418 // The HSM's identifier (ID). 3419 // 3420 // HsmId is a required field 3421 HsmId *string `type:"string" required:"true"` 3422 3423 // The HSM's state. 3424 State *string `type:"string" enum:"HsmState"` 3425 3426 // A description of the HSM's state. 3427 StateMessage *string `type:"string"` 3428 3429 // The subnet that contains the HSM's elastic network interface (ENI). 3430 SubnetId *string `type:"string"` 3431 } 3432 3433 // String returns the string representation. 3434 // 3435 // API parameter values that are decorated as "sensitive" in the API will not 3436 // be included in the string output. The member name will be present, but the 3437 // value will be replaced with "sensitive". 3438 func (s Hsm) String() string { 3439 return awsutil.Prettify(s) 3440 } 3441 3442 // GoString returns the string representation. 3443 // 3444 // API parameter values that are decorated as "sensitive" in the API will not 3445 // be included in the string output. The member name will be present, but the 3446 // value will be replaced with "sensitive". 3447 func (s Hsm) GoString() string { 3448 return s.String() 3449 } 3450 3451 // SetAvailabilityZone sets the AvailabilityZone field's value. 3452 func (s *Hsm) SetAvailabilityZone(v string) *Hsm { 3453 s.AvailabilityZone = &v 3454 return s 3455 } 3456 3457 // SetClusterId sets the ClusterId field's value. 3458 func (s *Hsm) SetClusterId(v string) *Hsm { 3459 s.ClusterId = &v 3460 return s 3461 } 3462 3463 // SetEniId sets the EniId field's value. 3464 func (s *Hsm) SetEniId(v string) *Hsm { 3465 s.EniId = &v 3466 return s 3467 } 3468 3469 // SetEniIp sets the EniIp field's value. 3470 func (s *Hsm) SetEniIp(v string) *Hsm { 3471 s.EniIp = &v 3472 return s 3473 } 3474 3475 // SetHsmId sets the HsmId field's value. 3476 func (s *Hsm) SetHsmId(v string) *Hsm { 3477 s.HsmId = &v 3478 return s 3479 } 3480 3481 // SetState sets the State field's value. 3482 func (s *Hsm) SetState(v string) *Hsm { 3483 s.State = &v 3484 return s 3485 } 3486 3487 // SetStateMessage sets the StateMessage field's value. 3488 func (s *Hsm) SetStateMessage(v string) *Hsm { 3489 s.StateMessage = &v 3490 return s 3491 } 3492 3493 // SetSubnetId sets the SubnetId field's value. 3494 func (s *Hsm) SetSubnetId(v string) *Hsm { 3495 s.SubnetId = &v 3496 return s 3497 } 3498 3499 type InitializeClusterInput struct { 3500 _ struct{} `type:"structure"` 3501 3502 // The identifier (ID) of the cluster that you are claiming. To find the cluster 3503 // ID, use DescribeClusters. 3504 // 3505 // ClusterId is a required field 3506 ClusterId *string `type:"string" required:"true"` 3507 3508 // The cluster certificate issued (signed) by your issuing certificate authority 3509 // (CA). The certificate must be in PEM format and can contain a maximum of 3510 // 5000 characters. 3511 // 3512 // SignedCert is a required field 3513 SignedCert *string `type:"string" required:"true"` 3514 3515 // The issuing certificate of the issuing certificate authority (CA) that issued 3516 // (signed) the cluster certificate. You must use a self-signed certificate. 3517 // The certificate used to sign the HSM CSR must be directly available, and 3518 // thus must be the root certificate. The certificate must be in PEM format 3519 // and can contain a maximum of 5000 characters. 3520 // 3521 // TrustAnchor is a required field 3522 TrustAnchor *string `type:"string" required:"true"` 3523 } 3524 3525 // String returns the string representation. 3526 // 3527 // API parameter values that are decorated as "sensitive" in the API will not 3528 // be included in the string output. The member name will be present, but the 3529 // value will be replaced with "sensitive". 3530 func (s InitializeClusterInput) String() string { 3531 return awsutil.Prettify(s) 3532 } 3533 3534 // GoString returns the string representation. 3535 // 3536 // API parameter values that are decorated as "sensitive" in the API will not 3537 // be included in the string output. The member name will be present, but the 3538 // value will be replaced with "sensitive". 3539 func (s InitializeClusterInput) GoString() string { 3540 return s.String() 3541 } 3542 3543 // Validate inspects the fields of the type to determine if they are valid. 3544 func (s *InitializeClusterInput) Validate() error { 3545 invalidParams := request.ErrInvalidParams{Context: "InitializeClusterInput"} 3546 if s.ClusterId == nil { 3547 invalidParams.Add(request.NewErrParamRequired("ClusterId")) 3548 } 3549 if s.SignedCert == nil { 3550 invalidParams.Add(request.NewErrParamRequired("SignedCert")) 3551 } 3552 if s.TrustAnchor == nil { 3553 invalidParams.Add(request.NewErrParamRequired("TrustAnchor")) 3554 } 3555 3556 if invalidParams.Len() > 0 { 3557 return invalidParams 3558 } 3559 return nil 3560 } 3561 3562 // SetClusterId sets the ClusterId field's value. 3563 func (s *InitializeClusterInput) SetClusterId(v string) *InitializeClusterInput { 3564 s.ClusterId = &v 3565 return s 3566 } 3567 3568 // SetSignedCert sets the SignedCert field's value. 3569 func (s *InitializeClusterInput) SetSignedCert(v string) *InitializeClusterInput { 3570 s.SignedCert = &v 3571 return s 3572 } 3573 3574 // SetTrustAnchor sets the TrustAnchor field's value. 3575 func (s *InitializeClusterInput) SetTrustAnchor(v string) *InitializeClusterInput { 3576 s.TrustAnchor = &v 3577 return s 3578 } 3579 3580 type InitializeClusterOutput struct { 3581 _ struct{} `type:"structure"` 3582 3583 // The cluster's state. 3584 State *string `type:"string" enum:"ClusterState"` 3585 3586 // A description of the cluster's state. 3587 StateMessage *string `type:"string"` 3588 } 3589 3590 // String returns the string representation. 3591 // 3592 // API parameter values that are decorated as "sensitive" in the API will not 3593 // be included in the string output. The member name will be present, but the 3594 // value will be replaced with "sensitive". 3595 func (s InitializeClusterOutput) String() string { 3596 return awsutil.Prettify(s) 3597 } 3598 3599 // GoString returns the string representation. 3600 // 3601 // API parameter values that are decorated as "sensitive" in the API will not 3602 // be included in the string output. The member name will be present, but the 3603 // value will be replaced with "sensitive". 3604 func (s InitializeClusterOutput) GoString() string { 3605 return s.String() 3606 } 3607 3608 // SetState sets the State field's value. 3609 func (s *InitializeClusterOutput) SetState(v string) *InitializeClusterOutput { 3610 s.State = &v 3611 return s 3612 } 3613 3614 // SetStateMessage sets the StateMessage field's value. 3615 func (s *InitializeClusterOutput) SetStateMessage(v string) *InitializeClusterOutput { 3616 s.StateMessage = &v 3617 return s 3618 } 3619 3620 type ListTagsInput struct { 3621 _ struct{} `type:"structure"` 3622 3623 // The maximum number of tags to return in the response. When there are more 3624 // tags than the number you specify, the response contains a NextToken value. 3625 MaxResults *int64 `min:"1" type:"integer"` 3626 3627 // The NextToken value that you received in the previous response. Use this 3628 // value to get more tags. 3629 NextToken *string `type:"string"` 3630 3631 // The cluster identifier (ID) for the cluster whose tags you are getting. To 3632 // find the cluster ID, use DescribeClusters. 3633 // 3634 // ResourceId is a required field 3635 ResourceId *string `type:"string" required:"true"` 3636 } 3637 3638 // String returns the string representation. 3639 // 3640 // API parameter values that are decorated as "sensitive" in the API will not 3641 // be included in the string output. The member name will be present, but the 3642 // value will be replaced with "sensitive". 3643 func (s ListTagsInput) String() string { 3644 return awsutil.Prettify(s) 3645 } 3646 3647 // GoString returns the string representation. 3648 // 3649 // API parameter values that are decorated as "sensitive" in the API will not 3650 // be included in the string output. The member name will be present, but the 3651 // value will be replaced with "sensitive". 3652 func (s ListTagsInput) GoString() string { 3653 return s.String() 3654 } 3655 3656 // Validate inspects the fields of the type to determine if they are valid. 3657 func (s *ListTagsInput) Validate() error { 3658 invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} 3659 if s.MaxResults != nil && *s.MaxResults < 1 { 3660 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3661 } 3662 if s.ResourceId == nil { 3663 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 3664 } 3665 3666 if invalidParams.Len() > 0 { 3667 return invalidParams 3668 } 3669 return nil 3670 } 3671 3672 // SetMaxResults sets the MaxResults field's value. 3673 func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { 3674 s.MaxResults = &v 3675 return s 3676 } 3677 3678 // SetNextToken sets the NextToken field's value. 3679 func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { 3680 s.NextToken = &v 3681 return s 3682 } 3683 3684 // SetResourceId sets the ResourceId field's value. 3685 func (s *ListTagsInput) SetResourceId(v string) *ListTagsInput { 3686 s.ResourceId = &v 3687 return s 3688 } 3689 3690 type ListTagsOutput struct { 3691 _ struct{} `type:"structure"` 3692 3693 // An opaque string that indicates that the response contains only a subset 3694 // of tags. Use this value in a subsequent ListTags request to get more tags. 3695 NextToken *string `type:"string"` 3696 3697 // A list of tags. 3698 // 3699 // TagList is a required field 3700 TagList []*Tag `min:"1" type:"list" required:"true"` 3701 } 3702 3703 // String returns the string representation. 3704 // 3705 // API parameter values that are decorated as "sensitive" in the API will not 3706 // be included in the string output. The member name will be present, but the 3707 // value will be replaced with "sensitive". 3708 func (s ListTagsOutput) String() string { 3709 return awsutil.Prettify(s) 3710 } 3711 3712 // GoString returns the string representation. 3713 // 3714 // API parameter values that are decorated as "sensitive" in the API will not 3715 // be included in the string output. The member name will be present, but the 3716 // value will be replaced with "sensitive". 3717 func (s ListTagsOutput) GoString() string { 3718 return s.String() 3719 } 3720 3721 // SetNextToken sets the NextToken field's value. 3722 func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { 3723 s.NextToken = &v 3724 return s 3725 } 3726 3727 // SetTagList sets the TagList field's value. 3728 func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput { 3729 s.TagList = v 3730 return s 3731 } 3732 3733 type ModifyBackupAttributesInput struct { 3734 _ struct{} `type:"structure"` 3735 3736 // The identifier (ID) of the backup to modify. To find the ID of a backup, 3737 // use the DescribeBackups operation. 3738 // 3739 // BackupId is a required field 3740 BackupId *string `type:"string" required:"true"` 3741 3742 // Specifies whether the service should exempt a backup from the retention policy 3743 // for the cluster. True exempts a backup from the retention policy. False means 3744 // the service applies the backup retention policy defined at the cluster. 3745 // 3746 // NeverExpires is a required field 3747 NeverExpires *bool `type:"boolean" required:"true"` 3748 } 3749 3750 // String returns the string representation. 3751 // 3752 // API parameter values that are decorated as "sensitive" in the API will not 3753 // be included in the string output. The member name will be present, but the 3754 // value will be replaced with "sensitive". 3755 func (s ModifyBackupAttributesInput) String() string { 3756 return awsutil.Prettify(s) 3757 } 3758 3759 // GoString returns the string representation. 3760 // 3761 // API parameter values that are decorated as "sensitive" in the API will not 3762 // be included in the string output. The member name will be present, but the 3763 // value will be replaced with "sensitive". 3764 func (s ModifyBackupAttributesInput) GoString() string { 3765 return s.String() 3766 } 3767 3768 // Validate inspects the fields of the type to determine if they are valid. 3769 func (s *ModifyBackupAttributesInput) Validate() error { 3770 invalidParams := request.ErrInvalidParams{Context: "ModifyBackupAttributesInput"} 3771 if s.BackupId == nil { 3772 invalidParams.Add(request.NewErrParamRequired("BackupId")) 3773 } 3774 if s.NeverExpires == nil { 3775 invalidParams.Add(request.NewErrParamRequired("NeverExpires")) 3776 } 3777 3778 if invalidParams.Len() > 0 { 3779 return invalidParams 3780 } 3781 return nil 3782 } 3783 3784 // SetBackupId sets the BackupId field's value. 3785 func (s *ModifyBackupAttributesInput) SetBackupId(v string) *ModifyBackupAttributesInput { 3786 s.BackupId = &v 3787 return s 3788 } 3789 3790 // SetNeverExpires sets the NeverExpires field's value. 3791 func (s *ModifyBackupAttributesInput) SetNeverExpires(v bool) *ModifyBackupAttributesInput { 3792 s.NeverExpires = &v 3793 return s 3794 } 3795 3796 type ModifyBackupAttributesOutput struct { 3797 _ struct{} `type:"structure"` 3798 3799 // Contains information about a backup of an AWS CloudHSM cluster. All backup 3800 // objects contain the BackupId, BackupState, ClusterId, and CreateTimestamp 3801 // parameters. Backups that were copied into a destination region additionally 3802 // contain the CopyTimestamp, SourceBackup, SourceCluster, and SourceRegion 3803 // parameters. A backup that is pending deletion will include the DeleteTimestamp 3804 // parameter. 3805 Backup *Backup `type:"structure"` 3806 } 3807 3808 // String returns the string representation. 3809 // 3810 // API parameter values that are decorated as "sensitive" in the API will not 3811 // be included in the string output. The member name will be present, but the 3812 // value will be replaced with "sensitive". 3813 func (s ModifyBackupAttributesOutput) String() string { 3814 return awsutil.Prettify(s) 3815 } 3816 3817 // GoString returns the string representation. 3818 // 3819 // API parameter values that are decorated as "sensitive" in the API will not 3820 // be included in the string output. The member name will be present, but the 3821 // value will be replaced with "sensitive". 3822 func (s ModifyBackupAttributesOutput) GoString() string { 3823 return s.String() 3824 } 3825 3826 // SetBackup sets the Backup field's value. 3827 func (s *ModifyBackupAttributesOutput) SetBackup(v *Backup) *ModifyBackupAttributesOutput { 3828 s.Backup = v 3829 return s 3830 } 3831 3832 type ModifyClusterInput struct { 3833 _ struct{} `type:"structure"` 3834 3835 // A policy that defines how the service retains backups. 3836 // 3837 // BackupRetentionPolicy is a required field 3838 BackupRetentionPolicy *BackupRetentionPolicy `type:"structure" required:"true"` 3839 3840 // The identifier (ID) of the cluster that you want to modify. To find the cluster 3841 // ID, use DescribeClusters. 3842 // 3843 // ClusterId is a required field 3844 ClusterId *string `type:"string" required:"true"` 3845 } 3846 3847 // String returns the string representation. 3848 // 3849 // API parameter values that are decorated as "sensitive" in the API will not 3850 // be included in the string output. The member name will be present, but the 3851 // value will be replaced with "sensitive". 3852 func (s ModifyClusterInput) String() string { 3853 return awsutil.Prettify(s) 3854 } 3855 3856 // GoString returns the string representation. 3857 // 3858 // API parameter values that are decorated as "sensitive" in the API will not 3859 // be included in the string output. The member name will be present, but the 3860 // value will be replaced with "sensitive". 3861 func (s ModifyClusterInput) GoString() string { 3862 return s.String() 3863 } 3864 3865 // Validate inspects the fields of the type to determine if they are valid. 3866 func (s *ModifyClusterInput) Validate() error { 3867 invalidParams := request.ErrInvalidParams{Context: "ModifyClusterInput"} 3868 if s.BackupRetentionPolicy == nil { 3869 invalidParams.Add(request.NewErrParamRequired("BackupRetentionPolicy")) 3870 } 3871 if s.ClusterId == nil { 3872 invalidParams.Add(request.NewErrParamRequired("ClusterId")) 3873 } 3874 if s.BackupRetentionPolicy != nil { 3875 if err := s.BackupRetentionPolicy.Validate(); err != nil { 3876 invalidParams.AddNested("BackupRetentionPolicy", err.(request.ErrInvalidParams)) 3877 } 3878 } 3879 3880 if invalidParams.Len() > 0 { 3881 return invalidParams 3882 } 3883 return nil 3884 } 3885 3886 // SetBackupRetentionPolicy sets the BackupRetentionPolicy field's value. 3887 func (s *ModifyClusterInput) SetBackupRetentionPolicy(v *BackupRetentionPolicy) *ModifyClusterInput { 3888 s.BackupRetentionPolicy = v 3889 return s 3890 } 3891 3892 // SetClusterId sets the ClusterId field's value. 3893 func (s *ModifyClusterInput) SetClusterId(v string) *ModifyClusterInput { 3894 s.ClusterId = &v 3895 return s 3896 } 3897 3898 type ModifyClusterOutput struct { 3899 _ struct{} `type:"structure"` 3900 3901 // Contains information about an AWS CloudHSM cluster. 3902 Cluster *Cluster `type:"structure"` 3903 } 3904 3905 // String returns the string representation. 3906 // 3907 // API parameter values that are decorated as "sensitive" in the API will not 3908 // be included in the string output. The member name will be present, but the 3909 // value will be replaced with "sensitive". 3910 func (s ModifyClusterOutput) String() string { 3911 return awsutil.Prettify(s) 3912 } 3913 3914 // GoString returns the string representation. 3915 // 3916 // API parameter values that are decorated as "sensitive" in the API will not 3917 // be included in the string output. The member name will be present, but the 3918 // value will be replaced with "sensitive". 3919 func (s ModifyClusterOutput) GoString() string { 3920 return s.String() 3921 } 3922 3923 // SetCluster sets the Cluster field's value. 3924 func (s *ModifyClusterOutput) SetCluster(v *Cluster) *ModifyClusterOutput { 3925 s.Cluster = v 3926 return s 3927 } 3928 3929 type RestoreBackupInput struct { 3930 _ struct{} `type:"structure"` 3931 3932 // The ID of the backup to be restored. To find the ID of a backup, use the 3933 // DescribeBackups operation. 3934 // 3935 // BackupId is a required field 3936 BackupId *string `type:"string" required:"true"` 3937 } 3938 3939 // String returns the string representation. 3940 // 3941 // API parameter values that are decorated as "sensitive" in the API will not 3942 // be included in the string output. The member name will be present, but the 3943 // value will be replaced with "sensitive". 3944 func (s RestoreBackupInput) String() string { 3945 return awsutil.Prettify(s) 3946 } 3947 3948 // GoString returns the string representation. 3949 // 3950 // API parameter values that are decorated as "sensitive" in the API will not 3951 // be included in the string output. The member name will be present, but the 3952 // value will be replaced with "sensitive". 3953 func (s RestoreBackupInput) GoString() string { 3954 return s.String() 3955 } 3956 3957 // Validate inspects the fields of the type to determine if they are valid. 3958 func (s *RestoreBackupInput) Validate() error { 3959 invalidParams := request.ErrInvalidParams{Context: "RestoreBackupInput"} 3960 if s.BackupId == nil { 3961 invalidParams.Add(request.NewErrParamRequired("BackupId")) 3962 } 3963 3964 if invalidParams.Len() > 0 { 3965 return invalidParams 3966 } 3967 return nil 3968 } 3969 3970 // SetBackupId sets the BackupId field's value. 3971 func (s *RestoreBackupInput) SetBackupId(v string) *RestoreBackupInput { 3972 s.BackupId = &v 3973 return s 3974 } 3975 3976 type RestoreBackupOutput struct { 3977 _ struct{} `type:"structure"` 3978 3979 // Information on the Backup object created. 3980 Backup *Backup `type:"structure"` 3981 } 3982 3983 // String returns the string representation. 3984 // 3985 // API parameter values that are decorated as "sensitive" in the API will not 3986 // be included in the string output. The member name will be present, but the 3987 // value will be replaced with "sensitive". 3988 func (s RestoreBackupOutput) String() string { 3989 return awsutil.Prettify(s) 3990 } 3991 3992 // GoString returns the string representation. 3993 // 3994 // API parameter values that are decorated as "sensitive" in the API will not 3995 // be included in the string output. The member name will be present, but the 3996 // value will be replaced with "sensitive". 3997 func (s RestoreBackupOutput) GoString() string { 3998 return s.String() 3999 } 4000 4001 // SetBackup sets the Backup field's value. 4002 func (s *RestoreBackupOutput) SetBackup(v *Backup) *RestoreBackupOutput { 4003 s.Backup = v 4004 return s 4005 } 4006 4007 // Contains a tag. A tag is a key-value pair. 4008 type Tag struct { 4009 _ struct{} `type:"structure"` 4010 4011 // The key of the tag. 4012 // 4013 // Key is a required field 4014 Key *string `min:"1" type:"string" required:"true"` 4015 4016 // The value of the tag. 4017 // 4018 // Value is a required field 4019 Value *string `type:"string" required:"true"` 4020 } 4021 4022 // String returns the string representation. 4023 // 4024 // API parameter values that are decorated as "sensitive" in the API will not 4025 // be included in the string output. The member name will be present, but the 4026 // value will be replaced with "sensitive". 4027 func (s Tag) String() string { 4028 return awsutil.Prettify(s) 4029 } 4030 4031 // GoString returns the string representation. 4032 // 4033 // API parameter values that are decorated as "sensitive" in the API will not 4034 // be included in the string output. The member name will be present, but the 4035 // value will be replaced with "sensitive". 4036 func (s Tag) GoString() string { 4037 return s.String() 4038 } 4039 4040 // Validate inspects the fields of the type to determine if they are valid. 4041 func (s *Tag) Validate() error { 4042 invalidParams := request.ErrInvalidParams{Context: "Tag"} 4043 if s.Key == nil { 4044 invalidParams.Add(request.NewErrParamRequired("Key")) 4045 } 4046 if s.Key != nil && len(*s.Key) < 1 { 4047 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 4048 } 4049 if s.Value == nil { 4050 invalidParams.Add(request.NewErrParamRequired("Value")) 4051 } 4052 4053 if invalidParams.Len() > 0 { 4054 return invalidParams 4055 } 4056 return nil 4057 } 4058 4059 // SetKey sets the Key field's value. 4060 func (s *Tag) SetKey(v string) *Tag { 4061 s.Key = &v 4062 return s 4063 } 4064 4065 // SetValue sets the Value field's value. 4066 func (s *Tag) SetValue(v string) *Tag { 4067 s.Value = &v 4068 return s 4069 } 4070 4071 type TagResourceInput struct { 4072 _ struct{} `type:"structure"` 4073 4074 // The cluster identifier (ID) for the cluster that you are tagging. To find 4075 // the cluster ID, use DescribeClusters. 4076 // 4077 // ResourceId is a required field 4078 ResourceId *string `type:"string" required:"true"` 4079 4080 // A list of one or more tags. 4081 // 4082 // TagList is a required field 4083 TagList []*Tag `min:"1" type:"list" required:"true"` 4084 } 4085 4086 // String returns the string representation. 4087 // 4088 // API parameter values that are decorated as "sensitive" in the API will not 4089 // be included in the string output. The member name will be present, but the 4090 // value will be replaced with "sensitive". 4091 func (s TagResourceInput) String() string { 4092 return awsutil.Prettify(s) 4093 } 4094 4095 // GoString returns the string representation. 4096 // 4097 // API parameter values that are decorated as "sensitive" in the API will not 4098 // be included in the string output. The member name will be present, but the 4099 // value will be replaced with "sensitive". 4100 func (s TagResourceInput) GoString() string { 4101 return s.String() 4102 } 4103 4104 // Validate inspects the fields of the type to determine if they are valid. 4105 func (s *TagResourceInput) Validate() error { 4106 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 4107 if s.ResourceId == nil { 4108 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 4109 } 4110 if s.TagList == nil { 4111 invalidParams.Add(request.NewErrParamRequired("TagList")) 4112 } 4113 if s.TagList != nil && len(s.TagList) < 1 { 4114 invalidParams.Add(request.NewErrParamMinLen("TagList", 1)) 4115 } 4116 if s.TagList != nil { 4117 for i, v := range s.TagList { 4118 if v == nil { 4119 continue 4120 } 4121 if err := v.Validate(); err != nil { 4122 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) 4123 } 4124 } 4125 } 4126 4127 if invalidParams.Len() > 0 { 4128 return invalidParams 4129 } 4130 return nil 4131 } 4132 4133 // SetResourceId sets the ResourceId field's value. 4134 func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput { 4135 s.ResourceId = &v 4136 return s 4137 } 4138 4139 // SetTagList sets the TagList field's value. 4140 func (s *TagResourceInput) SetTagList(v []*Tag) *TagResourceInput { 4141 s.TagList = v 4142 return s 4143 } 4144 4145 type TagResourceOutput struct { 4146 _ struct{} `type:"structure"` 4147 } 4148 4149 // String returns the string representation. 4150 // 4151 // API parameter values that are decorated as "sensitive" in the API will not 4152 // be included in the string output. The member name will be present, but the 4153 // value will be replaced with "sensitive". 4154 func (s TagResourceOutput) String() string { 4155 return awsutil.Prettify(s) 4156 } 4157 4158 // GoString returns the string representation. 4159 // 4160 // API parameter values that are decorated as "sensitive" in the API will not 4161 // be included in the string output. The member name will be present, but the 4162 // value will be replaced with "sensitive". 4163 func (s TagResourceOutput) GoString() string { 4164 return s.String() 4165 } 4166 4167 type UntagResourceInput struct { 4168 _ struct{} `type:"structure"` 4169 4170 // The cluster identifier (ID) for the cluster whose tags you are removing. 4171 // To find the cluster ID, use DescribeClusters. 4172 // 4173 // ResourceId is a required field 4174 ResourceId *string `type:"string" required:"true"` 4175 4176 // A list of one or more tag keys for the tags that you are removing. Specify 4177 // only the tag keys, not the tag values. 4178 // 4179 // TagKeyList is a required field 4180 TagKeyList []*string `min:"1" type:"list" required:"true"` 4181 } 4182 4183 // String returns the string representation. 4184 // 4185 // API parameter values that are decorated as "sensitive" in the API will not 4186 // be included in the string output. The member name will be present, but the 4187 // value will be replaced with "sensitive". 4188 func (s UntagResourceInput) String() string { 4189 return awsutil.Prettify(s) 4190 } 4191 4192 // GoString returns the string representation. 4193 // 4194 // API parameter values that are decorated as "sensitive" in the API will not 4195 // be included in the string output. The member name will be present, but the 4196 // value will be replaced with "sensitive". 4197 func (s UntagResourceInput) GoString() string { 4198 return s.String() 4199 } 4200 4201 // Validate inspects the fields of the type to determine if they are valid. 4202 func (s *UntagResourceInput) Validate() error { 4203 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 4204 if s.ResourceId == nil { 4205 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 4206 } 4207 if s.TagKeyList == nil { 4208 invalidParams.Add(request.NewErrParamRequired("TagKeyList")) 4209 } 4210 if s.TagKeyList != nil && len(s.TagKeyList) < 1 { 4211 invalidParams.Add(request.NewErrParamMinLen("TagKeyList", 1)) 4212 } 4213 4214 if invalidParams.Len() > 0 { 4215 return invalidParams 4216 } 4217 return nil 4218 } 4219 4220 // SetResourceId sets the ResourceId field's value. 4221 func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput { 4222 s.ResourceId = &v 4223 return s 4224 } 4225 4226 // SetTagKeyList sets the TagKeyList field's value. 4227 func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput { 4228 s.TagKeyList = v 4229 return s 4230 } 4231 4232 type UntagResourceOutput struct { 4233 _ struct{} `type:"structure"` 4234 } 4235 4236 // String returns the string representation. 4237 // 4238 // API parameter values that are decorated as "sensitive" in the API will not 4239 // be included in the string output. The member name will be present, but the 4240 // value will be replaced with "sensitive". 4241 func (s UntagResourceOutput) String() string { 4242 return awsutil.Prettify(s) 4243 } 4244 4245 // GoString returns the string representation. 4246 // 4247 // API parameter values that are decorated as "sensitive" in the API will not 4248 // be included in the string output. The member name will be present, but the 4249 // value will be replaced with "sensitive". 4250 func (s UntagResourceOutput) GoString() string { 4251 return s.String() 4252 } 4253 4254 const ( 4255 // BackupPolicyDefault is a BackupPolicy enum value 4256 BackupPolicyDefault = "DEFAULT" 4257 ) 4258 4259 // BackupPolicy_Values returns all elements of the BackupPolicy enum 4260 func BackupPolicy_Values() []string { 4261 return []string{ 4262 BackupPolicyDefault, 4263 } 4264 } 4265 4266 const ( 4267 // BackupRetentionTypeDays is a BackupRetentionType enum value 4268 BackupRetentionTypeDays = "DAYS" 4269 ) 4270 4271 // BackupRetentionType_Values returns all elements of the BackupRetentionType enum 4272 func BackupRetentionType_Values() []string { 4273 return []string{ 4274 BackupRetentionTypeDays, 4275 } 4276 } 4277 4278 const ( 4279 // BackupStateCreateInProgress is a BackupState enum value 4280 BackupStateCreateInProgress = "CREATE_IN_PROGRESS" 4281 4282 // BackupStateReady is a BackupState enum value 4283 BackupStateReady = "READY" 4284 4285 // BackupStateDeleted is a BackupState enum value 4286 BackupStateDeleted = "DELETED" 4287 4288 // BackupStatePendingDeletion is a BackupState enum value 4289 BackupStatePendingDeletion = "PENDING_DELETION" 4290 ) 4291 4292 // BackupState_Values returns all elements of the BackupState enum 4293 func BackupState_Values() []string { 4294 return []string{ 4295 BackupStateCreateInProgress, 4296 BackupStateReady, 4297 BackupStateDeleted, 4298 BackupStatePendingDeletion, 4299 } 4300 } 4301 4302 const ( 4303 // ClusterStateCreateInProgress is a ClusterState enum value 4304 ClusterStateCreateInProgress = "CREATE_IN_PROGRESS" 4305 4306 // ClusterStateUninitialized is a ClusterState enum value 4307 ClusterStateUninitialized = "UNINITIALIZED" 4308 4309 // ClusterStateInitializeInProgress is a ClusterState enum value 4310 ClusterStateInitializeInProgress = "INITIALIZE_IN_PROGRESS" 4311 4312 // ClusterStateInitialized is a ClusterState enum value 4313 ClusterStateInitialized = "INITIALIZED" 4314 4315 // ClusterStateActive is a ClusterState enum value 4316 ClusterStateActive = "ACTIVE" 4317 4318 // ClusterStateUpdateInProgress is a ClusterState enum value 4319 ClusterStateUpdateInProgress = "UPDATE_IN_PROGRESS" 4320 4321 // ClusterStateDeleteInProgress is a ClusterState enum value 4322 ClusterStateDeleteInProgress = "DELETE_IN_PROGRESS" 4323 4324 // ClusterStateDeleted is a ClusterState enum value 4325 ClusterStateDeleted = "DELETED" 4326 4327 // ClusterStateDegraded is a ClusterState enum value 4328 ClusterStateDegraded = "DEGRADED" 4329 ) 4330 4331 // ClusterState_Values returns all elements of the ClusterState enum 4332 func ClusterState_Values() []string { 4333 return []string{ 4334 ClusterStateCreateInProgress, 4335 ClusterStateUninitialized, 4336 ClusterStateInitializeInProgress, 4337 ClusterStateInitialized, 4338 ClusterStateActive, 4339 ClusterStateUpdateInProgress, 4340 ClusterStateDeleteInProgress, 4341 ClusterStateDeleted, 4342 ClusterStateDegraded, 4343 } 4344 } 4345 4346 const ( 4347 // HsmStateCreateInProgress is a HsmState enum value 4348 HsmStateCreateInProgress = "CREATE_IN_PROGRESS" 4349 4350 // HsmStateActive is a HsmState enum value 4351 HsmStateActive = "ACTIVE" 4352 4353 // HsmStateDegraded is a HsmState enum value 4354 HsmStateDegraded = "DEGRADED" 4355 4356 // HsmStateDeleteInProgress is a HsmState enum value 4357 HsmStateDeleteInProgress = "DELETE_IN_PROGRESS" 4358 4359 // HsmStateDeleted is a HsmState enum value 4360 HsmStateDeleted = "DELETED" 4361 ) 4362 4363 // HsmState_Values returns all elements of the HsmState enum 4364 func HsmState_Values() []string { 4365 return []string{ 4366 HsmStateCreateInProgress, 4367 HsmStateActive, 4368 HsmStateDegraded, 4369 HsmStateDeleteInProgress, 4370 HsmStateDeleted, 4371 } 4372 }