1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package computeoptimizer 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13) 14 15const opGetAutoScalingGroupRecommendations = "GetAutoScalingGroupRecommendations" 16 17// GetAutoScalingGroupRecommendationsRequest generates a "aws/request.Request" representing the 18// client's request for the GetAutoScalingGroupRecommendations operation. The "output" return 19// value will be populated with the request's response once the request completes 20// successfully. 21// 22// Use "Send" method on the returned Request to send the API call to the service. 23// the "output" return value is not valid until after Send returns without error. 24// 25// See GetAutoScalingGroupRecommendations for more information on using the GetAutoScalingGroupRecommendations 26// API call, and error handling. 27// 28// This method is useful when you want to inject custom logic or configuration 29// into the SDK's request lifecycle. Such as custom headers, or retry logic. 30// 31// 32// // Example sending a request using the GetAutoScalingGroupRecommendationsRequest method. 33// req, resp := client.GetAutoScalingGroupRecommendationsRequest(params) 34// 35// err := req.Send() 36// if err == nil { // resp is now filled 37// fmt.Println(resp) 38// } 39// 40// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetAutoScalingGroupRecommendations 41func (c *ComputeOptimizer) GetAutoScalingGroupRecommendationsRequest(input *GetAutoScalingGroupRecommendationsInput) (req *request.Request, output *GetAutoScalingGroupRecommendationsOutput) { 42 op := &request.Operation{ 43 Name: opGetAutoScalingGroupRecommendations, 44 HTTPMethod: "POST", 45 HTTPPath: "/", 46 } 47 48 if input == nil { 49 input = &GetAutoScalingGroupRecommendationsInput{} 50 } 51 52 output = &GetAutoScalingGroupRecommendationsOutput{} 53 req = c.newRequest(op, input, output) 54 return 55} 56 57// GetAutoScalingGroupRecommendations API operation for AWS Compute Optimizer. 58// 59// Returns Auto Scaling group recommendations. 60// 61// AWS Compute Optimizer currently generates recommendations for Auto Scaling 62// groups that are configured to run instances of the M, C, R, T, and X instance 63// families. The service does not generate recommendations for Auto Scaling 64// groups that have a scaling policy attached to them, or that do not have the 65// same values for desired, minimum, and maximum capacity. In order for Compute 66// Optimizer to analyze your Auto Scaling groups, they must be of a fixed size. 67// For more information, see the AWS Compute Optimizer User Guide (https://docs.aws.amazon.com/compute-optimizer/latest/ug/what-is.html). 68// 69// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 70// with awserr.Error's Code and Message methods to get detailed information about 71// the error. 72// 73// See the AWS API reference guide for AWS Compute Optimizer's 74// API operation GetAutoScalingGroupRecommendations for usage and error information. 75// 76// Returned Error Types: 77// * OptInRequiredException 78// You must opt in to the service to perform this action. 79// 80// * InternalServerException 81// The request processing has failed because of an unknown error, exception, 82// or failure. 83// 84// * ServiceUnavailableException 85// The request has failed due to a temporary failure of the server. 86// 87// * AccessDeniedException 88// You do not have sufficient access to perform this action. 89// 90// * InvalidParameterValueException 91// An invalid or out-of-range value was supplied for the input parameter. 92// 93// * ResourceNotFoundException 94// The specified resource was not found. 95// 96// * MissingAuthenticationToken 97// The request must contain either a valid (registered) AWS access key ID or 98// X.509 certificate. 99// 100// * ThrottlingException 101// The limit on the number of requests per second was exceeded. 102// 103// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetAutoScalingGroupRecommendations 104func (c *ComputeOptimizer) GetAutoScalingGroupRecommendations(input *GetAutoScalingGroupRecommendationsInput) (*GetAutoScalingGroupRecommendationsOutput, error) { 105 req, out := c.GetAutoScalingGroupRecommendationsRequest(input) 106 return out, req.Send() 107} 108 109// GetAutoScalingGroupRecommendationsWithContext is the same as GetAutoScalingGroupRecommendations with the addition of 110// the ability to pass a context and additional request options. 111// 112// See GetAutoScalingGroupRecommendations for details on how to use this API operation. 113// 114// The context must be non-nil and will be used for request cancellation. If 115// the context is nil a panic will occur. In the future the SDK may create 116// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 117// for more information on using Contexts. 118func (c *ComputeOptimizer) GetAutoScalingGroupRecommendationsWithContext(ctx aws.Context, input *GetAutoScalingGroupRecommendationsInput, opts ...request.Option) (*GetAutoScalingGroupRecommendationsOutput, error) { 119 req, out := c.GetAutoScalingGroupRecommendationsRequest(input) 120 req.SetContext(ctx) 121 req.ApplyOptions(opts...) 122 return out, req.Send() 123} 124 125const opGetEC2InstanceRecommendations = "GetEC2InstanceRecommendations" 126 127// GetEC2InstanceRecommendationsRequest generates a "aws/request.Request" representing the 128// client's request for the GetEC2InstanceRecommendations operation. The "output" return 129// value will be populated with the request's response once the request completes 130// successfully. 131// 132// Use "Send" method on the returned Request to send the API call to the service. 133// the "output" return value is not valid until after Send returns without error. 134// 135// See GetEC2InstanceRecommendations for more information on using the GetEC2InstanceRecommendations 136// API call, and error handling. 137// 138// This method is useful when you want to inject custom logic or configuration 139// into the SDK's request lifecycle. Such as custom headers, or retry logic. 140// 141// 142// // Example sending a request using the GetEC2InstanceRecommendationsRequest method. 143// req, resp := client.GetEC2InstanceRecommendationsRequest(params) 144// 145// err := req.Send() 146// if err == nil { // resp is now filled 147// fmt.Println(resp) 148// } 149// 150// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEC2InstanceRecommendations 151func (c *ComputeOptimizer) GetEC2InstanceRecommendationsRequest(input *GetEC2InstanceRecommendationsInput) (req *request.Request, output *GetEC2InstanceRecommendationsOutput) { 152 op := &request.Operation{ 153 Name: opGetEC2InstanceRecommendations, 154 HTTPMethod: "POST", 155 HTTPPath: "/", 156 } 157 158 if input == nil { 159 input = &GetEC2InstanceRecommendationsInput{} 160 } 161 162 output = &GetEC2InstanceRecommendationsOutput{} 163 req = c.newRequest(op, input, output) 164 return 165} 166 167// GetEC2InstanceRecommendations API operation for AWS Compute Optimizer. 168// 169// Returns Amazon EC2 instance recommendations. 170// 171// AWS Compute Optimizer currently generates recommendations for Amazon Elastic 172// Compute Cloud (Amazon EC2) and Amazon EC2 Auto Scaling. It generates recommendations 173// for M, C, R, T, and X instance families. For more information, see the AWS 174// Compute Optimizer User Guide (https://docs.aws.amazon.com/compute-optimizer/latest/ug/what-is.html). 175// 176// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 177// with awserr.Error's Code and Message methods to get detailed information about 178// the error. 179// 180// See the AWS API reference guide for AWS Compute Optimizer's 181// API operation GetEC2InstanceRecommendations for usage and error information. 182// 183// Returned Error Types: 184// * OptInRequiredException 185// You must opt in to the service to perform this action. 186// 187// * InternalServerException 188// The request processing has failed because of an unknown error, exception, 189// or failure. 190// 191// * ServiceUnavailableException 192// The request has failed due to a temporary failure of the server. 193// 194// * AccessDeniedException 195// You do not have sufficient access to perform this action. 196// 197// * InvalidParameterValueException 198// An invalid or out-of-range value was supplied for the input parameter. 199// 200// * ResourceNotFoundException 201// The specified resource was not found. 202// 203// * MissingAuthenticationToken 204// The request must contain either a valid (registered) AWS access key ID or 205// X.509 certificate. 206// 207// * ThrottlingException 208// The limit on the number of requests per second was exceeded. 209// 210// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEC2InstanceRecommendations 211func (c *ComputeOptimizer) GetEC2InstanceRecommendations(input *GetEC2InstanceRecommendationsInput) (*GetEC2InstanceRecommendationsOutput, error) { 212 req, out := c.GetEC2InstanceRecommendationsRequest(input) 213 return out, req.Send() 214} 215 216// GetEC2InstanceRecommendationsWithContext is the same as GetEC2InstanceRecommendations with the addition of 217// the ability to pass a context and additional request options. 218// 219// See GetEC2InstanceRecommendations for details on how to use this API operation. 220// 221// The context must be non-nil and will be used for request cancellation. If 222// the context is nil a panic will occur. In the future the SDK may create 223// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 224// for more information on using Contexts. 225func (c *ComputeOptimizer) GetEC2InstanceRecommendationsWithContext(ctx aws.Context, input *GetEC2InstanceRecommendationsInput, opts ...request.Option) (*GetEC2InstanceRecommendationsOutput, error) { 226 req, out := c.GetEC2InstanceRecommendationsRequest(input) 227 req.SetContext(ctx) 228 req.ApplyOptions(opts...) 229 return out, req.Send() 230} 231 232const opGetEC2RecommendationProjectedMetrics = "GetEC2RecommendationProjectedMetrics" 233 234// GetEC2RecommendationProjectedMetricsRequest generates a "aws/request.Request" representing the 235// client's request for the GetEC2RecommendationProjectedMetrics operation. The "output" return 236// value will be populated with the request's response once the request completes 237// successfully. 238// 239// Use "Send" method on the returned Request to send the API call to the service. 240// the "output" return value is not valid until after Send returns without error. 241// 242// See GetEC2RecommendationProjectedMetrics for more information on using the GetEC2RecommendationProjectedMetrics 243// API call, and error handling. 244// 245// This method is useful when you want to inject custom logic or configuration 246// into the SDK's request lifecycle. Such as custom headers, or retry logic. 247// 248// 249// // Example sending a request using the GetEC2RecommendationProjectedMetricsRequest method. 250// req, resp := client.GetEC2RecommendationProjectedMetricsRequest(params) 251// 252// err := req.Send() 253// if err == nil { // resp is now filled 254// fmt.Println(resp) 255// } 256// 257// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEC2RecommendationProjectedMetrics 258func (c *ComputeOptimizer) GetEC2RecommendationProjectedMetricsRequest(input *GetEC2RecommendationProjectedMetricsInput) (req *request.Request, output *GetEC2RecommendationProjectedMetricsOutput) { 259 op := &request.Operation{ 260 Name: opGetEC2RecommendationProjectedMetrics, 261 HTTPMethod: "POST", 262 HTTPPath: "/", 263 } 264 265 if input == nil { 266 input = &GetEC2RecommendationProjectedMetricsInput{} 267 } 268 269 output = &GetEC2RecommendationProjectedMetricsOutput{} 270 req = c.newRequest(op, input, output) 271 return 272} 273 274// GetEC2RecommendationProjectedMetrics API operation for AWS Compute Optimizer. 275// 276// Returns the projected utilization metrics of Amazon EC2 instance recommendations. 277// 278// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 279// with awserr.Error's Code and Message methods to get detailed information about 280// the error. 281// 282// See the AWS API reference guide for AWS Compute Optimizer's 283// API operation GetEC2RecommendationProjectedMetrics for usage and error information. 284// 285// Returned Error Types: 286// * OptInRequiredException 287// You must opt in to the service to perform this action. 288// 289// * InternalServerException 290// The request processing has failed because of an unknown error, exception, 291// or failure. 292// 293// * ServiceUnavailableException 294// The request has failed due to a temporary failure of the server. 295// 296// * AccessDeniedException 297// You do not have sufficient access to perform this action. 298// 299// * InvalidParameterValueException 300// An invalid or out-of-range value was supplied for the input parameter. 301// 302// * ResourceNotFoundException 303// The specified resource was not found. 304// 305// * MissingAuthenticationToken 306// The request must contain either a valid (registered) AWS access key ID or 307// X.509 certificate. 308// 309// * ThrottlingException 310// The limit on the number of requests per second was exceeded. 311// 312// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEC2RecommendationProjectedMetrics 313func (c *ComputeOptimizer) GetEC2RecommendationProjectedMetrics(input *GetEC2RecommendationProjectedMetricsInput) (*GetEC2RecommendationProjectedMetricsOutput, error) { 314 req, out := c.GetEC2RecommendationProjectedMetricsRequest(input) 315 return out, req.Send() 316} 317 318// GetEC2RecommendationProjectedMetricsWithContext is the same as GetEC2RecommendationProjectedMetrics with the addition of 319// the ability to pass a context and additional request options. 320// 321// See GetEC2RecommendationProjectedMetrics for details on how to use this API operation. 322// 323// The context must be non-nil and will be used for request cancellation. If 324// the context is nil a panic will occur. In the future the SDK may create 325// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 326// for more information on using Contexts. 327func (c *ComputeOptimizer) GetEC2RecommendationProjectedMetricsWithContext(ctx aws.Context, input *GetEC2RecommendationProjectedMetricsInput, opts ...request.Option) (*GetEC2RecommendationProjectedMetricsOutput, error) { 328 req, out := c.GetEC2RecommendationProjectedMetricsRequest(input) 329 req.SetContext(ctx) 330 req.ApplyOptions(opts...) 331 return out, req.Send() 332} 333 334const opGetEnrollmentStatus = "GetEnrollmentStatus" 335 336// GetEnrollmentStatusRequest generates a "aws/request.Request" representing the 337// client's request for the GetEnrollmentStatus operation. The "output" return 338// value will be populated with the request's response once the request completes 339// successfully. 340// 341// Use "Send" method on the returned Request to send the API call to the service. 342// the "output" return value is not valid until after Send returns without error. 343// 344// See GetEnrollmentStatus for more information on using the GetEnrollmentStatus 345// API call, and error handling. 346// 347// This method is useful when you want to inject custom logic or configuration 348// into the SDK's request lifecycle. Such as custom headers, or retry logic. 349// 350// 351// // Example sending a request using the GetEnrollmentStatusRequest method. 352// req, resp := client.GetEnrollmentStatusRequest(params) 353// 354// err := req.Send() 355// if err == nil { // resp is now filled 356// fmt.Println(resp) 357// } 358// 359// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEnrollmentStatus 360func (c *ComputeOptimizer) GetEnrollmentStatusRequest(input *GetEnrollmentStatusInput) (req *request.Request, output *GetEnrollmentStatusOutput) { 361 op := &request.Operation{ 362 Name: opGetEnrollmentStatus, 363 HTTPMethod: "POST", 364 HTTPPath: "/", 365 } 366 367 if input == nil { 368 input = &GetEnrollmentStatusInput{} 369 } 370 371 output = &GetEnrollmentStatusOutput{} 372 req = c.newRequest(op, input, output) 373 return 374} 375 376// GetEnrollmentStatus API operation for AWS Compute Optimizer. 377// 378// Returns the enrollment (opt in) status of an account to the AWS Compute Optimizer 379// service. 380// 381// If the account is a master account of an organization, this operation also 382// confirms the enrollment status of member accounts within the organization. 383// 384// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 385// with awserr.Error's Code and Message methods to get detailed information about 386// the error. 387// 388// See the AWS API reference guide for AWS Compute Optimizer's 389// API operation GetEnrollmentStatus for usage and error information. 390// 391// Returned Error Types: 392// * InternalServerException 393// The request processing has failed because of an unknown error, exception, 394// or failure. 395// 396// * ServiceUnavailableException 397// The request has failed due to a temporary failure of the server. 398// 399// * AccessDeniedException 400// You do not have sufficient access to perform this action. 401// 402// * InvalidParameterValueException 403// An invalid or out-of-range value was supplied for the input parameter. 404// 405// * MissingAuthenticationToken 406// The request must contain either a valid (registered) AWS access key ID or 407// X.509 certificate. 408// 409// * ThrottlingException 410// The limit on the number of requests per second was exceeded. 411// 412// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEnrollmentStatus 413func (c *ComputeOptimizer) GetEnrollmentStatus(input *GetEnrollmentStatusInput) (*GetEnrollmentStatusOutput, error) { 414 req, out := c.GetEnrollmentStatusRequest(input) 415 return out, req.Send() 416} 417 418// GetEnrollmentStatusWithContext is the same as GetEnrollmentStatus with the addition of 419// the ability to pass a context and additional request options. 420// 421// See GetEnrollmentStatus for details on how to use this API operation. 422// 423// The context must be non-nil and will be used for request cancellation. If 424// the context is nil a panic will occur. In the future the SDK may create 425// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 426// for more information on using Contexts. 427func (c *ComputeOptimizer) GetEnrollmentStatusWithContext(ctx aws.Context, input *GetEnrollmentStatusInput, opts ...request.Option) (*GetEnrollmentStatusOutput, error) { 428 req, out := c.GetEnrollmentStatusRequest(input) 429 req.SetContext(ctx) 430 req.ApplyOptions(opts...) 431 return out, req.Send() 432} 433 434const opGetRecommendationSummaries = "GetRecommendationSummaries" 435 436// GetRecommendationSummariesRequest generates a "aws/request.Request" representing the 437// client's request for the GetRecommendationSummaries operation. The "output" return 438// value will be populated with the request's response once the request completes 439// successfully. 440// 441// Use "Send" method on the returned Request to send the API call to the service. 442// the "output" return value is not valid until after Send returns without error. 443// 444// See GetRecommendationSummaries for more information on using the GetRecommendationSummaries 445// API call, and error handling. 446// 447// This method is useful when you want to inject custom logic or configuration 448// into the SDK's request lifecycle. Such as custom headers, or retry logic. 449// 450// 451// // Example sending a request using the GetRecommendationSummariesRequest method. 452// req, resp := client.GetRecommendationSummariesRequest(params) 453// 454// err := req.Send() 455// if err == nil { // resp is now filled 456// fmt.Println(resp) 457// } 458// 459// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetRecommendationSummaries 460func (c *ComputeOptimizer) GetRecommendationSummariesRequest(input *GetRecommendationSummariesInput) (req *request.Request, output *GetRecommendationSummariesOutput) { 461 op := &request.Operation{ 462 Name: opGetRecommendationSummaries, 463 HTTPMethod: "POST", 464 HTTPPath: "/", 465 } 466 467 if input == nil { 468 input = &GetRecommendationSummariesInput{} 469 } 470 471 output = &GetRecommendationSummariesOutput{} 472 req = c.newRequest(op, input, output) 473 return 474} 475 476// GetRecommendationSummaries API operation for AWS Compute Optimizer. 477// 478// Returns the optimization findings for an account. 479// 480// For example, it returns the number of Amazon EC2 instances in an account 481// that are under-provisioned, over-provisioned, or optimized. It also returns 482// the number of Auto Scaling groups in an account that are not optimized, or 483// optimized. 484// 485// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 486// with awserr.Error's Code and Message methods to get detailed information about 487// the error. 488// 489// See the AWS API reference guide for AWS Compute Optimizer's 490// API operation GetRecommendationSummaries for usage and error information. 491// 492// Returned Error Types: 493// * OptInRequiredException 494// You must opt in to the service to perform this action. 495// 496// * InternalServerException 497// The request processing has failed because of an unknown error, exception, 498// or failure. 499// 500// * ServiceUnavailableException 501// The request has failed due to a temporary failure of the server. 502// 503// * AccessDeniedException 504// You do not have sufficient access to perform this action. 505// 506// * InvalidParameterValueException 507// An invalid or out-of-range value was supplied for the input parameter. 508// 509// * MissingAuthenticationToken 510// The request must contain either a valid (registered) AWS access key ID or 511// X.509 certificate. 512// 513// * ThrottlingException 514// The limit on the number of requests per second was exceeded. 515// 516// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetRecommendationSummaries 517func (c *ComputeOptimizer) GetRecommendationSummaries(input *GetRecommendationSummariesInput) (*GetRecommendationSummariesOutput, error) { 518 req, out := c.GetRecommendationSummariesRequest(input) 519 return out, req.Send() 520} 521 522// GetRecommendationSummariesWithContext is the same as GetRecommendationSummaries with the addition of 523// the ability to pass a context and additional request options. 524// 525// See GetRecommendationSummaries for details on how to use this API operation. 526// 527// The context must be non-nil and will be used for request cancellation. If 528// the context is nil a panic will occur. In the future the SDK may create 529// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 530// for more information on using Contexts. 531func (c *ComputeOptimizer) GetRecommendationSummariesWithContext(ctx aws.Context, input *GetRecommendationSummariesInput, opts ...request.Option) (*GetRecommendationSummariesOutput, error) { 532 req, out := c.GetRecommendationSummariesRequest(input) 533 req.SetContext(ctx) 534 req.ApplyOptions(opts...) 535 return out, req.Send() 536} 537 538const opUpdateEnrollmentStatus = "UpdateEnrollmentStatus" 539 540// UpdateEnrollmentStatusRequest generates a "aws/request.Request" representing the 541// client's request for the UpdateEnrollmentStatus operation. The "output" return 542// value will be populated with the request's response once the request completes 543// successfully. 544// 545// Use "Send" method on the returned Request to send the API call to the service. 546// the "output" return value is not valid until after Send returns without error. 547// 548// See UpdateEnrollmentStatus for more information on using the UpdateEnrollmentStatus 549// API call, and error handling. 550// 551// This method is useful when you want to inject custom logic or configuration 552// into the SDK's request lifecycle. Such as custom headers, or retry logic. 553// 554// 555// // Example sending a request using the UpdateEnrollmentStatusRequest method. 556// req, resp := client.UpdateEnrollmentStatusRequest(params) 557// 558// err := req.Send() 559// if err == nil { // resp is now filled 560// fmt.Println(resp) 561// } 562// 563// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/UpdateEnrollmentStatus 564func (c *ComputeOptimizer) UpdateEnrollmentStatusRequest(input *UpdateEnrollmentStatusInput) (req *request.Request, output *UpdateEnrollmentStatusOutput) { 565 op := &request.Operation{ 566 Name: opUpdateEnrollmentStatus, 567 HTTPMethod: "POST", 568 HTTPPath: "/", 569 } 570 571 if input == nil { 572 input = &UpdateEnrollmentStatusInput{} 573 } 574 575 output = &UpdateEnrollmentStatusOutput{} 576 req = c.newRequest(op, input, output) 577 return 578} 579 580// UpdateEnrollmentStatus API operation for AWS Compute Optimizer. 581// 582// Updates the enrollment (opt in) status of an account to the AWS Compute Optimizer 583// service. 584// 585// If the account is a master account of an organization, this operation can 586// also enroll member accounts within the organization. 587// 588// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 589// with awserr.Error's Code and Message methods to get detailed information about 590// the error. 591// 592// See the AWS API reference guide for AWS Compute Optimizer's 593// API operation UpdateEnrollmentStatus for usage and error information. 594// 595// Returned Error Types: 596// * InternalServerException 597// The request processing has failed because of an unknown error, exception, 598// or failure. 599// 600// * ServiceUnavailableException 601// The request has failed due to a temporary failure of the server. 602// 603// * AccessDeniedException 604// You do not have sufficient access to perform this action. 605// 606// * InvalidParameterValueException 607// An invalid or out-of-range value was supplied for the input parameter. 608// 609// * MissingAuthenticationToken 610// The request must contain either a valid (registered) AWS access key ID or 611// X.509 certificate. 612// 613// * ThrottlingException 614// The limit on the number of requests per second was exceeded. 615// 616// See also, https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/UpdateEnrollmentStatus 617func (c *ComputeOptimizer) UpdateEnrollmentStatus(input *UpdateEnrollmentStatusInput) (*UpdateEnrollmentStatusOutput, error) { 618 req, out := c.UpdateEnrollmentStatusRequest(input) 619 return out, req.Send() 620} 621 622// UpdateEnrollmentStatusWithContext is the same as UpdateEnrollmentStatus with the addition of 623// the ability to pass a context and additional request options. 624// 625// See UpdateEnrollmentStatus for details on how to use this API operation. 626// 627// The context must be non-nil and will be used for request cancellation. If 628// the context is nil a panic will occur. In the future the SDK may create 629// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 630// for more information on using Contexts. 631func (c *ComputeOptimizer) UpdateEnrollmentStatusWithContext(ctx aws.Context, input *UpdateEnrollmentStatusInput, opts ...request.Option) (*UpdateEnrollmentStatusOutput, error) { 632 req, out := c.UpdateEnrollmentStatusRequest(input) 633 req.SetContext(ctx) 634 req.ApplyOptions(opts...) 635 return out, req.Send() 636} 637 638// You do not have sufficient access to perform this action. 639type AccessDeniedException struct { 640 _ struct{} `type:"structure"` 641 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 642 643 Message_ *string `locationName:"message" type:"string"` 644} 645 646// String returns the string representation 647func (s AccessDeniedException) String() string { 648 return awsutil.Prettify(s) 649} 650 651// GoString returns the string representation 652func (s AccessDeniedException) GoString() string { 653 return s.String() 654} 655 656func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 657 return &AccessDeniedException{ 658 RespMetadata: v, 659 } 660} 661 662// Code returns the exception type name. 663func (s *AccessDeniedException) Code() string { 664 return "AccessDeniedException" 665} 666 667// Message returns the exception's message. 668func (s *AccessDeniedException) Message() string { 669 if s.Message_ != nil { 670 return *s.Message_ 671 } 672 return "" 673} 674 675// OrigErr always returns nil, satisfies awserr.Error interface. 676func (s *AccessDeniedException) OrigErr() error { 677 return nil 678} 679 680func (s *AccessDeniedException) Error() string { 681 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 682} 683 684// Status code returns the HTTP status code for the request's response error. 685func (s *AccessDeniedException) StatusCode() int { 686 return s.RespMetadata.StatusCode 687} 688 689// RequestID returns the service's response RequestID for request. 690func (s *AccessDeniedException) RequestID() string { 691 return s.RespMetadata.RequestID 692} 693 694// Describes the configuration of an Auto Scaling group. 695type AutoScalingGroupConfiguration struct { 696 _ struct{} `type:"structure"` 697 698 // The desired capacity, or number of instances, for the Auto Scaling group. 699 DesiredCapacity *int64 `locationName:"desiredCapacity" type:"integer"` 700 701 // The instance type for the Auto Scaling group. 702 InstanceType *string `locationName:"instanceType" type:"string"` 703 704 // The maximum size, or maximum number of instances, for the Auto Scaling group. 705 MaxSize *int64 `locationName:"maxSize" type:"integer"` 706 707 // The minimum size, or minimum number of instances, for the Auto Scaling group. 708 MinSize *int64 `locationName:"minSize" type:"integer"` 709} 710 711// String returns the string representation 712func (s AutoScalingGroupConfiguration) String() string { 713 return awsutil.Prettify(s) 714} 715 716// GoString returns the string representation 717func (s AutoScalingGroupConfiguration) GoString() string { 718 return s.String() 719} 720 721// SetDesiredCapacity sets the DesiredCapacity field's value. 722func (s *AutoScalingGroupConfiguration) SetDesiredCapacity(v int64) *AutoScalingGroupConfiguration { 723 s.DesiredCapacity = &v 724 return s 725} 726 727// SetInstanceType sets the InstanceType field's value. 728func (s *AutoScalingGroupConfiguration) SetInstanceType(v string) *AutoScalingGroupConfiguration { 729 s.InstanceType = &v 730 return s 731} 732 733// SetMaxSize sets the MaxSize field's value. 734func (s *AutoScalingGroupConfiguration) SetMaxSize(v int64) *AutoScalingGroupConfiguration { 735 s.MaxSize = &v 736 return s 737} 738 739// SetMinSize sets the MinSize field's value. 740func (s *AutoScalingGroupConfiguration) SetMinSize(v int64) *AutoScalingGroupConfiguration { 741 s.MinSize = &v 742 return s 743} 744 745// Describes an Auto Scaling group recommendation. 746type AutoScalingGroupRecommendation struct { 747 _ struct{} `type:"structure"` 748 749 // The AWS account ID of the Auto Scaling group. 750 AccountId *string `locationName:"accountId" type:"string"` 751 752 // The Amazon Resource Name (ARN) of the Auto Scaling group. 753 AutoScalingGroupArn *string `locationName:"autoScalingGroupArn" type:"string"` 754 755 // The name of the Auto Scaling group. 756 AutoScalingGroupName *string `locationName:"autoScalingGroupName" type:"string"` 757 758 // An array of objects that describe the current configuration of the Auto Scaling 759 // group. 760 CurrentConfiguration *AutoScalingGroupConfiguration `locationName:"currentConfiguration" type:"structure"` 761 762 // The finding classification for the Auto Scaling group. 763 // 764 // Findings for Auto Scaling groups include: 765 // 766 // * NotOptimized —An Auto Scaling group is considered not optimized when 767 // AWS Compute Optimizer identifies a recommendation that can provide better 768 // performance for your workload. 769 // 770 // * Optimized —An Auto Scaling group is considered optimized when Compute 771 // Optimizer determines that the group is correctly provisioned to run your 772 // workload based on the chosen instance type. For optimized resources, Compute 773 // Optimizer might recommend a new generation instance type. 774 // 775 // The values that are returned might be NOT_OPTIMIZED or OPTIMIZED. 776 Finding *string `locationName:"finding" type:"string" enum:"Finding"` 777 778 // The time stamp of when the Auto Scaling group recommendation was last refreshed. 779 LastRefreshTimestamp *time.Time `locationName:"lastRefreshTimestamp" type:"timestamp"` 780 781 // The number of days for which utilization metrics were analyzed for the Auto 782 // Scaling group. 783 LookBackPeriodInDays *float64 `locationName:"lookBackPeriodInDays" type:"double"` 784 785 // An array of objects that describe the recommendation options for the Auto 786 // Scaling group. 787 RecommendationOptions []*AutoScalingGroupRecommendationOption `locationName:"recommendationOptions" type:"list"` 788 789 // An array of objects that describe the utilization metrics of the Auto Scaling 790 // group. 791 UtilizationMetrics []*UtilizationMetric `locationName:"utilizationMetrics" type:"list"` 792} 793 794// String returns the string representation 795func (s AutoScalingGroupRecommendation) String() string { 796 return awsutil.Prettify(s) 797} 798 799// GoString returns the string representation 800func (s AutoScalingGroupRecommendation) GoString() string { 801 return s.String() 802} 803 804// SetAccountId sets the AccountId field's value. 805func (s *AutoScalingGroupRecommendation) SetAccountId(v string) *AutoScalingGroupRecommendation { 806 s.AccountId = &v 807 return s 808} 809 810// SetAutoScalingGroupArn sets the AutoScalingGroupArn field's value. 811func (s *AutoScalingGroupRecommendation) SetAutoScalingGroupArn(v string) *AutoScalingGroupRecommendation { 812 s.AutoScalingGroupArn = &v 813 return s 814} 815 816// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. 817func (s *AutoScalingGroupRecommendation) SetAutoScalingGroupName(v string) *AutoScalingGroupRecommendation { 818 s.AutoScalingGroupName = &v 819 return s 820} 821 822// SetCurrentConfiguration sets the CurrentConfiguration field's value. 823func (s *AutoScalingGroupRecommendation) SetCurrentConfiguration(v *AutoScalingGroupConfiguration) *AutoScalingGroupRecommendation { 824 s.CurrentConfiguration = v 825 return s 826} 827 828// SetFinding sets the Finding field's value. 829func (s *AutoScalingGroupRecommendation) SetFinding(v string) *AutoScalingGroupRecommendation { 830 s.Finding = &v 831 return s 832} 833 834// SetLastRefreshTimestamp sets the LastRefreshTimestamp field's value. 835func (s *AutoScalingGroupRecommendation) SetLastRefreshTimestamp(v time.Time) *AutoScalingGroupRecommendation { 836 s.LastRefreshTimestamp = &v 837 return s 838} 839 840// SetLookBackPeriodInDays sets the LookBackPeriodInDays field's value. 841func (s *AutoScalingGroupRecommendation) SetLookBackPeriodInDays(v float64) *AutoScalingGroupRecommendation { 842 s.LookBackPeriodInDays = &v 843 return s 844} 845 846// SetRecommendationOptions sets the RecommendationOptions field's value. 847func (s *AutoScalingGroupRecommendation) SetRecommendationOptions(v []*AutoScalingGroupRecommendationOption) *AutoScalingGroupRecommendation { 848 s.RecommendationOptions = v 849 return s 850} 851 852// SetUtilizationMetrics sets the UtilizationMetrics field's value. 853func (s *AutoScalingGroupRecommendation) SetUtilizationMetrics(v []*UtilizationMetric) *AutoScalingGroupRecommendation { 854 s.UtilizationMetrics = v 855 return s 856} 857 858// Describes a recommendation option for an Auto Scaling group. 859type AutoScalingGroupRecommendationOption struct { 860 _ struct{} `type:"structure"` 861 862 // An array of objects that describe an Auto Scaling group configuration. 863 Configuration *AutoScalingGroupConfiguration `locationName:"configuration" type:"structure"` 864 865 // The performance risk of the Auto Scaling group configuration recommendation. 866 // 867 // Performance risk is the likelihood of the recommended instance type not meeting 868 // the performance requirement of your workload. 869 // 870 // The lowest performance risk is categorized as 0, and the highest as 5. 871 PerformanceRisk *float64 `locationName:"performanceRisk" type:"double"` 872 873 // An array of objects that describe the projected utilization metrics of the 874 // Auto Scaling group recommendation option. 875 ProjectedUtilizationMetrics []*UtilizationMetric `locationName:"projectedUtilizationMetrics" type:"list"` 876 877 // The rank of the Auto Scaling group recommendation option. 878 // 879 // The top recommendation option is ranked as 1. 880 Rank *int64 `locationName:"rank" type:"integer"` 881} 882 883// String returns the string representation 884func (s AutoScalingGroupRecommendationOption) String() string { 885 return awsutil.Prettify(s) 886} 887 888// GoString returns the string representation 889func (s AutoScalingGroupRecommendationOption) GoString() string { 890 return s.String() 891} 892 893// SetConfiguration sets the Configuration field's value. 894func (s *AutoScalingGroupRecommendationOption) SetConfiguration(v *AutoScalingGroupConfiguration) *AutoScalingGroupRecommendationOption { 895 s.Configuration = v 896 return s 897} 898 899// SetPerformanceRisk sets the PerformanceRisk field's value. 900func (s *AutoScalingGroupRecommendationOption) SetPerformanceRisk(v float64) *AutoScalingGroupRecommendationOption { 901 s.PerformanceRisk = &v 902 return s 903} 904 905// SetProjectedUtilizationMetrics sets the ProjectedUtilizationMetrics field's value. 906func (s *AutoScalingGroupRecommendationOption) SetProjectedUtilizationMetrics(v []*UtilizationMetric) *AutoScalingGroupRecommendationOption { 907 s.ProjectedUtilizationMetrics = v 908 return s 909} 910 911// SetRank sets the Rank field's value. 912func (s *AutoScalingGroupRecommendationOption) SetRank(v int64) *AutoScalingGroupRecommendationOption { 913 s.Rank = &v 914 return s 915} 916 917// Describes a filter that returns a more specific list of recommendations. 918type Filter struct { 919 _ struct{} `type:"structure"` 920 921 // The name of the filter. 922 // 923 // Specify Finding to filter the results to a specific findings classification. 924 // 925 // Specify RecommendationSourceType to filter the results to a specific resource 926 // type. 927 Name *string `locationName:"name" type:"string" enum:"FilterName"` 928 929 // The value of the filter. 930 // 931 // If you specify the name parameter as Finding, and you're recommendations 932 // for an instance, then the valid values are Underprovisioned, Overprovisioned, 933 // NotOptimized, or Optimized. 934 // 935 // If you specify the name parameter as Finding, and you're recommendations 936 // for an Auto Scaling group, then the valid values are Optimized, or NotOptimized. 937 // 938 // If you specify the name parameter as RecommendationSourceType, then the valid 939 // values are EC2Instance, or AutoScalingGroup. 940 Values []*string `locationName:"values" type:"list"` 941} 942 943// String returns the string representation 944func (s Filter) String() string { 945 return awsutil.Prettify(s) 946} 947 948// GoString returns the string representation 949func (s Filter) GoString() string { 950 return s.String() 951} 952 953// SetName sets the Name field's value. 954func (s *Filter) SetName(v string) *Filter { 955 s.Name = &v 956 return s 957} 958 959// SetValues sets the Values field's value. 960func (s *Filter) SetValues(v []*string) *Filter { 961 s.Values = v 962 return s 963} 964 965type GetAutoScalingGroupRecommendationsInput struct { 966 _ struct{} `type:"structure"` 967 968 // The AWS account IDs for which to return Auto Scaling group recommendations. 969 // 970 // Only one account ID can be specified per request. 971 AccountIds []*string `locationName:"accountIds" type:"list"` 972 973 // The Amazon Resource Name (ARN) of the Auto Scaling groups for which to return 974 // recommendations. 975 AutoScalingGroupArns []*string `locationName:"autoScalingGroupArns" type:"list"` 976 977 // An array of objects that describe a filter that returns a more specific list 978 // of Auto Scaling group recommendations. 979 Filters []*Filter `locationName:"filters" type:"list"` 980 981 // The maximum number of Auto Scaling group recommendations to return with a 982 // single call. 983 // 984 // To retrieve the remaining results, make another call with the returned NextToken 985 // value. 986 MaxResults *int64 `locationName:"maxResults" type:"integer"` 987 988 // The token to advance to the next page of Auto Scaling group recommendations. 989 NextToken *string `locationName:"nextToken" type:"string"` 990} 991 992// String returns the string representation 993func (s GetAutoScalingGroupRecommendationsInput) String() string { 994 return awsutil.Prettify(s) 995} 996 997// GoString returns the string representation 998func (s GetAutoScalingGroupRecommendationsInput) GoString() string { 999 return s.String() 1000} 1001 1002// SetAccountIds sets the AccountIds field's value. 1003func (s *GetAutoScalingGroupRecommendationsInput) SetAccountIds(v []*string) *GetAutoScalingGroupRecommendationsInput { 1004 s.AccountIds = v 1005 return s 1006} 1007 1008// SetAutoScalingGroupArns sets the AutoScalingGroupArns field's value. 1009func (s *GetAutoScalingGroupRecommendationsInput) SetAutoScalingGroupArns(v []*string) *GetAutoScalingGroupRecommendationsInput { 1010 s.AutoScalingGroupArns = v 1011 return s 1012} 1013 1014// SetFilters sets the Filters field's value. 1015func (s *GetAutoScalingGroupRecommendationsInput) SetFilters(v []*Filter) *GetAutoScalingGroupRecommendationsInput { 1016 s.Filters = v 1017 return s 1018} 1019 1020// SetMaxResults sets the MaxResults field's value. 1021func (s *GetAutoScalingGroupRecommendationsInput) SetMaxResults(v int64) *GetAutoScalingGroupRecommendationsInput { 1022 s.MaxResults = &v 1023 return s 1024} 1025 1026// SetNextToken sets the NextToken field's value. 1027func (s *GetAutoScalingGroupRecommendationsInput) SetNextToken(v string) *GetAutoScalingGroupRecommendationsInput { 1028 s.NextToken = &v 1029 return s 1030} 1031 1032type GetAutoScalingGroupRecommendationsOutput struct { 1033 _ struct{} `type:"structure"` 1034 1035 // An array of objects that describe Auto Scaling group recommendations. 1036 AutoScalingGroupRecommendations []*AutoScalingGroupRecommendation `locationName:"autoScalingGroupRecommendations" type:"list"` 1037 1038 // An array of objects that describe errors of the request. 1039 // 1040 // For example, an error is returned if you request recommendations for an unsupported 1041 // Auto Scaling group. 1042 Errors []*GetRecommendationError `locationName:"errors" type:"list"` 1043 1044 // The token to use to advance to the next page of Auto Scaling group recommendations. 1045 // 1046 // This value is null when there are no more pages of Auto Scaling group recommendations 1047 // to return. 1048 NextToken *string `locationName:"nextToken" type:"string"` 1049} 1050 1051// String returns the string representation 1052func (s GetAutoScalingGroupRecommendationsOutput) String() string { 1053 return awsutil.Prettify(s) 1054} 1055 1056// GoString returns the string representation 1057func (s GetAutoScalingGroupRecommendationsOutput) GoString() string { 1058 return s.String() 1059} 1060 1061// SetAutoScalingGroupRecommendations sets the AutoScalingGroupRecommendations field's value. 1062func (s *GetAutoScalingGroupRecommendationsOutput) SetAutoScalingGroupRecommendations(v []*AutoScalingGroupRecommendation) *GetAutoScalingGroupRecommendationsOutput { 1063 s.AutoScalingGroupRecommendations = v 1064 return s 1065} 1066 1067// SetErrors sets the Errors field's value. 1068func (s *GetAutoScalingGroupRecommendationsOutput) SetErrors(v []*GetRecommendationError) *GetAutoScalingGroupRecommendationsOutput { 1069 s.Errors = v 1070 return s 1071} 1072 1073// SetNextToken sets the NextToken field's value. 1074func (s *GetAutoScalingGroupRecommendationsOutput) SetNextToken(v string) *GetAutoScalingGroupRecommendationsOutput { 1075 s.NextToken = &v 1076 return s 1077} 1078 1079type GetEC2InstanceRecommendationsInput struct { 1080 _ struct{} `type:"structure"` 1081 1082 // The AWS account IDs for which to return instance recommendations. 1083 // 1084 // Only one account ID can be specified per request. 1085 AccountIds []*string `locationName:"accountIds" type:"list"` 1086 1087 // An array of objects that describe a filter that returns a more specific list 1088 // of instance recommendations. 1089 Filters []*Filter `locationName:"filters" type:"list"` 1090 1091 // The Amazon Resource Name (ARN) of the instances for which to return recommendations. 1092 InstanceArns []*string `locationName:"instanceArns" type:"list"` 1093 1094 // The maximum number of instance recommendations to return with a single call. 1095 // 1096 // To retrieve the remaining results, make another call with the returned NextToken 1097 // value. 1098 MaxResults *int64 `locationName:"maxResults" type:"integer"` 1099 1100 // The token to advance to the next page of instance recommendations. 1101 NextToken *string `locationName:"nextToken" type:"string"` 1102} 1103 1104// String returns the string representation 1105func (s GetEC2InstanceRecommendationsInput) String() string { 1106 return awsutil.Prettify(s) 1107} 1108 1109// GoString returns the string representation 1110func (s GetEC2InstanceRecommendationsInput) GoString() string { 1111 return s.String() 1112} 1113 1114// SetAccountIds sets the AccountIds field's value. 1115func (s *GetEC2InstanceRecommendationsInput) SetAccountIds(v []*string) *GetEC2InstanceRecommendationsInput { 1116 s.AccountIds = v 1117 return s 1118} 1119 1120// SetFilters sets the Filters field's value. 1121func (s *GetEC2InstanceRecommendationsInput) SetFilters(v []*Filter) *GetEC2InstanceRecommendationsInput { 1122 s.Filters = v 1123 return s 1124} 1125 1126// SetInstanceArns sets the InstanceArns field's value. 1127func (s *GetEC2InstanceRecommendationsInput) SetInstanceArns(v []*string) *GetEC2InstanceRecommendationsInput { 1128 s.InstanceArns = v 1129 return s 1130} 1131 1132// SetMaxResults sets the MaxResults field's value. 1133func (s *GetEC2InstanceRecommendationsInput) SetMaxResults(v int64) *GetEC2InstanceRecommendationsInput { 1134 s.MaxResults = &v 1135 return s 1136} 1137 1138// SetNextToken sets the NextToken field's value. 1139func (s *GetEC2InstanceRecommendationsInput) SetNextToken(v string) *GetEC2InstanceRecommendationsInput { 1140 s.NextToken = &v 1141 return s 1142} 1143 1144type GetEC2InstanceRecommendationsOutput struct { 1145 _ struct{} `type:"structure"` 1146 1147 // An array of objects that describe errors of the request. 1148 // 1149 // For example, an error is returned if you request recommendations for an instance 1150 // of an unsupported instance family. 1151 Errors []*GetRecommendationError `locationName:"errors" type:"list"` 1152 1153 // An array of objects that describe instance recommendations. 1154 InstanceRecommendations []*InstanceRecommendation `locationName:"instanceRecommendations" type:"list"` 1155 1156 // The token to use to advance to the next page of instance recommendations. 1157 // 1158 // This value is null when there are no more pages of instance recommendations 1159 // to return. 1160 NextToken *string `locationName:"nextToken" type:"string"` 1161} 1162 1163// String returns the string representation 1164func (s GetEC2InstanceRecommendationsOutput) String() string { 1165 return awsutil.Prettify(s) 1166} 1167 1168// GoString returns the string representation 1169func (s GetEC2InstanceRecommendationsOutput) GoString() string { 1170 return s.String() 1171} 1172 1173// SetErrors sets the Errors field's value. 1174func (s *GetEC2InstanceRecommendationsOutput) SetErrors(v []*GetRecommendationError) *GetEC2InstanceRecommendationsOutput { 1175 s.Errors = v 1176 return s 1177} 1178 1179// SetInstanceRecommendations sets the InstanceRecommendations field's value. 1180func (s *GetEC2InstanceRecommendationsOutput) SetInstanceRecommendations(v []*InstanceRecommendation) *GetEC2InstanceRecommendationsOutput { 1181 s.InstanceRecommendations = v 1182 return s 1183} 1184 1185// SetNextToken sets the NextToken field's value. 1186func (s *GetEC2InstanceRecommendationsOutput) SetNextToken(v string) *GetEC2InstanceRecommendationsOutput { 1187 s.NextToken = &v 1188 return s 1189} 1190 1191type GetEC2RecommendationProjectedMetricsInput struct { 1192 _ struct{} `type:"structure"` 1193 1194 // The time stamp of the last projected metrics data point to return. 1195 // 1196 // EndTime is a required field 1197 EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` 1198 1199 // The Amazon Resource Name (ARN) of the instances for which to return recommendation 1200 // projected metrics. 1201 // 1202 // InstanceArn is a required field 1203 InstanceArn *string `locationName:"instanceArn" type:"string" required:"true"` 1204 1205 // The granularity, in seconds, of the projected metrics data points. 1206 // 1207 // Period is a required field 1208 Period *int64 `locationName:"period" type:"integer" required:"true"` 1209 1210 // The time stamp of the first projected metrics data point to return. 1211 // 1212 // StartTime is a required field 1213 StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` 1214 1215 // The statistic of the projected metrics. 1216 // 1217 // Stat is a required field 1218 Stat *string `locationName:"stat" type:"string" required:"true" enum:"MetricStatistic"` 1219} 1220 1221// String returns the string representation 1222func (s GetEC2RecommendationProjectedMetricsInput) String() string { 1223 return awsutil.Prettify(s) 1224} 1225 1226// GoString returns the string representation 1227func (s GetEC2RecommendationProjectedMetricsInput) GoString() string { 1228 return s.String() 1229} 1230 1231// Validate inspects the fields of the type to determine if they are valid. 1232func (s *GetEC2RecommendationProjectedMetricsInput) Validate() error { 1233 invalidParams := request.ErrInvalidParams{Context: "GetEC2RecommendationProjectedMetricsInput"} 1234 if s.EndTime == nil { 1235 invalidParams.Add(request.NewErrParamRequired("EndTime")) 1236 } 1237 if s.InstanceArn == nil { 1238 invalidParams.Add(request.NewErrParamRequired("InstanceArn")) 1239 } 1240 if s.Period == nil { 1241 invalidParams.Add(request.NewErrParamRequired("Period")) 1242 } 1243 if s.StartTime == nil { 1244 invalidParams.Add(request.NewErrParamRequired("StartTime")) 1245 } 1246 if s.Stat == nil { 1247 invalidParams.Add(request.NewErrParamRequired("Stat")) 1248 } 1249 1250 if invalidParams.Len() > 0 { 1251 return invalidParams 1252 } 1253 return nil 1254} 1255 1256// SetEndTime sets the EndTime field's value. 1257func (s *GetEC2RecommendationProjectedMetricsInput) SetEndTime(v time.Time) *GetEC2RecommendationProjectedMetricsInput { 1258 s.EndTime = &v 1259 return s 1260} 1261 1262// SetInstanceArn sets the InstanceArn field's value. 1263func (s *GetEC2RecommendationProjectedMetricsInput) SetInstanceArn(v string) *GetEC2RecommendationProjectedMetricsInput { 1264 s.InstanceArn = &v 1265 return s 1266} 1267 1268// SetPeriod sets the Period field's value. 1269func (s *GetEC2RecommendationProjectedMetricsInput) SetPeriod(v int64) *GetEC2RecommendationProjectedMetricsInput { 1270 s.Period = &v 1271 return s 1272} 1273 1274// SetStartTime sets the StartTime field's value. 1275func (s *GetEC2RecommendationProjectedMetricsInput) SetStartTime(v time.Time) *GetEC2RecommendationProjectedMetricsInput { 1276 s.StartTime = &v 1277 return s 1278} 1279 1280// SetStat sets the Stat field's value. 1281func (s *GetEC2RecommendationProjectedMetricsInput) SetStat(v string) *GetEC2RecommendationProjectedMetricsInput { 1282 s.Stat = &v 1283 return s 1284} 1285 1286type GetEC2RecommendationProjectedMetricsOutput struct { 1287 _ struct{} `type:"structure"` 1288 1289 // An array of objects that describe a projected metrics. 1290 RecommendedOptionProjectedMetrics []*RecommendedOptionProjectedMetric `locationName:"recommendedOptionProjectedMetrics" type:"list"` 1291} 1292 1293// String returns the string representation 1294func (s GetEC2RecommendationProjectedMetricsOutput) String() string { 1295 return awsutil.Prettify(s) 1296} 1297 1298// GoString returns the string representation 1299func (s GetEC2RecommendationProjectedMetricsOutput) GoString() string { 1300 return s.String() 1301} 1302 1303// SetRecommendedOptionProjectedMetrics sets the RecommendedOptionProjectedMetrics field's value. 1304func (s *GetEC2RecommendationProjectedMetricsOutput) SetRecommendedOptionProjectedMetrics(v []*RecommendedOptionProjectedMetric) *GetEC2RecommendationProjectedMetricsOutput { 1305 s.RecommendedOptionProjectedMetrics = v 1306 return s 1307} 1308 1309type GetEnrollmentStatusInput struct { 1310 _ struct{} `type:"structure"` 1311} 1312 1313// String returns the string representation 1314func (s GetEnrollmentStatusInput) String() string { 1315 return awsutil.Prettify(s) 1316} 1317 1318// GoString returns the string representation 1319func (s GetEnrollmentStatusInput) GoString() string { 1320 return s.String() 1321} 1322 1323type GetEnrollmentStatusOutput struct { 1324 _ struct{} `type:"structure"` 1325 1326 // Confirms the enrollment status of member accounts within the organization, 1327 // if the account is a master account of an organization. 1328 MemberAccountsEnrolled *bool `locationName:"memberAccountsEnrolled" type:"boolean"` 1329 1330 // The enrollment status of the account. 1331 Status *string `locationName:"status" type:"string" enum:"Status"` 1332 1333 // The reason for the enrollment status of the account. 1334 // 1335 // For example, an account might show a status of Pending because member accounts 1336 // of an organization require more time to be enrolled in the service. 1337 StatusReason *string `locationName:"statusReason" type:"string"` 1338} 1339 1340// String returns the string representation 1341func (s GetEnrollmentStatusOutput) String() string { 1342 return awsutil.Prettify(s) 1343} 1344 1345// GoString returns the string representation 1346func (s GetEnrollmentStatusOutput) GoString() string { 1347 return s.String() 1348} 1349 1350// SetMemberAccountsEnrolled sets the MemberAccountsEnrolled field's value. 1351func (s *GetEnrollmentStatusOutput) SetMemberAccountsEnrolled(v bool) *GetEnrollmentStatusOutput { 1352 s.MemberAccountsEnrolled = &v 1353 return s 1354} 1355 1356// SetStatus sets the Status field's value. 1357func (s *GetEnrollmentStatusOutput) SetStatus(v string) *GetEnrollmentStatusOutput { 1358 s.Status = &v 1359 return s 1360} 1361 1362// SetStatusReason sets the StatusReason field's value. 1363func (s *GetEnrollmentStatusOutput) SetStatusReason(v string) *GetEnrollmentStatusOutput { 1364 s.StatusReason = &v 1365 return s 1366} 1367 1368// Describes an error experienced when getting recommendations. 1369// 1370// For example, an error is returned if you request recommendations for an unsupported 1371// Auto Scaling group, or if you request recommendations for an instance of 1372// an unsupported instance family. 1373type GetRecommendationError struct { 1374 _ struct{} `type:"structure"` 1375 1376 // The error code. 1377 Code *string `locationName:"code" type:"string"` 1378 1379 // The ID of the error. 1380 Identifier *string `locationName:"identifier" type:"string"` 1381 1382 // The message, or reason, for the error. 1383 Message *string `locationName:"message" type:"string"` 1384} 1385 1386// String returns the string representation 1387func (s GetRecommendationError) String() string { 1388 return awsutil.Prettify(s) 1389} 1390 1391// GoString returns the string representation 1392func (s GetRecommendationError) GoString() string { 1393 return s.String() 1394} 1395 1396// SetCode sets the Code field's value. 1397func (s *GetRecommendationError) SetCode(v string) *GetRecommendationError { 1398 s.Code = &v 1399 return s 1400} 1401 1402// SetIdentifier sets the Identifier field's value. 1403func (s *GetRecommendationError) SetIdentifier(v string) *GetRecommendationError { 1404 s.Identifier = &v 1405 return s 1406} 1407 1408// SetMessage sets the Message field's value. 1409func (s *GetRecommendationError) SetMessage(v string) *GetRecommendationError { 1410 s.Message = &v 1411 return s 1412} 1413 1414type GetRecommendationSummariesInput struct { 1415 _ struct{} `type:"structure"` 1416 1417 // The AWS account IDs for which to return recommendation summaries. 1418 // 1419 // Only one account ID can be specified per request. 1420 AccountIds []*string `locationName:"accountIds" type:"list"` 1421 1422 // The maximum number of recommendation summaries to return with a single call. 1423 // 1424 // To retrieve the remaining results, make another call with the returned NextToken 1425 // value. 1426 MaxResults *int64 `locationName:"maxResults" type:"integer"` 1427 1428 // The token to advance to the next page of recommendation summaries. 1429 NextToken *string `locationName:"nextToken" type:"string"` 1430} 1431 1432// String returns the string representation 1433func (s GetRecommendationSummariesInput) String() string { 1434 return awsutil.Prettify(s) 1435} 1436 1437// GoString returns the string representation 1438func (s GetRecommendationSummariesInput) GoString() string { 1439 return s.String() 1440} 1441 1442// SetAccountIds sets the AccountIds field's value. 1443func (s *GetRecommendationSummariesInput) SetAccountIds(v []*string) *GetRecommendationSummariesInput { 1444 s.AccountIds = v 1445 return s 1446} 1447 1448// SetMaxResults sets the MaxResults field's value. 1449func (s *GetRecommendationSummariesInput) SetMaxResults(v int64) *GetRecommendationSummariesInput { 1450 s.MaxResults = &v 1451 return s 1452} 1453 1454// SetNextToken sets the NextToken field's value. 1455func (s *GetRecommendationSummariesInput) SetNextToken(v string) *GetRecommendationSummariesInput { 1456 s.NextToken = &v 1457 return s 1458} 1459 1460type GetRecommendationSummariesOutput struct { 1461 _ struct{} `type:"structure"` 1462 1463 // The token to use to advance to the next page of recommendation summaries. 1464 // 1465 // This value is null when there are no more pages of recommendation summaries 1466 // to return. 1467 NextToken *string `locationName:"nextToken" type:"string"` 1468 1469 // An array of objects that summarize a recommendation. 1470 RecommendationSummaries []*RecommendationSummary `locationName:"recommendationSummaries" type:"list"` 1471} 1472 1473// String returns the string representation 1474func (s GetRecommendationSummariesOutput) String() string { 1475 return awsutil.Prettify(s) 1476} 1477 1478// GoString returns the string representation 1479func (s GetRecommendationSummariesOutput) GoString() string { 1480 return s.String() 1481} 1482 1483// SetNextToken sets the NextToken field's value. 1484func (s *GetRecommendationSummariesOutput) SetNextToken(v string) *GetRecommendationSummariesOutput { 1485 s.NextToken = &v 1486 return s 1487} 1488 1489// SetRecommendationSummaries sets the RecommendationSummaries field's value. 1490func (s *GetRecommendationSummariesOutput) SetRecommendationSummaries(v []*RecommendationSummary) *GetRecommendationSummariesOutput { 1491 s.RecommendationSummaries = v 1492 return s 1493} 1494 1495// Describes an Amazon EC2 instance recommendation. 1496type InstanceRecommendation struct { 1497 _ struct{} `type:"structure"` 1498 1499 // The AWS account ID of the instance recommendation. 1500 AccountId *string `locationName:"accountId" type:"string"` 1501 1502 // The instance type of the current instance. 1503 CurrentInstanceType *string `locationName:"currentInstanceType" type:"string"` 1504 1505 // The finding classification for the instance. 1506 // 1507 // Findings for instances include: 1508 // 1509 // * Underprovisioned —An instance is considered under-provisioned when 1510 // at least one specification of your instance, such as CPU, memory, or network, 1511 // does not meet the performance requirements of your workload. Under-provisioned 1512 // instances may lead to poor application performance. 1513 // 1514 // * Overprovisioned —An instance is considered over-provisioned when at 1515 // least one specification of your instance, such as CPU, memory, or network, 1516 // can be sized down while still meeting the performance requirements of 1517 // your workload, and no specification is under-provisioned. Over-provisioned 1518 // instances may lead to unnecessary infrastructure cost. 1519 // 1520 // * Optimized —An instance is considered optimized when all specifications 1521 // of your instance, such as CPU, memory, and network, meet the performance 1522 // requirements of your workload and is not over provisioned. An optimized 1523 // instance runs your workloads with optimal performance and infrastructure 1524 // cost. For optimized resources, AWS Compute Optimizer might recommend a 1525 // new generation instance type. 1526 // 1527 // The values that are returned might be UNDER_PROVISIONED, OVER_PROVISIONED, 1528 // or OPTIMIZED. 1529 Finding *string `locationName:"finding" type:"string" enum:"Finding"` 1530 1531 // The Amazon Resource Name (ARN) of the current instance. 1532 InstanceArn *string `locationName:"instanceArn" type:"string"` 1533 1534 // The name of the current instance. 1535 InstanceName *string `locationName:"instanceName" type:"string"` 1536 1537 // The time stamp of when the instance recommendation was last refreshed. 1538 LastRefreshTimestamp *time.Time `locationName:"lastRefreshTimestamp" type:"timestamp"` 1539 1540 // The number of days for which utilization metrics were analyzed for the instance. 1541 LookBackPeriodInDays *float64 `locationName:"lookBackPeriodInDays" type:"double"` 1542 1543 // An array of objects that describe the recommendation options for the instance. 1544 RecommendationOptions []*InstanceRecommendationOption `locationName:"recommendationOptions" type:"list"` 1545 1546 // An array of objects that describe the source resource of the recommendation. 1547 RecommendationSources []*RecommendationSource `locationName:"recommendationSources" type:"list"` 1548 1549 // An array of objects that describe the utilization metrics of the instance. 1550 UtilizationMetrics []*UtilizationMetric `locationName:"utilizationMetrics" type:"list"` 1551} 1552 1553// String returns the string representation 1554func (s InstanceRecommendation) String() string { 1555 return awsutil.Prettify(s) 1556} 1557 1558// GoString returns the string representation 1559func (s InstanceRecommendation) GoString() string { 1560 return s.String() 1561} 1562 1563// SetAccountId sets the AccountId field's value. 1564func (s *InstanceRecommendation) SetAccountId(v string) *InstanceRecommendation { 1565 s.AccountId = &v 1566 return s 1567} 1568 1569// SetCurrentInstanceType sets the CurrentInstanceType field's value. 1570func (s *InstanceRecommendation) SetCurrentInstanceType(v string) *InstanceRecommendation { 1571 s.CurrentInstanceType = &v 1572 return s 1573} 1574 1575// SetFinding sets the Finding field's value. 1576func (s *InstanceRecommendation) SetFinding(v string) *InstanceRecommendation { 1577 s.Finding = &v 1578 return s 1579} 1580 1581// SetInstanceArn sets the InstanceArn field's value. 1582func (s *InstanceRecommendation) SetInstanceArn(v string) *InstanceRecommendation { 1583 s.InstanceArn = &v 1584 return s 1585} 1586 1587// SetInstanceName sets the InstanceName field's value. 1588func (s *InstanceRecommendation) SetInstanceName(v string) *InstanceRecommendation { 1589 s.InstanceName = &v 1590 return s 1591} 1592 1593// SetLastRefreshTimestamp sets the LastRefreshTimestamp field's value. 1594func (s *InstanceRecommendation) SetLastRefreshTimestamp(v time.Time) *InstanceRecommendation { 1595 s.LastRefreshTimestamp = &v 1596 return s 1597} 1598 1599// SetLookBackPeriodInDays sets the LookBackPeriodInDays field's value. 1600func (s *InstanceRecommendation) SetLookBackPeriodInDays(v float64) *InstanceRecommendation { 1601 s.LookBackPeriodInDays = &v 1602 return s 1603} 1604 1605// SetRecommendationOptions sets the RecommendationOptions field's value. 1606func (s *InstanceRecommendation) SetRecommendationOptions(v []*InstanceRecommendationOption) *InstanceRecommendation { 1607 s.RecommendationOptions = v 1608 return s 1609} 1610 1611// SetRecommendationSources sets the RecommendationSources field's value. 1612func (s *InstanceRecommendation) SetRecommendationSources(v []*RecommendationSource) *InstanceRecommendation { 1613 s.RecommendationSources = v 1614 return s 1615} 1616 1617// SetUtilizationMetrics sets the UtilizationMetrics field's value. 1618func (s *InstanceRecommendation) SetUtilizationMetrics(v []*UtilizationMetric) *InstanceRecommendation { 1619 s.UtilizationMetrics = v 1620 return s 1621} 1622 1623// Describes a recommendation option for an Amazon EC2 instance. 1624type InstanceRecommendationOption struct { 1625 _ struct{} `type:"structure"` 1626 1627 // The instance type of the instance recommendation. 1628 InstanceType *string `locationName:"instanceType" type:"string"` 1629 1630 // The performance risk of the instance recommendation option. 1631 // 1632 // Performance risk is the likelihood of the recommended instance type not meeting 1633 // the performance requirement of your workload. 1634 // 1635 // The lowest performance risk is categorized as 0, and the highest as 5. 1636 PerformanceRisk *float64 `locationName:"performanceRisk" type:"double"` 1637 1638 // An array of objects that describe the projected utilization metrics of the 1639 // instance recommendation option. 1640 ProjectedUtilizationMetrics []*UtilizationMetric `locationName:"projectedUtilizationMetrics" type:"list"` 1641 1642 // The rank of the instance recommendation option. 1643 // 1644 // The top recommendation option is ranked as 1. 1645 Rank *int64 `locationName:"rank" type:"integer"` 1646} 1647 1648// String returns the string representation 1649func (s InstanceRecommendationOption) String() string { 1650 return awsutil.Prettify(s) 1651} 1652 1653// GoString returns the string representation 1654func (s InstanceRecommendationOption) GoString() string { 1655 return s.String() 1656} 1657 1658// SetInstanceType sets the InstanceType field's value. 1659func (s *InstanceRecommendationOption) SetInstanceType(v string) *InstanceRecommendationOption { 1660 s.InstanceType = &v 1661 return s 1662} 1663 1664// SetPerformanceRisk sets the PerformanceRisk field's value. 1665func (s *InstanceRecommendationOption) SetPerformanceRisk(v float64) *InstanceRecommendationOption { 1666 s.PerformanceRisk = &v 1667 return s 1668} 1669 1670// SetProjectedUtilizationMetrics sets the ProjectedUtilizationMetrics field's value. 1671func (s *InstanceRecommendationOption) SetProjectedUtilizationMetrics(v []*UtilizationMetric) *InstanceRecommendationOption { 1672 s.ProjectedUtilizationMetrics = v 1673 return s 1674} 1675 1676// SetRank sets the Rank field's value. 1677func (s *InstanceRecommendationOption) SetRank(v int64) *InstanceRecommendationOption { 1678 s.Rank = &v 1679 return s 1680} 1681 1682// The request processing has failed because of an unknown error, exception, 1683// or failure. 1684type InternalServerException struct { 1685 _ struct{} `type:"structure"` 1686 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1687 1688 Message_ *string `locationName:"message" type:"string"` 1689} 1690 1691// String returns the string representation 1692func (s InternalServerException) String() string { 1693 return awsutil.Prettify(s) 1694} 1695 1696// GoString returns the string representation 1697func (s InternalServerException) GoString() string { 1698 return s.String() 1699} 1700 1701func newErrorInternalServerException(v protocol.ResponseMetadata) error { 1702 return &InternalServerException{ 1703 RespMetadata: v, 1704 } 1705} 1706 1707// Code returns the exception type name. 1708func (s *InternalServerException) Code() string { 1709 return "InternalServerException" 1710} 1711 1712// Message returns the exception's message. 1713func (s *InternalServerException) Message() string { 1714 if s.Message_ != nil { 1715 return *s.Message_ 1716 } 1717 return "" 1718} 1719 1720// OrigErr always returns nil, satisfies awserr.Error interface. 1721func (s *InternalServerException) OrigErr() error { 1722 return nil 1723} 1724 1725func (s *InternalServerException) Error() string { 1726 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1727} 1728 1729// Status code returns the HTTP status code for the request's response error. 1730func (s *InternalServerException) StatusCode() int { 1731 return s.RespMetadata.StatusCode 1732} 1733 1734// RequestID returns the service's response RequestID for request. 1735func (s *InternalServerException) RequestID() string { 1736 return s.RespMetadata.RequestID 1737} 1738 1739// An invalid or out-of-range value was supplied for the input parameter. 1740type InvalidParameterValueException struct { 1741 _ struct{} `type:"structure"` 1742 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1743 1744 Message_ *string `locationName:"message" type:"string"` 1745} 1746 1747// String returns the string representation 1748func (s InvalidParameterValueException) String() string { 1749 return awsutil.Prettify(s) 1750} 1751 1752// GoString returns the string representation 1753func (s InvalidParameterValueException) GoString() string { 1754 return s.String() 1755} 1756 1757func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { 1758 return &InvalidParameterValueException{ 1759 RespMetadata: v, 1760 } 1761} 1762 1763// Code returns the exception type name. 1764func (s *InvalidParameterValueException) Code() string { 1765 return "InvalidParameterValueException" 1766} 1767 1768// Message returns the exception's message. 1769func (s *InvalidParameterValueException) Message() string { 1770 if s.Message_ != nil { 1771 return *s.Message_ 1772 } 1773 return "" 1774} 1775 1776// OrigErr always returns nil, satisfies awserr.Error interface. 1777func (s *InvalidParameterValueException) OrigErr() error { 1778 return nil 1779} 1780 1781func (s *InvalidParameterValueException) Error() string { 1782 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1783} 1784 1785// Status code returns the HTTP status code for the request's response error. 1786func (s *InvalidParameterValueException) StatusCode() int { 1787 return s.RespMetadata.StatusCode 1788} 1789 1790// RequestID returns the service's response RequestID for request. 1791func (s *InvalidParameterValueException) RequestID() string { 1792 return s.RespMetadata.RequestID 1793} 1794 1795// The request must contain either a valid (registered) AWS access key ID or 1796// X.509 certificate. 1797type MissingAuthenticationToken struct { 1798 _ struct{} `type:"structure"` 1799 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1800 1801 Message_ *string `locationName:"message" type:"string"` 1802} 1803 1804// String returns the string representation 1805func (s MissingAuthenticationToken) String() string { 1806 return awsutil.Prettify(s) 1807} 1808 1809// GoString returns the string representation 1810func (s MissingAuthenticationToken) GoString() string { 1811 return s.String() 1812} 1813 1814func newErrorMissingAuthenticationToken(v protocol.ResponseMetadata) error { 1815 return &MissingAuthenticationToken{ 1816 RespMetadata: v, 1817 } 1818} 1819 1820// Code returns the exception type name. 1821func (s *MissingAuthenticationToken) Code() string { 1822 return "MissingAuthenticationToken" 1823} 1824 1825// Message returns the exception's message. 1826func (s *MissingAuthenticationToken) Message() string { 1827 if s.Message_ != nil { 1828 return *s.Message_ 1829 } 1830 return "" 1831} 1832 1833// OrigErr always returns nil, satisfies awserr.Error interface. 1834func (s *MissingAuthenticationToken) OrigErr() error { 1835 return nil 1836} 1837 1838func (s *MissingAuthenticationToken) Error() string { 1839 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1840} 1841 1842// Status code returns the HTTP status code for the request's response error. 1843func (s *MissingAuthenticationToken) StatusCode() int { 1844 return s.RespMetadata.StatusCode 1845} 1846 1847// RequestID returns the service's response RequestID for request. 1848func (s *MissingAuthenticationToken) RequestID() string { 1849 return s.RespMetadata.RequestID 1850} 1851 1852// You must opt in to the service to perform this action. 1853type OptInRequiredException struct { 1854 _ struct{} `type:"structure"` 1855 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1856 1857 Message_ *string `locationName:"message" type:"string"` 1858} 1859 1860// String returns the string representation 1861func (s OptInRequiredException) String() string { 1862 return awsutil.Prettify(s) 1863} 1864 1865// GoString returns the string representation 1866func (s OptInRequiredException) GoString() string { 1867 return s.String() 1868} 1869 1870func newErrorOptInRequiredException(v protocol.ResponseMetadata) error { 1871 return &OptInRequiredException{ 1872 RespMetadata: v, 1873 } 1874} 1875 1876// Code returns the exception type name. 1877func (s *OptInRequiredException) Code() string { 1878 return "OptInRequiredException" 1879} 1880 1881// Message returns the exception's message. 1882func (s *OptInRequiredException) Message() string { 1883 if s.Message_ != nil { 1884 return *s.Message_ 1885 } 1886 return "" 1887} 1888 1889// OrigErr always returns nil, satisfies awserr.Error interface. 1890func (s *OptInRequiredException) OrigErr() error { 1891 return nil 1892} 1893 1894func (s *OptInRequiredException) Error() string { 1895 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1896} 1897 1898// Status code returns the HTTP status code for the request's response error. 1899func (s *OptInRequiredException) StatusCode() int { 1900 return s.RespMetadata.StatusCode 1901} 1902 1903// RequestID returns the service's response RequestID for request. 1904func (s *OptInRequiredException) RequestID() string { 1905 return s.RespMetadata.RequestID 1906} 1907 1908// Describes a projected utilization metric of a recommendation option, such 1909// as an Amazon EC2 instance. 1910type ProjectedMetric struct { 1911 _ struct{} `type:"structure"` 1912 1913 // The name of the projected utilization metric. 1914 // 1915 // Memory metrics are only returned for resources that have the unified CloudWatch 1916 // agent installed on them. For more information, see Enabling Memory Utilization 1917 // with the CloudWatch Agent (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html). 1918 Name *string `locationName:"name" type:"string" enum:"MetricName"` 1919 1920 // The time stamps of the projected utilization metric. 1921 Timestamps []*time.Time `locationName:"timestamps" type:"list"` 1922 1923 // The values of the projected utilization metrics. 1924 Values []*float64 `locationName:"values" type:"list"` 1925} 1926 1927// String returns the string representation 1928func (s ProjectedMetric) String() string { 1929 return awsutil.Prettify(s) 1930} 1931 1932// GoString returns the string representation 1933func (s ProjectedMetric) GoString() string { 1934 return s.String() 1935} 1936 1937// SetName sets the Name field's value. 1938func (s *ProjectedMetric) SetName(v string) *ProjectedMetric { 1939 s.Name = &v 1940 return s 1941} 1942 1943// SetTimestamps sets the Timestamps field's value. 1944func (s *ProjectedMetric) SetTimestamps(v []*time.Time) *ProjectedMetric { 1945 s.Timestamps = v 1946 return s 1947} 1948 1949// SetValues sets the Values field's value. 1950func (s *ProjectedMetric) SetValues(v []*float64) *ProjectedMetric { 1951 s.Values = v 1952 return s 1953} 1954 1955// Describes the source of a recommendation, such as an Amazon EC2 instance 1956// or Auto Scaling group. 1957type RecommendationSource struct { 1958 _ struct{} `type:"structure"` 1959 1960 // The Amazon Resource Name (ARN) of the recommendation source. 1961 RecommendationSourceArn *string `locationName:"recommendationSourceArn" type:"string"` 1962 1963 // The resource type of the recommendation source. 1964 RecommendationSourceType *string `locationName:"recommendationSourceType" type:"string" enum:"RecommendationSourceType"` 1965} 1966 1967// String returns the string representation 1968func (s RecommendationSource) String() string { 1969 return awsutil.Prettify(s) 1970} 1971 1972// GoString returns the string representation 1973func (s RecommendationSource) GoString() string { 1974 return s.String() 1975} 1976 1977// SetRecommendationSourceArn sets the RecommendationSourceArn field's value. 1978func (s *RecommendationSource) SetRecommendationSourceArn(v string) *RecommendationSource { 1979 s.RecommendationSourceArn = &v 1980 return s 1981} 1982 1983// SetRecommendationSourceType sets the RecommendationSourceType field's value. 1984func (s *RecommendationSource) SetRecommendationSourceType(v string) *RecommendationSource { 1985 s.RecommendationSourceType = &v 1986 return s 1987} 1988 1989// A summary of a recommendation. 1990type RecommendationSummary struct { 1991 _ struct{} `type:"structure"` 1992 1993 // The AWS account ID of the recommendation summary. 1994 AccountId *string `locationName:"accountId" type:"string"` 1995 1996 // The resource type of the recommendation. 1997 RecommendationResourceType *string `locationName:"recommendationResourceType" type:"string" enum:"RecommendationSourceType"` 1998 1999 // An array of objects that describe a recommendation summary. 2000 Summaries []*Summary `locationName:"summaries" type:"list"` 2001} 2002 2003// String returns the string representation 2004func (s RecommendationSummary) String() string { 2005 return awsutil.Prettify(s) 2006} 2007 2008// GoString returns the string representation 2009func (s RecommendationSummary) GoString() string { 2010 return s.String() 2011} 2012 2013// SetAccountId sets the AccountId field's value. 2014func (s *RecommendationSummary) SetAccountId(v string) *RecommendationSummary { 2015 s.AccountId = &v 2016 return s 2017} 2018 2019// SetRecommendationResourceType sets the RecommendationResourceType field's value. 2020func (s *RecommendationSummary) SetRecommendationResourceType(v string) *RecommendationSummary { 2021 s.RecommendationResourceType = &v 2022 return s 2023} 2024 2025// SetSummaries sets the Summaries field's value. 2026func (s *RecommendationSummary) SetSummaries(v []*Summary) *RecommendationSummary { 2027 s.Summaries = v 2028 return s 2029} 2030 2031// Describes a projected utilization metric of a recommendation option. 2032type RecommendedOptionProjectedMetric struct { 2033 _ struct{} `type:"structure"` 2034 2035 // An array of objects that describe a projected utilization metric. 2036 ProjectedMetrics []*ProjectedMetric `locationName:"projectedMetrics" type:"list"` 2037 2038 // The rank of the recommendation option projected metric. 2039 // 2040 // The top recommendation option is ranked as 1. 2041 // 2042 // The projected metric rank correlates to the recommendation option rank. For 2043 // example, the projected metric ranked as 1 is related to the recommendation 2044 // option that is also ranked as 1 in the same response. 2045 Rank *int64 `locationName:"rank" type:"integer"` 2046 2047 // The recommended instance type. 2048 RecommendedInstanceType *string `locationName:"recommendedInstanceType" type:"string"` 2049} 2050 2051// String returns the string representation 2052func (s RecommendedOptionProjectedMetric) String() string { 2053 return awsutil.Prettify(s) 2054} 2055 2056// GoString returns the string representation 2057func (s RecommendedOptionProjectedMetric) GoString() string { 2058 return s.String() 2059} 2060 2061// SetProjectedMetrics sets the ProjectedMetrics field's value. 2062func (s *RecommendedOptionProjectedMetric) SetProjectedMetrics(v []*ProjectedMetric) *RecommendedOptionProjectedMetric { 2063 s.ProjectedMetrics = v 2064 return s 2065} 2066 2067// SetRank sets the Rank field's value. 2068func (s *RecommendedOptionProjectedMetric) SetRank(v int64) *RecommendedOptionProjectedMetric { 2069 s.Rank = &v 2070 return s 2071} 2072 2073// SetRecommendedInstanceType sets the RecommendedInstanceType field's value. 2074func (s *RecommendedOptionProjectedMetric) SetRecommendedInstanceType(v string) *RecommendedOptionProjectedMetric { 2075 s.RecommendedInstanceType = &v 2076 return s 2077} 2078 2079// The specified resource was not found. 2080type ResourceNotFoundException struct { 2081 _ struct{} `type:"structure"` 2082 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2083 2084 Message_ *string `locationName:"message" type:"string"` 2085} 2086 2087// String returns the string representation 2088func (s ResourceNotFoundException) String() string { 2089 return awsutil.Prettify(s) 2090} 2091 2092// GoString returns the string representation 2093func (s ResourceNotFoundException) GoString() string { 2094 return s.String() 2095} 2096 2097func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 2098 return &ResourceNotFoundException{ 2099 RespMetadata: v, 2100 } 2101} 2102 2103// Code returns the exception type name. 2104func (s *ResourceNotFoundException) Code() string { 2105 return "ResourceNotFoundException" 2106} 2107 2108// Message returns the exception's message. 2109func (s *ResourceNotFoundException) Message() string { 2110 if s.Message_ != nil { 2111 return *s.Message_ 2112 } 2113 return "" 2114} 2115 2116// OrigErr always returns nil, satisfies awserr.Error interface. 2117func (s *ResourceNotFoundException) OrigErr() error { 2118 return nil 2119} 2120 2121func (s *ResourceNotFoundException) Error() string { 2122 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2123} 2124 2125// Status code returns the HTTP status code for the request's response error. 2126func (s *ResourceNotFoundException) StatusCode() int { 2127 return s.RespMetadata.StatusCode 2128} 2129 2130// RequestID returns the service's response RequestID for request. 2131func (s *ResourceNotFoundException) RequestID() string { 2132 return s.RespMetadata.RequestID 2133} 2134 2135// The request has failed due to a temporary failure of the server. 2136type ServiceUnavailableException struct { 2137 _ struct{} `type:"structure"` 2138 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2139 2140 Message_ *string `locationName:"message" type:"string"` 2141} 2142 2143// String returns the string representation 2144func (s ServiceUnavailableException) String() string { 2145 return awsutil.Prettify(s) 2146} 2147 2148// GoString returns the string representation 2149func (s ServiceUnavailableException) GoString() string { 2150 return s.String() 2151} 2152 2153func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { 2154 return &ServiceUnavailableException{ 2155 RespMetadata: v, 2156 } 2157} 2158 2159// Code returns the exception type name. 2160func (s *ServiceUnavailableException) Code() string { 2161 return "ServiceUnavailableException" 2162} 2163 2164// Message returns the exception's message. 2165func (s *ServiceUnavailableException) Message() string { 2166 if s.Message_ != nil { 2167 return *s.Message_ 2168 } 2169 return "" 2170} 2171 2172// OrigErr always returns nil, satisfies awserr.Error interface. 2173func (s *ServiceUnavailableException) OrigErr() error { 2174 return nil 2175} 2176 2177func (s *ServiceUnavailableException) Error() string { 2178 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2179} 2180 2181// Status code returns the HTTP status code for the request's response error. 2182func (s *ServiceUnavailableException) StatusCode() int { 2183 return s.RespMetadata.StatusCode 2184} 2185 2186// RequestID returns the service's response RequestID for request. 2187func (s *ServiceUnavailableException) RequestID() string { 2188 return s.RespMetadata.RequestID 2189} 2190 2191// The summary of a recommendation. 2192type Summary struct { 2193 _ struct{} `type:"structure"` 2194 2195 // The finding classification of the recommendation. 2196 Name *string `locationName:"name" type:"string" enum:"Finding"` 2197 2198 // The value of the recommendation summary. 2199 Value *float64 `locationName:"value" type:"double"` 2200} 2201 2202// String returns the string representation 2203func (s Summary) String() string { 2204 return awsutil.Prettify(s) 2205} 2206 2207// GoString returns the string representation 2208func (s Summary) GoString() string { 2209 return s.String() 2210} 2211 2212// SetName sets the Name field's value. 2213func (s *Summary) SetName(v string) *Summary { 2214 s.Name = &v 2215 return s 2216} 2217 2218// SetValue sets the Value field's value. 2219func (s *Summary) SetValue(v float64) *Summary { 2220 s.Value = &v 2221 return s 2222} 2223 2224// The limit on the number of requests per second was exceeded. 2225type ThrottlingException struct { 2226 _ struct{} `type:"structure"` 2227 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2228 2229 Message_ *string `locationName:"message" type:"string"` 2230} 2231 2232// String returns the string representation 2233func (s ThrottlingException) String() string { 2234 return awsutil.Prettify(s) 2235} 2236 2237// GoString returns the string representation 2238func (s ThrottlingException) GoString() string { 2239 return s.String() 2240} 2241 2242func newErrorThrottlingException(v protocol.ResponseMetadata) error { 2243 return &ThrottlingException{ 2244 RespMetadata: v, 2245 } 2246} 2247 2248// Code returns the exception type name. 2249func (s *ThrottlingException) Code() string { 2250 return "ThrottlingException" 2251} 2252 2253// Message returns the exception's message. 2254func (s *ThrottlingException) Message() string { 2255 if s.Message_ != nil { 2256 return *s.Message_ 2257 } 2258 return "" 2259} 2260 2261// OrigErr always returns nil, satisfies awserr.Error interface. 2262func (s *ThrottlingException) OrigErr() error { 2263 return nil 2264} 2265 2266func (s *ThrottlingException) Error() string { 2267 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2268} 2269 2270// Status code returns the HTTP status code for the request's response error. 2271func (s *ThrottlingException) StatusCode() int { 2272 return s.RespMetadata.StatusCode 2273} 2274 2275// RequestID returns the service's response RequestID for request. 2276func (s *ThrottlingException) RequestID() string { 2277 return s.RespMetadata.RequestID 2278} 2279 2280type UpdateEnrollmentStatusInput struct { 2281 _ struct{} `type:"structure"` 2282 2283 // Indicates whether to enroll member accounts within the organization, if the 2284 // account is a master account of an organization. 2285 IncludeMemberAccounts *bool `locationName:"includeMemberAccounts" type:"boolean"` 2286 2287 // The new enrollment status of the account. 2288 // 2289 // Accepted options are Active or Inactive. You will get an error if Pending 2290 // or Failed are specified. 2291 // 2292 // Status is a required field 2293 Status *string `locationName:"status" type:"string" required:"true" enum:"Status"` 2294} 2295 2296// String returns the string representation 2297func (s UpdateEnrollmentStatusInput) String() string { 2298 return awsutil.Prettify(s) 2299} 2300 2301// GoString returns the string representation 2302func (s UpdateEnrollmentStatusInput) GoString() string { 2303 return s.String() 2304} 2305 2306// Validate inspects the fields of the type to determine if they are valid. 2307func (s *UpdateEnrollmentStatusInput) Validate() error { 2308 invalidParams := request.ErrInvalidParams{Context: "UpdateEnrollmentStatusInput"} 2309 if s.Status == nil { 2310 invalidParams.Add(request.NewErrParamRequired("Status")) 2311 } 2312 2313 if invalidParams.Len() > 0 { 2314 return invalidParams 2315 } 2316 return nil 2317} 2318 2319// SetIncludeMemberAccounts sets the IncludeMemberAccounts field's value. 2320func (s *UpdateEnrollmentStatusInput) SetIncludeMemberAccounts(v bool) *UpdateEnrollmentStatusInput { 2321 s.IncludeMemberAccounts = &v 2322 return s 2323} 2324 2325// SetStatus sets the Status field's value. 2326func (s *UpdateEnrollmentStatusInput) SetStatus(v string) *UpdateEnrollmentStatusInput { 2327 s.Status = &v 2328 return s 2329} 2330 2331type UpdateEnrollmentStatusOutput struct { 2332 _ struct{} `type:"structure"` 2333 2334 // The enrollment status of the account. 2335 Status *string `locationName:"status" type:"string" enum:"Status"` 2336 2337 // The reason for the enrollment status of the account. For example, an account 2338 // might show a status of Pending because member accounts of an organization 2339 // require more time to be enrolled in the service. 2340 StatusReason *string `locationName:"statusReason" type:"string"` 2341} 2342 2343// String returns the string representation 2344func (s UpdateEnrollmentStatusOutput) String() string { 2345 return awsutil.Prettify(s) 2346} 2347 2348// GoString returns the string representation 2349func (s UpdateEnrollmentStatusOutput) GoString() string { 2350 return s.String() 2351} 2352 2353// SetStatus sets the Status field's value. 2354func (s *UpdateEnrollmentStatusOutput) SetStatus(v string) *UpdateEnrollmentStatusOutput { 2355 s.Status = &v 2356 return s 2357} 2358 2359// SetStatusReason sets the StatusReason field's value. 2360func (s *UpdateEnrollmentStatusOutput) SetStatusReason(v string) *UpdateEnrollmentStatusOutput { 2361 s.StatusReason = &v 2362 return s 2363} 2364 2365// Describes a utilization metric of a resource, such as an Amazon EC2 instance. 2366type UtilizationMetric struct { 2367 _ struct{} `type:"structure"` 2368 2369 // The name of the utilization metric. 2370 // 2371 // Memory metrics are only returned for resources that have the unified CloudWatch 2372 // agent installed on them. For more information, see Enabling Memory Utilization 2373 // with the CloudWatch Agent (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html). 2374 Name *string `locationName:"name" type:"string" enum:"MetricName"` 2375 2376 // The statistic of the utilization metric. 2377 Statistic *string `locationName:"statistic" type:"string" enum:"MetricStatistic"` 2378 2379 // The value of the utilization metric. 2380 Value *float64 `locationName:"value" type:"double"` 2381} 2382 2383// String returns the string representation 2384func (s UtilizationMetric) String() string { 2385 return awsutil.Prettify(s) 2386} 2387 2388// GoString returns the string representation 2389func (s UtilizationMetric) GoString() string { 2390 return s.String() 2391} 2392 2393// SetName sets the Name field's value. 2394func (s *UtilizationMetric) SetName(v string) *UtilizationMetric { 2395 s.Name = &v 2396 return s 2397} 2398 2399// SetStatistic sets the Statistic field's value. 2400func (s *UtilizationMetric) SetStatistic(v string) *UtilizationMetric { 2401 s.Statistic = &v 2402 return s 2403} 2404 2405// SetValue sets the Value field's value. 2406func (s *UtilizationMetric) SetValue(v float64) *UtilizationMetric { 2407 s.Value = &v 2408 return s 2409} 2410 2411const ( 2412 // FilterNameFinding is a FilterName enum value 2413 FilterNameFinding = "Finding" 2414 2415 // FilterNameRecommendationSourceType is a FilterName enum value 2416 FilterNameRecommendationSourceType = "RecommendationSourceType" 2417) 2418 2419const ( 2420 // FindingUnderprovisioned is a Finding enum value 2421 FindingUnderprovisioned = "Underprovisioned" 2422 2423 // FindingOverprovisioned is a Finding enum value 2424 FindingOverprovisioned = "Overprovisioned" 2425 2426 // FindingOptimized is a Finding enum value 2427 FindingOptimized = "Optimized" 2428 2429 // FindingNotOptimized is a Finding enum value 2430 FindingNotOptimized = "NotOptimized" 2431) 2432 2433const ( 2434 // MetricNameCpu is a MetricName enum value 2435 MetricNameCpu = "Cpu" 2436 2437 // MetricNameMemory is a MetricName enum value 2438 MetricNameMemory = "Memory" 2439) 2440 2441const ( 2442 // MetricStatisticMaximum is a MetricStatistic enum value 2443 MetricStatisticMaximum = "Maximum" 2444 2445 // MetricStatisticAverage is a MetricStatistic enum value 2446 MetricStatisticAverage = "Average" 2447) 2448 2449const ( 2450 // RecommendationSourceTypeEc2instance is a RecommendationSourceType enum value 2451 RecommendationSourceTypeEc2instance = "Ec2Instance" 2452 2453 // RecommendationSourceTypeAutoScalingGroup is a RecommendationSourceType enum value 2454 RecommendationSourceTypeAutoScalingGroup = "AutoScalingGroup" 2455) 2456 2457const ( 2458 // StatusActive is a Status enum value 2459 StatusActive = "Active" 2460 2461 // StatusInactive is a Status enum value 2462 StatusInactive = "Inactive" 2463 2464 // StatusPending is a Status enum value 2465 StatusPending = "Pending" 2466 2467 // StatusFailed is a Status enum value 2468 StatusFailed = "Failed" 2469) 2470