github.com/aavshr/aws-sdk-go@v1.41.3/service/ebs/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package ebs 4 5 import ( 6 "fmt" 7 "io" 8 "time" 9 10 "github.com/aavshr/aws-sdk-go/aws" 11 "github.com/aavshr/aws-sdk-go/aws/awsutil" 12 "github.com/aavshr/aws-sdk-go/aws/request" 13 "github.com/aavshr/aws-sdk-go/aws/signer/v4" 14 "github.com/aavshr/aws-sdk-go/private/protocol" 15 ) 16 17 const opCompleteSnapshot = "CompleteSnapshot" 18 19 // CompleteSnapshotRequest generates a "aws/request.Request" representing the 20 // client's request for the CompleteSnapshot operation. The "output" return 21 // value will be populated with the request's response once the request completes 22 // successfully. 23 // 24 // Use "Send" method on the returned Request to send the API call to the service. 25 // the "output" return value is not valid until after Send returns without error. 26 // 27 // See CompleteSnapshot for more information on using the CompleteSnapshot 28 // API call, and error handling. 29 // 30 // This method is useful when you want to inject custom logic or configuration 31 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 32 // 33 // 34 // // Example sending a request using the CompleteSnapshotRequest method. 35 // req, resp := client.CompleteSnapshotRequest(params) 36 // 37 // err := req.Send() 38 // if err == nil { // resp is now filled 39 // fmt.Println(resp) 40 // } 41 // 42 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/CompleteSnapshot 43 func (c *EBS) CompleteSnapshotRequest(input *CompleteSnapshotInput) (req *request.Request, output *CompleteSnapshotOutput) { 44 op := &request.Operation{ 45 Name: opCompleteSnapshot, 46 HTTPMethod: "POST", 47 HTTPPath: "/snapshots/completion/{snapshotId}", 48 } 49 50 if input == nil { 51 input = &CompleteSnapshotInput{} 52 } 53 54 output = &CompleteSnapshotOutput{} 55 req = c.newRequest(op, input, output) 56 return 57 } 58 59 // CompleteSnapshot API operation for Amazon Elastic Block Store. 60 // 61 // Seals and completes the snapshot after all of the required blocks of data 62 // have been written to it. Completing the snapshot changes the status to completed. 63 // You cannot write new blocks to a snapshot after it has been completed. 64 // 65 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 66 // with awserr.Error's Code and Message methods to get detailed information about 67 // the error. 68 // 69 // See the AWS API reference guide for Amazon Elastic Block Store's 70 // API operation CompleteSnapshot for usage and error information. 71 // 72 // Returned Error Types: 73 // * AccessDeniedException 74 // You do not have sufficient access to perform this action. 75 // 76 // * ValidationException 77 // The input fails to satisfy the constraints of the EBS direct APIs. 78 // 79 // * ResourceNotFoundException 80 // The specified resource does not exist. 81 // 82 // * RequestThrottledException 83 // The number of API requests has exceed the maximum allowed API request throttling 84 // limit. 85 // 86 // * ServiceQuotaExceededException 87 // Your current service quotas do not allow you to perform this action. 88 // 89 // * InternalServerException 90 // An internal error has occurred. 91 // 92 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/CompleteSnapshot 93 func (c *EBS) CompleteSnapshot(input *CompleteSnapshotInput) (*CompleteSnapshotOutput, error) { 94 req, out := c.CompleteSnapshotRequest(input) 95 return out, req.Send() 96 } 97 98 // CompleteSnapshotWithContext is the same as CompleteSnapshot with the addition of 99 // the ability to pass a context and additional request options. 100 // 101 // See CompleteSnapshot for details on how to use this API operation. 102 // 103 // The context must be non-nil and will be used for request cancellation. If 104 // the context is nil a panic will occur. In the future the SDK may create 105 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 106 // for more information on using Contexts. 107 func (c *EBS) CompleteSnapshotWithContext(ctx aws.Context, input *CompleteSnapshotInput, opts ...request.Option) (*CompleteSnapshotOutput, error) { 108 req, out := c.CompleteSnapshotRequest(input) 109 req.SetContext(ctx) 110 req.ApplyOptions(opts...) 111 return out, req.Send() 112 } 113 114 const opGetSnapshotBlock = "GetSnapshotBlock" 115 116 // GetSnapshotBlockRequest generates a "aws/request.Request" representing the 117 // client's request for the GetSnapshotBlock operation. The "output" return 118 // value will be populated with the request's response once the request completes 119 // successfully. 120 // 121 // Use "Send" method on the returned Request to send the API call to the service. 122 // the "output" return value is not valid until after Send returns without error. 123 // 124 // See GetSnapshotBlock for more information on using the GetSnapshotBlock 125 // API call, and error handling. 126 // 127 // This method is useful when you want to inject custom logic or configuration 128 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 129 // 130 // 131 // // Example sending a request using the GetSnapshotBlockRequest method. 132 // req, resp := client.GetSnapshotBlockRequest(params) 133 // 134 // err := req.Send() 135 // if err == nil { // resp is now filled 136 // fmt.Println(resp) 137 // } 138 // 139 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/GetSnapshotBlock 140 func (c *EBS) GetSnapshotBlockRequest(input *GetSnapshotBlockInput) (req *request.Request, output *GetSnapshotBlockOutput) { 141 op := &request.Operation{ 142 Name: opGetSnapshotBlock, 143 HTTPMethod: "GET", 144 HTTPPath: "/snapshots/{snapshotId}/blocks/{blockIndex}", 145 } 146 147 if input == nil { 148 input = &GetSnapshotBlockInput{} 149 } 150 151 output = &GetSnapshotBlockOutput{} 152 req = c.newRequest(op, input, output) 153 return 154 } 155 156 // GetSnapshotBlock API operation for Amazon Elastic Block Store. 157 // 158 // Returns the data in a block in an Amazon Elastic Block Store snapshot. 159 // 160 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 161 // with awserr.Error's Code and Message methods to get detailed information about 162 // the error. 163 // 164 // See the AWS API reference guide for Amazon Elastic Block Store's 165 // API operation GetSnapshotBlock for usage and error information. 166 // 167 // Returned Error Types: 168 // * AccessDeniedException 169 // You do not have sufficient access to perform this action. 170 // 171 // * ValidationException 172 // The input fails to satisfy the constraints of the EBS direct APIs. 173 // 174 // * ResourceNotFoundException 175 // The specified resource does not exist. 176 // 177 // * RequestThrottledException 178 // The number of API requests has exceed the maximum allowed API request throttling 179 // limit. 180 // 181 // * ServiceQuotaExceededException 182 // Your current service quotas do not allow you to perform this action. 183 // 184 // * InternalServerException 185 // An internal error has occurred. 186 // 187 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/GetSnapshotBlock 188 func (c *EBS) GetSnapshotBlock(input *GetSnapshotBlockInput) (*GetSnapshotBlockOutput, error) { 189 req, out := c.GetSnapshotBlockRequest(input) 190 return out, req.Send() 191 } 192 193 // GetSnapshotBlockWithContext is the same as GetSnapshotBlock with the addition of 194 // the ability to pass a context and additional request options. 195 // 196 // See GetSnapshotBlock for details on how to use this API operation. 197 // 198 // The context must be non-nil and will be used for request cancellation. If 199 // the context is nil a panic will occur. In the future the SDK may create 200 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 201 // for more information on using Contexts. 202 func (c *EBS) GetSnapshotBlockWithContext(ctx aws.Context, input *GetSnapshotBlockInput, opts ...request.Option) (*GetSnapshotBlockOutput, error) { 203 req, out := c.GetSnapshotBlockRequest(input) 204 req.SetContext(ctx) 205 req.ApplyOptions(opts...) 206 return out, req.Send() 207 } 208 209 const opListChangedBlocks = "ListChangedBlocks" 210 211 // ListChangedBlocksRequest generates a "aws/request.Request" representing the 212 // client's request for the ListChangedBlocks operation. The "output" return 213 // value will be populated with the request's response once the request completes 214 // successfully. 215 // 216 // Use "Send" method on the returned Request to send the API call to the service. 217 // the "output" return value is not valid until after Send returns without error. 218 // 219 // See ListChangedBlocks for more information on using the ListChangedBlocks 220 // API call, and error handling. 221 // 222 // This method is useful when you want to inject custom logic or configuration 223 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 224 // 225 // 226 // // Example sending a request using the ListChangedBlocksRequest method. 227 // req, resp := client.ListChangedBlocksRequest(params) 228 // 229 // err := req.Send() 230 // if err == nil { // resp is now filled 231 // fmt.Println(resp) 232 // } 233 // 234 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListChangedBlocks 235 func (c *EBS) ListChangedBlocksRequest(input *ListChangedBlocksInput) (req *request.Request, output *ListChangedBlocksOutput) { 236 op := &request.Operation{ 237 Name: opListChangedBlocks, 238 HTTPMethod: "GET", 239 HTTPPath: "/snapshots/{secondSnapshotId}/changedblocks", 240 Paginator: &request.Paginator{ 241 InputTokens: []string{"NextToken"}, 242 OutputTokens: []string{"NextToken"}, 243 LimitToken: "MaxResults", 244 TruncationToken: "", 245 }, 246 } 247 248 if input == nil { 249 input = &ListChangedBlocksInput{} 250 } 251 252 output = &ListChangedBlocksOutput{} 253 req = c.newRequest(op, input, output) 254 return 255 } 256 257 // ListChangedBlocks API operation for Amazon Elastic Block Store. 258 // 259 // Returns information about the blocks that are different between two Amazon 260 // Elastic Block Store snapshots of the same volume/snapshot lineage. 261 // 262 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 263 // with awserr.Error's Code and Message methods to get detailed information about 264 // the error. 265 // 266 // See the AWS API reference guide for Amazon Elastic Block Store's 267 // API operation ListChangedBlocks for usage and error information. 268 // 269 // Returned Error Types: 270 // * AccessDeniedException 271 // You do not have sufficient access to perform this action. 272 // 273 // * ValidationException 274 // The input fails to satisfy the constraints of the EBS direct APIs. 275 // 276 // * ResourceNotFoundException 277 // The specified resource does not exist. 278 // 279 // * RequestThrottledException 280 // The number of API requests has exceed the maximum allowed API request throttling 281 // limit. 282 // 283 // * ServiceQuotaExceededException 284 // Your current service quotas do not allow you to perform this action. 285 // 286 // * InternalServerException 287 // An internal error has occurred. 288 // 289 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListChangedBlocks 290 func (c *EBS) ListChangedBlocks(input *ListChangedBlocksInput) (*ListChangedBlocksOutput, error) { 291 req, out := c.ListChangedBlocksRequest(input) 292 return out, req.Send() 293 } 294 295 // ListChangedBlocksWithContext is the same as ListChangedBlocks with the addition of 296 // the ability to pass a context and additional request options. 297 // 298 // See ListChangedBlocks for details on how to use this API operation. 299 // 300 // The context must be non-nil and will be used for request cancellation. If 301 // the context is nil a panic will occur. In the future the SDK may create 302 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 303 // for more information on using Contexts. 304 func (c *EBS) ListChangedBlocksWithContext(ctx aws.Context, input *ListChangedBlocksInput, opts ...request.Option) (*ListChangedBlocksOutput, error) { 305 req, out := c.ListChangedBlocksRequest(input) 306 req.SetContext(ctx) 307 req.ApplyOptions(opts...) 308 return out, req.Send() 309 } 310 311 // ListChangedBlocksPages iterates over the pages of a ListChangedBlocks operation, 312 // calling the "fn" function with the response data for each page. To stop 313 // iterating, return false from the fn function. 314 // 315 // See ListChangedBlocks method for more information on how to use this operation. 316 // 317 // Note: This operation can generate multiple requests to a service. 318 // 319 // // Example iterating over at most 3 pages of a ListChangedBlocks operation. 320 // pageNum := 0 321 // err := client.ListChangedBlocksPages(params, 322 // func(page *ebs.ListChangedBlocksOutput, lastPage bool) bool { 323 // pageNum++ 324 // fmt.Println(page) 325 // return pageNum <= 3 326 // }) 327 // 328 func (c *EBS) ListChangedBlocksPages(input *ListChangedBlocksInput, fn func(*ListChangedBlocksOutput, bool) bool) error { 329 return c.ListChangedBlocksPagesWithContext(aws.BackgroundContext(), input, fn) 330 } 331 332 // ListChangedBlocksPagesWithContext same as ListChangedBlocksPages except 333 // it takes a Context and allows setting request options on the pages. 334 // 335 // The context must be non-nil and will be used for request cancellation. If 336 // the context is nil a panic will occur. In the future the SDK may create 337 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 338 // for more information on using Contexts. 339 func (c *EBS) ListChangedBlocksPagesWithContext(ctx aws.Context, input *ListChangedBlocksInput, fn func(*ListChangedBlocksOutput, bool) bool, opts ...request.Option) error { 340 p := request.Pagination{ 341 NewRequest: func() (*request.Request, error) { 342 var inCpy *ListChangedBlocksInput 343 if input != nil { 344 tmp := *input 345 inCpy = &tmp 346 } 347 req, _ := c.ListChangedBlocksRequest(inCpy) 348 req.SetContext(ctx) 349 req.ApplyOptions(opts...) 350 return req, nil 351 }, 352 } 353 354 for p.Next() { 355 if !fn(p.Page().(*ListChangedBlocksOutput), !p.HasNextPage()) { 356 break 357 } 358 } 359 360 return p.Err() 361 } 362 363 const opListSnapshotBlocks = "ListSnapshotBlocks" 364 365 // ListSnapshotBlocksRequest generates a "aws/request.Request" representing the 366 // client's request for the ListSnapshotBlocks operation. The "output" return 367 // value will be populated with the request's response once the request completes 368 // successfully. 369 // 370 // Use "Send" method on the returned Request to send the API call to the service. 371 // the "output" return value is not valid until after Send returns without error. 372 // 373 // See ListSnapshotBlocks for more information on using the ListSnapshotBlocks 374 // API call, and error handling. 375 // 376 // This method is useful when you want to inject custom logic or configuration 377 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 378 // 379 // 380 // // Example sending a request using the ListSnapshotBlocksRequest method. 381 // req, resp := client.ListSnapshotBlocksRequest(params) 382 // 383 // err := req.Send() 384 // if err == nil { // resp is now filled 385 // fmt.Println(resp) 386 // } 387 // 388 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListSnapshotBlocks 389 func (c *EBS) ListSnapshotBlocksRequest(input *ListSnapshotBlocksInput) (req *request.Request, output *ListSnapshotBlocksOutput) { 390 op := &request.Operation{ 391 Name: opListSnapshotBlocks, 392 HTTPMethod: "GET", 393 HTTPPath: "/snapshots/{snapshotId}/blocks", 394 Paginator: &request.Paginator{ 395 InputTokens: []string{"NextToken"}, 396 OutputTokens: []string{"NextToken"}, 397 LimitToken: "MaxResults", 398 TruncationToken: "", 399 }, 400 } 401 402 if input == nil { 403 input = &ListSnapshotBlocksInput{} 404 } 405 406 output = &ListSnapshotBlocksOutput{} 407 req = c.newRequest(op, input, output) 408 return 409 } 410 411 // ListSnapshotBlocks API operation for Amazon Elastic Block Store. 412 // 413 // Returns information about the blocks in an Amazon Elastic Block Store snapshot. 414 // 415 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 416 // with awserr.Error's Code and Message methods to get detailed information about 417 // the error. 418 // 419 // See the AWS API reference guide for Amazon Elastic Block Store's 420 // API operation ListSnapshotBlocks for usage and error information. 421 // 422 // Returned Error Types: 423 // * AccessDeniedException 424 // You do not have sufficient access to perform this action. 425 // 426 // * ValidationException 427 // The input fails to satisfy the constraints of the EBS direct APIs. 428 // 429 // * ResourceNotFoundException 430 // The specified resource does not exist. 431 // 432 // * RequestThrottledException 433 // The number of API requests has exceed the maximum allowed API request throttling 434 // limit. 435 // 436 // * ServiceQuotaExceededException 437 // Your current service quotas do not allow you to perform this action. 438 // 439 // * InternalServerException 440 // An internal error has occurred. 441 // 442 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListSnapshotBlocks 443 func (c *EBS) ListSnapshotBlocks(input *ListSnapshotBlocksInput) (*ListSnapshotBlocksOutput, error) { 444 req, out := c.ListSnapshotBlocksRequest(input) 445 return out, req.Send() 446 } 447 448 // ListSnapshotBlocksWithContext is the same as ListSnapshotBlocks with the addition of 449 // the ability to pass a context and additional request options. 450 // 451 // See ListSnapshotBlocks for details on how to use this API operation. 452 // 453 // The context must be non-nil and will be used for request cancellation. If 454 // the context is nil a panic will occur. In the future the SDK may create 455 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 456 // for more information on using Contexts. 457 func (c *EBS) ListSnapshotBlocksWithContext(ctx aws.Context, input *ListSnapshotBlocksInput, opts ...request.Option) (*ListSnapshotBlocksOutput, error) { 458 req, out := c.ListSnapshotBlocksRequest(input) 459 req.SetContext(ctx) 460 req.ApplyOptions(opts...) 461 return out, req.Send() 462 } 463 464 // ListSnapshotBlocksPages iterates over the pages of a ListSnapshotBlocks operation, 465 // calling the "fn" function with the response data for each page. To stop 466 // iterating, return false from the fn function. 467 // 468 // See ListSnapshotBlocks method for more information on how to use this operation. 469 // 470 // Note: This operation can generate multiple requests to a service. 471 // 472 // // Example iterating over at most 3 pages of a ListSnapshotBlocks operation. 473 // pageNum := 0 474 // err := client.ListSnapshotBlocksPages(params, 475 // func(page *ebs.ListSnapshotBlocksOutput, lastPage bool) bool { 476 // pageNum++ 477 // fmt.Println(page) 478 // return pageNum <= 3 479 // }) 480 // 481 func (c *EBS) ListSnapshotBlocksPages(input *ListSnapshotBlocksInput, fn func(*ListSnapshotBlocksOutput, bool) bool) error { 482 return c.ListSnapshotBlocksPagesWithContext(aws.BackgroundContext(), input, fn) 483 } 484 485 // ListSnapshotBlocksPagesWithContext same as ListSnapshotBlocksPages except 486 // it takes a Context and allows setting request options on the pages. 487 // 488 // The context must be non-nil and will be used for request cancellation. If 489 // the context is nil a panic will occur. In the future the SDK may create 490 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 491 // for more information on using Contexts. 492 func (c *EBS) ListSnapshotBlocksPagesWithContext(ctx aws.Context, input *ListSnapshotBlocksInput, fn func(*ListSnapshotBlocksOutput, bool) bool, opts ...request.Option) error { 493 p := request.Pagination{ 494 NewRequest: func() (*request.Request, error) { 495 var inCpy *ListSnapshotBlocksInput 496 if input != nil { 497 tmp := *input 498 inCpy = &tmp 499 } 500 req, _ := c.ListSnapshotBlocksRequest(inCpy) 501 req.SetContext(ctx) 502 req.ApplyOptions(opts...) 503 return req, nil 504 }, 505 } 506 507 for p.Next() { 508 if !fn(p.Page().(*ListSnapshotBlocksOutput), !p.HasNextPage()) { 509 break 510 } 511 } 512 513 return p.Err() 514 } 515 516 const opPutSnapshotBlock = "PutSnapshotBlock" 517 518 // PutSnapshotBlockRequest generates a "aws/request.Request" representing the 519 // client's request for the PutSnapshotBlock operation. The "output" return 520 // value will be populated with the request's response once the request completes 521 // successfully. 522 // 523 // Use "Send" method on the returned Request to send the API call to the service. 524 // the "output" return value is not valid until after Send returns without error. 525 // 526 // See PutSnapshotBlock for more information on using the PutSnapshotBlock 527 // API call, and error handling. 528 // 529 // This method is useful when you want to inject custom logic or configuration 530 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 531 // 532 // 533 // // Example sending a request using the PutSnapshotBlockRequest method. 534 // req, resp := client.PutSnapshotBlockRequest(params) 535 // 536 // err := req.Send() 537 // if err == nil { // resp is now filled 538 // fmt.Println(resp) 539 // } 540 // 541 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/PutSnapshotBlock 542 func (c *EBS) PutSnapshotBlockRequest(input *PutSnapshotBlockInput) (req *request.Request, output *PutSnapshotBlockOutput) { 543 op := &request.Operation{ 544 Name: opPutSnapshotBlock, 545 HTTPMethod: "PUT", 546 HTTPPath: "/snapshots/{snapshotId}/blocks/{blockIndex}", 547 } 548 549 if input == nil { 550 input = &PutSnapshotBlockInput{} 551 } 552 553 output = &PutSnapshotBlockOutput{} 554 req = c.newRequest(op, input, output) 555 req.Handlers.Sign.Remove(v4.SignRequestHandler) 556 handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload) 557 req.Handlers.Sign.PushFrontNamed(handler) 558 return 559 } 560 561 // PutSnapshotBlock API operation for Amazon Elastic Block Store. 562 // 563 // Writes a block of data to a snapshot. If the specified block contains data, 564 // the existing data is overwritten. The target snapshot must be in the pending 565 // state. 566 // 567 // Data written to a snapshot must be aligned with 512-KiB sectors. 568 // 569 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 570 // with awserr.Error's Code and Message methods to get detailed information about 571 // the error. 572 // 573 // See the AWS API reference guide for Amazon Elastic Block Store's 574 // API operation PutSnapshotBlock for usage and error information. 575 // 576 // Returned Error Types: 577 // * AccessDeniedException 578 // You do not have sufficient access to perform this action. 579 // 580 // * ValidationException 581 // The input fails to satisfy the constraints of the EBS direct APIs. 582 // 583 // * ResourceNotFoundException 584 // The specified resource does not exist. 585 // 586 // * RequestThrottledException 587 // The number of API requests has exceed the maximum allowed API request throttling 588 // limit. 589 // 590 // * ServiceQuotaExceededException 591 // Your current service quotas do not allow you to perform this action. 592 // 593 // * InternalServerException 594 // An internal error has occurred. 595 // 596 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/PutSnapshotBlock 597 func (c *EBS) PutSnapshotBlock(input *PutSnapshotBlockInput) (*PutSnapshotBlockOutput, error) { 598 req, out := c.PutSnapshotBlockRequest(input) 599 return out, req.Send() 600 } 601 602 // PutSnapshotBlockWithContext is the same as PutSnapshotBlock with the addition of 603 // the ability to pass a context and additional request options. 604 // 605 // See PutSnapshotBlock for details on how to use this API operation. 606 // 607 // The context must be non-nil and will be used for request cancellation. If 608 // the context is nil a panic will occur. In the future the SDK may create 609 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 610 // for more information on using Contexts. 611 func (c *EBS) PutSnapshotBlockWithContext(ctx aws.Context, input *PutSnapshotBlockInput, opts ...request.Option) (*PutSnapshotBlockOutput, error) { 612 req, out := c.PutSnapshotBlockRequest(input) 613 req.SetContext(ctx) 614 req.ApplyOptions(opts...) 615 return out, req.Send() 616 } 617 618 const opStartSnapshot = "StartSnapshot" 619 620 // StartSnapshotRequest generates a "aws/request.Request" representing the 621 // client's request for the StartSnapshot operation. The "output" return 622 // value will be populated with the request's response once the request completes 623 // successfully. 624 // 625 // Use "Send" method on the returned Request to send the API call to the service. 626 // the "output" return value is not valid until after Send returns without error. 627 // 628 // See StartSnapshot for more information on using the StartSnapshot 629 // API call, and error handling. 630 // 631 // This method is useful when you want to inject custom logic or configuration 632 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 633 // 634 // 635 // // Example sending a request using the StartSnapshotRequest method. 636 // req, resp := client.StartSnapshotRequest(params) 637 // 638 // err := req.Send() 639 // if err == nil { // resp is now filled 640 // fmt.Println(resp) 641 // } 642 // 643 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/StartSnapshot 644 func (c *EBS) StartSnapshotRequest(input *StartSnapshotInput) (req *request.Request, output *StartSnapshotOutput) { 645 op := &request.Operation{ 646 Name: opStartSnapshot, 647 HTTPMethod: "POST", 648 HTTPPath: "/snapshots", 649 } 650 651 if input == nil { 652 input = &StartSnapshotInput{} 653 } 654 655 output = &StartSnapshotOutput{} 656 req = c.newRequest(op, input, output) 657 return 658 } 659 660 // StartSnapshot API operation for Amazon Elastic Block Store. 661 // 662 // Creates a new Amazon EBS snapshot. The new snapshot enters the pending state 663 // after the request completes. 664 // 665 // After creating the snapshot, use PutSnapshotBlock (https://docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html) 666 // to write blocks of data to the snapshot. 667 // 668 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 669 // with awserr.Error's Code and Message methods to get detailed information about 670 // the error. 671 // 672 // See the AWS API reference guide for Amazon Elastic Block Store's 673 // API operation StartSnapshot for usage and error information. 674 // 675 // Returned Error Types: 676 // * AccessDeniedException 677 // You do not have sufficient access to perform this action. 678 // 679 // * ValidationException 680 // The input fails to satisfy the constraints of the EBS direct APIs. 681 // 682 // * RequestThrottledException 683 // The number of API requests has exceed the maximum allowed API request throttling 684 // limit. 685 // 686 // * ResourceNotFoundException 687 // The specified resource does not exist. 688 // 689 // * ServiceQuotaExceededException 690 // Your current service quotas do not allow you to perform this action. 691 // 692 // * InternalServerException 693 // An internal error has occurred. 694 // 695 // * ConcurrentLimitExceededException 696 // You have reached the limit for concurrent API requests. For more information, 697 // see Optimizing performance of the EBS direct APIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapi-performance) 698 // in the Amazon Elastic Compute Cloud User Guide. 699 // 700 // * ConflictException 701 // The request uses the same client token as a previous, but non-identical request. 702 // 703 // See also, https://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/StartSnapshot 704 func (c *EBS) StartSnapshot(input *StartSnapshotInput) (*StartSnapshotOutput, error) { 705 req, out := c.StartSnapshotRequest(input) 706 return out, req.Send() 707 } 708 709 // StartSnapshotWithContext is the same as StartSnapshot with the addition of 710 // the ability to pass a context and additional request options. 711 // 712 // See StartSnapshot for details on how to use this API operation. 713 // 714 // The context must be non-nil and will be used for request cancellation. If 715 // the context is nil a panic will occur. In the future the SDK may create 716 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 717 // for more information on using Contexts. 718 func (c *EBS) StartSnapshotWithContext(ctx aws.Context, input *StartSnapshotInput, opts ...request.Option) (*StartSnapshotOutput, error) { 719 req, out := c.StartSnapshotRequest(input) 720 req.SetContext(ctx) 721 req.ApplyOptions(opts...) 722 return out, req.Send() 723 } 724 725 // You do not have sufficient access to perform this action. 726 type AccessDeniedException struct { 727 _ struct{} `type:"structure"` 728 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 729 730 Message_ *string `locationName:"Message" type:"string"` 731 732 // The reason for the exception. 733 // 734 // Reason is a required field 735 Reason *string `type:"string" required:"true" enum:"AccessDeniedExceptionReason"` 736 } 737 738 // String returns the string representation. 739 // 740 // API parameter values that are decorated as "sensitive" in the API will not 741 // be included in the string output. The member name will be present, but the 742 // value will be replaced with "sensitive". 743 func (s AccessDeniedException) String() string { 744 return awsutil.Prettify(s) 745 } 746 747 // GoString returns the string representation. 748 // 749 // API parameter values that are decorated as "sensitive" in the API will not 750 // be included in the string output. The member name will be present, but the 751 // value will be replaced with "sensitive". 752 func (s AccessDeniedException) GoString() string { 753 return s.String() 754 } 755 756 func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 757 return &AccessDeniedException{ 758 RespMetadata: v, 759 } 760 } 761 762 // Code returns the exception type name. 763 func (s *AccessDeniedException) Code() string { 764 return "AccessDeniedException" 765 } 766 767 // Message returns the exception's message. 768 func (s *AccessDeniedException) Message() string { 769 if s.Message_ != nil { 770 return *s.Message_ 771 } 772 return "" 773 } 774 775 // OrigErr always returns nil, satisfies awserr.Error interface. 776 func (s *AccessDeniedException) OrigErr() error { 777 return nil 778 } 779 780 func (s *AccessDeniedException) Error() string { 781 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 782 } 783 784 // Status code returns the HTTP status code for the request's response error. 785 func (s *AccessDeniedException) StatusCode() int { 786 return s.RespMetadata.StatusCode 787 } 788 789 // RequestID returns the service's response RequestID for request. 790 func (s *AccessDeniedException) RequestID() string { 791 return s.RespMetadata.RequestID 792 } 793 794 // A block of data in an Amazon Elastic Block Store snapshot. 795 type Block struct { 796 _ struct{} `type:"structure"` 797 798 // The block index. 799 BlockIndex *int64 `type:"integer"` 800 801 // The block token for the block index. 802 BlockToken *string `type:"string"` 803 } 804 805 // String returns the string representation. 806 // 807 // API parameter values that are decorated as "sensitive" in the API will not 808 // be included in the string output. The member name will be present, but the 809 // value will be replaced with "sensitive". 810 func (s Block) String() string { 811 return awsutil.Prettify(s) 812 } 813 814 // GoString returns the string representation. 815 // 816 // API parameter values that are decorated as "sensitive" in the API will not 817 // be included in the string output. The member name will be present, but the 818 // value will be replaced with "sensitive". 819 func (s Block) GoString() string { 820 return s.String() 821 } 822 823 // SetBlockIndex sets the BlockIndex field's value. 824 func (s *Block) SetBlockIndex(v int64) *Block { 825 s.BlockIndex = &v 826 return s 827 } 828 829 // SetBlockToken sets the BlockToken field's value. 830 func (s *Block) SetBlockToken(v string) *Block { 831 s.BlockToken = &v 832 return s 833 } 834 835 // A block of data in an Amazon Elastic Block Store snapshot that is different 836 // from another snapshot of the same volume/snapshot lineage. 837 type ChangedBlock struct { 838 _ struct{} `type:"structure" sensitive:"true"` 839 840 // The block index. 841 BlockIndex *int64 `type:"integer"` 842 843 // The block token for the block index of the FirstSnapshotId specified in the 844 // ListChangedBlocks operation. This value is absent if the first snapshot does 845 // not have the changed block that is on the second snapshot. 846 FirstBlockToken *string `type:"string"` 847 848 // The block token for the block index of the SecondSnapshotId specified in 849 // the ListChangedBlocks operation. 850 SecondBlockToken *string `type:"string"` 851 } 852 853 // String returns the string representation. 854 // 855 // API parameter values that are decorated as "sensitive" in the API will not 856 // be included in the string output. The member name will be present, but the 857 // value will be replaced with "sensitive". 858 func (s ChangedBlock) String() string { 859 return awsutil.Prettify(s) 860 } 861 862 // GoString returns the string representation. 863 // 864 // API parameter values that are decorated as "sensitive" in the API will not 865 // be included in the string output. The member name will be present, but the 866 // value will be replaced with "sensitive". 867 func (s ChangedBlock) GoString() string { 868 return s.String() 869 } 870 871 // SetBlockIndex sets the BlockIndex field's value. 872 func (s *ChangedBlock) SetBlockIndex(v int64) *ChangedBlock { 873 s.BlockIndex = &v 874 return s 875 } 876 877 // SetFirstBlockToken sets the FirstBlockToken field's value. 878 func (s *ChangedBlock) SetFirstBlockToken(v string) *ChangedBlock { 879 s.FirstBlockToken = &v 880 return s 881 } 882 883 // SetSecondBlockToken sets the SecondBlockToken field's value. 884 func (s *ChangedBlock) SetSecondBlockToken(v string) *ChangedBlock { 885 s.SecondBlockToken = &v 886 return s 887 } 888 889 type CompleteSnapshotInput struct { 890 _ struct{} `type:"structure" nopayload:"true"` 891 892 // The number of blocks that were written to the snapshot. 893 // 894 // ChangedBlocksCount is a required field 895 ChangedBlocksCount *int64 `location:"header" locationName:"x-amz-ChangedBlocksCount" type:"integer" required:"true"` 896 897 // An aggregated Base-64 SHA256 checksum based on the checksums of each written 898 // block. 899 // 900 // To generate the aggregated checksum using the linear aggregation method, 901 // arrange the checksums for each written block in ascending order of their 902 // block index, concatenate them to form a single string, and then generate 903 // the checksum on the entire string using the SHA256 algorithm. 904 Checksum *string `location:"header" locationName:"x-amz-Checksum" type:"string"` 905 906 // The aggregation method used to generate the checksum. Currently, the only 907 // supported aggregation method is LINEAR. 908 ChecksumAggregationMethod *string `location:"header" locationName:"x-amz-Checksum-Aggregation-Method" type:"string" enum:"ChecksumAggregationMethod"` 909 910 // The algorithm used to generate the checksum. Currently, the only supported 911 // algorithm is SHA256. 912 ChecksumAlgorithm *string `location:"header" locationName:"x-amz-Checksum-Algorithm" type:"string" enum:"ChecksumAlgorithm"` 913 914 // The ID of the snapshot. 915 // 916 // SnapshotId is a required field 917 SnapshotId *string `location:"uri" locationName:"snapshotId" min:"1" type:"string" required:"true"` 918 } 919 920 // String returns the string representation. 921 // 922 // API parameter values that are decorated as "sensitive" in the API will not 923 // be included in the string output. The member name will be present, but the 924 // value will be replaced with "sensitive". 925 func (s CompleteSnapshotInput) String() string { 926 return awsutil.Prettify(s) 927 } 928 929 // GoString returns the string representation. 930 // 931 // API parameter values that are decorated as "sensitive" in the API will not 932 // be included in the string output. The member name will be present, but the 933 // value will be replaced with "sensitive". 934 func (s CompleteSnapshotInput) GoString() string { 935 return s.String() 936 } 937 938 // Validate inspects the fields of the type to determine if they are valid. 939 func (s *CompleteSnapshotInput) Validate() error { 940 invalidParams := request.ErrInvalidParams{Context: "CompleteSnapshotInput"} 941 if s.ChangedBlocksCount == nil { 942 invalidParams.Add(request.NewErrParamRequired("ChangedBlocksCount")) 943 } 944 if s.SnapshotId == nil { 945 invalidParams.Add(request.NewErrParamRequired("SnapshotId")) 946 } 947 if s.SnapshotId != nil && len(*s.SnapshotId) < 1 { 948 invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1)) 949 } 950 951 if invalidParams.Len() > 0 { 952 return invalidParams 953 } 954 return nil 955 } 956 957 // SetChangedBlocksCount sets the ChangedBlocksCount field's value. 958 func (s *CompleteSnapshotInput) SetChangedBlocksCount(v int64) *CompleteSnapshotInput { 959 s.ChangedBlocksCount = &v 960 return s 961 } 962 963 // SetChecksum sets the Checksum field's value. 964 func (s *CompleteSnapshotInput) SetChecksum(v string) *CompleteSnapshotInput { 965 s.Checksum = &v 966 return s 967 } 968 969 // SetChecksumAggregationMethod sets the ChecksumAggregationMethod field's value. 970 func (s *CompleteSnapshotInput) SetChecksumAggregationMethod(v string) *CompleteSnapshotInput { 971 s.ChecksumAggregationMethod = &v 972 return s 973 } 974 975 // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. 976 func (s *CompleteSnapshotInput) SetChecksumAlgorithm(v string) *CompleteSnapshotInput { 977 s.ChecksumAlgorithm = &v 978 return s 979 } 980 981 // SetSnapshotId sets the SnapshotId field's value. 982 func (s *CompleteSnapshotInput) SetSnapshotId(v string) *CompleteSnapshotInput { 983 s.SnapshotId = &v 984 return s 985 } 986 987 type CompleteSnapshotOutput struct { 988 _ struct{} `type:"structure"` 989 990 // The status of the snapshot. 991 Status *string `type:"string" enum:"Status"` 992 } 993 994 // String returns the string representation. 995 // 996 // API parameter values that are decorated as "sensitive" in the API will not 997 // be included in the string output. The member name will be present, but the 998 // value will be replaced with "sensitive". 999 func (s CompleteSnapshotOutput) String() string { 1000 return awsutil.Prettify(s) 1001 } 1002 1003 // GoString returns the string representation. 1004 // 1005 // API parameter values that are decorated as "sensitive" in the API will not 1006 // be included in the string output. The member name will be present, but the 1007 // value will be replaced with "sensitive". 1008 func (s CompleteSnapshotOutput) GoString() string { 1009 return s.String() 1010 } 1011 1012 // SetStatus sets the Status field's value. 1013 func (s *CompleteSnapshotOutput) SetStatus(v string) *CompleteSnapshotOutput { 1014 s.Status = &v 1015 return s 1016 } 1017 1018 // You have reached the limit for concurrent API requests. For more information, 1019 // see Optimizing performance of the EBS direct APIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapi-performance) 1020 // in the Amazon Elastic Compute Cloud User Guide. 1021 type ConcurrentLimitExceededException struct { 1022 _ struct{} `type:"structure"` 1023 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1024 1025 Message_ *string `locationName:"Message" type:"string"` 1026 } 1027 1028 // String returns the string representation. 1029 // 1030 // API parameter values that are decorated as "sensitive" in the API will not 1031 // be included in the string output. The member name will be present, but the 1032 // value will be replaced with "sensitive". 1033 func (s ConcurrentLimitExceededException) String() string { 1034 return awsutil.Prettify(s) 1035 } 1036 1037 // GoString returns the string representation. 1038 // 1039 // API parameter values that are decorated as "sensitive" in the API will not 1040 // be included in the string output. The member name will be present, but the 1041 // value will be replaced with "sensitive". 1042 func (s ConcurrentLimitExceededException) GoString() string { 1043 return s.String() 1044 } 1045 1046 func newErrorConcurrentLimitExceededException(v protocol.ResponseMetadata) error { 1047 return &ConcurrentLimitExceededException{ 1048 RespMetadata: v, 1049 } 1050 } 1051 1052 // Code returns the exception type name. 1053 func (s *ConcurrentLimitExceededException) Code() string { 1054 return "ConcurrentLimitExceededException" 1055 } 1056 1057 // Message returns the exception's message. 1058 func (s *ConcurrentLimitExceededException) Message() string { 1059 if s.Message_ != nil { 1060 return *s.Message_ 1061 } 1062 return "" 1063 } 1064 1065 // OrigErr always returns nil, satisfies awserr.Error interface. 1066 func (s *ConcurrentLimitExceededException) OrigErr() error { 1067 return nil 1068 } 1069 1070 func (s *ConcurrentLimitExceededException) Error() string { 1071 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1072 } 1073 1074 // Status code returns the HTTP status code for the request's response error. 1075 func (s *ConcurrentLimitExceededException) StatusCode() int { 1076 return s.RespMetadata.StatusCode 1077 } 1078 1079 // RequestID returns the service's response RequestID for request. 1080 func (s *ConcurrentLimitExceededException) RequestID() string { 1081 return s.RespMetadata.RequestID 1082 } 1083 1084 // The request uses the same client token as a previous, but non-identical request. 1085 type ConflictException struct { 1086 _ struct{} `type:"structure"` 1087 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1088 1089 Message_ *string `locationName:"Message" type:"string"` 1090 } 1091 1092 // String returns the string representation. 1093 // 1094 // API parameter values that are decorated as "sensitive" in the API will not 1095 // be included in the string output. The member name will be present, but the 1096 // value will be replaced with "sensitive". 1097 func (s ConflictException) String() string { 1098 return awsutil.Prettify(s) 1099 } 1100 1101 // GoString returns the string representation. 1102 // 1103 // API parameter values that are decorated as "sensitive" in the API will not 1104 // be included in the string output. The member name will be present, but the 1105 // value will be replaced with "sensitive". 1106 func (s ConflictException) GoString() string { 1107 return s.String() 1108 } 1109 1110 func newErrorConflictException(v protocol.ResponseMetadata) error { 1111 return &ConflictException{ 1112 RespMetadata: v, 1113 } 1114 } 1115 1116 // Code returns the exception type name. 1117 func (s *ConflictException) Code() string { 1118 return "ConflictException" 1119 } 1120 1121 // Message returns the exception's message. 1122 func (s *ConflictException) Message() string { 1123 if s.Message_ != nil { 1124 return *s.Message_ 1125 } 1126 return "" 1127 } 1128 1129 // OrigErr always returns nil, satisfies awserr.Error interface. 1130 func (s *ConflictException) OrigErr() error { 1131 return nil 1132 } 1133 1134 func (s *ConflictException) Error() string { 1135 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1136 } 1137 1138 // Status code returns the HTTP status code for the request's response error. 1139 func (s *ConflictException) StatusCode() int { 1140 return s.RespMetadata.StatusCode 1141 } 1142 1143 // RequestID returns the service's response RequestID for request. 1144 func (s *ConflictException) RequestID() string { 1145 return s.RespMetadata.RequestID 1146 } 1147 1148 type GetSnapshotBlockInput struct { 1149 _ struct{} `type:"structure" nopayload:"true"` 1150 1151 // The block index of the block from which to get data. 1152 // 1153 // Obtain the BlockIndex by running the ListChangedBlocks or ListSnapshotBlocks 1154 // operations. 1155 // 1156 // BlockIndex is a required field 1157 BlockIndex *int64 `location:"uri" locationName:"blockIndex" type:"integer" required:"true"` 1158 1159 // The block token of the block from which to get data. 1160 // 1161 // Obtain the BlockToken by running the ListChangedBlocks or ListSnapshotBlocks 1162 // operations. 1163 // 1164 // BlockToken is a required field 1165 BlockToken *string `location:"querystring" locationName:"blockToken" type:"string" required:"true"` 1166 1167 // The ID of the snapshot containing the block from which to get data. 1168 // 1169 // SnapshotId is a required field 1170 SnapshotId *string `location:"uri" locationName:"snapshotId" min:"1" type:"string" required:"true"` 1171 } 1172 1173 // String returns the string representation. 1174 // 1175 // API parameter values that are decorated as "sensitive" in the API will not 1176 // be included in the string output. The member name will be present, but the 1177 // value will be replaced with "sensitive". 1178 func (s GetSnapshotBlockInput) String() string { 1179 return awsutil.Prettify(s) 1180 } 1181 1182 // GoString returns the string representation. 1183 // 1184 // API parameter values that are decorated as "sensitive" in the API will not 1185 // be included in the string output. The member name will be present, but the 1186 // value will be replaced with "sensitive". 1187 func (s GetSnapshotBlockInput) GoString() string { 1188 return s.String() 1189 } 1190 1191 // Validate inspects the fields of the type to determine if they are valid. 1192 func (s *GetSnapshotBlockInput) Validate() error { 1193 invalidParams := request.ErrInvalidParams{Context: "GetSnapshotBlockInput"} 1194 if s.BlockIndex == nil { 1195 invalidParams.Add(request.NewErrParamRequired("BlockIndex")) 1196 } 1197 if s.BlockToken == nil { 1198 invalidParams.Add(request.NewErrParamRequired("BlockToken")) 1199 } 1200 if s.SnapshotId == nil { 1201 invalidParams.Add(request.NewErrParamRequired("SnapshotId")) 1202 } 1203 if s.SnapshotId != nil && len(*s.SnapshotId) < 1 { 1204 invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1)) 1205 } 1206 1207 if invalidParams.Len() > 0 { 1208 return invalidParams 1209 } 1210 return nil 1211 } 1212 1213 // SetBlockIndex sets the BlockIndex field's value. 1214 func (s *GetSnapshotBlockInput) SetBlockIndex(v int64) *GetSnapshotBlockInput { 1215 s.BlockIndex = &v 1216 return s 1217 } 1218 1219 // SetBlockToken sets the BlockToken field's value. 1220 func (s *GetSnapshotBlockInput) SetBlockToken(v string) *GetSnapshotBlockInput { 1221 s.BlockToken = &v 1222 return s 1223 } 1224 1225 // SetSnapshotId sets the SnapshotId field's value. 1226 func (s *GetSnapshotBlockInput) SetSnapshotId(v string) *GetSnapshotBlockInput { 1227 s.SnapshotId = &v 1228 return s 1229 } 1230 1231 type GetSnapshotBlockOutput struct { 1232 _ struct{} `type:"structure" payload:"BlockData"` 1233 1234 // The data content of the block. 1235 // 1236 // BlockData is a sensitive parameter and its value will be 1237 // replaced with "sensitive" in string returned by GetSnapshotBlockOutput's 1238 // String and GoString methods. 1239 BlockData io.ReadCloser `type:"blob" sensitive:"true"` 1240 1241 // The checksum generated for the block, which is Base64 encoded. 1242 Checksum *string `location:"header" locationName:"x-amz-Checksum" type:"string"` 1243 1244 // The algorithm used to generate the checksum for the block, such as SHA256. 1245 ChecksumAlgorithm *string `location:"header" locationName:"x-amz-Checksum-Algorithm" type:"string" enum:"ChecksumAlgorithm"` 1246 1247 // The size of the data in the block. 1248 DataLength *int64 `location:"header" locationName:"x-amz-Data-Length" type:"integer"` 1249 } 1250 1251 // String returns the string representation. 1252 // 1253 // API parameter values that are decorated as "sensitive" in the API will not 1254 // be included in the string output. The member name will be present, but the 1255 // value will be replaced with "sensitive". 1256 func (s GetSnapshotBlockOutput) String() string { 1257 return awsutil.Prettify(s) 1258 } 1259 1260 // GoString returns the string representation. 1261 // 1262 // API parameter values that are decorated as "sensitive" in the API will not 1263 // be included in the string output. The member name will be present, but the 1264 // value will be replaced with "sensitive". 1265 func (s GetSnapshotBlockOutput) GoString() string { 1266 return s.String() 1267 } 1268 1269 // SetBlockData sets the BlockData field's value. 1270 func (s *GetSnapshotBlockOutput) SetBlockData(v io.ReadCloser) *GetSnapshotBlockOutput { 1271 s.BlockData = v 1272 return s 1273 } 1274 1275 // SetChecksum sets the Checksum field's value. 1276 func (s *GetSnapshotBlockOutput) SetChecksum(v string) *GetSnapshotBlockOutput { 1277 s.Checksum = &v 1278 return s 1279 } 1280 1281 // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. 1282 func (s *GetSnapshotBlockOutput) SetChecksumAlgorithm(v string) *GetSnapshotBlockOutput { 1283 s.ChecksumAlgorithm = &v 1284 return s 1285 } 1286 1287 // SetDataLength sets the DataLength field's value. 1288 func (s *GetSnapshotBlockOutput) SetDataLength(v int64) *GetSnapshotBlockOutput { 1289 s.DataLength = &v 1290 return s 1291 } 1292 1293 // An internal error has occurred. 1294 type InternalServerException struct { 1295 _ struct{} `type:"structure"` 1296 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1297 1298 Message_ *string `locationName:"Message" type:"string"` 1299 } 1300 1301 // String returns the string representation. 1302 // 1303 // API parameter values that are decorated as "sensitive" in the API will not 1304 // be included in the string output. The member name will be present, but the 1305 // value will be replaced with "sensitive". 1306 func (s InternalServerException) String() string { 1307 return awsutil.Prettify(s) 1308 } 1309 1310 // GoString returns the string representation. 1311 // 1312 // API parameter values that are decorated as "sensitive" in the API will not 1313 // be included in the string output. The member name will be present, but the 1314 // value will be replaced with "sensitive". 1315 func (s InternalServerException) GoString() string { 1316 return s.String() 1317 } 1318 1319 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 1320 return &InternalServerException{ 1321 RespMetadata: v, 1322 } 1323 } 1324 1325 // Code returns the exception type name. 1326 func (s *InternalServerException) Code() string { 1327 return "InternalServerException" 1328 } 1329 1330 // Message returns the exception's message. 1331 func (s *InternalServerException) Message() string { 1332 if s.Message_ != nil { 1333 return *s.Message_ 1334 } 1335 return "" 1336 } 1337 1338 // OrigErr always returns nil, satisfies awserr.Error interface. 1339 func (s *InternalServerException) OrigErr() error { 1340 return nil 1341 } 1342 1343 func (s *InternalServerException) Error() string { 1344 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1345 } 1346 1347 // Status code returns the HTTP status code for the request's response error. 1348 func (s *InternalServerException) StatusCode() int { 1349 return s.RespMetadata.StatusCode 1350 } 1351 1352 // RequestID returns the service's response RequestID for request. 1353 func (s *InternalServerException) RequestID() string { 1354 return s.RespMetadata.RequestID 1355 } 1356 1357 type ListChangedBlocksInput struct { 1358 _ struct{} `type:"structure" nopayload:"true"` 1359 1360 // The ID of the first snapshot to use for the comparison. 1361 // 1362 // The FirstSnapshotID parameter must be specified with a SecondSnapshotId parameter; 1363 // otherwise, an error occurs. 1364 FirstSnapshotId *string `location:"querystring" locationName:"firstSnapshotId" min:"1" type:"string"` 1365 1366 // The number of results to return. 1367 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"100" type:"integer"` 1368 1369 // The token to request the next page of results. 1370 NextToken *string `location:"querystring" locationName:"pageToken" type:"string"` 1371 1372 // The ID of the second snapshot to use for the comparison. 1373 // 1374 // The SecondSnapshotId parameter must be specified with a FirstSnapshotID parameter; 1375 // otherwise, an error occurs. 1376 // 1377 // SecondSnapshotId is a required field 1378 SecondSnapshotId *string `location:"uri" locationName:"secondSnapshotId" min:"1" type:"string" required:"true"` 1379 1380 // The block index from which the comparison should start. 1381 // 1382 // The list in the response will start from this block index or the next valid 1383 // block index in the snapshots. 1384 StartingBlockIndex *int64 `location:"querystring" locationName:"startingBlockIndex" type:"integer"` 1385 } 1386 1387 // String returns the string representation. 1388 // 1389 // API parameter values that are decorated as "sensitive" in the API will not 1390 // be included in the string output. The member name will be present, but the 1391 // value will be replaced with "sensitive". 1392 func (s ListChangedBlocksInput) String() string { 1393 return awsutil.Prettify(s) 1394 } 1395 1396 // GoString returns the string representation. 1397 // 1398 // API parameter values that are decorated as "sensitive" in the API will not 1399 // be included in the string output. The member name will be present, but the 1400 // value will be replaced with "sensitive". 1401 func (s ListChangedBlocksInput) GoString() string { 1402 return s.String() 1403 } 1404 1405 // Validate inspects the fields of the type to determine if they are valid. 1406 func (s *ListChangedBlocksInput) Validate() error { 1407 invalidParams := request.ErrInvalidParams{Context: "ListChangedBlocksInput"} 1408 if s.FirstSnapshotId != nil && len(*s.FirstSnapshotId) < 1 { 1409 invalidParams.Add(request.NewErrParamMinLen("FirstSnapshotId", 1)) 1410 } 1411 if s.MaxResults != nil && *s.MaxResults < 100 { 1412 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 100)) 1413 } 1414 if s.SecondSnapshotId == nil { 1415 invalidParams.Add(request.NewErrParamRequired("SecondSnapshotId")) 1416 } 1417 if s.SecondSnapshotId != nil && len(*s.SecondSnapshotId) < 1 { 1418 invalidParams.Add(request.NewErrParamMinLen("SecondSnapshotId", 1)) 1419 } 1420 1421 if invalidParams.Len() > 0 { 1422 return invalidParams 1423 } 1424 return nil 1425 } 1426 1427 // SetFirstSnapshotId sets the FirstSnapshotId field's value. 1428 func (s *ListChangedBlocksInput) SetFirstSnapshotId(v string) *ListChangedBlocksInput { 1429 s.FirstSnapshotId = &v 1430 return s 1431 } 1432 1433 // SetMaxResults sets the MaxResults field's value. 1434 func (s *ListChangedBlocksInput) SetMaxResults(v int64) *ListChangedBlocksInput { 1435 s.MaxResults = &v 1436 return s 1437 } 1438 1439 // SetNextToken sets the NextToken field's value. 1440 func (s *ListChangedBlocksInput) SetNextToken(v string) *ListChangedBlocksInput { 1441 s.NextToken = &v 1442 return s 1443 } 1444 1445 // SetSecondSnapshotId sets the SecondSnapshotId field's value. 1446 func (s *ListChangedBlocksInput) SetSecondSnapshotId(v string) *ListChangedBlocksInput { 1447 s.SecondSnapshotId = &v 1448 return s 1449 } 1450 1451 // SetStartingBlockIndex sets the StartingBlockIndex field's value. 1452 func (s *ListChangedBlocksInput) SetStartingBlockIndex(v int64) *ListChangedBlocksInput { 1453 s.StartingBlockIndex = &v 1454 return s 1455 } 1456 1457 type ListChangedBlocksOutput struct { 1458 _ struct{} `type:"structure"` 1459 1460 // The size of the blocks in the snapshot, in bytes. 1461 BlockSize *int64 `type:"integer"` 1462 1463 // An array of objects containing information about the changed blocks. 1464 ChangedBlocks []*ChangedBlock `type:"list"` 1465 1466 // The time when the BlockToken expires. 1467 ExpiryTime *time.Time `type:"timestamp"` 1468 1469 // The token to use to retrieve the next page of results. This value is null 1470 // when there are no more results to return. 1471 NextToken *string `type:"string"` 1472 1473 // The size of the volume in GB. 1474 VolumeSize *int64 `min:"1" type:"long"` 1475 } 1476 1477 // String returns the string representation. 1478 // 1479 // API parameter values that are decorated as "sensitive" in the API will not 1480 // be included in the string output. The member name will be present, but the 1481 // value will be replaced with "sensitive". 1482 func (s ListChangedBlocksOutput) String() string { 1483 return awsutil.Prettify(s) 1484 } 1485 1486 // GoString returns the string representation. 1487 // 1488 // API parameter values that are decorated as "sensitive" in the API will not 1489 // be included in the string output. The member name will be present, but the 1490 // value will be replaced with "sensitive". 1491 func (s ListChangedBlocksOutput) GoString() string { 1492 return s.String() 1493 } 1494 1495 // SetBlockSize sets the BlockSize field's value. 1496 func (s *ListChangedBlocksOutput) SetBlockSize(v int64) *ListChangedBlocksOutput { 1497 s.BlockSize = &v 1498 return s 1499 } 1500 1501 // SetChangedBlocks sets the ChangedBlocks field's value. 1502 func (s *ListChangedBlocksOutput) SetChangedBlocks(v []*ChangedBlock) *ListChangedBlocksOutput { 1503 s.ChangedBlocks = v 1504 return s 1505 } 1506 1507 // SetExpiryTime sets the ExpiryTime field's value. 1508 func (s *ListChangedBlocksOutput) SetExpiryTime(v time.Time) *ListChangedBlocksOutput { 1509 s.ExpiryTime = &v 1510 return s 1511 } 1512 1513 // SetNextToken sets the NextToken field's value. 1514 func (s *ListChangedBlocksOutput) SetNextToken(v string) *ListChangedBlocksOutput { 1515 s.NextToken = &v 1516 return s 1517 } 1518 1519 // SetVolumeSize sets the VolumeSize field's value. 1520 func (s *ListChangedBlocksOutput) SetVolumeSize(v int64) *ListChangedBlocksOutput { 1521 s.VolumeSize = &v 1522 return s 1523 } 1524 1525 type ListSnapshotBlocksInput struct { 1526 _ struct{} `type:"structure" nopayload:"true"` 1527 1528 // The number of results to return. 1529 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"100" type:"integer"` 1530 1531 // The token to request the next page of results. 1532 NextToken *string `location:"querystring" locationName:"pageToken" type:"string"` 1533 1534 // The ID of the snapshot from which to get block indexes and block tokens. 1535 // 1536 // SnapshotId is a required field 1537 SnapshotId *string `location:"uri" locationName:"snapshotId" min:"1" type:"string" required:"true"` 1538 1539 // The block index from which the list should start. The list in the response 1540 // will start from this block index or the next valid block index in the snapshot. 1541 StartingBlockIndex *int64 `location:"querystring" locationName:"startingBlockIndex" type:"integer"` 1542 } 1543 1544 // String returns the string representation. 1545 // 1546 // API parameter values that are decorated as "sensitive" in the API will not 1547 // be included in the string output. The member name will be present, but the 1548 // value will be replaced with "sensitive". 1549 func (s ListSnapshotBlocksInput) String() string { 1550 return awsutil.Prettify(s) 1551 } 1552 1553 // GoString returns the string representation. 1554 // 1555 // API parameter values that are decorated as "sensitive" in the API will not 1556 // be included in the string output. The member name will be present, but the 1557 // value will be replaced with "sensitive". 1558 func (s ListSnapshotBlocksInput) GoString() string { 1559 return s.String() 1560 } 1561 1562 // Validate inspects the fields of the type to determine if they are valid. 1563 func (s *ListSnapshotBlocksInput) Validate() error { 1564 invalidParams := request.ErrInvalidParams{Context: "ListSnapshotBlocksInput"} 1565 if s.MaxResults != nil && *s.MaxResults < 100 { 1566 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 100)) 1567 } 1568 if s.SnapshotId == nil { 1569 invalidParams.Add(request.NewErrParamRequired("SnapshotId")) 1570 } 1571 if s.SnapshotId != nil && len(*s.SnapshotId) < 1 { 1572 invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1)) 1573 } 1574 1575 if invalidParams.Len() > 0 { 1576 return invalidParams 1577 } 1578 return nil 1579 } 1580 1581 // SetMaxResults sets the MaxResults field's value. 1582 func (s *ListSnapshotBlocksInput) SetMaxResults(v int64) *ListSnapshotBlocksInput { 1583 s.MaxResults = &v 1584 return s 1585 } 1586 1587 // SetNextToken sets the NextToken field's value. 1588 func (s *ListSnapshotBlocksInput) SetNextToken(v string) *ListSnapshotBlocksInput { 1589 s.NextToken = &v 1590 return s 1591 } 1592 1593 // SetSnapshotId sets the SnapshotId field's value. 1594 func (s *ListSnapshotBlocksInput) SetSnapshotId(v string) *ListSnapshotBlocksInput { 1595 s.SnapshotId = &v 1596 return s 1597 } 1598 1599 // SetStartingBlockIndex sets the StartingBlockIndex field's value. 1600 func (s *ListSnapshotBlocksInput) SetStartingBlockIndex(v int64) *ListSnapshotBlocksInput { 1601 s.StartingBlockIndex = &v 1602 return s 1603 } 1604 1605 type ListSnapshotBlocksOutput struct { 1606 _ struct{} `type:"structure"` 1607 1608 // The size of the blocks in the snapshot, in bytes. 1609 BlockSize *int64 `type:"integer"` 1610 1611 // An array of objects containing information about the blocks. 1612 // 1613 // Blocks is a sensitive parameter and its value will be 1614 // replaced with "sensitive" in string returned by ListSnapshotBlocksOutput's 1615 // String and GoString methods. 1616 Blocks []*Block `type:"list" sensitive:"true"` 1617 1618 // The time when the BlockToken expires. 1619 ExpiryTime *time.Time `type:"timestamp"` 1620 1621 // The token to use to retrieve the next page of results. This value is null 1622 // when there are no more results to return. 1623 NextToken *string `type:"string"` 1624 1625 // The size of the volume in GB. 1626 VolumeSize *int64 `min:"1" type:"long"` 1627 } 1628 1629 // String returns the string representation. 1630 // 1631 // API parameter values that are decorated as "sensitive" in the API will not 1632 // be included in the string output. The member name will be present, but the 1633 // value will be replaced with "sensitive". 1634 func (s ListSnapshotBlocksOutput) String() string { 1635 return awsutil.Prettify(s) 1636 } 1637 1638 // GoString returns the string representation. 1639 // 1640 // API parameter values that are decorated as "sensitive" in the API will not 1641 // be included in the string output. The member name will be present, but the 1642 // value will be replaced with "sensitive". 1643 func (s ListSnapshotBlocksOutput) GoString() string { 1644 return s.String() 1645 } 1646 1647 // SetBlockSize sets the BlockSize field's value. 1648 func (s *ListSnapshotBlocksOutput) SetBlockSize(v int64) *ListSnapshotBlocksOutput { 1649 s.BlockSize = &v 1650 return s 1651 } 1652 1653 // SetBlocks sets the Blocks field's value. 1654 func (s *ListSnapshotBlocksOutput) SetBlocks(v []*Block) *ListSnapshotBlocksOutput { 1655 s.Blocks = v 1656 return s 1657 } 1658 1659 // SetExpiryTime sets the ExpiryTime field's value. 1660 func (s *ListSnapshotBlocksOutput) SetExpiryTime(v time.Time) *ListSnapshotBlocksOutput { 1661 s.ExpiryTime = &v 1662 return s 1663 } 1664 1665 // SetNextToken sets the NextToken field's value. 1666 func (s *ListSnapshotBlocksOutput) SetNextToken(v string) *ListSnapshotBlocksOutput { 1667 s.NextToken = &v 1668 return s 1669 } 1670 1671 // SetVolumeSize sets the VolumeSize field's value. 1672 func (s *ListSnapshotBlocksOutput) SetVolumeSize(v int64) *ListSnapshotBlocksOutput { 1673 s.VolumeSize = &v 1674 return s 1675 } 1676 1677 type PutSnapshotBlockInput struct { 1678 _ struct{} `type:"structure" payload:"BlockData"` 1679 1680 // The data to write to the block. 1681 // 1682 // The block data is not signed as part of the Signature Version 4 signing process. 1683 // As a result, you must generate and provide a Base64-encoded SHA256 checksum 1684 // for the block data using the x-amz-Checksum header. Also, you must specify 1685 // the checksum algorithm using the x-amz-Checksum-Algorithm header. The checksum 1686 // that you provide is part of the Signature Version 4 signing process. It is 1687 // validated against a checksum generated by Amazon EBS to ensure the validity 1688 // and authenticity of the data. If the checksums do not correspond, the request 1689 // fails. For more information, see Using checksums with the EBS direct APIs 1690 // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums) 1691 // in the Amazon Elastic Compute Cloud User Guide. 1692 // 1693 // To use an non-seekable io.Reader for this request wrap the io.Reader with 1694 // "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable 1695 // readers. This will allow the SDK to send the reader's payload as chunked 1696 // transfer encoding. 1697 // 1698 // BlockData is a sensitive parameter and its value will be 1699 // replaced with "sensitive" in string returned by PutSnapshotBlockInput's 1700 // String and GoString methods. 1701 // 1702 // BlockData is a required field 1703 BlockData io.ReadSeeker `type:"blob" required:"true" sensitive:"true"` 1704 1705 // The block index of the block in which to write the data. A block index is 1706 // a logical index in units of 512 KiB blocks. To identify the block index, 1707 // divide the logical offset of the data in the logical volume by the block 1708 // size (logical offset of data/524288). The logical offset of the data must 1709 // be 512 KiB aligned. 1710 // 1711 // BlockIndex is a required field 1712 BlockIndex *int64 `location:"uri" locationName:"blockIndex" type:"integer" required:"true"` 1713 1714 // A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported. 1715 // 1716 // Checksum is a required field 1717 Checksum *string `location:"header" locationName:"x-amz-Checksum" type:"string" required:"true"` 1718 1719 // The algorithm used to generate the checksum. Currently, the only supported 1720 // algorithm is SHA256. 1721 // 1722 // ChecksumAlgorithm is a required field 1723 ChecksumAlgorithm *string `location:"header" locationName:"x-amz-Checksum-Algorithm" type:"string" required:"true" enum:"ChecksumAlgorithm"` 1724 1725 // The size of the data to write to the block, in bytes. Currently, the only 1726 // supported size is 524288 bytes. 1727 // 1728 // Valid values: 524288 1729 // 1730 // DataLength is a required field 1731 DataLength *int64 `location:"header" locationName:"x-amz-Data-Length" type:"integer" required:"true"` 1732 1733 // The progress of the write process, as a percentage. 1734 Progress *int64 `location:"header" locationName:"x-amz-Progress" type:"integer"` 1735 1736 // The ID of the snapshot. 1737 // 1738 // SnapshotId is a required field 1739 SnapshotId *string `location:"uri" locationName:"snapshotId" min:"1" type:"string" required:"true"` 1740 } 1741 1742 // String returns the string representation. 1743 // 1744 // API parameter values that are decorated as "sensitive" in the API will not 1745 // be included in the string output. The member name will be present, but the 1746 // value will be replaced with "sensitive". 1747 func (s PutSnapshotBlockInput) String() string { 1748 return awsutil.Prettify(s) 1749 } 1750 1751 // GoString returns the string representation. 1752 // 1753 // API parameter values that are decorated as "sensitive" in the API will not 1754 // be included in the string output. The member name will be present, but the 1755 // value will be replaced with "sensitive". 1756 func (s PutSnapshotBlockInput) GoString() string { 1757 return s.String() 1758 } 1759 1760 // Validate inspects the fields of the type to determine if they are valid. 1761 func (s *PutSnapshotBlockInput) Validate() error { 1762 invalidParams := request.ErrInvalidParams{Context: "PutSnapshotBlockInput"} 1763 if s.BlockData == nil { 1764 invalidParams.Add(request.NewErrParamRequired("BlockData")) 1765 } 1766 if s.BlockIndex == nil { 1767 invalidParams.Add(request.NewErrParamRequired("BlockIndex")) 1768 } 1769 if s.Checksum == nil { 1770 invalidParams.Add(request.NewErrParamRequired("Checksum")) 1771 } 1772 if s.ChecksumAlgorithm == nil { 1773 invalidParams.Add(request.NewErrParamRequired("ChecksumAlgorithm")) 1774 } 1775 if s.DataLength == nil { 1776 invalidParams.Add(request.NewErrParamRequired("DataLength")) 1777 } 1778 if s.SnapshotId == nil { 1779 invalidParams.Add(request.NewErrParamRequired("SnapshotId")) 1780 } 1781 if s.SnapshotId != nil && len(*s.SnapshotId) < 1 { 1782 invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1)) 1783 } 1784 1785 if invalidParams.Len() > 0 { 1786 return invalidParams 1787 } 1788 return nil 1789 } 1790 1791 // SetBlockData sets the BlockData field's value. 1792 func (s *PutSnapshotBlockInput) SetBlockData(v io.ReadSeeker) *PutSnapshotBlockInput { 1793 s.BlockData = v 1794 return s 1795 } 1796 1797 // SetBlockIndex sets the BlockIndex field's value. 1798 func (s *PutSnapshotBlockInput) SetBlockIndex(v int64) *PutSnapshotBlockInput { 1799 s.BlockIndex = &v 1800 return s 1801 } 1802 1803 // SetChecksum sets the Checksum field's value. 1804 func (s *PutSnapshotBlockInput) SetChecksum(v string) *PutSnapshotBlockInput { 1805 s.Checksum = &v 1806 return s 1807 } 1808 1809 // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. 1810 func (s *PutSnapshotBlockInput) SetChecksumAlgorithm(v string) *PutSnapshotBlockInput { 1811 s.ChecksumAlgorithm = &v 1812 return s 1813 } 1814 1815 // SetDataLength sets the DataLength field's value. 1816 func (s *PutSnapshotBlockInput) SetDataLength(v int64) *PutSnapshotBlockInput { 1817 s.DataLength = &v 1818 return s 1819 } 1820 1821 // SetProgress sets the Progress field's value. 1822 func (s *PutSnapshotBlockInput) SetProgress(v int64) *PutSnapshotBlockInput { 1823 s.Progress = &v 1824 return s 1825 } 1826 1827 // SetSnapshotId sets the SnapshotId field's value. 1828 func (s *PutSnapshotBlockInput) SetSnapshotId(v string) *PutSnapshotBlockInput { 1829 s.SnapshotId = &v 1830 return s 1831 } 1832 1833 type PutSnapshotBlockOutput struct { 1834 _ struct{} `type:"structure" nopayload:"true"` 1835 1836 // The SHA256 checksum generated for the block data by Amazon EBS. 1837 Checksum *string `location:"header" locationName:"x-amz-Checksum" type:"string"` 1838 1839 // The algorithm used by Amazon EBS to generate the checksum. 1840 ChecksumAlgorithm *string `location:"header" locationName:"x-amz-Checksum-Algorithm" type:"string" enum:"ChecksumAlgorithm"` 1841 } 1842 1843 // String returns the string representation. 1844 // 1845 // API parameter values that are decorated as "sensitive" in the API will not 1846 // be included in the string output. The member name will be present, but the 1847 // value will be replaced with "sensitive". 1848 func (s PutSnapshotBlockOutput) String() string { 1849 return awsutil.Prettify(s) 1850 } 1851 1852 // GoString returns the string representation. 1853 // 1854 // API parameter values that are decorated as "sensitive" in the API will not 1855 // be included in the string output. The member name will be present, but the 1856 // value will be replaced with "sensitive". 1857 func (s PutSnapshotBlockOutput) GoString() string { 1858 return s.String() 1859 } 1860 1861 // SetChecksum sets the Checksum field's value. 1862 func (s *PutSnapshotBlockOutput) SetChecksum(v string) *PutSnapshotBlockOutput { 1863 s.Checksum = &v 1864 return s 1865 } 1866 1867 // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. 1868 func (s *PutSnapshotBlockOutput) SetChecksumAlgorithm(v string) *PutSnapshotBlockOutput { 1869 s.ChecksumAlgorithm = &v 1870 return s 1871 } 1872 1873 // The number of API requests has exceed the maximum allowed API request throttling 1874 // limit. 1875 type RequestThrottledException struct { 1876 _ struct{} `type:"structure"` 1877 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1878 1879 Message_ *string `locationName:"Message" type:"string"` 1880 1881 // The reason for the exception. 1882 Reason *string `type:"string" enum:"RequestThrottledExceptionReason"` 1883 } 1884 1885 // String returns the string representation. 1886 // 1887 // API parameter values that are decorated as "sensitive" in the API will not 1888 // be included in the string output. The member name will be present, but the 1889 // value will be replaced with "sensitive". 1890 func (s RequestThrottledException) String() string { 1891 return awsutil.Prettify(s) 1892 } 1893 1894 // GoString returns the string representation. 1895 // 1896 // API parameter values that are decorated as "sensitive" in the API will not 1897 // be included in the string output. The member name will be present, but the 1898 // value will be replaced with "sensitive". 1899 func (s RequestThrottledException) GoString() string { 1900 return s.String() 1901 } 1902 1903 func newErrorRequestThrottledException(v protocol.ResponseMetadata) error { 1904 return &RequestThrottledException{ 1905 RespMetadata: v, 1906 } 1907 } 1908 1909 // Code returns the exception type name. 1910 func (s *RequestThrottledException) Code() string { 1911 return "RequestThrottledException" 1912 } 1913 1914 // Message returns the exception's message. 1915 func (s *RequestThrottledException) Message() string { 1916 if s.Message_ != nil { 1917 return *s.Message_ 1918 } 1919 return "" 1920 } 1921 1922 // OrigErr always returns nil, satisfies awserr.Error interface. 1923 func (s *RequestThrottledException) OrigErr() error { 1924 return nil 1925 } 1926 1927 func (s *RequestThrottledException) Error() string { 1928 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 1929 } 1930 1931 // Status code returns the HTTP status code for the request's response error. 1932 func (s *RequestThrottledException) StatusCode() int { 1933 return s.RespMetadata.StatusCode 1934 } 1935 1936 // RequestID returns the service's response RequestID for request. 1937 func (s *RequestThrottledException) RequestID() string { 1938 return s.RespMetadata.RequestID 1939 } 1940 1941 // The specified resource does not exist. 1942 type ResourceNotFoundException struct { 1943 _ struct{} `type:"structure"` 1944 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1945 1946 Message_ *string `locationName:"Message" type:"string"` 1947 1948 // The reason for the exception. 1949 Reason *string `type:"string" enum:"ResourceNotFoundExceptionReason"` 1950 } 1951 1952 // String returns the string representation. 1953 // 1954 // API parameter values that are decorated as "sensitive" in the API will not 1955 // be included in the string output. The member name will be present, but the 1956 // value will be replaced with "sensitive". 1957 func (s ResourceNotFoundException) String() string { 1958 return awsutil.Prettify(s) 1959 } 1960 1961 // GoString returns the string representation. 1962 // 1963 // API parameter values that are decorated as "sensitive" in the API will not 1964 // be included in the string output. The member name will be present, but the 1965 // value will be replaced with "sensitive". 1966 func (s ResourceNotFoundException) GoString() string { 1967 return s.String() 1968 } 1969 1970 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 1971 return &ResourceNotFoundException{ 1972 RespMetadata: v, 1973 } 1974 } 1975 1976 // Code returns the exception type name. 1977 func (s *ResourceNotFoundException) Code() string { 1978 return "ResourceNotFoundException" 1979 } 1980 1981 // Message returns the exception's message. 1982 func (s *ResourceNotFoundException) Message() string { 1983 if s.Message_ != nil { 1984 return *s.Message_ 1985 } 1986 return "" 1987 } 1988 1989 // OrigErr always returns nil, satisfies awserr.Error interface. 1990 func (s *ResourceNotFoundException) OrigErr() error { 1991 return nil 1992 } 1993 1994 func (s *ResourceNotFoundException) Error() string { 1995 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 1996 } 1997 1998 // Status code returns the HTTP status code for the request's response error. 1999 func (s *ResourceNotFoundException) StatusCode() int { 2000 return s.RespMetadata.StatusCode 2001 } 2002 2003 // RequestID returns the service's response RequestID for request. 2004 func (s *ResourceNotFoundException) RequestID() string { 2005 return s.RespMetadata.RequestID 2006 } 2007 2008 // Your current service quotas do not allow you to perform this action. 2009 type ServiceQuotaExceededException struct { 2010 _ struct{} `type:"structure"` 2011 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2012 2013 Message_ *string `locationName:"Message" type:"string"` 2014 2015 // The reason for the exception. 2016 Reason *string `type:"string" enum:"ServiceQuotaExceededExceptionReason"` 2017 } 2018 2019 // String returns the string representation. 2020 // 2021 // API parameter values that are decorated as "sensitive" in the API will not 2022 // be included in the string output. The member name will be present, but the 2023 // value will be replaced with "sensitive". 2024 func (s ServiceQuotaExceededException) String() string { 2025 return awsutil.Prettify(s) 2026 } 2027 2028 // GoString returns the string representation. 2029 // 2030 // API parameter values that are decorated as "sensitive" in the API will not 2031 // be included in the string output. The member name will be present, but the 2032 // value will be replaced with "sensitive". 2033 func (s ServiceQuotaExceededException) GoString() string { 2034 return s.String() 2035 } 2036 2037 func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 2038 return &ServiceQuotaExceededException{ 2039 RespMetadata: v, 2040 } 2041 } 2042 2043 // Code returns the exception type name. 2044 func (s *ServiceQuotaExceededException) Code() string { 2045 return "ServiceQuotaExceededException" 2046 } 2047 2048 // Message returns the exception's message. 2049 func (s *ServiceQuotaExceededException) Message() string { 2050 if s.Message_ != nil { 2051 return *s.Message_ 2052 } 2053 return "" 2054 } 2055 2056 // OrigErr always returns nil, satisfies awserr.Error interface. 2057 func (s *ServiceQuotaExceededException) OrigErr() error { 2058 return nil 2059 } 2060 2061 func (s *ServiceQuotaExceededException) Error() string { 2062 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2063 } 2064 2065 // Status code returns the HTTP status code for the request's response error. 2066 func (s *ServiceQuotaExceededException) StatusCode() int { 2067 return s.RespMetadata.StatusCode 2068 } 2069 2070 // RequestID returns the service's response RequestID for request. 2071 func (s *ServiceQuotaExceededException) RequestID() string { 2072 return s.RespMetadata.RequestID 2073 } 2074 2075 type StartSnapshotInput struct { 2076 _ struct{} `type:"structure"` 2077 2078 // A unique, case-sensitive identifier that you provide to ensure the idempotency 2079 // of the request. Idempotency ensures that an API request completes only once. 2080 // With an idempotent request, if the original request completes successfully. 2081 // The subsequent retries with the same client token return the result from 2082 // the original successful request and they have no additional effect. 2083 // 2084 // If you do not specify a client token, one is automatically generated by the 2085 // Amazon Web Services SDK. 2086 // 2087 // For more information, see Idempotency for StartSnapshot API (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html) 2088 // in the Amazon Elastic Compute Cloud User Guide. 2089 ClientToken *string `type:"string" idempotencyToken:"true"` 2090 2091 // A description for the snapshot. 2092 Description *string `type:"string"` 2093 2094 // Indicates whether to encrypt the snapshot. To create an encrypted snapshot, 2095 // specify true. To create an unencrypted snapshot, omit this parameter. 2096 // 2097 // If you specify a value for ParentSnapshotId, omit this parameter. 2098 // 2099 // If you specify true, the snapshot is encrypted using the KMS key specified 2100 // using the KmsKeyArn parameter. If no value is specified for KmsKeyArn, the 2101 // default KMS key for your account is used. If no default KMS key has been 2102 // specified for your account, the Amazon Web Services managed KMS key is used. 2103 // To set a default KMS key for your account, use ModifyEbsDefaultKmsKeyId (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyEbsDefaultKmsKeyId.html). 2104 // 2105 // If your account is enabled for encryption by default, you cannot set this 2106 // parameter to false. In this case, you can omit this parameter. 2107 // 2108 // For more information, see Using encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-encryption) 2109 // in the Amazon Elastic Compute Cloud User Guide. 2110 Encrypted *bool `type:"boolean"` 2111 2112 // The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to 2113 // be used to encrypt the snapshot. If you do not specify a KMS key, the default 2114 // Amazon Web Services managed KMS key is used. 2115 // 2116 // If you specify a ParentSnapshotId, omit this parameter; the snapshot will 2117 // be encrypted using the same KMS key that was used to encrypt the parent snapshot. 2118 // 2119 // If Encrypted is set to true, you must specify a KMS key ARN. 2120 // 2121 // KmsKeyArn is a sensitive parameter and its value will be 2122 // replaced with "sensitive" in string returned by StartSnapshotInput's 2123 // String and GoString methods. 2124 KmsKeyArn *string `min:"1" type:"string" sensitive:"true"` 2125 2126 // The ID of the parent snapshot. If there is no parent snapshot, or if you 2127 // are creating the first snapshot for an on-premises volume, omit this parameter. 2128 // 2129 // If your account is enabled for encryption by default, you cannot use an unencrypted 2130 // snapshot as a parent snapshot. You must first create an encrypted copy of 2131 // the parent snapshot using CopySnapshot (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html). 2132 ParentSnapshotId *string `min:"1" type:"string"` 2133 2134 // The tags to apply to the snapshot. 2135 Tags []*Tag `type:"list"` 2136 2137 // The amount of time (in minutes) after which the snapshot is automatically 2138 // cancelled if: 2139 // 2140 // * No blocks are written to the snapshot. 2141 // 2142 // * The snapshot is not completed after writing the last block of data. 2143 // 2144 // If no value is specified, the timeout defaults to 60 minutes. 2145 Timeout *int64 `min:"10" type:"integer"` 2146 2147 // The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). 2148 // 2149 // VolumeSize is a required field 2150 VolumeSize *int64 `min:"1" type:"long" required:"true"` 2151 } 2152 2153 // String returns the string representation. 2154 // 2155 // API parameter values that are decorated as "sensitive" in the API will not 2156 // be included in the string output. The member name will be present, but the 2157 // value will be replaced with "sensitive". 2158 func (s StartSnapshotInput) String() string { 2159 return awsutil.Prettify(s) 2160 } 2161 2162 // GoString returns the string representation. 2163 // 2164 // API parameter values that are decorated as "sensitive" in the API will not 2165 // be included in the string output. The member name will be present, but the 2166 // value will be replaced with "sensitive". 2167 func (s StartSnapshotInput) GoString() string { 2168 return s.String() 2169 } 2170 2171 // Validate inspects the fields of the type to determine if they are valid. 2172 func (s *StartSnapshotInput) Validate() error { 2173 invalidParams := request.ErrInvalidParams{Context: "StartSnapshotInput"} 2174 if s.KmsKeyArn != nil && len(*s.KmsKeyArn) < 1 { 2175 invalidParams.Add(request.NewErrParamMinLen("KmsKeyArn", 1)) 2176 } 2177 if s.ParentSnapshotId != nil && len(*s.ParentSnapshotId) < 1 { 2178 invalidParams.Add(request.NewErrParamMinLen("ParentSnapshotId", 1)) 2179 } 2180 if s.Timeout != nil && *s.Timeout < 10 { 2181 invalidParams.Add(request.NewErrParamMinValue("Timeout", 10)) 2182 } 2183 if s.VolumeSize == nil { 2184 invalidParams.Add(request.NewErrParamRequired("VolumeSize")) 2185 } 2186 if s.VolumeSize != nil && *s.VolumeSize < 1 { 2187 invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1)) 2188 } 2189 2190 if invalidParams.Len() > 0 { 2191 return invalidParams 2192 } 2193 return nil 2194 } 2195 2196 // SetClientToken sets the ClientToken field's value. 2197 func (s *StartSnapshotInput) SetClientToken(v string) *StartSnapshotInput { 2198 s.ClientToken = &v 2199 return s 2200 } 2201 2202 // SetDescription sets the Description field's value. 2203 func (s *StartSnapshotInput) SetDescription(v string) *StartSnapshotInput { 2204 s.Description = &v 2205 return s 2206 } 2207 2208 // SetEncrypted sets the Encrypted field's value. 2209 func (s *StartSnapshotInput) SetEncrypted(v bool) *StartSnapshotInput { 2210 s.Encrypted = &v 2211 return s 2212 } 2213 2214 // SetKmsKeyArn sets the KmsKeyArn field's value. 2215 func (s *StartSnapshotInput) SetKmsKeyArn(v string) *StartSnapshotInput { 2216 s.KmsKeyArn = &v 2217 return s 2218 } 2219 2220 // SetParentSnapshotId sets the ParentSnapshotId field's value. 2221 func (s *StartSnapshotInput) SetParentSnapshotId(v string) *StartSnapshotInput { 2222 s.ParentSnapshotId = &v 2223 return s 2224 } 2225 2226 // SetTags sets the Tags field's value. 2227 func (s *StartSnapshotInput) SetTags(v []*Tag) *StartSnapshotInput { 2228 s.Tags = v 2229 return s 2230 } 2231 2232 // SetTimeout sets the Timeout field's value. 2233 func (s *StartSnapshotInput) SetTimeout(v int64) *StartSnapshotInput { 2234 s.Timeout = &v 2235 return s 2236 } 2237 2238 // SetVolumeSize sets the VolumeSize field's value. 2239 func (s *StartSnapshotInput) SetVolumeSize(v int64) *StartSnapshotInput { 2240 s.VolumeSize = &v 2241 return s 2242 } 2243 2244 type StartSnapshotOutput struct { 2245 _ struct{} `type:"structure"` 2246 2247 // The size of the blocks in the snapshot, in bytes. 2248 BlockSize *int64 `type:"integer"` 2249 2250 // The description of the snapshot. 2251 Description *string `type:"string"` 2252 2253 // The Amazon Resource Name (ARN) of the Key Management Service (KMS) key used 2254 // to encrypt the snapshot. 2255 // 2256 // KmsKeyArn is a sensitive parameter and its value will be 2257 // replaced with "sensitive" in string returned by StartSnapshotOutput's 2258 // String and GoString methods. 2259 KmsKeyArn *string `min:"1" type:"string" sensitive:"true"` 2260 2261 // The Amazon Web Services account ID of the snapshot owner. 2262 OwnerId *string `min:"1" type:"string"` 2263 2264 // The ID of the parent snapshot. 2265 ParentSnapshotId *string `min:"1" type:"string"` 2266 2267 // The ID of the snapshot. 2268 SnapshotId *string `min:"1" type:"string"` 2269 2270 // The timestamp when the snapshot was created. 2271 StartTime *time.Time `type:"timestamp"` 2272 2273 // The status of the snapshot. 2274 Status *string `type:"string" enum:"Status"` 2275 2276 // The tags applied to the snapshot. You can specify up to 50 tags per snapshot. 2277 // For more information, see Tagging your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) 2278 // in the Amazon Elastic Compute Cloud User Guide. 2279 Tags []*Tag `type:"list"` 2280 2281 // The size of the volume, in GiB. 2282 VolumeSize *int64 `min:"1" type:"long"` 2283 } 2284 2285 // String returns the string representation. 2286 // 2287 // API parameter values that are decorated as "sensitive" in the API will not 2288 // be included in the string output. The member name will be present, but the 2289 // value will be replaced with "sensitive". 2290 func (s StartSnapshotOutput) String() string { 2291 return awsutil.Prettify(s) 2292 } 2293 2294 // GoString returns the string representation. 2295 // 2296 // API parameter values that are decorated as "sensitive" in the API will not 2297 // be included in the string output. The member name will be present, but the 2298 // value will be replaced with "sensitive". 2299 func (s StartSnapshotOutput) GoString() string { 2300 return s.String() 2301 } 2302 2303 // SetBlockSize sets the BlockSize field's value. 2304 func (s *StartSnapshotOutput) SetBlockSize(v int64) *StartSnapshotOutput { 2305 s.BlockSize = &v 2306 return s 2307 } 2308 2309 // SetDescription sets the Description field's value. 2310 func (s *StartSnapshotOutput) SetDescription(v string) *StartSnapshotOutput { 2311 s.Description = &v 2312 return s 2313 } 2314 2315 // SetKmsKeyArn sets the KmsKeyArn field's value. 2316 func (s *StartSnapshotOutput) SetKmsKeyArn(v string) *StartSnapshotOutput { 2317 s.KmsKeyArn = &v 2318 return s 2319 } 2320 2321 // SetOwnerId sets the OwnerId field's value. 2322 func (s *StartSnapshotOutput) SetOwnerId(v string) *StartSnapshotOutput { 2323 s.OwnerId = &v 2324 return s 2325 } 2326 2327 // SetParentSnapshotId sets the ParentSnapshotId field's value. 2328 func (s *StartSnapshotOutput) SetParentSnapshotId(v string) *StartSnapshotOutput { 2329 s.ParentSnapshotId = &v 2330 return s 2331 } 2332 2333 // SetSnapshotId sets the SnapshotId field's value. 2334 func (s *StartSnapshotOutput) SetSnapshotId(v string) *StartSnapshotOutput { 2335 s.SnapshotId = &v 2336 return s 2337 } 2338 2339 // SetStartTime sets the StartTime field's value. 2340 func (s *StartSnapshotOutput) SetStartTime(v time.Time) *StartSnapshotOutput { 2341 s.StartTime = &v 2342 return s 2343 } 2344 2345 // SetStatus sets the Status field's value. 2346 func (s *StartSnapshotOutput) SetStatus(v string) *StartSnapshotOutput { 2347 s.Status = &v 2348 return s 2349 } 2350 2351 // SetTags sets the Tags field's value. 2352 func (s *StartSnapshotOutput) SetTags(v []*Tag) *StartSnapshotOutput { 2353 s.Tags = v 2354 return s 2355 } 2356 2357 // SetVolumeSize sets the VolumeSize field's value. 2358 func (s *StartSnapshotOutput) SetVolumeSize(v int64) *StartSnapshotOutput { 2359 s.VolumeSize = &v 2360 return s 2361 } 2362 2363 // Describes a tag. 2364 type Tag struct { 2365 _ struct{} `type:"structure"` 2366 2367 // The key of the tag. 2368 Key *string `type:"string"` 2369 2370 // The value of the tag. 2371 Value *string `type:"string"` 2372 } 2373 2374 // String returns the string representation. 2375 // 2376 // API parameter values that are decorated as "sensitive" in the API will not 2377 // be included in the string output. The member name will be present, but the 2378 // value will be replaced with "sensitive". 2379 func (s Tag) String() string { 2380 return awsutil.Prettify(s) 2381 } 2382 2383 // GoString returns the string representation. 2384 // 2385 // API parameter values that are decorated as "sensitive" in the API will not 2386 // be included in the string output. The member name will be present, but the 2387 // value will be replaced with "sensitive". 2388 func (s Tag) GoString() string { 2389 return s.String() 2390 } 2391 2392 // SetKey sets the Key field's value. 2393 func (s *Tag) SetKey(v string) *Tag { 2394 s.Key = &v 2395 return s 2396 } 2397 2398 // SetValue sets the Value field's value. 2399 func (s *Tag) SetValue(v string) *Tag { 2400 s.Value = &v 2401 return s 2402 } 2403 2404 // The input fails to satisfy the constraints of the EBS direct APIs. 2405 type ValidationException struct { 2406 _ struct{} `type:"structure"` 2407 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2408 2409 Message_ *string `locationName:"Message" type:"string"` 2410 2411 // The reason for the validation exception. 2412 Reason *string `type:"string" enum:"ValidationExceptionReason"` 2413 } 2414 2415 // String returns the string representation. 2416 // 2417 // API parameter values that are decorated as "sensitive" in the API will not 2418 // be included in the string output. The member name will be present, but the 2419 // value will be replaced with "sensitive". 2420 func (s ValidationException) String() string { 2421 return awsutil.Prettify(s) 2422 } 2423 2424 // GoString returns the string representation. 2425 // 2426 // API parameter values that are decorated as "sensitive" in the API will not 2427 // be included in the string output. The member name will be present, but the 2428 // value will be replaced with "sensitive". 2429 func (s ValidationException) GoString() string { 2430 return s.String() 2431 } 2432 2433 func newErrorValidationException(v protocol.ResponseMetadata) error { 2434 return &ValidationException{ 2435 RespMetadata: v, 2436 } 2437 } 2438 2439 // Code returns the exception type name. 2440 func (s *ValidationException) Code() string { 2441 return "ValidationException" 2442 } 2443 2444 // Message returns the exception's message. 2445 func (s *ValidationException) Message() string { 2446 if s.Message_ != nil { 2447 return *s.Message_ 2448 } 2449 return "" 2450 } 2451 2452 // OrigErr always returns nil, satisfies awserr.Error interface. 2453 func (s *ValidationException) OrigErr() error { 2454 return nil 2455 } 2456 2457 func (s *ValidationException) Error() string { 2458 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2459 } 2460 2461 // Status code returns the HTTP status code for the request's response error. 2462 func (s *ValidationException) StatusCode() int { 2463 return s.RespMetadata.StatusCode 2464 } 2465 2466 // RequestID returns the service's response RequestID for request. 2467 func (s *ValidationException) RequestID() string { 2468 return s.RespMetadata.RequestID 2469 } 2470 2471 const ( 2472 // AccessDeniedExceptionReasonUnauthorizedAccount is a AccessDeniedExceptionReason enum value 2473 AccessDeniedExceptionReasonUnauthorizedAccount = "UNAUTHORIZED_ACCOUNT" 2474 2475 // AccessDeniedExceptionReasonDependencyAccessDenied is a AccessDeniedExceptionReason enum value 2476 AccessDeniedExceptionReasonDependencyAccessDenied = "DEPENDENCY_ACCESS_DENIED" 2477 ) 2478 2479 // AccessDeniedExceptionReason_Values returns all elements of the AccessDeniedExceptionReason enum 2480 func AccessDeniedExceptionReason_Values() []string { 2481 return []string{ 2482 AccessDeniedExceptionReasonUnauthorizedAccount, 2483 AccessDeniedExceptionReasonDependencyAccessDenied, 2484 } 2485 } 2486 2487 const ( 2488 // ChecksumAggregationMethodLinear is a ChecksumAggregationMethod enum value 2489 ChecksumAggregationMethodLinear = "LINEAR" 2490 ) 2491 2492 // ChecksumAggregationMethod_Values returns all elements of the ChecksumAggregationMethod enum 2493 func ChecksumAggregationMethod_Values() []string { 2494 return []string{ 2495 ChecksumAggregationMethodLinear, 2496 } 2497 } 2498 2499 const ( 2500 // ChecksumAlgorithmSha256 is a ChecksumAlgorithm enum value 2501 ChecksumAlgorithmSha256 = "SHA256" 2502 ) 2503 2504 // ChecksumAlgorithm_Values returns all elements of the ChecksumAlgorithm enum 2505 func ChecksumAlgorithm_Values() []string { 2506 return []string{ 2507 ChecksumAlgorithmSha256, 2508 } 2509 } 2510 2511 const ( 2512 // RequestThrottledExceptionReasonAccountThrottled is a RequestThrottledExceptionReason enum value 2513 RequestThrottledExceptionReasonAccountThrottled = "ACCOUNT_THROTTLED" 2514 2515 // RequestThrottledExceptionReasonDependencyRequestThrottled is a RequestThrottledExceptionReason enum value 2516 RequestThrottledExceptionReasonDependencyRequestThrottled = "DEPENDENCY_REQUEST_THROTTLED" 2517 ) 2518 2519 // RequestThrottledExceptionReason_Values returns all elements of the RequestThrottledExceptionReason enum 2520 func RequestThrottledExceptionReason_Values() []string { 2521 return []string{ 2522 RequestThrottledExceptionReasonAccountThrottled, 2523 RequestThrottledExceptionReasonDependencyRequestThrottled, 2524 } 2525 } 2526 2527 const ( 2528 // ResourceNotFoundExceptionReasonSnapshotNotFound is a ResourceNotFoundExceptionReason enum value 2529 ResourceNotFoundExceptionReasonSnapshotNotFound = "SNAPSHOT_NOT_FOUND" 2530 2531 // ResourceNotFoundExceptionReasonDependencyResourceNotFound is a ResourceNotFoundExceptionReason enum value 2532 ResourceNotFoundExceptionReasonDependencyResourceNotFound = "DEPENDENCY_RESOURCE_NOT_FOUND" 2533 ) 2534 2535 // ResourceNotFoundExceptionReason_Values returns all elements of the ResourceNotFoundExceptionReason enum 2536 func ResourceNotFoundExceptionReason_Values() []string { 2537 return []string{ 2538 ResourceNotFoundExceptionReasonSnapshotNotFound, 2539 ResourceNotFoundExceptionReasonDependencyResourceNotFound, 2540 } 2541 } 2542 2543 const ( 2544 // ServiceQuotaExceededExceptionReasonDependencyServiceQuotaExceeded is a ServiceQuotaExceededExceptionReason enum value 2545 ServiceQuotaExceededExceptionReasonDependencyServiceQuotaExceeded = "DEPENDENCY_SERVICE_QUOTA_EXCEEDED" 2546 ) 2547 2548 // ServiceQuotaExceededExceptionReason_Values returns all elements of the ServiceQuotaExceededExceptionReason enum 2549 func ServiceQuotaExceededExceptionReason_Values() []string { 2550 return []string{ 2551 ServiceQuotaExceededExceptionReasonDependencyServiceQuotaExceeded, 2552 } 2553 } 2554 2555 const ( 2556 // StatusCompleted is a Status enum value 2557 StatusCompleted = "completed" 2558 2559 // StatusPending is a Status enum value 2560 StatusPending = "pending" 2561 2562 // StatusError is a Status enum value 2563 StatusError = "error" 2564 ) 2565 2566 // Status_Values returns all elements of the Status enum 2567 func Status_Values() []string { 2568 return []string{ 2569 StatusCompleted, 2570 StatusPending, 2571 StatusError, 2572 } 2573 } 2574 2575 const ( 2576 // ValidationExceptionReasonInvalidCustomerKey is a ValidationExceptionReason enum value 2577 ValidationExceptionReasonInvalidCustomerKey = "INVALID_CUSTOMER_KEY" 2578 2579 // ValidationExceptionReasonInvalidPageToken is a ValidationExceptionReason enum value 2580 ValidationExceptionReasonInvalidPageToken = "INVALID_PAGE_TOKEN" 2581 2582 // ValidationExceptionReasonInvalidBlockToken is a ValidationExceptionReason enum value 2583 ValidationExceptionReasonInvalidBlockToken = "INVALID_BLOCK_TOKEN" 2584 2585 // ValidationExceptionReasonInvalidSnapshotId is a ValidationExceptionReason enum value 2586 ValidationExceptionReasonInvalidSnapshotId = "INVALID_SNAPSHOT_ID" 2587 2588 // ValidationExceptionReasonUnrelatedSnapshots is a ValidationExceptionReason enum value 2589 ValidationExceptionReasonUnrelatedSnapshots = "UNRELATED_SNAPSHOTS" 2590 2591 // ValidationExceptionReasonInvalidBlock is a ValidationExceptionReason enum value 2592 ValidationExceptionReasonInvalidBlock = "INVALID_BLOCK" 2593 2594 // ValidationExceptionReasonInvalidContentEncoding is a ValidationExceptionReason enum value 2595 ValidationExceptionReasonInvalidContentEncoding = "INVALID_CONTENT_ENCODING" 2596 2597 // ValidationExceptionReasonInvalidTag is a ValidationExceptionReason enum value 2598 ValidationExceptionReasonInvalidTag = "INVALID_TAG" 2599 2600 // ValidationExceptionReasonInvalidDependencyRequest is a ValidationExceptionReason enum value 2601 ValidationExceptionReasonInvalidDependencyRequest = "INVALID_DEPENDENCY_REQUEST" 2602 2603 // ValidationExceptionReasonInvalidParameterValue is a ValidationExceptionReason enum value 2604 ValidationExceptionReasonInvalidParameterValue = "INVALID_PARAMETER_VALUE" 2605 2606 // ValidationExceptionReasonInvalidVolumeSize is a ValidationExceptionReason enum value 2607 ValidationExceptionReasonInvalidVolumeSize = "INVALID_VOLUME_SIZE" 2608 ) 2609 2610 // ValidationExceptionReason_Values returns all elements of the ValidationExceptionReason enum 2611 func ValidationExceptionReason_Values() []string { 2612 return []string{ 2613 ValidationExceptionReasonInvalidCustomerKey, 2614 ValidationExceptionReasonInvalidPageToken, 2615 ValidationExceptionReasonInvalidBlockToken, 2616 ValidationExceptionReasonInvalidSnapshotId, 2617 ValidationExceptionReasonUnrelatedSnapshots, 2618 ValidationExceptionReasonInvalidBlock, 2619 ValidationExceptionReasonInvalidContentEncoding, 2620 ValidationExceptionReasonInvalidTag, 2621 ValidationExceptionReasonInvalidDependencyRequest, 2622 ValidationExceptionReasonInvalidParameterValue, 2623 ValidationExceptionReasonInvalidVolumeSize, 2624 } 2625 }