github.com/aavshr/aws-sdk-go@v1.41.3/service/autoscalingplans/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package autoscalingplans 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc" 14 ) 15 16 const opCreateScalingPlan = "CreateScalingPlan" 17 18 // CreateScalingPlanRequest generates a "aws/request.Request" representing the 19 // client's request for the CreateScalingPlan operation. The "output" return 20 // value will be populated with the request's response once the request completes 21 // successfully. 22 // 23 // Use "Send" method on the returned Request to send the API call to the service. 24 // the "output" return value is not valid until after Send returns without error. 25 // 26 // See CreateScalingPlan for more information on using the CreateScalingPlan 27 // API call, and error handling. 28 // 29 // This method is useful when you want to inject custom logic or configuration 30 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 31 // 32 // 33 // // Example sending a request using the CreateScalingPlanRequest method. 34 // req, resp := client.CreateScalingPlanRequest(params) 35 // 36 // err := req.Send() 37 // if err == nil { // resp is now filled 38 // fmt.Println(resp) 39 // } 40 // 41 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/CreateScalingPlan 42 func (c *AutoScalingPlans) CreateScalingPlanRequest(input *CreateScalingPlanInput) (req *request.Request, output *CreateScalingPlanOutput) { 43 op := &request.Operation{ 44 Name: opCreateScalingPlan, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CreateScalingPlanInput{} 51 } 52 53 output = &CreateScalingPlanOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // CreateScalingPlan API operation for AWS Auto Scaling Plans. 59 // 60 // Creates a scaling plan. 61 // 62 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 63 // with awserr.Error's Code and Message methods to get detailed information about 64 // the error. 65 // 66 // See the AWS API reference guide for AWS Auto Scaling Plans's 67 // API operation CreateScalingPlan for usage and error information. 68 // 69 // Returned Error Types: 70 // * ValidationException 71 // An exception was thrown for a validation issue. Review the parameters provided. 72 // 73 // * LimitExceededException 74 // Your account exceeded a limit. This exception is thrown when a per-account 75 // resource limit is exceeded. 76 // 77 // * ConcurrentUpdateException 78 // Concurrent updates caused an exception, for example, if you request an update 79 // to a scaling plan that already has a pending update. 80 // 81 // * InternalServiceException 82 // The service encountered an internal error. 83 // 84 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/CreateScalingPlan 85 func (c *AutoScalingPlans) CreateScalingPlan(input *CreateScalingPlanInput) (*CreateScalingPlanOutput, error) { 86 req, out := c.CreateScalingPlanRequest(input) 87 return out, req.Send() 88 } 89 90 // CreateScalingPlanWithContext is the same as CreateScalingPlan with the addition of 91 // the ability to pass a context and additional request options. 92 // 93 // See CreateScalingPlan for details on how to use this API operation. 94 // 95 // The context must be non-nil and will be used for request cancellation. If 96 // the context is nil a panic will occur. In the future the SDK may create 97 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 98 // for more information on using Contexts. 99 func (c *AutoScalingPlans) CreateScalingPlanWithContext(ctx aws.Context, input *CreateScalingPlanInput, opts ...request.Option) (*CreateScalingPlanOutput, error) { 100 req, out := c.CreateScalingPlanRequest(input) 101 req.SetContext(ctx) 102 req.ApplyOptions(opts...) 103 return out, req.Send() 104 } 105 106 const opDeleteScalingPlan = "DeleteScalingPlan" 107 108 // DeleteScalingPlanRequest generates a "aws/request.Request" representing the 109 // client's request for the DeleteScalingPlan operation. The "output" return 110 // value will be populated with the request's response once the request completes 111 // successfully. 112 // 113 // Use "Send" method on the returned Request to send the API call to the service. 114 // the "output" return value is not valid until after Send returns without error. 115 // 116 // See DeleteScalingPlan for more information on using the DeleteScalingPlan 117 // API call, and error handling. 118 // 119 // This method is useful when you want to inject custom logic or configuration 120 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 121 // 122 // 123 // // Example sending a request using the DeleteScalingPlanRequest method. 124 // req, resp := client.DeleteScalingPlanRequest(params) 125 // 126 // err := req.Send() 127 // if err == nil { // resp is now filled 128 // fmt.Println(resp) 129 // } 130 // 131 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DeleteScalingPlan 132 func (c *AutoScalingPlans) DeleteScalingPlanRequest(input *DeleteScalingPlanInput) (req *request.Request, output *DeleteScalingPlanOutput) { 133 op := &request.Operation{ 134 Name: opDeleteScalingPlan, 135 HTTPMethod: "POST", 136 HTTPPath: "/", 137 } 138 139 if input == nil { 140 input = &DeleteScalingPlanInput{} 141 } 142 143 output = &DeleteScalingPlanOutput{} 144 req = c.newRequest(op, input, output) 145 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 146 return 147 } 148 149 // DeleteScalingPlan API operation for AWS Auto Scaling Plans. 150 // 151 // Deletes the specified scaling plan. 152 // 153 // Deleting a scaling plan deletes the underlying ScalingInstruction for all 154 // of the scalable resources that are covered by the plan. 155 // 156 // If the plan has launched resources or has scaling activities in progress, 157 // you must delete those resources separately. 158 // 159 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 160 // with awserr.Error's Code and Message methods to get detailed information about 161 // the error. 162 // 163 // See the AWS API reference guide for AWS Auto Scaling Plans's 164 // API operation DeleteScalingPlan for usage and error information. 165 // 166 // Returned Error Types: 167 // * ValidationException 168 // An exception was thrown for a validation issue. Review the parameters provided. 169 // 170 // * ObjectNotFoundException 171 // The specified object could not be found. 172 // 173 // * ConcurrentUpdateException 174 // Concurrent updates caused an exception, for example, if you request an update 175 // to a scaling plan that already has a pending update. 176 // 177 // * InternalServiceException 178 // The service encountered an internal error. 179 // 180 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DeleteScalingPlan 181 func (c *AutoScalingPlans) DeleteScalingPlan(input *DeleteScalingPlanInput) (*DeleteScalingPlanOutput, error) { 182 req, out := c.DeleteScalingPlanRequest(input) 183 return out, req.Send() 184 } 185 186 // DeleteScalingPlanWithContext is the same as DeleteScalingPlan with the addition of 187 // the ability to pass a context and additional request options. 188 // 189 // See DeleteScalingPlan for details on how to use this API operation. 190 // 191 // The context must be non-nil and will be used for request cancellation. If 192 // the context is nil a panic will occur. In the future the SDK may create 193 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 194 // for more information on using Contexts. 195 func (c *AutoScalingPlans) DeleteScalingPlanWithContext(ctx aws.Context, input *DeleteScalingPlanInput, opts ...request.Option) (*DeleteScalingPlanOutput, error) { 196 req, out := c.DeleteScalingPlanRequest(input) 197 req.SetContext(ctx) 198 req.ApplyOptions(opts...) 199 return out, req.Send() 200 } 201 202 const opDescribeScalingPlanResources = "DescribeScalingPlanResources" 203 204 // DescribeScalingPlanResourcesRequest generates a "aws/request.Request" representing the 205 // client's request for the DescribeScalingPlanResources operation. The "output" return 206 // value will be populated with the request's response once the request completes 207 // successfully. 208 // 209 // Use "Send" method on the returned Request to send the API call to the service. 210 // the "output" return value is not valid until after Send returns without error. 211 // 212 // See DescribeScalingPlanResources for more information on using the DescribeScalingPlanResources 213 // API call, and error handling. 214 // 215 // This method is useful when you want to inject custom logic or configuration 216 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 217 // 218 // 219 // // Example sending a request using the DescribeScalingPlanResourcesRequest method. 220 // req, resp := client.DescribeScalingPlanResourcesRequest(params) 221 // 222 // err := req.Send() 223 // if err == nil { // resp is now filled 224 // fmt.Println(resp) 225 // } 226 // 227 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlanResources 228 func (c *AutoScalingPlans) DescribeScalingPlanResourcesRequest(input *DescribeScalingPlanResourcesInput) (req *request.Request, output *DescribeScalingPlanResourcesOutput) { 229 op := &request.Operation{ 230 Name: opDescribeScalingPlanResources, 231 HTTPMethod: "POST", 232 HTTPPath: "/", 233 } 234 235 if input == nil { 236 input = &DescribeScalingPlanResourcesInput{} 237 } 238 239 output = &DescribeScalingPlanResourcesOutput{} 240 req = c.newRequest(op, input, output) 241 return 242 } 243 244 // DescribeScalingPlanResources API operation for AWS Auto Scaling Plans. 245 // 246 // Describes the scalable resources in the specified scaling plan. 247 // 248 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 249 // with awserr.Error's Code and Message methods to get detailed information about 250 // the error. 251 // 252 // See the AWS API reference guide for AWS Auto Scaling Plans's 253 // API operation DescribeScalingPlanResources for usage and error information. 254 // 255 // Returned Error Types: 256 // * ValidationException 257 // An exception was thrown for a validation issue. Review the parameters provided. 258 // 259 // * InvalidNextTokenException 260 // The token provided is not valid. 261 // 262 // * ConcurrentUpdateException 263 // Concurrent updates caused an exception, for example, if you request an update 264 // to a scaling plan that already has a pending update. 265 // 266 // * InternalServiceException 267 // The service encountered an internal error. 268 // 269 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlanResources 270 func (c *AutoScalingPlans) DescribeScalingPlanResources(input *DescribeScalingPlanResourcesInput) (*DescribeScalingPlanResourcesOutput, error) { 271 req, out := c.DescribeScalingPlanResourcesRequest(input) 272 return out, req.Send() 273 } 274 275 // DescribeScalingPlanResourcesWithContext is the same as DescribeScalingPlanResources with the addition of 276 // the ability to pass a context and additional request options. 277 // 278 // See DescribeScalingPlanResources for details on how to use this API operation. 279 // 280 // The context must be non-nil and will be used for request cancellation. If 281 // the context is nil a panic will occur. In the future the SDK may create 282 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 283 // for more information on using Contexts. 284 func (c *AutoScalingPlans) DescribeScalingPlanResourcesWithContext(ctx aws.Context, input *DescribeScalingPlanResourcesInput, opts ...request.Option) (*DescribeScalingPlanResourcesOutput, error) { 285 req, out := c.DescribeScalingPlanResourcesRequest(input) 286 req.SetContext(ctx) 287 req.ApplyOptions(opts...) 288 return out, req.Send() 289 } 290 291 const opDescribeScalingPlans = "DescribeScalingPlans" 292 293 // DescribeScalingPlansRequest generates a "aws/request.Request" representing the 294 // client's request for the DescribeScalingPlans operation. The "output" return 295 // value will be populated with the request's response once the request completes 296 // successfully. 297 // 298 // Use "Send" method on the returned Request to send the API call to the service. 299 // the "output" return value is not valid until after Send returns without error. 300 // 301 // See DescribeScalingPlans for more information on using the DescribeScalingPlans 302 // API call, and error handling. 303 // 304 // This method is useful when you want to inject custom logic or configuration 305 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 306 // 307 // 308 // // Example sending a request using the DescribeScalingPlansRequest method. 309 // req, resp := client.DescribeScalingPlansRequest(params) 310 // 311 // err := req.Send() 312 // if err == nil { // resp is now filled 313 // fmt.Println(resp) 314 // } 315 // 316 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlans 317 func (c *AutoScalingPlans) DescribeScalingPlansRequest(input *DescribeScalingPlansInput) (req *request.Request, output *DescribeScalingPlansOutput) { 318 op := &request.Operation{ 319 Name: opDescribeScalingPlans, 320 HTTPMethod: "POST", 321 HTTPPath: "/", 322 } 323 324 if input == nil { 325 input = &DescribeScalingPlansInput{} 326 } 327 328 output = &DescribeScalingPlansOutput{} 329 req = c.newRequest(op, input, output) 330 return 331 } 332 333 // DescribeScalingPlans API operation for AWS Auto Scaling Plans. 334 // 335 // Describes one or more of your scaling plans. 336 // 337 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 338 // with awserr.Error's Code and Message methods to get detailed information about 339 // the error. 340 // 341 // See the AWS API reference guide for AWS Auto Scaling Plans's 342 // API operation DescribeScalingPlans for usage and error information. 343 // 344 // Returned Error Types: 345 // * ValidationException 346 // An exception was thrown for a validation issue. Review the parameters provided. 347 // 348 // * InvalidNextTokenException 349 // The token provided is not valid. 350 // 351 // * ConcurrentUpdateException 352 // Concurrent updates caused an exception, for example, if you request an update 353 // to a scaling plan that already has a pending update. 354 // 355 // * InternalServiceException 356 // The service encountered an internal error. 357 // 358 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlans 359 func (c *AutoScalingPlans) DescribeScalingPlans(input *DescribeScalingPlansInput) (*DescribeScalingPlansOutput, error) { 360 req, out := c.DescribeScalingPlansRequest(input) 361 return out, req.Send() 362 } 363 364 // DescribeScalingPlansWithContext is the same as DescribeScalingPlans with the addition of 365 // the ability to pass a context and additional request options. 366 // 367 // See DescribeScalingPlans for details on how to use this API operation. 368 // 369 // The context must be non-nil and will be used for request cancellation. If 370 // the context is nil a panic will occur. In the future the SDK may create 371 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 372 // for more information on using Contexts. 373 func (c *AutoScalingPlans) DescribeScalingPlansWithContext(ctx aws.Context, input *DescribeScalingPlansInput, opts ...request.Option) (*DescribeScalingPlansOutput, error) { 374 req, out := c.DescribeScalingPlansRequest(input) 375 req.SetContext(ctx) 376 req.ApplyOptions(opts...) 377 return out, req.Send() 378 } 379 380 const opGetScalingPlanResourceForecastData = "GetScalingPlanResourceForecastData" 381 382 // GetScalingPlanResourceForecastDataRequest generates a "aws/request.Request" representing the 383 // client's request for the GetScalingPlanResourceForecastData operation. The "output" return 384 // value will be populated with the request's response once the request completes 385 // successfully. 386 // 387 // Use "Send" method on the returned Request to send the API call to the service. 388 // the "output" return value is not valid until after Send returns without error. 389 // 390 // See GetScalingPlanResourceForecastData for more information on using the GetScalingPlanResourceForecastData 391 // API call, and error handling. 392 // 393 // This method is useful when you want to inject custom logic or configuration 394 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 395 // 396 // 397 // // Example sending a request using the GetScalingPlanResourceForecastDataRequest method. 398 // req, resp := client.GetScalingPlanResourceForecastDataRequest(params) 399 // 400 // err := req.Send() 401 // if err == nil { // resp is now filled 402 // fmt.Println(resp) 403 // } 404 // 405 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/GetScalingPlanResourceForecastData 406 func (c *AutoScalingPlans) GetScalingPlanResourceForecastDataRequest(input *GetScalingPlanResourceForecastDataInput) (req *request.Request, output *GetScalingPlanResourceForecastDataOutput) { 407 op := &request.Operation{ 408 Name: opGetScalingPlanResourceForecastData, 409 HTTPMethod: "POST", 410 HTTPPath: "/", 411 } 412 413 if input == nil { 414 input = &GetScalingPlanResourceForecastDataInput{} 415 } 416 417 output = &GetScalingPlanResourceForecastDataOutput{} 418 req = c.newRequest(op, input, output) 419 return 420 } 421 422 // GetScalingPlanResourceForecastData API operation for AWS Auto Scaling Plans. 423 // 424 // Retrieves the forecast data for a scalable resource. 425 // 426 // Capacity forecasts are represented as predicted values, or data points, that 427 // are calculated using historical data points from a specified CloudWatch load 428 // metric. Data points are available for up to 56 days. 429 // 430 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 431 // with awserr.Error's Code and Message methods to get detailed information about 432 // the error. 433 // 434 // See the AWS API reference guide for AWS Auto Scaling Plans's 435 // API operation GetScalingPlanResourceForecastData for usage and error information. 436 // 437 // Returned Error Types: 438 // * ValidationException 439 // An exception was thrown for a validation issue. Review the parameters provided. 440 // 441 // * InternalServiceException 442 // The service encountered an internal error. 443 // 444 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/GetScalingPlanResourceForecastData 445 func (c *AutoScalingPlans) GetScalingPlanResourceForecastData(input *GetScalingPlanResourceForecastDataInput) (*GetScalingPlanResourceForecastDataOutput, error) { 446 req, out := c.GetScalingPlanResourceForecastDataRequest(input) 447 return out, req.Send() 448 } 449 450 // GetScalingPlanResourceForecastDataWithContext is the same as GetScalingPlanResourceForecastData with the addition of 451 // the ability to pass a context and additional request options. 452 // 453 // See GetScalingPlanResourceForecastData for details on how to use this API operation. 454 // 455 // The context must be non-nil and will be used for request cancellation. If 456 // the context is nil a panic will occur. In the future the SDK may create 457 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 458 // for more information on using Contexts. 459 func (c *AutoScalingPlans) GetScalingPlanResourceForecastDataWithContext(ctx aws.Context, input *GetScalingPlanResourceForecastDataInput, opts ...request.Option) (*GetScalingPlanResourceForecastDataOutput, error) { 460 req, out := c.GetScalingPlanResourceForecastDataRequest(input) 461 req.SetContext(ctx) 462 req.ApplyOptions(opts...) 463 return out, req.Send() 464 } 465 466 const opUpdateScalingPlan = "UpdateScalingPlan" 467 468 // UpdateScalingPlanRequest generates a "aws/request.Request" representing the 469 // client's request for the UpdateScalingPlan operation. The "output" return 470 // value will be populated with the request's response once the request completes 471 // successfully. 472 // 473 // Use "Send" method on the returned Request to send the API call to the service. 474 // the "output" return value is not valid until after Send returns without error. 475 // 476 // See UpdateScalingPlan for more information on using the UpdateScalingPlan 477 // API call, and error handling. 478 // 479 // This method is useful when you want to inject custom logic or configuration 480 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 481 // 482 // 483 // // Example sending a request using the UpdateScalingPlanRequest method. 484 // req, resp := client.UpdateScalingPlanRequest(params) 485 // 486 // err := req.Send() 487 // if err == nil { // resp is now filled 488 // fmt.Println(resp) 489 // } 490 // 491 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/UpdateScalingPlan 492 func (c *AutoScalingPlans) UpdateScalingPlanRequest(input *UpdateScalingPlanInput) (req *request.Request, output *UpdateScalingPlanOutput) { 493 op := &request.Operation{ 494 Name: opUpdateScalingPlan, 495 HTTPMethod: "POST", 496 HTTPPath: "/", 497 } 498 499 if input == nil { 500 input = &UpdateScalingPlanInput{} 501 } 502 503 output = &UpdateScalingPlanOutput{} 504 req = c.newRequest(op, input, output) 505 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 506 return 507 } 508 509 // UpdateScalingPlan API operation for AWS Auto Scaling Plans. 510 // 511 // Updates the specified scaling plan. 512 // 513 // You cannot update a scaling plan if it is in the process of being created, 514 // updated, or deleted. 515 // 516 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 517 // with awserr.Error's Code and Message methods to get detailed information about 518 // the error. 519 // 520 // See the AWS API reference guide for AWS Auto Scaling Plans's 521 // API operation UpdateScalingPlan for usage and error information. 522 // 523 // Returned Error Types: 524 // * ValidationException 525 // An exception was thrown for a validation issue. Review the parameters provided. 526 // 527 // * ConcurrentUpdateException 528 // Concurrent updates caused an exception, for example, if you request an update 529 // to a scaling plan that already has a pending update. 530 // 531 // * InternalServiceException 532 // The service encountered an internal error. 533 // 534 // * ObjectNotFoundException 535 // The specified object could not be found. 536 // 537 // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/UpdateScalingPlan 538 func (c *AutoScalingPlans) UpdateScalingPlan(input *UpdateScalingPlanInput) (*UpdateScalingPlanOutput, error) { 539 req, out := c.UpdateScalingPlanRequest(input) 540 return out, req.Send() 541 } 542 543 // UpdateScalingPlanWithContext is the same as UpdateScalingPlan with the addition of 544 // the ability to pass a context and additional request options. 545 // 546 // See UpdateScalingPlan for details on how to use this API operation. 547 // 548 // The context must be non-nil and will be used for request cancellation. If 549 // the context is nil a panic will occur. In the future the SDK may create 550 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 551 // for more information on using Contexts. 552 func (c *AutoScalingPlans) UpdateScalingPlanWithContext(ctx aws.Context, input *UpdateScalingPlanInput, opts ...request.Option) (*UpdateScalingPlanOutput, error) { 553 req, out := c.UpdateScalingPlanRequest(input) 554 req.SetContext(ctx) 555 req.ApplyOptions(opts...) 556 return out, req.Send() 557 } 558 559 // Represents an application source. 560 type ApplicationSource struct { 561 _ struct{} `type:"structure"` 562 563 // The Amazon Resource Name (ARN) of a AWS CloudFormation stack. 564 CloudFormationStackARN *string `type:"string"` 565 566 // A set of tags (up to 50). 567 TagFilters []*TagFilter `type:"list"` 568 } 569 570 // String returns the string representation. 571 // 572 // API parameter values that are decorated as "sensitive" in the API will not 573 // be included in the string output. The member name will be present, but the 574 // value will be replaced with "sensitive". 575 func (s ApplicationSource) String() string { 576 return awsutil.Prettify(s) 577 } 578 579 // GoString returns the string representation. 580 // 581 // API parameter values that are decorated as "sensitive" in the API will not 582 // be included in the string output. The member name will be present, but the 583 // value will be replaced with "sensitive". 584 func (s ApplicationSource) GoString() string { 585 return s.String() 586 } 587 588 // Validate inspects the fields of the type to determine if they are valid. 589 func (s *ApplicationSource) Validate() error { 590 invalidParams := request.ErrInvalidParams{Context: "ApplicationSource"} 591 if s.TagFilters != nil { 592 for i, v := range s.TagFilters { 593 if v == nil { 594 continue 595 } 596 if err := v.Validate(); err != nil { 597 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagFilters", i), err.(request.ErrInvalidParams)) 598 } 599 } 600 } 601 602 if invalidParams.Len() > 0 { 603 return invalidParams 604 } 605 return nil 606 } 607 608 // SetCloudFormationStackARN sets the CloudFormationStackARN field's value. 609 func (s *ApplicationSource) SetCloudFormationStackARN(v string) *ApplicationSource { 610 s.CloudFormationStackARN = &v 611 return s 612 } 613 614 // SetTagFilters sets the TagFilters field's value. 615 func (s *ApplicationSource) SetTagFilters(v []*TagFilter) *ApplicationSource { 616 s.TagFilters = v 617 return s 618 } 619 620 // Concurrent updates caused an exception, for example, if you request an update 621 // to a scaling plan that already has a pending update. 622 type ConcurrentUpdateException struct { 623 _ struct{} `type:"structure"` 624 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 625 626 Message_ *string `locationName:"Message" type:"string"` 627 } 628 629 // String returns the string representation. 630 // 631 // API parameter values that are decorated as "sensitive" in the API will not 632 // be included in the string output. The member name will be present, but the 633 // value will be replaced with "sensitive". 634 func (s ConcurrentUpdateException) String() string { 635 return awsutil.Prettify(s) 636 } 637 638 // GoString returns the string representation. 639 // 640 // API parameter values that are decorated as "sensitive" in the API will not 641 // be included in the string output. The member name will be present, but the 642 // value will be replaced with "sensitive". 643 func (s ConcurrentUpdateException) GoString() string { 644 return s.String() 645 } 646 647 func newErrorConcurrentUpdateException(v protocol.ResponseMetadata) error { 648 return &ConcurrentUpdateException{ 649 RespMetadata: v, 650 } 651 } 652 653 // Code returns the exception type name. 654 func (s *ConcurrentUpdateException) Code() string { 655 return "ConcurrentUpdateException" 656 } 657 658 // Message returns the exception's message. 659 func (s *ConcurrentUpdateException) Message() string { 660 if s.Message_ != nil { 661 return *s.Message_ 662 } 663 return "" 664 } 665 666 // OrigErr always returns nil, satisfies awserr.Error interface. 667 func (s *ConcurrentUpdateException) OrigErr() error { 668 return nil 669 } 670 671 func (s *ConcurrentUpdateException) Error() string { 672 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 673 } 674 675 // Status code returns the HTTP status code for the request's response error. 676 func (s *ConcurrentUpdateException) StatusCode() int { 677 return s.RespMetadata.StatusCode 678 } 679 680 // RequestID returns the service's response RequestID for request. 681 func (s *ConcurrentUpdateException) RequestID() string { 682 return s.RespMetadata.RequestID 683 } 684 685 type CreateScalingPlanInput struct { 686 _ struct{} `type:"structure"` 687 688 // A CloudFormation stack or set of tags. You can create one scaling plan per 689 // application source. 690 // 691 // For more information, see ApplicationSource (https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ApplicationSource.html) 692 // in the AWS Auto Scaling API Reference. 693 // 694 // ApplicationSource is a required field 695 ApplicationSource *ApplicationSource `type:"structure" required:"true"` 696 697 // The scaling instructions. 698 // 699 // For more information, see ScalingInstruction (https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html) 700 // in the AWS Auto Scaling API Reference. 701 // 702 // ScalingInstructions is a required field 703 ScalingInstructions []*ScalingInstruction `type:"list" required:"true"` 704 705 // The name of the scaling plan. Names cannot contain vertical bars, colons, 706 // or forward slashes. 707 // 708 // ScalingPlanName is a required field 709 ScalingPlanName *string `min:"1" type:"string" required:"true"` 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 CreateScalingPlanInput) 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 CreateScalingPlanInput) GoString() string { 727 return s.String() 728 } 729 730 // Validate inspects the fields of the type to determine if they are valid. 731 func (s *CreateScalingPlanInput) Validate() error { 732 invalidParams := request.ErrInvalidParams{Context: "CreateScalingPlanInput"} 733 if s.ApplicationSource == nil { 734 invalidParams.Add(request.NewErrParamRequired("ApplicationSource")) 735 } 736 if s.ScalingInstructions == nil { 737 invalidParams.Add(request.NewErrParamRequired("ScalingInstructions")) 738 } 739 if s.ScalingPlanName == nil { 740 invalidParams.Add(request.NewErrParamRequired("ScalingPlanName")) 741 } 742 if s.ScalingPlanName != nil && len(*s.ScalingPlanName) < 1 { 743 invalidParams.Add(request.NewErrParamMinLen("ScalingPlanName", 1)) 744 } 745 if s.ApplicationSource != nil { 746 if err := s.ApplicationSource.Validate(); err != nil { 747 invalidParams.AddNested("ApplicationSource", err.(request.ErrInvalidParams)) 748 } 749 } 750 if s.ScalingInstructions != nil { 751 for i, v := range s.ScalingInstructions { 752 if v == nil { 753 continue 754 } 755 if err := v.Validate(); err != nil { 756 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScalingInstructions", i), err.(request.ErrInvalidParams)) 757 } 758 } 759 } 760 761 if invalidParams.Len() > 0 { 762 return invalidParams 763 } 764 return nil 765 } 766 767 // SetApplicationSource sets the ApplicationSource field's value. 768 func (s *CreateScalingPlanInput) SetApplicationSource(v *ApplicationSource) *CreateScalingPlanInput { 769 s.ApplicationSource = v 770 return s 771 } 772 773 // SetScalingInstructions sets the ScalingInstructions field's value. 774 func (s *CreateScalingPlanInput) SetScalingInstructions(v []*ScalingInstruction) *CreateScalingPlanInput { 775 s.ScalingInstructions = v 776 return s 777 } 778 779 // SetScalingPlanName sets the ScalingPlanName field's value. 780 func (s *CreateScalingPlanInput) SetScalingPlanName(v string) *CreateScalingPlanInput { 781 s.ScalingPlanName = &v 782 return s 783 } 784 785 type CreateScalingPlanOutput struct { 786 _ struct{} `type:"structure"` 787 788 // The version number of the scaling plan. This value is always 1. Currently, 789 // you cannot have multiple scaling plan versions. 790 // 791 // ScalingPlanVersion is a required field 792 ScalingPlanVersion *int64 `type:"long" required:"true"` 793 } 794 795 // String returns the string representation. 796 // 797 // API parameter values that are decorated as "sensitive" in the API will not 798 // be included in the string output. The member name will be present, but the 799 // value will be replaced with "sensitive". 800 func (s CreateScalingPlanOutput) String() string { 801 return awsutil.Prettify(s) 802 } 803 804 // GoString returns the string representation. 805 // 806 // API parameter values that are decorated as "sensitive" in the API will not 807 // be included in the string output. The member name will be present, but the 808 // value will be replaced with "sensitive". 809 func (s CreateScalingPlanOutput) GoString() string { 810 return s.String() 811 } 812 813 // SetScalingPlanVersion sets the ScalingPlanVersion field's value. 814 func (s *CreateScalingPlanOutput) SetScalingPlanVersion(v int64) *CreateScalingPlanOutput { 815 s.ScalingPlanVersion = &v 816 return s 817 } 818 819 // Represents a CloudWatch metric of your choosing that can be used for predictive 820 // scaling. 821 // 822 // For predictive scaling to work with a customized load metric specification, 823 // AWS Auto Scaling needs access to the Sum and Average statistics that CloudWatch 824 // computes from metric data. 825 // 826 // When you choose a load metric, make sure that the required Sum and Average 827 // statistics for your metric are available in CloudWatch and that they provide 828 // relevant data for predictive scaling. The Sum statistic must represent the 829 // total load on the resource, and the Average statistic must represent the 830 // average load per capacity unit of the resource. For example, there is a metric 831 // that counts the number of requests processed by your Auto Scaling group. 832 // If the Sum statistic represents the total request count processed by the 833 // group, then the Average statistic for the specified metric must represent 834 // the average request count processed by each instance of the group. 835 // 836 // If you publish your own metrics, you can aggregate the data points at a given 837 // interval and then publish the aggregated data points to CloudWatch. Before 838 // AWS Auto Scaling generates the forecast, it sums up all the metric data points 839 // that occurred within each hour to match the granularity period that is used 840 // in the forecast (60 minutes). 841 // 842 // For information about terminology, available metrics, or how to publish new 843 // metrics, see Amazon CloudWatch Concepts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html) 844 // in the Amazon CloudWatch User Guide. 845 // 846 // After creating your scaling plan, you can use the AWS Auto Scaling console 847 // to visualize forecasts for the specified metric. For more information, see 848 // View Scaling Information for a Resource (https://docs.aws.amazon.com/autoscaling/plans/userguide/gs-create-scaling-plan.html#gs-view-resource) 849 // in the AWS Auto Scaling User Guide. 850 type CustomizedLoadMetricSpecification struct { 851 _ struct{} `type:"structure"` 852 853 // The dimensions of the metric. 854 // 855 // Conditional: If you published your metric with dimensions, you must specify 856 // the same dimensions in your customized load metric specification. 857 Dimensions []*MetricDimension `type:"list"` 858 859 // The name of the metric. 860 // 861 // MetricName is a required field 862 MetricName *string `type:"string" required:"true"` 863 864 // The namespace of the metric. 865 // 866 // Namespace is a required field 867 Namespace *string `type:"string" required:"true"` 868 869 // The statistic of the metric. The only valid value is Sum. 870 // 871 // Statistic is a required field 872 Statistic *string `type:"string" required:"true" enum:"MetricStatistic"` 873 874 // The unit of the metric. 875 Unit *string `type:"string"` 876 } 877 878 // String returns the string representation. 879 // 880 // API parameter values that are decorated as "sensitive" in the API will not 881 // be included in the string output. The member name will be present, but the 882 // value will be replaced with "sensitive". 883 func (s CustomizedLoadMetricSpecification) String() string { 884 return awsutil.Prettify(s) 885 } 886 887 // GoString returns the string representation. 888 // 889 // API parameter values that are decorated as "sensitive" in the API will not 890 // be included in the string output. The member name will be present, but the 891 // value will be replaced with "sensitive". 892 func (s CustomizedLoadMetricSpecification) GoString() string { 893 return s.String() 894 } 895 896 // Validate inspects the fields of the type to determine if they are valid. 897 func (s *CustomizedLoadMetricSpecification) Validate() error { 898 invalidParams := request.ErrInvalidParams{Context: "CustomizedLoadMetricSpecification"} 899 if s.MetricName == nil { 900 invalidParams.Add(request.NewErrParamRequired("MetricName")) 901 } 902 if s.Namespace == nil { 903 invalidParams.Add(request.NewErrParamRequired("Namespace")) 904 } 905 if s.Statistic == nil { 906 invalidParams.Add(request.NewErrParamRequired("Statistic")) 907 } 908 if s.Dimensions != nil { 909 for i, v := range s.Dimensions { 910 if v == nil { 911 continue 912 } 913 if err := v.Validate(); err != nil { 914 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 915 } 916 } 917 } 918 919 if invalidParams.Len() > 0 { 920 return invalidParams 921 } 922 return nil 923 } 924 925 // SetDimensions sets the Dimensions field's value. 926 func (s *CustomizedLoadMetricSpecification) SetDimensions(v []*MetricDimension) *CustomizedLoadMetricSpecification { 927 s.Dimensions = v 928 return s 929 } 930 931 // SetMetricName sets the MetricName field's value. 932 func (s *CustomizedLoadMetricSpecification) SetMetricName(v string) *CustomizedLoadMetricSpecification { 933 s.MetricName = &v 934 return s 935 } 936 937 // SetNamespace sets the Namespace field's value. 938 func (s *CustomizedLoadMetricSpecification) SetNamespace(v string) *CustomizedLoadMetricSpecification { 939 s.Namespace = &v 940 return s 941 } 942 943 // SetStatistic sets the Statistic field's value. 944 func (s *CustomizedLoadMetricSpecification) SetStatistic(v string) *CustomizedLoadMetricSpecification { 945 s.Statistic = &v 946 return s 947 } 948 949 // SetUnit sets the Unit field's value. 950 func (s *CustomizedLoadMetricSpecification) SetUnit(v string) *CustomizedLoadMetricSpecification { 951 s.Unit = &v 952 return s 953 } 954 955 // Represents a CloudWatch metric of your choosing that can be used for dynamic 956 // scaling as part of a target tracking scaling policy. 957 // 958 // To create your customized scaling metric specification: 959 // 960 // * Add values for each required parameter from CloudWatch. You can use 961 // an existing metric, or a new metric that you create. To use your own metric, 962 // you must first publish the metric to CloudWatch. For more information, 963 // see Publish Custom Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html) 964 // in the Amazon CloudWatch User Guide. 965 // 966 // * Choose a metric that changes proportionally with capacity. The value 967 // of the metric should increase or decrease in inverse proportion to the 968 // number of capacity units. That is, the value of the metric should decrease 969 // when capacity increases. 970 // 971 // For information about terminology, available metrics, or how to publish new 972 // metrics, see Amazon CloudWatch Concepts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html) 973 // in the Amazon CloudWatch User Guide. 974 type CustomizedScalingMetricSpecification struct { 975 _ struct{} `type:"structure"` 976 977 // The dimensions of the metric. 978 // 979 // Conditional: If you published your metric with dimensions, you must specify 980 // the same dimensions in your customized scaling metric specification. 981 Dimensions []*MetricDimension `type:"list"` 982 983 // The name of the metric. 984 // 985 // MetricName is a required field 986 MetricName *string `type:"string" required:"true"` 987 988 // The namespace of the metric. 989 // 990 // Namespace is a required field 991 Namespace *string `type:"string" required:"true"` 992 993 // The statistic of the metric. 994 // 995 // Statistic is a required field 996 Statistic *string `type:"string" required:"true" enum:"MetricStatistic"` 997 998 // The unit of the metric. 999 Unit *string `type:"string"` 1000 } 1001 1002 // String returns the string representation. 1003 // 1004 // API parameter values that are decorated as "sensitive" in the API will not 1005 // be included in the string output. The member name will be present, but the 1006 // value will be replaced with "sensitive". 1007 func (s CustomizedScalingMetricSpecification) String() string { 1008 return awsutil.Prettify(s) 1009 } 1010 1011 // GoString returns the string representation. 1012 // 1013 // API parameter values that are decorated as "sensitive" in the API will not 1014 // be included in the string output. The member name will be present, but the 1015 // value will be replaced with "sensitive". 1016 func (s CustomizedScalingMetricSpecification) GoString() string { 1017 return s.String() 1018 } 1019 1020 // Validate inspects the fields of the type to determine if they are valid. 1021 func (s *CustomizedScalingMetricSpecification) Validate() error { 1022 invalidParams := request.ErrInvalidParams{Context: "CustomizedScalingMetricSpecification"} 1023 if s.MetricName == nil { 1024 invalidParams.Add(request.NewErrParamRequired("MetricName")) 1025 } 1026 if s.Namespace == nil { 1027 invalidParams.Add(request.NewErrParamRequired("Namespace")) 1028 } 1029 if s.Statistic == nil { 1030 invalidParams.Add(request.NewErrParamRequired("Statistic")) 1031 } 1032 if s.Dimensions != nil { 1033 for i, v := range s.Dimensions { 1034 if v == nil { 1035 continue 1036 } 1037 if err := v.Validate(); err != nil { 1038 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 1039 } 1040 } 1041 } 1042 1043 if invalidParams.Len() > 0 { 1044 return invalidParams 1045 } 1046 return nil 1047 } 1048 1049 // SetDimensions sets the Dimensions field's value. 1050 func (s *CustomizedScalingMetricSpecification) SetDimensions(v []*MetricDimension) *CustomizedScalingMetricSpecification { 1051 s.Dimensions = v 1052 return s 1053 } 1054 1055 // SetMetricName sets the MetricName field's value. 1056 func (s *CustomizedScalingMetricSpecification) SetMetricName(v string) *CustomizedScalingMetricSpecification { 1057 s.MetricName = &v 1058 return s 1059 } 1060 1061 // SetNamespace sets the Namespace field's value. 1062 func (s *CustomizedScalingMetricSpecification) SetNamespace(v string) *CustomizedScalingMetricSpecification { 1063 s.Namespace = &v 1064 return s 1065 } 1066 1067 // SetStatistic sets the Statistic field's value. 1068 func (s *CustomizedScalingMetricSpecification) SetStatistic(v string) *CustomizedScalingMetricSpecification { 1069 s.Statistic = &v 1070 return s 1071 } 1072 1073 // SetUnit sets the Unit field's value. 1074 func (s *CustomizedScalingMetricSpecification) SetUnit(v string) *CustomizedScalingMetricSpecification { 1075 s.Unit = &v 1076 return s 1077 } 1078 1079 // Represents a single value in the forecast data used for predictive scaling. 1080 type Datapoint struct { 1081 _ struct{} `type:"structure"` 1082 1083 // The time stamp for the data point in UTC format. 1084 Timestamp *time.Time `type:"timestamp"` 1085 1086 // The value of the data point. 1087 Value *float64 `type:"double"` 1088 } 1089 1090 // String returns the string representation. 1091 // 1092 // API parameter values that are decorated as "sensitive" in the API will not 1093 // be included in the string output. The member name will be present, but the 1094 // value will be replaced with "sensitive". 1095 func (s Datapoint) String() string { 1096 return awsutil.Prettify(s) 1097 } 1098 1099 // GoString returns the string representation. 1100 // 1101 // API parameter values that are decorated as "sensitive" in the API will not 1102 // be included in the string output. The member name will be present, but the 1103 // value will be replaced with "sensitive". 1104 func (s Datapoint) GoString() string { 1105 return s.String() 1106 } 1107 1108 // SetTimestamp sets the Timestamp field's value. 1109 func (s *Datapoint) SetTimestamp(v time.Time) *Datapoint { 1110 s.Timestamp = &v 1111 return s 1112 } 1113 1114 // SetValue sets the Value field's value. 1115 func (s *Datapoint) SetValue(v float64) *Datapoint { 1116 s.Value = &v 1117 return s 1118 } 1119 1120 type DeleteScalingPlanInput struct { 1121 _ struct{} `type:"structure"` 1122 1123 // The name of the scaling plan. 1124 // 1125 // ScalingPlanName is a required field 1126 ScalingPlanName *string `min:"1" type:"string" required:"true"` 1127 1128 // The version number of the scaling plan. Currently, the only valid value is 1129 // 1. 1130 // 1131 // ScalingPlanVersion is a required field 1132 ScalingPlanVersion *int64 `type:"long" required:"true"` 1133 } 1134 1135 // String returns the string representation. 1136 // 1137 // API parameter values that are decorated as "sensitive" in the API will not 1138 // be included in the string output. The member name will be present, but the 1139 // value will be replaced with "sensitive". 1140 func (s DeleteScalingPlanInput) String() string { 1141 return awsutil.Prettify(s) 1142 } 1143 1144 // GoString returns the string representation. 1145 // 1146 // API parameter values that are decorated as "sensitive" in the API will not 1147 // be included in the string output. The member name will be present, but the 1148 // value will be replaced with "sensitive". 1149 func (s DeleteScalingPlanInput) GoString() string { 1150 return s.String() 1151 } 1152 1153 // Validate inspects the fields of the type to determine if they are valid. 1154 func (s *DeleteScalingPlanInput) Validate() error { 1155 invalidParams := request.ErrInvalidParams{Context: "DeleteScalingPlanInput"} 1156 if s.ScalingPlanName == nil { 1157 invalidParams.Add(request.NewErrParamRequired("ScalingPlanName")) 1158 } 1159 if s.ScalingPlanName != nil && len(*s.ScalingPlanName) < 1 { 1160 invalidParams.Add(request.NewErrParamMinLen("ScalingPlanName", 1)) 1161 } 1162 if s.ScalingPlanVersion == nil { 1163 invalidParams.Add(request.NewErrParamRequired("ScalingPlanVersion")) 1164 } 1165 1166 if invalidParams.Len() > 0 { 1167 return invalidParams 1168 } 1169 return nil 1170 } 1171 1172 // SetScalingPlanName sets the ScalingPlanName field's value. 1173 func (s *DeleteScalingPlanInput) SetScalingPlanName(v string) *DeleteScalingPlanInput { 1174 s.ScalingPlanName = &v 1175 return s 1176 } 1177 1178 // SetScalingPlanVersion sets the ScalingPlanVersion field's value. 1179 func (s *DeleteScalingPlanInput) SetScalingPlanVersion(v int64) *DeleteScalingPlanInput { 1180 s.ScalingPlanVersion = &v 1181 return s 1182 } 1183 1184 type DeleteScalingPlanOutput struct { 1185 _ struct{} `type:"structure"` 1186 } 1187 1188 // String returns the string representation. 1189 // 1190 // API parameter values that are decorated as "sensitive" in the API will not 1191 // be included in the string output. The member name will be present, but the 1192 // value will be replaced with "sensitive". 1193 func (s DeleteScalingPlanOutput) String() string { 1194 return awsutil.Prettify(s) 1195 } 1196 1197 // GoString returns the string representation. 1198 // 1199 // API parameter values that are decorated as "sensitive" in the API will not 1200 // be included in the string output. The member name will be present, but the 1201 // value will be replaced with "sensitive". 1202 func (s DeleteScalingPlanOutput) GoString() string { 1203 return s.String() 1204 } 1205 1206 type DescribeScalingPlanResourcesInput struct { 1207 _ struct{} `type:"structure"` 1208 1209 // The maximum number of scalable resources to return. The value must be between 1210 // 1 and 50. The default value is 50. 1211 MaxResults *int64 `type:"integer"` 1212 1213 // The token for the next set of results. 1214 NextToken *string `type:"string"` 1215 1216 // The name of the scaling plan. 1217 // 1218 // ScalingPlanName is a required field 1219 ScalingPlanName *string `min:"1" type:"string" required:"true"` 1220 1221 // The version number of the scaling plan. Currently, the only valid value is 1222 // 1. 1223 // 1224 // ScalingPlanVersion is a required field 1225 ScalingPlanVersion *int64 `type:"long" required:"true"` 1226 } 1227 1228 // String returns the string representation. 1229 // 1230 // API parameter values that are decorated as "sensitive" in the API will not 1231 // be included in the string output. The member name will be present, but the 1232 // value will be replaced with "sensitive". 1233 func (s DescribeScalingPlanResourcesInput) String() string { 1234 return awsutil.Prettify(s) 1235 } 1236 1237 // GoString returns the string representation. 1238 // 1239 // API parameter values that are decorated as "sensitive" in the API will not 1240 // be included in the string output. The member name will be present, but the 1241 // value will be replaced with "sensitive". 1242 func (s DescribeScalingPlanResourcesInput) GoString() string { 1243 return s.String() 1244 } 1245 1246 // Validate inspects the fields of the type to determine if they are valid. 1247 func (s *DescribeScalingPlanResourcesInput) Validate() error { 1248 invalidParams := request.ErrInvalidParams{Context: "DescribeScalingPlanResourcesInput"} 1249 if s.ScalingPlanName == nil { 1250 invalidParams.Add(request.NewErrParamRequired("ScalingPlanName")) 1251 } 1252 if s.ScalingPlanName != nil && len(*s.ScalingPlanName) < 1 { 1253 invalidParams.Add(request.NewErrParamMinLen("ScalingPlanName", 1)) 1254 } 1255 if s.ScalingPlanVersion == nil { 1256 invalidParams.Add(request.NewErrParamRequired("ScalingPlanVersion")) 1257 } 1258 1259 if invalidParams.Len() > 0 { 1260 return invalidParams 1261 } 1262 return nil 1263 } 1264 1265 // SetMaxResults sets the MaxResults field's value. 1266 func (s *DescribeScalingPlanResourcesInput) SetMaxResults(v int64) *DescribeScalingPlanResourcesInput { 1267 s.MaxResults = &v 1268 return s 1269 } 1270 1271 // SetNextToken sets the NextToken field's value. 1272 func (s *DescribeScalingPlanResourcesInput) SetNextToken(v string) *DescribeScalingPlanResourcesInput { 1273 s.NextToken = &v 1274 return s 1275 } 1276 1277 // SetScalingPlanName sets the ScalingPlanName field's value. 1278 func (s *DescribeScalingPlanResourcesInput) SetScalingPlanName(v string) *DescribeScalingPlanResourcesInput { 1279 s.ScalingPlanName = &v 1280 return s 1281 } 1282 1283 // SetScalingPlanVersion sets the ScalingPlanVersion field's value. 1284 func (s *DescribeScalingPlanResourcesInput) SetScalingPlanVersion(v int64) *DescribeScalingPlanResourcesInput { 1285 s.ScalingPlanVersion = &v 1286 return s 1287 } 1288 1289 type DescribeScalingPlanResourcesOutput struct { 1290 _ struct{} `type:"structure"` 1291 1292 // The token required to get the next set of results. This value is null if 1293 // there are no more results to return. 1294 NextToken *string `type:"string"` 1295 1296 // Information about the scalable resources. 1297 ScalingPlanResources []*ScalingPlanResource `type:"list"` 1298 } 1299 1300 // String returns the string representation. 1301 // 1302 // API parameter values that are decorated as "sensitive" in the API will not 1303 // be included in the string output. The member name will be present, but the 1304 // value will be replaced with "sensitive". 1305 func (s DescribeScalingPlanResourcesOutput) String() string { 1306 return awsutil.Prettify(s) 1307 } 1308 1309 // GoString returns the string representation. 1310 // 1311 // API parameter values that are decorated as "sensitive" in the API will not 1312 // be included in the string output. The member name will be present, but the 1313 // value will be replaced with "sensitive". 1314 func (s DescribeScalingPlanResourcesOutput) GoString() string { 1315 return s.String() 1316 } 1317 1318 // SetNextToken sets the NextToken field's value. 1319 func (s *DescribeScalingPlanResourcesOutput) SetNextToken(v string) *DescribeScalingPlanResourcesOutput { 1320 s.NextToken = &v 1321 return s 1322 } 1323 1324 // SetScalingPlanResources sets the ScalingPlanResources field's value. 1325 func (s *DescribeScalingPlanResourcesOutput) SetScalingPlanResources(v []*ScalingPlanResource) *DescribeScalingPlanResourcesOutput { 1326 s.ScalingPlanResources = v 1327 return s 1328 } 1329 1330 type DescribeScalingPlansInput struct { 1331 _ struct{} `type:"structure"` 1332 1333 // The sources for the applications (up to 10). If you specify scaling plan 1334 // names, you cannot specify application sources. 1335 ApplicationSources []*ApplicationSource `type:"list"` 1336 1337 // The maximum number of scalable resources to return. This value can be between 1338 // 1 and 50. The default value is 50. 1339 MaxResults *int64 `type:"integer"` 1340 1341 // The token for the next set of results. 1342 NextToken *string `type:"string"` 1343 1344 // The names of the scaling plans (up to 10). If you specify application sources, 1345 // you cannot specify scaling plan names. 1346 ScalingPlanNames []*string `type:"list"` 1347 1348 // The version number of the scaling plan. Currently, the only valid value is 1349 // 1. 1350 // 1351 // If you specify a scaling plan version, you must also specify a scaling plan 1352 // name. 1353 ScalingPlanVersion *int64 `type:"long"` 1354 } 1355 1356 // String returns the string representation. 1357 // 1358 // API parameter values that are decorated as "sensitive" in the API will not 1359 // be included in the string output. The member name will be present, but the 1360 // value will be replaced with "sensitive". 1361 func (s DescribeScalingPlansInput) String() string { 1362 return awsutil.Prettify(s) 1363 } 1364 1365 // GoString returns the string representation. 1366 // 1367 // API parameter values that are decorated as "sensitive" in the API will not 1368 // be included in the string output. The member name will be present, but the 1369 // value will be replaced with "sensitive". 1370 func (s DescribeScalingPlansInput) GoString() string { 1371 return s.String() 1372 } 1373 1374 // Validate inspects the fields of the type to determine if they are valid. 1375 func (s *DescribeScalingPlansInput) Validate() error { 1376 invalidParams := request.ErrInvalidParams{Context: "DescribeScalingPlansInput"} 1377 if s.ApplicationSources != nil { 1378 for i, v := range s.ApplicationSources { 1379 if v == nil { 1380 continue 1381 } 1382 if err := v.Validate(); err != nil { 1383 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ApplicationSources", i), err.(request.ErrInvalidParams)) 1384 } 1385 } 1386 } 1387 1388 if invalidParams.Len() > 0 { 1389 return invalidParams 1390 } 1391 return nil 1392 } 1393 1394 // SetApplicationSources sets the ApplicationSources field's value. 1395 func (s *DescribeScalingPlansInput) SetApplicationSources(v []*ApplicationSource) *DescribeScalingPlansInput { 1396 s.ApplicationSources = v 1397 return s 1398 } 1399 1400 // SetMaxResults sets the MaxResults field's value. 1401 func (s *DescribeScalingPlansInput) SetMaxResults(v int64) *DescribeScalingPlansInput { 1402 s.MaxResults = &v 1403 return s 1404 } 1405 1406 // SetNextToken sets the NextToken field's value. 1407 func (s *DescribeScalingPlansInput) SetNextToken(v string) *DescribeScalingPlansInput { 1408 s.NextToken = &v 1409 return s 1410 } 1411 1412 // SetScalingPlanNames sets the ScalingPlanNames field's value. 1413 func (s *DescribeScalingPlansInput) SetScalingPlanNames(v []*string) *DescribeScalingPlansInput { 1414 s.ScalingPlanNames = v 1415 return s 1416 } 1417 1418 // SetScalingPlanVersion sets the ScalingPlanVersion field's value. 1419 func (s *DescribeScalingPlansInput) SetScalingPlanVersion(v int64) *DescribeScalingPlansInput { 1420 s.ScalingPlanVersion = &v 1421 return s 1422 } 1423 1424 type DescribeScalingPlansOutput struct { 1425 _ struct{} `type:"structure"` 1426 1427 // The token required to get the next set of results. This value is null if 1428 // there are no more results to return. 1429 NextToken *string `type:"string"` 1430 1431 // Information about the scaling plans. 1432 ScalingPlans []*ScalingPlan `type:"list"` 1433 } 1434 1435 // String returns the string representation. 1436 // 1437 // API parameter values that are decorated as "sensitive" in the API will not 1438 // be included in the string output. The member name will be present, but the 1439 // value will be replaced with "sensitive". 1440 func (s DescribeScalingPlansOutput) String() string { 1441 return awsutil.Prettify(s) 1442 } 1443 1444 // GoString returns the string representation. 1445 // 1446 // API parameter values that are decorated as "sensitive" in the API will not 1447 // be included in the string output. The member name will be present, but the 1448 // value will be replaced with "sensitive". 1449 func (s DescribeScalingPlansOutput) GoString() string { 1450 return s.String() 1451 } 1452 1453 // SetNextToken sets the NextToken field's value. 1454 func (s *DescribeScalingPlansOutput) SetNextToken(v string) *DescribeScalingPlansOutput { 1455 s.NextToken = &v 1456 return s 1457 } 1458 1459 // SetScalingPlans sets the ScalingPlans field's value. 1460 func (s *DescribeScalingPlansOutput) SetScalingPlans(v []*ScalingPlan) *DescribeScalingPlansOutput { 1461 s.ScalingPlans = v 1462 return s 1463 } 1464 1465 type GetScalingPlanResourceForecastDataInput struct { 1466 _ struct{} `type:"structure"` 1467 1468 // The exclusive end time of the time range for the forecast data to get. The 1469 // maximum time duration between the start and end time is seven days. 1470 // 1471 // Although this parameter can accept a date and time that is more than two 1472 // days in the future, the availability of forecast data has limits. AWS Auto 1473 // Scaling only issues forecasts for periods of two days in advance. 1474 // 1475 // EndTime is a required field 1476 EndTime *time.Time `type:"timestamp" required:"true"` 1477 1478 // The type of forecast data to get. 1479 // 1480 // * LoadForecast: The load metric forecast. 1481 // 1482 // * CapacityForecast: The capacity forecast. 1483 // 1484 // * ScheduledActionMinCapacity: The minimum capacity for each scheduled 1485 // scaling action. This data is calculated as the larger of two values: the 1486 // capacity forecast or the minimum capacity in the scaling instruction. 1487 // 1488 // * ScheduledActionMaxCapacity: The maximum capacity for each scheduled 1489 // scaling action. The calculation used is determined by the predictive scaling 1490 // maximum capacity behavior setting in the scaling instruction. 1491 // 1492 // ForecastDataType is a required field 1493 ForecastDataType *string `type:"string" required:"true" enum:"ForecastDataType"` 1494 1495 // The ID of the resource. This string consists of a prefix (autoScalingGroup) 1496 // followed by the name of a specified Auto Scaling group (my-asg). Example: 1497 // autoScalingGroup/my-asg. 1498 // 1499 // ResourceId is a required field 1500 ResourceId *string `type:"string" required:"true"` 1501 1502 // The scalable dimension for the resource. The only valid value is autoscaling:autoScalingGroup:DesiredCapacity. 1503 // 1504 // ScalableDimension is a required field 1505 ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` 1506 1507 // The name of the scaling plan. 1508 // 1509 // ScalingPlanName is a required field 1510 ScalingPlanName *string `min:"1" type:"string" required:"true"` 1511 1512 // The version number of the scaling plan. Currently, the only valid value is 1513 // 1. 1514 // 1515 // ScalingPlanVersion is a required field 1516 ScalingPlanVersion *int64 `type:"long" required:"true"` 1517 1518 // The namespace of the AWS service. The only valid value is autoscaling. 1519 // 1520 // ServiceNamespace is a required field 1521 ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` 1522 1523 // The inclusive start time of the time range for the forecast data to get. 1524 // The date and time can be at most 56 days before the current date and time. 1525 // 1526 // StartTime is a required field 1527 StartTime *time.Time `type:"timestamp" required:"true"` 1528 } 1529 1530 // String returns the string representation. 1531 // 1532 // API parameter values that are decorated as "sensitive" in the API will not 1533 // be included in the string output. The member name will be present, but the 1534 // value will be replaced with "sensitive". 1535 func (s GetScalingPlanResourceForecastDataInput) String() string { 1536 return awsutil.Prettify(s) 1537 } 1538 1539 // GoString returns the string representation. 1540 // 1541 // API parameter values that are decorated as "sensitive" in the API will not 1542 // be included in the string output. The member name will be present, but the 1543 // value will be replaced with "sensitive". 1544 func (s GetScalingPlanResourceForecastDataInput) GoString() string { 1545 return s.String() 1546 } 1547 1548 // Validate inspects the fields of the type to determine if they are valid. 1549 func (s *GetScalingPlanResourceForecastDataInput) Validate() error { 1550 invalidParams := request.ErrInvalidParams{Context: "GetScalingPlanResourceForecastDataInput"} 1551 if s.EndTime == nil { 1552 invalidParams.Add(request.NewErrParamRequired("EndTime")) 1553 } 1554 if s.ForecastDataType == nil { 1555 invalidParams.Add(request.NewErrParamRequired("ForecastDataType")) 1556 } 1557 if s.ResourceId == nil { 1558 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 1559 } 1560 if s.ScalableDimension == nil { 1561 invalidParams.Add(request.NewErrParamRequired("ScalableDimension")) 1562 } 1563 if s.ScalingPlanName == nil { 1564 invalidParams.Add(request.NewErrParamRequired("ScalingPlanName")) 1565 } 1566 if s.ScalingPlanName != nil && len(*s.ScalingPlanName) < 1 { 1567 invalidParams.Add(request.NewErrParamMinLen("ScalingPlanName", 1)) 1568 } 1569 if s.ScalingPlanVersion == nil { 1570 invalidParams.Add(request.NewErrParamRequired("ScalingPlanVersion")) 1571 } 1572 if s.ServiceNamespace == nil { 1573 invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) 1574 } 1575 if s.StartTime == nil { 1576 invalidParams.Add(request.NewErrParamRequired("StartTime")) 1577 } 1578 1579 if invalidParams.Len() > 0 { 1580 return invalidParams 1581 } 1582 return nil 1583 } 1584 1585 // SetEndTime sets the EndTime field's value. 1586 func (s *GetScalingPlanResourceForecastDataInput) SetEndTime(v time.Time) *GetScalingPlanResourceForecastDataInput { 1587 s.EndTime = &v 1588 return s 1589 } 1590 1591 // SetForecastDataType sets the ForecastDataType field's value. 1592 func (s *GetScalingPlanResourceForecastDataInput) SetForecastDataType(v string) *GetScalingPlanResourceForecastDataInput { 1593 s.ForecastDataType = &v 1594 return s 1595 } 1596 1597 // SetResourceId sets the ResourceId field's value. 1598 func (s *GetScalingPlanResourceForecastDataInput) SetResourceId(v string) *GetScalingPlanResourceForecastDataInput { 1599 s.ResourceId = &v 1600 return s 1601 } 1602 1603 // SetScalableDimension sets the ScalableDimension field's value. 1604 func (s *GetScalingPlanResourceForecastDataInput) SetScalableDimension(v string) *GetScalingPlanResourceForecastDataInput { 1605 s.ScalableDimension = &v 1606 return s 1607 } 1608 1609 // SetScalingPlanName sets the ScalingPlanName field's value. 1610 func (s *GetScalingPlanResourceForecastDataInput) SetScalingPlanName(v string) *GetScalingPlanResourceForecastDataInput { 1611 s.ScalingPlanName = &v 1612 return s 1613 } 1614 1615 // SetScalingPlanVersion sets the ScalingPlanVersion field's value. 1616 func (s *GetScalingPlanResourceForecastDataInput) SetScalingPlanVersion(v int64) *GetScalingPlanResourceForecastDataInput { 1617 s.ScalingPlanVersion = &v 1618 return s 1619 } 1620 1621 // SetServiceNamespace sets the ServiceNamespace field's value. 1622 func (s *GetScalingPlanResourceForecastDataInput) SetServiceNamespace(v string) *GetScalingPlanResourceForecastDataInput { 1623 s.ServiceNamespace = &v 1624 return s 1625 } 1626 1627 // SetStartTime sets the StartTime field's value. 1628 func (s *GetScalingPlanResourceForecastDataInput) SetStartTime(v time.Time) *GetScalingPlanResourceForecastDataInput { 1629 s.StartTime = &v 1630 return s 1631 } 1632 1633 type GetScalingPlanResourceForecastDataOutput struct { 1634 _ struct{} `type:"structure"` 1635 1636 // The data points to return. 1637 // 1638 // Datapoints is a required field 1639 Datapoints []*Datapoint `type:"list" required:"true"` 1640 } 1641 1642 // String returns the string representation. 1643 // 1644 // API parameter values that are decorated as "sensitive" in the API will not 1645 // be included in the string output. The member name will be present, but the 1646 // value will be replaced with "sensitive". 1647 func (s GetScalingPlanResourceForecastDataOutput) String() string { 1648 return awsutil.Prettify(s) 1649 } 1650 1651 // GoString returns the string representation. 1652 // 1653 // API parameter values that are decorated as "sensitive" in the API will not 1654 // be included in the string output. The member name will be present, but the 1655 // value will be replaced with "sensitive". 1656 func (s GetScalingPlanResourceForecastDataOutput) GoString() string { 1657 return s.String() 1658 } 1659 1660 // SetDatapoints sets the Datapoints field's value. 1661 func (s *GetScalingPlanResourceForecastDataOutput) SetDatapoints(v []*Datapoint) *GetScalingPlanResourceForecastDataOutput { 1662 s.Datapoints = v 1663 return s 1664 } 1665 1666 // The service encountered an internal error. 1667 type InternalServiceException struct { 1668 _ struct{} `type:"structure"` 1669 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1670 1671 Message_ *string `locationName:"Message" type:"string"` 1672 } 1673 1674 // String returns the string representation. 1675 // 1676 // API parameter values that are decorated as "sensitive" in the API will not 1677 // be included in the string output. The member name will be present, but the 1678 // value will be replaced with "sensitive". 1679 func (s InternalServiceException) String() string { 1680 return awsutil.Prettify(s) 1681 } 1682 1683 // GoString returns the string representation. 1684 // 1685 // API parameter values that are decorated as "sensitive" in the API will not 1686 // be included in the string output. The member name will be present, but the 1687 // value will be replaced with "sensitive". 1688 func (s InternalServiceException) GoString() string { 1689 return s.String() 1690 } 1691 1692 func newErrorInternalServiceException(v protocol.ResponseMetadata) error { 1693 return &InternalServiceException{ 1694 RespMetadata: v, 1695 } 1696 } 1697 1698 // Code returns the exception type name. 1699 func (s *InternalServiceException) Code() string { 1700 return "InternalServiceException" 1701 } 1702 1703 // Message returns the exception's message. 1704 func (s *InternalServiceException) Message() string { 1705 if s.Message_ != nil { 1706 return *s.Message_ 1707 } 1708 return "" 1709 } 1710 1711 // OrigErr always returns nil, satisfies awserr.Error interface. 1712 func (s *InternalServiceException) OrigErr() error { 1713 return nil 1714 } 1715 1716 func (s *InternalServiceException) Error() string { 1717 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1718 } 1719 1720 // Status code returns the HTTP status code for the request's response error. 1721 func (s *InternalServiceException) StatusCode() int { 1722 return s.RespMetadata.StatusCode 1723 } 1724 1725 // RequestID returns the service's response RequestID for request. 1726 func (s *InternalServiceException) RequestID() string { 1727 return s.RespMetadata.RequestID 1728 } 1729 1730 // The token provided is not valid. 1731 type InvalidNextTokenException struct { 1732 _ struct{} `type:"structure"` 1733 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1734 1735 Message_ *string `locationName:"Message" type:"string"` 1736 } 1737 1738 // String returns the string representation. 1739 // 1740 // API parameter values that are decorated as "sensitive" in the API will not 1741 // be included in the string output. The member name will be present, but the 1742 // value will be replaced with "sensitive". 1743 func (s InvalidNextTokenException) String() string { 1744 return awsutil.Prettify(s) 1745 } 1746 1747 // GoString returns the string representation. 1748 // 1749 // API parameter values that are decorated as "sensitive" in the API will not 1750 // be included in the string output. The member name will be present, but the 1751 // value will be replaced with "sensitive". 1752 func (s InvalidNextTokenException) GoString() string { 1753 return s.String() 1754 } 1755 1756 func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { 1757 return &InvalidNextTokenException{ 1758 RespMetadata: v, 1759 } 1760 } 1761 1762 // Code returns the exception type name. 1763 func (s *InvalidNextTokenException) Code() string { 1764 return "InvalidNextTokenException" 1765 } 1766 1767 // Message returns the exception's message. 1768 func (s *InvalidNextTokenException) Message() string { 1769 if s.Message_ != nil { 1770 return *s.Message_ 1771 } 1772 return "" 1773 } 1774 1775 // OrigErr always returns nil, satisfies awserr.Error interface. 1776 func (s *InvalidNextTokenException) OrigErr() error { 1777 return nil 1778 } 1779 1780 func (s *InvalidNextTokenException) Error() string { 1781 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1782 } 1783 1784 // Status code returns the HTTP status code for the request's response error. 1785 func (s *InvalidNextTokenException) StatusCode() int { 1786 return s.RespMetadata.StatusCode 1787 } 1788 1789 // RequestID returns the service's response RequestID for request. 1790 func (s *InvalidNextTokenException) RequestID() string { 1791 return s.RespMetadata.RequestID 1792 } 1793 1794 // Your account exceeded a limit. This exception is thrown when a per-account 1795 // resource limit is exceeded. 1796 type LimitExceededException struct { 1797 _ struct{} `type:"structure"` 1798 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1799 1800 Message_ *string `locationName:"Message" type:"string"` 1801 } 1802 1803 // String returns the string representation. 1804 // 1805 // API parameter values that are decorated as "sensitive" in the API will not 1806 // be included in the string output. The member name will be present, but the 1807 // value will be replaced with "sensitive". 1808 func (s LimitExceededException) String() string { 1809 return awsutil.Prettify(s) 1810 } 1811 1812 // GoString returns the string representation. 1813 // 1814 // API parameter values that are decorated as "sensitive" in the API will not 1815 // be included in the string output. The member name will be present, but the 1816 // value will be replaced with "sensitive". 1817 func (s LimitExceededException) GoString() string { 1818 return s.String() 1819 } 1820 1821 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 1822 return &LimitExceededException{ 1823 RespMetadata: v, 1824 } 1825 } 1826 1827 // Code returns the exception type name. 1828 func (s *LimitExceededException) Code() string { 1829 return "LimitExceededException" 1830 } 1831 1832 // Message returns the exception's message. 1833 func (s *LimitExceededException) Message() string { 1834 if s.Message_ != nil { 1835 return *s.Message_ 1836 } 1837 return "" 1838 } 1839 1840 // OrigErr always returns nil, satisfies awserr.Error interface. 1841 func (s *LimitExceededException) OrigErr() error { 1842 return nil 1843 } 1844 1845 func (s *LimitExceededException) Error() string { 1846 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1847 } 1848 1849 // Status code returns the HTTP status code for the request's response error. 1850 func (s *LimitExceededException) StatusCode() int { 1851 return s.RespMetadata.StatusCode 1852 } 1853 1854 // RequestID returns the service's response RequestID for request. 1855 func (s *LimitExceededException) RequestID() string { 1856 return s.RespMetadata.RequestID 1857 } 1858 1859 // Represents a dimension for a customized metric. 1860 type MetricDimension struct { 1861 _ struct{} `type:"structure"` 1862 1863 // The name of the dimension. 1864 // 1865 // Name is a required field 1866 Name *string `type:"string" required:"true"` 1867 1868 // The value of the dimension. 1869 // 1870 // Value is a required field 1871 Value *string `type:"string" required:"true"` 1872 } 1873 1874 // String returns the string representation. 1875 // 1876 // API parameter values that are decorated as "sensitive" in the API will not 1877 // be included in the string output. The member name will be present, but the 1878 // value will be replaced with "sensitive". 1879 func (s MetricDimension) String() string { 1880 return awsutil.Prettify(s) 1881 } 1882 1883 // GoString returns the string representation. 1884 // 1885 // API parameter values that are decorated as "sensitive" in the API will not 1886 // be included in the string output. The member name will be present, but the 1887 // value will be replaced with "sensitive". 1888 func (s MetricDimension) GoString() string { 1889 return s.String() 1890 } 1891 1892 // Validate inspects the fields of the type to determine if they are valid. 1893 func (s *MetricDimension) Validate() error { 1894 invalidParams := request.ErrInvalidParams{Context: "MetricDimension"} 1895 if s.Name == nil { 1896 invalidParams.Add(request.NewErrParamRequired("Name")) 1897 } 1898 if s.Value == nil { 1899 invalidParams.Add(request.NewErrParamRequired("Value")) 1900 } 1901 1902 if invalidParams.Len() > 0 { 1903 return invalidParams 1904 } 1905 return nil 1906 } 1907 1908 // SetName sets the Name field's value. 1909 func (s *MetricDimension) SetName(v string) *MetricDimension { 1910 s.Name = &v 1911 return s 1912 } 1913 1914 // SetValue sets the Value field's value. 1915 func (s *MetricDimension) SetValue(v string) *MetricDimension { 1916 s.Value = &v 1917 return s 1918 } 1919 1920 // The specified object could not be found. 1921 type ObjectNotFoundException struct { 1922 _ struct{} `type:"structure"` 1923 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1924 1925 Message_ *string `locationName:"Message" type:"string"` 1926 } 1927 1928 // String returns the string representation. 1929 // 1930 // API parameter values that are decorated as "sensitive" in the API will not 1931 // be included in the string output. The member name will be present, but the 1932 // value will be replaced with "sensitive". 1933 func (s ObjectNotFoundException) String() string { 1934 return awsutil.Prettify(s) 1935 } 1936 1937 // GoString returns the string representation. 1938 // 1939 // API parameter values that are decorated as "sensitive" in the API will not 1940 // be included in the string output. The member name will be present, but the 1941 // value will be replaced with "sensitive". 1942 func (s ObjectNotFoundException) GoString() string { 1943 return s.String() 1944 } 1945 1946 func newErrorObjectNotFoundException(v protocol.ResponseMetadata) error { 1947 return &ObjectNotFoundException{ 1948 RespMetadata: v, 1949 } 1950 } 1951 1952 // Code returns the exception type name. 1953 func (s *ObjectNotFoundException) Code() string { 1954 return "ObjectNotFoundException" 1955 } 1956 1957 // Message returns the exception's message. 1958 func (s *ObjectNotFoundException) Message() string { 1959 if s.Message_ != nil { 1960 return *s.Message_ 1961 } 1962 return "" 1963 } 1964 1965 // OrigErr always returns nil, satisfies awserr.Error interface. 1966 func (s *ObjectNotFoundException) OrigErr() error { 1967 return nil 1968 } 1969 1970 func (s *ObjectNotFoundException) Error() string { 1971 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1972 } 1973 1974 // Status code returns the HTTP status code for the request's response error. 1975 func (s *ObjectNotFoundException) StatusCode() int { 1976 return s.RespMetadata.StatusCode 1977 } 1978 1979 // RequestID returns the service's response RequestID for request. 1980 func (s *ObjectNotFoundException) RequestID() string { 1981 return s.RespMetadata.RequestID 1982 } 1983 1984 // Represents a predefined metric that can be used for predictive scaling. 1985 // 1986 // After creating your scaling plan, you can use the AWS Auto Scaling console 1987 // to visualize forecasts for the specified metric. For more information, see 1988 // View Scaling Information for a Resource (https://docs.aws.amazon.com/autoscaling/plans/userguide/gs-create-scaling-plan.html#gs-view-resource) 1989 // in the AWS Auto Scaling User Guide. 1990 type PredefinedLoadMetricSpecification struct { 1991 _ struct{} `type:"structure"` 1992 1993 // The metric type. 1994 // 1995 // PredefinedLoadMetricType is a required field 1996 PredefinedLoadMetricType *string `type:"string" required:"true" enum:"LoadMetricType"` 1997 1998 // Identifies the resource associated with the metric type. You can't specify 1999 // a resource label unless the metric type is ALBTargetGroupRequestCount and 2000 // there is a target group for an Application Load Balancer attached to the 2001 // Auto Scaling group. 2002 // 2003 // You create the resource label by appending the final portion of the load 2004 // balancer ARN and the final portion of the target group ARN into a single 2005 // value, separated by a forward slash (/). The format is app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>, 2006 // where: 2007 // 2008 // * app/<load-balancer-name>/<load-balancer-id> is the final portion of 2009 // the load balancer ARN 2010 // 2011 // * targetgroup/<target-group-name>/<target-group-id> is the final portion 2012 // of the target group ARN. 2013 // 2014 // This is an example: app/EC2Co-EcsEl-1TKLTMITMM0EO/f37c06a68c1748aa/targetgroup/EC2Co-Defau-LDNM7Q3ZH1ZN/6d4ea56ca2d6a18d. 2015 // 2016 // To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers 2017 // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) 2018 // API operation. To find the ARN for the target group, use the DescribeTargetGroups 2019 // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html) 2020 // API operation. 2021 ResourceLabel *string `min:"1" type:"string"` 2022 } 2023 2024 // String returns the string representation. 2025 // 2026 // API parameter values that are decorated as "sensitive" in the API will not 2027 // be included in the string output. The member name will be present, but the 2028 // value will be replaced with "sensitive". 2029 func (s PredefinedLoadMetricSpecification) String() string { 2030 return awsutil.Prettify(s) 2031 } 2032 2033 // GoString returns the string representation. 2034 // 2035 // API parameter values that are decorated as "sensitive" in the API will not 2036 // be included in the string output. The member name will be present, but the 2037 // value will be replaced with "sensitive". 2038 func (s PredefinedLoadMetricSpecification) GoString() string { 2039 return s.String() 2040 } 2041 2042 // Validate inspects the fields of the type to determine if they are valid. 2043 func (s *PredefinedLoadMetricSpecification) Validate() error { 2044 invalidParams := request.ErrInvalidParams{Context: "PredefinedLoadMetricSpecification"} 2045 if s.PredefinedLoadMetricType == nil { 2046 invalidParams.Add(request.NewErrParamRequired("PredefinedLoadMetricType")) 2047 } 2048 if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 { 2049 invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1)) 2050 } 2051 2052 if invalidParams.Len() > 0 { 2053 return invalidParams 2054 } 2055 return nil 2056 } 2057 2058 // SetPredefinedLoadMetricType sets the PredefinedLoadMetricType field's value. 2059 func (s *PredefinedLoadMetricSpecification) SetPredefinedLoadMetricType(v string) *PredefinedLoadMetricSpecification { 2060 s.PredefinedLoadMetricType = &v 2061 return s 2062 } 2063 2064 // SetResourceLabel sets the ResourceLabel field's value. 2065 func (s *PredefinedLoadMetricSpecification) SetResourceLabel(v string) *PredefinedLoadMetricSpecification { 2066 s.ResourceLabel = &v 2067 return s 2068 } 2069 2070 // Represents a predefined metric that can be used for dynamic scaling as part 2071 // of a target tracking scaling policy. 2072 type PredefinedScalingMetricSpecification struct { 2073 _ struct{} `type:"structure"` 2074 2075 // The metric type. The ALBRequestCountPerTarget metric type applies only to 2076 // Auto Scaling groups, Spot Fleet requests, and ECS services. 2077 // 2078 // PredefinedScalingMetricType is a required field 2079 PredefinedScalingMetricType *string `type:"string" required:"true" enum:"ScalingMetricType"` 2080 2081 // Identifies the resource associated with the metric type. You can't specify 2082 // a resource label unless the metric type is ALBRequestCountPerTarget and there 2083 // is a target group for an Application Load Balancer attached to the Auto Scaling 2084 // group, Spot Fleet request, or ECS service. 2085 // 2086 // You create the resource label by appending the final portion of the load 2087 // balancer ARN and the final portion of the target group ARN into a single 2088 // value, separated by a forward slash (/). The format is app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>, 2089 // where: 2090 // 2091 // * app/<load-balancer-name>/<load-balancer-id> is the final portion of 2092 // the load balancer ARN 2093 // 2094 // * targetgroup/<target-group-name>/<target-group-id> is the final portion 2095 // of the target group ARN. 2096 // 2097 // This is an example: app/EC2Co-EcsEl-1TKLTMITMM0EO/f37c06a68c1748aa/targetgroup/EC2Co-Defau-LDNM7Q3ZH1ZN/6d4ea56ca2d6a18d. 2098 // 2099 // To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers 2100 // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) 2101 // API operation. To find the ARN for the target group, use the DescribeTargetGroups 2102 // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html) 2103 // API operation. 2104 ResourceLabel *string `min:"1" type:"string"` 2105 } 2106 2107 // String returns the string representation. 2108 // 2109 // API parameter values that are decorated as "sensitive" in the API will not 2110 // be included in the string output. The member name will be present, but the 2111 // value will be replaced with "sensitive". 2112 func (s PredefinedScalingMetricSpecification) String() string { 2113 return awsutil.Prettify(s) 2114 } 2115 2116 // GoString returns the string representation. 2117 // 2118 // API parameter values that are decorated as "sensitive" in the API will not 2119 // be included in the string output. The member name will be present, but the 2120 // value will be replaced with "sensitive". 2121 func (s PredefinedScalingMetricSpecification) GoString() string { 2122 return s.String() 2123 } 2124 2125 // Validate inspects the fields of the type to determine if they are valid. 2126 func (s *PredefinedScalingMetricSpecification) Validate() error { 2127 invalidParams := request.ErrInvalidParams{Context: "PredefinedScalingMetricSpecification"} 2128 if s.PredefinedScalingMetricType == nil { 2129 invalidParams.Add(request.NewErrParamRequired("PredefinedScalingMetricType")) 2130 } 2131 if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 { 2132 invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1)) 2133 } 2134 2135 if invalidParams.Len() > 0 { 2136 return invalidParams 2137 } 2138 return nil 2139 } 2140 2141 // SetPredefinedScalingMetricType sets the PredefinedScalingMetricType field's value. 2142 func (s *PredefinedScalingMetricSpecification) SetPredefinedScalingMetricType(v string) *PredefinedScalingMetricSpecification { 2143 s.PredefinedScalingMetricType = &v 2144 return s 2145 } 2146 2147 // SetResourceLabel sets the ResourceLabel field's value. 2148 func (s *PredefinedScalingMetricSpecification) SetResourceLabel(v string) *PredefinedScalingMetricSpecification { 2149 s.ResourceLabel = &v 2150 return s 2151 } 2152 2153 // Describes a scaling instruction for a scalable resource in a scaling plan. 2154 // Each scaling instruction applies to one resource. 2155 // 2156 // AWS Auto Scaling creates target tracking scaling policies based on the scaling 2157 // instructions. Target tracking scaling policies adjust the capacity of your 2158 // scalable resource as required to maintain resource utilization at the target 2159 // value that you specified. 2160 // 2161 // AWS Auto Scaling also configures predictive scaling for your Amazon EC2 Auto 2162 // Scaling groups using a subset of parameters, including the load metric, the 2163 // scaling metric, the target value for the scaling metric, the predictive scaling 2164 // mode (forecast and scale or forecast only), and the desired behavior when 2165 // the forecast capacity exceeds the maximum capacity of the resource. With 2166 // predictive scaling, AWS Auto Scaling generates forecasts with traffic predictions 2167 // for the two days ahead and schedules scaling actions that proactively add 2168 // and remove resource capacity to match the forecast. 2169 // 2170 // We recommend waiting a minimum of 24 hours after creating an Auto Scaling 2171 // group to configure predictive scaling. At minimum, there must be 24 hours 2172 // of historical data to generate a forecast. For more information, see Best 2173 // Practices for AWS Auto Scaling (https://docs.aws.amazon.com/autoscaling/plans/userguide/gs-best-practices.html) 2174 // in the AWS Auto Scaling User Guide. 2175 type ScalingInstruction struct { 2176 _ struct{} `type:"structure"` 2177 2178 // The customized load metric to use for predictive scaling. This parameter 2179 // or a PredefinedLoadMetricSpecification is required when configuring predictive 2180 // scaling, and cannot be used otherwise. 2181 CustomizedLoadMetricSpecification *CustomizedLoadMetricSpecification `type:"structure"` 2182 2183 // Controls whether dynamic scaling by AWS Auto Scaling is disabled. When dynamic 2184 // scaling is enabled, AWS Auto Scaling creates target tracking scaling policies 2185 // based on the specified target tracking configurations. 2186 // 2187 // The default is enabled (false). 2188 DisableDynamicScaling *bool `type:"boolean"` 2189 2190 // The maximum capacity of the resource. The exception to this upper limit is 2191 // if you specify a non-default setting for PredictiveScalingMaxCapacityBehavior. 2192 // 2193 // MaxCapacity is a required field 2194 MaxCapacity *int64 `type:"integer" required:"true"` 2195 2196 // The minimum capacity of the resource. 2197 // 2198 // MinCapacity is a required field 2199 MinCapacity *int64 `type:"integer" required:"true"` 2200 2201 // The predefined load metric to use for predictive scaling. This parameter 2202 // or a CustomizedLoadMetricSpecification is required when configuring predictive 2203 // scaling, and cannot be used otherwise. 2204 PredefinedLoadMetricSpecification *PredefinedLoadMetricSpecification `type:"structure"` 2205 2206 // Defines the behavior that should be applied if the forecast capacity approaches 2207 // or exceeds the maximum capacity specified for the resource. The default value 2208 // is SetForecastCapacityToMaxCapacity. 2209 // 2210 // The following are possible values: 2211 // 2212 // * SetForecastCapacityToMaxCapacity - AWS Auto Scaling cannot scale resource 2213 // capacity higher than the maximum capacity. The maximum capacity is enforced 2214 // as a hard limit. 2215 // 2216 // * SetMaxCapacityToForecastCapacity - AWS Auto Scaling may scale resource 2217 // capacity higher than the maximum capacity to equal but not exceed forecast 2218 // capacity. 2219 // 2220 // * SetMaxCapacityAboveForecastCapacity - AWS Auto Scaling may scale resource 2221 // capacity higher than the maximum capacity by a specified buffer value. 2222 // The intention is to give the target tracking scaling policy extra capacity 2223 // if unexpected traffic occurs. 2224 // 2225 // Only valid when configuring predictive scaling. 2226 PredictiveScalingMaxCapacityBehavior *string `type:"string" enum:"PredictiveScalingMaxCapacityBehavior"` 2227 2228 // The size of the capacity buffer to use when the forecast capacity is close 2229 // to or exceeds the maximum capacity. The value is specified as a percentage 2230 // relative to the forecast capacity. For example, if the buffer is 10, this 2231 // means a 10 percent buffer, such that if the forecast capacity is 50, and 2232 // the maximum capacity is 40, then the effective maximum capacity is 55. 2233 // 2234 // Only valid when configuring predictive scaling. Required if the PredictiveScalingMaxCapacityBehavior 2235 // is set to SetMaxCapacityAboveForecastCapacity, and cannot be used otherwise. 2236 // 2237 // The range is 1-100. 2238 PredictiveScalingMaxCapacityBuffer *int64 `type:"integer"` 2239 2240 // The predictive scaling mode. The default value is ForecastAndScale. Otherwise, 2241 // AWS Auto Scaling forecasts capacity but does not create any scheduled scaling 2242 // actions based on the capacity forecast. 2243 PredictiveScalingMode *string `type:"string" enum:"PredictiveScalingMode"` 2244 2245 // The ID of the resource. This string consists of the resource type and unique 2246 // identifier. 2247 // 2248 // * Auto Scaling group - The resource type is autoScalingGroup and the unique 2249 // identifier is the name of the Auto Scaling group. Example: autoScalingGroup/my-asg. 2250 // 2251 // * ECS service - The resource type is service and the unique identifier 2252 // is the cluster name and service name. Example: service/default/sample-webapp. 2253 // 2254 // * Spot Fleet request - The resource type is spot-fleet-request and the 2255 // unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. 2256 // 2257 // * DynamoDB table - The resource type is table and the unique identifier 2258 // is the resource ID. Example: table/my-table. 2259 // 2260 // * DynamoDB global secondary index - The resource type is index and the 2261 // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. 2262 // 2263 // * Aurora DB cluster - The resource type is cluster and the unique identifier 2264 // is the cluster name. Example: cluster:my-db-cluster. 2265 // 2266 // ResourceId is a required field 2267 ResourceId *string `min:"1" type:"string" required:"true"` 2268 2269 // The scalable dimension associated with the resource. 2270 // 2271 // * autoscaling:autoScalingGroup:DesiredCapacity - The desired capacity 2272 // of an Auto Scaling group. 2273 // 2274 // * ecs:service:DesiredCount - The desired task count of an ECS service. 2275 // 2276 // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot 2277 // Fleet request. 2278 // 2279 // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for 2280 // a DynamoDB table. 2281 // 2282 // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for 2283 // a DynamoDB table. 2284 // 2285 // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for 2286 // a DynamoDB global secondary index. 2287 // 2288 // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for 2289 // a DynamoDB global secondary index. 2290 // 2291 // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora 2292 // DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible 2293 // edition. 2294 // 2295 // ScalableDimension is a required field 2296 ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` 2297 2298 // Controls whether a resource's externally created scaling policies are kept 2299 // or replaced. 2300 // 2301 // The default value is KeepExternalPolicies. If the parameter is set to ReplaceExternalPolicies, 2302 // any scaling policies that are external to AWS Auto Scaling are deleted and 2303 // new target tracking scaling policies created. 2304 // 2305 // Only valid when configuring dynamic scaling. 2306 // 2307 // Condition: The number of existing policies to be replaced must be less than 2308 // or equal to 50. If there are more than 50 policies to be replaced, AWS Auto 2309 // Scaling keeps all existing policies and does not create new ones. 2310 ScalingPolicyUpdateBehavior *string `type:"string" enum:"ScalingPolicyUpdateBehavior"` 2311 2312 // The amount of time, in seconds, to buffer the run time of scheduled scaling 2313 // actions when scaling out. For example, if the forecast says to add capacity 2314 // at 10:00 AM, and the buffer time is 5 minutes, then the run time of the corresponding 2315 // scheduled scaling action will be 9:55 AM. The intention is to give resources 2316 // time to be provisioned. For example, it can take a few minutes to launch 2317 // an EC2 instance. The actual amount of time required depends on several factors, 2318 // such as the size of the instance and whether there are startup scripts to 2319 // complete. 2320 // 2321 // The value must be less than the forecast interval duration of 3600 seconds 2322 // (60 minutes). The default is 300 seconds. 2323 // 2324 // Only valid when configuring predictive scaling. 2325 ScheduledActionBufferTime *int64 `type:"integer"` 2326 2327 // The namespace of the AWS service. 2328 // 2329 // ServiceNamespace is a required field 2330 ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` 2331 2332 // The target tracking configurations (up to 10). Each of these structures must 2333 // specify a unique scaling metric and a target value for the metric. 2334 // 2335 // TargetTrackingConfigurations is a required field 2336 TargetTrackingConfigurations []*TargetTrackingConfiguration `type:"list" required:"true"` 2337 } 2338 2339 // String returns the string representation. 2340 // 2341 // API parameter values that are decorated as "sensitive" in the API will not 2342 // be included in the string output. The member name will be present, but the 2343 // value will be replaced with "sensitive". 2344 func (s ScalingInstruction) String() string { 2345 return awsutil.Prettify(s) 2346 } 2347 2348 // GoString returns the string representation. 2349 // 2350 // API parameter values that are decorated as "sensitive" in the API will not 2351 // be included in the string output. The member name will be present, but the 2352 // value will be replaced with "sensitive". 2353 func (s ScalingInstruction) GoString() string { 2354 return s.String() 2355 } 2356 2357 // Validate inspects the fields of the type to determine if they are valid. 2358 func (s *ScalingInstruction) Validate() error { 2359 invalidParams := request.ErrInvalidParams{Context: "ScalingInstruction"} 2360 if s.MaxCapacity == nil { 2361 invalidParams.Add(request.NewErrParamRequired("MaxCapacity")) 2362 } 2363 if s.MinCapacity == nil { 2364 invalidParams.Add(request.NewErrParamRequired("MinCapacity")) 2365 } 2366 if s.ResourceId == nil { 2367 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 2368 } 2369 if s.ResourceId != nil && len(*s.ResourceId) < 1 { 2370 invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) 2371 } 2372 if s.ScalableDimension == nil { 2373 invalidParams.Add(request.NewErrParamRequired("ScalableDimension")) 2374 } 2375 if s.ServiceNamespace == nil { 2376 invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) 2377 } 2378 if s.TargetTrackingConfigurations == nil { 2379 invalidParams.Add(request.NewErrParamRequired("TargetTrackingConfigurations")) 2380 } 2381 if s.CustomizedLoadMetricSpecification != nil { 2382 if err := s.CustomizedLoadMetricSpecification.Validate(); err != nil { 2383 invalidParams.AddNested("CustomizedLoadMetricSpecification", err.(request.ErrInvalidParams)) 2384 } 2385 } 2386 if s.PredefinedLoadMetricSpecification != nil { 2387 if err := s.PredefinedLoadMetricSpecification.Validate(); err != nil { 2388 invalidParams.AddNested("PredefinedLoadMetricSpecification", err.(request.ErrInvalidParams)) 2389 } 2390 } 2391 if s.TargetTrackingConfigurations != nil { 2392 for i, v := range s.TargetTrackingConfigurations { 2393 if v == nil { 2394 continue 2395 } 2396 if err := v.Validate(); err != nil { 2397 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetTrackingConfigurations", i), err.(request.ErrInvalidParams)) 2398 } 2399 } 2400 } 2401 2402 if invalidParams.Len() > 0 { 2403 return invalidParams 2404 } 2405 return nil 2406 } 2407 2408 // SetCustomizedLoadMetricSpecification sets the CustomizedLoadMetricSpecification field's value. 2409 func (s *ScalingInstruction) SetCustomizedLoadMetricSpecification(v *CustomizedLoadMetricSpecification) *ScalingInstruction { 2410 s.CustomizedLoadMetricSpecification = v 2411 return s 2412 } 2413 2414 // SetDisableDynamicScaling sets the DisableDynamicScaling field's value. 2415 func (s *ScalingInstruction) SetDisableDynamicScaling(v bool) *ScalingInstruction { 2416 s.DisableDynamicScaling = &v 2417 return s 2418 } 2419 2420 // SetMaxCapacity sets the MaxCapacity field's value. 2421 func (s *ScalingInstruction) SetMaxCapacity(v int64) *ScalingInstruction { 2422 s.MaxCapacity = &v 2423 return s 2424 } 2425 2426 // SetMinCapacity sets the MinCapacity field's value. 2427 func (s *ScalingInstruction) SetMinCapacity(v int64) *ScalingInstruction { 2428 s.MinCapacity = &v 2429 return s 2430 } 2431 2432 // SetPredefinedLoadMetricSpecification sets the PredefinedLoadMetricSpecification field's value. 2433 func (s *ScalingInstruction) SetPredefinedLoadMetricSpecification(v *PredefinedLoadMetricSpecification) *ScalingInstruction { 2434 s.PredefinedLoadMetricSpecification = v 2435 return s 2436 } 2437 2438 // SetPredictiveScalingMaxCapacityBehavior sets the PredictiveScalingMaxCapacityBehavior field's value. 2439 func (s *ScalingInstruction) SetPredictiveScalingMaxCapacityBehavior(v string) *ScalingInstruction { 2440 s.PredictiveScalingMaxCapacityBehavior = &v 2441 return s 2442 } 2443 2444 // SetPredictiveScalingMaxCapacityBuffer sets the PredictiveScalingMaxCapacityBuffer field's value. 2445 func (s *ScalingInstruction) SetPredictiveScalingMaxCapacityBuffer(v int64) *ScalingInstruction { 2446 s.PredictiveScalingMaxCapacityBuffer = &v 2447 return s 2448 } 2449 2450 // SetPredictiveScalingMode sets the PredictiveScalingMode field's value. 2451 func (s *ScalingInstruction) SetPredictiveScalingMode(v string) *ScalingInstruction { 2452 s.PredictiveScalingMode = &v 2453 return s 2454 } 2455 2456 // SetResourceId sets the ResourceId field's value. 2457 func (s *ScalingInstruction) SetResourceId(v string) *ScalingInstruction { 2458 s.ResourceId = &v 2459 return s 2460 } 2461 2462 // SetScalableDimension sets the ScalableDimension field's value. 2463 func (s *ScalingInstruction) SetScalableDimension(v string) *ScalingInstruction { 2464 s.ScalableDimension = &v 2465 return s 2466 } 2467 2468 // SetScalingPolicyUpdateBehavior sets the ScalingPolicyUpdateBehavior field's value. 2469 func (s *ScalingInstruction) SetScalingPolicyUpdateBehavior(v string) *ScalingInstruction { 2470 s.ScalingPolicyUpdateBehavior = &v 2471 return s 2472 } 2473 2474 // SetScheduledActionBufferTime sets the ScheduledActionBufferTime field's value. 2475 func (s *ScalingInstruction) SetScheduledActionBufferTime(v int64) *ScalingInstruction { 2476 s.ScheduledActionBufferTime = &v 2477 return s 2478 } 2479 2480 // SetServiceNamespace sets the ServiceNamespace field's value. 2481 func (s *ScalingInstruction) SetServiceNamespace(v string) *ScalingInstruction { 2482 s.ServiceNamespace = &v 2483 return s 2484 } 2485 2486 // SetTargetTrackingConfigurations sets the TargetTrackingConfigurations field's value. 2487 func (s *ScalingInstruction) SetTargetTrackingConfigurations(v []*TargetTrackingConfiguration) *ScalingInstruction { 2488 s.TargetTrackingConfigurations = v 2489 return s 2490 } 2491 2492 // Represents a scaling plan. 2493 type ScalingPlan struct { 2494 _ struct{} `type:"structure"` 2495 2496 // A CloudFormation stack or a set of tags. You can create one scaling plan 2497 // per application source. 2498 // 2499 // ApplicationSource is a required field 2500 ApplicationSource *ApplicationSource `type:"structure" required:"true"` 2501 2502 // The Unix time stamp when the scaling plan was created. 2503 CreationTime *time.Time `type:"timestamp"` 2504 2505 // The scaling instructions. 2506 // 2507 // ScalingInstructions is a required field 2508 ScalingInstructions []*ScalingInstruction `type:"list" required:"true"` 2509 2510 // The name of the scaling plan. 2511 // 2512 // ScalingPlanName is a required field 2513 ScalingPlanName *string `min:"1" type:"string" required:"true"` 2514 2515 // The version number of the scaling plan. 2516 // 2517 // ScalingPlanVersion is a required field 2518 ScalingPlanVersion *int64 `type:"long" required:"true"` 2519 2520 // The status of the scaling plan. 2521 // 2522 // * Active - The scaling plan is active. 2523 // 2524 // * ActiveWithProblems - The scaling plan is active, but the scaling configuration 2525 // for one or more resources could not be applied. 2526 // 2527 // * CreationInProgress - The scaling plan is being created. 2528 // 2529 // * CreationFailed - The scaling plan could not be created. 2530 // 2531 // * DeletionInProgress - The scaling plan is being deleted. 2532 // 2533 // * DeletionFailed - The scaling plan could not be deleted. 2534 // 2535 // * UpdateInProgress - The scaling plan is being updated. 2536 // 2537 // * UpdateFailed - The scaling plan could not be updated. 2538 // 2539 // StatusCode is a required field 2540 StatusCode *string `type:"string" required:"true" enum:"ScalingPlanStatusCode"` 2541 2542 // A simple message about the current status of the scaling plan. 2543 StatusMessage *string `type:"string"` 2544 2545 // The Unix time stamp when the scaling plan entered the current status. 2546 StatusStartTime *time.Time `type:"timestamp"` 2547 } 2548 2549 // String returns the string representation. 2550 // 2551 // API parameter values that are decorated as "sensitive" in the API will not 2552 // be included in the string output. The member name will be present, but the 2553 // value will be replaced with "sensitive". 2554 func (s ScalingPlan) String() string { 2555 return awsutil.Prettify(s) 2556 } 2557 2558 // GoString returns the string representation. 2559 // 2560 // API parameter values that are decorated as "sensitive" in the API will not 2561 // be included in the string output. The member name will be present, but the 2562 // value will be replaced with "sensitive". 2563 func (s ScalingPlan) GoString() string { 2564 return s.String() 2565 } 2566 2567 // SetApplicationSource sets the ApplicationSource field's value. 2568 func (s *ScalingPlan) SetApplicationSource(v *ApplicationSource) *ScalingPlan { 2569 s.ApplicationSource = v 2570 return s 2571 } 2572 2573 // SetCreationTime sets the CreationTime field's value. 2574 func (s *ScalingPlan) SetCreationTime(v time.Time) *ScalingPlan { 2575 s.CreationTime = &v 2576 return s 2577 } 2578 2579 // SetScalingInstructions sets the ScalingInstructions field's value. 2580 func (s *ScalingPlan) SetScalingInstructions(v []*ScalingInstruction) *ScalingPlan { 2581 s.ScalingInstructions = v 2582 return s 2583 } 2584 2585 // SetScalingPlanName sets the ScalingPlanName field's value. 2586 func (s *ScalingPlan) SetScalingPlanName(v string) *ScalingPlan { 2587 s.ScalingPlanName = &v 2588 return s 2589 } 2590 2591 // SetScalingPlanVersion sets the ScalingPlanVersion field's value. 2592 func (s *ScalingPlan) SetScalingPlanVersion(v int64) *ScalingPlan { 2593 s.ScalingPlanVersion = &v 2594 return s 2595 } 2596 2597 // SetStatusCode sets the StatusCode field's value. 2598 func (s *ScalingPlan) SetStatusCode(v string) *ScalingPlan { 2599 s.StatusCode = &v 2600 return s 2601 } 2602 2603 // SetStatusMessage sets the StatusMessage field's value. 2604 func (s *ScalingPlan) SetStatusMessage(v string) *ScalingPlan { 2605 s.StatusMessage = &v 2606 return s 2607 } 2608 2609 // SetStatusStartTime sets the StatusStartTime field's value. 2610 func (s *ScalingPlan) SetStatusStartTime(v time.Time) *ScalingPlan { 2611 s.StatusStartTime = &v 2612 return s 2613 } 2614 2615 // Represents a scalable resource. 2616 type ScalingPlanResource struct { 2617 _ struct{} `type:"structure"` 2618 2619 // The ID of the resource. This string consists of the resource type and unique 2620 // identifier. 2621 // 2622 // * Auto Scaling group - The resource type is autoScalingGroup and the unique 2623 // identifier is the name of the Auto Scaling group. Example: autoScalingGroup/my-asg. 2624 // 2625 // * ECS service - The resource type is service and the unique identifier 2626 // is the cluster name and service name. Example: service/default/sample-webapp. 2627 // 2628 // * Spot Fleet request - The resource type is spot-fleet-request and the 2629 // unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. 2630 // 2631 // * DynamoDB table - The resource type is table and the unique identifier 2632 // is the resource ID. Example: table/my-table. 2633 // 2634 // * DynamoDB global secondary index - The resource type is index and the 2635 // unique identifier is the resource ID. Example: table/my-table/index/my-table-index. 2636 // 2637 // * Aurora DB cluster - The resource type is cluster and the unique identifier 2638 // is the cluster name. Example: cluster:my-db-cluster. 2639 // 2640 // ResourceId is a required field 2641 ResourceId *string `min:"1" type:"string" required:"true"` 2642 2643 // The scalable dimension for the resource. 2644 // 2645 // * autoscaling:autoScalingGroup:DesiredCapacity - The desired capacity 2646 // of an Auto Scaling group. 2647 // 2648 // * ecs:service:DesiredCount - The desired task count of an ECS service. 2649 // 2650 // * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot 2651 // Fleet request. 2652 // 2653 // * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for 2654 // a DynamoDB table. 2655 // 2656 // * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for 2657 // a DynamoDB table. 2658 // 2659 // * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for 2660 // a DynamoDB global secondary index. 2661 // 2662 // * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for 2663 // a DynamoDB global secondary index. 2664 // 2665 // * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora 2666 // DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible 2667 // edition. 2668 // 2669 // ScalableDimension is a required field 2670 ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` 2671 2672 // The name of the scaling plan. 2673 // 2674 // ScalingPlanName is a required field 2675 ScalingPlanName *string `min:"1" type:"string" required:"true"` 2676 2677 // The version number of the scaling plan. 2678 // 2679 // ScalingPlanVersion is a required field 2680 ScalingPlanVersion *int64 `type:"long" required:"true"` 2681 2682 // The scaling policies. 2683 ScalingPolicies []*ScalingPolicy `type:"list"` 2684 2685 // The scaling status of the resource. 2686 // 2687 // * Active - The scaling configuration is active. 2688 // 2689 // * Inactive - The scaling configuration is not active because the scaling 2690 // plan is being created or the scaling configuration could not be applied. 2691 // Check the status message for more information. 2692 // 2693 // * PartiallyActive - The scaling configuration is partially active because 2694 // the scaling plan is being created or deleted or the scaling configuration 2695 // could not be fully applied. Check the status message for more information. 2696 // 2697 // ScalingStatusCode is a required field 2698 ScalingStatusCode *string `type:"string" required:"true" enum:"ScalingStatusCode"` 2699 2700 // A simple message about the current scaling status of the resource. 2701 ScalingStatusMessage *string `type:"string"` 2702 2703 // The namespace of the AWS service. 2704 // 2705 // ServiceNamespace is a required field 2706 ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` 2707 } 2708 2709 // String returns the string representation. 2710 // 2711 // API parameter values that are decorated as "sensitive" in the API will not 2712 // be included in the string output. The member name will be present, but the 2713 // value will be replaced with "sensitive". 2714 func (s ScalingPlanResource) String() string { 2715 return awsutil.Prettify(s) 2716 } 2717 2718 // GoString returns the string representation. 2719 // 2720 // API parameter values that are decorated as "sensitive" in the API will not 2721 // be included in the string output. The member name will be present, but the 2722 // value will be replaced with "sensitive". 2723 func (s ScalingPlanResource) GoString() string { 2724 return s.String() 2725 } 2726 2727 // SetResourceId sets the ResourceId field's value. 2728 func (s *ScalingPlanResource) SetResourceId(v string) *ScalingPlanResource { 2729 s.ResourceId = &v 2730 return s 2731 } 2732 2733 // SetScalableDimension sets the ScalableDimension field's value. 2734 func (s *ScalingPlanResource) SetScalableDimension(v string) *ScalingPlanResource { 2735 s.ScalableDimension = &v 2736 return s 2737 } 2738 2739 // SetScalingPlanName sets the ScalingPlanName field's value. 2740 func (s *ScalingPlanResource) SetScalingPlanName(v string) *ScalingPlanResource { 2741 s.ScalingPlanName = &v 2742 return s 2743 } 2744 2745 // SetScalingPlanVersion sets the ScalingPlanVersion field's value. 2746 func (s *ScalingPlanResource) SetScalingPlanVersion(v int64) *ScalingPlanResource { 2747 s.ScalingPlanVersion = &v 2748 return s 2749 } 2750 2751 // SetScalingPolicies sets the ScalingPolicies field's value. 2752 func (s *ScalingPlanResource) SetScalingPolicies(v []*ScalingPolicy) *ScalingPlanResource { 2753 s.ScalingPolicies = v 2754 return s 2755 } 2756 2757 // SetScalingStatusCode sets the ScalingStatusCode field's value. 2758 func (s *ScalingPlanResource) SetScalingStatusCode(v string) *ScalingPlanResource { 2759 s.ScalingStatusCode = &v 2760 return s 2761 } 2762 2763 // SetScalingStatusMessage sets the ScalingStatusMessage field's value. 2764 func (s *ScalingPlanResource) SetScalingStatusMessage(v string) *ScalingPlanResource { 2765 s.ScalingStatusMessage = &v 2766 return s 2767 } 2768 2769 // SetServiceNamespace sets the ServiceNamespace field's value. 2770 func (s *ScalingPlanResource) SetServiceNamespace(v string) *ScalingPlanResource { 2771 s.ServiceNamespace = &v 2772 return s 2773 } 2774 2775 // Represents a scaling policy. 2776 type ScalingPolicy struct { 2777 _ struct{} `type:"structure"` 2778 2779 // The name of the scaling policy. 2780 // 2781 // PolicyName is a required field 2782 PolicyName *string `min:"1" type:"string" required:"true"` 2783 2784 // The type of scaling policy. 2785 // 2786 // PolicyType is a required field 2787 PolicyType *string `type:"string" required:"true" enum:"PolicyType"` 2788 2789 // The target tracking scaling policy. Includes support for predefined or customized 2790 // metrics. 2791 TargetTrackingConfiguration *TargetTrackingConfiguration `type:"structure"` 2792 } 2793 2794 // String returns the string representation. 2795 // 2796 // API parameter values that are decorated as "sensitive" in the API will not 2797 // be included in the string output. The member name will be present, but the 2798 // value will be replaced with "sensitive". 2799 func (s ScalingPolicy) String() string { 2800 return awsutil.Prettify(s) 2801 } 2802 2803 // GoString returns the string representation. 2804 // 2805 // API parameter values that are decorated as "sensitive" in the API will not 2806 // be included in the string output. The member name will be present, but the 2807 // value will be replaced with "sensitive". 2808 func (s ScalingPolicy) GoString() string { 2809 return s.String() 2810 } 2811 2812 // SetPolicyName sets the PolicyName field's value. 2813 func (s *ScalingPolicy) SetPolicyName(v string) *ScalingPolicy { 2814 s.PolicyName = &v 2815 return s 2816 } 2817 2818 // SetPolicyType sets the PolicyType field's value. 2819 func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy { 2820 s.PolicyType = &v 2821 return s 2822 } 2823 2824 // SetTargetTrackingConfiguration sets the TargetTrackingConfiguration field's value. 2825 func (s *ScalingPolicy) SetTargetTrackingConfiguration(v *TargetTrackingConfiguration) *ScalingPolicy { 2826 s.TargetTrackingConfiguration = v 2827 return s 2828 } 2829 2830 // Represents a tag. 2831 type TagFilter struct { 2832 _ struct{} `type:"structure"` 2833 2834 // The tag key. 2835 Key *string `min:"1" type:"string"` 2836 2837 // The tag values (0 to 20). 2838 Values []*string `type:"list"` 2839 } 2840 2841 // String returns the string representation. 2842 // 2843 // API parameter values that are decorated as "sensitive" in the API will not 2844 // be included in the string output. The member name will be present, but the 2845 // value will be replaced with "sensitive". 2846 func (s TagFilter) String() string { 2847 return awsutil.Prettify(s) 2848 } 2849 2850 // GoString returns the string representation. 2851 // 2852 // API parameter values that are decorated as "sensitive" in the API will not 2853 // be included in the string output. The member name will be present, but the 2854 // value will be replaced with "sensitive". 2855 func (s TagFilter) GoString() string { 2856 return s.String() 2857 } 2858 2859 // Validate inspects the fields of the type to determine if they are valid. 2860 func (s *TagFilter) Validate() error { 2861 invalidParams := request.ErrInvalidParams{Context: "TagFilter"} 2862 if s.Key != nil && len(*s.Key) < 1 { 2863 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 2864 } 2865 2866 if invalidParams.Len() > 0 { 2867 return invalidParams 2868 } 2869 return nil 2870 } 2871 2872 // SetKey sets the Key field's value. 2873 func (s *TagFilter) SetKey(v string) *TagFilter { 2874 s.Key = &v 2875 return s 2876 } 2877 2878 // SetValues sets the Values field's value. 2879 func (s *TagFilter) SetValues(v []*string) *TagFilter { 2880 s.Values = v 2881 return s 2882 } 2883 2884 // Describes a target tracking configuration to use with AWS Auto Scaling. Used 2885 // with ScalingInstruction and ScalingPolicy. 2886 type TargetTrackingConfiguration struct { 2887 _ struct{} `type:"structure"` 2888 2889 // A customized metric. You can specify either a predefined metric or a customized 2890 // metric. 2891 CustomizedScalingMetricSpecification *CustomizedScalingMetricSpecification `type:"structure"` 2892 2893 // Indicates whether scale in by the target tracking scaling policy is disabled. 2894 // If the value is true, scale in is disabled and the target tracking scaling 2895 // policy doesn't remove capacity from the scalable resource. Otherwise, scale 2896 // in is enabled and the target tracking scaling policy can remove capacity 2897 // from the scalable resource. 2898 // 2899 // The default value is false. 2900 DisableScaleIn *bool `type:"boolean"` 2901 2902 // The estimated time, in seconds, until a newly launched instance can contribute 2903 // to the CloudWatch metrics. This value is used only if the resource is an 2904 // Auto Scaling group. 2905 EstimatedInstanceWarmup *int64 `type:"integer"` 2906 2907 // A predefined metric. You can specify either a predefined metric or a customized 2908 // metric. 2909 PredefinedScalingMetricSpecification *PredefinedScalingMetricSpecification `type:"structure"` 2910 2911 // The amount of time, in seconds, after a scale-in activity completes before 2912 // another scale-in activity can start. This property is not used if the scalable 2913 // resource is an Auto Scaling group. 2914 // 2915 // With the scale-in cooldown period, the intention is to scale in conservatively 2916 // to protect your application’s availability, so scale-in activities are 2917 // blocked until the cooldown period has expired. However, if another alarm 2918 // triggers a scale-out activity during the scale-in cooldown period, Auto Scaling 2919 // scales out the target immediately. In this case, the scale-in cooldown period 2920 // stops and doesn't complete. 2921 ScaleInCooldown *int64 `type:"integer"` 2922 2923 // The amount of time, in seconds, to wait for a previous scale-out activity 2924 // to take effect. This property is not used if the scalable resource is an 2925 // Auto Scaling group. 2926 // 2927 // With the scale-out cooldown period, the intention is to continuously (but 2928 // not excessively) scale out. After Auto Scaling successfully scales out using 2929 // a target tracking scaling policy, it starts to calculate the cooldown time. 2930 // The scaling policy won't increase the desired capacity again unless either 2931 // a larger scale out is triggered or the cooldown period ends. 2932 ScaleOutCooldown *int64 `type:"integer"` 2933 2934 // The target value for the metric. Although this property accepts numbers of 2935 // type Double, it won't accept values that are either too small or too large. 2936 // Values must be in the range of -2^360 to 2^360. 2937 // 2938 // TargetValue is a required field 2939 TargetValue *float64 `type:"double" required:"true"` 2940 } 2941 2942 // String returns the string representation. 2943 // 2944 // API parameter values that are decorated as "sensitive" in the API will not 2945 // be included in the string output. The member name will be present, but the 2946 // value will be replaced with "sensitive". 2947 func (s TargetTrackingConfiguration) String() string { 2948 return awsutil.Prettify(s) 2949 } 2950 2951 // GoString returns the string representation. 2952 // 2953 // API parameter values that are decorated as "sensitive" in the API will not 2954 // be included in the string output. The member name will be present, but the 2955 // value will be replaced with "sensitive". 2956 func (s TargetTrackingConfiguration) GoString() string { 2957 return s.String() 2958 } 2959 2960 // Validate inspects the fields of the type to determine if they are valid. 2961 func (s *TargetTrackingConfiguration) Validate() error { 2962 invalidParams := request.ErrInvalidParams{Context: "TargetTrackingConfiguration"} 2963 if s.TargetValue == nil { 2964 invalidParams.Add(request.NewErrParamRequired("TargetValue")) 2965 } 2966 if s.CustomizedScalingMetricSpecification != nil { 2967 if err := s.CustomizedScalingMetricSpecification.Validate(); err != nil { 2968 invalidParams.AddNested("CustomizedScalingMetricSpecification", err.(request.ErrInvalidParams)) 2969 } 2970 } 2971 if s.PredefinedScalingMetricSpecification != nil { 2972 if err := s.PredefinedScalingMetricSpecification.Validate(); err != nil { 2973 invalidParams.AddNested("PredefinedScalingMetricSpecification", err.(request.ErrInvalidParams)) 2974 } 2975 } 2976 2977 if invalidParams.Len() > 0 { 2978 return invalidParams 2979 } 2980 return nil 2981 } 2982 2983 // SetCustomizedScalingMetricSpecification sets the CustomizedScalingMetricSpecification field's value. 2984 func (s *TargetTrackingConfiguration) SetCustomizedScalingMetricSpecification(v *CustomizedScalingMetricSpecification) *TargetTrackingConfiguration { 2985 s.CustomizedScalingMetricSpecification = v 2986 return s 2987 } 2988 2989 // SetDisableScaleIn sets the DisableScaleIn field's value. 2990 func (s *TargetTrackingConfiguration) SetDisableScaleIn(v bool) *TargetTrackingConfiguration { 2991 s.DisableScaleIn = &v 2992 return s 2993 } 2994 2995 // SetEstimatedInstanceWarmup sets the EstimatedInstanceWarmup field's value. 2996 func (s *TargetTrackingConfiguration) SetEstimatedInstanceWarmup(v int64) *TargetTrackingConfiguration { 2997 s.EstimatedInstanceWarmup = &v 2998 return s 2999 } 3000 3001 // SetPredefinedScalingMetricSpecification sets the PredefinedScalingMetricSpecification field's value. 3002 func (s *TargetTrackingConfiguration) SetPredefinedScalingMetricSpecification(v *PredefinedScalingMetricSpecification) *TargetTrackingConfiguration { 3003 s.PredefinedScalingMetricSpecification = v 3004 return s 3005 } 3006 3007 // SetScaleInCooldown sets the ScaleInCooldown field's value. 3008 func (s *TargetTrackingConfiguration) SetScaleInCooldown(v int64) *TargetTrackingConfiguration { 3009 s.ScaleInCooldown = &v 3010 return s 3011 } 3012 3013 // SetScaleOutCooldown sets the ScaleOutCooldown field's value. 3014 func (s *TargetTrackingConfiguration) SetScaleOutCooldown(v int64) *TargetTrackingConfiguration { 3015 s.ScaleOutCooldown = &v 3016 return s 3017 } 3018 3019 // SetTargetValue sets the TargetValue field's value. 3020 func (s *TargetTrackingConfiguration) SetTargetValue(v float64) *TargetTrackingConfiguration { 3021 s.TargetValue = &v 3022 return s 3023 } 3024 3025 type UpdateScalingPlanInput struct { 3026 _ struct{} `type:"structure"` 3027 3028 // A CloudFormation stack or set of tags. 3029 // 3030 // For more information, see ApplicationSource (https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ApplicationSource.html) 3031 // in the AWS Auto Scaling API Reference. 3032 ApplicationSource *ApplicationSource `type:"structure"` 3033 3034 // The scaling instructions. 3035 // 3036 // For more information, see ScalingInstruction (https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html) 3037 // in the AWS Auto Scaling API Reference. 3038 ScalingInstructions []*ScalingInstruction `type:"list"` 3039 3040 // The name of the scaling plan. 3041 // 3042 // ScalingPlanName is a required field 3043 ScalingPlanName *string `min:"1" type:"string" required:"true"` 3044 3045 // The version number of the scaling plan. The only valid value is 1. Currently, 3046 // you cannot have multiple scaling plan versions. 3047 // 3048 // ScalingPlanVersion is a required field 3049 ScalingPlanVersion *int64 `type:"long" required:"true"` 3050 } 3051 3052 // String returns the string representation. 3053 // 3054 // API parameter values that are decorated as "sensitive" in the API will not 3055 // be included in the string output. The member name will be present, but the 3056 // value will be replaced with "sensitive". 3057 func (s UpdateScalingPlanInput) String() string { 3058 return awsutil.Prettify(s) 3059 } 3060 3061 // GoString returns the string representation. 3062 // 3063 // API parameter values that are decorated as "sensitive" in the API will not 3064 // be included in the string output. The member name will be present, but the 3065 // value will be replaced with "sensitive". 3066 func (s UpdateScalingPlanInput) GoString() string { 3067 return s.String() 3068 } 3069 3070 // Validate inspects the fields of the type to determine if they are valid. 3071 func (s *UpdateScalingPlanInput) Validate() error { 3072 invalidParams := request.ErrInvalidParams{Context: "UpdateScalingPlanInput"} 3073 if s.ScalingPlanName == nil { 3074 invalidParams.Add(request.NewErrParamRequired("ScalingPlanName")) 3075 } 3076 if s.ScalingPlanName != nil && len(*s.ScalingPlanName) < 1 { 3077 invalidParams.Add(request.NewErrParamMinLen("ScalingPlanName", 1)) 3078 } 3079 if s.ScalingPlanVersion == nil { 3080 invalidParams.Add(request.NewErrParamRequired("ScalingPlanVersion")) 3081 } 3082 if s.ApplicationSource != nil { 3083 if err := s.ApplicationSource.Validate(); err != nil { 3084 invalidParams.AddNested("ApplicationSource", err.(request.ErrInvalidParams)) 3085 } 3086 } 3087 if s.ScalingInstructions != nil { 3088 for i, v := range s.ScalingInstructions { 3089 if v == nil { 3090 continue 3091 } 3092 if err := v.Validate(); err != nil { 3093 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScalingInstructions", i), err.(request.ErrInvalidParams)) 3094 } 3095 } 3096 } 3097 3098 if invalidParams.Len() > 0 { 3099 return invalidParams 3100 } 3101 return nil 3102 } 3103 3104 // SetApplicationSource sets the ApplicationSource field's value. 3105 func (s *UpdateScalingPlanInput) SetApplicationSource(v *ApplicationSource) *UpdateScalingPlanInput { 3106 s.ApplicationSource = v 3107 return s 3108 } 3109 3110 // SetScalingInstructions sets the ScalingInstructions field's value. 3111 func (s *UpdateScalingPlanInput) SetScalingInstructions(v []*ScalingInstruction) *UpdateScalingPlanInput { 3112 s.ScalingInstructions = v 3113 return s 3114 } 3115 3116 // SetScalingPlanName sets the ScalingPlanName field's value. 3117 func (s *UpdateScalingPlanInput) SetScalingPlanName(v string) *UpdateScalingPlanInput { 3118 s.ScalingPlanName = &v 3119 return s 3120 } 3121 3122 // SetScalingPlanVersion sets the ScalingPlanVersion field's value. 3123 func (s *UpdateScalingPlanInput) SetScalingPlanVersion(v int64) *UpdateScalingPlanInput { 3124 s.ScalingPlanVersion = &v 3125 return s 3126 } 3127 3128 type UpdateScalingPlanOutput struct { 3129 _ struct{} `type:"structure"` 3130 } 3131 3132 // String returns the string representation. 3133 // 3134 // API parameter values that are decorated as "sensitive" in the API will not 3135 // be included in the string output. The member name will be present, but the 3136 // value will be replaced with "sensitive". 3137 func (s UpdateScalingPlanOutput) String() string { 3138 return awsutil.Prettify(s) 3139 } 3140 3141 // GoString returns the string representation. 3142 // 3143 // API parameter values that are decorated as "sensitive" in the API will not 3144 // be included in the string output. The member name will be present, but the 3145 // value will be replaced with "sensitive". 3146 func (s UpdateScalingPlanOutput) GoString() string { 3147 return s.String() 3148 } 3149 3150 // An exception was thrown for a validation issue. Review the parameters provided. 3151 type ValidationException struct { 3152 _ struct{} `type:"structure"` 3153 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3154 3155 Message_ *string `locationName:"Message" type:"string"` 3156 } 3157 3158 // String returns the string representation. 3159 // 3160 // API parameter values that are decorated as "sensitive" in the API will not 3161 // be included in the string output. The member name will be present, but the 3162 // value will be replaced with "sensitive". 3163 func (s ValidationException) String() string { 3164 return awsutil.Prettify(s) 3165 } 3166 3167 // GoString returns the string representation. 3168 // 3169 // API parameter values that are decorated as "sensitive" in the API will not 3170 // be included in the string output. The member name will be present, but the 3171 // value will be replaced with "sensitive". 3172 func (s ValidationException) GoString() string { 3173 return s.String() 3174 } 3175 3176 func newErrorValidationException(v protocol.ResponseMetadata) error { 3177 return &ValidationException{ 3178 RespMetadata: v, 3179 } 3180 } 3181 3182 // Code returns the exception type name. 3183 func (s *ValidationException) Code() string { 3184 return "ValidationException" 3185 } 3186 3187 // Message returns the exception's message. 3188 func (s *ValidationException) Message() string { 3189 if s.Message_ != nil { 3190 return *s.Message_ 3191 } 3192 return "" 3193 } 3194 3195 // OrigErr always returns nil, satisfies awserr.Error interface. 3196 func (s *ValidationException) OrigErr() error { 3197 return nil 3198 } 3199 3200 func (s *ValidationException) Error() string { 3201 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3202 } 3203 3204 // Status code returns the HTTP status code for the request's response error. 3205 func (s *ValidationException) StatusCode() int { 3206 return s.RespMetadata.StatusCode 3207 } 3208 3209 // RequestID returns the service's response RequestID for request. 3210 func (s *ValidationException) RequestID() string { 3211 return s.RespMetadata.RequestID 3212 } 3213 3214 const ( 3215 // ForecastDataTypeCapacityForecast is a ForecastDataType enum value 3216 ForecastDataTypeCapacityForecast = "CapacityForecast" 3217 3218 // ForecastDataTypeLoadForecast is a ForecastDataType enum value 3219 ForecastDataTypeLoadForecast = "LoadForecast" 3220 3221 // ForecastDataTypeScheduledActionMinCapacity is a ForecastDataType enum value 3222 ForecastDataTypeScheduledActionMinCapacity = "ScheduledActionMinCapacity" 3223 3224 // ForecastDataTypeScheduledActionMaxCapacity is a ForecastDataType enum value 3225 ForecastDataTypeScheduledActionMaxCapacity = "ScheduledActionMaxCapacity" 3226 ) 3227 3228 // ForecastDataType_Values returns all elements of the ForecastDataType enum 3229 func ForecastDataType_Values() []string { 3230 return []string{ 3231 ForecastDataTypeCapacityForecast, 3232 ForecastDataTypeLoadForecast, 3233 ForecastDataTypeScheduledActionMinCapacity, 3234 ForecastDataTypeScheduledActionMaxCapacity, 3235 } 3236 } 3237 3238 const ( 3239 // LoadMetricTypeAsgtotalCpuutilization is a LoadMetricType enum value 3240 LoadMetricTypeAsgtotalCpuutilization = "ASGTotalCPUUtilization" 3241 3242 // LoadMetricTypeAsgtotalNetworkIn is a LoadMetricType enum value 3243 LoadMetricTypeAsgtotalNetworkIn = "ASGTotalNetworkIn" 3244 3245 // LoadMetricTypeAsgtotalNetworkOut is a LoadMetricType enum value 3246 LoadMetricTypeAsgtotalNetworkOut = "ASGTotalNetworkOut" 3247 3248 // LoadMetricTypeAlbtargetGroupRequestCount is a LoadMetricType enum value 3249 LoadMetricTypeAlbtargetGroupRequestCount = "ALBTargetGroupRequestCount" 3250 ) 3251 3252 // LoadMetricType_Values returns all elements of the LoadMetricType enum 3253 func LoadMetricType_Values() []string { 3254 return []string{ 3255 LoadMetricTypeAsgtotalCpuutilization, 3256 LoadMetricTypeAsgtotalNetworkIn, 3257 LoadMetricTypeAsgtotalNetworkOut, 3258 LoadMetricTypeAlbtargetGroupRequestCount, 3259 } 3260 } 3261 3262 const ( 3263 // MetricStatisticAverage is a MetricStatistic enum value 3264 MetricStatisticAverage = "Average" 3265 3266 // MetricStatisticMinimum is a MetricStatistic enum value 3267 MetricStatisticMinimum = "Minimum" 3268 3269 // MetricStatisticMaximum is a MetricStatistic enum value 3270 MetricStatisticMaximum = "Maximum" 3271 3272 // MetricStatisticSampleCount is a MetricStatistic enum value 3273 MetricStatisticSampleCount = "SampleCount" 3274 3275 // MetricStatisticSum is a MetricStatistic enum value 3276 MetricStatisticSum = "Sum" 3277 ) 3278 3279 // MetricStatistic_Values returns all elements of the MetricStatistic enum 3280 func MetricStatistic_Values() []string { 3281 return []string{ 3282 MetricStatisticAverage, 3283 MetricStatisticMinimum, 3284 MetricStatisticMaximum, 3285 MetricStatisticSampleCount, 3286 MetricStatisticSum, 3287 } 3288 } 3289 3290 const ( 3291 // PolicyTypeTargetTrackingScaling is a PolicyType enum value 3292 PolicyTypeTargetTrackingScaling = "TargetTrackingScaling" 3293 ) 3294 3295 // PolicyType_Values returns all elements of the PolicyType enum 3296 func PolicyType_Values() []string { 3297 return []string{ 3298 PolicyTypeTargetTrackingScaling, 3299 } 3300 } 3301 3302 const ( 3303 // PredictiveScalingMaxCapacityBehaviorSetForecastCapacityToMaxCapacity is a PredictiveScalingMaxCapacityBehavior enum value 3304 PredictiveScalingMaxCapacityBehaviorSetForecastCapacityToMaxCapacity = "SetForecastCapacityToMaxCapacity" 3305 3306 // PredictiveScalingMaxCapacityBehaviorSetMaxCapacityToForecastCapacity is a PredictiveScalingMaxCapacityBehavior enum value 3307 PredictiveScalingMaxCapacityBehaviorSetMaxCapacityToForecastCapacity = "SetMaxCapacityToForecastCapacity" 3308 3309 // PredictiveScalingMaxCapacityBehaviorSetMaxCapacityAboveForecastCapacity is a PredictiveScalingMaxCapacityBehavior enum value 3310 PredictiveScalingMaxCapacityBehaviorSetMaxCapacityAboveForecastCapacity = "SetMaxCapacityAboveForecastCapacity" 3311 ) 3312 3313 // PredictiveScalingMaxCapacityBehavior_Values returns all elements of the PredictiveScalingMaxCapacityBehavior enum 3314 func PredictiveScalingMaxCapacityBehavior_Values() []string { 3315 return []string{ 3316 PredictiveScalingMaxCapacityBehaviorSetForecastCapacityToMaxCapacity, 3317 PredictiveScalingMaxCapacityBehaviorSetMaxCapacityToForecastCapacity, 3318 PredictiveScalingMaxCapacityBehaviorSetMaxCapacityAboveForecastCapacity, 3319 } 3320 } 3321 3322 const ( 3323 // PredictiveScalingModeForecastAndScale is a PredictiveScalingMode enum value 3324 PredictiveScalingModeForecastAndScale = "ForecastAndScale" 3325 3326 // PredictiveScalingModeForecastOnly is a PredictiveScalingMode enum value 3327 PredictiveScalingModeForecastOnly = "ForecastOnly" 3328 ) 3329 3330 // PredictiveScalingMode_Values returns all elements of the PredictiveScalingMode enum 3331 func PredictiveScalingMode_Values() []string { 3332 return []string{ 3333 PredictiveScalingModeForecastAndScale, 3334 PredictiveScalingModeForecastOnly, 3335 } 3336 } 3337 3338 const ( 3339 // ScalableDimensionAutoscalingAutoScalingGroupDesiredCapacity is a ScalableDimension enum value 3340 ScalableDimensionAutoscalingAutoScalingGroupDesiredCapacity = "autoscaling:autoScalingGroup:DesiredCapacity" 3341 3342 // ScalableDimensionEcsServiceDesiredCount is a ScalableDimension enum value 3343 ScalableDimensionEcsServiceDesiredCount = "ecs:service:DesiredCount" 3344 3345 // ScalableDimensionEc2SpotFleetRequestTargetCapacity is a ScalableDimension enum value 3346 ScalableDimensionEc2SpotFleetRequestTargetCapacity = "ec2:spot-fleet-request:TargetCapacity" 3347 3348 // ScalableDimensionRdsClusterReadReplicaCount is a ScalableDimension enum value 3349 ScalableDimensionRdsClusterReadReplicaCount = "rds:cluster:ReadReplicaCount" 3350 3351 // ScalableDimensionDynamodbTableReadCapacityUnits is a ScalableDimension enum value 3352 ScalableDimensionDynamodbTableReadCapacityUnits = "dynamodb:table:ReadCapacityUnits" 3353 3354 // ScalableDimensionDynamodbTableWriteCapacityUnits is a ScalableDimension enum value 3355 ScalableDimensionDynamodbTableWriteCapacityUnits = "dynamodb:table:WriteCapacityUnits" 3356 3357 // ScalableDimensionDynamodbIndexReadCapacityUnits is a ScalableDimension enum value 3358 ScalableDimensionDynamodbIndexReadCapacityUnits = "dynamodb:index:ReadCapacityUnits" 3359 3360 // ScalableDimensionDynamodbIndexWriteCapacityUnits is a ScalableDimension enum value 3361 ScalableDimensionDynamodbIndexWriteCapacityUnits = "dynamodb:index:WriteCapacityUnits" 3362 ) 3363 3364 // ScalableDimension_Values returns all elements of the ScalableDimension enum 3365 func ScalableDimension_Values() []string { 3366 return []string{ 3367 ScalableDimensionAutoscalingAutoScalingGroupDesiredCapacity, 3368 ScalableDimensionEcsServiceDesiredCount, 3369 ScalableDimensionEc2SpotFleetRequestTargetCapacity, 3370 ScalableDimensionRdsClusterReadReplicaCount, 3371 ScalableDimensionDynamodbTableReadCapacityUnits, 3372 ScalableDimensionDynamodbTableWriteCapacityUnits, 3373 ScalableDimensionDynamodbIndexReadCapacityUnits, 3374 ScalableDimensionDynamodbIndexWriteCapacityUnits, 3375 } 3376 } 3377 3378 const ( 3379 // ScalingMetricTypeAsgaverageCpuutilization is a ScalingMetricType enum value 3380 ScalingMetricTypeAsgaverageCpuutilization = "ASGAverageCPUUtilization" 3381 3382 // ScalingMetricTypeAsgaverageNetworkIn is a ScalingMetricType enum value 3383 ScalingMetricTypeAsgaverageNetworkIn = "ASGAverageNetworkIn" 3384 3385 // ScalingMetricTypeAsgaverageNetworkOut is a ScalingMetricType enum value 3386 ScalingMetricTypeAsgaverageNetworkOut = "ASGAverageNetworkOut" 3387 3388 // ScalingMetricTypeDynamoDbreadCapacityUtilization is a ScalingMetricType enum value 3389 ScalingMetricTypeDynamoDbreadCapacityUtilization = "DynamoDBReadCapacityUtilization" 3390 3391 // ScalingMetricTypeDynamoDbwriteCapacityUtilization is a ScalingMetricType enum value 3392 ScalingMetricTypeDynamoDbwriteCapacityUtilization = "DynamoDBWriteCapacityUtilization" 3393 3394 // ScalingMetricTypeEcsserviceAverageCpuutilization is a ScalingMetricType enum value 3395 ScalingMetricTypeEcsserviceAverageCpuutilization = "ECSServiceAverageCPUUtilization" 3396 3397 // ScalingMetricTypeEcsserviceAverageMemoryUtilization is a ScalingMetricType enum value 3398 ScalingMetricTypeEcsserviceAverageMemoryUtilization = "ECSServiceAverageMemoryUtilization" 3399 3400 // ScalingMetricTypeAlbrequestCountPerTarget is a ScalingMetricType enum value 3401 ScalingMetricTypeAlbrequestCountPerTarget = "ALBRequestCountPerTarget" 3402 3403 // ScalingMetricTypeRdsreaderAverageCpuutilization is a ScalingMetricType enum value 3404 ScalingMetricTypeRdsreaderAverageCpuutilization = "RDSReaderAverageCPUUtilization" 3405 3406 // ScalingMetricTypeRdsreaderAverageDatabaseConnections is a ScalingMetricType enum value 3407 ScalingMetricTypeRdsreaderAverageDatabaseConnections = "RDSReaderAverageDatabaseConnections" 3408 3409 // ScalingMetricTypeEc2spotFleetRequestAverageCpuutilization is a ScalingMetricType enum value 3410 ScalingMetricTypeEc2spotFleetRequestAverageCpuutilization = "EC2SpotFleetRequestAverageCPUUtilization" 3411 3412 // ScalingMetricTypeEc2spotFleetRequestAverageNetworkIn is a ScalingMetricType enum value 3413 ScalingMetricTypeEc2spotFleetRequestAverageNetworkIn = "EC2SpotFleetRequestAverageNetworkIn" 3414 3415 // ScalingMetricTypeEc2spotFleetRequestAverageNetworkOut is a ScalingMetricType enum value 3416 ScalingMetricTypeEc2spotFleetRequestAverageNetworkOut = "EC2SpotFleetRequestAverageNetworkOut" 3417 ) 3418 3419 // ScalingMetricType_Values returns all elements of the ScalingMetricType enum 3420 func ScalingMetricType_Values() []string { 3421 return []string{ 3422 ScalingMetricTypeAsgaverageCpuutilization, 3423 ScalingMetricTypeAsgaverageNetworkIn, 3424 ScalingMetricTypeAsgaverageNetworkOut, 3425 ScalingMetricTypeDynamoDbreadCapacityUtilization, 3426 ScalingMetricTypeDynamoDbwriteCapacityUtilization, 3427 ScalingMetricTypeEcsserviceAverageCpuutilization, 3428 ScalingMetricTypeEcsserviceAverageMemoryUtilization, 3429 ScalingMetricTypeAlbrequestCountPerTarget, 3430 ScalingMetricTypeRdsreaderAverageCpuutilization, 3431 ScalingMetricTypeRdsreaderAverageDatabaseConnections, 3432 ScalingMetricTypeEc2spotFleetRequestAverageCpuutilization, 3433 ScalingMetricTypeEc2spotFleetRequestAverageNetworkIn, 3434 ScalingMetricTypeEc2spotFleetRequestAverageNetworkOut, 3435 } 3436 } 3437 3438 const ( 3439 // ScalingPlanStatusCodeActive is a ScalingPlanStatusCode enum value 3440 ScalingPlanStatusCodeActive = "Active" 3441 3442 // ScalingPlanStatusCodeActiveWithProblems is a ScalingPlanStatusCode enum value 3443 ScalingPlanStatusCodeActiveWithProblems = "ActiveWithProblems" 3444 3445 // ScalingPlanStatusCodeCreationInProgress is a ScalingPlanStatusCode enum value 3446 ScalingPlanStatusCodeCreationInProgress = "CreationInProgress" 3447 3448 // ScalingPlanStatusCodeCreationFailed is a ScalingPlanStatusCode enum value 3449 ScalingPlanStatusCodeCreationFailed = "CreationFailed" 3450 3451 // ScalingPlanStatusCodeDeletionInProgress is a ScalingPlanStatusCode enum value 3452 ScalingPlanStatusCodeDeletionInProgress = "DeletionInProgress" 3453 3454 // ScalingPlanStatusCodeDeletionFailed is a ScalingPlanStatusCode enum value 3455 ScalingPlanStatusCodeDeletionFailed = "DeletionFailed" 3456 3457 // ScalingPlanStatusCodeUpdateInProgress is a ScalingPlanStatusCode enum value 3458 ScalingPlanStatusCodeUpdateInProgress = "UpdateInProgress" 3459 3460 // ScalingPlanStatusCodeUpdateFailed is a ScalingPlanStatusCode enum value 3461 ScalingPlanStatusCodeUpdateFailed = "UpdateFailed" 3462 ) 3463 3464 // ScalingPlanStatusCode_Values returns all elements of the ScalingPlanStatusCode enum 3465 func ScalingPlanStatusCode_Values() []string { 3466 return []string{ 3467 ScalingPlanStatusCodeActive, 3468 ScalingPlanStatusCodeActiveWithProblems, 3469 ScalingPlanStatusCodeCreationInProgress, 3470 ScalingPlanStatusCodeCreationFailed, 3471 ScalingPlanStatusCodeDeletionInProgress, 3472 ScalingPlanStatusCodeDeletionFailed, 3473 ScalingPlanStatusCodeUpdateInProgress, 3474 ScalingPlanStatusCodeUpdateFailed, 3475 } 3476 } 3477 3478 const ( 3479 // ScalingPolicyUpdateBehaviorKeepExternalPolicies is a ScalingPolicyUpdateBehavior enum value 3480 ScalingPolicyUpdateBehaviorKeepExternalPolicies = "KeepExternalPolicies" 3481 3482 // ScalingPolicyUpdateBehaviorReplaceExternalPolicies is a ScalingPolicyUpdateBehavior enum value 3483 ScalingPolicyUpdateBehaviorReplaceExternalPolicies = "ReplaceExternalPolicies" 3484 ) 3485 3486 // ScalingPolicyUpdateBehavior_Values returns all elements of the ScalingPolicyUpdateBehavior enum 3487 func ScalingPolicyUpdateBehavior_Values() []string { 3488 return []string{ 3489 ScalingPolicyUpdateBehaviorKeepExternalPolicies, 3490 ScalingPolicyUpdateBehaviorReplaceExternalPolicies, 3491 } 3492 } 3493 3494 const ( 3495 // ScalingStatusCodeInactive is a ScalingStatusCode enum value 3496 ScalingStatusCodeInactive = "Inactive" 3497 3498 // ScalingStatusCodePartiallyActive is a ScalingStatusCode enum value 3499 ScalingStatusCodePartiallyActive = "PartiallyActive" 3500 3501 // ScalingStatusCodeActive is a ScalingStatusCode enum value 3502 ScalingStatusCodeActive = "Active" 3503 ) 3504 3505 // ScalingStatusCode_Values returns all elements of the ScalingStatusCode enum 3506 func ScalingStatusCode_Values() []string { 3507 return []string{ 3508 ScalingStatusCodeInactive, 3509 ScalingStatusCodePartiallyActive, 3510 ScalingStatusCodeActive, 3511 } 3512 } 3513 3514 const ( 3515 // ServiceNamespaceAutoscaling is a ServiceNamespace enum value 3516 ServiceNamespaceAutoscaling = "autoscaling" 3517 3518 // ServiceNamespaceEcs is a ServiceNamespace enum value 3519 ServiceNamespaceEcs = "ecs" 3520 3521 // ServiceNamespaceEc2 is a ServiceNamespace enum value 3522 ServiceNamespaceEc2 = "ec2" 3523 3524 // ServiceNamespaceRds is a ServiceNamespace enum value 3525 ServiceNamespaceRds = "rds" 3526 3527 // ServiceNamespaceDynamodb is a ServiceNamespace enum value 3528 ServiceNamespaceDynamodb = "dynamodb" 3529 ) 3530 3531 // ServiceNamespace_Values returns all elements of the ServiceNamespace enum 3532 func ServiceNamespace_Values() []string { 3533 return []string{ 3534 ServiceNamespaceAutoscaling, 3535 ServiceNamespaceEcs, 3536 ServiceNamespaceEc2, 3537 ServiceNamespaceRds, 3538 ServiceNamespaceDynamodb, 3539 } 3540 }