1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package route53recoverycluster 4 5import ( 6 "fmt" 7 8 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws/awsutil" 10 "github.com/aws/aws-sdk-go/aws/request" 11 "github.com/aws/aws-sdk-go/private/protocol" 12 "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" 13) 14 15const opGetRoutingControlState = "GetRoutingControlState" 16 17// GetRoutingControlStateRequest generates a "aws/request.Request" representing the 18// client's request for the GetRoutingControlState operation. The "output" return 19// value will be populated with the request's response once the request completes 20// successfully. 21// 22// Use "Send" method on the returned Request to send the API call to the service. 23// the "output" return value is not valid until after Send returns without error. 24// 25// See GetRoutingControlState for more information on using the GetRoutingControlState 26// API call, and error handling. 27// 28// This method is useful when you want to inject custom logic or configuration 29// into the SDK's request lifecycle. Such as custom headers, or retry logic. 30// 31// 32// // Example sending a request using the GetRoutingControlStateRequest method. 33// req, resp := client.GetRoutingControlStateRequest(params) 34// 35// err := req.Send() 36// if err == nil { // resp is now filled 37// fmt.Println(resp) 38// } 39// 40// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/GetRoutingControlState 41func (c *Route53RecoveryCluster) GetRoutingControlStateRequest(input *GetRoutingControlStateInput) (req *request.Request, output *GetRoutingControlStateOutput) { 42 op := &request.Operation{ 43 Name: opGetRoutingControlState, 44 HTTPMethod: "POST", 45 HTTPPath: "/", 46 } 47 48 if input == nil { 49 input = &GetRoutingControlStateInput{} 50 } 51 52 output = &GetRoutingControlStateOutput{} 53 req = c.newRequest(op, input, output) 54 return 55} 56 57// GetRoutingControlState API operation for Route53 Recovery Cluster. 58// 59// Get the state for a routing control. A routing control is a simple on/off 60// switch that you can use to route traffic to cells. When the state is On, 61// traffic flows to a cell. When it's off, traffic does not flow. 62// 63// Before you can create a routing control, you first must create a cluster 64// to host the control. For more information, see CreateCluster (https://docs.aws.amazon.com/recovery-cluster/latest/api/cluster.html). 65// Access one of the endpoints for the cluster to get or update the routing 66// control state to redirect traffic. 67// 68// For more information about working with routing controls, see Routing control 69// (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.html) 70// in the Route 53 Application Recovery Controller Developer Guide. 71// 72// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 73// with awserr.Error's Code and Message methods to get detailed information about 74// the error. 75// 76// See the AWS API reference guide for Route53 Recovery Cluster's 77// API operation GetRoutingControlState for usage and error information. 78// 79// Returned Error Types: 80// * AccessDeniedException 81// You don't have sufficient permissions to query the routing control state. 82// 83// * InternalServerException 84// There was an unexpected error during processing of the request. 85// 86// * ResourceNotFoundException 87// The request references a routing control that was not found. 88// 89// * ValidationException 90// There was a validation error on the request. 91// 92// * ThrottlingException 93// The request was denied because of request throttling. 94// 95// * EndpointTemporarilyUnavailableException 96// The cluster endpoint isn't available. Try another cluster endpoint. 97// 98// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/GetRoutingControlState 99func (c *Route53RecoveryCluster) GetRoutingControlState(input *GetRoutingControlStateInput) (*GetRoutingControlStateOutput, error) { 100 req, out := c.GetRoutingControlStateRequest(input) 101 return out, req.Send() 102} 103 104// GetRoutingControlStateWithContext is the same as GetRoutingControlState with the addition of 105// the ability to pass a context and additional request options. 106// 107// See GetRoutingControlState for details on how to use this API operation. 108// 109// The context must be non-nil and will be used for request cancellation. If 110// the context is nil a panic will occur. In the future the SDK may create 111// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 112// for more information on using Contexts. 113func (c *Route53RecoveryCluster) GetRoutingControlStateWithContext(ctx aws.Context, input *GetRoutingControlStateInput, opts ...request.Option) (*GetRoutingControlStateOutput, error) { 114 req, out := c.GetRoutingControlStateRequest(input) 115 req.SetContext(ctx) 116 req.ApplyOptions(opts...) 117 return out, req.Send() 118} 119 120const opUpdateRoutingControlState = "UpdateRoutingControlState" 121 122// UpdateRoutingControlStateRequest generates a "aws/request.Request" representing the 123// client's request for the UpdateRoutingControlState operation. The "output" return 124// value will be populated with the request's response once the request completes 125// successfully. 126// 127// Use "Send" method on the returned Request to send the API call to the service. 128// the "output" return value is not valid until after Send returns without error. 129// 130// See UpdateRoutingControlState for more information on using the UpdateRoutingControlState 131// API call, and error handling. 132// 133// This method is useful when you want to inject custom logic or configuration 134// into the SDK's request lifecycle. Such as custom headers, or retry logic. 135// 136// 137// // Example sending a request using the UpdateRoutingControlStateRequest method. 138// req, resp := client.UpdateRoutingControlStateRequest(params) 139// 140// err := req.Send() 141// if err == nil { // resp is now filled 142// fmt.Println(resp) 143// } 144// 145// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/UpdateRoutingControlState 146func (c *Route53RecoveryCluster) UpdateRoutingControlStateRequest(input *UpdateRoutingControlStateInput) (req *request.Request, output *UpdateRoutingControlStateOutput) { 147 op := &request.Operation{ 148 Name: opUpdateRoutingControlState, 149 HTTPMethod: "POST", 150 HTTPPath: "/", 151 } 152 153 if input == nil { 154 input = &UpdateRoutingControlStateInput{} 155 } 156 157 output = &UpdateRoutingControlStateOutput{} 158 req = c.newRequest(op, input, output) 159 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 160 return 161} 162 163// UpdateRoutingControlState API operation for Route53 Recovery Cluster. 164// 165// Set the state of the routing control to reroute traffic. You can set the 166// value to be On or Off. When the state is On, traffic flows to a cell. When 167// it's off, traffic does not flow. 168// 169// For more information about working with routing controls, see Routing control 170// (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.html) 171// in the Route 53 Application Recovery Controller Developer Guide. 172// 173// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 174// with awserr.Error's Code and Message methods to get detailed information about 175// the error. 176// 177// See the AWS API reference guide for Route53 Recovery Cluster's 178// API operation UpdateRoutingControlState for usage and error information. 179// 180// Returned Error Types: 181// * AccessDeniedException 182// You don't have sufficient permissions to query the routing control state. 183// 184// * InternalServerException 185// There was an unexpected error during processing of the request. 186// 187// * ResourceNotFoundException 188// The request references a routing control that was not found. 189// 190// * ValidationException 191// There was a validation error on the request. 192// 193// * ThrottlingException 194// The request was denied because of request throttling. 195// 196// * EndpointTemporarilyUnavailableException 197// The cluster endpoint isn't available. Try another cluster endpoint. 198// 199// * ConflictException 200// There was a conflict with this request. Try again. 201// 202// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/UpdateRoutingControlState 203func (c *Route53RecoveryCluster) UpdateRoutingControlState(input *UpdateRoutingControlStateInput) (*UpdateRoutingControlStateOutput, error) { 204 req, out := c.UpdateRoutingControlStateRequest(input) 205 return out, req.Send() 206} 207 208// UpdateRoutingControlStateWithContext is the same as UpdateRoutingControlState with the addition of 209// the ability to pass a context and additional request options. 210// 211// See UpdateRoutingControlState for details on how to use this API operation. 212// 213// The context must be non-nil and will be used for request cancellation. If 214// the context is nil a panic will occur. In the future the SDK may create 215// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 216// for more information on using Contexts. 217func (c *Route53RecoveryCluster) UpdateRoutingControlStateWithContext(ctx aws.Context, input *UpdateRoutingControlStateInput, opts ...request.Option) (*UpdateRoutingControlStateOutput, error) { 218 req, out := c.UpdateRoutingControlStateRequest(input) 219 req.SetContext(ctx) 220 req.ApplyOptions(opts...) 221 return out, req.Send() 222} 223 224const opUpdateRoutingControlStates = "UpdateRoutingControlStates" 225 226// UpdateRoutingControlStatesRequest generates a "aws/request.Request" representing the 227// client's request for the UpdateRoutingControlStates operation. The "output" return 228// value will be populated with the request's response once the request completes 229// successfully. 230// 231// Use "Send" method on the returned Request to send the API call to the service. 232// the "output" return value is not valid until after Send returns without error. 233// 234// See UpdateRoutingControlStates for more information on using the UpdateRoutingControlStates 235// API call, and error handling. 236// 237// This method is useful when you want to inject custom logic or configuration 238// into the SDK's request lifecycle. Such as custom headers, or retry logic. 239// 240// 241// // Example sending a request using the UpdateRoutingControlStatesRequest method. 242// req, resp := client.UpdateRoutingControlStatesRequest(params) 243// 244// err := req.Send() 245// if err == nil { // resp is now filled 246// fmt.Println(resp) 247// } 248// 249// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/UpdateRoutingControlStates 250func (c *Route53RecoveryCluster) UpdateRoutingControlStatesRequest(input *UpdateRoutingControlStatesInput) (req *request.Request, output *UpdateRoutingControlStatesOutput) { 251 op := &request.Operation{ 252 Name: opUpdateRoutingControlStates, 253 HTTPMethod: "POST", 254 HTTPPath: "/", 255 } 256 257 if input == nil { 258 input = &UpdateRoutingControlStatesInput{} 259 } 260 261 output = &UpdateRoutingControlStatesOutput{} 262 req = c.newRequest(op, input, output) 263 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 264 return 265} 266 267// UpdateRoutingControlStates API operation for Route53 Recovery Cluster. 268// 269// Set multiple routing control states. You can set the value for each state 270// to be On or Off. When the state is On, traffic flows to a cell. When it's 271// off, traffic does not flow. 272// 273// For more information about working with routing controls, see Routing control 274// (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.html) 275// in the Route 53 Application Recovery Controller Developer Guide. 276// 277// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 278// with awserr.Error's Code and Message methods to get detailed information about 279// the error. 280// 281// See the AWS API reference guide for Route53 Recovery Cluster's 282// API operation UpdateRoutingControlStates for usage and error information. 283// 284// Returned Error Types: 285// * AccessDeniedException 286// You don't have sufficient permissions to query the routing control state. 287// 288// * InternalServerException 289// There was an unexpected error during processing of the request. 290// 291// * ResourceNotFoundException 292// The request references a routing control that was not found. 293// 294// * ValidationException 295// There was a validation error on the request. 296// 297// * ThrottlingException 298// The request was denied because of request throttling. 299// 300// * EndpointTemporarilyUnavailableException 301// The cluster endpoint isn't available. Try another cluster endpoint. 302// 303// * ConflictException 304// There was a conflict with this request. Try again. 305// 306// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/UpdateRoutingControlStates 307func (c *Route53RecoveryCluster) UpdateRoutingControlStates(input *UpdateRoutingControlStatesInput) (*UpdateRoutingControlStatesOutput, error) { 308 req, out := c.UpdateRoutingControlStatesRequest(input) 309 return out, req.Send() 310} 311 312// UpdateRoutingControlStatesWithContext is the same as UpdateRoutingControlStates with the addition of 313// the ability to pass a context and additional request options. 314// 315// See UpdateRoutingControlStates for details on how to use this API operation. 316// 317// The context must be non-nil and will be used for request cancellation. If 318// the context is nil a panic will occur. In the future the SDK may create 319// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 320// for more information on using Contexts. 321func (c *Route53RecoveryCluster) UpdateRoutingControlStatesWithContext(ctx aws.Context, input *UpdateRoutingControlStatesInput, opts ...request.Option) (*UpdateRoutingControlStatesOutput, error) { 322 req, out := c.UpdateRoutingControlStatesRequest(input) 323 req.SetContext(ctx) 324 req.ApplyOptions(opts...) 325 return out, req.Send() 326} 327 328// You don't have sufficient permissions to query the routing control state. 329type AccessDeniedException struct { 330 _ struct{} `type:"structure"` 331 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 332 333 Message_ *string `locationName:"message" type:"string"` 334} 335 336// String returns the string representation. 337// 338// API parameter values that are decorated as "sensitive" in the API will not 339// be included in the string output. The member name will be present, but the 340// value will be replaced with "sensitive". 341func (s AccessDeniedException) String() string { 342 return awsutil.Prettify(s) 343} 344 345// GoString returns the string representation. 346// 347// API parameter values that are decorated as "sensitive" in the API will not 348// be included in the string output. The member name will be present, but the 349// value will be replaced with "sensitive". 350func (s AccessDeniedException) GoString() string { 351 return s.String() 352} 353 354func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 355 return &AccessDeniedException{ 356 RespMetadata: v, 357 } 358} 359 360// Code returns the exception type name. 361func (s *AccessDeniedException) Code() string { 362 return "AccessDeniedException" 363} 364 365// Message returns the exception's message. 366func (s *AccessDeniedException) Message() string { 367 if s.Message_ != nil { 368 return *s.Message_ 369 } 370 return "" 371} 372 373// OrigErr always returns nil, satisfies awserr.Error interface. 374func (s *AccessDeniedException) OrigErr() error { 375 return nil 376} 377 378func (s *AccessDeniedException) Error() string { 379 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 380} 381 382// Status code returns the HTTP status code for the request's response error. 383func (s *AccessDeniedException) StatusCode() int { 384 return s.RespMetadata.StatusCode 385} 386 387// RequestID returns the service's response RequestID for request. 388func (s *AccessDeniedException) RequestID() string { 389 return s.RespMetadata.RequestID 390} 391 392// There was a conflict with this request. Try again. 393type ConflictException struct { 394 _ struct{} `type:"structure"` 395 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 396 397 // Description of the ConflictException error 398 Message_ *string `locationName:"message" type:"string"` 399 400 // Identifier of the resource in use 401 // 402 // ResourceId is a required field 403 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 404 405 // Type of the resource in use 406 // 407 // ResourceType is a required field 408 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 409} 410 411// String returns the string representation. 412// 413// API parameter values that are decorated as "sensitive" in the API will not 414// be included in the string output. The member name will be present, but the 415// value will be replaced with "sensitive". 416func (s ConflictException) String() string { 417 return awsutil.Prettify(s) 418} 419 420// GoString returns the string representation. 421// 422// API parameter values that are decorated as "sensitive" in the API will not 423// be included in the string output. The member name will be present, but the 424// value will be replaced with "sensitive". 425func (s ConflictException) GoString() string { 426 return s.String() 427} 428 429func newErrorConflictException(v protocol.ResponseMetadata) error { 430 return &ConflictException{ 431 RespMetadata: v, 432 } 433} 434 435// Code returns the exception type name. 436func (s *ConflictException) Code() string { 437 return "ConflictException" 438} 439 440// Message returns the exception's message. 441func (s *ConflictException) Message() string { 442 if s.Message_ != nil { 443 return *s.Message_ 444 } 445 return "" 446} 447 448// OrigErr always returns nil, satisfies awserr.Error interface. 449func (s *ConflictException) OrigErr() error { 450 return nil 451} 452 453func (s *ConflictException) Error() string { 454 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 455} 456 457// Status code returns the HTTP status code for the request's response error. 458func (s *ConflictException) StatusCode() int { 459 return s.RespMetadata.StatusCode 460} 461 462// RequestID returns the service's response RequestID for request. 463func (s *ConflictException) RequestID() string { 464 return s.RespMetadata.RequestID 465} 466 467// The cluster endpoint isn't available. Try another cluster endpoint. 468type EndpointTemporarilyUnavailableException struct { 469 _ struct{} `type:"structure"` 470 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 471 472 Message_ *string `locationName:"message" type:"string"` 473} 474 475// String returns the string representation. 476// 477// API parameter values that are decorated as "sensitive" in the API will not 478// be included in the string output. The member name will be present, but the 479// value will be replaced with "sensitive". 480func (s EndpointTemporarilyUnavailableException) String() string { 481 return awsutil.Prettify(s) 482} 483 484// GoString returns the string representation. 485// 486// API parameter values that are decorated as "sensitive" in the API will not 487// be included in the string output. The member name will be present, but the 488// value will be replaced with "sensitive". 489func (s EndpointTemporarilyUnavailableException) GoString() string { 490 return s.String() 491} 492 493func newErrorEndpointTemporarilyUnavailableException(v protocol.ResponseMetadata) error { 494 return &EndpointTemporarilyUnavailableException{ 495 RespMetadata: v, 496 } 497} 498 499// Code returns the exception type name. 500func (s *EndpointTemporarilyUnavailableException) Code() string { 501 return "EndpointTemporarilyUnavailableException" 502} 503 504// Message returns the exception's message. 505func (s *EndpointTemporarilyUnavailableException) Message() string { 506 if s.Message_ != nil { 507 return *s.Message_ 508 } 509 return "" 510} 511 512// OrigErr always returns nil, satisfies awserr.Error interface. 513func (s *EndpointTemporarilyUnavailableException) OrigErr() error { 514 return nil 515} 516 517func (s *EndpointTemporarilyUnavailableException) Error() string { 518 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 519} 520 521// Status code returns the HTTP status code for the request's response error. 522func (s *EndpointTemporarilyUnavailableException) StatusCode() int { 523 return s.RespMetadata.StatusCode 524} 525 526// RequestID returns the service's response RequestID for request. 527func (s *EndpointTemporarilyUnavailableException) RequestID() string { 528 return s.RespMetadata.RequestID 529} 530 531type GetRoutingControlStateInput struct { 532 _ struct{} `type:"structure"` 533 534 // The Amazon Resource Number (ARN) for the routing control that you want to 535 // get the state for. 536 // 537 // RoutingControlArn is a required field 538 RoutingControlArn *string `min:"1" type:"string" required:"true"` 539} 540 541// String returns the string representation. 542// 543// API parameter values that are decorated as "sensitive" in the API will not 544// be included in the string output. The member name will be present, but the 545// value will be replaced with "sensitive". 546func (s GetRoutingControlStateInput) String() string { 547 return awsutil.Prettify(s) 548} 549 550// GoString returns the string representation. 551// 552// API parameter values that are decorated as "sensitive" in the API will not 553// be included in the string output. The member name will be present, but the 554// value will be replaced with "sensitive". 555func (s GetRoutingControlStateInput) GoString() string { 556 return s.String() 557} 558 559// Validate inspects the fields of the type to determine if they are valid. 560func (s *GetRoutingControlStateInput) Validate() error { 561 invalidParams := request.ErrInvalidParams{Context: "GetRoutingControlStateInput"} 562 if s.RoutingControlArn == nil { 563 invalidParams.Add(request.NewErrParamRequired("RoutingControlArn")) 564 } 565 if s.RoutingControlArn != nil && len(*s.RoutingControlArn) < 1 { 566 invalidParams.Add(request.NewErrParamMinLen("RoutingControlArn", 1)) 567 } 568 569 if invalidParams.Len() > 0 { 570 return invalidParams 571 } 572 return nil 573} 574 575// SetRoutingControlArn sets the RoutingControlArn field's value. 576func (s *GetRoutingControlStateInput) SetRoutingControlArn(v string) *GetRoutingControlStateInput { 577 s.RoutingControlArn = &v 578 return s 579} 580 581type GetRoutingControlStateOutput struct { 582 _ struct{} `type:"structure"` 583 584 // The Amazon Resource Number (ARN) of the response. 585 // 586 // RoutingControlArn is a required field 587 RoutingControlArn *string `min:"1" type:"string" required:"true"` 588 589 // The state of the routing control. 590 // 591 // RoutingControlState is a required field 592 RoutingControlState *string `type:"string" required:"true" enum:"RoutingControlState"` 593} 594 595// String returns the string representation. 596// 597// API parameter values that are decorated as "sensitive" in the API will not 598// be included in the string output. The member name will be present, but the 599// value will be replaced with "sensitive". 600func (s GetRoutingControlStateOutput) String() string { 601 return awsutil.Prettify(s) 602} 603 604// GoString returns the string representation. 605// 606// API parameter values that are decorated as "sensitive" in the API will not 607// be included in the string output. The member name will be present, but the 608// value will be replaced with "sensitive". 609func (s GetRoutingControlStateOutput) GoString() string { 610 return s.String() 611} 612 613// SetRoutingControlArn sets the RoutingControlArn field's value. 614func (s *GetRoutingControlStateOutput) SetRoutingControlArn(v string) *GetRoutingControlStateOutput { 615 s.RoutingControlArn = &v 616 return s 617} 618 619// SetRoutingControlState sets the RoutingControlState field's value. 620func (s *GetRoutingControlStateOutput) SetRoutingControlState(v string) *GetRoutingControlStateOutput { 621 s.RoutingControlState = &v 622 return s 623} 624 625// There was an unexpected error during processing of the request. 626type InternalServerException struct { 627 _ struct{} `type:"structure"` 628 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 629 630 Message_ *string `locationName:"message" type:"string"` 631 632 // Advice to clients on when the call can be safely retried 633 RetryAfterSeconds *int64 `locationName:"retryAfterSeconds" type:"integer"` 634} 635 636// String returns the string representation. 637// 638// API parameter values that are decorated as "sensitive" in the API will not 639// be included in the string output. The member name will be present, but the 640// value will be replaced with "sensitive". 641func (s InternalServerException) String() string { 642 return awsutil.Prettify(s) 643} 644 645// GoString returns the string representation. 646// 647// API parameter values that are decorated as "sensitive" in the API will not 648// be included in the string output. The member name will be present, but the 649// value will be replaced with "sensitive". 650func (s InternalServerException) GoString() string { 651 return s.String() 652} 653 654func newErrorInternalServerException(v protocol.ResponseMetadata) error { 655 return &InternalServerException{ 656 RespMetadata: v, 657 } 658} 659 660// Code returns the exception type name. 661func (s *InternalServerException) Code() string { 662 return "InternalServerException" 663} 664 665// Message returns the exception's message. 666func (s *InternalServerException) Message() string { 667 if s.Message_ != nil { 668 return *s.Message_ 669 } 670 return "" 671} 672 673// OrigErr always returns nil, satisfies awserr.Error interface. 674func (s *InternalServerException) OrigErr() error { 675 return nil 676} 677 678func (s *InternalServerException) Error() string { 679 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 680} 681 682// Status code returns the HTTP status code for the request's response error. 683func (s *InternalServerException) StatusCode() int { 684 return s.RespMetadata.StatusCode 685} 686 687// RequestID returns the service's response RequestID for request. 688func (s *InternalServerException) RequestID() string { 689 return s.RespMetadata.RequestID 690} 691 692// The request references a routing control that was not found. 693type ResourceNotFoundException struct { 694 _ struct{} `type:"structure"` 695 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 696 697 Message_ *string `locationName:"message" type:"string"` 698 699 // Hypothetical resource identifier that was not found 700 // 701 // ResourceId is a required field 702 ResourceId *string `locationName:"resourceId" type:"string" required:"true"` 703 704 // Hypothetical resource type that was not found 705 // 706 // ResourceType is a required field 707 ResourceType *string `locationName:"resourceType" type:"string" required:"true"` 708} 709 710// String returns the string representation. 711// 712// API parameter values that are decorated as "sensitive" in the API will not 713// be included in the string output. The member name will be present, but the 714// value will be replaced with "sensitive". 715func (s ResourceNotFoundException) String() string { 716 return awsutil.Prettify(s) 717} 718 719// GoString returns the string representation. 720// 721// API parameter values that are decorated as "sensitive" in the API will not 722// be included in the string output. The member name will be present, but the 723// value will be replaced with "sensitive". 724func (s ResourceNotFoundException) GoString() string { 725 return s.String() 726} 727 728func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 729 return &ResourceNotFoundException{ 730 RespMetadata: v, 731 } 732} 733 734// Code returns the exception type name. 735func (s *ResourceNotFoundException) Code() string { 736 return "ResourceNotFoundException" 737} 738 739// Message returns the exception's message. 740func (s *ResourceNotFoundException) Message() string { 741 if s.Message_ != nil { 742 return *s.Message_ 743 } 744 return "" 745} 746 747// OrigErr always returns nil, satisfies awserr.Error interface. 748func (s *ResourceNotFoundException) OrigErr() error { 749 return nil 750} 751 752func (s *ResourceNotFoundException) Error() string { 753 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 754} 755 756// Status code returns the HTTP status code for the request's response error. 757func (s *ResourceNotFoundException) StatusCode() int { 758 return s.RespMetadata.StatusCode 759} 760 761// RequestID returns the service's response RequestID for request. 762func (s *ResourceNotFoundException) RequestID() string { 763 return s.RespMetadata.RequestID 764} 765 766// The request was denied because of request throttling. 767type ThrottlingException struct { 768 _ struct{} `type:"structure"` 769 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 770 771 Message_ *string `locationName:"message" type:"string"` 772 773 // Advice to clients on when the call can be safely retried 774 RetryAfterSeconds *int64 `locationName:"retryAfterSeconds" type:"integer"` 775} 776 777// String returns the string representation. 778// 779// API parameter values that are decorated as "sensitive" in the API will not 780// be included in the string output. The member name will be present, but the 781// value will be replaced with "sensitive". 782func (s ThrottlingException) String() string { 783 return awsutil.Prettify(s) 784} 785 786// GoString returns the string representation. 787// 788// API parameter values that are decorated as "sensitive" in the API will not 789// be included in the string output. The member name will be present, but the 790// value will be replaced with "sensitive". 791func (s ThrottlingException) GoString() string { 792 return s.String() 793} 794 795func newErrorThrottlingException(v protocol.ResponseMetadata) error { 796 return &ThrottlingException{ 797 RespMetadata: v, 798 } 799} 800 801// Code returns the exception type name. 802func (s *ThrottlingException) Code() string { 803 return "ThrottlingException" 804} 805 806// Message returns the exception's message. 807func (s *ThrottlingException) Message() string { 808 if s.Message_ != nil { 809 return *s.Message_ 810 } 811 return "" 812} 813 814// OrigErr always returns nil, satisfies awserr.Error interface. 815func (s *ThrottlingException) OrigErr() error { 816 return nil 817} 818 819func (s *ThrottlingException) Error() string { 820 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 821} 822 823// Status code returns the HTTP status code for the request's response error. 824func (s *ThrottlingException) StatusCode() int { 825 return s.RespMetadata.StatusCode 826} 827 828// RequestID returns the service's response RequestID for request. 829func (s *ThrottlingException) RequestID() string { 830 return s.RespMetadata.RequestID 831} 832 833// A routing control state. 834type UpdateRoutingControlStateEntry struct { 835 _ struct{} `type:"structure"` 836 837 // The Amazon Resource Number (ARN) for the routing control state entry. 838 // 839 // RoutingControlArn is a required field 840 RoutingControlArn *string `min:"1" type:"string" required:"true"` 841 842 // The routing control state in a set of routing control state entries. 843 // 844 // RoutingControlState is a required field 845 RoutingControlState *string `type:"string" required:"true" enum:"RoutingControlState"` 846} 847 848// String returns the string representation. 849// 850// API parameter values that are decorated as "sensitive" in the API will not 851// be included in the string output. The member name will be present, but the 852// value will be replaced with "sensitive". 853func (s UpdateRoutingControlStateEntry) String() string { 854 return awsutil.Prettify(s) 855} 856 857// GoString returns the string representation. 858// 859// API parameter values that are decorated as "sensitive" in the API will not 860// be included in the string output. The member name will be present, but the 861// value will be replaced with "sensitive". 862func (s UpdateRoutingControlStateEntry) GoString() string { 863 return s.String() 864} 865 866// Validate inspects the fields of the type to determine if they are valid. 867func (s *UpdateRoutingControlStateEntry) Validate() error { 868 invalidParams := request.ErrInvalidParams{Context: "UpdateRoutingControlStateEntry"} 869 if s.RoutingControlArn == nil { 870 invalidParams.Add(request.NewErrParamRequired("RoutingControlArn")) 871 } 872 if s.RoutingControlArn != nil && len(*s.RoutingControlArn) < 1 { 873 invalidParams.Add(request.NewErrParamMinLen("RoutingControlArn", 1)) 874 } 875 if s.RoutingControlState == nil { 876 invalidParams.Add(request.NewErrParamRequired("RoutingControlState")) 877 } 878 879 if invalidParams.Len() > 0 { 880 return invalidParams 881 } 882 return nil 883} 884 885// SetRoutingControlArn sets the RoutingControlArn field's value. 886func (s *UpdateRoutingControlStateEntry) SetRoutingControlArn(v string) *UpdateRoutingControlStateEntry { 887 s.RoutingControlArn = &v 888 return s 889} 890 891// SetRoutingControlState sets the RoutingControlState field's value. 892func (s *UpdateRoutingControlStateEntry) SetRoutingControlState(v string) *UpdateRoutingControlStateEntry { 893 s.RoutingControlState = &v 894 return s 895} 896 897type UpdateRoutingControlStateInput struct { 898 _ struct{} `type:"structure"` 899 900 // The Amazon Resource Number (ARN) for the routing control that you want to 901 // update the state for. 902 // 903 // RoutingControlArn is a required field 904 RoutingControlArn *string `min:"1" type:"string" required:"true"` 905 906 // The state of the routing control. You can set the value to be On or Off. 907 // 908 // RoutingControlState is a required field 909 RoutingControlState *string `type:"string" required:"true" enum:"RoutingControlState"` 910} 911 912// String returns the string representation. 913// 914// API parameter values that are decorated as "sensitive" in the API will not 915// be included in the string output. The member name will be present, but the 916// value will be replaced with "sensitive". 917func (s UpdateRoutingControlStateInput) String() string { 918 return awsutil.Prettify(s) 919} 920 921// GoString returns the string representation. 922// 923// API parameter values that are decorated as "sensitive" in the API will not 924// be included in the string output. The member name will be present, but the 925// value will be replaced with "sensitive". 926func (s UpdateRoutingControlStateInput) GoString() string { 927 return s.String() 928} 929 930// Validate inspects the fields of the type to determine if they are valid. 931func (s *UpdateRoutingControlStateInput) Validate() error { 932 invalidParams := request.ErrInvalidParams{Context: "UpdateRoutingControlStateInput"} 933 if s.RoutingControlArn == nil { 934 invalidParams.Add(request.NewErrParamRequired("RoutingControlArn")) 935 } 936 if s.RoutingControlArn != nil && len(*s.RoutingControlArn) < 1 { 937 invalidParams.Add(request.NewErrParamMinLen("RoutingControlArn", 1)) 938 } 939 if s.RoutingControlState == nil { 940 invalidParams.Add(request.NewErrParamRequired("RoutingControlState")) 941 } 942 943 if invalidParams.Len() > 0 { 944 return invalidParams 945 } 946 return nil 947} 948 949// SetRoutingControlArn sets the RoutingControlArn field's value. 950func (s *UpdateRoutingControlStateInput) SetRoutingControlArn(v string) *UpdateRoutingControlStateInput { 951 s.RoutingControlArn = &v 952 return s 953} 954 955// SetRoutingControlState sets the RoutingControlState field's value. 956func (s *UpdateRoutingControlStateInput) SetRoutingControlState(v string) *UpdateRoutingControlStateInput { 957 s.RoutingControlState = &v 958 return s 959} 960 961type UpdateRoutingControlStateOutput struct { 962 _ struct{} `type:"structure"` 963} 964 965// String returns the string representation. 966// 967// API parameter values that are decorated as "sensitive" in the API will not 968// be included in the string output. The member name will be present, but the 969// value will be replaced with "sensitive". 970func (s UpdateRoutingControlStateOutput) String() string { 971 return awsutil.Prettify(s) 972} 973 974// GoString returns the string representation. 975// 976// API parameter values that are decorated as "sensitive" in the API will not 977// be included in the string output. The member name will be present, but the 978// value will be replaced with "sensitive". 979func (s UpdateRoutingControlStateOutput) GoString() string { 980 return s.String() 981} 982 983type UpdateRoutingControlStatesInput struct { 984 _ struct{} `type:"structure"` 985 986 // A set of routing control entries that you want to update. 987 // 988 // UpdateRoutingControlStateEntries is a required field 989 UpdateRoutingControlStateEntries []*UpdateRoutingControlStateEntry `type:"list" required:"true"` 990} 991 992// String returns the string representation. 993// 994// API parameter values that are decorated as "sensitive" in the API will not 995// be included in the string output. The member name will be present, but the 996// value will be replaced with "sensitive". 997func (s UpdateRoutingControlStatesInput) String() string { 998 return awsutil.Prettify(s) 999} 1000 1001// GoString returns the string representation. 1002// 1003// API parameter values that are decorated as "sensitive" in the API will not 1004// be included in the string output. The member name will be present, but the 1005// value will be replaced with "sensitive". 1006func (s UpdateRoutingControlStatesInput) GoString() string { 1007 return s.String() 1008} 1009 1010// Validate inspects the fields of the type to determine if they are valid. 1011func (s *UpdateRoutingControlStatesInput) Validate() error { 1012 invalidParams := request.ErrInvalidParams{Context: "UpdateRoutingControlStatesInput"} 1013 if s.UpdateRoutingControlStateEntries == nil { 1014 invalidParams.Add(request.NewErrParamRequired("UpdateRoutingControlStateEntries")) 1015 } 1016 if s.UpdateRoutingControlStateEntries != nil { 1017 for i, v := range s.UpdateRoutingControlStateEntries { 1018 if v == nil { 1019 continue 1020 } 1021 if err := v.Validate(); err != nil { 1022 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UpdateRoutingControlStateEntries", i), err.(request.ErrInvalidParams)) 1023 } 1024 } 1025 } 1026 1027 if invalidParams.Len() > 0 { 1028 return invalidParams 1029 } 1030 return nil 1031} 1032 1033// SetUpdateRoutingControlStateEntries sets the UpdateRoutingControlStateEntries field's value. 1034func (s *UpdateRoutingControlStatesInput) SetUpdateRoutingControlStateEntries(v []*UpdateRoutingControlStateEntry) *UpdateRoutingControlStatesInput { 1035 s.UpdateRoutingControlStateEntries = v 1036 return s 1037} 1038 1039type UpdateRoutingControlStatesOutput struct { 1040 _ struct{} `type:"structure"` 1041} 1042 1043// String returns the string representation. 1044// 1045// API parameter values that are decorated as "sensitive" in the API will not 1046// be included in the string output. The member name will be present, but the 1047// value will be replaced with "sensitive". 1048func (s UpdateRoutingControlStatesOutput) String() string { 1049 return awsutil.Prettify(s) 1050} 1051 1052// GoString returns the string representation. 1053// 1054// API parameter values that are decorated as "sensitive" in the API will not 1055// be included in the string output. The member name will be present, but the 1056// value will be replaced with "sensitive". 1057func (s UpdateRoutingControlStatesOutput) GoString() string { 1058 return s.String() 1059} 1060 1061// There was a validation error on the request. 1062type ValidationException struct { 1063 _ struct{} `type:"structure"` 1064 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1065 1066 // The fields that caused the error, if applicable 1067 Fields []*ValidationExceptionField `locationName:"fields" type:"list"` 1068 1069 Message_ *string `locationName:"message" type:"string"` 1070 1071 // Reason the request failed validation 1072 Reason *string `locationName:"reason" type:"string" enum:"ValidationExceptionReason"` 1073} 1074 1075// String returns the string representation. 1076// 1077// API parameter values that are decorated as "sensitive" in the API will not 1078// be included in the string output. The member name will be present, but the 1079// value will be replaced with "sensitive". 1080func (s ValidationException) String() string { 1081 return awsutil.Prettify(s) 1082} 1083 1084// GoString returns the string representation. 1085// 1086// API parameter values that are decorated as "sensitive" in the API will not 1087// be included in the string output. The member name will be present, but the 1088// value will be replaced with "sensitive". 1089func (s ValidationException) GoString() string { 1090 return s.String() 1091} 1092 1093func newErrorValidationException(v protocol.ResponseMetadata) error { 1094 return &ValidationException{ 1095 RespMetadata: v, 1096 } 1097} 1098 1099// Code returns the exception type name. 1100func (s *ValidationException) Code() string { 1101 return "ValidationException" 1102} 1103 1104// Message returns the exception's message. 1105func (s *ValidationException) Message() string { 1106 if s.Message_ != nil { 1107 return *s.Message_ 1108 } 1109 return "" 1110} 1111 1112// OrigErr always returns nil, satisfies awserr.Error interface. 1113func (s *ValidationException) OrigErr() error { 1114 return nil 1115} 1116 1117func (s *ValidationException) Error() string { 1118 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 1119} 1120 1121// Status code returns the HTTP status code for the request's response error. 1122func (s *ValidationException) StatusCode() int { 1123 return s.RespMetadata.StatusCode 1124} 1125 1126// RequestID returns the service's response RequestID for request. 1127func (s *ValidationException) RequestID() string { 1128 return s.RespMetadata.RequestID 1129} 1130 1131// There was a validation error on the request. 1132type ValidationExceptionField struct { 1133 _ struct{} `type:"structure"` 1134 1135 // Information about the validation exception. 1136 // 1137 // Message is a required field 1138 Message *string `locationName:"message" type:"string" required:"true"` 1139 1140 // The field that had the validation exception. 1141 // 1142 // Name is a required field 1143 Name *string `locationName:"name" type:"string" required:"true"` 1144} 1145 1146// String returns the string representation. 1147// 1148// API parameter values that are decorated as "sensitive" in the API will not 1149// be included in the string output. The member name will be present, but the 1150// value will be replaced with "sensitive". 1151func (s ValidationExceptionField) String() string { 1152 return awsutil.Prettify(s) 1153} 1154 1155// GoString returns the string representation. 1156// 1157// API parameter values that are decorated as "sensitive" in the API will not 1158// be included in the string output. The member name will be present, but the 1159// value will be replaced with "sensitive". 1160func (s ValidationExceptionField) GoString() string { 1161 return s.String() 1162} 1163 1164// SetMessage sets the Message field's value. 1165func (s *ValidationExceptionField) SetMessage(v string) *ValidationExceptionField { 1166 s.Message = &v 1167 return s 1168} 1169 1170// SetName sets the Name field's value. 1171func (s *ValidationExceptionField) SetName(v string) *ValidationExceptionField { 1172 s.Name = &v 1173 return s 1174} 1175 1176const ( 1177 // RoutingControlStateOn is a RoutingControlState enum value 1178 RoutingControlStateOn = "On" 1179 1180 // RoutingControlStateOff is a RoutingControlState enum value 1181 RoutingControlStateOff = "Off" 1182) 1183 1184// RoutingControlState_Values returns all elements of the RoutingControlState enum 1185func RoutingControlState_Values() []string { 1186 return []string{ 1187 RoutingControlStateOn, 1188 RoutingControlStateOff, 1189 } 1190} 1191 1192// Reason the request failed validation 1193const ( 1194 // ValidationExceptionReasonUnknownOperation is a ValidationExceptionReason enum value 1195 ValidationExceptionReasonUnknownOperation = "unknownOperation" 1196 1197 // ValidationExceptionReasonCannotParse is a ValidationExceptionReason enum value 1198 ValidationExceptionReasonCannotParse = "cannotParse" 1199 1200 // ValidationExceptionReasonFieldValidationFailed is a ValidationExceptionReason enum value 1201 ValidationExceptionReasonFieldValidationFailed = "fieldValidationFailed" 1202 1203 // ValidationExceptionReasonOther is a ValidationExceptionReason enum value 1204 ValidationExceptionReasonOther = "other" 1205) 1206 1207// ValidationExceptionReason_Values returns all elements of the ValidationExceptionReason enum 1208func ValidationExceptionReason_Values() []string { 1209 return []string{ 1210 ValidationExceptionReasonUnknownOperation, 1211 ValidationExceptionReasonCannotParse, 1212 ValidationExceptionReasonFieldValidationFailed, 1213 ValidationExceptionReasonOther, 1214 } 1215} 1216