| 1 |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. |
| 2 |
|
| 3 |
package route53recoverycluster |
| 4 |
|
| 5 |
import ( |
| 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 |
|
| 15 |
const 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 |
// // Example sending a request using the GetRoutingControlStateRequest method. |
| 32 |
// req, resp := client.GetRoutingControlStateRequest(params) |
| 33 |
// |
| 34 |
// err := req.Send() |
| 35 |
// if err == nil { // resp is now filled |
| 36 |
// fmt.Println(resp) |
| 37 |
// } |
| 38 |
// |
| 39 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/GetRoutingControlState |
| 40 |
func (c *Route53RecoveryCluster) GetRoutingControlStateRequest(input *GetRoutingControlStateInput) (req *request.Request, output *GetRoutingControlStateOutput) { |
| 41 |
op := &request.Operation{ |
| 42 |
Name: opGetRoutingControlState, |
| 43 |
HTTPMethod: "POST", |
| 44 |
HTTPPath: "/", |
| 45 |
} |
| 46 |
|
| 47 |
if input == nil { |
| 48 |
input = &GetRoutingControlStateInput{} |
| 49 |
} |
| 50 |
|
| 51 |
output = &GetRoutingControlStateOutput{} |
| 52 |
req = c.newRequest(op, input, output) |
| 53 |
return |
| 54 |
} |
| 55 |
|
| 56 |
// GetRoutingControlState API operation for Route53 Recovery Cluster. |
| 57 |
// |
| 58 |
// Get the state for a routing control. A routing control is a simple on/off |
| 59 |
// switch that you can use to route traffic to cells. When a routing control |
| 60 |
// state is set to ON, traffic flows to a cell. When the state is set to OFF, |
| 61 |
// traffic does not flow. |
| 62 |
// |
| 63 |
// Before you can create a routing control, you must first create a cluster, |
| 64 |
// and then host the control in a control panel on the cluster. For more information, |
| 65 |
// see Create routing control structures (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.create.html) |
| 66 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. You |
| 67 |
// access one of the endpoints for the cluster to get or update the routing |
| 68 |
// control state to redirect traffic for your application. |
| 69 |
// |
| 70 |
// You must specify Regional endpoints when you work with API cluster operations |
| 71 |
// to get or update routing control states in Route 53 ARC. |
| 72 |
// |
| 73 |
// To see a code example for getting a routing control state, including accessing |
| 74 |
// Regional cluster endpoints in sequence, see API examples (https://docs.aws.amazon.com/r53recovery/latest/dg/service_code_examples_actions.html) |
| 75 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. |
| 76 |
// |
| 77 |
// Learn more about working with routing controls in the following topics in |
| 78 |
// the Amazon Route 53 Application Recovery Controller Developer Guide: |
| 79 |
// |
| 80 |
// - Viewing and updating routing control states (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.update.html) |
| 81 |
// |
| 82 |
// - Working with routing controls in Route 53 ARC (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.html) |
| 83 |
// |
| 84 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 85 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 86 |
// the error. |
| 87 |
// |
| 88 |
// See the AWS API reference guide for Route53 Recovery Cluster's |
| 89 |
// API operation GetRoutingControlState for usage and error information. |
| 90 |
// |
| 91 |
// Returned Error Types: |
| 92 |
// |
| 93 |
// - AccessDeniedException |
| 94 |
// You don't have sufficient permissions to perform this action. |
| 95 |
// |
| 96 |
// - InternalServerException |
| 97 |
// There was an unexpected error during processing of the request. |
| 98 |
// |
| 99 |
// - ResourceNotFoundException |
| 100 |
// The request references a routing control or control panel that was not found. |
| 101 |
// |
| 102 |
// - ValidationException |
| 103 |
// There was a validation error on the request. |
| 104 |
// |
| 105 |
// - ThrottlingException |
| 106 |
// The request was denied because of request throttling. |
| 107 |
// |
| 108 |
// - EndpointTemporarilyUnavailableException |
| 109 |
// The cluster endpoint isn't available. Try another cluster endpoint. |
| 110 |
// |
| 111 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/GetRoutingControlState |
| 112 |
func (c *Route53RecoveryCluster) GetRoutingControlState(input *GetRoutingControlStateInput) (*GetRoutingControlStateOutput, error) { |
| 113 |
req, out := c.GetRoutingControlStateRequest(input) |
| 114 |
return out, req.Send() |
| 115 |
} |
| 116 |
|
| 117 |
// GetRoutingControlStateWithContext is the same as GetRoutingControlState with the addition of |
| 118 |
// the ability to pass a context and additional request options. |
| 119 |
// |
| 120 |
// See GetRoutingControlState for details on how to use this API operation. |
| 121 |
// |
| 122 |
// The context must be non-nil and will be used for request cancellation. If |
| 123 |
// the context is nil a panic will occur. In the future the SDK may create |
| 124 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 125 |
// for more information on using Contexts. |
| 126 |
func (c *Route53RecoveryCluster) GetRoutingControlStateWithContext(ctx aws.Context, input *GetRoutingControlStateInput, opts ...request.Option) (*GetRoutingControlStateOutput, error) { |
| 127 |
req, out := c.GetRoutingControlStateRequest(input) |
| 128 |
req.SetContext(ctx) |
| 129 |
req.ApplyOptions(opts...) |
| 130 |
return out, req.Send() |
| 131 |
} |
| 132 |
|
| 133 |
const opListRoutingControls = "ListRoutingControls" |
| 134 |
|
| 135 |
// ListRoutingControlsRequest generates a "aws/request.Request" representing the |
| 136 |
// client's request for the ListRoutingControls operation. The "output" return |
| 137 |
// value will be populated with the request's response once the request completes |
| 138 |
// successfully. |
| 139 |
// |
| 140 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 141 |
// the "output" return value is not valid until after Send returns without error. |
| 142 |
// |
| 143 |
// See ListRoutingControls for more information on using the ListRoutingControls |
| 144 |
// API call, and error handling. |
| 145 |
// |
| 146 |
// This method is useful when you want to inject custom logic or configuration |
| 147 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 148 |
// |
| 149 |
// // Example sending a request using the ListRoutingControlsRequest method. |
| 150 |
// req, resp := client.ListRoutingControlsRequest(params) |
| 151 |
// |
| 152 |
// err := req.Send() |
| 153 |
// if err == nil { // resp is now filled |
| 154 |
// fmt.Println(resp) |
| 155 |
// } |
| 156 |
// |
| 157 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/ListRoutingControls |
| 158 |
func (c *Route53RecoveryCluster) ListRoutingControlsRequest(input *ListRoutingControlsInput) (req *request.Request, output *ListRoutingControlsOutput) { |
| 159 |
op := &request.Operation{ |
| 160 |
Name: opListRoutingControls, |
| 161 |
HTTPMethod: "POST", |
| 162 |
HTTPPath: "/", |
| 163 |
Paginator: &request.Paginator{ |
| 164 |
InputTokens: []string{"NextToken"}, |
| 165 |
OutputTokens: []string{"NextToken"}, |
| 166 |
LimitToken: "MaxResults", |
| 167 |
TruncationToken: "", |
| 168 |
}, |
| 169 |
} |
| 170 |
|
| 171 |
if input == nil { |
| 172 |
input = &ListRoutingControlsInput{} |
| 173 |
} |
| 174 |
|
| 175 |
output = &ListRoutingControlsOutput{} |
| 176 |
req = c.newRequest(op, input, output) |
| 177 |
return |
| 178 |
} |
| 179 |
|
| 180 |
// ListRoutingControls API operation for Route53 Recovery Cluster. |
| 181 |
// |
| 182 |
// List routing control names and Amazon Resource Names (ARNs), as well as the |
| 183 |
// routing control state for each routing control, along with the control panel |
| 184 |
// name and control panel ARN for the routing controls. If you specify a control |
| 185 |
// panel ARN, this call lists the routing controls in the control panel. Otherwise, |
| 186 |
// it lists all the routing controls in the cluster. |
| 187 |
// |
| 188 |
// A routing control is a simple on/off switch in Route 53 ARC that you can |
| 189 |
// use to route traffic to cells. When a routing control state is set to ON, |
| 190 |
// traffic flows to a cell. When the state is set to OFF, traffic does not flow. |
| 191 |
// |
| 192 |
// Before you can create a routing control, you must first create a cluster, |
| 193 |
// and then host the control in a control panel on the cluster. For more information, |
| 194 |
// see Create routing control structures (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.create.html) |
| 195 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. You |
| 196 |
// access one of the endpoints for the cluster to get or update the routing |
| 197 |
// control state to redirect traffic for your application. |
| 198 |
// |
| 199 |
// You must specify Regional endpoints when you work with API cluster operations |
| 200 |
// to use this API operation to list routing controls in Route 53 ARC. |
| 201 |
// |
| 202 |
// Learn more about working with routing controls in the following topics in |
| 203 |
// the Amazon Route 53 Application Recovery Controller Developer Guide: |
| 204 |
// |
| 205 |
// - Viewing and updating routing control states (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.update.html) |
| 206 |
// |
| 207 |
// - Working with routing controls in Route 53 ARC (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.html) |
| 208 |
// |
| 209 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 210 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 211 |
// the error. |
| 212 |
// |
| 213 |
// See the AWS API reference guide for Route53 Recovery Cluster's |
| 214 |
// API operation ListRoutingControls for usage and error information. |
| 215 |
// |
| 216 |
// Returned Error Types: |
| 217 |
// |
| 218 |
// - AccessDeniedException |
| 219 |
// You don't have sufficient permissions to perform this action. |
| 220 |
// |
| 221 |
// - InternalServerException |
| 222 |
// There was an unexpected error during processing of the request. |
| 223 |
// |
| 224 |
// - ResourceNotFoundException |
| 225 |
// The request references a routing control or control panel that was not found. |
| 226 |
// |
| 227 |
// - ValidationException |
| 228 |
// There was a validation error on the request. |
| 229 |
// |
| 230 |
// - ThrottlingException |
| 231 |
// The request was denied because of request throttling. |
| 232 |
// |
| 233 |
// - EndpointTemporarilyUnavailableException |
| 234 |
// The cluster endpoint isn't available. Try another cluster endpoint. |
| 235 |
// |
| 236 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/ListRoutingControls |
| 237 |
func (c *Route53RecoveryCluster) ListRoutingControls(input *ListRoutingControlsInput) (*ListRoutingControlsOutput, error) { |
| 238 |
req, out := c.ListRoutingControlsRequest(input) |
| 239 |
return out, req.Send() |
| 240 |
} |
| 241 |
|
| 242 |
// ListRoutingControlsWithContext is the same as ListRoutingControls with the addition of |
| 243 |
// the ability to pass a context and additional request options. |
| 244 |
// |
| 245 |
// See ListRoutingControls for details on how to use this API operation. |
| 246 |
// |
| 247 |
// The context must be non-nil and will be used for request cancellation. If |
| 248 |
// the context is nil a panic will occur. In the future the SDK may create |
| 249 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 250 |
// for more information on using Contexts. |
| 251 |
func (c *Route53RecoveryCluster) ListRoutingControlsWithContext(ctx aws.Context, input *ListRoutingControlsInput, opts ...request.Option) (*ListRoutingControlsOutput, error) { |
| 252 |
req, out := c.ListRoutingControlsRequest(input) |
| 253 |
req.SetContext(ctx) |
| 254 |
req.ApplyOptions(opts...) |
| 255 |
return out, req.Send() |
| 256 |
} |
| 257 |
|
| 258 |
// ListRoutingControlsPages iterates over the pages of a ListRoutingControls operation, |
| 259 |
// calling the "fn" function with the response data for each page. To stop |
| 260 |
// iterating, return false from the fn function. |
| 261 |
// |
| 262 |
// See ListRoutingControls method for more information on how to use this operation. |
| 263 |
// |
| 264 |
// Note: This operation can generate multiple requests to a service. |
| 265 |
// |
| 266 |
// // Example iterating over at most 3 pages of a ListRoutingControls operation. |
| 267 |
// pageNum := 0 |
| 268 |
// err := client.ListRoutingControlsPages(params, |
| 269 |
// func(page *route53recoverycluster.ListRoutingControlsOutput, lastPage bool) bool { |
| 270 |
// pageNum++ |
| 271 |
// fmt.Println(page) |
| 272 |
// return pageNum <= 3 |
| 273 |
// }) |
| 274 |
func (c *Route53RecoveryCluster) ListRoutingControlsPages(input *ListRoutingControlsInput, fn func(*ListRoutingControlsOutput, bool) bool) error { |
| 275 |
return c.ListRoutingControlsPagesWithContext(aws.BackgroundContext(), input, fn) |
| 276 |
} |
| 277 |
|
| 278 |
// ListRoutingControlsPagesWithContext same as ListRoutingControlsPages except |
| 279 |
// it takes a Context and allows setting request options on the pages. |
| 280 |
// |
| 281 |
// The context must be non-nil and will be used for request cancellation. If |
| 282 |
// the context is nil a panic will occur. In the future the SDK may create |
| 283 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 284 |
// for more information on using Contexts. |
| 285 |
func (c *Route53RecoveryCluster) ListRoutingControlsPagesWithContext(ctx aws.Context, input *ListRoutingControlsInput, fn func(*ListRoutingControlsOutput, bool) bool, opts ...request.Option) error { |
| 286 |
p := request.Pagination{ |
| 287 |
NewRequest: func() (*request.Request, error) { |
| 288 |
var inCpy *ListRoutingControlsInput |
| 289 |
if input != nil { |
| 290 |
tmp := *input |
| 291 |
inCpy = &tmp |
| 292 |
} |
| 293 |
req, _ := c.ListRoutingControlsRequest(inCpy) |
| 294 |
req.SetContext(ctx) |
| 295 |
req.ApplyOptions(opts...) |
| 296 |
return req, nil |
| 297 |
}, |
| 298 |
} |
| 299 |
|
| 300 |
for p.Next() { |
| 301 |
if !fn(p.Page().(*ListRoutingControlsOutput), !p.HasNextPage()) { |
| 302 |
break |
| 303 |
} |
| 304 |
} |
| 305 |
|
| 306 |
return p.Err() |
| 307 |
} |
| 308 |
|
| 309 |
const opUpdateRoutingControlState = "UpdateRoutingControlState" |
| 310 |
|
| 311 |
// UpdateRoutingControlStateRequest generates a "aws/request.Request" representing the |
| 312 |
// client's request for the UpdateRoutingControlState operation. The "output" return |
| 313 |
// value will be populated with the request's response once the request completes |
| 314 |
// successfully. |
| 315 |
// |
| 316 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 317 |
// the "output" return value is not valid until after Send returns without error. |
| 318 |
// |
| 319 |
// See UpdateRoutingControlState for more information on using the UpdateRoutingControlState |
| 320 |
// API call, and error handling. |
| 321 |
// |
| 322 |
// This method is useful when you want to inject custom logic or configuration |
| 323 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 324 |
// |
| 325 |
// // Example sending a request using the UpdateRoutingControlStateRequest method. |
| 326 |
// req, resp := client.UpdateRoutingControlStateRequest(params) |
| 327 |
// |
| 328 |
// err := req.Send() |
| 329 |
// if err == nil { // resp is now filled |
| 330 |
// fmt.Println(resp) |
| 331 |
// } |
| 332 |
// |
| 333 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/UpdateRoutingControlState |
| 334 |
func (c *Route53RecoveryCluster) UpdateRoutingControlStateRequest(input *UpdateRoutingControlStateInput) (req *request.Request, output *UpdateRoutingControlStateOutput) { |
| 335 |
op := &request.Operation{ |
| 336 |
Name: opUpdateRoutingControlState, |
| 337 |
HTTPMethod: "POST", |
| 338 |
HTTPPath: "/", |
| 339 |
} |
| 340 |
|
| 341 |
if input == nil { |
| 342 |
input = &UpdateRoutingControlStateInput{} |
| 343 |
} |
| 344 |
|
| 345 |
output = &UpdateRoutingControlStateOutput{} |
| 346 |
req = c.newRequest(op, input, output) |
| 347 |
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) |
| 348 |
return |
| 349 |
} |
| 350 |
|
| 351 |
// UpdateRoutingControlState API operation for Route53 Recovery Cluster. |
| 352 |
// |
| 353 |
// Set the state of the routing control to reroute traffic. You can set the |
| 354 |
// value to ON or OFF. When the state is ON, traffic flows to a cell. When the |
| 355 |
// state is OFF, traffic does not flow. |
| 356 |
// |
| 357 |
// With Route 53 ARC, you can add safety rules for routing controls, which are |
| 358 |
// safeguards for routing control state updates that help prevent unexpected |
| 359 |
// outcomes, like fail open traffic routing. However, there are scenarios when |
| 360 |
// you might want to bypass the routing control safeguards that are enforced |
| 361 |
// with safety rules that you've configured. For example, you might want to |
| 362 |
// fail over quickly for disaster recovery, and one or more safety rules might |
| 363 |
// be unexpectedly preventing you from updating a routing control state to reroute |
| 364 |
// traffic. In a "break glass" scenario like this, you can override one or more |
| 365 |
// safety rules to change a routing control state and fail over your application. |
| 366 |
// |
| 367 |
// The SafetyRulesToOverride property enables you override one or more safety |
| 368 |
// rules and update routing control states. For more information, see Override |
| 369 |
// safety rules to reroute traffic (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.override-safety-rule.html) |
| 370 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. |
| 371 |
// |
| 372 |
// You must specify Regional endpoints when you work with API cluster operations |
| 373 |
// to get or update routing control states in Route 53 ARC. |
| 374 |
// |
| 375 |
// To see a code example for getting a routing control state, including accessing |
| 376 |
// Regional cluster endpoints in sequence, see API examples (https://docs.aws.amazon.com/r53recovery/latest/dg/service_code_examples_actions.html) |
| 377 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. |
| 378 |
// |
| 379 |
// - Viewing and updating routing control states (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.update.html) |
| 380 |
// |
| 381 |
// - Working with routing controls overall (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.html) |
| 382 |
// |
| 383 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 384 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 385 |
// the error. |
| 386 |
// |
| 387 |
// See the AWS API reference guide for Route53 Recovery Cluster's |
| 388 |
// API operation UpdateRoutingControlState for usage and error information. |
| 389 |
// |
| 390 |
// Returned Error Types: |
| 391 |
// |
| 392 |
// - AccessDeniedException |
| 393 |
// You don't have sufficient permissions to perform this action. |
| 394 |
// |
| 395 |
// - InternalServerException |
| 396 |
// There was an unexpected error during processing of the request. |
| 397 |
// |
| 398 |
// - ResourceNotFoundException |
| 399 |
// The request references a routing control or control panel that was not found. |
| 400 |
// |
| 401 |
// - ValidationException |
| 402 |
// There was a validation error on the request. |
| 403 |
// |
| 404 |
// - ThrottlingException |
| 405 |
// The request was denied because of request throttling. |
| 406 |
// |
| 407 |
// - EndpointTemporarilyUnavailableException |
| 408 |
// The cluster endpoint isn't available. Try another cluster endpoint. |
| 409 |
// |
| 410 |
// - ConflictException |
| 411 |
// There was a conflict with this request. Try again. |
| 412 |
// |
| 413 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/UpdateRoutingControlState |
| 414 |
func (c *Route53RecoveryCluster) UpdateRoutingControlState(input *UpdateRoutingControlStateInput) (*UpdateRoutingControlStateOutput, error) { |
| 415 |
req, out := c.UpdateRoutingControlStateRequest(input) |
| 416 |
return out, req.Send() |
| 417 |
} |
| 418 |
|
| 419 |
// UpdateRoutingControlStateWithContext is the same as UpdateRoutingControlState with the addition of |
| 420 |
// the ability to pass a context and additional request options. |
| 421 |
// |
| 422 |
// See UpdateRoutingControlState for details on how to use this API operation. |
| 423 |
// |
| 424 |
// The context must be non-nil and will be used for request cancellation. If |
| 425 |
// the context is nil a panic will occur. In the future the SDK may create |
| 426 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 427 |
// for more information on using Contexts. |
| 428 |
func (c *Route53RecoveryCluster) UpdateRoutingControlStateWithContext(ctx aws.Context, input *UpdateRoutingControlStateInput, opts ...request.Option) (*UpdateRoutingControlStateOutput, error) { |
| 429 |
req, out := c.UpdateRoutingControlStateRequest(input) |
| 430 |
req.SetContext(ctx) |
| 431 |
req.ApplyOptions(opts...) |
| 432 |
return out, req.Send() |
| 433 |
} |
| 434 |
|
| 435 |
const opUpdateRoutingControlStates = "UpdateRoutingControlStates" |
| 436 |
|
| 437 |
// UpdateRoutingControlStatesRequest generates a "aws/request.Request" representing the |
| 438 |
// client's request for the UpdateRoutingControlStates operation. The "output" return |
| 439 |
// value will be populated with the request's response once the request completes |
| 440 |
// successfully. |
| 441 |
// |
| 442 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 443 |
// the "output" return value is not valid until after Send returns without error. |
| 444 |
// |
| 445 |
// See UpdateRoutingControlStates for more information on using the UpdateRoutingControlStates |
| 446 |
// API call, and error handling. |
| 447 |
// |
| 448 |
// This method is useful when you want to inject custom logic or configuration |
| 449 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 450 |
// |
| 451 |
// // Example sending a request using the UpdateRoutingControlStatesRequest method. |
| 452 |
// req, resp := client.UpdateRoutingControlStatesRequest(params) |
| 453 |
// |
| 454 |
// err := req.Send() |
| 455 |
// if err == nil { // resp is now filled |
| 456 |
// fmt.Println(resp) |
| 457 |
// } |
| 458 |
// |
| 459 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/UpdateRoutingControlStates |
| 460 |
func (c *Route53RecoveryCluster) UpdateRoutingControlStatesRequest(input *UpdateRoutingControlStatesInput) (req *request.Request, output *UpdateRoutingControlStatesOutput) { |
| 461 |
op := &request.Operation{ |
| 462 |
Name: opUpdateRoutingControlStates, |
| 463 |
HTTPMethod: "POST", |
| 464 |
HTTPPath: "/", |
| 465 |
} |
| 466 |
|
| 467 |
if input == nil { |
| 468 |
input = &UpdateRoutingControlStatesInput{} |
| 469 |
} |
| 470 |
|
| 471 |
output = &UpdateRoutingControlStatesOutput{} |
| 472 |
req = c.newRequest(op, input, output) |
| 473 |
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) |
| 474 |
return |
| 475 |
} |
| 476 |
|
| 477 |
// UpdateRoutingControlStates API operation for Route53 Recovery Cluster. |
| 478 |
// |
| 479 |
// Set multiple routing control states. You can set the value for each state |
| 480 |
// to be ON or OFF. When the state is ON, traffic flows to a cell. When it's |
| 481 |
// OFF, traffic does not flow. |
| 482 |
// |
| 483 |
// With Route 53 ARC, you can add safety rules for routing controls, which are |
| 484 |
// safeguards for routing control state updates that help prevent unexpected |
| 485 |
// outcomes, like fail open traffic routing. However, there are scenarios when |
| 486 |
// you might want to bypass the routing control safeguards that are enforced |
| 487 |
// with safety rules that you've configured. For example, you might want to |
| 488 |
// fail over quickly for disaster recovery, and one or more safety rules might |
| 489 |
// be unexpectedly preventing you from updating a routing control state to reroute |
| 490 |
// traffic. In a "break glass" scenario like this, you can override one or more |
| 491 |
// safety rules to change a routing control state and fail over your application. |
| 492 |
// |
| 493 |
// The SafetyRulesToOverride property enables you override one or more safety |
| 494 |
// rules and update routing control states. For more information, see Override |
| 495 |
// safety rules to reroute traffic (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.override-safety-rule.html) |
| 496 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. |
| 497 |
// |
| 498 |
// You must specify Regional endpoints when you work with API cluster operations |
| 499 |
// to get or update routing control states in Route 53 ARC. |
| 500 |
// |
| 501 |
// To see a code example for getting a routing control state, including accessing |
| 502 |
// Regional cluster endpoints in sequence, see API examples (https://docs.aws.amazon.com/r53recovery/latest/dg/service_code_examples_actions.html) |
| 503 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. |
| 504 |
// |
| 505 |
// - Viewing and updating routing control states (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.update.html) |
| 506 |
// |
| 507 |
// - Working with routing controls overall (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.html) |
| 508 |
// |
| 509 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 510 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 511 |
// the error. |
| 512 |
// |
| 513 |
// See the AWS API reference guide for Route53 Recovery Cluster's |
| 514 |
// API operation UpdateRoutingControlStates for usage and error information. |
| 515 |
// |
| 516 |
// Returned Error Types: |
| 517 |
// |
| 518 |
// - AccessDeniedException |
| 519 |
// You don't have sufficient permissions to perform this action. |
| 520 |
// |
| 521 |
// - InternalServerException |
| 522 |
// There was an unexpected error during processing of the request. |
| 523 |
// |
| 524 |
// - ResourceNotFoundException |
| 525 |
// The request references a routing control or control panel that was not found. |
| 526 |
// |
| 527 |
// - ValidationException |
| 528 |
// There was a validation error on the request. |
| 529 |
// |
| 530 |
// - ThrottlingException |
| 531 |
// The request was denied because of request throttling. |
| 532 |
// |
| 533 |
// - EndpointTemporarilyUnavailableException |
| 534 |
// The cluster endpoint isn't available. Try another cluster endpoint. |
| 535 |
// |
| 536 |
// - ConflictException |
| 537 |
// There was a conflict with this request. Try again. |
| 538 |
// |
| 539 |
// - ServiceLimitExceededException |
| 540 |
// The request can't update that many routing control states at the same time. |
| 541 |
// Try again with fewer routing control states. |
| 542 |
// |
| 543 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/route53-recovery-cluster-2019-12-02/UpdateRoutingControlStates |
| 544 |
func (c *Route53RecoveryCluster) UpdateRoutingControlStates(input *UpdateRoutingControlStatesInput) (*UpdateRoutingControlStatesOutput, error) { |
| 545 |
req, out := c.UpdateRoutingControlStatesRequest(input) |
| 546 |
return out, req.Send() |
| 547 |
} |
| 548 |
|
| 549 |
// UpdateRoutingControlStatesWithContext is the same as UpdateRoutingControlStates with the addition of |
| 550 |
// the ability to pass a context and additional request options. |
| 551 |
// |
| 552 |
// See UpdateRoutingControlStates for details on how to use this API operation. |
| 553 |
// |
| 554 |
// The context must be non-nil and will be used for request cancellation. If |
| 555 |
// the context is nil a panic will occur. In the future the SDK may create |
| 556 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 557 |
// for more information on using Contexts. |
| 558 |
func (c *Route53RecoveryCluster) UpdateRoutingControlStatesWithContext(ctx aws.Context, input *UpdateRoutingControlStatesInput, opts ...request.Option) (*UpdateRoutingControlStatesOutput, error) { |
| 559 |
req, out := c.UpdateRoutingControlStatesRequest(input) |
| 560 |
req.SetContext(ctx) |
| 561 |
req.ApplyOptions(opts...) |
| 562 |
return out, req.Send() |
| 563 |
} |
| 564 |
|
| 565 |
// You don't have sufficient permissions to perform this action. |
| 566 |
type AccessDeniedException struct { |
| 567 |
_ struct{} `type:"structure"` |
| 568 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 569 |
|
| 570 |
Message_ *string `locationName:"message" type:"string"` |
| 571 |
} |
| 572 |
|
| 573 |
// String returns the string representation. |
| 574 |
// |
| 575 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 576 |
// be included in the string output. The member name will be present, but the |
| 577 |
// value will be replaced with "sensitive". |
| 578 |
func (s AccessDeniedException) String() string { |
| 579 |
return awsutil.Prettify(s) |
| 580 |
} |
| 581 |
|
| 582 |
// GoString returns the string representation. |
| 583 |
// |
| 584 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 585 |
// be included in the string output. The member name will be present, but the |
| 586 |
// value will be replaced with "sensitive". |
| 587 |
func (s AccessDeniedException) GoString() string { |
| 588 |
return s.String() |
| 589 |
} |
| 590 |
|
| 591 |
func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { |
| 592 |
return &AccessDeniedException{ |
| 593 |
RespMetadata: v, |
| 594 |
} |
| 595 |
} |
| 596 |
|
| 597 |
// Code returns the exception type name. |
| 598 |
func (s *AccessDeniedException) Code() string { |
| 599 |
return "AccessDeniedException" |
| 600 |
} |
| 601 |
|
| 602 |
// Message returns the exception's message. |
| 603 |
func (s *AccessDeniedException) Message() string { |
| 604 |
if s.Message_ != nil { |
| 605 |
return *s.Message_ |
| 606 |
} |
| 607 |
return "" |
| 608 |
} |
| 609 |
|
| 610 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 611 |
func (s *AccessDeniedException) OrigErr() error { |
| 612 |
return nil |
| 613 |
} |
| 614 |
|
| 615 |
func (s *AccessDeniedException) Error() string { |
| 616 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 617 |
} |
| 618 |
|
| 619 |
// Status code returns the HTTP status code for the request's response error. |
| 620 |
func (s *AccessDeniedException) StatusCode() int { |
| 621 |
return s.RespMetadata.StatusCode |
| 622 |
} |
| 623 |
|
| 624 |
// RequestID returns the service's response RequestID for request. |
| 625 |
func (s *AccessDeniedException) RequestID() string { |
| 626 |
return s.RespMetadata.RequestID |
| 627 |
} |
| 628 |
|
| 629 |
// There was a conflict with this request. Try again. |
| 630 |
type ConflictException struct { |
| 631 |
_ struct{} `type:"structure"` |
| 632 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 633 |
|
| 634 |
// Description of the ConflictException error |
| 635 |
Message_ *string `locationName:"message" type:"string"` |
| 636 |
|
| 637 |
// Identifier of the resource in use |
| 638 |
// |
| 639 |
// ResourceId is a required field |
| 640 |
ResourceId *string `locationName:"resourceId" type:"string" required:"true"` |
| 641 |
|
| 642 |
// Type of the resource in use |
| 643 |
// |
| 644 |
// ResourceType is a required field |
| 645 |
ResourceType *string `locationName:"resourceType" type:"string" required:"true"` |
| 646 |
} |
| 647 |
|
| 648 |
// String returns the string representation. |
| 649 |
// |
| 650 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 651 |
// be included in the string output. The member name will be present, but the |
| 652 |
// value will be replaced with "sensitive". |
| 653 |
func (s ConflictException) String() string { |
| 654 |
return awsutil.Prettify(s) |
| 655 |
} |
| 656 |
|
| 657 |
// GoString returns the string representation. |
| 658 |
// |
| 659 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 660 |
// be included in the string output. The member name will be present, but the |
| 661 |
// value will be replaced with "sensitive". |
| 662 |
func (s ConflictException) GoString() string { |
| 663 |
return s.String() |
| 664 |
} |
| 665 |
|
| 666 |
func newErrorConflictException(v protocol.ResponseMetadata) error { |
| 667 |
return &ConflictException{ |
| 668 |
RespMetadata: v, |
| 669 |
} |
| 670 |
} |
| 671 |
|
| 672 |
// Code returns the exception type name. |
| 673 |
func (s *ConflictException) Code() string { |
| 674 |
return "ConflictException" |
| 675 |
} |
| 676 |
|
| 677 |
// Message returns the exception's message. |
| 678 |
func (s *ConflictException) Message() string { |
| 679 |
if s.Message_ != nil { |
| 680 |
return *s.Message_ |
| 681 |
} |
| 682 |
return "" |
| 683 |
} |
| 684 |
|
| 685 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 686 |
func (s *ConflictException) OrigErr() error { |
| 687 |
return nil |
| 688 |
} |
| 689 |
|
| 690 |
func (s *ConflictException) Error() string { |
| 691 |
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) |
| 692 |
} |
| 693 |
|
| 694 |
// Status code returns the HTTP status code for the request's response error. |
| 695 |
func (s *ConflictException) StatusCode() int { |
| 696 |
return s.RespMetadata.StatusCode |
| 697 |
} |
| 698 |
|
| 699 |
// RequestID returns the service's response RequestID for request. |
| 700 |
func (s *ConflictException) RequestID() string { |
| 701 |
return s.RespMetadata.RequestID |
| 702 |
} |
| 703 |
|
| 704 |
// The cluster endpoint isn't available. Try another cluster endpoint. |
| 705 |
type EndpointTemporarilyUnavailableException struct { |
| 706 |
_ struct{} `type:"structure"` |
| 707 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 708 |
|
| 709 |
Message_ *string `locationName:"message" type:"string"` |
| 710 |
} |
| 711 |
|
| 712 |
// String returns the string representation. |
| 713 |
// |
| 714 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 715 |
// be included in the string output. The member name will be present, but the |
| 716 |
// value will be replaced with "sensitive". |
| 717 |
func (s EndpointTemporarilyUnavailableException) String() string { |
| 718 |
return awsutil.Prettify(s) |
| 719 |
} |
| 720 |
|
| 721 |
// GoString returns the string representation. |
| 722 |
// |
| 723 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 724 |
// be included in the string output. The member name will be present, but the |
| 725 |
// value will be replaced with "sensitive". |
| 726 |
func (s EndpointTemporarilyUnavailableException) GoString() string { |
| 727 |
return s.String() |
| 728 |
} |
| 729 |
|
| 730 |
func newErrorEndpointTemporarilyUnavailableException(v protocol.ResponseMetadata) error { |
| 731 |
return &EndpointTemporarilyUnavailableException{ |
| 732 |
RespMetadata: v, |
| 733 |
} |
| 734 |
} |
| 735 |
|
| 736 |
// Code returns the exception type name. |
| 737 |
func (s *EndpointTemporarilyUnavailableException) Code() string { |
| 738 |
return "EndpointTemporarilyUnavailableException" |
| 739 |
} |
| 740 |
|
| 741 |
// Message returns the exception's message. |
| 742 |
func (s *EndpointTemporarilyUnavailableException) Message() string { |
| 743 |
if s.Message_ != nil { |
| 744 |
return *s.Message_ |
| 745 |
} |
| 746 |
return "" |
| 747 |
} |
| 748 |
|
| 749 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 750 |
func (s *EndpointTemporarilyUnavailableException) OrigErr() error { |
| 751 |
return nil |
| 752 |
} |
| 753 |
|
| 754 |
func (s *EndpointTemporarilyUnavailableException) Error() string { |
| 755 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 756 |
} |
| 757 |
|
| 758 |
// Status code returns the HTTP status code for the request's response error. |
| 759 |
func (s *EndpointTemporarilyUnavailableException) StatusCode() int { |
| 760 |
return s.RespMetadata.StatusCode |
| 761 |
} |
| 762 |
|
| 763 |
// RequestID returns the service's response RequestID for request. |
| 764 |
func (s *EndpointTemporarilyUnavailableException) RequestID() string { |
| 765 |
return s.RespMetadata.RequestID |
| 766 |
} |
| 767 |
|
| 768 |
type GetRoutingControlStateInput struct { |
| 769 |
_ struct{} `type:"structure"` |
| 770 |
|
| 771 |
// The Amazon Resource Name (ARN) for the routing control that you want to get |
| 772 |
// the state for. |
| 773 |
// |
| 774 |
// RoutingControlArn is a required field |
| 775 |
RoutingControlArn *string `min:"1" type:"string" required:"true"` |
| 776 |
} |
| 777 |
|
| 778 |
// String returns the string representation. |
| 779 |
// |
| 780 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 781 |
// be included in the string output. The member name will be present, but the |
| 782 |
// value will be replaced with "sensitive". |
| 783 |
func (s GetRoutingControlStateInput) String() string { |
| 784 |
return awsutil.Prettify(s) |
| 785 |
} |
| 786 |
|
| 787 |
// GoString returns the string representation. |
| 788 |
// |
| 789 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 790 |
// be included in the string output. The member name will be present, but the |
| 791 |
// value will be replaced with "sensitive". |
| 792 |
func (s GetRoutingControlStateInput) GoString() string { |
| 793 |
return s.String() |
| 794 |
} |
| 795 |
|
| 796 |
// Validate inspects the fields of the type to determine if they are valid. |
| 797 |
func (s *GetRoutingControlStateInput) Validate() error { |
| 798 |
invalidParams := request.ErrInvalidParams{Context: "GetRoutingControlStateInput"} |
| 799 |
if s.RoutingControlArn == nil { |
| 800 |
invalidParams.Add(request.NewErrParamRequired("RoutingControlArn")) |
| 801 |
} |
| 802 |
if s.RoutingControlArn != nil && len(*s.RoutingControlArn) < 1 { |
| 803 |
invalidParams.Add(request.NewErrParamMinLen("RoutingControlArn", 1)) |
| 804 |
} |
| 805 |
|
| 806 |
if invalidParams.Len() > 0 { |
| 807 |
return invalidParams |
| 808 |
} |
| 809 |
return nil |
| 810 |
} |
| 811 |
|
| 812 |
// SetRoutingControlArn sets the RoutingControlArn field's value. |
| 813 |
func (s *GetRoutingControlStateInput) SetRoutingControlArn(v string) *GetRoutingControlStateInput { |
| 814 |
s.RoutingControlArn = &v |
| 815 |
return s |
| 816 |
} |
| 817 |
|
| 818 |
type GetRoutingControlStateOutput struct { |
| 819 |
_ struct{} `type:"structure"` |
| 820 |
|
| 821 |
// The Amazon Resource Name (ARN) of the response. |
| 822 |
// |
| 823 |
// RoutingControlArn is a required field |
| 824 |
RoutingControlArn *string `min:"1" type:"string" required:"true"` |
| 825 |
|
| 826 |
// The routing control name. |
| 827 |
RoutingControlName *string `min:"1" type:"string"` |
| 828 |
|
| 829 |
// The state of the routing control. |
| 830 |
// |
| 831 |
// RoutingControlState is a required field |
| 832 |
RoutingControlState *string `type:"string" required:"true" enum:"RoutingControlState"` |
| 833 |
} |
| 834 |
|
| 835 |
// String returns the string representation. |
| 836 |
// |
| 837 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 838 |
// be included in the string output. The member name will be present, but the |
| 839 |
// value will be replaced with "sensitive". |
| 840 |
func (s GetRoutingControlStateOutput) String() string { |
| 841 |
return awsutil.Prettify(s) |
| 842 |
} |
| 843 |
|
| 844 |
// GoString returns the string representation. |
| 845 |
// |
| 846 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 847 |
// be included in the string output. The member name will be present, but the |
| 848 |
// value will be replaced with "sensitive". |
| 849 |
func (s GetRoutingControlStateOutput) GoString() string { |
| 850 |
return s.String() |
| 851 |
} |
| 852 |
|
| 853 |
// SetRoutingControlArn sets the RoutingControlArn field's value. |
| 854 |
func (s *GetRoutingControlStateOutput) SetRoutingControlArn(v string) *GetRoutingControlStateOutput { |
| 855 |
s.RoutingControlArn = &v |
| 856 |
return s |
| 857 |
} |
| 858 |
|
| 859 |
// SetRoutingControlName sets the RoutingControlName field's value. |
| 860 |
func (s *GetRoutingControlStateOutput) SetRoutingControlName(v string) *GetRoutingControlStateOutput { |
| 861 |
s.RoutingControlName = &v |
| 862 |
return s |
| 863 |
} |
| 864 |
|
| 865 |
// SetRoutingControlState sets the RoutingControlState field's value. |
| 866 |
func (s *GetRoutingControlStateOutput) SetRoutingControlState(v string) *GetRoutingControlStateOutput { |
| 867 |
s.RoutingControlState = &v |
| 868 |
return s |
| 869 |
} |
| 870 |
|
| 871 |
// There was an unexpected error during processing of the request. |
| 872 |
type InternalServerException struct { |
| 873 |
_ struct{} `type:"structure"` |
| 874 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 875 |
|
| 876 |
Message_ *string `locationName:"message" type:"string"` |
| 877 |
|
| 878 |
// Advice to clients on when the call can be safely retried |
| 879 |
RetryAfterSeconds *int64 `locationName:"retryAfterSeconds" type:"integer"` |
| 880 |
} |
| 881 |
|
| 882 |
// String returns the string representation. |
| 883 |
// |
| 884 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 885 |
// be included in the string output. The member name will be present, but the |
| 886 |
// value will be replaced with "sensitive". |
| 887 |
func (s InternalServerException) String() string { |
| 888 |
return awsutil.Prettify(s) |
| 889 |
} |
| 890 |
|
| 891 |
// GoString returns the string representation. |
| 892 |
// |
| 893 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 894 |
// be included in the string output. The member name will be present, but the |
| 895 |
// value will be replaced with "sensitive". |
| 896 |
func (s InternalServerException) GoString() string { |
| 897 |
return s.String() |
| 898 |
} |
| 899 |
|
| 900 |
func newErrorInternalServerException(v protocol.ResponseMetadata) error { |
| 901 |
return &InternalServerException{ |
| 902 |
RespMetadata: v, |
| 903 |
} |
| 904 |
} |
| 905 |
|
| 906 |
// Code returns the exception type name. |
| 907 |
func (s *InternalServerException) Code() string { |
| 908 |
return "InternalServerException" |
| 909 |
} |
| 910 |
|
| 911 |
// Message returns the exception's message. |
| 912 |
func (s *InternalServerException) Message() string { |
| 913 |
if s.Message_ != nil { |
| 914 |
return *s.Message_ |
| 915 |
} |
| 916 |
return "" |
| 917 |
} |
| 918 |
|
| 919 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 920 |
func (s *InternalServerException) OrigErr() error { |
| 921 |
return nil |
| 922 |
} |
| 923 |
|
| 924 |
func (s *InternalServerException) Error() string { |
| 925 |
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) |
| 926 |
} |
| 927 |
|
| 928 |
// Status code returns the HTTP status code for the request's response error. |
| 929 |
func (s *InternalServerException) StatusCode() int { |
| 930 |
return s.RespMetadata.StatusCode |
| 931 |
} |
| 932 |
|
| 933 |
// RequestID returns the service's response RequestID for request. |
| 934 |
func (s *InternalServerException) RequestID() string { |
| 935 |
return s.RespMetadata.RequestID |
| 936 |
} |
| 937 |
|
| 938 |
type ListRoutingControlsInput struct { |
| 939 |
_ struct{} `type:"structure"` |
| 940 |
|
| 941 |
// The Amazon Resource Name (ARN) of the control panel of the routing controls |
| 942 |
// to list. |
| 943 |
ControlPanelArn *string `min:"1" type:"string"` |
| 944 |
|
| 945 |
// The number of routing controls objects that you want to return with this |
| 946 |
// call. The default value is 500. |
| 947 |
MaxResults *int64 `min:"1" type:"integer"` |
| 948 |
|
| 949 |
// The token for the next set of results. You receive this token from a previous |
| 950 |
// call. |
| 951 |
NextToken *string `min:"1" type:"string"` |
| 952 |
} |
| 953 |
|
| 954 |
// String returns the string representation. |
| 955 |
// |
| 956 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 957 |
// be included in the string output. The member name will be present, but the |
| 958 |
// value will be replaced with "sensitive". |
| 959 |
func (s ListRoutingControlsInput) String() string { |
| 960 |
return awsutil.Prettify(s) |
| 961 |
} |
| 962 |
|
| 963 |
// GoString returns the string representation. |
| 964 |
// |
| 965 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 966 |
// be included in the string output. The member name will be present, but the |
| 967 |
// value will be replaced with "sensitive". |
| 968 |
func (s ListRoutingControlsInput) GoString() string { |
| 969 |
return s.String() |
| 970 |
} |
| 971 |
|
| 972 |
// Validate inspects the fields of the type to determine if they are valid. |
| 973 |
func (s *ListRoutingControlsInput) Validate() error { |
| 974 |
invalidParams := request.ErrInvalidParams{Context: "ListRoutingControlsInput"} |
| 975 |
if s.ControlPanelArn != nil && len(*s.ControlPanelArn) < 1 { |
| 976 |
invalidParams.Add(request.NewErrParamMinLen("ControlPanelArn", 1)) |
| 977 |
} |
| 978 |
if s.MaxResults != nil && *s.MaxResults < 1 { |
| 979 |
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) |
| 980 |
} |
| 981 |
if s.NextToken != nil && len(*s.NextToken) < 1 { |
| 982 |
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) |
| 983 |
} |
| 984 |
|
| 985 |
if invalidParams.Len() > 0 { |
| 986 |
return invalidParams |
| 987 |
} |
| 988 |
return nil |
| 989 |
} |
| 990 |
|
| 991 |
// SetControlPanelArn sets the ControlPanelArn field's value. |
| 992 |
func (s *ListRoutingControlsInput) SetControlPanelArn(v string) *ListRoutingControlsInput { |
| 993 |
s.ControlPanelArn = &v |
| 994 |
return s |
| 995 |
} |
| 996 |
|
| 997 |
// SetMaxResults sets the MaxResults field's value. |
| 998 |
func (s *ListRoutingControlsInput) SetMaxResults(v int64) *ListRoutingControlsInput { |
| 999 |
s.MaxResults = &v |
| 1000 |
return s |
| 1001 |
} |
| 1002 |
|
| 1003 |
// SetNextToken sets the NextToken field's value. |
| 1004 |
func (s *ListRoutingControlsInput) SetNextToken(v string) *ListRoutingControlsInput { |
| 1005 |
s.NextToken = &v |
| 1006 |
return s |
| 1007 |
} |
| 1008 |
|
| 1009 |
type ListRoutingControlsOutput struct { |
| 1010 |
_ struct{} `type:"structure"` |
| 1011 |
|
| 1012 |
// The token for the next set of results. You receive this token from a previous |
| 1013 |
// call. |
| 1014 |
NextToken *string `min:"1" type:"string"` |
| 1015 |
|
| 1016 |
// The list of routing controls. |
| 1017 |
// |
| 1018 |
// RoutingControls is a required field |
| 1019 |
RoutingControls []*RoutingControl `type:"list" required:"true"` |
| 1020 |
} |
| 1021 |
|
| 1022 |
// String returns the string representation. |
| 1023 |
// |
| 1024 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1025 |
// be included in the string output. The member name will be present, but the |
| 1026 |
// value will be replaced with "sensitive". |
| 1027 |
func (s ListRoutingControlsOutput) String() string { |
| 1028 |
return awsutil.Prettify(s) |
| 1029 |
} |
| 1030 |
|
| 1031 |
// GoString returns the string representation. |
| 1032 |
// |
| 1033 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1034 |
// be included in the string output. The member name will be present, but the |
| 1035 |
// value will be replaced with "sensitive". |
| 1036 |
func (s ListRoutingControlsOutput) GoString() string { |
| 1037 |
return s.String() |
| 1038 |
} |
| 1039 |
|
| 1040 |
// SetNextToken sets the NextToken field's value. |
| 1041 |
func (s *ListRoutingControlsOutput) SetNextToken(v string) *ListRoutingControlsOutput { |
| 1042 |
s.NextToken = &v |
| 1043 |
return s |
| 1044 |
} |
| 1045 |
|
| 1046 |
// SetRoutingControls sets the RoutingControls field's value. |
| 1047 |
func (s *ListRoutingControlsOutput) SetRoutingControls(v []*RoutingControl) *ListRoutingControlsOutput { |
| 1048 |
s.RoutingControls = v |
| 1049 |
return s |
| 1050 |
} |
| 1051 |
|
| 1052 |
// The request references a routing control or control panel that was not found. |
| 1053 |
type ResourceNotFoundException struct { |
| 1054 |
_ struct{} `type:"structure"` |
| 1055 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 1056 |
|
| 1057 |
Message_ *string `locationName:"message" type:"string"` |
| 1058 |
|
| 1059 |
// Hypothetical resource identifier that was not found |
| 1060 |
// |
| 1061 |
// ResourceId is a required field |
| 1062 |
ResourceId *string `locationName:"resourceId" type:"string" required:"true"` |
| 1063 |
|
| 1064 |
// Hypothetical resource type that was not found |
| 1065 |
// |
| 1066 |
// ResourceType is a required field |
| 1067 |
ResourceType *string `locationName:"resourceType" type:"string" required:"true"` |
| 1068 |
} |
| 1069 |
|
| 1070 |
// String returns the string representation. |
| 1071 |
// |
| 1072 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1073 |
// be included in the string output. The member name will be present, but the |
| 1074 |
// value will be replaced with "sensitive". |
| 1075 |
func (s ResourceNotFoundException) String() string { |
| 1076 |
return awsutil.Prettify(s) |
| 1077 |
} |
| 1078 |
|
| 1079 |
// GoString returns the string representation. |
| 1080 |
// |
| 1081 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1082 |
// be included in the string output. The member name will be present, but the |
| 1083 |
// value will be replaced with "sensitive". |
| 1084 |
func (s ResourceNotFoundException) GoString() string { |
| 1085 |
return s.String() |
| 1086 |
} |
| 1087 |
|
| 1088 |
func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { |
| 1089 |
return &ResourceNotFoundException{ |
| 1090 |
RespMetadata: v, |
| 1091 |
} |
| 1092 |
} |
| 1093 |
|
| 1094 |
// Code returns the exception type name. |
| 1095 |
func (s *ResourceNotFoundException) Code() string { |
| 1096 |
return "ResourceNotFoundException" |
| 1097 |
} |
| 1098 |
|
| 1099 |
// Message returns the exception's message. |
| 1100 |
func (s *ResourceNotFoundException) Message() string { |
| 1101 |
if s.Message_ != nil { |
| 1102 |
return *s.Message_ |
| 1103 |
} |
| 1104 |
return "" |
| 1105 |
} |
| 1106 |
|
| 1107 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 1108 |
func (s *ResourceNotFoundException) OrigErr() error { |
| 1109 |
return nil |
| 1110 |
} |
| 1111 |
|
| 1112 |
func (s *ResourceNotFoundException) Error() string { |
| 1113 |
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) |
| 1114 |
} |
| 1115 |
|
| 1116 |
// Status code returns the HTTP status code for the request's response error. |
| 1117 |
func (s *ResourceNotFoundException) StatusCode() int { |
| 1118 |
return s.RespMetadata.StatusCode |
| 1119 |
} |
| 1120 |
|
| 1121 |
// RequestID returns the service's response RequestID for request. |
| 1122 |
func (s *ResourceNotFoundException) RequestID() string { |
| 1123 |
return s.RespMetadata.RequestID |
| 1124 |
} |
| 1125 |
|
| 1126 |
// A routing control, which is a simple on/off switch that you can use to route |
| 1127 |
// traffic to cells. When a routing control state is set to ON, traffic flows |
| 1128 |
// to a cell. When the state is set to OFF, traffic does not flow. |
| 1129 |
type RoutingControl struct { |
| 1130 |
_ struct{} `type:"structure"` |
| 1131 |
|
| 1132 |
// The Amazon Resource Name (ARN) of the control panel where the routing control |
| 1133 |
// is located. |
| 1134 |
ControlPanelArn *string `min:"1" type:"string"` |
| 1135 |
|
| 1136 |
// The name of the control panel where the routing control is located. Only |
| 1137 |
// ASCII characters are supported for control panel names. |
| 1138 |
ControlPanelName *string `min:"1" type:"string"` |
| 1139 |
|
| 1140 |
// The Amazon Web Services account ID of the routing control owner. |
| 1141 |
Owner *string `min:"12" type:"string"` |
| 1142 |
|
| 1143 |
// The Amazon Resource Name (ARN) of the routing control. |
| 1144 |
RoutingControlArn *string `min:"1" type:"string"` |
| 1145 |
|
| 1146 |
// The name of the routing control. |
| 1147 |
RoutingControlName *string `min:"1" type:"string"` |
| 1148 |
|
| 1149 |
// The current state of the routing control. When a routing control state is |
| 1150 |
// set to ON, traffic flows to a cell. When the state is set to OFF, traffic |
| 1151 |
// does not flow. |
| 1152 |
RoutingControlState *string `type:"string" enum:"RoutingControlState"` |
| 1153 |
} |
| 1154 |
|
| 1155 |
// String 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". |
| 1160 |
func (s RoutingControl) String() string { |
| 1161 |
return awsutil.Prettify(s) |
| 1162 |
} |
| 1163 |
|
| 1164 |
// GoString returns the string representation. |
| 1165 |
// |
| 1166 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1167 |
// be included in the string output. The member name will be present, but the |
| 1168 |
// value will be replaced with "sensitive". |
| 1169 |
func (s RoutingControl) GoString() string { |
| 1170 |
return s.String() |
| 1171 |
} |
| 1172 |
|
| 1173 |
// SetControlPanelArn sets the ControlPanelArn field's value. |
| 1174 |
func (s *RoutingControl) SetControlPanelArn(v string) *RoutingControl { |
| 1175 |
s.ControlPanelArn = &v |
| 1176 |
return s |
| 1177 |
} |
| 1178 |
|
| 1179 |
// SetControlPanelName sets the ControlPanelName field's value. |
| 1180 |
func (s *RoutingControl) SetControlPanelName(v string) *RoutingControl { |
| 1181 |
s.ControlPanelName = &v |
| 1182 |
return s |
| 1183 |
} |
| 1184 |
|
| 1185 |
// SetOwner sets the Owner field's value. |
| 1186 |
func (s *RoutingControl) SetOwner(v string) *RoutingControl { |
| 1187 |
s.Owner = &v |
| 1188 |
return s |
| 1189 |
} |
| 1190 |
|
| 1191 |
// SetRoutingControlArn sets the RoutingControlArn field's value. |
| 1192 |
func (s *RoutingControl) SetRoutingControlArn(v string) *RoutingControl { |
| 1193 |
s.RoutingControlArn = &v |
| 1194 |
return s |
| 1195 |
} |
| 1196 |
|
| 1197 |
// SetRoutingControlName sets the RoutingControlName field's value. |
| 1198 |
func (s *RoutingControl) SetRoutingControlName(v string) *RoutingControl { |
| 1199 |
s.RoutingControlName = &v |
| 1200 |
return s |
| 1201 |
} |
| 1202 |
|
| 1203 |
// SetRoutingControlState sets the RoutingControlState field's value. |
| 1204 |
func (s *RoutingControl) SetRoutingControlState(v string) *RoutingControl { |
| 1205 |
s.RoutingControlState = &v |
| 1206 |
return s |
| 1207 |
} |
| 1208 |
|
| 1209 |
// The request can't update that many routing control states at the same time. |
| 1210 |
// Try again with fewer routing control states. |
| 1211 |
type ServiceLimitExceededException struct { |
| 1212 |
_ struct{} `type:"structure"` |
| 1213 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 1214 |
|
| 1215 |
// The code of the limit that was exceeded. |
| 1216 |
// |
| 1217 |
// LimitCode is a required field |
| 1218 |
LimitCode *string `locationName:"limitCode" type:"string" required:"true"` |
| 1219 |
|
| 1220 |
Message_ *string `locationName:"message" type:"string"` |
| 1221 |
|
| 1222 |
// The resource identifier of the limit that was exceeded. |
| 1223 |
ResourceId *string `locationName:"resourceId" type:"string"` |
| 1224 |
|
| 1225 |
// The resource type of the limit that was exceeded. |
| 1226 |
ResourceType *string `locationName:"resourceType" type:"string"` |
| 1227 |
|
| 1228 |
// The service code of the limit that was exceeded. |
| 1229 |
// |
| 1230 |
// ServiceCode is a required field |
| 1231 |
ServiceCode *string `locationName:"serviceCode" type:"string" required:"true"` |
| 1232 |
} |
| 1233 |
|
| 1234 |
// String returns the string representation. |
| 1235 |
// |
| 1236 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1237 |
// be included in the string output. The member name will be present, but the |
| 1238 |
// value will be replaced with "sensitive". |
| 1239 |
func (s ServiceLimitExceededException) String() string { |
| 1240 |
return awsutil.Prettify(s) |
| 1241 |
} |
| 1242 |
|
| 1243 |
// GoString returns the string representation. |
| 1244 |
// |
| 1245 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1246 |
// be included in the string output. The member name will be present, but the |
| 1247 |
// value will be replaced with "sensitive". |
| 1248 |
func (s ServiceLimitExceededException) GoString() string { |
| 1249 |
return s.String() |
| 1250 |
} |
| 1251 |
|
| 1252 |
func newErrorServiceLimitExceededException(v protocol.ResponseMetadata) error { |
| 1253 |
return &ServiceLimitExceededException{ |
| 1254 |
RespMetadata: v, |
| 1255 |
} |
| 1256 |
} |
| 1257 |
|
| 1258 |
// Code returns the exception type name. |
| 1259 |
func (s *ServiceLimitExceededException) Code() string { |
| 1260 |
return "ServiceLimitExceededException" |
| 1261 |
} |
| 1262 |
|
| 1263 |
// Message returns the exception's message. |
| 1264 |
func (s *ServiceLimitExceededException) Message() string { |
| 1265 |
if s.Message_ != nil { |
| 1266 |
return *s.Message_ |
| 1267 |
} |
| 1268 |
return "" |
| 1269 |
} |
| 1270 |
|
| 1271 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 1272 |
func (s *ServiceLimitExceededException) OrigErr() error { |
| 1273 |
return nil |
| 1274 |
} |
| 1275 |
|
| 1276 |
func (s *ServiceLimitExceededException) Error() string { |
| 1277 |
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) |
| 1278 |
} |
| 1279 |
|
| 1280 |
// Status code returns the HTTP status code for the request's response error. |
| 1281 |
func (s *ServiceLimitExceededException) StatusCode() int { |
| 1282 |
return s.RespMetadata.StatusCode |
| 1283 |
} |
| 1284 |
|
| 1285 |
// RequestID returns the service's response RequestID for request. |
| 1286 |
func (s *ServiceLimitExceededException) RequestID() string { |
| 1287 |
return s.RespMetadata.RequestID |
| 1288 |
} |
| 1289 |
|
| 1290 |
// The request was denied because of request throttling. |
| 1291 |
type ThrottlingException struct { |
| 1292 |
_ struct{} `type:"structure"` |
| 1293 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 1294 |
|
| 1295 |
Message_ *string `locationName:"message" type:"string"` |
| 1296 |
|
| 1297 |
// Advice to clients on when the call can be safely retried |
| 1298 |
RetryAfterSeconds *int64 `locationName:"retryAfterSeconds" type:"integer"` |
| 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 ThrottlingException) 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 ThrottlingException) GoString() string { |
| 1316 |
return s.String() |
| 1317 |
} |
| 1318 |
|
| 1319 |
func newErrorThrottlingException(v protocol.ResponseMetadata) error { |
| 1320 |
return &ThrottlingException{ |
| 1321 |
RespMetadata: v, |
| 1322 |
} |
| 1323 |
} |
| 1324 |
|
| 1325 |
// Code returns the exception type name. |
| 1326 |
func (s *ThrottlingException) Code() string { |
| 1327 |
return "ThrottlingException" |
| 1328 |
} |
| 1329 |
|
| 1330 |
// Message returns the exception's message. |
| 1331 |
func (s *ThrottlingException) 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 *ThrottlingException) OrigErr() error { |
| 1340 |
return nil |
| 1341 |
} |
| 1342 |
|
| 1343 |
func (s *ThrottlingException) Error() string { |
| 1344 |
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) |
| 1345 |
} |
| 1346 |
|
| 1347 |
// Status code returns the HTTP status code for the request's response error. |
| 1348 |
func (s *ThrottlingException) StatusCode() int { |
| 1349 |
return s.RespMetadata.StatusCode |
| 1350 |
} |
| 1351 |
|
| 1352 |
// RequestID returns the service's response RequestID for request. |
| 1353 |
func (s *ThrottlingException) RequestID() string { |
| 1354 |
return s.RespMetadata.RequestID |
| 1355 |
} |
| 1356 |
|
| 1357 |
// A routing control state entry. |
| 1358 |
type UpdateRoutingControlStateEntry struct { |
| 1359 |
_ struct{} `type:"structure"` |
| 1360 |
|
| 1361 |
// The Amazon Resource Name (ARN) for a routing control state entry. |
| 1362 |
// |
| 1363 |
// RoutingControlArn is a required field |
| 1364 |
RoutingControlArn *string `min:"1" type:"string" required:"true"` |
| 1365 |
|
| 1366 |
// The routing control state in a set of routing control state entries. |
| 1367 |
// |
| 1368 |
// RoutingControlState is a required field |
| 1369 |
RoutingControlState *string `type:"string" required:"true" enum:"RoutingControlState"` |
| 1370 |
} |
| 1371 |
|
| 1372 |
// String returns the string representation. |
| 1373 |
// |
| 1374 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1375 |
// be included in the string output. The member name will be present, but the |
| 1376 |
// value will be replaced with "sensitive". |
| 1377 |
func (s UpdateRoutingControlStateEntry) String() string { |
| 1378 |
return awsutil.Prettify(s) |
| 1379 |
} |
| 1380 |
|
| 1381 |
// GoString returns the string representation. |
| 1382 |
// |
| 1383 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1384 |
// be included in the string output. The member name will be present, but the |
| 1385 |
// value will be replaced with "sensitive". |
| 1386 |
func (s UpdateRoutingControlStateEntry) GoString() string { |
| 1387 |
return s.String() |
| 1388 |
} |
| 1389 |
|
| 1390 |
// Validate inspects the fields of the type to determine if they are valid. |
| 1391 |
func (s *UpdateRoutingControlStateEntry) Validate() error { |
| 1392 |
invalidParams := request.ErrInvalidParams{Context: "UpdateRoutingControlStateEntry"} |
| 1393 |
if s.RoutingControlArn == nil { |
| 1394 |
invalidParams.Add(request.NewErrParamRequired("RoutingControlArn")) |
| 1395 |
} |
| 1396 |
if s.RoutingControlArn != nil && len(*s.RoutingControlArn) < 1 { |
| 1397 |
invalidParams.Add(request.NewErrParamMinLen("RoutingControlArn", 1)) |
| 1398 |
} |
| 1399 |
if s.RoutingControlState == nil { |
| 1400 |
invalidParams.Add(request.NewErrParamRequired("RoutingControlState")) |
| 1401 |
} |
| 1402 |
|
| 1403 |
if invalidParams.Len() > 0 { |
| 1404 |
return invalidParams |
| 1405 |
} |
| 1406 |
return nil |
| 1407 |
} |
| 1408 |
|
| 1409 |
// SetRoutingControlArn sets the RoutingControlArn field's value. |
| 1410 |
func (s *UpdateRoutingControlStateEntry) SetRoutingControlArn(v string) *UpdateRoutingControlStateEntry { |
| 1411 |
s.RoutingControlArn = &v |
| 1412 |
return s |
| 1413 |
} |
| 1414 |
|
| 1415 |
// SetRoutingControlState sets the RoutingControlState field's value. |
| 1416 |
func (s *UpdateRoutingControlStateEntry) SetRoutingControlState(v string) *UpdateRoutingControlStateEntry { |
| 1417 |
s.RoutingControlState = &v |
| 1418 |
return s |
| 1419 |
} |
| 1420 |
|
| 1421 |
type UpdateRoutingControlStateInput struct { |
| 1422 |
_ struct{} `type:"structure"` |
| 1423 |
|
| 1424 |
// The Amazon Resource Name (ARN) for the routing control that you want to update |
| 1425 |
// the state for. |
| 1426 |
// |
| 1427 |
// RoutingControlArn is a required field |
| 1428 |
RoutingControlArn *string `min:"1" type:"string" required:"true"` |
| 1429 |
|
| 1430 |
// The state of the routing control. You can set the value to ON or OFF. |
| 1431 |
// |
| 1432 |
// RoutingControlState is a required field |
| 1433 |
RoutingControlState *string `type:"string" required:"true" enum:"RoutingControlState"` |
| 1434 |
|
| 1435 |
// The Amazon Resource Names (ARNs) for the safety rules that you want to override |
| 1436 |
// when you're updating the state of a routing control. You can override one |
| 1437 |
// safety rule or multiple safety rules by including one or more ARNs, separated |
| 1438 |
// by commas. |
| 1439 |
// |
| 1440 |
// For more information, see Override safety rules to reroute traffic (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.override-safety-rule.html) |
| 1441 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. |
| 1442 |
SafetyRulesToOverride []*string `type:"list"` |
| 1443 |
} |
| 1444 |
|
| 1445 |
// String returns the string representation. |
| 1446 |
// |
| 1447 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1448 |
// be included in the string output. The member name will be present, but the |
| 1449 |
// value will be replaced with "sensitive". |
| 1450 |
func (s UpdateRoutingControlStateInput) String() string { |
| 1451 |
return awsutil.Prettify(s) |
| 1452 |
} |
| 1453 |
|
| 1454 |
// GoString returns the string representation. |
| 1455 |
// |
| 1456 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1457 |
// be included in the string output. The member name will be present, but the |
| 1458 |
// value will be replaced with "sensitive". |
| 1459 |
func (s UpdateRoutingControlStateInput) GoString() string { |
| 1460 |
return s.String() |
| 1461 |
} |
| 1462 |
|
| 1463 |
// Validate inspects the fields of the type to determine if they are valid. |
| 1464 |
func (s *UpdateRoutingControlStateInput) Validate() error { |
| 1465 |
invalidParams := request.ErrInvalidParams{Context: "UpdateRoutingControlStateInput"} |
| 1466 |
if s.RoutingControlArn == nil { |
| 1467 |
invalidParams.Add(request.NewErrParamRequired("RoutingControlArn")) |
| 1468 |
} |
| 1469 |
if s.RoutingControlArn != nil && len(*s.RoutingControlArn) < 1 { |
| 1470 |
invalidParams.Add(request.NewErrParamMinLen("RoutingControlArn", 1)) |
| 1471 |
} |
| 1472 |
if s.RoutingControlState == nil { |
| 1473 |
invalidParams.Add(request.NewErrParamRequired("RoutingControlState")) |
| 1474 |
} |
| 1475 |
|
| 1476 |
if invalidParams.Len() > 0 { |
| 1477 |
return invalidParams |
| 1478 |
} |
| 1479 |
return nil |
| 1480 |
} |
| 1481 |
|
| 1482 |
// SetRoutingControlArn sets the RoutingControlArn field's value. |
| 1483 |
func (s *UpdateRoutingControlStateInput) SetRoutingControlArn(v string) *UpdateRoutingControlStateInput { |
| 1484 |
s.RoutingControlArn = &v |
| 1485 |
return s |
| 1486 |
} |
| 1487 |
|
| 1488 |
// SetRoutingControlState sets the RoutingControlState field's value. |
| 1489 |
func (s *UpdateRoutingControlStateInput) SetRoutingControlState(v string) *UpdateRoutingControlStateInput { |
| 1490 |
s.RoutingControlState = &v |
| 1491 |
return s |
| 1492 |
} |
| 1493 |
|
| 1494 |
// SetSafetyRulesToOverride sets the SafetyRulesToOverride field's value. |
| 1495 |
func (s *UpdateRoutingControlStateInput) SetSafetyRulesToOverride(v []*string) *UpdateRoutingControlStateInput { |
| 1496 |
s.SafetyRulesToOverride = v |
| 1497 |
return s |
| 1498 |
} |
| 1499 |
|
| 1500 |
type UpdateRoutingControlStateOutput struct { |
| 1501 |
_ struct{} `type:"structure"` |
| 1502 |
} |
| 1503 |
|
| 1504 |
// String returns the string representation. |
| 1505 |
// |
| 1506 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1507 |
// be included in the string output. The member name will be present, but the |
| 1508 |
// value will be replaced with "sensitive". |
| 1509 |
func (s UpdateRoutingControlStateOutput) String() string { |
| 1510 |
return awsutil.Prettify(s) |
| 1511 |
} |
| 1512 |
|
| 1513 |
// GoString returns the string representation. |
| 1514 |
// |
| 1515 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1516 |
// be included in the string output. The member name will be present, but the |
| 1517 |
// value will be replaced with "sensitive". |
| 1518 |
func (s UpdateRoutingControlStateOutput) GoString() string { |
| 1519 |
return s.String() |
| 1520 |
} |
| 1521 |
|
| 1522 |
type UpdateRoutingControlStatesInput struct { |
| 1523 |
_ struct{} `type:"structure"` |
| 1524 |
|
| 1525 |
// The Amazon Resource Names (ARNs) for the safety rules that you want to override |
| 1526 |
// when you're updating routing control states. You can override one safety |
| 1527 |
// rule or multiple safety rules by including one or more ARNs, separated by |
| 1528 |
// commas. |
| 1529 |
// |
| 1530 |
// For more information, see Override safety rules to reroute traffic (https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.override-safety-rule.html) |
| 1531 |
// in the Amazon Route 53 Application Recovery Controller Developer Guide. |
| 1532 |
SafetyRulesToOverride []*string `type:"list"` |
| 1533 |
|
| 1534 |
// A set of routing control entries that you want to update. |
| 1535 |
// |
| 1536 |
// UpdateRoutingControlStateEntries is a required field |
| 1537 |
UpdateRoutingControlStateEntries []*UpdateRoutingControlStateEntry `type:"list" required:"true"` |
| 1538 |
} |
| 1539 |
|
| 1540 |
// String returns the string representation. |
| 1541 |
// |
| 1542 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1543 |
// be included in the string output. The member name will be present, but the |
| 1544 |
// value will be replaced with "sensitive". |
| 1545 |
func (s UpdateRoutingControlStatesInput) String() string { |
| 1546 |
return awsutil.Prettify(s) |
| 1547 |
} |
| 1548 |
|
| 1549 |
// GoString returns the string representation. |
| 1550 |
// |
| 1551 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1552 |
// be included in the string output. The member name will be present, but the |
| 1553 |
// value will be replaced with "sensitive". |
| 1554 |
func (s UpdateRoutingControlStatesInput) GoString() string { |
| 1555 |
return s.String() |
| 1556 |
} |
| 1557 |
|
| 1558 |
// Validate inspects the fields of the type to determine if they are valid. |
| 1559 |
func (s *UpdateRoutingControlStatesInput) Validate() error { |
| 1560 |
invalidParams := request.ErrInvalidParams{Context: "UpdateRoutingControlStatesInput"} |
| 1561 |
if s.UpdateRoutingControlStateEntries == nil { |
| 1562 |
invalidParams.Add(request.NewErrParamRequired("UpdateRoutingControlStateEntries")) |
| 1563 |
} |
| 1564 |
if s.UpdateRoutingControlStateEntries != nil { |
| 1565 |
for i, v := range s.UpdateRoutingControlStateEntries { |
| 1566 |
if v == nil { |
| 1567 |
continue |
| 1568 |
} |
| 1569 |
if err := v.Validate(); err != nil { |
| 1570 |
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UpdateRoutingControlStateEntries", i), err.(request.ErrInvalidParams)) |
| 1571 |
} |
| 1572 |
} |
| 1573 |
} |
| 1574 |
|
| 1575 |
if invalidParams.Len() > 0 { |
| 1576 |
return invalidParams |
| 1577 |
} |
| 1578 |
return nil |
| 1579 |
} |
| 1580 |
|
| 1581 |
// SetSafetyRulesToOverride sets the SafetyRulesToOverride field's value. |
| 1582 |
func (s *UpdateRoutingControlStatesInput) SetSafetyRulesToOverride(v []*string) *UpdateRoutingControlStatesInput { |
| 1583 |
s.SafetyRulesToOverride = v |
| 1584 |
return s |
| 1585 |
} |
| 1586 |
|
| 1587 |
// SetUpdateRoutingControlStateEntries sets the UpdateRoutingControlStateEntries field's value. |
| 1588 |
func (s *UpdateRoutingControlStatesInput) SetUpdateRoutingControlStateEntries(v []*UpdateRoutingControlStateEntry) *UpdateRoutingControlStatesInput { |
| 1589 |
s.UpdateRoutingControlStateEntries = v |
| 1590 |
return s |
| 1591 |
} |
| 1592 |
|
| 1593 |
type UpdateRoutingControlStatesOutput struct { |
| 1594 |
_ struct{} `type:"structure"` |
| 1595 |
} |
| 1596 |
|
| 1597 |
// String returns the string representation. |
| 1598 |
// |
| 1599 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1600 |
// be included in the string output. The member name will be present, but the |
| 1601 |
// value will be replaced with "sensitive". |
| 1602 |
func (s UpdateRoutingControlStatesOutput) String() string { |
| 1603 |
return awsutil.Prettify(s) |
| 1604 |
} |
| 1605 |
|
| 1606 |
// GoString returns the string representation. |
| 1607 |
// |
| 1608 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1609 |
// be included in the string output. The member name will be present, but the |
| 1610 |
// value will be replaced with "sensitive". |
| 1611 |
func (s UpdateRoutingControlStatesOutput) GoString() string { |
| 1612 |
return s.String() |
| 1613 |
} |
| 1614 |
|
| 1615 |
// There was a validation error on the request. |
| 1616 |
type ValidationException struct { |
| 1617 |
_ struct{} `type:"structure"` |
| 1618 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 1619 |
|
| 1620 |
// The fields that caused the error, if applicable |
| 1621 |
Fields []*ValidationExceptionField `locationName:"fields" type:"list"` |
| 1622 |
|
| 1623 |
Message_ *string `locationName:"message" type:"string"` |
| 1624 |
|
| 1625 |
// Reason the request failed validation |
| 1626 |
Reason *string `locationName:"reason" type:"string" enum:"ValidationExceptionReason"` |
| 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 ValidationException) 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 ValidationException) GoString() string { |
| 1644 |
return s.String() |
| 1645 |
} |
| 1646 |
|
| 1647 |
func newErrorValidationException(v protocol.ResponseMetadata) error { |
| 1648 |
return &ValidationException{ |
| 1649 |
RespMetadata: v, |
| 1650 |
} |
| 1651 |
} |
| 1652 |
|
| 1653 |
// Code returns the exception type name. |
| 1654 |
func (s *ValidationException) Code() string { |
| 1655 |
return "ValidationException" |
| 1656 |
} |
| 1657 |
|
| 1658 |
// Message returns the exception's message. |
| 1659 |
func (s *ValidationException) Message() string { |
| 1660 |
if s.Message_ != nil { |
| 1661 |
return *s.Message_ |
| 1662 |
} |
| 1663 |
return "" |
| 1664 |
} |
| 1665 |
|
| 1666 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 1667 |
func (s *ValidationException) OrigErr() error { |
| 1668 |
return nil |
| 1669 |
} |
| 1670 |
|
| 1671 |
func (s *ValidationException) Error() string { |
| 1672 |
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) |
| 1673 |
} |
| 1674 |
|
| 1675 |
// Status code returns the HTTP status code for the request's response error. |
| 1676 |
func (s *ValidationException) StatusCode() int { |
| 1677 |
return s.RespMetadata.StatusCode |
| 1678 |
} |
| 1679 |
|
| 1680 |
// RequestID returns the service's response RequestID for request. |
| 1681 |
func (s *ValidationException) RequestID() string { |
| 1682 |
return s.RespMetadata.RequestID |
| 1683 |
} |
| 1684 |
|
| 1685 |
// There was a validation error on the request. |
| 1686 |
type ValidationExceptionField struct { |
| 1687 |
_ struct{} `type:"structure"` |
| 1688 |
|
| 1689 |
// Information about the validation exception. |
| 1690 |
// |
| 1691 |
// Message is a required field |
| 1692 |
Message *string `locationName:"message" type:"string" required:"true"` |
| 1693 |
|
| 1694 |
// The field that had the validation exception. |
| 1695 |
// |
| 1696 |
// Name is a required field |
| 1697 |
Name *string `locationName:"name" type:"string" required:"true"` |
| 1698 |
} |
| 1699 |
|
| 1700 |
// String returns the string representation. |
| 1701 |
// |
| 1702 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1703 |
// be included in the string output. The member name will be present, but the |
| 1704 |
// value will be replaced with "sensitive". |
| 1705 |
func (s ValidationExceptionField) String() string { |
| 1706 |
return awsutil.Prettify(s) |
| 1707 |
} |
| 1708 |
|
| 1709 |
// GoString returns the string representation. |
| 1710 |
// |
| 1711 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1712 |
// be included in the string output. The member name will be present, but the |
| 1713 |
// value will be replaced with "sensitive". |
| 1714 |
func (s ValidationExceptionField) GoString() string { |
| 1715 |
return s.String() |
| 1716 |
} |
| 1717 |
|
| 1718 |
// SetMessage sets the Message field's value. |
| 1719 |
func (s *ValidationExceptionField) SetMessage(v string) *ValidationExceptionField { |
| 1720 |
s.Message = &v |
| 1721 |
return s |
| 1722 |
} |
| 1723 |
|
| 1724 |
// SetName sets the Name field's value. |
| 1725 |
func (s *ValidationExceptionField) SetName(v string) *ValidationExceptionField { |
| 1726 |
s.Name = &v |
| 1727 |
return s |
| 1728 |
} |
| 1729 |
|
| 1730 |
const ( |
| 1731 |
// RoutingControlStateOn is a RoutingControlState enum value |
| 1732 |
RoutingControlStateOn = "On" |
| 1733 |
|
| 1734 |
// RoutingControlStateOff is a RoutingControlState enum value |
| 1735 |
RoutingControlStateOff = "Off" |
| 1736 |
) |
| 1737 |
|
| 1738 |
// RoutingControlState_Values returns all elements of the RoutingControlState enum |
| 1739 |
func RoutingControlState_Values() []string { |
| 1740 |
return []string{ |
| 1741 |
RoutingControlStateOn, |
| 1742 |
RoutingControlStateOff, |
| 1743 |
} |
| 1744 |
} |
| 1745 |
|
| 1746 |
// Reason the request failed validation |
| 1747 |
const ( |
| 1748 |
// ValidationExceptionReasonUnknownOperation is a ValidationExceptionReason enum value |
| 1749 |
ValidationExceptionReasonUnknownOperation = "unknownOperation" |
| 1750 |
|
| 1751 |
// ValidationExceptionReasonCannotParse is a ValidationExceptionReason enum value |
| 1752 |
ValidationExceptionReasonCannotParse = "cannotParse" |
| 1753 |
|
| 1754 |
// ValidationExceptionReasonFieldValidationFailed is a ValidationExceptionReason enum value |
| 1755 |
ValidationExceptionReasonFieldValidationFailed = "fieldValidationFailed" |
| 1756 |
|
| 1757 |
// ValidationExceptionReasonOther is a ValidationExceptionReason enum value |
| 1758 |
ValidationExceptionReasonOther = "other" |
| 1759 |
) |
| 1760 |
|
| 1761 |
// ValidationExceptionReason_Values returns all elements of the ValidationExceptionReason enum |
| 1762 |
func ValidationExceptionReason_Values() []string { |
| 1763 |
return []string{ |
| 1764 |
ValidationExceptionReasonUnknownOperation, |
| 1765 |
ValidationExceptionReasonCannotParse, |
| 1766 |
ValidationExceptionReasonFieldValidationFailed, |
| 1767 |
ValidationExceptionReasonOther, |
| 1768 |
} |
| 1769 |
} |